1import{L as gs}from"./exam-D1F0P-h7.js";import{_ as ze,h as je,o,c as v,b as s,t as h,i as P,f as D,d as M,ao as oe,F as q,r as Z,a as nt,I as ie,e as A,R as be,ap as ms,N as lt,O as ot,u as S,a8 as Dt,k as fs,ar as ys,C as ks,A as bs,B as ws,s as x,as as Rt,at as ye,Q as k,au as tt,S as It,av as ne,aw as y,a4 as xs,ax as _s,ah as X,x as Ss,an as Ts,ay as st,am as Cs,g as $s,az as As,aA as qt}from"./index-DYCuy6rM.js";import{U as Ut,m as Yt,i as le,t as Es,h as Be,C as Lt,b as jt,r as Bt,c as Ns,d as Ps,P as Os,R as Rs,n as Is,e as qe,a as qs}from"./PlayerScreen-j0iLVMtp.js";import{r as zt}from"./extra_time_preference-CnpIe-tt.js";import{t as Ls}from"./prefetched_exam-CBF6PGLr.js";import"./plan_price-DzeBaqF-.js";const ke=["Choose a quiet setting where interruptions are unlikely, and clear away anything distracting.","Check your connection and use an up-to-date browser. A drop mid-test cannot be undone.","Once started, a timed test cannot be paused. Be ready to sit the whole thing in one go.","Read every option before answering. There is no penalty for a
1wrong answer, so never leave one blank.","Watch the clock. Roughly a minute a question is the pace to beat."],js=["There are no right or wrong answers. The result is only useful if it is honest.","Answer as you actually are, not as you would like to be or as a job might want you to be.","Go with your first reaction. Dwelling on a statement tends to make the answer less true, not more.","Answer every statement. A gap leaves a hole in your profile.","There is no clock. Take the time you need, and you can change any answer before you finish."],Bs={components:{UpgradeOffer:Ut},props:{bundle:{type:Object,required:!0},saved:{type:Object,default:null},extra:{type:Number,default:0},shortcuts:{type:Boolean,default:!0},locked:{type:Boolean,default:!1},packageSlug:{type:String,default:null},starting:{type:Boolean,default:!1},averageProvisional:{type:Boolean,default:!1},averageScore:{type:Number,default:null},averageLabel:{type:String,default:"User average"},bestScore:{type:Number,default:null},backLabel:{type:String,default:"Back"}},emits:["start","resume","discard","set-shortcuts","exit"],computed:{titleTag:()=>Be(0),sectionTag:()=>Be(1),settingsRoute:()=>ms(),isProfile(){return!!this.bundle.profile},instructions(){return this.isProfile?js:[...ke.slice(0,-1),this.paceLine]},paceLine(){const t=this.bundle.questions.length;if(!this.bundle.minutes||!t)return ke[ke.length-1];const l=Math.round(this.bundle.minutes*60/t);return l>=55&&l<=65?ke[ke.length-1]:`Watch the clock. This test allows ${l>=90?`about ${Math.round(l/30)/2} minutes a question`:`about ${l} seconds a question`}, and that is the pace to beat.`},about(){return Es(this.bundle.instructions)},minutesWithExtra(){return this.minutesFor(this.extra)},facts(){if(this.isProfile){const l=[{label:this.bundle.profile.model==="word_grid"?"Word lists":"Statements",value:String(this.bundle.questions.length)}];return this.bundle.profile.about_minutes&&l.push({label:"Takes about",value:`${this.bundle.profile.about_minutes} min`}),l.push({label:"Time limit",value:"None"}),l}const t=[{label:"Questions",value:String(this.bundle.questions.length)}];return this.bundle.minutes&&t.push({label:"Time limit",value:`${this.minutesWithExtra} min`}),this.averageScore!==null&&t.push({label:this.averageLabel,value:`${this.averageScore}%`}),t.push({label:"Your best",value:this.bestScore!==null?`${this.bestScore}%`:"â"}),t},resumeLine(){if(!this.saved)return"";const t=this.saved.given||{};return`${this.bundle.questions.filter(n=>le(n,t[n.id])).length} of ${this.bundle.questions.length} answered. You were on question ${(this.saved.i||0)+1}.`},resumeMeta(){if(!this.saved)return"";const t=[];if(this.saved.mode==="timed"&&this.bundle.minutes){const l=Math.round(this.bundle.minutes*60*(1+(this.saved.extra||0)/100)),n=Math.max(0,l-(this.saved.elapsed||0));t.push(`${Yt(n)} left on the clock`)}else t.push("untimed");if(this.saved.savedAt){const l=Math.max(0,Math.round((Date.now()-this.saved.savedAt)/6e4));t.push(l===0?"saved just now":`saved ${l} ${l===1?"minute":"minutes"} ago`)}return t.join(" · ")}},methods:{minutesFor(t){return this.bundle.minutes?Math.round(this.bundle.minutes*(1+t/100)):null}}},j=t=>(lt("data-v-73925aca"),t=t(),ot(),t),zs={class:"pl-page"},Fs={style:{width:"100%","max-width":"900px",padding:"40px 24px 72px",margin:"0 auto"}},Ms={style:{"margin-bottom":"24px"}},Ds={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.8",style:{width:"16px",height:"16px"}},Us=j(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19l-7-7 7-7"},null,-1)),Ys=[Us],Ks=j(()=>s("div",{style:{width:"26px",height:"4px",background:"var(--tp-mark)","border-radius":"2px","margin-bottom":"12px"}},null,-1)),Gs={class:"facts-grid"},Ws={style:{margin:"0 0 6px",font:"500 12px/1.3 var(--tp-font-body)",color:"var(--tp-ink-muted)"}},Vs={class:"r-num",style:{margin:"0","font-weight":"500","font-size":"20px","line-height":"1",color:"var(--tp-ink)"}},Hs={key:0,class:"pl-card",style:{padding:"24px 28px","margin-bottom":"16px"},"data-test":"locked"},Qs={key:1,class:"mode-grid"},Js={class:"launch-status",role:"status"},Xs=["disabled","aria-busy"],Zs={style:{display:"flex","align-items":"center",gap:"10px","margin-bottom":"10px"}},ea={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.6",stroke:"currentColor",style:{width:"20px",height:"20px",color:"var(--tp-accent)"}},ta=j(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)),sa=[ta],aa=j(()=>s("span",{style:{"font-size":"17px","font-weight":"500",color:"var(--tp-ink)"}},"Timed test",-1)),na=j(()=>s("span",{class:"mode-tag",style:{background:"var(--tp-accent-tint)",color:"var(--tp-accent)"}},"Scored",-1)),la={style:{display:"block","margin-bottom":"16px","font-size":"14px","line-height":"1.6",color:"var(--tp-ink-muted)","text-wrap":"pretty"}},oa={class:"mode-cta mode-cta--primary"},ia={key:0,class:"launch-label","aria-hidden":"true"},ra=["disabled","aria-busy"],ua={style:{display:"flex","align-items":"center",gap:"10px","margin-bottom":"10px"}},ca={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.6",stroke:"currentColor",style:{width:"20px",height:"20px",color:"var(--tp-ink-muted)"}},da=j(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"},null,-1)),va=[da],pa={style:{"font-size":"17px","font-weight":"500",color:"var(--tp-ink)"}},ha={class:"mode-tag",style:{background:"var(--tp-surface-sunken)",border:"1px solid var(--tp-line)",color:"var(--tp-ink-muted)"}},ga={style:{display:"block","margin-bottom":"16px","font-size":"14px","line-height":"1.6",color:"var(--tp-ink-muted)","text-wrap":"pretty"}},ma={key:0,class:"launch-label","aria-hidden":"true"},fa={key:2,class:"resume-row","data-test":"resume-banner"},ya={class:"resume-note"},ka={class:"resume-note resume-note--muted r-num"},ba=j(()=>s("span",{style:{flex:"1 1 auto"}},null,-1)),wa=["disabled"],xa=["disabled"],_a={key:3,style:{"margin-bottom":"16px",display:"flex","align-items":"center",gap:"8px","flex-wrap":"wrap","min-height":"44px","font-size":"14px",color:"var(--tp-ink-muted)"},"data-test":"extra-time-note"},Sa={fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.8","aria-hidden":"true",style:{width:"15px",height:"15px",flex:"0 0 auto"}},Ta=j(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)),Ca=[Ta],$a={key:0},Aa={key:1},Ea={key:4,style:{"margin-bottom":"16px"}},Na=["aria-pressed"],Pa={fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.8","aria-hidden":"true",style:{width:"15px",height:"15px",flex:"0 0 auto"}},Oa=j(()=>s("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"},null,-1)),Ra=j(()=>s("path",{"stroke-linecap":"round",d:"M7 10h.01M11 10h.01M15 10h.01M7 14h10"},null,-1)),Ia=[Oa,Ra],qa={class:"pl-helper",style:{margin:"2px 0 0 23px","max-width":"62ch","line-height":"1.5"},"data-test":"shortcuts-note"},La={key:5,class:"pl-card",style:{"border-radius":"12px",overflow:"hidden","margin-bottom":"16px"},"data-test":"about-test"},ja={style:{padding:"13px 20px","border-bottom":"1px solid var(--tp-line)",background:"var(--tp-surface-sunken)"}},Ba={style:{padding:"6px 20px 8px"}},za={class:"pl-card",style:{"border-radius":"12px",overflow:"hidden"}},Fa={style:{display:"flex","align-items":"baseline","justify-content":"space-between",gap:"16px",padding:"13px 20px","border-bottom":"1px solid var(--tp-line)",background:"var(--tp-surface-sunken)"}},Ma=j(()=>s("span",{style:{font:"400 13px/1.5 var(--tp-font-body)",color:"var(--tp-ink-muted)"}},"Five things worth knowing",-1)),Da={class:"r-num",style:{flex:"0 0 auto",width:"24px",height:"24px","border-radius":"50%",background:"var(--tp-accent-tint)",display:"flex","align-items":"center","justify-content":"center","font-weight":"500","font-size":"12px",color:"var(--tp-accent)"}},Ua={style:{"font-size":"15px","line-height":"1.6",color:"var(--tp-ink-copy)","text-wrap":"pretty"}};function Ya(t,l,n,d,E,c){const g=je("UpgradeOffer"),T=je("router-link");return o(),v("div",zs,[s("div",Fs,[s("div",Ms,[s("button",{type:"button",class:"pl-btn pl-btn--quiet",style:{"min-height":"36px",height:"auto",padding:"0","font-size":"14px"},onClick:l[0]||(l[0]=m=>t.$emit("exit"))},[(o(),v("svg",Ds,Ys)),s("span",null,h(n.backLabel),1)])]),Ks,(o(),P(oe(c.titleTag),{style:{margin:"0 0 20px","font-size":"28px","line-height":"1.2","font-weight":"500",color:"var(--tp-ink)","letter-spacing":"-0.01em"}},{default:D(()=>[M(h(n.bundle.name),1)]),_:1})),s("ul",Gs,[(o(!0),v(q,null,Z(c.facts,m=>(o(),v("li",{key:m.label,class:"fact-cell"},[s("p",Ws,h(m.label),1),s("p",Vs,h(m.value),1)]))),128))]),n.locked?(o(),v("div",Hs,[nt(g,{surface:"test-locked","test-slug":n.bundle.slug,"package-slug":n.packageSlug},null,8,["test-slug","package-slug"])])):(o(),v("div",Qs,[s("p",Js,h(n.starting?"Preparing your testâ¦":""),1),n.bundle.minutes?(o(),v("button",{key:0,t
1ype:"button",class:"mode-card mode-card--timed",disabled:n.starting,"aria-busy":n.starting,"data-test":"start-timed",onClick:l[1]||(l[1]=m=>t.$emit("start","timed"))},[s("span",Zs,[(o(),v("svg",ea,sa)),aa,na]),s("span",la,h(c.minutesWithExtra)+" minutes on the clock, just like the real sitting. Your score is saved to your dashboard. ",1),s("span",oa,[s("span",{class:ie({"launch-label--hidden":n.starting})},"Start timed test",2),n.starting?(o(),v("span",ia,"Preparing testâ¦")):A("",!0)])],8,Xs)):A("",!0),s("button",{type:"button",class:"mode-card",disabled:n.starting,"aria-busy":n.starting,"data-test":"start-untimed",onClick:l[2]||(l[2]=m=>t.$emit("start","practice"))},[s("span",ua,[(o(),v("svg",ca,va)),s("span",pa,h(c.isProfile?"Start the test":"Untimed test"),1),s("span",ha,h(c.isProfile?"Profile":"Practice"),1)]),s("span",ga,[c.isProfile?(o(),v(q,{key:0},[M("No clock. Answer as you are, not as you would like to be. Your profile follows straight after.")],64)):(o(),v(q,{key:1},[M("No clock, and you can reveal the worked solution on any question. Nothing is saved.")],64))]),s("span",{class:ie(["mode-cta",{"mode-cta--primary":c.isProfile}])},[s("span",{class:ie({"launch-label--hidden":n.starting})},h(c.isProfile?"Start":"Start untimed test"),3),n.starting?(o(),v("span",ma,"Preparing testâ¦")):A("",!0)],2)],8,ra)])),n.saved?(o(),v("div",fa,[s("span",ya,h(c.resumeLine),1),s("span",ka,h(c.resumeMeta),1),ba,s("button",{type:"button",class:"resume-link",disabled:n.starting,"data-test":"resume-attempt",onClick:l[3]||(l[3]=m=>t.$emit("resume"))},"Pick up where I left off",8,wa),s("button",{type:"button",class:"resume-link resume-link--muted",disabled:n.starting,"data-test":"discard-attempt",onClick:l[4]||(l[4]=m=>t.$emit("discard"))},"Discard",8,xa)])):A("",!0),!n.locked&&n.bundle.minutes&&(n.extra>0||c.settingsRoute)?(o(),v("div",_a,[(o(),v("svg",Sa,Ca)),n.extra>
10?(o(),v("span",$a,"Extra time: +"+h(n.extra)+"%, set in Settings.",1)):(o(),v("span",Aa,"Do you get extra time?")),c.settingsRoute?(o(),P(T,{key:2,to:c.settingsRoute,style:{color:"var(--tp-accent)","text-decoration":"none","font-weight":"500"},"data-test":"extra-time-settings"},{default:D(()=>[M(h(n.extra>0?"Change it in Settings":"Set it in Settings"),1)]),_:1},8,["to"])):A("",!0)])):A("",!0),n.locked?A("",!0):(o(),v("div",Ea,[s("button",{type:"button",class:"pl-btn pl-btn--quiet",style:{"min-height":"44px",padding:"0","font-size":"14px"},"aria-pressed":n.shortcuts?"true":"false","data-test":"shortcuts-toggle",onClick:l[5]||(l[5]=m=>t.$emit("set-shortcuts",!n.shortcuts))},[(o(),v("svg",Pa,Ia)),s("span",null,"Single-key shortcuts: "+h(n.shortcuts?"on":"off"),1)],8,Na),s("p",qa,h(n.shortcuts?"Number keys answer; G, F, C, S, K and N open the grid, flag, clear, reveal, calculator and notes. Turn them off if you use speech input or a switch.":"Number and letter keys do nothing. Arrow keys, Enter and Escape still work."),1)])),c.about.length?(o(),v("div",La,[s("div",ja,[(o(),P(oe(c.sectionTag),{style:{margin:"0","font-size":"15px","font-weight":"500",color:"var(--tp-ink)"}},{default:D(()=>[M("About this test")]),_:1}))]),s("div",Ba,[(o(!0),v(q,null,Z(c.about,(m,p)=>(o(),v("p",{key:p,style:{margin:"10px 0","max-width":"72ch","font-size":"15px","line-height":"1.6",color:"var(--tp-ink-copy)","text-wrap":"pretty"}},h(m),1))),128))])])):A("",!0),s("div",za,[s("div",Fa,[(o(),P(oe(c.sectionTag),{style:{margin:"0","font-size":"15px","font-weight":"500",color:"var(--tp-ink)"}},{default:D(()=>[M("Before you start")]),_:1})),Ma]),s("ol",null,[(o(!0),v(q,null,Z(c.instructions,(m,p)=>(o(),v("li",{key:p,style:be([{display:"flex",gap:"14px",padding:"14px 20px"},p>0?"border-top: 1px solid var(--tp-line-subtle)":""])},[s("span",Da,h(String(p+1).padStart(2,"0")),1),s("span",Ua,h(m),1)],4))),128))])])])])}const Ka=ze(Bs,[["render",Ya],["__scopeId","data-v-73925aca"]]),Ga={props:{bundle:{type:Object,required:!0},given:{type:Object,default:()=>({})},flags:{type:Object,default:()=>({})},remaining:{type:Number,default:0},timed:{type:Boolean,default:!0},profile:{type:Boolean,default:!1}},emits:["jump","submit","change-answers"],computed:{titleTag:()=>Be(0),submitNote(){if(this.profile)return"Submitting ends the test. Your profile follows straight after.";let t=!1;try{t=!!S().data.isFreeUser()}catch{t=!1}return t?`Submitting ends the attempt. Your score follows straight after; the worked solutions need ${Dt()}.`:"Submitting ends the attempt. Every worked solution opens straight after."},answeredFlags(){return this.bundle.questions.map(t=>le(t,this.given[t.id]))},answeredCount(){return this.answeredFlags.filter(Boolean).length},skippedCount(){return this.answeredFlags.filter(t=>!t).length},flaggedCount(){return this.bundle.questions.filter(t=>this.flags[t.id]).length},headline(){if(this.skippedCount===0)return this.flaggedCount?`Everything is answered, ${this.flaggedCount} flagged`:"Everything is answered";const t=`${this.skippedCount} ${this.skippedCount===1?"question is":"questions are"} unanswered`;return this.flaggedCount?`${t}, ${this.flaggedCount} flagged`:t},summary(){const t=this.skippedCount===0?this.profile?"Take a second look at anything you like before you see your profile.":"Take a second look at anything you like.":this.profile?"An unanswered statement leaves a gap in your profile. Select any of them to fill it in.":"Unanswered questions score zero. Select any of them to answer it.";return this.timed&&!this.profile?`${t} The clock is paused while you are here.`:t},clockLabel(){return Yt(this.remaining)},clockClass(){return this.remaining<Lt?"pl-clock--bad":this.remaining<jt?"pl-clock--warn":null},stats(){const t=this.bundle.questions.length,l=[{label:"Answered",value:`${this.answeredCount} / ${t}`,color:this.answeredCount===t?"var(--tp-good)":"var(--tp-ink)"},{label:"Flagged",value:String(this.flaggedCount),color:this.flaggedCount?"var(--tp-flag)":"var(--tp-ink)"}];return this.timed&&l.push({label:"Time left",value:this.clockLabel,color:this.remaining<Lt?"var(--tp-bad)":this.remaining<jt?"var(--tp-warn)":"var(--tp-ink)"}),l},tiles(){return this.bundle.questions.map((t,l)=>{const n=this.given[t.id],d=this.answeredFlags[l];let E;if(t.format==="likely"){const T=n||{};E=`${this.letterOf(t,T.most)} / ${this.letterOf(t,T.least)}`}else if(t.format==="rank")E=n&&Object.keys(n).length?Object.entries(n).sort((T,m)=>T[0]-m[0]).map(([,T])=>this.letterOf(t,T)).join(" "):"â";else if(t.format==="scale"){const T=t.answers.find(m=>m.id===n);E=T?`${T.value} / ${t.answers.length}`:"â"}else t.format==="multi"?E=Array.isArray(n)&&n.length?`${n.length} ticked`:"â":E=this.letterOf(t,n);const c=!!this.flags[t.id],g=d?null:n!=null?"Half answered":null;return{index:l,num:String(l+1).padStart(2,"0"),answer:E,answered:d,flagged:c,note:g,state:c?"review-tile--flagged":d?"review-tile--answered":"review-tile--open",aria:`Question ${l+1}: ${d?`answered ${E}`:"unanswered"}${c?", flagged":""}`}})}},methods:{letterOf(t,l){if(!l)return"â";const n=t.answers.find(d=>d.id===l);return n?n.letter:"â"}}},re=t=>(lt("data-v-dc1ac5ff"),t=t(),ot(),t),Wa={class:"pl-page review-screen"},Va={class:"pl-header"},Ha={class:"pl-header-row",style:{gap:"18px"}},Qa={style:{"min-width":"0",flex:"1 1 0",padding:"10px 0"}},Ja=re(()=>s("p",{style:{margin:"0 0 3px",font:"400 11px/1 var(--tp-font-mono)","letter-spacing":"0.07em","text-transform":"uppercase",color:"var(--tp-ink-faint)"}},"Before you submit",-1)),Xa={style:{margin:"0","font-size":"15px","font-weight":"500",color:"var(--tp-ink)"}},Za={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","aria-hidden":"true",style:{width:"17px",height:"17px",flex:"0 0 auto"}},en=re(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)),tn=[en],sn=re(()=>s("span",{style:{flex:"1 1 0"}},null,-1)),an={class:"review-page"},nn={class:"pl-card review-main"},ln={class:"review-head"},on={class:"review-summary","data-test":"review-summary"},rn=re(()=>s("div",{class:"review-grid-head"},[s("p",{class:"pl-eyebrow",style:{margin:"0","letter-spacing":"0.08em"}},"Your answers"),s("p",{class:"review-hint"},"Select a question to go back to it")],-1)),un={class:"review-grid",role:"list"}
1,cn=["aria-label","title","data-test","onClick"],dn={class:"r-num review-tile-num"},vn={class:"r-num review-tile-answer"},pn={key:0,class:"review-tile-note"},hn={key:1,class:"review-tile-flag",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},gn=re(()=>s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 21V4.5h9l-1.2 3.2L14 11H5"},null,-1)),mn=[gn],fn={class:"review-grid-foot"},yn=fs('<div class="review-key" data-v-dc1ac5ff><span class="review-key-item" data-v-dc1ac5ff><span class="review-key-swatch review-tile--answered" data-v-dc1ac5ff></span>Answered</span><span class="review-key-item" data-v-dc1ac5ff><span class="review-key-swatch review-tile--open" data-v-dc1ac5ff></span>Unanswered</span><span class="review-key-item" data-v-dc1ac5ff><span class="review-key-swatch review-tile--flagged" data-v-dc1ac5ff></span>Flagged</span></div>',1),kn={class:"pl-card review-side"},bn=re(()=>s("p",{class:"review-side-title"},"Ready to submit?",-1)),wn={class:"review-facts"},xn={class:"review-fact-label"},_n={class:"review-note","data-test":"submit-note"};function Sn(t,l,n,d,E,c){return o(),v("div",Wa,[s("header",Va,[s("div",Ha,[s("div",Qa,[Ja,s("p",Xa,h(n.bundle.name),1)]),n.timed?(o(),v("p",{key:0,class:ie(["pl-clock",c.clockClass]),style:{"font-size":"17px"}},[(o(),v("svg",Za,tn)),M(" "+h(c.clockLabel),1)],2)):A("",!0),sn])]),s("main",an,[s("div",nn,[s("div",ln,[(o(),P(oe(c.titleTag),{class:"review-title","data-test":"review-headline"},{default:D(()=>[M(h(c.headline),1)]),_:1})),s("p",on,h(c.summary),1)]),rn,s("div",un,[(o(!0),v(q,null,Z(c.tiles,g=>(o(),v("button",{key:g.num,type:"button",class:ie(["review-tile",g.state]),role:"listitem","aria-label":g.aria,title:`Go to question ${g.num}`,"data-test":`tile-${g.num}`,onClick:T=>t.$emit("jump",g.index)},[s("span",dn,h(g.num),1),s("span",vn,h(g.answer),1),g.note?(o(),v("span",pn,h(g.note),1)):A("",!0),g.flagged?(o(),v("svg",hn,mn)):A("",!0)],10,cn))),128))]),s("div",fn,[yn,s("button",{type:"button",class:"review-change","data-test":"change-answers",onClick:l[0]||(l[0]=g=>t.$emit("change-answers"))},"Change answers")])]),s("aside",kn,[bn,s("ul",wn,[(o(!0),v(q,null,Z(c.stats,g=>(o(),v("li",{key:g.label,class:"review-fact"},[s("span",xn,h(g.label),1),s("span",{class:"r-num review-fact-value",style:be({color:g.color})},h(g.value),5)]))),128))]),s("button",{type:"button",class:"pl-btn pl-btn--primary review-submit","data-test":"submit",onClick:l[1]||(l[1]=g=>t.$emit("submit"))},"Submit attempt"),s("p",_n,h(c.submitNote),1)])])])}const Tn=ze(Ga,[["render",Sn],["__scopeId","data-v-dc1ac5ff"]]),Ft={"unsupported-version":{headline:"This test needs a newer version of the player",body:"It was written for a newer format than this player understands, so opening it now could show you a broken exam. It will open normally once the player is updated."},"unsupported-format":{headline:"This test uses a question type the player does not know",body:"Rather than show you a half-working exam, the player refuses it. The test will open normally once the player understands this format."},empty:{headline:"This test has no questions to show",body:"Something is wrong with the test content rather than with your connection. Try again shortly, or pick another test from the package."},error:{headline:"We could not load this test",body:"The connection to the test content failed. Nothing has been recorded against you. Check your connection and try again."},missing:{headline:"This test is no longer available",body:"It was removed from the package, so this link no longer opens anything. Your scores and history are unaffected. The tests still in the package are listed on the package page."},locked:{headline:"This test needs Premium",body:""}},Cn={components:{UpgradeOffer:Ut},props:{reason:{type:String,required:!0},name:{type:String,default:null},inPackage:{type:Boolean,default:!1},testSlug:{type:String,default:null},packageSlug:{type:String,default:null}},emits:["exit"],computed:{titleTag:()=>Be(0),isLocked(){return this.reason==="locked"},eyebrow(){return this.isLocked?`${Dt()} test`:"Cannot open this test"},eyebrowColour(){return this.isLocked?"var(--tp-accent)":"var(--tp-bad)"},copy(){return Ft[this.reason]||Ft.error},headline(){return this.copy.headline},body(){return this.copy.body}
1,buttonLabel(){return this.reason==="missing"?this.inPackage?"See the tests in this package":"Back to your dashboard":"Back to the test page"}}},$n={class:"pl-page"},An={class:"pl-header"},En={class:"pl-header-row",style:{"min-height":"64px"}},Nn={style:{margin:"0","font-size":"15px","font-weight":"500",color:"var(--tp-ink)"}},Pn={style:{"max-width":"1280px",margin:"0 auto",padding:"48px 24px 64px"}},On={class:"pl-card",style:{"max-width":"620px",margin:"0 auto",padding:"30px 32px"}},Rn={style:{margin:"0 0 24px","font-size":"16px","line-height":"1.6",color:"var(--tp-ink-copy)","max-width":"56ch","text-wrap":"pretty"}};function In(t,l,n,d,E,c){const g=je("UpgradeOffer");return o(),v("div",$n,[s("header",An,[s("div",En,[s("p",Nn,h(n.name||"This test"),1)])]),s("main",Pn,[s("section",On,[s("p",{class:"pl-eyebrow",style:be(`margin: 0 0 12px; color: ${c.eyebrowColour}; letter-spacing: 0.08em`)},h(c.eyebrow),5),c.isLocked?(o(),v(q,{key:0},[nt(g,{surface:"test-locked","heading-level":0,"test-slug":n.testSlug,"package-slug":n.packageSlug,style:{"margin-bottom":"20px"}},null,8,["test-slug","package-slug"]),s("button",{type:"button",class:"pl-btn",style:{height:"46px",padding:"0 20px"},onClick:l[0]||(l[0]=T=>t.$emit("exit"))},h(c.buttonLabel),1)],64)):(o(),v(q,{key:1},[(o(),P(oe(c.titleTag),{style:{margin:"0 0 12px","font-size":"24px","line-height":"1.3","font-weight":"500",color:"var(--tp-ink)"}},{default:D(()=>[M(h(c.headline),1)]),_:1})),s("p",Rn,h(c.body),1),s("button",{type:"button",class:"pl-btn pl-btn--primary",style:{height:"46px",padding:"0 20px"},onClick:l[1]||(l[1]=T=>t.$emit("exit"))},h(c.buttonLabel),1)],64))])])])}const Mt=ze(Cn,[["render",In]]),qn="pat-attempt-",it=(t,l)=>`${qn}${l}-${t}-v1`,Ln=(t,l,n)=>{try{return window.localStorage.setItem(it(t,l),JSON.stringify(n)),!0}catch{return!1}},jn=(t,l)=>{try{const n=window.localStorage.getItem(it(t,l));return n?JSON.parse(n):null}catch{return null}},Le=(t,l)=>{try{window.localStorage.removeItem(it(t,l))}catch{}},at="tp:single-key-shortcuts",Kt=t=>{try{return globalThis.localStorage}catch{return null}},Bn=t=>{const l=Kt();try{return!l||l.getItem(at)!=="off"}catch{return!0}},zn=(t,l)=>{const n=Kt();try{t?n==null||n.removeItem(at):n==null||n.setItem(at,"off")}catch{}return!!t},Fn=t=>typeof t.key=="string"&&t.key.length===1&&/[0-9a-z]/i.test(t.key),we=t=>(lt("data-v-dd7c1226"),t=t(),ot(),t),Mn={key:0,class:"pl-page"},Dn={style:{"max-width":"1280px",margin:"0 auto",padding:"24px 24px 64px"}},Un={"aria-busy":"true","aria-live":"polite",class:"pl-card r-defer",style:{padding:"26px 28px 30px","max-width":"760px",margin:"0 auto"}},Yn=we(()=>s("p",{class:"pl-eyebrow",style:{margin:"0 0 22px","letter-spacing":"0.08em"}},"Fetching your test",-1)),Kn={style:{display:"grid",gap:"12px","margin-bottom":"28px"}},Gn={style:{display:"grid",gap:"10px"}},Wn=we(()=>s("span",{class:"load-dot"},null,-1)),Vn=we(()=>s("p",{style:{margin:"26px 0 0",font:"400 13px/1.6 var(--tp-font-mono)",color:"var(--tp-ink-faint)"}}," The clock starts when question 01 appears. ",-1)),Hn=["role"],Qn={class:"pl-dialog",style:{"max-width":"430px",padding:"28px","text-align":"center"}},Jn=we(()=>s("p",{id:"pl-leave-title",style:{margin:"0 0 8px","font-size":"20px","line-height":"1.3","font-weight":"500",color:"var(--tp-ink)"}},"Leave the test?",-1)),Xn=we(()=>s("p",{style:{margin:"0 0 20px","font-size":"15px","line-height":"1.6",color:"var(--tp-ink-copy)","text-wrap":"pretty"}}," Your answers will be lost and nothing is saved. ",-1)),Zn={style:{display:"flex","justify-content":"center",gap:"12px","flex-wrap":"wrap"}},el="Submit",tl={__name:"PlayerShell",props:{fixtureExam:{type:Object,default:null}},setup(t){const l=ys("demographicModal"),n=t,d=ks(),E=bs(),c=ws(),g=S().auth.userId()||"guest",T=S().tracker,m=x("loading"),p=Rt(null),i=Rt(null),f=x("intro"),O=x("timed"),N=x(0),U=x(zt(g)),_=ye({}),B=ye({}),Y=ye({}),H=ye({}),ue=ye({}),xe=x(Bn()),Gt=e=>{xe.value=zn(e)},K=x(null),ee=x(!1),z=x(!1),R=x(!1),G=x(!1),Fe=x(!1),Q=x(!1),$=x("idle");let Me=!1;const _e=x(null);let rt=null,ce=!1;const De=k(()=>tt(E).examSlug),w=k(()=>tt(E).programmeSlug),te=k(()=>parseInt(tt(E).position)),I=k(()=>w.value?S().data.programmeBySlug(w.value):null),ut=k(()=>i.value||n.fixtureExam||!w.value||!te.value||$e.value?null:(S().data.examsByProgrammeSlug(w.value)||[]).find(a=>Bt(a)===te.value)||null),Ue=k(()=>{const e=ut.value;return!e||!e.questionsCount?null:{slug:e.slug,name:e.uniqueName||e.name,minutes:e.minutes,questions:Array.from({length:e.questionsCount},(a,r)=>({id:`pending-${r}`})),pending:!0}}),F=k(()=>p.value||ut.value||{}),Se=x(null),de=k(()=>It(F.value)),Ye=x(null),Ke=x(!1);let Ge=null,ve=null;const ct=[1500,3e3,6e3],We=(e=0)=>{if(!i.value||!p.value||p.value.guest||e===0&&Ge===i.value.slug)return;const a=i.value.slug;Ge=a,Ke.value=!0,As(a).then(r=>{if(ce||!i.value||i.value.slug!==a)return;if(!(r&&(r.grantedQuestionId||r.entitlement==="paid"))&&e<ct.length){ve=setTimeout(()=>{ve=null,We(e+1)},ct[e]);return}Ke.value=!1,r&&(Ye.value=r,i.value=qs(i.value,r))})},dt=()=>{ve&&clearTimeout(ve),ve=null},pe=k(()=>d.state[ne()].attemptSeconds),Ve=k(()=>d.getters[y("attemptSecondsRemaining")]),Te=k(()=>F.value.slug?!S().data.canTakeExam(F.value,I.value):!1),vt=k(()=>F.value.slug?S().data.attemptsByExamSlug(F.value.slug,I.value)||[]:[]),Wt=k(()=>vt.value.length>0),Ce=k(()=>
1{if(!S().data.isFreeUser())return null;const e=S().data.freeProgrammes()||[],a=xs(S().data.attempts()||[]),r=e.filter(C=>!I.value||C.slug!==I.value.slug),u=r.find(C=>!_s(C,a))||r[0];return u?{slug:u.slug,name:`${u.name} · Test 01`,note:"Your next free test"}:null}),Vt=()=>{if($.value==="saving"||!Ce.value)return;const e=S().data.examsByProgrammeSlug(Ce.value.slug)||[];c.push(S().routes.examInProgramme(Ce.value.slug,Bt(e[0],0)))},pt=k(()=>{const e=vt.value.map(a=>a.scorePercentage).filter(a=>a!=null);return e.length?Math.max(...e):null}),He=k(()=>Ns(i.value)),Ht=k(()=>p.value&&Number.isInteger(p.value.schema_version)?!0:!i.value.questions.some(e=>e.format==="likely")),b=k(()=>i.value.questions[N.value]),ht=e=>{const a=i.value.questions[e];return le(a,_[a.id])},Qt=k(()=>i.value.questions.every((e,a)=>ht(a))),Jt=k(()=>!p.value||!p.value.guest?null:d.getters[y("result")](p.value,p.value.questions,I.value)),W=k(()=>!!(p.value&&p.value.guest)),$e=k(()=>E.query.start==="1"),Qe=x(!1),Xt=k(()=>W.value||Qe.value),Zt=k(()=>$e.value&&f.value==="intro"&&m.value==="ready"&&!!i.value&&!i.value.refusal&&!Te.value),es=k(()=>W.value?null:$e.value&&O.value==="timed"?"Your score is saved when you finish":null),Ae=k(()=>
1{if(!p.value)return{score:null,correct:0,answered:0,profile:null};const e=d.getters[y("result")](p.value,p.value.questions,I.value);return{score:e.scorePercentage??null,correct:e.questionsCorrect??0,answered:e.questionsAnswered??0,profile:e.profile??null}}),ts=()=>{const e=n.fixtureExam?null:Ls({programmeSlug:w.value,position:te.value,examSlug:De.value});return(n.fixtureExam?Promise.resolve({data:n.fixtureExam,meta:null}):e||(w.value&&te.value?S().api.examByProgramme(w.value,te.value):S().api.exam(De.value))).then(r=>{if(ce)return;p.value={...r.data,meta:r.meta},i.value=Is(p.value);const u=jn(i.value.slug,g),C=u&&(u.phase==="results"||i.value.questions.some(fe=>le(fe,(u.given||{})[fe.id])));K.value=C?u:null,m.value="ready",K.value&&E.query.resume==="1"&&!W.value&&Ee(),W.value?K.value?Ee():he(Je()):$e.value&&!i.value.refusal&&!Te.value&&(K.value?Ee():he(Je()),Qe.value=!0);const L=Se.value;Se.value=null,L&&f.value==="intro"&&!i.value.refusal&&!Te.value&&he(L)}).catch(r=>{var C;const u=(C=r==null?void 0:r.response)==null?void 0:C.status;if(u===404){m.value="missing";return}m.value=u===403?"locked":"error"})},Je=()=>i.value&&i.value.minutes?"timed":"practice",J=x(!1),gt=async(e,a=null)=>a||W.value||n.fixtureExam||!S().api.authoriseAttempt?a:S().api.authoriseAttempt({examSlug:p.value.slug,...w.value?{packageSlug:w.value}:{},submissionId:e}),he=async e=>{var r;if(!i.value){Se.value=e;return}if(J.value)return;J.value=!0,d.dispatch(y("resetState"));try{const u=await gt(d.state[ne()].submissionId);if(ce)return;d.dispatch(y("setSittingToken"),u)}catch(u){m.value=((r=u==null?void 0:u.response)==null?void 0:r.status)===403?"locked":"error";return}finally{J.value=!1}O.value=e,U.value=e==="timed"?zt(g):0,qe(T,"test_start",{test_slug:p.value.slug,package_slug:w.value,mode:e}),T.trackEvent({event:"event",eventCategory:"Test Started",eventAction:e,eventLabel:p.value.slug}),d.dispatch(y("setExamMode"),e);const a=(i.value.minutes||0)*(1+U.value/100);d.dispatch(y("startTimer"),a),N.value=0,f.value="test",Ct()},Ee=async()=>{var r;const e=K.value;if(!e||(O.value=e.mode||"timed",U.value=e.extra||0,N.value=Math.min(e.i||0,i.value.questions.length-1),Object.assign(_,e.given||{}
1),Object.assign(B,e.flags||{}),Object.assign(Y,e.seconds||{}),Object.assign(H,e.notes||{}),J.value))return;J.value=!0,d.dispatch(y("resetState")),e.submissionId&&d.dispatch(y("setSubmissionId"),e.submissionId);try{const u=await gt(d.state[ne()].submissionId,e.sittingToken);if(ce)return;d.dispatch(y("setSittingToken"),u)}catch(u){m.value=((r=u==null?void 0:u.response)==null?void 0:r.status)===403?"locked":"error";return}finally{J.value=!1}d.dispatch(y("setExamMode"),O.value);const a=(i.value.minutes||0)*(1+U.value/100);d.dispatch(y("startTimer"),a),d.dispatch(y("setAttemptSeconds"),e.elapsed||0),e.submissionId&&d.dispatch(y("setSubmissionId"),e.submissionId),i.value.questions.forEach(u=>{const C=_[u.id];le(u,C)&&d.dispatch(y("handleAnswer"),ft(u,C))}),e.phase==="results"?(d.dispatch(y("stopTimer")),Q.value=!0,$.value=p.value.guest?"saved":"failed",f.value="results",We()):(f.value="test",Ct())},ss=()=>{Le(i.value.slug,g),K.value=null},as=()=>{$.value!=="saving"&&($.value==="failed"&&!window.confirm("Your result has not been saved. Discard it and start again?")||(Le(i.value.slug,g),K.value=null,Q.value=!1,$.value="idle",Me=!1,ee.value=!1,Object.keys(_).forEach(e=>delete _[e]),Object.keys(B).forEach(e=>delete B[e]),Object.keys(Y).forEach(e=>delete Y[e]),Object.keys(H).forEach(e=>delete H[e]),Object.keys(ue).forEach(e=>delete ue[e]),d.dispatch(y("resetState")),Ye.value=null,Ge=null,dt(),Qe.value=!1,f.value="intro",W.value&&he(Je())))},Ne=async()=>{if($.value==="saving"||$.value==="saved")return;Ie.flush(),At(!0),Ze(),d.dispatch(y("stopTimer")),ee.value=!1,Q.value=!0,$.value="saving",f.value="results";const e=i.value.slug;try{await d.dispatch(y("endExam"),{exam:p.value,questions:p.value.questions,programme:I.value,gtm:T}),$.value="saved",We(),p.value.guest||Le(e,g),Me||(Me=!0,qe(T,"test_complete",{test_slug:p.value.slug,package_slug:w.value,mode:O.value,persistence:p.value.guest?"local":O.value==="timed"||p.value.profile?"saved":"practice",submission_id:d.state[ne()].submissionId}),T.trackEvent({event:"event",eventCategory:"Test Completed",eventAction:O.value+(p.value.guest?" (as guest)":""),eventLabel:p.value.slug})),p.value.collectFieldData&&(Fe.value=!0)}catch{$.value="failed"}},ns=()=>{Fe.value=!1},se=x(!1),Pe=x(null);X(se,e=>{e&&qt(()=>Pe.value&&Pe.value.focus&&Pe.value.focus())});const ls=()=>{se.value=!1,mt()},ge=()=>{if($.value!=="saving"){if(W.value&&f.value==="test"&&!Q.value){se.value=!0;return}mt()}},mt=()=>{if(w.value){c.push(S().routes.programme(w.value));return}c.push(S().routes.dashboard())},os=()=>{if($.value==="saving")return;const e=p.value.nextExamSlug;if(e){if(w.value&&e.includes("/")){const[a,r]=e.split("/");c.push(S().routes.examInProgramme(a,r));return}c.push(S().routes.exam(e))}},ft=(e,a)=>e.format==="likely"?{questionUuid:e.uuid,answer:{likely:{most:a.most||null,least:a.least||null}}}:e.format==="rank"?{questionUuid:e.uuid,answer:{rank:{...a}}}:e.format==="multi"?{questionUuid:e.uuid,answer:{multi:[...a]}}:{questionUuid:e.uuid,answer:{uuid:a}},ae=e=>{const a=_[e.id];if(!le(e,a)){d.dispatch(y("removeAnswer"),e.uuid);return}d.dispatch(y("handleAnswer"),ft(e,a))},yt=e=>{_[b.value.id]=e.id,ae(b.value)},kt=e=>{const a=_[b.value.id]||{},r={...a,most:a.most===e.id?null:e.id};r.least===e.id&&(r.least=null),_[b.value.id]=r,ae(b.value)},bt=e=>{const a=_[b.value.id]||{},r={...a,least:a.least===e.id?null:e.id};r.most===e.id&&(r.most=null),_[b.value.id]=r,ae(b.value)},wt=e=>{const a={..._[b.value.id]||{}},r=Object.entries(a).find(([,u])=>u===e.id);if(r){delete a[r[0]];const u={};Object.entries(a).sort((C,L)=>C[0]-L[0]).forEach(([,C],L)=>{u[L+1]=C}),_[b.value.id]=u}else a[Object.keys(a).length+1]=e.id,_[b.value.id]=a;ae(b.value)},xt=e=>{const a=Array.isArray(_[b.value.id])?_[b.value.id]:[];_[b.value.id]=a.includes(e.id)?a.filter(r=>r!==e.id):[...a,e.id],ae(b.value)},_t=()=>{delete _[b.value.id],ae(b.value)},St=()=>{B[b.value.id]?delete B[b.value.id]:B[b.value.id]=!0},is=e=>{H[b.value.id]=e},rs=(e=0)=>{qe(T,"explanation_view",{test_slug:p.value.slug,package_slug:w.value,mode:"review"}),f.value="solutions";const a=i.value?i.value.questions.length:0;N.value=Number.isInteger(e)&&e>=0&&e<a?e:0},Tt=()=>{ue[b.value.id]||qe(T,"explanation_view",{test_slug:p.value.slug,package_slug:w.value,mode:O.value}),ue[b.value.id]=!0},us=e=>{N.value=e},Xe=()=>{N.value>0&&N.value--},me=x(!1),cs=()=>{p.value.guest=!1,me.value=!0,$.value="saved",Le(i.value.slug,g),c.push(S().routes.dashboard())},ds=()=>
1{if(me.value){c.push(S().routes.dashboard());return}f.value="results"},Oe=()=>{if(f.value==="solutions"){if(N.value===i.value.questions.length-1){if(me.value){c.push(S().routes.dashboard());return}f.value="results"}else N.value++;return}if(N.value===i.value.questions.length-1||Qt.value){if(Xt.value){Ne();return}f.value="review";return}N.value++},vs=e=>{N.value=e,f.value="test"},ps=()=>{const e=i.value.questions.findIndex((a,r)=>!ht(r));N.value=e===-1?0:e,f.value="test"},Ct=()=>{Ze(),rt=setInterval(()=>{if(f.value!=="test")return;const e=b.value;Y[e.id]=(Y[e.id]||0)+1},1e3)},Ze=()=>{clearInterval(rt)};X(Ve,e=>{O.value==="timed"&&e<=0&&(f.value==="test"||f.value==="review")&&!Q.value&&(d.dispatch(y("stopTimer")),ee.value=!0,f.value="test")});const $t=x(null);X(f,async()=>{var a;await qt();const e=(a=$t.value)==null?void 0:a.closest("[role=dialog]");e?e.scrollTop=0:window.scrollTo(0,0)}),X(f,(e,a)=>{if(G.value=!1,!(O.value!=="timed"||Q.value)){if(e==="review")d.dispatch(y("stopTimer"));else if(a==="review"&&e==="test"&&!ee.value){const r=(i.value.minutes||0)*(1+U.value/100),u=pe.value;d.dispatch(y("startTimer"),r),d.dispatch(y("setAttemptSeconds"),u)}}});const et=x("idle"),hs=k(()=>et.value==="saved"?"saved just now":et.value==="failed"?"autosave unavailable in this browser":null),At=(e=!1)=>{!["test","review"].includes(f.value)||Q.value||!i.value||(et.value=Ln(i.value.slug,g,{phase:e?"results":"test",packageSlug:w.value,positionId:te.value,name:i.value.name,submissionId:d.state[ne()].submissionId,sittingToken:d.state[ne()].sittingToken,i:N.value,mode:O.value,given:{..._},flags:{...B},seconds:{...Y},elapsed:pe.value,notes:{...H},extra:U.value,savedAt:Date.now()})?"saved":"failed")},Re=()=>At(),Ie=Ps(Re,800);X([_,B,N],Re,{deep:!0}),X(H,Ie),X(pe,e=>{e%10===0&&Re()});const Et=e=>{var L,fe,Pt,Ot;if(e.defaultPrevented||m.value!=="ready"||!i.value||i.value.refusal||ee.value)return;const a=e.target;if(e.key==="Escape"&&R.value){e.preventDefault(),R.value=!1,(fe=(L=_e.value)==null?void 0:L.focusNotesToggle)==null||fe.call(L);return}if(a&&(a.isContentEditable||(Pt=a.closest)!=null&&Pt.call(a,"input, textarea, select")))return;const r=xe.value||!Fn(e);if((Ot=a==null?void 0:a.closest)!=null&&Ot.call(a,"[role=radio], [role=checkbox]")&&!["ArrowLeft","ArrowRight"].includes(e.key)||e.isComposing||e.metaKey||e.ctrlKey||e.altKey)return;if(G.value){(e.key==="Escape"||r&&["g","G"].includes(e.key))&&(G.value=!1,e.preventDefault());return}if(f.value==="solutions"){e.key==="ArrowLeft"&&(e.preventDefault(),Xe()),e.key==="ArrowRight"&&(e.preventDefault(),Oe()),r&&(e.key==="g"||e.key==="G")&&(G.value=!0);return}if(f.value!=="test")return;if(z.value){if(e.key==="Escape"){z.value=!1,e.preventDefault();return}const V=_e.value&&_e.value.$refs.calculator;if(V&&V.handleKey(e))return}const u=b.value,C=r?parseInt(e.key,10):NaN;if(!Number.isNaN(C)&&C>=1&&C<=u.answers.length){const V=u.answers[C-1];u.format==="likely"?e.shiftKey?bt(V):kt(V):u.format==="rank"?wt(V):u.format==="multi"?xt(V):yt(V),e.preventDefault();return}switch(e.key){case"ArrowLeft":e.preventDefault(),Xe();break;case"ArrowRight":e.preventDefault(),Oe();break;case"Enter":if(a&&["BUTTON","A"].includes(a.tagName))break;e.preventDefault(),Oe();break;case"g":case"G":if(!r)break;G.value=!0,z.value=!1,R.value=!1;break;case"f":case"F":r&&St();break;case"c":case"C":r&&_t();break;case"s":case"S":r&&O.value!=="timed"&&Tt();break;case"k":case"K":r&&He.value&&(z.value=!z.value,R.value=!1);break;case"n":case"N":r&&He.value&&(R.value=!R.value,z.value=!1);break;case"Escape":R.value&&e.preventDefault(),R.value=!1;break}},Nt=()=>{document.hidden||d.dispatch(y("syncClock"))};return Ss(()=>{w.value&&d.dispatch(y("setReferrerProgrammeSlug"),w.value),ts(),window.addEventListener("keydown",Et),document.addEventListener("visibilitychange",Nt)}),Ts(()=>{ce=!0,dt(),Ie.flush(),Re(),window.removeEventListener("keydown",Et),document.removeEventListener("visibilitychange",Nt),Ie.cancel(),Ze(),d.dispatch(y("stopTimer")),d.dispatch(y("resetState"))}),(e,a)=>{const r=je("portal");return o(),v("div",{ref_key:"shellRoot",ref:$t},[m.value==="loading"&&!Ue.value||Zt.value?(o(),v("div",Mn,[s("main",Dn,[s("section",Un,[Yn,s("div",Kn,[(o(),v(q,null,Z(["82%","64%","71%"],u=>s("span",{key:u,class:"load-line",style:be({width:u})},null,4)),64))]),s("div",Gn,[(o(),v(q,null,Z(["54%","38%","61%","44%"],u=>s("span",{key:u,class:"load-option"},[Wn,s("span",{class:"load-line",style:be([{height:"14px"},{width:u}])},null,4)])),64))]),Vn])])])):m.value==="error"||m.value==="missing"||m.value==="locked"?(o(),P(Mt,{key:1,reason:m.value,"in-package":!!w.value,
1name:i.value&&i.value.name||F.value.uniqueName||F.value.name||null,"test-slug":F.value.slug||De.value||null,"package-slug":w.value||null,onExit:ge},null,8,["reason","in-package","name","test-slug","package-slug"])):i.value&&i.value.refusal?(o(),P(Mt,{key:2,reason:i.value.refusal,name:i.value.name,onExit:ge},null,8,["reason","name"])):i.value||Ue.value?(o(),v(q,{key:3},[f.value==="intro"?(o(),P(Ka,{key:0,bundle:i.value||Ue.value,saved:i.value?K.value:null,extra:U.value,locked:Te.value,"package-slug":w.value||null,starting:J.value||!!Se.value,"average-score":de.value?de.value.average:null,"average-label":de.value&&de.value.scope==="format"?`Average for ${de.value.label}`:"User average","best-score":pt.value,"back-label":I.value?I.value.name:"Dashboard",shortcuts:xe.value,onStart:he,onResume:Ee,onDiscard:ss,onSetShortcuts:Gt,onExit:ge},null,8,["bundle","saved","extra","locked","package-slug","starting","average-score","average-label","best-score","back-label","shortcuts"])):f.value==="test"||f.value==="solutions"?(o(),P(Os,{key:1,bundle:i.value,index:N.value,mode:O.value,"saved-note":hs.value,solutions:f.value==="solutions","package-slug":w.value||null,given:_,flags:B,seconds:Y,notes:H,shown:ue,elapsed:pe.value,remaining:Ve.value,extra:U.value,guest:W.value,"sitting-note":es.value,"is-retry":Wt.value,expired:ee.value,"tools-allowed":He.value,"calc-open":z.value,"notes-open":R.value,"nav-open":G.value,shortcuts:xe.value,ref_key:"playerScreen",ref:_e,onPick:yt,onPickMost:kt,onPickLeast:bt,onPickRank:wt,onPickMulti:xt,onClear:_t,onToggleFlag:St,onJump:us,onPrev:Xe,onNext:Oe,onExit:ge,onSubmit:Ne,onReveal:Tt,onToggleCalc:a[0]||(a[0]=u=>{z.value=!z.value,R.value=!1}),onToggleNotes:a[1]||(a[1]=u=>{R.value=!R.value,z.value=!1}),onToggleNav:a[2]||(a[2]=u=>G.value=!G.value),onSetNote:is,"finish-label":me.value?"Go to your dashboard":"Back to results","submit-label":el,"back-label":me.value?"Back to dashboard":"Back to results",onBackToResults:ds},null,8,["bundle","index","mode","saved-note","solutions","package-slug","given","flags","seconds","notes","shown","elapsed","remaining","extra","guest","sitting-note","is-retry","expired","tools-allowed","calc-open","notes-open","nav-open","shortcuts","finish-label","back-label"])):f.value==="review"?(o(),P(Tn,{key:2,bundle:i.value,given:_,flags:B,remaining:Ve.value,timed:O.value==="timed",profile:!!i.value.profile,onJump:vs,onSubmit:Ne,onChangeAnswers:ps}
1,null,8,["bundle","given","flags","remaining","timed","profile"])):f.value==="results"?(o(),P(Rs,{key:3,bundle:i.value,exam:p.value,score:Ae.value.score,correct:Ae.value.correct,answered:Ae.value.answered,total:i.value.questions.length,benchmark:st(It)(F.value),"best-in-package":pt.value,"seconds-taken":pe.value,seconds:Y,given:_,solutions:Ye.value,"solutions-pending":Ke.value,programme:I.value?{name:I.value.name,slug:I.value.slug}:null,"next-free-test":Ce.value,"counts-are-questions":Ht.value,guest:!!p.value.guest,profile:Ae.value.profile,"in-package":!!w.value,"package-slug":w.value||null,"guest-attempt":Jt.value,onSolutions:rs,onRetake:as,onNextTest:os,onNextFree:Vt,onClose:ge,onSignedUp:cs},{"save-status":D(()=>[$.value!=="idle"?(o(),v("div",{key:0,class:ie(["pl-save-status",{"pl-save-status--quiet":$.value!=="failed"}]),role:$.value==="failed"?"alert":"status"},[s("p",null,h($.value==="saving"?"Saving resultâ¦":$.value==="failed"?"We could not confirm your result was saved. Your answers are still here. Please retry saving.":"Result saved."),1),$.value==="failed"?(o(),v("button",{key:0,type:"button",class:"pl-btn","data-test":"retry-save",onClick:Ne},"Retry saving")):A("",!0)],10,Hn)):A("",!0)]),_:1},8,["bundle","exam","score","correct","answered","total","benchmark","best-in-package","seconds-taken","seconds","given","solutions","solutions-pending","programme","next-free-test","counts-are-questions","guest","profile","in-package","package-slug","guest-attempt"])):A("",!0)],64)):A("",!0),st(l)?(o(),P(r,{key:4,to:"modals"},{default:D(()=>[(o(),P(oe(st(l)),{show:Fe.value,onClose:a[3]||(a[3]=u=>ns(u))},null,40,["show"]))]),_:1})):A("",!0),se.value?(o(),v("div",{key:5,role:"alertdialog","aria-modal":"true","aria-labelledby":"pl-leave-title",class:"pl-overlay",style:{"z-index":"50",background:"rgba(var(--tp-ink-rgb), 0.62)"},"data-test":"leave-overlay",onKeydown:a[5]||(a[5]=Cs($s(u=>se.value=!1,["prevent"]),["esc"]))},[s("div",Qn,[Jn,Xn,s("div",Zn,[s("button",{ref_key:"keepGoing",ref:Pe,type:"button",class:"pl-btn pl-btn--primary",style:{height:"46px",padding:"0 20px"},"data-test":"leave-keep",onClick:a[4]||(a[4]=u=>se.value=!1)},"Keep going",512),s("button",{type:"button",class:"pl-btn",style:{height:"46px",padding:"0 20px"},"data-test":"leave-confirm",onClick:ls},"Leave")])])],32)):A("",!0)],512)}}},sl=ze(tl,[["__scopeId","data-v-dd7c1226"]]),ul={__name:"exam",setup(t){return(l,n)=>(o(),P(gs,null,{default:D(()=>[nt(sl)]),_:1}))}};export{ul as default};
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.