>>=et,ie-=et,w.lens[w.have++]=kt;else{if(kt===16){for(P=et+2;ie>>=et,ie-=et,w.have===0){B.msg="invalid bit length repeat",w.mode=30;break}g=w.lens[w.have-1],we=3+(3&se),se>>>=2,ie-=2}else if(kt===17){for(P=et+3;ie
>>=et)),se>>>=3,ie-=3}else{for(P=et+7;ie
>>=et)),se>>>=7,ie-=7}if(w.have+we>w.nlen+w.ndist){B.msg="invalid bit length repeat",w.mode=30;break}for(;we--;)w.lens[w.have++]=g}}if(w.mode===30)break;if(w.lens[256]===0){B.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,Z={bits:w.lenbits},ue=D(I,w.lens,0,w.nlen,w.lencode,0,w.work,Z),w.lenbits=Z.bits,ue){B.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Z={bits:w.distbits},ue=D(y,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Z),w.distbits=Z.bits,ue){B.msg="invalid distances set",w.mode=30;break}if(w.mode=20,_e===6)break e;case 20:w.mode=21;case 21:if(6<=be&&258<=Fe){B.next_out=Oe,B.avail_out=Fe,B.next_in=xe,B.avail_in=be,w.hold=se,w.bits=ie,k(B,Ce),Oe=B.next_out,Se=B.output,Fe=B.avail_out,xe=B.next_in,fe=B.input,be=B.avail_in,se=w.hold,ie=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;ot=(T=w.lencode[se&(1<>>16&255,kt=65535&T,!((et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>tt)])>>>16&255,kt=65535&T,!(tt+(et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>>=tt,ie-=tt,w.back+=tt}if(se>>>=et,ie-=et,w.back+=et,w.length=kt,ot===0){w.mode=26;break}if(32&ot){w.back=-1,w.mode=12;break}if(64&ot){B.msg="invalid literal/length code",w.mode=30;break}w.extra=15&ot,w.mode=22;case 22:if(w.extra){for(P=w.extra;ie>>=w.extra,ie-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;ot=(T=w.distcode[se&(1<>>16&255,kt=65535&T,!((et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>tt)])>>>16&255,kt=65535&T,!(tt+(et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>>=tt,ie-=tt,w.back+=tt}if(se>>>=et,ie-=et,w.back+=et,64&ot){B.msg="invalid distance code",w.mode=30;break}w.offset=kt,w.extra=15&ot,w.mode=24;case 24:if(w.extra){for(P=w.extra;ie>>=w.extra,ie-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){B.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(Fe===0)break e;if(we=Ce-Fe,w.offset>we){if((we=w.offset-we)>w.whave&&w.sane){B.msg="invalid distance too far back",w.mode=30;break}At=we>w.wnext?(we-=w.wnext,w.wsize-we):w.wnext-we,we>w.length&&(we=w.length),Ot=w.window}else Ot=Se,At=Oe-w.offset,we=w.length;for(Fere?(oe=At[Ot+A[_e]],ie[Re+A[_e]]):(oe=96,0),z=1<>Oe)+(H-=z)]=U<<24|oe<<16|de|0,H!==0;);for(z=1<>=1;if(z!==0?(se&=z-1,se+=z):se=0,_e++,--Ce[B]==0){if(B===fe)break;B=y[S+A[_e]]}if(Se>>7)]}function Re(T,j){T.pending_buf[T.pending++]=255&j,T.pending_buf[T.pending++]=j>>>8&255}function Ce(T,j,ee){T.bi_valid>C-ee?(T.bi_buf|=j<>C-T.bi_valid,T.bi_valid+=ee-C):(T.bi_buf|=j<>>=1,ee<<=1,0<--j;);return ee>>>1}function Ot(T,j,ee){var te,Y,le=new Array(A+1),ye=0;for(te=1;te<=A;te++)le[te]=ye=ye+ee[te-1]<<1;for(Y=0;Y<=j;Y++){var ge=T[2*Y+1];ge!==0&&(T[2*Y]=At(le[ge]++,ge))}}function et(T){var j;for(j=0;j>1;1<=ee;ee--)tt(T,le,ee);for(Y=ve;ee=T.heap[1],T.heap[1]=T.heap[T.heap_len--],tt(T,le,1),te=T.heap[1],T.heap[--T.heap_max]=ee,T.heap[--T.heap_max]=te,le[2*Y]=le[2*ee]+le[2*te],T.depth[Y]=(T.depth[ee]>=T.depth[te]?T.depth[ee]:T.depth[te])+1,le[2*ee+1]=le[2*te+1]=Y,T.heap[1]=Y++,tt(T,le,1),2<=T.heap_len;);T.heap[--T.heap_max]=T.heap[1],function(Ke,We){var nt,Gt,kn,Et,Pn,en,Bt=We.dyn_tree,sn=We.max_code,Ht=We.stat_desc.static_tree,Cn=We.stat_desc.has_stree,Xn=We.stat_desc.extra_bits,Kn=We.stat_desc.extra_base,Xt=We.stat_desc.max_length,yn=0;for(Et=0;Et<=A;Et++)Ke.bl_count[Et]=0;for(Bt[2*Ke.heap[Ke.heap_max]+1]=0,nt=Ke.heap_max+1;nt>=7;Y>>=1)if(1&Je&&ge.dyn_ltree[2*ve]!==0)return f;if(ge.dyn_ltree[18]!==0||ge.dyn_ltree[20]!==0||ge.dyn_ltree[26]!==0)return h;for(ve=32;ve>>3,(le=T.static_len+3+7>>>3)<=Y&&(Y=le)):Y=le=ee+5,ee+4<=Y&&j!==-1?P(T,j,ee,te):T.strategy===4||le===Y?(Ce(T,2+(te?1:0),3),Rt(T,De,B)):(Ce(T,4+(te?1:0),3),function(ge,ve,Je,Ke){var We;for(Ce(ge,ve-257,5),Ce(ge,Je-1,5),Ce(ge,Ke-4,4),We=0;We>>8&255,T.pending_buf[T.d_buf+2*T.last_lit+1]=255&j,T.pending_buf[T.l_buf+T.last_lit]=255&ee,T.last_lit++,j===0?T.dyn_ltree[2*ee]++:(T.matches++,j--,T.dyn_ltree[2*(w[ee]+y+1)]++,T.dyn_dtree[2*ie(j)]++),T.last_lit===T.lit_bufsize-1},c._tr_align=function(T){Ce(T,2,3),we(T,H,De),function(j){j.bi_valid===16?(Re(j,j.bi_buf),j.bi_buf=0,j.bi_valid=0):8<=j.bi_valid&&(j.pending_buf[j.pending++]=255&j.bi_buf,j.bi_buf>>=8,j.bi_valid-=8)}(T)}},{"../utils/common":41}],53:[function(l,u,c){"use strict";u.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(l,u,c){(function(p){(function(f,h){"use strict";if(!f.setImmediate){var k,D,I,y,S=1,M={},O=!1,N=f.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(f);A=A&&A.setTimeout?A:f,k={}.toString.call(f.process)==="[object process]"?function(q){process.nextTick(function(){z(q)})}:function(){if(f.postMessage&&!f.importScripts){var q=!0,K=f.onmessage;return f.onmessage=function(){q=!1},f.postMessage("","*"),f.onmessage=K,q}}()?(y="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",H,!1):f.attachEvent("onmessage",H),function(q){f.postMessage(y+q,"*")}):f.MessageChannel?((I=new MessageChannel).port1.onmessage=function(q){z(q.data)},function(q){I.port2.postMessage(q)}):N&&"onreadystatechange"in N.createElement("script")?(D=N.documentElement,function(q){var K=N.createElement("script");K.onreadystatechange=function(){z(q),K.onreadystatechange=null,D.removeChild(K),K=null},D.appendChild(K)}):function(q){setTimeout(z,0,q)},A.setImmediate=function(q){typeof q!="function"&&(q=new Function(""+q));for(var K=new Array(arguments.length-1),he=0;he{"use strict";var bi=ao&&ao.__assign||function(){return bi=Object.assign||function(l){for(var u,c=1,p=arguments.length;c{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.Tabs=void 0;var Jh=tu(),Qh=function(){function l(u){var c=this;u===void 0&&(u={}),this._currentTab="",this.tabEvents=new Jh.EventEmitter({beforeSwitch:!0,afterSwitch:!0}),$("*[data-tab]").on("click",function(h){var k=$(h.target),D=k.data("tab");h.preventDefault(),c.switchToTab(D)});var p=u.initialTab;if(!p&&window.location.hash){var f=window.location.hash.replace(/^#/,"");p=f}p||(p=$(".tab:first").attr("data-tab")),p&&this.switchToTab(p)}return l.prototype.switchToTab=function(u){var c=this,p=function(){var h=c._currentTab;c._currentTab=u;var k=u!=="level"?u:"";window.history&&window.history.replaceState(null,"","#"+k);var D=$('*[data-tab="'+u+'"]'),I=D.siblings("*[data-tab]"),y=$('*[data-tabtarget="'+u+'"]'),S=y.siblings("*[data-tabtarget]");I.removeClass("tab-selected"),D.addClass("tab-selected"),S.addClass("hidden"),y.removeClass("hidden"),c.tabEvents.emit("afterSwitch",{oldTab:h,newTab:u})};if(this._currentTab!=""){var f=this.tabEvents.emit("beforeSwitch",{oldTab:this._currentTab,newTab:u});f.then(p)}else p()},Object.defineProperty(l.prototype,"currentTab",{get:function(){return this._currentTab},enumerable:!1,configurable:!0}),l.prototype.on=function(u,c){var p=this.tabEvents.on(u,c);return u==="afterSwitch"&&this.tabEvents.emit("afterSwitch",{oldTab:"",newTab:this._currentTab}),p},l}();wi.Tabs=Qh});var ru=dt(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.normal_prefix=Er.pygame_prefix=Er.turtle_prefix=void 0;Er.turtle_prefix=`# coding=utf8
+You did great!`,Transpile_warning:"Warning!",Unsaved_Changes:"You have an unsaved program. Do you want to leave without saving it?",adventures_restored:"The default adventures have been restored!",copy_link_to_share:"Copy link to share",customization_deleted:"Customizations successfully deleted.",dice:"\u{1F3B2}",directly_available:"Directly open",disabled:"Disabled",fortune:"\u{1F52E}, \u2728",haunted:"\u{1F987}, \u{1F47B}, \u{1F383}",level_title:"Level",restaurant:"\u{1F363}, \u{1F355}, \u{1F354}",rock:"\u2702\uFE0F, \u{1F4DC}, \u{1F5FB}",songs:"\u{1F3B5},\u{1F3B6}",teacher_welcome:"Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.",turtle:"\u{1F422}",unsaved_class_changes:"There are unsaved changes, are you sure you want to leave this page?"}}});var io=dt(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.setClientMessageLanguage=jr.ClientMessages=void 0;var Ta=Zl();jr.ClientMessages=Object.assign({},Ta.TRANSLATIONS.en);function Uh(l){var u;Object.assign(jr.ClientMessages,(u=Ta.TRANSLATIONS[l])!==null&&u!==void 0?u:Ta.TRANSLATIONS.en)}jr.setClientMessageLanguage=Uh});var Lr=dt(On=>{"use strict";var Vh=On&&On.__awaiter||function(l,u,c,p){function f(h){return h instanceof c?h:new c(function(k){k(h)})}return new(c||(c=Promise))(function(h,k){function D(S){try{y(p.next(S))}catch(M){k(M)}}function I(S){try{y(p.throw(S))}catch(M){k(M)}}function y(S){S.done?h(S.value):f(S.value).then(D,I)}y((p=p.apply(l,u||[])).next())})},Yh=On&&On.__generator||function(l,u){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},p,f,h,k;return k={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function D(y){return function(S){return I([y,S])}}function I(y){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,f&&(h=y[0]&2?f.return:y[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,y[1])).done)return h;switch(f=0,h&&(y=[y[0]&2,h.value]),y[0]){case 0:case 1:h=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,f=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]{(function(l){typeof Jl=="object"&&typeof Pa!="undefined"?Pa.exports=l():typeof define=="function"&&define.amd?define([],l):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).JSZip=l()})(function(){return function l(u,c,p){function f(D,I){if(!c[D]){if(!u[D]){var y=typeof Bo=="function"&&Bo;if(!I&&y)return y(D,!0);if(h)return h(D,!0);var S=new Error("Cannot find module '"+D+"'");throw S.code="MODULE_NOT_FOUND",S}var M=c[D]={exports:{}};u[D][0].call(M.exports,function(O){var N=u[D][1][O];return f(N||O)},M,M.exports,l,u,c,p)}return c[D].exports}for(var h=typeof Bo=="function"&&Bo,k=0;k>2,M=(3&D)<<4|I>>4,O=1>6:64,N=2>4,I=(15&S)<<4|(M=h.indexOf(k.charAt(N++)))>>2,y=(3&M)<<6|(O=h.indexOf(k.charAt(N++))),z[A++]=D,M!==64&&(z[A++]=I),O!==64&&(z[A++]=y);return z}},{"./support":30,"./utils":32}],2:[function(l,u,c){"use strict";var p=l("./external"),f=l("./stream/DataWorker"),h=l("./stream/Crc32Probe"),k=l("./stream/DataLengthProbe");function D(I,y,S,M,O){this.compressedSize=I,this.uncompressedSize=y,this.crc32=S,this.compression=M,this.compressedContent=O}D.prototype={getContentWorker:function(){var I=new f(p.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new k("data_length")),y=this;return I.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),I},getCompressedWorker:function(){return new f(p.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},D.createWorkerFrom=function(I,y,S){return I.pipe(new h).pipe(new k("uncompressedSize")).pipe(y.compressWorker(S)).pipe(new k("compressedSize")).withStreamInfo("compression",y)},u.exports=D},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(l,u,c){"use strict";var p=l("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new p("STORE compression")},uncompressWorker:function(){return new p("STORE decompression")}},c.DEFLATE=l("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(l,u,c){"use strict";var p=l("./utils"),f=function(){for(var h,k=[],D=0;D<256;D++){h=D;for(var I=0;I<8;I++)h=1&h?3988292384^h>>>1:h>>>1;k[D]=h}return k}();u.exports=function(h,k){return h!==void 0&&h.length?p.getTypeOf(h)!=="string"?function(D,I,y,S){var M=f,O=S+y;D^=-1;for(var N=S;N>>8^M[255&(D^I[N])];return-1^D}(0|k,h,h.length,0):function(D,I,y,S){var M=f,O=S+y;D^=-1;for(var N=S;N>>8^M[255&(D^I.charCodeAt(N))];return-1^D}(0|k,h,h.length,0):0}},{"./utils":32}],5:[function(l,u,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(l,u,c){"use strict";var p=null;p=typeof Promise!="undefined"?Promise:l("lie"),u.exports={Promise:p}},{lie:37}],7:[function(l,u,c){"use strict";var p=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",f=l("pako"),h=l("./utils"),k=l("./stream/GenericWorker"),D=p?"uint8array":"array";function I(y,S){k.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=S,this.meta={}}c.magic="\b\0",h.inherits(I,k),I.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(h.transformTo(D,y.data),!1)},I.prototype.flush=function(){k.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},I.prototype.cleanUp=function(){k.prototype.cleanUp.call(this),this._pako=null},I.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(S){y.push({data:S,meta:y.meta})}},c.compressWorker=function(y){return new I("Deflate",y)},c.uncompressWorker=function(){return new I("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(l,u,c){"use strict";function p(M,O){var N,A="";for(N=0;N>>=8;return A}function f(M,O,N,A,C,z){var H,q,K=M.file,he=M.compression,re=z!==D.utf8encode,U=h.transformTo("string",z(K.name)),oe=h.transformTo("string",D.utf8encode(K.name)),de=K.comment,De=h.transformTo("string",z(de)),B=h.transformTo("string",D.utf8encode(de)),_e=oe.length!==K.name.length,w=B.length!==de.length,fe="",Se="",xe="",Oe=K.dir,be=K.date,Fe={crc32:0,compressedSize:0,uncompressedSize:0};O&&!N||(Fe.crc32=M.crc32,Fe.compressedSize=M.compressedSize,Fe.uncompressedSize=M.uncompressedSize);var se=0;O&&(se|=8),re||!_e&&!w||(se|=2048);var ie=0,Re=0;Oe&&(ie|=16),C==="UNIX"?(Re=798,ie|=function(we,At){var Ot=we;return we||(Ot=At?16893:33204),(65535&Ot)<<16}(K.unixPermissions,Oe)):(Re=20,ie|=function(we){return 63&(we||0)}(K.dosPermissions)),H=be.getUTCHours(),H<<=6,H|=be.getUTCMinutes(),H<<=5,H|=be.getUTCSeconds()/2,q=be.getUTCFullYear()-1980,q<<=4,q|=be.getUTCMonth()+1,q<<=5,q|=be.getUTCDate(),_e&&(Se=p(1,1)+p(I(U),4)+oe,fe+="up"+p(Se.length,2)+Se),w&&(xe=p(1,1)+p(I(De),4)+B,fe+="uc"+p(xe.length,2)+xe);var Ce="";return Ce+=`
+\0`,Ce+=p(se,2),Ce+=he.magic,Ce+=p(H,2),Ce+=p(q,2),Ce+=p(Fe.crc32,4),Ce+=p(Fe.compressedSize,4),Ce+=p(Fe.uncompressedSize,4),Ce+=p(U.length,2),Ce+=p(fe.length,2),{fileRecord:y.LOCAL_FILE_HEADER+Ce+U+fe,dirRecord:y.CENTRAL_FILE_HEADER+p(Re,2)+Ce+p(De.length,2)+"\0\0\0\0"+p(ie,4)+p(A,4)+U+fe+De}}var h=l("../utils"),k=l("../stream/GenericWorker"),D=l("../utf8"),I=l("../crc32"),y=l("../signature");function S(M,O,N,A){k.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=O,this.zipPlatform=N,this.encodeFileName=A,this.streamFiles=M,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}h.inherits(S,k),S.prototype.push=function(M){var O=M.meta.percent||0,N=this.entriesCount,A=this._sources.length;this.accumulate?this.contentBuffer.push(M):(this.bytesWritten+=M.data.length,k.prototype.push.call(this,{data:M.data,meta:{currentFile:this.currentFile,percent:N?(O+100*(N-A-1))/N:100}}))},S.prototype.openedSource=function(M){this.currentSourceOffset=this.bytesWritten,this.currentFile=M.file.name;var O=this.streamFiles&&!M.file.dir;if(O){var N=f(M,O,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},S.prototype.closedSource=function(M){this.accumulate=!1;var O=this.streamFiles&&!M.file.dir,N=f(M,O,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),O)this.push({data:function(A){return y.DATA_DESCRIPTOR+p(A.crc32,4)+p(A.compressedSize,4)+p(A.uncompressedSize,4)}(M),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},S.prototype.flush=function(){for(var M=this.bytesWritten,O=0;O=this.index;k--)D=(D<<8)+this.byteAt(k);return this.index+=h,D},readString:function(h){return p.transformTo("string",this.readData(h))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var h=this.readInt(4);return new Date(Date.UTC(1980+(h>>25&127),(h>>21&15)-1,h>>16&31,h>>11&31,h>>5&63,(31&h)<<1))}},u.exports=f},{"../utils":32}],19:[function(l,u,c){"use strict";var p=l("./Uint8ArrayReader");function f(h){p.call(this,h)}l("../utils").inherits(f,p),f.prototype.readData=function(h){this.checkOffset(h);var k=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,k},u.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(l,u,c){"use strict";var p=l("./DataReader");function f(h){p.call(this,h)}l("../utils").inherits(f,p),f.prototype.byteAt=function(h){return this.data.charCodeAt(this.zero+h)},f.prototype.lastIndexOfSignature=function(h){return this.data.lastIndexOf(h)-this.zero},f.prototype.readAndCheckSignature=function(h){return h===this.readData(4)},f.prototype.readData=function(h){this.checkOffset(h);var k=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,k},u.exports=f},{"../utils":32,"./DataReader":18}],21:[function(l,u,c){"use strict";var p=l("./ArrayReader");function f(h){p.call(this,h)}l("../utils").inherits(f,p),f.prototype.readData=function(h){if(this.checkOffset(h),h===0)return new Uint8Array(0);var k=this.data.subarray(this.zero+this.index,this.zero+this.index+h);return this.index+=h,k},u.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(l,u,c){"use strict";var p=l("../utils"),f=l("../support"),h=l("./ArrayReader"),k=l("./StringReader"),D=l("./NodeBufferReader"),I=l("./Uint8ArrayReader");u.exports=function(y){var S=p.getTypeOf(y);return p.checkSupport(S),S!=="string"||f.uint8array?S==="nodebuffer"?new D(y):f.uint8array?new I(p.transformTo("uint8array",y)):new h(p.transformTo("array",y)):new k(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(l,u,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(l,u,c){"use strict";var p=l("./GenericWorker"),f=l("../utils");function h(k){p.call(this,"ConvertWorker to "+k),this.destType=k}f.inherits(h,p),h.prototype.processChunk=function(k){this.push({data:f.transformTo(this.destType,k.data),meta:k.meta})},u.exports=h},{"../utils":32,"./GenericWorker":28}],25:[function(l,u,c){"use strict";var p=l("./GenericWorker"),f=l("../crc32");function h(){p.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}l("../utils").inherits(h,p),h.prototype.processChunk=function(k){this.streamInfo.crc32=f(k.data,this.streamInfo.crc32||0),this.push(k)},u.exports=h},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(l,u,c){"use strict";var p=l("../utils"),f=l("./GenericWorker");function h(k){f.call(this,"DataLengthProbe for "+k),this.propName=k,this.withStreamInfo(k,0)}p.inherits(h,f),h.prototype.processChunk=function(k){if(k){var D=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=D+k.data.length}f.prototype.processChunk.call(this,k)},u.exports=h},{"../utils":32,"./GenericWorker":28}],27:[function(l,u,c){"use strict";var p=l("../utils"),f=l("./GenericWorker");function h(k){f.call(this,"DataWorker");var D=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,k.then(function(I){D.dataIsReady=!0,D.data=I,D.max=I&&I.length||0,D.type=p.getTypeOf(I),D.isPaused||D._tickAndRepeat()},function(I){D.error(I)})}p.inherits(h,f),h.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},h.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,p.delay(this._tickAndRepeat,[],this)),!0)},h.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(p.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},h.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var k=null,D=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":k=this.data.substring(this.index,D);break;case"uint8array":k=this.data.subarray(this.index,D);break;case"array":case"nodebuffer":k=this.data.slice(this.index,D)}return this.index=D,this.push({data:k,meta:{percent:this.max?this.index/this.max*100:0}})},u.exports=h},{"../utils":32,"./GenericWorker":28}],28:[function(l,u,c){"use strict";function p(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}p.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,h){return this._listeners[f].push(h),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,h){if(this._listeners[f])for(var k=0;k "+f:f}},u.exports=p},{}],29:[function(l,u,c){"use strict";var p=l("../utils"),f=l("./ConvertWorker"),h=l("./GenericWorker"),k=l("../base64"),D=l("../support"),I=l("../external"),y=null;if(D.nodestream)try{y=l("../nodejs/NodejsStreamOutputAdapter")}catch(O){}function S(O,N){return new I.Promise(function(A,C){var z=[],H=O._internalType,q=O._outputType,K=O._mimeType;O.on("data",function(he,re){z.push(he),N&&N(re)}).on("error",function(he){z=[],C(he)}).on("end",function(){try{var he=function(re,U,oe){switch(re){case"blob":return p.newBlob(p.transformTo("arraybuffer",U),oe);case"base64":return k.encode(U);default:return p.transformTo(re,U)}}(q,function(re,U){var oe,de=0,De=null,B=0;for(oe=0;oe>>6:(A<65536?N[H++]=224|A>>>12:(N[H++]=240|A>>>18,N[H++]=128|A>>>12&63),N[H++]=128|A>>>6&63),N[H++]=128|63&A);return N}(M)},c.utf8decode=function(M){return f.nodebuffer?p.transformTo("nodebuffer",M).toString("utf-8"):function(O){var N,A,C,z,H=O.length,q=new Array(2*H);for(N=A=0;N>10&1023,q[A++]=56320|1023&C)}return q.length!==A&&(q.subarray?q=q.subarray(0,A):q.length=A),p.applyFromCharCode(q)}(M=p.transformTo(f.uint8array?"uint8array":"array",M))},p.inherits(y,k),y.prototype.processChunk=function(M){var O=p.transformTo(f.uint8array?"uint8array":"array",M.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=O;(O=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),O.set(N,this.leftOver.length)}else O=this.leftOver.concat(O);this.leftOver=null}var A=function(z,H){var q;for((H=H||z.length)>z.length&&(H=z.length),q=H-1;0<=q&&(192&z[q])==128;)q--;return q<0||q===0?H:q+D[z[q]]>H?q:H}(O),C=O;A!==O.length&&(f.uint8array?(C=O.subarray(0,A),this.leftOver=O.subarray(A,O.length)):(C=O.slice(0,A),this.leftOver=O.slice(A,O.length))),this.push({data:c.utf8decode(C),meta:M.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=y,p.inherits(S,k),S.prototype.processChunk=function(M){this.push({data:c.utf8encode(M.data),meta:M.meta})},c.Utf8EncodeWorker=S},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(l,u,c){"use strict";var p=l("./support"),f=l("./base64"),h=l("./nodejsUtils"),k=l("./external");function D(N){return N}function I(N,A){for(var C=0;C>8;this.dir=!!(16&this.externalFileAttributes),M==0&&(this.dosPermissions=63&this.externalFileAttributes),M==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var M=p(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=M.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=M.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=M.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=M.readInt(4))}},readExtraFields:function(M){var O,N,A,C=M.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});M.index+4>>6:(M<65536?S[A++]=224|M>>>12:(S[A++]=240|M>>>18,S[A++]=128|M>>>12&63),S[A++]=128|M>>>6&63),S[A++]=128|63&M);return S},c.buf2binstring=function(y){return I(y,y.length)},c.binstring2buf=function(y){for(var S=new p.Buf8(y.length),M=0,O=S.length;M>10&1023,z[O++]=56320|1023&N)}return I(z,O)},c.utf8border=function(y,S){var M;for((S=S||y.length)>y.length&&(S=y.length),M=S-1;0<=M&&(192&y[M])==128;)M--;return M<0||M===0?S:M+k[y[M]]>S?M:S}},{"./common":41}],43:[function(l,u,c){"use strict";u.exports=function(p,f,h,k){for(var D=65535&p|0,I=p>>>16&65535|0,y=0;h!==0;){for(h-=y=2e3>>1:f>>>1;h[k]=f}return h}();u.exports=function(f,h,k,D){var I=p,y=D+k;f^=-1;for(var S=D;S>>8^I[255&(f^h[S])];return-1^f}},{}],46:[function(l,u,c){"use strict";var p,f=l("../utils/common"),h=l("./trees"),k=l("./adler32"),D=l("./crc32"),I=l("./messages"),y=0,S=4,M=0,O=-2,N=-1,A=4,C=2,z=8,H=9,q=286,K=30,he=19,re=2*q+1,U=15,oe=3,de=258,De=de+oe+1,B=42,_e=113,w=1,fe=2,Se=3,xe=4;function Oe(g,ue){return g.msg=I[ue],ue}function be(g){return(g<<1)-(4g.avail_out&&(Z=g.avail_out),Z!==0&&(f.arraySet(g.output,ue.pending_buf,ue.pending_out,Z,g.next_out),g.next_out+=Z,ue.pending_out+=Z,g.total_out+=Z,g.avail_out-=Z,ue.pending-=Z,ue.pending===0&&(ue.pending_out=0))}function ie(g,ue){h._tr_flush_block(g,0<=g.block_start?g.block_start:-1,g.strstart-g.block_start,ue),g.block_start=g.strstart,se(g.strm)}function Re(g,ue){g.pending_buf[g.pending++]=ue}function Ce(g,ue){g.pending_buf[g.pending++]=ue>>>8&255,g.pending_buf[g.pending++]=255&ue}function we(g,ue){var Z,P,T=g.max_chain_length,j=g.strstart,ee=g.prev_length,te=g.nice_match,Y=g.strstart>g.w_size-De?g.strstart-(g.w_size-De):0,le=g.window,ye=g.w_mask,ge=g.prev,ve=g.strstart+de,Je=le[j+ee-1],Ke=le[j+ee];g.prev_length>=g.good_match&&(T>>=2),te>g.lookahead&&(te=g.lookahead);do if(le[(Z=ue)+ee]===Ke&&le[Z+ee-1]===Je&&le[Z]===le[j]&&le[++Z]===le[j+1]){j+=2,Z++;do;while(le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&le[++j]===le[++Z]&&jY&&--T!=0);return ee<=g.lookahead?ee:g.lookahead}function At(g){var ue,Z,P,T,j,ee,te,Y,le,ye,ge=g.w_size;do{if(T=g.window_size-g.lookahead-g.strstart,g.strstart>=ge+(ge-De)){for(f.arraySet(g.window,g.window,ge,ge,0),g.match_start-=ge,g.strstart-=ge,g.block_start-=ge,ue=Z=g.hash_size;P=g.head[--ue],g.head[ue]=ge<=P?P-ge:0,--Z;);for(ue=Z=ge;P=g.prev[--ue],g.prev[ue]=ge<=P?P-ge:0,--Z;);T+=ge}if(g.strm.avail_in===0)break;if(ee=g.strm,te=g.window,Y=g.strstart+g.lookahead,le=T,ye=void 0,ye=ee.avail_in,le=oe)for(j=g.strstart-g.insert,g.ins_h=g.window[j],g.ins_h=(g.ins_h<=oe&&(g.ins_h=(g.ins_h<=oe)if(P=h._tr_tally(g,g.strstart-g.match_start,g.match_length-oe),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=oe){for(g.match_length--;g.strstart++,g.ins_h=(g.ins_h<=oe&&(g.ins_h=(g.ins_h<=oe&&g.match_length<=g.prev_length){for(T=g.strstart+g.lookahead-oe,P=h._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-oe),g.lookahead-=g.prev_length-1,g.prev_length-=2;++g.strstart<=T&&(g.ins_h=(g.ins_h<g.pending_buf_size-5&&(Z=g.pending_buf_size-5);;){if(g.lookahead<=1){if(At(g),g.lookahead===0&&ue===y)return w;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var P=g.block_start+Z;if((g.strstart===0||g.strstart>=P)&&(g.lookahead=g.strstart-P,g.strstart=P,ie(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-De&&(ie(g,!1),g.strm.avail_out===0))return w}return g.insert=0,ue===S?(ie(g,!0),g.strm.avail_out===0?Se:xe):(g.strstart>g.block_start&&(ie(g,!1),g.strm.avail_out),w)}),new ot(4,4,8,4,Ot),new ot(4,5,16,8,Ot),new ot(4,6,32,32,Ot),new ot(4,4,16,16,et),new ot(8,16,32,32,et),new ot(8,16,128,128,et),new ot(8,32,128,256,et),new ot(32,128,258,1024,et),new ot(32,258,258,4096,et)],c.deflateInit=function(g,ue){return yt(g,ue,z,15,8,0)},c.deflateInit2=yt,c.deflateReset=Rt,c.deflateResetKeep=tt,c.deflateSetHeader=function(g,ue){return g&&g.state?g.state.wrap!==2?O:(g.state.gzhead=ue,M):O},c.deflate=function(g,ue){var Z,P,T,j;if(!g||!g.state||5>8&255),Re(P,P.gzhead.time>>16&255),Re(P,P.gzhead.time>>24&255),Re(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),Re(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(Re(P,255&P.gzhead.extra.length),Re(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(g.adler=D(g.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(Re(P,0),Re(P,0),Re(P,0),Re(P,0),Re(P,0),Re(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),Re(P,3),P.status=_e);else{var ee=z+(P.w_bits-8<<4)<<8;ee|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(ee|=32),ee+=31-ee%31,P.status=_e,Ce(P,ee),P.strstart!==0&&(Ce(P,g.adler>>>16),Ce(P,65535&g.adler)),g.adler=1}if(P.status===69)if(P.gzhead.extra){for(T=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>T&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),se(g),T=P.pending,P.pending!==P.pending_buf_size));)Re(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>T&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){T=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>T&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),se(g),T=P.pending,P.pending===P.pending_buf_size)){j=1;break}j=P.gzindexT&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),j===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){T=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>T&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),se(g),T=P.pending,P.pending===P.pending_buf_size)){j=1;break}j=P.gzindexT&&(g.adler=D(g.adler,P.pending_buf,P.pending-T,T)),j===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&se(g),P.pending+2<=P.pending_buf_size&&(Re(P,255&g.adler),Re(P,g.adler>>8&255),g.adler=0,P.status=_e)):P.status=_e),P.pending!==0){if(se(g),g.avail_out===0)return P.last_flush=-1,M}else if(g.avail_in===0&&be(ue)<=be(Z)&&ue!==S)return Oe(g,-5);if(P.status===666&&g.avail_in!==0)return Oe(g,-5);if(g.avail_in!==0||P.lookahead!==0||ue!==y&&P.status!==666){var te=P.strategy===2?function(Y,le){for(var ye;;){if(Y.lookahead===0&&(At(Y),Y.lookahead===0)){if(le===y)return w;break}if(Y.match_length=0,ye=h._tr_tally(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++,ye&&(ie(Y,!1),Y.strm.avail_out===0))return w}return Y.insert=0,le===S?(ie(Y,!0),Y.strm.avail_out===0?Se:xe):Y.last_lit&&(ie(Y,!1),Y.strm.avail_out===0)?w:fe}(P,ue):P.strategy===3?function(Y,le){for(var ye,ge,ve,Je,Ke=Y.window;;){if(Y.lookahead<=de){if(At(Y),Y.lookahead<=de&&le===y)return w;if(Y.lookahead===0)break}if(Y.match_length=0,Y.lookahead>=oe&&0Y.lookahead&&(Y.match_length=Y.lookahead)}if(Y.match_length>=oe?(ye=h._tr_tally(Y,1,Y.match_length-oe),Y.lookahead-=Y.match_length,Y.strstart+=Y.match_length,Y.match_length=0):(ye=h._tr_tally(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++),ye&&(ie(Y,!1),Y.strm.avail_out===0))return w}return Y.insert=0,le===S?(ie(Y,!0),Y.strm.avail_out===0?Se:xe):Y.last_lit&&(ie(Y,!1),Y.strm.avail_out===0)?w:fe}(P,ue):p[P.level].func(P,ue);if(te!==Se&&te!==xe||(P.status=666),te===w||te===Se)return g.avail_out===0&&(P.last_flush=-1),M;if(te===fe&&(ue===1?h._tr_align(P):ue!==5&&(h._tr_stored_block(P,0,0,!1),ue===3&&(Fe(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),se(g),g.avail_out===0))return P.last_flush=-1,M}return ue!==S?M:P.wrap<=0?1:(P.wrap===2?(Re(P,255&g.adler),Re(P,g.adler>>8&255),Re(P,g.adler>>16&255),Re(P,g.adler>>24&255),Re(P,255&g.total_in),Re(P,g.total_in>>8&255),Re(P,g.total_in>>16&255),Re(P,g.total_in>>24&255)):(Ce(P,g.adler>>>16),Ce(P,65535&g.adler)),se(g),0=Z.w_size&&(j===0&&(Fe(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),le=new f.Buf8(Z.w_size),f.arraySet(le,ue,ye-Z.w_size,Z.w_size,0),ue=le,ye=Z.w_size),ee=g.avail_in,te=g.next_in,Y=g.input,g.avail_in=ye,g.next_in=0,g.input=ue,At(Z);Z.lookahead>=oe;){for(P=Z.strstart,T=Z.lookahead-(oe-1);Z.ins_h=(Z.ins_h<>>=oe=U>>>24,H-=oe,(oe=U>>>16&255)==0)fe[I++]=65535&U;else{if(!(16&oe)){if((64&oe)==0){U=q[(65535&U)+(z&(1<>>=oe,H-=oe),H<15&&(z+=w[k++]<>>=oe=U>>>24,H-=oe,!(16&(oe=U>>>16&255))){if((64&oe)==0){U=K[(65535&U)+(z&(1<>>=oe,H-=oe,(oe=I-y)>3,z&=(1<<(H-=de<<3))-1,p.next_in=k,p.next_out=I,p.avail_in=k>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new p.Buf16(320),this.work=new p.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function H(B){var _e;return B&&B.state?(_e=B.state,B.total_in=B.total_out=_e.total=0,B.msg="",_e.wrap&&(B.adler=1&_e.wrap),_e.mode=O,_e.last=0,_e.havedict=0,_e.dmax=32768,_e.head=null,_e.hold=0,_e.bits=0,_e.lencode=_e.lendyn=new p.Buf32(N),_e.distcode=_e.distdyn=new p.Buf32(A),_e.sane=1,_e.back=-1,S):M}function q(B){var _e;return B&&B.state?((_e=B.state).wsize=0,_e.whave=0,_e.wnext=0,H(B)):M}function K(B,_e){var w,fe;return B&&B.state?(fe=B.state,_e<0?(w=0,_e=-_e):(w=1+(_e>>4),_e<48&&(_e&=15)),_e&&(_e<8||15<_e)?M:(fe.window!==null&&fe.wbits!==_e&&(fe.window=null),fe.wrap=w,fe.wbits=_e,q(B))):M}function he(B,_e){var w,fe;return B?(fe=new z,(B.state=fe).window=null,(w=K(B,_e))!==S&&(B.state=null),w):M}var re,U,oe=!0;function de(B){if(oe){var _e;for(re=new p.Buf32(512),U=new p.Buf32(32),_e=0;_e<144;)B.lens[_e++]=8;for(;_e<256;)B.lens[_e++]=9;for(;_e<280;)B.lens[_e++]=7;for(;_e<288;)B.lens[_e++]=8;for(D(I,B.lens,0,288,re,0,B.work,{bits:9}),_e=0;_e<32;)B.lens[_e++]=5;D(y,B.lens,0,32,U,0,B.work,{bits:5}),oe=!1}B.lencode=re,B.lenbits=9,B.distcode=U,B.distbits=5}function De(B,_e,w,fe){var Se,xe=B.state;return xe.window===null&&(xe.wsize=1<=xe.wsize?(p.arraySet(xe.window,_e,w-xe.wsize,xe.wsize,0),xe.wnext=0,xe.whave=xe.wsize):(fe<(Se=xe.wsize-xe.wnext)&&(Se=fe),p.arraySet(xe.window,_e,w-fe,Se,xe.wnext),(fe-=Se)?(p.arraySet(xe.window,_e,w-fe,fe,0),xe.wnext=fe,xe.whave=xe.wsize):(xe.wnext+=Se,xe.wnext===xe.wsize&&(xe.wnext=0),xe.whave>>8&255,w.check=h(w.check,j,2,0),ie=se=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&se)<<8)+(se>>8))%31){B.msg="incorrect header check",w.mode=30;break}if((15&se)!=8){B.msg="unknown compression method",w.mode=30;break}if(ie-=4,g=8+(15&(se>>>=4)),w.wbits===0)w.wbits=g;else if(g>w.wbits){B.msg="invalid window size",w.mode=30;break}w.dmax=1<>8&1),512&w.flags&&(j[0]=255&se,j[1]=se>>>8&255,w.check=h(w.check,j,2,0)),ie=se=0,w.mode=3;case 3:for(;ie<32;){if(be===0)break e;be--,se+=fe[xe++]<>>8&255,j[2]=se>>>16&255,j[3]=se>>>24&255,w.check=h(w.check,j,4,0)),ie=se=0,w.mode=4;case 4:for(;ie<16;){if(be===0)break e;be--,se+=fe[xe++]<>8),512&w.flags&&(j[0]=255&se,j[1]=se>>>8&255,w.check=h(w.check,j,2,0)),ie=se=0,w.mode=5;case 5:if(1024&w.flags){for(;ie<16;){if(be===0)break e;be--,se+=fe[xe++]<>>8&255,w.check=h(w.check,j,2,0)),ie=se=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(be<(we=w.length)&&(we=be),we&&(w.head&&(g=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),p.arraySet(w.head.extra,fe,xe,we,g)),512&w.flags&&(w.check=h(w.check,fe,we,xe)),be-=we,xe+=we,w.length-=we),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(be===0)break e;for(we=0;g=fe[xe+we++],w.head&&g&&w.length<65536&&(w.head.name+=String.fromCharCode(g)),g&&we>9&1,w.head.done=!0),B.adler=w.check=0,w.mode=12;break;case 10:for(;ie<32;){if(be===0)break e;be--,se+=fe[xe++]<>>=7&ie,ie-=7&ie,w.mode=27;break}for(;ie<3;){if(be===0)break e;be--,se+=fe[xe++]<>>=1)){case 0:w.mode=14;break;case 1:if(de(w),w.mode=20,_e!==6)break;se>>>=2,ie-=2;break e;case 2:w.mode=17;break;case 3:B.msg="invalid block type",w.mode=30}se>>>=2,ie-=2;break;case 14:for(se>>>=7&ie,ie-=7&ie;ie<32;){if(be===0)break e;be--,se+=fe[xe++]<>>16^65535)){B.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&se,ie=se=0,w.mode=15,_e===6)break e;case 15:w.mode=16;case 16:if(we=w.length){if(be>>=5,ie-=5,w.ndist=1+(31&se),se>>>=5,ie-=5,w.ncode=4+(15&se),se>>>=4,ie-=4,286>>=3,ie-=3}for(;w.have<19;)w.lens[ee[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Z={bits:w.lenbits},ue=D(0,w.lens,0,19,w.lencode,0,w.work,Z),w.lenbits=Z.bits,ue){B.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have>>16&255,kt=65535&T,!((et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>>=et,ie-=et,w.lens[w.have++]=kt;else{if(kt===16){for(P=et+2;ie>>=et,ie-=et,w.have===0){B.msg="invalid bit length repeat",w.mode=30;break}g=w.lens[w.have-1],we=3+(3&se),se>>>=2,ie-=2}else if(kt===17){for(P=et+3;ie
>>=et)),se>>>=3,ie-=3}else{for(P=et+7;ie
>>=et)),se>>>=7,ie-=7}if(w.have+we>w.nlen+w.ndist){B.msg="invalid bit length repeat",w.mode=30;break}for(;we--;)w.lens[w.have++]=g}}if(w.mode===30)break;if(w.lens[256]===0){B.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,Z={bits:w.lenbits},ue=D(I,w.lens,0,w.nlen,w.lencode,0,w.work,Z),w.lenbits=Z.bits,ue){B.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,Z={bits:w.distbits},ue=D(y,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Z),w.distbits=Z.bits,ue){B.msg="invalid distances set",w.mode=30;break}if(w.mode=20,_e===6)break e;case 20:w.mode=21;case 21:if(6<=be&&258<=Fe){B.next_out=Oe,B.avail_out=Fe,B.next_in=xe,B.avail_in=be,w.hold=se,w.bits=ie,k(B,Ce),Oe=B.next_out,Se=B.output,Fe=B.avail_out,xe=B.next_in,fe=B.input,be=B.avail_in,se=w.hold,ie=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;ot=(T=w.lencode[se&(1<>>16&255,kt=65535&T,!((et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>tt)])>>>16&255,kt=65535&T,!(tt+(et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>>=tt,ie-=tt,w.back+=tt}if(se>>>=et,ie-=et,w.back+=et,w.length=kt,ot===0){w.mode=26;break}if(32&ot){w.back=-1,w.mode=12;break}if(64&ot){B.msg="invalid literal/length code",w.mode=30;break}w.extra=15&ot,w.mode=22;case 22:if(w.extra){for(P=w.extra;ie>>=w.extra,ie-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;ot=(T=w.distcode[se&(1<>>16&255,kt=65535&T,!((et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>tt)])>>>16&255,kt=65535&T,!(tt+(et=T>>>24)<=ie);){if(be===0)break e;be--,se+=fe[xe++]<>>=tt,ie-=tt,w.back+=tt}if(se>>>=et,ie-=et,w.back+=et,64&ot){B.msg="invalid distance code",w.mode=30;break}w.offset=kt,w.extra=15&ot,w.mode=24;case 24:if(w.extra){for(P=w.extra;ie>>=w.extra,ie-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){B.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(Fe===0)break e;if(we=Ce-Fe,w.offset>we){if((we=w.offset-we)>w.whave&&w.sane){B.msg="invalid distance too far back",w.mode=30;break}At=we>w.wnext?(we-=w.wnext,w.wsize-we):w.wnext-we,we>w.length&&(we=w.length),Ot=w.window}else Ot=Se,At=Oe-w.offset,we=w.length;for(Fere?(oe=At[Ot+A[_e]],ie[Re+A[_e]]):(oe=96,0),z=1<>Oe)+(H-=z)]=U<<24|oe<<16|de|0,H!==0;);for(z=1<>=1;if(z!==0?(se&=z-1,se+=z):se=0,_e++,--Ce[B]==0){if(B===fe)break;B=y[S+A[_e]]}if(Se>>7)]}function Re(T,j){T.pending_buf[T.pending++]=255&j,T.pending_buf[T.pending++]=j>>>8&255}function Ce(T,j,ee){T.bi_valid>C-ee?(T.bi_buf|=j<>C-T.bi_valid,T.bi_valid+=ee-C):(T.bi_buf|=j<>>=1,ee<<=1,0<--j;);return ee>>>1}function Ot(T,j,ee){var te,Y,le=new Array(A+1),ye=0;for(te=1;te<=A;te++)le[te]=ye=ye+ee[te-1]<<1;for(Y=0;Y<=j;Y++){var ge=T[2*Y+1];ge!==0&&(T[2*Y]=At(le[ge]++,ge))}}function et(T){var j;for(j=0;j>1;1<=ee;ee--)tt(T,le,ee);for(Y=ve;ee=T.heap[1],T.heap[1]=T.heap[T.heap_len--],tt(T,le,1),te=T.heap[1],T.heap[--T.heap_max]=ee,T.heap[--T.heap_max]=te,le[2*Y]=le[2*ee]+le[2*te],T.depth[Y]=(T.depth[ee]>=T.depth[te]?T.depth[ee]:T.depth[te])+1,le[2*ee+1]=le[2*te+1]=Y,T.heap[1]=Y++,tt(T,le,1),2<=T.heap_len;);T.heap[--T.heap_max]=T.heap[1],function(Ke,We){var nt,Gt,kn,Et,Pn,en,Bt=We.dyn_tree,sn=We.max_code,Ht=We.stat_desc.static_tree,Cn=We.stat_desc.has_stree,Xn=We.stat_desc.extra_bits,Kn=We.stat_desc.extra_base,Xt=We.stat_desc.max_length,yn=0;for(Et=0;Et<=A;Et++)Ke.bl_count[Et]=0;for(Bt[2*Ke.heap[Ke.heap_max]+1]=0,nt=Ke.heap_max+1;nt>=7;Y>>=1)if(1&Je&&ge.dyn_ltree[2*ve]!==0)return f;if(ge.dyn_ltree[18]!==0||ge.dyn_ltree[20]!==0||ge.dyn_ltree[26]!==0)return h;for(ve=32;ve>>3,(le=T.static_len+3+7>>>3)<=Y&&(Y=le)):Y=le=ee+5,ee+4<=Y&&j!==-1?P(T,j,ee,te):T.strategy===4||le===Y?(Ce(T,2+(te?1:0),3),Rt(T,De,B)):(Ce(T,4+(te?1:0),3),function(ge,ve,Je,Ke){var We;for(Ce(ge,ve-257,5),Ce(ge,Je-1,5),Ce(ge,Ke-4,4),We=0;We>>8&255,T.pending_buf[T.d_buf+2*T.last_lit+1]=255&j,T.pending_buf[T.l_buf+T.last_lit]=255&ee,T.last_lit++,j===0?T.dyn_ltree[2*ee]++:(T.matches++,j--,T.dyn_ltree[2*(w[ee]+y+1)]++,T.dyn_dtree[2*ie(j)]++),T.last_lit===T.lit_bufsize-1},c._tr_align=function(T){Ce(T,2,3),we(T,H,De),function(j){j.bi_valid===16?(Re(j,j.bi_buf),j.bi_buf=0,j.bi_valid=0):8<=j.bi_valid&&(j.pending_buf[j.pending++]=255&j.bi_buf,j.bi_buf>>=8,j.bi_valid-=8)}(T)}},{"../utils/common":41}],53:[function(l,u,c){"use strict";u.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(l,u,c){(function(p){(function(f,h){"use strict";if(!f.setImmediate){var k,D,I,y,S=1,M={},O=!1,N=f.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(f);A=A&&A.setTimeout?A:f,k={}.toString.call(f.process)==="[object process]"?function(q){process.nextTick(function(){z(q)})}:function(){if(f.postMessage&&!f.importScripts){var q=!0,K=f.onmessage;return f.onmessage=function(){q=!1},f.postMessage("","*"),f.onmessage=K,q}}()?(y="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",H,!1):f.attachEvent("onmessage",H),function(q){f.postMessage(y+q,"*")}):f.MessageChannel?((I=new MessageChannel).port1.onmessage=function(q){z(q.data)},function(q){I.port2.postMessage(q)}):N&&"onreadystatechange"in N.createElement("script")?(D=N.documentElement,function(q){var K=N.createElement("script");K.onreadystatechange=function(){z(q),K.onreadystatechange=null,D.removeChild(K),K=null},D.appendChild(K)}):function(q){setTimeout(z,0,q)},A.setImmediate=function(q){typeof q!="function"&&(q=new Function(""+q));for(var K=new Array(arguments.length-1),he=0;he{"use strict";var bi=ao&&ao.__assign||function(){return bi=Object.assign||function(l){for(var u,c=1,p=arguments.length;c{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.Tabs=void 0;var Zh=eu(),Jh=function(){function l(u){var c=this;u===void 0&&(u={}),this._currentTab="",this.tabEvents=new Zh.EventEmitter({beforeSwitch:!0,afterSwitch:!0}),$("*[data-tab]").on("click",function(h){var k=$(h.target),D=k.data("tab");h.preventDefault(),c.switchToTab(D)});var p=u.initialTab;if(!p&&window.location.hash){var f=window.location.hash.replace(/^#/,"");p=f}p||(p=$(".tab:first").attr("data-tab")),p&&this.switchToTab(p)}return l.prototype.switchToTab=function(u){var c=this,p=function(){var h=c._currentTab;c._currentTab=u;var k=u!=="level"?u:"";window.history&&window.history.replaceState(null,"","#"+k);var D=$('*[data-tab="'+u+'"]'),I=D.siblings("*[data-tab]"),y=$('*[data-tabtarget="'+u+'"]'),S=y.siblings("*[data-tabtarget]");I.removeClass("tab-selected"),D.addClass("tab-selected"),S.addClass("hidden"),y.removeClass("hidden"),c.tabEvents.emit("afterSwitch",{oldTab:h,newTab:u})};if(this._currentTab!=""){var f=this.tabEvents.emit("beforeSwitch",{oldTab:this._currentTab,newTab:u});f.then(p)}else p()},Object.defineProperty(l.prototype,"currentTab",{get:function(){return this._currentTab},enumerable:!1,configurable:!0}),l.prototype.on=function(u,c){var p=this.tabEvents.on(u,c);return u==="afterSwitch"&&this.tabEvents.emit("afterSwitch",{oldTab:"",newTab:this._currentTab}),p},l}();wi.Tabs=Jh});var nu=dt(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.normal_prefix=Er.pygame_prefix=Er.turtle_prefix=void 0;Er.turtle_prefix=`# coding=utf8
import random # noqa F401
import time # noqa F401
@@ -315,17 +315,17 @@ def convert_numerals(alphabet, number):
T = int
number = ''.join(all_numerals_converted)
return T(f'{sign}{number}')
-`});var ou=dt(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.isServerSaveInfo=void 0;function e_(l){return!!l&&typeof l=="object"&&!!l.id}Li.isServerSaveInfo=e_});var Mi=dt(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.tutorialPopup=mr.relocatePopup=mr.removeBorder=mr.addHighlightBorder=void 0;var t_=Lr();function n_(l){$("#"+l).addClass("border-2 rounded-lg border-red-500")}mr.addHighlightBorder=n_;function r_(l){$("#"+l).removeClass("border-2 border-red-500")}mr.removeBorder=r_;function o_(l,u){if($("#tutorial-pop-up").css({top:"20%",left:"50%"}),l&&u){var c=l.toString()+"%",p=u.toString()+"%";$("#tutorial-pop-up").css({top:p,left:c})}}mr.relocatePopup=o_;function i_(l,u){var c="/get_tutorial_step/"+l+"/";$.ajax({type:"GET",url:c+u.toString(),dataType:"json"}).done(function(p){$("#tutorial_title").text(p.title),$("#tutorial_text").text(p.text),$("#tutorial-pop-up").fadeIn(800)}).fail(function(p){t_.modal.notifyError(p.responseText)})}mr.tutorialPopup=i_});var Ni=dt(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.clearUnsavedChanges=Sr.markUnsavedChanges=Sr.hasUnsavedChanges=void 0;var a_=io();function iu(l){return l.preventDefault(),l.returnValue=a_.ClientMessages.Unsaved_Changes}var Da=!1;function s_(){return Da}Sr.hasUnsavedChanges=s_;function l_(){Da=!0,window.addEventListener("beforeunload",iu,{capture:!0})}Sr.markUnsavedChanges=l_;function u_(){Da=!1,window.removeEventListener("beforeunload",iu,{capture:!0})}Sr.clearUnsavedChanges=u_});var su=dt(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.callNextIntroStep=so.startIntro=void 0;var Un=tr(),lt=Mi(),Fo=Ni(),Lt=0;function c_(){Lt=1,$("#adventures").hide(),$("#variables_container").hide(),Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(""),(0,lt.tutorialPopup)("intro",Lt)}so.startIntro=c_;function d_(){Lt+=1,Lt==2?p_():Lt==3?h_():Lt==4?__():Lt==5?f_():Lt==6?g_():Lt==7?m_():Lt==8?x_():Lt==9?v_():Lt==10?k_():Lt==11?y_():Lt==12?b_():Lt==13?w_():Lt==14?L_():Lt==15?((0,Un.pushAchievement)("well_begun_is_half_done"),$("#achievement_pop-up").removeClass("z-10"),$("#achievement_pop-up").addClass("z-50"),setTimeout(function(){$("#achievement_pop-up").is(":visible")?setTimeout(function(){au(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10")},5e3):(au(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10"))},500)):location.replace("/hedy")}so.callNextIntroStep=d_;function p_(){$("#editor").addClass("z-40"),(0,lt.addHighlightBorder)("editor"),(0,lt.relocatePopup)(65,30),Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue("print ___"),(0,lt.tutorialPopup)("intro",Lt)}function h_(){(0,lt.removeBorder)("editor"),$("#code_output").addClass("z-40"),(0,lt.addHighlightBorder)("code_output"),(0,Un.runit)(1,"en","",function(){$("#output").focus()}),(0,lt.relocatePopup)(35,30),(0,lt.tutorialPopup)("intro",Lt)}function __(){(0,lt.removeBorder)("code_output"),$("#code_related_buttons").show(),$("#runButtonContainer").addClass("z-40"),(0,lt.addHighlightBorder)("runButtonContainer"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function f_(){$.ajax({type:"GET",url:"/get_tutorial_step/intro/code_snippet/",dataType:"json"}).done(function(l){Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(l.code)}).fail(function(){Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(`print Hello world!
-print I'm learning Hedy with the tutorial!`)}),(0,lt.relocatePopup)(50,70),(0,lt.tutorialPopup)("intro",Lt)}function g_(){(0,lt.removeBorder)("runButtonContainer"),$("#editor").removeClass("z-40"),$("#code_output").removeClass("z-40"),$("#runButtonContainer").removeClass("z-40"),$("#speak_container").addClass("z-40 bg-white relative"),(0,lt.addHighlightBorder)("speak_container"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function m_(){$("#editor").addClass("z-40"),$("#code_output").addClass("z-40"),$("#runButtonContainer").addClass("z-40"),(0,lt.relocatePopup)(50,70),(0,lt.tutorialPopup)("intro",Lt)}function x_(){(0,lt.removeBorder)("speak_container"),$("#editor").removeClass("z-40"),$("#code_output").removeClass("z-40"),$("#runButtonContainer").removeClass("z-40"),$("#speak_container").removeClass("z-40 bg-white relative"),$("#next_level_button").addClass("z-40"),$("#next_level_button").removeAttr("onclick"),(0,lt.addHighlightBorder)("next_level_button"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function v_(){(0,lt.removeBorder)("next_level_button"),$("#next_level_button").removeClass("z-40"),$("#code_content_container").addClass("z-40"),$("#adventures").addClass("z-40 bg-gray-100"),$("#adventures").show(),(0,Fo.clearUnsavedChanges)(),(0,lt.addHighlightBorder)("adventures"),(0,lt.relocatePopup)(50,40),(0,lt.tutorialPopup)("intro",Lt)}function k_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="story"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function y_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="parsons"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function b_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="quiz"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function w_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="default"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.removeBorder)("adventures"),$("#code_content_container").removeClass("z-40"),$("#level-header").addClass("z-40"),$("#cheatsheet_container").hide(),(0,lt.addHighlightBorder)("level-header"),$("#save_program_button").removeAttr("onclick"),$("#share_program_button").removeAttr("onclick"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function L_(){$("#cheatsheet_container").show(),$("#code_output").removeClass("z-40"),$("#adventures").removeClass("z-40"),$("#cheatsheet_dropdown").addClass("z-40"),$("#cheatsheet_dropdown").show(),(0,lt.tutorialPopup)("intro",Lt)}function au(){(0,lt.removeBorder)("level-header"),$("#level-header").removeClass("z-40"),$("#cheatsheet_dropdown").removeClass("z-40"),$("#cheatsheet_dropdown").hide(),(0,lt.relocatePopup)(50,15),(0,lt.tutorialPopup)("intro",Lt)}});var uu=dt(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.callTeacherNextStep=lo.startTeacher=void 0;var M_=tr(),gn=Mi(),$n=0;function N_(){$n=1,(0,gn.tutorialPopup)("teacher",$n)}lo.startTeacher=N_;function T_(){$n+=1,$n==2?P_():$n==3?C_():$n==4?D_():$n==5?E_():$n==6?S_():$n==7?((0,M_.pushAchievement)("ring_the_bell"),$("#achievement_pop-up").removeClass("z-10"),$("#achievement_pop-up").addClass("z-50"),setTimeout(function(){$("#achievement_pop-up").is(":visible")?setTimeout(function(){lu(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10")},5e3):(lu(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10"))},500)):location.replace("/for-teachers")}lo.callTeacherNextStep=T_;function P_(){$("#auth_main_container").addClass("z-40"),$("#teacher_classes").addClass("z-40 bg-gray-100"),(0,gn.addHighlightBorder)("teacher_classes"),(0,gn.relocatePopup)(50,40),(0,gn.tutorialPopup)("teacher",$n)}function C_(){(0,gn.tutorialPopup)("teacher",$n)}function D_(){$("#teacher_adventures").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_classes"),(0,gn.addHighlightBorder)("teacher_adventures"),(0,gn.relocatePopup)(50,70),(0,gn.tutorialPopup)("teacher",$n)}function E_(){$("#teacher_accounts").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_adventures"),(0,gn.addHighlightBorder)("teacher_accounts"),(0,gn.relocatePopup)(50,20),(0,gn.tutorialPopup)("teacher",$n)}function S_(){$("#teacher_documentation").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_accounts"),(0,gn.addHighlightBorder)("teacher_documentation"),(0,gn.tutorialPopup)("teacher",$n)}function lu(){(0,gn.removeBorder)("teacher_documentation"),(0,gn.tutorialPopup)("teacher",$n)}});var cu=dt(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.callNextStepLevel1=uo.startLevel1=void 0;var Ea=tr(),Sa=Mi(),jo=0;function I_(){jo=1,(0,Sa.tutorialPopup)("1",jo)}uo.startLevel1=I_;function A_(){jo+=1,jo==2?(Ea.theGlobalEditor===null||Ea.theGlobalEditor===void 0||Ea.theGlobalEditor.setValue("print Hello world!"),(0,Sa.relocatePopup)(50,70),(0,Sa.tutorialPopup)("1",2)):jo==3&&location.replace("/hedy")}uo.callNextStepLevel1=A_});var Go=dt(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.startTeacherTutorial=xr.startLevelTutorial=xr.startIntroTutorial=xr.initializeTutorial=void 0;var du=su(),pu=uu(),hu=cu(),co="";function z_(){$("#tutorial_next_button").off("click").on("click",function(){return $("#tutorial-pop-up").hide(),co=="intro"?(0,du.callNextIntroStep)():co=="teacher"?(0,pu.callTeacherNextStep)():F_(co)})}xr.initializeTutorial=z_;function O_(){$("#tutorial-mask").show(),co="intro",(0,du.startIntro)()}xr.startIntroTutorial=O_;function $_(l){$("#tutorial-mask").show(),co=l,B_(l)}xr.startLevelTutorial=$_;function R_(){$("#tutorial-mask").show(),co="teacher",(0,pu.startTeacher)()}xr.startTeacherTutorial=R_;function B_(l){l=="1"&&(0,hu.startLevel1)()}function F_(l){l=="1"&&(0,hu.callNextStepLevel1)()}});var fu=dt(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.loadNextExercise=po.loadParsonsExercise=void 0;var j_=Lr(),G_=tr();function _u(l,u){$("#next_parson_button").hide();var c=new URLSearchParams(window.location.search),p="/parsons/get-exercise/"+l+"/"+u;c.has("keyword_language")&&(p+="/"+c.get("keyword_language")),$.ajax({type:"GET",url:p,dataType:"json"}).done(function(f){$("#parsons_container").show(),$("#next_parson_button").attr("current_exercise",u),W_(),H_(u),U_(f),V_(l,u)}).fail(function(f){j_.modal.notifyError(f.responseText)})}po.loadParsonsExercise=_u;function W_(){(0,G_.stopit)(),$("#output").empty(),$(".parsons_goal_line_container").removeClass("border-green-500 border-red-500"),$(".compiler-parsons-box").attr("index","-"),$(".compiler-parsons-box").attr("code",""),$(".goal_parsons").each(function(){ace.edit($(this).attr("id")).setValue("")})}function H_(l){$(".parsons_header_text_container").hide(),$(".step").removeClass("current"),$("#parsons_header_text_"+l).show(),$("#parsons_header_"+l).addClass("current")}function U_(l){var u=q_(l.code),c=Object.keys(u);$(".parsons_start_line_container").hide(),$(".parsons_goal_line_container").hide(),X_(c),c.forEach(function(p,f){var h=u[p],k=f+1;ace.edit("start_parsons_"+k).session.setValue(h.replace(/\n+$/,""),-1),$("#start_parsons_div_"+k).attr("index",p),$("#start_parsons_div_"+k).attr("code",h),ace.edit("goal_parsons_"+k).session.setValue(""),$("#parsons_start_line_container_"+k).show(),$("#parsons_goal_line_container_"+k).show()}),$("#parsons_explanation_story").text(l.story)}function V_(l,u){var c=$("#next_parson_button").attr("max_exercise")||1;u=1;u--){var c=Math.floor(Math.random()*u),p=l[c];l[c]=l[u],l[u]=p}}});var xu=dt(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.onElementBecomesVisible=ho.checkNow=void 0;var Ti=new Array;function gu(l){var u=$(window).scrollTop(),c=u+$(window).height(),p=$(l).offset().top;return p<=c&&p>=u}function mu(){for(var l=0;l{"use strict";var Ia=an&&an.__assign||function(){return Ia=Object.assign||function(l){for(var u,c=1,p=arguments.length;c"+l[c][0]+": "+l[c][1]+"");ku()}}an.load_variables=Q_;function ef(l){var u="",c=parseInt(l.v);return typeof c=="number"&&!isNaN(c)&&(u="#ffffff"),typeof l.v=="string"&&isNaN(c)&&(u="#ffffff"),typeof l.v=="boolean"&&(u="#ffffff"),l.tp$name=="list"&&(u="#ffffff"),u}function tf(l){var u=[],c=["random","time","int_saver","int_$rw$","turtle","t"];for(var p in l)if(!p.includes("__")&&!c.includes(p)){var f=ef(l[p]),h=nf(p),k=[h,l[p].v,f];u.push(k)}return u}function nf(l){return l.replace(/_\$rw\$$/,"")}var Di="ace_breakpoint";function rf(l){if(Pi=l.markers,vu=l.editor,Aa=l.level,za=l.language,Ci||($("#variables").hide(),$("#variable_button").hide()),l.level>0){var u=l.level;_o=u<=7}if(_o||$("#debug_button").hide(),l.level!=0){var u=l.level;Ci=u>=2,ku()}of(l.editor)}an.initializeDebugger=rf;function of(l){var l=ace.edit("editor");l.on("guttermousedown",function(u){var c=u.domEvent.target;if(c.className.indexOf("ace_gutter-cell")!=-1&&!(u.clientX>25+c.getBoundingClientRect().left)){var p=Mu(u.editor),f=u.getDocumentPosition().row;if(p[f]===void 0&&f!==u.editor.getLastVisibleRow()+1)if(af(event)){var h=f;for(var k in p){var D=parseInt(k);D{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.isServerSaveInfo=void 0;function Qh(l){return!!l&&typeof l=="object"&&!!l.id}Li.isServerSaveInfo=Qh});var Mi=dt(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.tutorialPopup=mr.relocatePopup=mr.removeBorder=mr.addHighlightBorder=void 0;var e_=Lr();function t_(l){$("#"+l).addClass("border-2 rounded-lg border-red-500")}mr.addHighlightBorder=t_;function n_(l){$("#"+l).removeClass("border-2 border-red-500")}mr.removeBorder=n_;function r_(l,u){if($("#tutorial-pop-up").css({top:"20%",left:"50%"}),l&&u){var c=l.toString()+"%",p=u.toString()+"%";$("#tutorial-pop-up").css({top:p,left:c})}}mr.relocatePopup=r_;function o_(l,u){var c="/get_tutorial_step/"+l+"/";$.ajax({type:"GET",url:c+u.toString(),dataType:"json"}).done(function(p){$("#tutorial_title").text(p.title),$("#tutorial_text").text(p.text),$("#tutorial-pop-up").fadeIn(800)}).fail(function(p){e_.modal.notifyError(p.responseText)})}mr.tutorialPopup=o_});var Ni=dt(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.clearUnsavedChanges=Sr.markUnsavedChanges=Sr.hasUnsavedChanges=void 0;var i_=io();function ou(l){return l.preventDefault(),l.returnValue=i_.ClientMessages.Unsaved_Changes}var Ca=!1;function a_(){return Ca}Sr.hasUnsavedChanges=a_;function s_(){Ca=!0,window.addEventListener("beforeunload",ou,{capture:!0})}Sr.markUnsavedChanges=s_;function l_(){Ca=!1,window.removeEventListener("beforeunload",ou,{capture:!0})}Sr.clearUnsavedChanges=l_});var au=dt(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.callNextIntroStep=so.startIntro=void 0;var Un=tr(),lt=Mi(),Fo=Ni(),Lt=0;function u_(){Lt=1,$("#adventures").hide(),$("#variables_container").hide(),Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(""),(0,lt.tutorialPopup)("intro",Lt)}so.startIntro=u_;function c_(){Lt+=1,Lt==2?d_():Lt==3?p_():Lt==4?h_():Lt==5?__():Lt==6?f_():Lt==7?g_():Lt==8?m_():Lt==9?x_():Lt==10?v_():Lt==11?k_():Lt==12?y_():Lt==13?b_():Lt==14?w_():Lt==15?((0,Un.pushAchievement)("well_begun_is_half_done"),$("#achievement_pop-up").removeClass("z-10"),$("#achievement_pop-up").addClass("z-50"),setTimeout(function(){$("#achievement_pop-up").is(":visible")?setTimeout(function(){iu(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10")},5e3):(iu(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10"))},500)):location.replace("/hedy")}so.callNextIntroStep=c_;function d_(){$("#editor").addClass("z-40"),(0,lt.addHighlightBorder)("editor"),(0,lt.relocatePopup)(65,30),Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue("print ___"),(0,lt.tutorialPopup)("intro",Lt)}function p_(){(0,lt.removeBorder)("editor"),$("#code_output").addClass("z-40"),(0,lt.addHighlightBorder)("code_output"),(0,Un.runit)(1,"en","",function(){$("#output").focus()}),(0,lt.relocatePopup)(35,30),(0,lt.tutorialPopup)("intro",Lt)}function h_(){(0,lt.removeBorder)("code_output"),$("#code_related_buttons").show(),$("#runButtonContainer").addClass("z-40"),(0,lt.addHighlightBorder)("runButtonContainer"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function __(){$.ajax({type:"GET",url:"/get_tutorial_step/intro/code_snippet/",dataType:"json"}).done(function(l){Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(l.code)}).fail(function(){Un.theGlobalEditor===null||Un.theGlobalEditor===void 0||Un.theGlobalEditor.setValue(`print Hello world!
+print I'm learning Hedy with the tutorial!`)}),(0,lt.relocatePopup)(50,70),(0,lt.tutorialPopup)("intro",Lt)}function f_(){(0,lt.removeBorder)("runButtonContainer"),$("#editor").removeClass("z-40"),$("#code_output").removeClass("z-40"),$("#runButtonContainer").removeClass("z-40"),$("#speak_container").addClass("z-40 bg-white relative"),(0,lt.addHighlightBorder)("speak_container"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function g_(){$("#editor").addClass("z-40"),$("#code_output").addClass("z-40"),$("#runButtonContainer").addClass("z-40"),(0,lt.relocatePopup)(50,70),(0,lt.tutorialPopup)("intro",Lt)}function m_(){(0,lt.removeBorder)("speak_container"),$("#editor").removeClass("z-40"),$("#code_output").removeClass("z-40"),$("#runButtonContainer").removeClass("z-40"),$("#speak_container").removeClass("z-40 bg-white relative"),$("#next_level_button").addClass("z-40"),$("#next_level_button").removeAttr("onclick"),(0,lt.addHighlightBorder)("next_level_button"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function x_(){(0,lt.removeBorder)("next_level_button"),$("#next_level_button").removeClass("z-40"),$("#code_content_container").addClass("z-40"),$("#adventures").addClass("z-40 bg-gray-100"),$("#adventures").show(),(0,Fo.clearUnsavedChanges)(),(0,lt.addHighlightBorder)("adventures"),(0,lt.relocatePopup)(50,40),(0,lt.tutorialPopup)("intro",Lt)}function v_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="story"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function k_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="parsons"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function y_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="quiz"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.tutorialPopup)("intro",Lt)}function b_(){$("#adventures-buttons").children().each(function(){$(this).attr("data-tab")=="default"&&((0,Fo.clearUnsavedChanges)(),$(this).click())}),(0,lt.removeBorder)("adventures"),$("#code_content_container").removeClass("z-40"),$("#level-header").addClass("z-40"),$("#cheatsheet_container").hide(),(0,lt.addHighlightBorder)("level-header"),$("#save_program_button").removeAttr("onclick"),$("#share_program_button").removeAttr("onclick"),(0,lt.relocatePopup)(50,30),(0,lt.tutorialPopup)("intro",Lt)}function w_(){$("#cheatsheet_container").show(),$("#code_output").removeClass("z-40"),$("#adventures").removeClass("z-40"),$("#cheatsheet_dropdown").addClass("z-40"),$("#cheatsheet_dropdown").show(),(0,lt.tutorialPopup)("intro",Lt)}function iu(){(0,lt.removeBorder)("level-header"),$("#level-header").removeClass("z-40"),$("#cheatsheet_dropdown").removeClass("z-40"),$("#cheatsheet_dropdown").hide(),(0,lt.relocatePopup)(50,15),(0,lt.tutorialPopup)("intro",Lt)}});var lu=dt(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.callTeacherNextStep=lo.startTeacher=void 0;var L_=tr(),gn=Mi(),$n=0;function M_(){$n=1,(0,gn.tutorialPopup)("teacher",$n)}lo.startTeacher=M_;function N_(){$n+=1,$n==2?T_():$n==3?P_():$n==4?C_():$n==5?D_():$n==6?E_():$n==7?((0,L_.pushAchievement)("ring_the_bell"),$("#achievement_pop-up").removeClass("z-10"),$("#achievement_pop-up").addClass("z-50"),setTimeout(function(){$("#achievement_pop-up").is(":visible")?setTimeout(function(){su(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10")},5e3):(su(),$("#achievement_pop-up").removeClass("z-50"),$("#achievement_pop-up").addClass("z-10"))},500)):location.replace("/for-teachers")}lo.callTeacherNextStep=N_;function T_(){$("#auth_main_container").addClass("z-40"),$("#teacher_classes").addClass("z-40 bg-gray-100"),(0,gn.addHighlightBorder)("teacher_classes"),(0,gn.relocatePopup)(50,40),(0,gn.tutorialPopup)("teacher",$n)}function P_(){(0,gn.tutorialPopup)("teacher",$n)}function C_(){$("#teacher_adventures").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_classes"),(0,gn.addHighlightBorder)("teacher_adventures"),(0,gn.relocatePopup)(50,70),(0,gn.tutorialPopup)("teacher",$n)}function D_(){$("#teacher_accounts").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_adventures"),(0,gn.addHighlightBorder)("teacher_accounts"),(0,gn.relocatePopup)(50,20),(0,gn.tutorialPopup)("teacher",$n)}function E_(){$("#teacher_documentation").addClass("z-40 bg-gray-100"),(0,gn.removeBorder)("teacher_accounts"),(0,gn.addHighlightBorder)("teacher_documentation"),(0,gn.tutorialPopup)("teacher",$n)}function su(){(0,gn.removeBorder)("teacher_documentation"),(0,gn.tutorialPopup)("teacher",$n)}});var uu=dt(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.callNextStepLevel1=uo.startLevel1=void 0;var Da=tr(),Ea=Mi(),jo=0;function S_(){jo=1,(0,Ea.tutorialPopup)("1",jo)}uo.startLevel1=S_;function I_(){jo+=1,jo==2?(Da.theGlobalEditor===null||Da.theGlobalEditor===void 0||Da.theGlobalEditor.setValue("print Hello world!"),(0,Ea.relocatePopup)(50,70),(0,Ea.tutorialPopup)("1",2)):jo==3&&location.replace("/hedy")}uo.callNextStepLevel1=I_});var Go=dt(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.startTeacherTutorial=xr.startLevelTutorial=xr.startIntroTutorial=xr.initializeTutorial=void 0;var cu=au(),du=lu(),pu=uu(),co="";function A_(){$("#tutorial_next_button").off("click").on("click",function(){return $("#tutorial-pop-up").hide(),co=="intro"?(0,cu.callNextIntroStep)():co=="teacher"?(0,du.callTeacherNextStep)():B_(co)})}xr.initializeTutorial=A_;function z_(){$("#tutorial-mask").show(),co="intro",(0,cu.startIntro)()}xr.startIntroTutorial=z_;function O_(l){$("#tutorial-mask").show(),co=l,R_(l)}xr.startLevelTutorial=O_;function $_(){$("#tutorial-mask").show(),co="teacher",(0,du.startTeacher)()}xr.startTeacherTutorial=$_;function R_(l){l=="1"&&(0,pu.startLevel1)()}function B_(l){l=="1"&&(0,pu.callNextStepLevel1)()}});var _u=dt(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.loadNextExercise=po.loadParsonsExercise=void 0;var F_=Lr(),j_=tr();function hu(l,u){$("#next_parson_button").hide();var c=new URLSearchParams(window.location.search),p="/parsons/get-exercise/"+l+"/"+u;c.has("keyword_language")&&(p+="/"+c.get("keyword_language")),$.ajax({type:"GET",url:p,dataType:"json"}).done(function(f){$("#parsons_container").show(),$("#next_parson_button").attr("current_exercise",u),G_(),W_(u),H_(f),U_(l,u)}).fail(function(f){F_.modal.notifyError(f.responseText)})}po.loadParsonsExercise=hu;function G_(){(0,j_.stopit)(),$("#output").empty(),$(".parsons_goal_line_container").removeClass("border-green-500 border-red-500"),$(".compiler-parsons-box").attr("index","-"),$(".compiler-parsons-box").attr("code",""),$(".goal_parsons").each(function(){ace.edit($(this).attr("id")).setValue("")})}function W_(l){$(".parsons_header_text_container").hide(),$(".step").removeClass("current"),$("#parsons_header_text_"+l).show(),$("#parsons_header_"+l).addClass("current")}function H_(l){var u=Y_(l.code),c=Object.keys(u);$(".parsons_start_line_container").hide(),$(".parsons_goal_line_container").hide(),q_(c),c.forEach(function(p,f){var h=u[p],k=f+1;ace.edit("start_parsons_"+k).session.setValue(h.replace(/\n+$/,""),-1),$("#start_parsons_div_"+k).attr("index",p),$("#start_parsons_div_"+k).attr("code",h),ace.edit("goal_parsons_"+k).session.setValue(""),$("#parsons_start_line_container_"+k).show(),$("#parsons_goal_line_container_"+k).show()}),$("#parsons_explanation_story").text(l.story)}function U_(l,u){var c=$("#next_parson_button").attr("max_exercise")||1;u=1;u--){var c=Math.floor(Math.random()*u),p=l[c];l[c]=l[u],l[u]=p}}});var mu=dt(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.onElementBecomesVisible=ho.checkNow=void 0;var Ti=new Array;function fu(l){var u=$(window).scrollTop(),c=u+$(window).height(),p=$(l).offset().top;return p<=c&&p>=u}function gu(){for(var l=0;l{"use strict";var Sa=an&&an.__assign||function(){return Sa=Object.assign||function(l){for(var u,c=1,p=arguments.length;c"+l[c][0]+": "+l[c][1]+"");vu()}}an.load_variables=J_;function Q_(l){var u="",c=parseInt(l.v);return typeof c=="number"&&!isNaN(c)&&(u="#ffffff"),typeof l.v=="string"&&isNaN(c)&&(u="#ffffff"),typeof l.v=="boolean"&&(u="#ffffff"),l.tp$name=="list"&&(u="#ffffff"),u}function ef(l){var u=[],c=["random","time","int_saver","int_$rw$","turtle","t"];for(var p in l)if(!p.includes("__")&&!c.includes(p)){var f=Q_(l[p]),h=tf(p),k=[h,l[p].v,f];u.push(k)}return u}function tf(l){return l.replace(/_\$rw\$$/,"")}var Di="ace_breakpoint";function nf(l){if(Pi=l.markers,xu=l.editor,Ia=l.level,Aa=l.language,Ci||($("#variables").hide(),$("#variable_button").hide()),l.level>0){var u=l.level;_o=u<=7}if(_o||$("#debug_button").hide(),l.level!=0){var u=l.level;Ci=u>=2,vu()}rf(l.editor)}an.initializeDebugger=nf;function rf(l){var l=ace.edit("editor");l.on("guttermousedown",function(u){var c=u.domEvent.target;if(c.className.indexOf("ace_gutter-cell")!=-1&&!(u.clientX>25+c.getBoundingClientRect().left)){var p=Lu(u.editor),f=u.getDocumentPosition().row;if(p[f]===void 0&&f!==u.editor.getLastVisibleRow()+1)if(of(event)){var h=f;for(var k in p){var D=parseInt(k);D{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.localLoadOnce=vr.localLoad=vr.localDelete=vr.localSave=void 0;function df(l,u){var c;(c=window.localStorage)===null||c===void 0||c.setItem(l,JSON.stringify(u))}vr.localSave=df;function Nu(l){var u;(u=window.localStorage)===null||u===void 0||u.removeItem(l)}vr.localDelete=Nu;function Tu(l){var u,c=(u=window.localStorage)===null||u===void 0?void 0:u.getItem(l);try{return c?JSON.parse(c):void 0}catch(p){return}}vr.localLoad=Tu;function pf(l){var u=Tu(l);return u!==void 0&&Nu(l),u}vr.localLoadOnce=pf});var Pu=dt((Ra,Ba)=>{(function(l,u){typeof Ra=="object"&&typeof Ba!="undefined"?Ba.exports=u():typeof define=="function"&&define.amd?define(u):(l=l||self,l.DOMPurify=u())})(Ra,function(){"use strict";function l(P){if(Array.isArray(P)){for(var T=0,j=Array(P.length);T1?j-1:0),te=1;te/gm),At=D(/^data-[\-\w.\u00B7-\uFFFF]/),Ot=D(/^aria-[\-\w]+$/),et=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ot=D(/^(?:\w+script|data):/i),kt=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P};function Rt(P){if(Array.isArray(P)){for(var T=0,j=Array(P.length);T0&&arguments[0]!==void 0?arguments[0]:yt(),T=function(V){return ue(V)};if(T.version="2.3.5",T.removed=[],!P||!P.document||P.document.nodeType!==9)return T.isSupported=!1,T;var j=P.document,ee=P.document,te=P.DocumentFragment,Y=P.HTMLTemplateElement,le=P.Node,ye=P.Element,ge=P.NodeFilter,ve=P.NamedNodeMap,Je=ve===void 0?P.NamedNodeMap||P.MozNamedAttrMap:ve,Ke=P.HTMLFormElement,We=P.DOMParser,nt=P.trustedTypes,Gt=ye.prototype,kn=B(Gt,"cloneNode"),Et=B(Gt,"nextSibling"),Pn=B(Gt,"childNodes"),en=B(Gt,"parentNode");if(typeof Y=="function"){var Bt=ee.createElement("template");Bt.content&&Bt.content.ownerDocument&&(ee=Bt.content.ownerDocument)}var sn=g(nt,j),Ht=sn?sn.createHTML(""):"",Cn=ee,Xn=Cn.implementation,Kn=Cn.createNodeIterator,Xt=Cn.createDocumentFragment,yn=Cn.getElementsByTagName,ln=j.importNode,bn={};try{bn=De(ee).documentMode?ee.documentMode:{}}catch(Ae){}var un={};T.isSupported=typeof en=="function"&&Xn&&typeof Xn.createHTMLDocument!="undefined"&&bn!==9;var wn=Ce,Zn=we,lr=At,Ir=Ot,Yr=ot,rt=kt,Mt=et,qe=null,Mr=de({},[].concat(Rt(_e),Rt(w),Rt(fe),Rt(xe),Rt(be))),bt=null,Ar=de({},[].concat(Rt(Fe),Rt(se),Rt(ie),Rt(Re))),Ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),mn=null,rr=null,hn=!0,nn=!0,ur=!1,Dn=!1,_n=!1,jn=!1,cr=!1,En=!1,Ut=!1,Nt=!1,dr=!0,or=!0,Yn=!1,tn={},Vt=null,Jn=de({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ft=null,ir=de({},["audio","video","img","source","image","track"]),jt=null,xt=de({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sn="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml",Kt=Be,In=!1,Tt=void 0,Gn=["application/xhtml+xml","text/html"],pr="text/html",An=void 0,m=null,v=ee.createElement("form"),L=function(V){return V instanceof RegExp||V instanceof Function},R=function(V){m&&m===V||((!V||(typeof V=="undefined"?"undefined":tt(V))!=="object")&&(V={}),V=De(V),qe="ALLOWED_TAGS"in V?de({},V.ALLOWED_TAGS):Mr,bt="ALLOWED_ATTR"in V?de({},V.ALLOWED_ATTR):Ar,jt="ADD_URI_SAFE_ATTR"in V?de(De(xt),V.ADD_URI_SAFE_ATTR):xt,Ft="ADD_DATA_URI_TAGS"in V?de(De(ir),V.ADD_DATA_URI_TAGS):ir,Vt="FORBID_CONTENTS"in V?de({},V.FORBID_CONTENTS):Jn,mn="FORBID_TAGS"in V?de({},V.FORBID_TAGS):{},rr="FORBID_ATTR"in V?de({},V.FORBID_ATTR):{},tn="USE_PROFILES"in V?V.USE_PROFILES:!1,hn=V.ALLOW_ARIA_ATTR!==!1,nn=V.ALLOW_DATA_ATTR!==!1,ur=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Dn=V.SAFE_FOR_TEMPLATES||!1,_n=V.WHOLE_DOCUMENT||!1,En=V.RETURN_DOM||!1,Ut=V.RETURN_DOM_FRAGMENT||!1,Nt=V.RETURN_TRUSTED_TYPE||!1,cr=V.FORCE_BODY||!1,dr=V.SANITIZE_DOM!==!1,or=V.KEEP_CONTENT!==!1,Yn=V.IN_PLACE||!1,Mt=V.ALLOWED_URI_REGEXP||Mt,Kt=V.NAMESPACE||Be,V.CUSTOM_ELEMENT_HANDLING&&L(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&L(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Tt=Gn.indexOf(V.PARSER_MEDIA_TYPE)===-1?Tt=pr:Tt=V.PARSER_MEDIA_TYPE,An=Tt==="application/xhtml+xml"?function(Le){return Le}:C,Dn&&(nn=!1),Ut&&(En=!0),tn&&(qe=de({},[].concat(Rt(be))),bt=[],tn.html===!0&&(de(qe,_e),de(bt,Fe)),tn.svg===!0&&(de(qe,w),de(bt,se),de(bt,Re)),tn.svgFilters===!0&&(de(qe,fe),de(bt,se),de(bt,Re)),tn.mathMl===!0&&(de(qe,xe),de(bt,ie),de(bt,Re))),V.ADD_TAGS&&(qe===Mr&&(qe=De(qe)),de(qe,V.ADD_TAGS)),V.ADD_ATTR&&(bt===Ar&&(bt=De(bt)),de(bt,V.ADD_ATTR)),V.ADD_URI_SAFE_ATTR&&de(jt,V.ADD_URI_SAFE_ATTR),V.FORBID_CONTENTS&&(Vt===Jn&&(Vt=De(Vt)),de(Vt,V.FORBID_CONTENTS)),or&&(qe["#text"]=!0),_n&&de(qe,["html","head","body"]),qe.table&&(de(qe,["tbody"]),delete mn.tbody),k&&k(V),m=V)},G=de({},["mi","mo","mn","ms","mtext"]),J=de({},["foreignobject","desc","title","annotation-xml"]),Q=de({},w);de(Q,fe),de(Q,Se);var ce=de({},xe);de(ce,Oe);var me=function(V){var Le=en(V);(!Le||!Le.tagName)&&(Le={namespaceURI:Be,tagName:"template"});var Ie=C(V.tagName),He=C(Le.tagName);if(V.namespaceURI===ar)return Le.namespaceURI===Be?Ie==="svg":Le.namespaceURI===Sn?Ie==="svg"&&(He==="annotation-xml"||G[He]):Boolean(Q[Ie]);if(V.namespaceURI===Sn)return Le.namespaceURI===Be?Ie==="math":Le.namespaceURI===ar?Ie==="math"&&J[He]:Boolean(ce[Ie]);if(V.namespaceURI===Be){if(Le.namespaceURI===ar&&!J[He]||Le.namespaceURI===Sn&&!G[He])return!1;var gt=de({},["title","style","font","a","script"]);return!ce[Ie]&&(gt[Ie]||!Q[Ie])}return!1},Ee=function(V){A(T.removed,{element:V});try{V.parentNode.removeChild(V)}catch(Le){try{V.outerHTML=Ht}catch(Ie){V.remove()}}},Ye=function(V,Le){try{A(T.removed,{attribute:Le.getAttributeNode(V),from:Le})}catch(Ie){A(T.removed,{attribute:null,from:Le})}if(Le.removeAttribute(V),V==="is"&&!bt[V])if(En||Ut)try{Ee(Le)}catch(Ie){}else try{Le.setAttribute(V,"")}catch(Ie){}},Ze=function(V){var Le=void 0,Ie=void 0;if(cr)V=""+V;else{var He=z(V,/^[\r\n\t ]+/);Ie=He&&He[0]}Tt==="application/xhtml+xml"&&(V=''+V+"");var gt=sn?sn.createHTML(V):V;if(Kt===Be)try{Le=new We().parseFromString(gt,Tt)}catch(ft){}if(!Le||!Le.documentElement){Le=Xn.createDocument(Kt,"template",null);try{Le.documentElement.innerHTML=In?"":gt}catch(ft){}}var St=Le.body||Le.documentElement;return V&&Ie&&St.insertBefore(ee.createTextNode(Ie),St.childNodes[0]||null),Kt===Be?yn.call(Le,_n?"html":"body")[0]:_n?Le.documentElement:St},pt=function(V){return Kn.call(V.ownerDocument||V,V,ge.SHOW_ELEMENT|ge.SHOW_COMMENT|ge.SHOW_TEXT,null,!1)},Xe=function(V){return V instanceof Ke&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof Je)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function")},Qe=function(V){return(typeof le=="undefined"?"undefined":tt(le))==="object"?V instanceof le:V&&(typeof V=="undefined"?"undefined":tt(V))==="object"&&typeof V.nodeType=="number"&&typeof V.nodeName=="string"},je=function(V,Le,Ie){!un[V]||O(un[V],function(He){He.call(T,Le,Ie,m)})},Pt=function(V){var Le=void 0;if(je("beforeSanitizeElements",V,null),Xe(V)||z(V.nodeName,/[\u0080-\uFFFF]/))return Ee(V),!0;var Ie=An(V.nodeName);if(je("uponSanitizeElement",V,{tagName:Ie,allowedTags:qe}),!Qe(V.firstElementChild)&&(!Qe(V.content)||!Qe(V.content.firstElementChild))&&he(/<[/\w]/g,V.innerHTML)&&he(/<[/\w]/g,V.textContent)||Ie==="select"&&he(/=0;--ft)He.insertBefore(kn(gt[ft],!0),Et(V))}return!mn[Ie]&&wt(Ie)&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,Ie)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(Ie))?!1:(Ee(V),!0)}return V instanceof ye&&!me(V)||(Ie==="noscript"||Ie==="noembed")&&he(/<\/no(script|embed)/i,V.innerHTML)?(Ee(V),!0):(Dn&&V.nodeType===3&&(Le=V.textContent,Le=H(Le,wn," "),Le=H(Le,Zn," "),V.textContent!==Le&&(A(T.removed,{element:V.cloneNode()}),V.textContent=Le)),je("afterSanitizeElements",V,null),!1)},cn=function(V,Le,Ie){if(dr&&(Le==="id"||Le==="name")&&(Ie in ee||Ie in v))return!1;if(!(nn&&!rr[Le]&&he(lr,Le))){if(!(hn&&he(Ir,Le))){if(!bt[Le]||rr[Le]){if(!(wt(V)&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,V)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(V))&&(Ne.attributeNameCheck instanceof RegExp&&he(Ne.attributeNameCheck,Le)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(Le))||Le==="is"&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,Ie)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(Ie))))return!1}else if(!jt[Le]){if(!he(Mt,H(Ie,rt,""))){if(!((Le==="src"||Le==="xlink:href"||Le==="href")&&V!=="script"&&q(Ie,"data:")===0&&Ft[V])){if(!(ur&&!he(Yr,H(Ie,rt,"")))){if(Ie)return!1}}}}}}return!0},wt=function(V){return V.indexOf("-")>0},Yt=function(V){var Le=void 0,Ie=void 0,He=void 0,gt=void 0;je("beforeSanitizeAttributes",V,null);var St=V.attributes;if(!!St){var ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt};for(gt=St.length;gt--;){Le=St[gt];var fn=Le,ht=fn.name,hr=fn.namespaceURI;if(Ie=K(Le.value),He=An(ht),ft.attrName=He,ft.attrValue=Ie,ft.keepAttr=!0,ft.forceKeepAttr=void 0,je("uponSanitizeAttribute",V,ft),Ie=ft.attrValue,!ft.forceKeepAttr&&(Ye(ht,V),!!ft.keepAttr)){if(he(/\/>/i,Ie)){Ye(ht,V);continue}Dn&&(Ie=H(Ie,wn," "),Ie=H(Ie,Zn," "));var ut=An(V.nodeName);if(!!cn(ut,He,Ie))try{hr?V.setAttributeNS(hr,ht,Ie):V.setAttribute(ht,Ie),N(T.removed)}catch(qr){}}}je("afterSanitizeAttributes",V,null)}},xn=function Ae(V){var Le=void 0,Ie=pt(V);for(je("beforeSanitizeShadowDOM",V,null);Le=Ie.nextNode();)je("uponSanitizeShadowNode",Le,null),!Pt(Le)&&(Le.content instanceof te&&Ae(Le.content),Yt(Le));je("afterSanitizeShadowDOM",V,null)};return T.sanitize=function(Ae,V){var Le=void 0,Ie=void 0,He=void 0,gt=void 0,St=void 0;if(In=!Ae,In&&(Ae=""),typeof Ae!="string"&&!Qe(Ae)){if(typeof Ae.toString!="function")throw re("toString is not a function");if(Ae=Ae.toString(),typeof Ae!="string")throw re("dirty is not a string, aborting")}if(!T.isSupported){if(tt(P.toStaticHTML)==="object"||typeof P.toStaticHTML=="function"){if(typeof Ae=="string")return P.toStaticHTML(Ae);if(Qe(Ae))return P.toStaticHTML(Ae.outerHTML)}return Ae}if(jn||R(V),T.removed=[],typeof Ae=="string"&&(Yn=!1),Yn){if(Ae.nodeName){var ft=An(Ae.nodeName);if(!qe[ft]||mn[ft])throw re("root node is forbidden and cannot be sanitized in-place")}}else if(Ae instanceof le)Le=Ze(""),Ie=Le.ownerDocument.importNode(Ae,!0),Ie.nodeType===1&&Ie.nodeName==="BODY"||Ie.nodeName==="HTML"?Le=Ie:Le.appendChild(Ie);else{if(!En&&!Dn&&!_n&&Ae.indexOf("<")===-1)return sn&&Nt?sn.createHTML(Ae):Ae;if(Le=Ze(Ae),!Le)return En?null:Nt?Ht:""}Le&&cr&&Ee(Le.firstChild);for(var fn=pt(Yn?Ae:Le);He=fn.nextNode();)He.nodeType===3&&He===gt||Pt(He)||(He.content instanceof te&&xn(He.content),Yt(He),gt=He);if(gt=null,Yn)return Ae;if(En){if(Ut)for(St=Xt.call(Le.ownerDocument);Le.firstChild;)St.appendChild(Le.firstChild);else St=Le;return bt.shadowroot&&(St=ln.call(j,St,!0)),St}var ht=_n?Le.outerHTML:Le.innerHTML;return Dn&&(ht=H(ht,wn," "),ht=H(ht,Zn," ")),sn&&Nt?sn.createHTML(ht):ht},T.setConfig=function(Ae){R(Ae),jn=!0},T.clearConfig=function(){m=null,jn=!1},T.isValidAttribute=function(Ae,V,Le){m||R({});var Ie=An(Ae),He=An(V);return cn(Ie,He,Le)},T.addHook=function(Ae,V){typeof V=="function"&&(un[Ae]=un[Ae]||[],A(un[Ae],V))},T.removeHook=function(Ae){un[Ae]&&N(un[Ae])},T.removeHooks=function(Ae){un[Ae]&&(un[Ae]=[])},T.removeAllHooks=function(){un={}},T}var Z=ue();return Z})});var Cu=dt(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.Markers=void 0;var hf=function(){function l(u){this.editor=u,this.markerClasses=new Map,this.strikeMarkers=new Map}return l.prototype.highlightAceError=function(u,c){if(c===void 0){this.addMarker(new ace.Range(u-1,1,u-1,2),"editor-error","fullLine");return}var p=this.editor.session.getLine(u-1).slice(c-1).split(/(\s+)/)[0].length;this.addMarker(new ace.Range(u-1,c-1,u-1,c-1+p),"editor-error","text")},l.prototype.clearErrors=function(){for(var u=0,c=this.findMarkers("editor-error");u{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.HedyAceEditor=fo.HedyAceEditorCreator=void 0;var Rn=tr(),Du=Lr(),Eu=Ei(),_f=Cu(),ff=1,gf=function(){function l(){}return l.prototype.initializeMainEditor=function(u){var c=this.turnIntoEditor(u.get(0),u.data("readonly"),!0);c.configureMainEditor(),Du.error.setEditor(c),window.Range=ace.require("ace/range").Range;var p;return window.addEventListener("keydown",function(f){var h=f.keyCode;if(h===18){p=!0;return}if(h===13&&p){if(!Rn.theLevel||!Rn.theLanguage)throw new Error("Oh no");(0,Rn.runit)(Rn.theLevel,Rn.theLanguage,"",function(){$("#output").focus()})}h===37&&document.activeElement===document.getElementById("output")&&(c.focus(),c.moveCursorToEndOfFile())}),window.addEventListener("keyup",function(f){(0,Rn.triggerAutomaticSave)();var h=f.keyCode;if(h===18){p=!1;return}}),c},l.prototype.turnIntoEditor=function(u,c,p){p===void 0&&(p=!1);var f=new Su,h=ace.edit(u);return h.setTheme("ace/theme/monokai"),c&&(h.setValue(h.getValue().trimRight(),-1),h.renderer.$cursorLayer.element.style.display="none",h.setOptions({readOnly:!0,showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1}),h.renderer.setScrollMargin(3,3,10,20),p&&h.setOptions({showGutter:!0})),f.editor=h,Rn.theLevel&&f.setHighliterForLevel(Rn.theLevel),f},l.prototype.initializeModalEditor=function(u){var c=this.turnIntoEditor(u.get(0),!0);Du.error.setEditor(c),window.Range=ace.require("ace/range").Range;var p;return window.addEventListener("keydown",function(f){var h=f.keyCode;if(h===18){p=!0;return}h===13&&p&&(0,Rn.runit)(Rn.theLevel,Rn.theLanguage,"",function(){$("#output").focus()}),h===37&&document.activeElement===document.getElementById("output")&&(c.focus(),c.moveCursorToEndOfFile())}),window.addEventListener("keyup",function(f){var h=f.keyCode;if(h===18){p=!1;return}}),c},l.prototype.initializeExampleEditor=function(u){var c=$("body").attr("dir"),p=this.turnIntoEditor(u,!0);return p.setOptions({maxLines:1/0}),$(u).hasClass("common-mistakes")?p.setOptions({showGutter:!0,showPrintMargin:!0,highlightActiveLine:!0,minLines:5}):$(u).hasClass("cheatsheet")?p.setOptions({minLines:1}):$(u).hasClass("parsons")?p.setOptions({minLines:1,showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1}):p.setOptions({minLines:2}),c==="rtl"&&p.setOptions({rtl:!0}),p},l}();fo.HedyAceEditorCreator=gf;var Su=function(){function l(){this.askPromptOpen=!1}return l.prototype.setHighliterForLevel=function(u){var c,p=this.getHighlighter(u);(c=this._editor)===null||c===void 0||c.session.setMode(p)},l.prototype.getValue=function(){return this._editor.getValue()},l.prototype.isReadOnly=function(){return this._editor.getReadOnly()},l.prototype.setValue=function(u){var c;(c=this._editor)===null||c===void 0||c.setValue(u,ff)},l.prototype.trimTrailingSpace=function(){try{var u=ace.require("ace/ext/whitespace");u.trimTrailingSpace(this._editor.session,!0)}catch(c){console.error(c)}},l.prototype.resize=function(){var u;(u=this._editor)===null||u===void 0||u.resize()},l.prototype.focus=function(){var u;(u=this._editor)===null||u===void 0||u.focus()},l.prototype.clearErrors=function(){var u,c;(u=this._editor)===null||u===void 0||u.session.clearAnnotations(),(c=this.markers)===null||c===void 0||c.clearErrors()},l.prototype.moveCursorToEndOfFile=function(){var u;(u=this._editor)===null||u===void 0||u.navigateFileEnd()},l.prototype.clearSelection=function(){var u;(u=this._editor)===null||u===void 0||u.clearSelection()},l.prototype.clearBreakpoints=function(){var u;(u=this._editor)===null||u===void 0||u.session.clearBreakpoints()},l.prototype.configureMainEditor=function(){var u=this,c,p,f,h,k;(c=this._editor)===null||c===void 0||c.setShowPrintMargin(!1),(p=this._editor)===null||p===void 0||p.renderer.setScrollMargin(0,0,0,20),(f=this._editor)===null||f===void 0||f.addEventListener("change",function(){Rn.theLocalSaveWarning.setProgramLength(u._editor.getValue().split(`
-`).length)});var D=$("body").attr("dir");D==="rtl"&&((h=this._editor)===null||h===void 0||h.setOptions({rtl:!0})),(k=this._editor)===null||k===void 0||k.on("change",function(){var I;u.askPromptOpen&&((0,Rn.stopit)(),(I=u._editor)===null||I===void 0||I.focus()),$("#ask-modal").is(":visible")&&$("#inline-modal").hide(),u.askPromptOpen=!1,$("#runit").css("background-color",""),u.clearErrors(),(0,Eu.stopDebug)()}),this._markers=new _f.Markers(this._editor),(0,Eu.initializeDebugger)({editor:this._editor,markers:this.markers,level:Rn.theLevel,language:Rn.theLanguage})},Object.defineProperty(l.prototype,"editor",{get:function(){return this._editor},set:function(u){this._editor=u},enumerable:!1,configurable:!0}),l.prototype.getBreakpoints=function(){var u;return(u=this._editor)===null||u===void 0?void 0:u.session.getBreakpoints()},l.prototype.setEditorMode=function(u){var c;(c=this._editor)===null||c===void 0||c.setReadOnly(u)},l.prototype.getHighlighter=function(u){return"ace/mode/level"+u},l.prototype.setOptions=function(u){var c;(c=this._editor)===null||c===void 0||c.setOptions(u)},Object.defineProperty(l.prototype,"markers",{get:function(){return this._markers},enumerable:!1,configurable:!0}),l}();fo.HedyAceEditor=Su});var Ai=dt(Ge=>{"use strict";var mf=Ge&&Ge.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.initializeClassOverviewPage=Ge.initializeCustomizeClassPage=Ge.initializeTeacherPage=Ge.copy_join_link=Ge.create_accounts=Ge.append_classname=Ge.generate_passwords=Ge.add_account_placeholder=Ge.setDateLevelInputColor=Ge.enable_level=Ge.restore_customization_to_default=Ge.save_customizations=Ge.show_doc_section=Ge.change_password_student=Ge.delete_adventure=Ge.preview_adventure=Ge.update_adventure=Ge.create_adventure=Ge.remove_student=Ge.remove_student_invite=Ge.invite_student=Ge.join_class=Ge.delete_class=Ge.duplicate_class=Ge.rename_class=Ge.create_class=void 0;var it=Lr(),Gr=tr(),Wo=Ni(),Wr=io(),Iu=mf(Pu()),xf=Go(),vf=Fa(),kf=new vf.HedyAceEditorCreator;function yf(l){it.modal.prompt(l,"",function(u){$.ajax({type:"POST",url:"/class",data:JSON.stringify({name:u}),contentType:"application/json",dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!1,"/for-teachers/customize-class/"+c.id):window.location.pathname="/for-teachers/customize-class/"+c.id}).fail(function(c){return it.modal.notifyError(c.responseText)})})}Ge.create_class=yf;function bf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"PUT",url:"/class/"+l,data:JSON.stringify({name:c}),contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.rename_class=bf;function wf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"POST",url:"/duplicate_class",data:JSON.stringify({id:l,name:c}),contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.duplicate_class=wf;function Lf(l,u){it.modal.confirm(u,function(){$.ajax({type:"DELETE",url:"/class/"+l,contentType:"application/json",dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!0,""):location.reload()}).fail(function(c){it.modal.notifyError(c.responseText)})})}Ge.delete_class=Lf;function Mf(l,u){$.ajax({type:"POST",url:"/class/join",contentType:"application/json",data:JSON.stringify({id:l,name:u}),dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!1,"/programs"):window.location.pathname="/programs"}).fail(function(c){if(c.status==403)return it.modal.confirm(c.responseText,function(){localStorage.setItem("hedy-join",JSON.stringify({id:l,name:u})),window.location.pathname="/login"});it.modal.notifyError(Wr.ClientMessages.Connection_error)})}Ge.join_class=Mf;function Nf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"POST",url:"/invite_student",data:JSON.stringify({username:c,class_id:l}),contentType:"application/json",dataType:"json"}).done(function(){location.reload()}).fail(function(p){it.modal.notifyError(p.responseText)})})}Ge.invite_student=Nf;function Tf(l,u,c){return it.modal.confirm(c,function(){$.ajax({type:"POST",url:"/remove_student_invite",data:JSON.stringify({username:l,class_id:u}),contentType:"application/json",dataType:"json"}).done(function(){location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.remove_student_invite=Tf;function Pf(l,u,c){it.modal.confirm(c,function(){$.ajax({type:"DELETE",url:"/class/"+l+"/student/"+u,contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){it.modal.notifyError(p.responseText)})})}Ge.remove_student=Pf;function Cf(l){it.modal.prompt(l,"",function(u){$.ajax({type:"POST",url:"/for-teachers/create_adventure",data:JSON.stringify({name:u}),contentType:"application/json",dataType:"json"}).done(function(c){window.location.pathname="/for-teachers/customize-adventure/"+c.id}).fail(function(c){return it.modal.notifyError(c.responseText)})})}Ge.create_adventure=Cf;function Au(l){var u=$("#custom_adventure_name").val(),c=$("#custom_adventure_level").val(),p=Iu.default.sanitize($("#custom_adventure_content").val()),f=$("#agree_public").prop("checked");$.ajax({type:"POST",url:"/for-teachers/customize-adventure",data:JSON.stringify({id:l,name:u,level:c,content:p,public:f}),contentType:"application/json",dataType:"json"}).done(function(h){it.modal.notifySuccess(h.success)}).fail(function(h){it.modal.notifyError(h.responseText)})}function Df(l,u,c){u?Au(l):it.modal.confirm(c,function(){Au(l)})}Ge.update_adventure=Df;function Ef(l){var u=$("#custom_adventure_name").val();if(typeof u!="string")throw new Error("Expected name to be string, got '"+u+"'");var c=$("#custom_adventure_level").val();if(typeof c!="string")throw new Error("Expected level to be string, got '"+u+"'");var p=$("");p.addClass("preview border border-black px-8 py-4 text-left rounded-lg bg-gray-200 text-black"),p.css("white-space","pre-wrap"),p.css("width","40em"),p.html(l),it.modal.preview(p,u);for(var f=0,h=$(".preview pre").get();f
p?$("#opening_date_level_"+l).removeClass("bg-gray-200").addClass("bg-green-300"):$("#opening_date_level_"+l).removeClass("bg-green-300").addClass("bg-gray-200"),$("#level-"+l).is(":visible")&&Ii(l)}Ge.setDateLevelInputColor=zu;function Bf(){var l=$("#account_row_unique").clone();l.removeClass("hidden"),l.attr("id",""),l.find(":input").each(function(){$(this).prop("id")!="classes"&&$(this).prop("required",!0)});for(var u=0;u<5;u++)l.clone().appendTo("#account_rows_container")}Ge.add_account_placeholder=Bf;function Ff(){if(!$("#passwords_toggle").is(":checked")){$(".passwords_input").val(""),$(".passwords_input").prop("disabled",!1);return}$(".account_row").each(function(){$(this).is(":visible")&&$(this).find(":input").each(function(){if($(this).attr("id")=="password"){var l=Uf(6);$(this).val(l)}})}),$(".passwords_input").prop("disabled",!0)}Ge.generate_passwords=Ff;function jf(){var l=$("#classes").val();$(".usernames_input").each(function(){$(this).val($(this).val()+"_"+l)})}Ge.append_classname=jf;function Gf(l){it.modal.confirm(l,function(){$("#account_rows_container").find(":input").each(function(){$(this).removeClass("border-2 border-red-500"),$(this).removeAttr("required")});var u=[];$(".account_row").each(function(){if($(this).is(":visible")){var c={};$(this).find(":input").each(function(){c[$(this).attr("name")]=$(this).val()}),u.push(c)}}),$.ajax({type:"POST",url:"/for-teachers/create-accounts",data:JSON.stringify({accounts:u}),contentType:"application/json",dataType:"json"}).done(function(c){if(c.error){it.modal.notifyError(c.error),$("#account_rows_container").find(":input").each(function(){$(this).val()==c.value&&$(this).addClass("border-2 border-red-500")});return}else it.modal.notifySuccess(c.success),$("input[name='download_credentials_checkbox']:checked").val()=="yes"&&Wf(u),$("#account_rows_container").find(":input").each(function(){$(this).val("")})}).fail(function(c){it.modal.notifyError(c.responseText)})})}Ge.create_accounts=Gf;function Wf(l){var u="data:text/csv;charset=utf-8,";u+=`Username, Password\r
+`)}return u}an.returnLinesWithoutBreakpoints=uf;function Lu(l){return l.session.getBreakpoints()}});var Oa=dt(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.localLoadOnce=vr.localLoad=vr.localDelete=vr.localSave=void 0;function cf(l,u){var c;(c=window.localStorage)===null||c===void 0||c.setItem(l,JSON.stringify(u))}vr.localSave=cf;function Mu(l){var u;(u=window.localStorage)===null||u===void 0||u.removeItem(l)}vr.localDelete=Mu;function Nu(l){var u,c=(u=window.localStorage)===null||u===void 0?void 0:u.getItem(l);try{return c?JSON.parse(c):void 0}catch(p){return}}vr.localLoad=Nu;function df(l){var u=Nu(l);return u!==void 0&&Mu(l),u}vr.localLoadOnce=df});var Tu=dt(($a,Ra)=>{(function(l,u){typeof $a=="object"&&typeof Ra!="undefined"?Ra.exports=u():typeof define=="function"&&define.amd?define(u):(l=l||self,l.DOMPurify=u())})($a,function(){"use strict";function l(P){if(Array.isArray(P)){for(var T=0,j=Array(P.length);T1?j-1:0),te=1;te/gm),At=D(/^data-[\-\w.\u00B7-\uFFFF]/),Ot=D(/^aria-[\-\w]+$/),et=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ot=D(/^(?:\w+script|data):/i),kt=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P};function Rt(P){if(Array.isArray(P)){for(var T=0,j=Array(P.length);T0&&arguments[0]!==void 0?arguments[0]:yt(),T=function(V){return ue(V)};if(T.version="2.3.5",T.removed=[],!P||!P.document||P.document.nodeType!==9)return T.isSupported=!1,T;var j=P.document,ee=P.document,te=P.DocumentFragment,Y=P.HTMLTemplateElement,le=P.Node,ye=P.Element,ge=P.NodeFilter,ve=P.NamedNodeMap,Je=ve===void 0?P.NamedNodeMap||P.MozNamedAttrMap:ve,Ke=P.HTMLFormElement,We=P.DOMParser,nt=P.trustedTypes,Gt=ye.prototype,kn=B(Gt,"cloneNode"),Et=B(Gt,"nextSibling"),Pn=B(Gt,"childNodes"),en=B(Gt,"parentNode");if(typeof Y=="function"){var Bt=ee.createElement("template");Bt.content&&Bt.content.ownerDocument&&(ee=Bt.content.ownerDocument)}var sn=g(nt,j),Ht=sn?sn.createHTML(""):"",Cn=ee,Xn=Cn.implementation,Kn=Cn.createNodeIterator,Xt=Cn.createDocumentFragment,yn=Cn.getElementsByTagName,ln=j.importNode,bn={};try{bn=De(ee).documentMode?ee.documentMode:{}}catch(Ae){}var un={};T.isSupported=typeof en=="function"&&Xn&&typeof Xn.createHTMLDocument!="undefined"&&bn!==9;var wn=Ce,Zn=we,lr=At,Ir=Ot,Yr=ot,rt=kt,Mt=et,qe=null,Mr=de({},[].concat(Rt(_e),Rt(w),Rt(fe),Rt(xe),Rt(be))),bt=null,Ar=de({},[].concat(Rt(Fe),Rt(se),Rt(ie),Rt(Re))),Ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),mn=null,rr=null,hn=!0,nn=!0,ur=!1,Dn=!1,_n=!1,jn=!1,cr=!1,En=!1,Ut=!1,Nt=!1,dr=!0,or=!0,Yn=!1,tn={},Vt=null,Jn=de({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ft=null,ir=de({},["audio","video","img","source","image","track"]),jt=null,xt=de({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sn="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml",Kt=Be,In=!1,Tt=void 0,Gn=["application/xhtml+xml","text/html"],pr="text/html",An=void 0,m=null,v=ee.createElement("form"),L=function(V){return V instanceof RegExp||V instanceof Function},R=function(V){m&&m===V||((!V||(typeof V=="undefined"?"undefined":tt(V))!=="object")&&(V={}),V=De(V),qe="ALLOWED_TAGS"in V?de({},V.ALLOWED_TAGS):Mr,bt="ALLOWED_ATTR"in V?de({},V.ALLOWED_ATTR):Ar,jt="ADD_URI_SAFE_ATTR"in V?de(De(xt),V.ADD_URI_SAFE_ATTR):xt,Ft="ADD_DATA_URI_TAGS"in V?de(De(ir),V.ADD_DATA_URI_TAGS):ir,Vt="FORBID_CONTENTS"in V?de({},V.FORBID_CONTENTS):Jn,mn="FORBID_TAGS"in V?de({},V.FORBID_TAGS):{},rr="FORBID_ATTR"in V?de({},V.FORBID_ATTR):{},tn="USE_PROFILES"in V?V.USE_PROFILES:!1,hn=V.ALLOW_ARIA_ATTR!==!1,nn=V.ALLOW_DATA_ATTR!==!1,ur=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Dn=V.SAFE_FOR_TEMPLATES||!1,_n=V.WHOLE_DOCUMENT||!1,En=V.RETURN_DOM||!1,Ut=V.RETURN_DOM_FRAGMENT||!1,Nt=V.RETURN_TRUSTED_TYPE||!1,cr=V.FORCE_BODY||!1,dr=V.SANITIZE_DOM!==!1,or=V.KEEP_CONTENT!==!1,Yn=V.IN_PLACE||!1,Mt=V.ALLOWED_URI_REGEXP||Mt,Kt=V.NAMESPACE||Be,V.CUSTOM_ELEMENT_HANDLING&&L(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&L(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Tt=Gn.indexOf(V.PARSER_MEDIA_TYPE)===-1?Tt=pr:Tt=V.PARSER_MEDIA_TYPE,An=Tt==="application/xhtml+xml"?function(Le){return Le}:C,Dn&&(nn=!1),Ut&&(En=!0),tn&&(qe=de({},[].concat(Rt(be))),bt=[],tn.html===!0&&(de(qe,_e),de(bt,Fe)),tn.svg===!0&&(de(qe,w),de(bt,se),de(bt,Re)),tn.svgFilters===!0&&(de(qe,fe),de(bt,se),de(bt,Re)),tn.mathMl===!0&&(de(qe,xe),de(bt,ie),de(bt,Re))),V.ADD_TAGS&&(qe===Mr&&(qe=De(qe)),de(qe,V.ADD_TAGS)),V.ADD_ATTR&&(bt===Ar&&(bt=De(bt)),de(bt,V.ADD_ATTR)),V.ADD_URI_SAFE_ATTR&&de(jt,V.ADD_URI_SAFE_ATTR),V.FORBID_CONTENTS&&(Vt===Jn&&(Vt=De(Vt)),de(Vt,V.FORBID_CONTENTS)),or&&(qe["#text"]=!0),_n&&de(qe,["html","head","body"]),qe.table&&(de(qe,["tbody"]),delete mn.tbody),k&&k(V),m=V)},G=de({},["mi","mo","mn","ms","mtext"]),J=de({},["foreignobject","desc","title","annotation-xml"]),Q=de({},w);de(Q,fe),de(Q,Se);var ce=de({},xe);de(ce,Oe);var me=function(V){var Le=en(V);(!Le||!Le.tagName)&&(Le={namespaceURI:Be,tagName:"template"});var Ie=C(V.tagName),He=C(Le.tagName);if(V.namespaceURI===ar)return Le.namespaceURI===Be?Ie==="svg":Le.namespaceURI===Sn?Ie==="svg"&&(He==="annotation-xml"||G[He]):Boolean(Q[Ie]);if(V.namespaceURI===Sn)return Le.namespaceURI===Be?Ie==="math":Le.namespaceURI===ar?Ie==="math"&&J[He]:Boolean(ce[Ie]);if(V.namespaceURI===Be){if(Le.namespaceURI===ar&&!J[He]||Le.namespaceURI===Sn&&!G[He])return!1;var gt=de({},["title","style","font","a","script"]);return!ce[Ie]&&(gt[Ie]||!Q[Ie])}return!1},Ee=function(V){A(T.removed,{element:V});try{V.parentNode.removeChild(V)}catch(Le){try{V.outerHTML=Ht}catch(Ie){V.remove()}}},Ye=function(V,Le){try{A(T.removed,{attribute:Le.getAttributeNode(V),from:Le})}catch(Ie){A(T.removed,{attribute:null,from:Le})}if(Le.removeAttribute(V),V==="is"&&!bt[V])if(En||Ut)try{Ee(Le)}catch(Ie){}else try{Le.setAttribute(V,"")}catch(Ie){}},Ze=function(V){var Le=void 0,Ie=void 0;if(cr)V=""+V;else{var He=z(V,/^[\r\n\t ]+/);Ie=He&&He[0]}Tt==="application/xhtml+xml"&&(V=''+V+"");var gt=sn?sn.createHTML(V):V;if(Kt===Be)try{Le=new We().parseFromString(gt,Tt)}catch(ft){}if(!Le||!Le.documentElement){Le=Xn.createDocument(Kt,"template",null);try{Le.documentElement.innerHTML=In?"":gt}catch(ft){}}var St=Le.body||Le.documentElement;return V&&Ie&&St.insertBefore(ee.createTextNode(Ie),St.childNodes[0]||null),Kt===Be?yn.call(Le,_n?"html":"body")[0]:_n?Le.documentElement:St},pt=function(V){return Kn.call(V.ownerDocument||V,V,ge.SHOW_ELEMENT|ge.SHOW_COMMENT|ge.SHOW_TEXT,null,!1)},Xe=function(V){return V instanceof Ke&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof Je)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function")},Qe=function(V){return(typeof le=="undefined"?"undefined":tt(le))==="object"?V instanceof le:V&&(typeof V=="undefined"?"undefined":tt(V))==="object"&&typeof V.nodeType=="number"&&typeof V.nodeName=="string"},je=function(V,Le,Ie){!un[V]||O(un[V],function(He){He.call(T,Le,Ie,m)})},Pt=function(V){var Le=void 0;if(je("beforeSanitizeElements",V,null),Xe(V)||z(V.nodeName,/[\u0080-\uFFFF]/))return Ee(V),!0;var Ie=An(V.nodeName);if(je("uponSanitizeElement",V,{tagName:Ie,allowedTags:qe}),!Qe(V.firstElementChild)&&(!Qe(V.content)||!Qe(V.content.firstElementChild))&&he(/<[/\w]/g,V.innerHTML)&&he(/<[/\w]/g,V.textContent)||Ie==="select"&&he(/=0;--ft)He.insertBefore(kn(gt[ft],!0),Et(V))}return!mn[Ie]&&wt(Ie)&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,Ie)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(Ie))?!1:(Ee(V),!0)}return V instanceof ye&&!me(V)||(Ie==="noscript"||Ie==="noembed")&&he(/<\/no(script|embed)/i,V.innerHTML)?(Ee(V),!0):(Dn&&V.nodeType===3&&(Le=V.textContent,Le=H(Le,wn," "),Le=H(Le,Zn," "),V.textContent!==Le&&(A(T.removed,{element:V.cloneNode()}),V.textContent=Le)),je("afterSanitizeElements",V,null),!1)},cn=function(V,Le,Ie){if(dr&&(Le==="id"||Le==="name")&&(Ie in ee||Ie in v))return!1;if(!(nn&&!rr[Le]&&he(lr,Le))){if(!(hn&&he(Ir,Le))){if(!bt[Le]||rr[Le]){if(!(wt(V)&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,V)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(V))&&(Ne.attributeNameCheck instanceof RegExp&&he(Ne.attributeNameCheck,Le)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(Le))||Le==="is"&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&he(Ne.tagNameCheck,Ie)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(Ie))))return!1}else if(!jt[Le]){if(!he(Mt,H(Ie,rt,""))){if(!((Le==="src"||Le==="xlink:href"||Le==="href")&&V!=="script"&&q(Ie,"data:")===0&&Ft[V])){if(!(ur&&!he(Yr,H(Ie,rt,"")))){if(Ie)return!1}}}}}}return!0},wt=function(V){return V.indexOf("-")>0},Yt=function(V){var Le=void 0,Ie=void 0,He=void 0,gt=void 0;je("beforeSanitizeAttributes",V,null);var St=V.attributes;if(!!St){var ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt};for(gt=St.length;gt--;){Le=St[gt];var fn=Le,ht=fn.name,hr=fn.namespaceURI;if(Ie=K(Le.value),He=An(ht),ft.attrName=He,ft.attrValue=Ie,ft.keepAttr=!0,ft.forceKeepAttr=void 0,je("uponSanitizeAttribute",V,ft),Ie=ft.attrValue,!ft.forceKeepAttr&&(Ye(ht,V),!!ft.keepAttr)){if(he(/\/>/i,Ie)){Ye(ht,V);continue}Dn&&(Ie=H(Ie,wn," "),Ie=H(Ie,Zn," "));var ut=An(V.nodeName);if(!!cn(ut,He,Ie))try{hr?V.setAttributeNS(hr,ht,Ie):V.setAttribute(ht,Ie),N(T.removed)}catch(qr){}}}je("afterSanitizeAttributes",V,null)}},xn=function Ae(V){var Le=void 0,Ie=pt(V);for(je("beforeSanitizeShadowDOM",V,null);Le=Ie.nextNode();)je("uponSanitizeShadowNode",Le,null),!Pt(Le)&&(Le.content instanceof te&&Ae(Le.content),Yt(Le));je("afterSanitizeShadowDOM",V,null)};return T.sanitize=function(Ae,V){var Le=void 0,Ie=void 0,He=void 0,gt=void 0,St=void 0;if(In=!Ae,In&&(Ae=""),typeof Ae!="string"&&!Qe(Ae)){if(typeof Ae.toString!="function")throw re("toString is not a function");if(Ae=Ae.toString(),typeof Ae!="string")throw re("dirty is not a string, aborting")}if(!T.isSupported){if(tt(P.toStaticHTML)==="object"||typeof P.toStaticHTML=="function"){if(typeof Ae=="string")return P.toStaticHTML(Ae);if(Qe(Ae))return P.toStaticHTML(Ae.outerHTML)}return Ae}if(jn||R(V),T.removed=[],typeof Ae=="string"&&(Yn=!1),Yn){if(Ae.nodeName){var ft=An(Ae.nodeName);if(!qe[ft]||mn[ft])throw re("root node is forbidden and cannot be sanitized in-place")}}else if(Ae instanceof le)Le=Ze(""),Ie=Le.ownerDocument.importNode(Ae,!0),Ie.nodeType===1&&Ie.nodeName==="BODY"||Ie.nodeName==="HTML"?Le=Ie:Le.appendChild(Ie);else{if(!En&&!Dn&&!_n&&Ae.indexOf("<")===-1)return sn&&Nt?sn.createHTML(Ae):Ae;if(Le=Ze(Ae),!Le)return En?null:Nt?Ht:""}Le&&cr&&Ee(Le.firstChild);for(var fn=pt(Yn?Ae:Le);He=fn.nextNode();)He.nodeType===3&&He===gt||Pt(He)||(He.content instanceof te&&xn(He.content),Yt(He),gt=He);if(gt=null,Yn)return Ae;if(En){if(Ut)for(St=Xt.call(Le.ownerDocument);Le.firstChild;)St.appendChild(Le.firstChild);else St=Le;return bt.shadowroot&&(St=ln.call(j,St,!0)),St}var ht=_n?Le.outerHTML:Le.innerHTML;return Dn&&(ht=H(ht,wn," "),ht=H(ht,Zn," ")),sn&&Nt?sn.createHTML(ht):ht},T.setConfig=function(Ae){R(Ae),jn=!0},T.clearConfig=function(){m=null,jn=!1},T.isValidAttribute=function(Ae,V,Le){m||R({});var Ie=An(Ae),He=An(V);return cn(Ie,He,Le)},T.addHook=function(Ae,V){typeof V=="function"&&(un[Ae]=un[Ae]||[],A(un[Ae],V))},T.removeHook=function(Ae){un[Ae]&&N(un[Ae])},T.removeHooks=function(Ae){un[Ae]&&(un[Ae]=[])},T.removeAllHooks=function(){un={}},T}var Z=ue();return Z})});var Pu=dt(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.Markers=void 0;var pf=function(){function l(u){this.editor=u,this.markerClasses=new Map,this.strikeMarkers=new Map}return l.prototype.highlightAceError=function(u,c){if(c===void 0){this.addMarker(new ace.Range(u-1,1,u-1,2),"editor-error","fullLine");return}var p=this.editor.session.getLine(u-1).slice(c-1).split(/(\s+)/)[0].length;this.addMarker(new ace.Range(u-1,c-1,u-1,c-1+p),"editor-error","text")},l.prototype.clearErrors=function(){for(var u=0,c=this.findMarkers("editor-error");u{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.HedyAceEditor=fo.HedyAceEditorCreator=void 0;var Rn=tr(),Cu=Lr(),Du=Ei(),hf=Pu(),_f=1,ff=function(){function l(){}return l.prototype.initializeMainEditor=function(u){var c=this.turnIntoEditor(u.get(0),u.data("readonly"),!0);c.configureMainEditor(),Cu.error.setEditor(c),window.Range=ace.require("ace/range").Range;var p;return window.addEventListener("keydown",function(f){var h=f.keyCode;if(h===18){p=!0;return}if(h===13&&p){if(!Rn.theLevel||!Rn.theLanguage)throw new Error("Oh no");(0,Rn.runit)(Rn.theLevel,Rn.theLanguage,"",function(){$("#output").focus()})}h===37&&document.activeElement===document.getElementById("output")&&(c.focus(),c.moveCursorToEndOfFile())}),window.addEventListener("keyup",function(f){(0,Rn.triggerAutomaticSave)();var h=f.keyCode;if(h===18){p=!1;return}}),c},l.prototype.turnIntoEditor=function(u,c,p){p===void 0&&(p=!1);var f=new Eu,h=ace.edit(u);return h.setTheme("ace/theme/monokai"),c&&(h.setValue(h.getValue().trimRight(),-1),h.renderer.$cursorLayer.element.style.display="none",h.setOptions({readOnly:!0,showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1}),h.renderer.setScrollMargin(3,3,10,20),p&&h.setOptions({showGutter:!0})),f.editor=h,Rn.theLevel&&f.setHighliterForLevel(Rn.theLevel),f},l.prototype.initializeModalEditor=function(u){var c=this.turnIntoEditor(u.get(0),!0);Cu.error.setEditor(c),window.Range=ace.require("ace/range").Range;var p;return window.addEventListener("keydown",function(f){var h=f.keyCode;if(h===18){p=!0;return}h===13&&p&&(0,Rn.runit)(Rn.theLevel,Rn.theLanguage,"",function(){$("#output").focus()}),h===37&&document.activeElement===document.getElementById("output")&&(c.focus(),c.moveCursorToEndOfFile())}),window.addEventListener("keyup",function(f){var h=f.keyCode;if(h===18){p=!1;return}}),c},l.prototype.initializeExampleEditor=function(u){var c=$("body").attr("dir"),p=this.turnIntoEditor(u,!0);return p.setOptions({maxLines:1/0}),$(u).hasClass("common-mistakes")?p.setOptions({showGutter:!0,showPrintMargin:!0,highlightActiveLine:!0,minLines:5}):$(u).hasClass("cheatsheet")?p.setOptions({minLines:1}):$(u).hasClass("parsons")?p.setOptions({minLines:1,showGutter:!1,showPrintMargin:!1,highlightActiveLine:!1}):p.setOptions({minLines:2}),c==="rtl"&&p.setOptions({rtl:!0}),p},l}();fo.HedyAceEditorCreator=ff;var Eu=function(){function l(){this.askPromptOpen=!1}return l.prototype.setHighliterForLevel=function(u){var c,p=this.getHighlighter(u);(c=this._editor)===null||c===void 0||c.session.setMode(p)},l.prototype.getValue=function(){return this._editor.getValue()},l.prototype.isReadOnly=function(){return this._editor.getReadOnly()},l.prototype.setValue=function(u){var c;(c=this._editor)===null||c===void 0||c.setValue(u,_f)},l.prototype.trimTrailingSpace=function(){try{var u=ace.require("ace/ext/whitespace");u.trimTrailingSpace(this._editor.session,!0)}catch(c){console.error(c)}},l.prototype.resize=function(){var u;(u=this._editor)===null||u===void 0||u.resize()},l.prototype.focus=function(){var u;(u=this._editor)===null||u===void 0||u.focus()},l.prototype.clearErrors=function(){var u,c;(u=this._editor)===null||u===void 0||u.session.clearAnnotations(),(c=this.markers)===null||c===void 0||c.clearErrors()},l.prototype.moveCursorToEndOfFile=function(){var u;(u=this._editor)===null||u===void 0||u.navigateFileEnd()},l.prototype.clearSelection=function(){var u;(u=this._editor)===null||u===void 0||u.clearSelection()},l.prototype.clearBreakpoints=function(){var u;(u=this._editor)===null||u===void 0||u.session.clearBreakpoints()},l.prototype.configureMainEditor=function(){var u=this,c,p,f,h,k;(c=this._editor)===null||c===void 0||c.setShowPrintMargin(!1),(p=this._editor)===null||p===void 0||p.renderer.setScrollMargin(0,0,0,20),(f=this._editor)===null||f===void 0||f.addEventListener("change",function(){Rn.theLocalSaveWarning.setProgramLength(u._editor.getValue().split(`
+`).length)});var D=$("body").attr("dir");D==="rtl"&&((h=this._editor)===null||h===void 0||h.setOptions({rtl:!0})),(k=this._editor)===null||k===void 0||k.on("change",function(){var I;u.askPromptOpen&&((0,Rn.stopit)(),(I=u._editor)===null||I===void 0||I.focus()),$("#ask-modal").is(":visible")&&$("#inline-modal").hide(),u.askPromptOpen=!1,$("#runit").css("background-color",""),u.clearErrors(),(0,Du.stopDebug)()}),this._markers=new hf.Markers(this._editor),(0,Du.initializeDebugger)({editor:this._editor,markers:this.markers,level:Rn.theLevel,language:Rn.theLanguage})},Object.defineProperty(l.prototype,"editor",{get:function(){return this._editor},set:function(u){this._editor=u},enumerable:!1,configurable:!0}),l.prototype.getBreakpoints=function(){var u;return(u=this._editor)===null||u===void 0?void 0:u.session.getBreakpoints()},l.prototype.setEditorMode=function(u){var c;(c=this._editor)===null||c===void 0||c.setReadOnly(u)},l.prototype.getHighlighter=function(u){return"ace/mode/level"+u},l.prototype.setOptions=function(u){var c;(c=this._editor)===null||c===void 0||c.setOptions(u)},Object.defineProperty(l.prototype,"markers",{get:function(){return this._markers},enumerable:!1,configurable:!0}),l}();fo.HedyAceEditor=Eu});var Ai=dt(Ge=>{"use strict";var gf=Ge&&Ge.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.initializeClassOverviewPage=Ge.initializeCustomizeClassPage=Ge.initializeTeacherPage=Ge.copy_join_link=Ge.create_accounts=Ge.append_classname=Ge.generate_passwords=Ge.add_account_placeholder=Ge.setDateLevelInputColor=Ge.enable_level=Ge.restore_customization_to_default=Ge.save_customizations=Ge.show_doc_section=Ge.change_password_student=Ge.delete_adventure=Ge.preview_adventure=Ge.update_adventure=Ge.create_adventure=Ge.remove_student=Ge.remove_student_invite=Ge.invite_student=Ge.join_class=Ge.delete_class=Ge.duplicate_class=Ge.rename_class=Ge.create_class=void 0;var it=Lr(),Gr=tr(),Wo=Ni(),Wr=io(),Su=gf(Tu()),mf=Go(),xf=Ba(),vf=new xf.HedyAceEditorCreator;function kf(l){it.modal.prompt(l,"",function(u){$.ajax({type:"POST",url:"/class",data:JSON.stringify({name:u}),contentType:"application/json",dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!1,"/for-teachers/customize-class/"+c.id):window.location.pathname="/for-teachers/customize-class/"+c.id}).fail(function(c){return it.modal.notifyError(c.responseText)})})}Ge.create_class=kf;function yf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"PUT",url:"/class/"+l,data:JSON.stringify({name:c}),contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.rename_class=yf;function bf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"POST",url:"/duplicate_class",data:JSON.stringify({id:l,name:c}),contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.duplicate_class=bf;function wf(l,u){it.modal.confirm(u,function(){$.ajax({type:"DELETE",url:"/class/"+l,contentType:"application/json",dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!0,""):location.reload()}).fail(function(c){it.modal.notifyError(c.responseText)})})}Ge.delete_class=wf;function Lf(l,u){$.ajax({type:"POST",url:"/class/join",contentType:"application/json",data:JSON.stringify({id:l,name:u}),dataType:"json"}).done(function(c){c.achievement?(0,Gr.showAchievements)(c.achievement,!1,"/programs"):window.location.pathname="/programs"}).fail(function(c){if(c.status==403)return it.modal.confirm(c.responseText,function(){localStorage.setItem("hedy-join",JSON.stringify({id:l,name:u})),window.location.pathname="/login"});it.modal.notifyError(Wr.ClientMessages.Connection_error)})}Ge.join_class=Lf;function Mf(l,u){it.modal.prompt(u,"",function(c){$.ajax({type:"POST",url:"/invite_student",data:JSON.stringify({username:c,class_id:l}),contentType:"application/json",dataType:"json"}).done(function(){location.reload()}).fail(function(p){it.modal.notifyError(p.responseText)})})}Ge.invite_student=Mf;function Nf(l,u,c){return it.modal.confirm(c,function(){$.ajax({type:"POST",url:"/remove_student_invite",data:JSON.stringify({username:l,class_id:u}),contentType:"application/json",dataType:"json"}).done(function(){location.reload()}).fail(function(p){return it.modal.notifyError(p.responseText)})})}Ge.remove_student_invite=Nf;function Tf(l,u,c){it.modal.confirm(c,function(){$.ajax({type:"DELETE",url:"/class/"+l+"/student/"+u,contentType:"application/json",dataType:"json"}).done(function(p){p.achievement?(0,Gr.showAchievements)(p.achievement,!0,""):location.reload()}).fail(function(p){it.modal.notifyError(p.responseText)})})}Ge.remove_student=Tf;function Pf(l){it.modal.prompt(l,"",function(u){$.ajax({type:"POST",url:"/for-teachers/create_adventure",data:JSON.stringify({name:u}),contentType:"application/json",dataType:"json"}).done(function(c){window.location.pathname="/for-teachers/customize-adventure/"+c.id}).fail(function(c){return it.modal.notifyError(c.responseText)})})}Ge.create_adventure=Pf;function Iu(l){var u=$("#custom_adventure_name").val(),c=$("#custom_adventure_level").val(),p=Su.default.sanitize($("#custom_adventure_content").val()),f=$("#agree_public").prop("checked");$.ajax({type:"POST",url:"/for-teachers/customize-adventure",data:JSON.stringify({id:l,name:u,level:c,content:p,public:f}),contentType:"application/json",dataType:"json"}).done(function(h){it.modal.notifySuccess(h.success)}).fail(function(h){it.modal.notifyError(h.responseText)})}function Cf(l,u,c){u?Iu(l):it.modal.confirm(c,function(){Iu(l)})}Ge.update_adventure=Cf;function Df(l){var u=$("#custom_adventure_name").val();if(typeof u!="string")throw new Error("Expected name to be string, got '"+u+"'");var c=$("#custom_adventure_level").val();if(typeof c!="string")throw new Error("Expected level to be string, got '"+u+"'");var p=$("");p.addClass("preview border border-black px-8 py-4 text-left rounded-lg bg-gray-200 text-black"),p.css("white-space","pre-wrap"),p.css("width","40em"),p.html(l),it.modal.preview(p,u);for(var f=0,h=$(".preview pre").get();f
p?$("#opening_date_level_"+l).removeClass("bg-gray-200").addClass("bg-green-300"):$("#opening_date_level_"+l).removeClass("bg-green-300").addClass("bg-gray-200"),$("#level-"+l).is(":visible")&&Ii(l)}Ge.setDateLevelInputColor=Au;function Rf(){var l=$("#account_row_unique").clone();l.removeClass("hidden"),l.attr("id",""),l.find(":input").each(function(){$(this).prop("id")!="classes"&&$(this).prop("required",!0)});for(var u=0;u<5;u++)l.clone().appendTo("#account_rows_container")}Ge.add_account_placeholder=Rf;function Bf(){if(!$("#passwords_toggle").is(":checked")){$(".passwords_input").val(""),$(".passwords_input").prop("disabled",!1);return}$(".account_row").each(function(){$(this).is(":visible")&&$(this).find(":input").each(function(){if($(this).attr("id")=="password"){var l=Hf(6);$(this).val(l)}})}),$(".passwords_input").prop("disabled",!0)}Ge.generate_passwords=Bf;function Ff(){var l=$("#classes").val();$(".usernames_input").each(function(){$(this).val($(this).val()+"_"+l)})}Ge.append_classname=Ff;function jf(l){it.modal.confirm(l,function(){$("#account_rows_container").find(":input").each(function(){$(this).removeClass("border-2 border-red-500"),$(this).removeAttr("required")});var u=[];$(".account_row").each(function(){if($(this).is(":visible")){var c={};$(this).find(":input").each(function(){c[$(this).attr("name")]=$(this).val()}),u.push(c)}}),$.ajax({type:"POST",url:"/for-teachers/create-accounts",data:JSON.stringify({accounts:u}),contentType:"application/json",dataType:"json"}).done(function(c){if(c.error){it.modal.notifyError(c.error),$("#account_rows_container").find(":input").each(function(){$(this).val()==c.value&&$(this).addClass("border-2 border-red-500")});return}else it.modal.notifySuccess(c.success),$("input[name='download_credentials_checkbox']:checked").val()=="yes"&&Gf(u),$("#account_rows_container").find(":input").each(function(){$(this).val("")})}).fail(function(c){it.modal.notifyError(c.responseText)})})}Ge.create_accounts=jf;function Gf(l){var u="data:text/csv;charset=utf-8,";u+=`Username, Password\r
`,l.forEach(function(f){var h=f.username+","+f.password;u+=h+`\r
-`});var c=encodeURI(u),p=document.createElement("a");p.setAttribute("href",c),p.setAttribute("download","accounts.csv"),document.body.appendChild(p),p.click()}function Hf(l,u){var c=document.createElement("textarea");document.body.appendChild(c),c.value=l,c.select(),document.execCommand("copy"),document.body.removeChild(c),it.modal.notifySuccess(u)}Ge.copy_join_link=Hf;function Uf(l){for(var u="",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",p=0;pp?($("#opening_date").text(u),$("#state-future").removeClass("hidden")):$("#state-accessible").removeClass("hidden")}}function Yf(l){$(document).ready(function(){$("input").on("change",function(){(0,Wo.markUnsavedChanges)()}),$("#back_to_class").on("click",function(){function u(){window.location.href="/for-teachers/class/"+l.class_id}(0,Wo.hasUnsavedChanges)()?it.modal.confirm(Wr.ClientMessages.unsaved_class_changes,function(){(0,Wo.clearUnsavedChanges)(),u()}):u()}),$("[id^=opening_date_level_]").each(function(){zu($(this).attr("level"))}),$("#levels-dropdown").on("change",function(){var u=$(this).val();Ii(u)})})}Ge.initializeCustomizeClassPage=Yf;function qf(l){$(".attribute").change(function(){var u=$(this).attr("id");this.checked?($("#"+u+"_header").show(),$("."+u+"_cell").show()):($("#"+u+"_header").hide(),$("."+u+"_cell").hide())})}Ge.initializeClassOverviewPage=qf});var ja=dt(nr=>{"use strict";var Hr=nr&&nr.__assign||function(){return Hr=Object.assign||function(l){for(var u,c=1,p=arguments.length;c0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]500&&(f="the server responded with an error ("+c.status+" "+c.statusText+")")}throw Object.assign(new Error(f),{responseText:f,status:c.status});case 5:return[2,c.json()]}})})}function Qf(l,u){return new Promise(function(c,p){$.ajax(Hr({type:"POST",url:l,contentType:"application/json; charset=utf-8"},u?{data:JSON.stringify(u)}:{})).done(function(){c()}).fail(function(f){p(Ou(f))})})}nr.postNoResponse=Qf;function Ou(l){var u=new Error(l.responseText);return Object.assign(u,{responseText:l.responseText,status:l.status,internetError:l.readyState<4})}});var zi=dt(zt=>{"use strict";var dn=zt&&zt.__awaiter||function(l,u,c,p){function f(h){return h instanceof c?h:new c(function(k){k(h)})}return new(c||(c=Promise))(function(h,k){function D(S){try{y(p.next(S))}catch(M){k(M)}}function I(S){try{y(p.throw(S))}catch(M){k(M)}}function y(S){S.done?h(S.value):f(S.value).then(D,I)}y((p=p.apply(l,u||[])).next())})},pn=zt&&zt.__generator||function(l,u){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},p,f,h,k;return k={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function D(y){return function(S){return I([y,S])}}function I(y){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,f&&(h=y[0]&2?f.return:y[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,y[1])).done)return h;switch(f=0,h&&(y=[y[0]&2,h.value]),y[0]){case 0:case 1:h=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,f=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.LocalSaveWarning=void 0;var pg=10,hg=20,_g=10,fg=function(){function l(){this.runCounter=0,this.loggedIn=!1,this.programLength=0,this.reset()}return l.prototype.setLoggedIn=function(){this.loggedIn=!0},l.prototype.clickRun=function(){this.runCounter+=1,this.runCounter>=pg&&this.display(!0)},l.prototype.setProgramLength=function(u){this.programLength=u},l.prototype.switchTab=function(){var u=this;this.reset();var c=Date.now();this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){u.programLength>=hg&&u.display(!0),Date.now()-c>=_g*6e4&&u.display(!0)},6e4)},l.prototype.reset=function(){this.runCounter=0,this.programLength=0,this.display(!1)},l.prototype.display=function(u){this.loggedIn||$("#not-logged-in-warning").toggle(u)},l}();Oi.LocalSaveWarning=fg});var tr=dt(ae=>{"use strict";var Jt=ae&&ae.__awaiter||function(l,u,c,p){function f(h){return h instanceof c?h:new c(function(k){k(h)})}return new(c||(c=Promise))(function(h,k){function D(S){try{y(p.next(S))}catch(M){k(M)}}function I(S){try{y(p.throw(S))}catch(M){k(M)}}function y(S){S.done?h(S.value):f(S.value).then(D,I)}y((p=p.apply(l,u||[])).next())})},Qt=ae&&ae.__generator||function(l,u){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},p,f,h,k;return k={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function D(y){return function(S){return I([y,S])}}function I(y){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,f&&(h=y[0]&2?f.return:y[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,y[1])).done)return h;switch(f=0,h&&(y=[y[0]&2,h.value]),y[0]){case 0:case 1:h=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,f=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]p?($("#opening_date").text(u),$("#state-future").removeClass("hidden")):$("#state-accessible").removeClass("hidden")}}function Vf(l){$(document).ready(function(){$("input").on("change",function(){(0,Wo.markUnsavedChanges)()}),$("#back_to_class").on("click",function(){function u(){window.location.href="/for-teachers/class/"+l.class_id}(0,Wo.hasUnsavedChanges)()?it.modal.confirm(Wr.ClientMessages.unsaved_class_changes,function(){(0,Wo.clearUnsavedChanges)(),u()}):u()}),$("[id^=opening_date_level_]").each(function(){Au($(this).attr("level"))}),$("#levels-dropdown").on("change",function(){var u=$(this).val();Ii(u)})})}Ge.initializeCustomizeClassPage=Vf;function Yf(l){$(".attribute").change(function(){var u=$(this).attr("id");this.checked?($("#"+u+"_header").show(),$("."+u+"_cell").show()):($("#"+u+"_header").hide(),$("."+u+"_cell").hide())})}Ge.initializeClassOverviewPage=Yf});var Fa=dt(nr=>{"use strict";var Hr=nr&&nr.__assign||function(){return Hr=Object.assign||function(l){for(var u,c=1,p=arguments.length;c0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]500&&(f="the server responded with an error ("+c.status+" "+c.statusText+")")}throw Object.assign(new Error(f),{responseText:f,status:c.status});case 5:return[2,c.json()]}})})}function Jf(l,u){return new Promise(function(c,p){$.ajax(Hr({type:"POST",url:l,contentType:"application/json; charset=utf-8"},u?{data:JSON.stringify(u)}:{})).done(function(){c()}).fail(function(f){p(zu(f))})})}nr.postNoResponse=Jf;function zu(l){var u=new Error(l.responseText);return Object.assign(u,{responseText:l.responseText,status:l.status,internetError:l.readyState<4})}});var zi=dt(zt=>{"use strict";var dn=zt&&zt.__awaiter||function(l,u,c,p){function f(h){return h instanceof c?h:new c(function(k){k(h)})}return new(c||(c=Promise))(function(h,k){function D(S){try{y(p.next(S))}catch(M){k(M)}}function I(S){try{y(p.throw(S))}catch(M){k(M)}}function y(S){S.done?h(S.value):f(S.value).then(D,I)}y((p=p.apply(l,u||[])).next())})},pn=zt&&zt.__generator||function(l,u){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},p,f,h,k;return k={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function D(y){return function(S){return I([y,S])}}function I(y){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,f&&(h=y[0]&2?f.return:y[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,y[1])).done)return h;switch(f=0,h&&(y=[y[0]&2,h.value]),y[0]){case 0:case 1:h=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,f=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.LocalSaveWarning=void 0;var dg=10,pg=20,hg=10,_g=function(){function l(){this.runCounter=0,this.loggedIn=!1,this.programLength=0,this.reset()}return l.prototype.setLoggedIn=function(){this.loggedIn=!0},l.prototype.clickRun=function(){this.runCounter+=1,this.runCounter>=dg&&this.display(!0)},l.prototype.setProgramLength=function(u){this.programLength=u},l.prototype.switchTab=function(){var u=this;this.reset();var c=Date.now();this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){u.programLength>=pg&&u.display(!0),Date.now()-c>=hg*6e4&&u.display(!0)},6e4)},l.prototype.reset=function(){this.runCounter=0,this.programLength=0,this.display(!1)},l.prototype.display=function(u){this.loggedIn||$("#not-logged-in-warning").toggle(u)},l}();Oi.LocalSaveWarning=_g});var tr=dt(ae=>{"use strict";var Jt=ae&&ae.__awaiter||function(l,u,c,p){function f(h){return h instanceof c?h:new c(function(k){k(h)})}return new(c||(c=Promise))(function(h,k){function D(S){try{y(p.next(S))}catch(M){k(M)}}function I(S){try{y(p.throw(S))}catch(M){k(M)}}function y(S){S.done?h(S.value):f(S.value).then(D,I)}y((p=p.apply(l,u||[])).next())})},Qt=ae&&ae.__generator||function(l,u){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},p,f,h,k;return k={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function D(y){return function(S){return I([y,S])}}function I(y){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,f&&(h=y[0]&2?f.return:y[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,y[1])).done)return h;switch(f=0,h&&(y=[y[0]&2,h.value]),y[0]){case 0:case 1:h=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,f=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(y[0]===6||y[0]===2)){c=0;continue}if(y[0]===3&&(!h||y[1]>h[0]&&y[1]
@@ -384,18 +384,18 @@ pygame.quit()
<\/script>