1var m=(k,u,d)=>new Promise((t,f)=>{var h=l=>{try{g(d.next(l))}catch(p){f(p)}},b=l=>{try{g(d.throw(l))}catch(p){f(p)}},g=l=>l.done?t(l.value):Promise.resolve(l.value).then(h,b);g((d=d.apply(k,u)).next())});import{O as W,V as H,s as n,z as i,C as o,F,T as L,y as _,A as v,S as N,E as w,N as x,f as B,c as C}from"./chunk.BhnF8lqErK1Y.js";import{cs as V,ct as j}from"./entry.CoPCKUW3BkOv.js";import{a as E}from"./chunk.C6PXV3Pxc_ps.js";import"./chunk.DMiigLJ6-phQ.js";import"./chunk.DGksOcLQgZEB.js";import"./chunk.vKmSb7iagUEM.js";import"./chunk.BbtcIZGqd4iu.js";const q={class:"Diagnose-wrapper"},I={class:"Diagnose"},J={class:"checks"},O={class:"check-header"},$={class:"status-icon"},A={key:0,viewBox:"0 0 20 20",fill:"currentColor"},K={key:1,viewBox:"0 0 20 20",fill:"currentColor"},G={key:2,class:"spinner"},Q={key:3,class:"status-dot"},R={class:"check-info"},U={key:0,class:"error-details"},X={class:"error-message"},Y={key:0,class:"error-help"},Z={key:0,class:"summary"},ee={key:0,class:"summary-banner summary-success"},se={key:1,class:"summary-banner summary-error"},te={__name:"Diagnose",props:{bucket:{type:String,required:!0},firebaseJWT:{type:String,required:!0}},setup(k){const u=k,d=[{key:"cdn",label:"Exam.net CDN",errorMessage:"Could not access CDN servers.",errorHelp:"The domains <strong>*.exam.net</strong> must be accessible. Please make sure to whitelist this in your firewall."},{key:"static",label:"Static content",errorMessage:"Could not access static content servers.",errorHelp:"The domain <strong>static.exam.net</strong> must be accessible. Please make sure to whitelist this in your firewall."},{key:"firebaseStorage",label:"File storage",errorMessage:"Could not access file storage servers.",errorHelp:'The domain <strong>*.googleapis.com</strong> must be accessible for teachers to upload PDF documents and for students to add handwritten solutions. Visit <a href="https://firebasestorage.googleapis.com/v0/b/exam-net-static/o/status.json?alt=media&token=2f7f90cc-d11b-4b41-8f55-d20d092ea605" target="_blank" rel="noopener">firebasestorage.googleapis.com</a> to verify, or contact your IT administration.'},{key:"spell",label:"Spellchecking",errorMessage:"Could not access spellchecking services.",errorHelp:'Please make sure <a href="https://exam-spellcheck.azureedge.net/spellCheck?lang=en&word=wallk" target="_blank" rel="noopener">exam-spellcheck.azureedge.net</a> is accessible.'},{key:"dictionary",label:"Dictionary",errorMessage:"Could not access dictionary services.",errorHelp:"The domain <strong>*.azureedge.net</strong> must be accessible for dictionary and thesaurus lookups."},{key:"firestore",label:"Messaging service",errorMessage:"Could not access the messaging service.",errorHelp:null},{key:"programmingWs",label:"Programming execution",errorMessage:"Could not connect to the programming execution service.",errorHelp:"The domain <strong>student-programming-4f2a9b.exam.net</strong> must be accessible over WebSocket (wss://). Some firewalls block WebSocket traffic â please ensure WebSocket connections to this domain are allowed."}],t=B({cdn:null,static:null,firebaseStorage:null,spell:null,dictionary:null,firestore:null,programmingWs:null}),f={success:"Connected",error:"Failed",pending:"Checking..."},h=s=>f[t[s]]||"Waiting",b=C(()=>Object.values(t).every(s=>s==="success"||s==="error")),g=C(()=>Object.values(t).every(s=>s==="success"));function l(){return m(this,null,function*(){var s;try{yield window.axios({url:"https://firebasestorage.googleapis.com/v0/b/exam-net-static/o/status.json?alt=media&token=2f7f90cc-d11b-4b41-8f55-d20d092ea605"}),t.firebaseStorage="success"}catch(e){t.firebaseStorage=((s=e.response)==null?void 0:s.status)===400?"success":"error"}})}function p(){return new Promise(s=>{const e=new Image;e.onload=()=>{t.static="success",s()},e.onerror=()=>{t.static="error",s()},e.src=`https://static.exam.net/img/2021/favicon-square.png?_=${Date.now()}`})}function S(){return m(this,null,function*(){try{yield window.axios({url:"https://exam.net/cdn/dictionaries/es/extended.json"}),t.cdn="success"}catch(s){t.cdn="error"}})}function T(){return m(this,null,function*(){var s,e;try{const{data:r}=yield window.axios({url:"https://exam-thesaurus.azureedge.net/swe/bi/bil.json"});t.dictionary=(e=(s=r[0])==null?void 0:s.versions)!=null&&e.includes("bil")?"success":"error"}catch(r){t.dictionary="error"}})}function D(){return new Promise(s=>{const e=setTimeout(()=>
1{t.firestore="error",s()},3e3);V(u.bucket,r=>{r!=null&&r.timestamp&&(t.firestore="success",clearTimeout(e),s())}),j(u.bucket)})}function M(){return new Promise(s=>{let e;const r=y=>{t.programmingWs=y,clearTimeout(a);try{e==null||e.close()}catch(c){}s()},a=setTimeout(()=>r("error"),5e3);try{e=new WebSocket("wss://student-programming-4f2a9b.exam.net/ws")}catch(y){r("error");return}e.onopen=()=>{e.send(JSON.stringify({type:"start",language:"python",code:"print(1)"}))},e.onmessage=()=>r("success"),e.onerror=()=>r("error")})}function z(){return m(this,null,function*(){try{const{data:s}=yield window.axios({url:"https://exam-spellcheck.azureedge.net/spellCheck?lang=en&word=wallk"});t.spell=s.suggestions.includes("walk")?"success":"error"}catch(s){t.spell="error"}})}function P(s,e=2){return m(this,null,function*(){yield new Promise(r=>setTimeout(r,500));for(let r=0;r<s.length;r+=e){r>0&&(yield new Promise(c=>setTimeout(c,500)));const a=s.slice(r,r+e);a.forEach(({key:c})=>{t[c]="pending"});const y=new Promise(c=>setTimeout(c,100));yield Promise.all([y,...a.map(({fn:c})=>c())])}})}return W(()=>{window.K$.firebaseJWT=u.firebaseJWT,window.K$.bucket=u.bucket,P([{key:"cdn",fn:S},{key:"static",fn:p},{key:"firebaseStorage",fn:l},{key:"spell",fn:z},{key:"dictionary",fn:T},{key:"firestore",fn:D},{key:"programmingWs",fn:M}])}),(s,e)=>{const r=H("sanitized-html");return n(),i("div",q,[e[6]||(e[6]=o("img",{alt:"Exam.net logo",class:"top-logo",width:"170",src:"https://static.exam.net/img/2021/light-logo.png"},null,-1)),o("div",I,[e[4]||(e[4]=o("h1",null,"Network diagnostics",-1)),e[5]||(e[5]=o("p",{class:"subtitle"},"Verifying connectivity to some required services",-1)),o("div",J,[(n(),i(F,null,L(d,a=>o("div",{key:a.key,class:_(["check-card",t[a.key]])},[o("div",O,[o("div",$,[t[a.key]==="success"?(n(),i("svg",A,[...e[0]||(e[0]=[o("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):t[a.key]==="error"?(n(),i("svg",K,[...e[1]||(e[1]=[o("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])])):t[a.key]==="pending"?(n(),i("span",G)):(n(),i("span",Q))]),o("div",R,[o("h2",null,v(a.label),1),o("span",{class:_(["status-text",t[a.key]||"waiting"])},v(h(a.key)),3)])]),t[a.key]==="error"?(n(),i("div",U,[o("p",X,v(a.errorMessage),1),a.errorHelp?N((n(),i("p",Y,null,512)),[[r,a.errorHelp]]):w("",!0)])):w("",!0)],2)),64))]),b.value?(n(),i("div",Z,[g.value?(n(),i("div",ee,[...e[2]||(e[2]=[o("svg",{viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),x(" All services are reachable. Exam.net should work correctly on this network. ",-1)])])):(n(),i("div",se,[...e[3]||(e[3]=[o("svg",{viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),x(" Some services could not be reached. Please contact your IT administrator. ",-1)])]))])):w("",!0)])])}}},de=E(te,[["__scopeId","data-v-eebe837c"]]);export{de as default}; 2//# sourceMappingURL=chunk.BV2DspXVWb6B.js.map
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.