var Godot=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var k=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,l=ba&&self.name?.startsWith("em-pthread"),ca="./this.program";ba&&(_scriptName=self.location.href);var da="",fa,ha;
if(aa||ba){try{da=(new URL(".",_scriptName)).href}catch{}ba&&(ha=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});fa=async a=>{a=await fetch(a,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url);}}var ia=console.log.bind(console),ja=console.error.bind(console),ka,la,ma=!1,na;function n(){oa.buffer!=p.buffer&&pa()}var qa,ra,sa;
if(l){var ta=!1;self.onunhandledrejection=b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.Fg;if("load"===d){let e=[];self.onmessage=f=>e.push(f);sa=()=>{postMessage({Fg:"loaded"});for(let f of e)a(f);self.onmessage=a};for(const f of c.Mi)if(!k[f]||k[f].proxy)k[f]=(...g)=>{postMessage({Fg:"callHandler",Li:f,li:g})},"print"==f&&(ia=k[f]),"printErr"==f&&(ja=k[f]);oa=c.qj;pa();la=c.rj;ua();va()}else if("run"===d){wa(c.Cg);xa(c.Cg,0,0,1,0,0);ya();za(c.Cg);ta||=!0;try{Aa(c.kj,c.jh)}catch(e){if("unwind"!=
e)throw e;}}else"setimmediate"!==c.target&&("checkMailbox"===d?ta&&Ba():d&&(ja(`worker: received unknown command ${d}`),ja(c)))}catch(e){throw Ca(),e;}}self.onmessage=a}var p,r,Da,Ea,u,v,w,Fa,z,Ga=!1,Ha=!1;
function pa(){var a=oa.buffer;k.HEAP8=p=new Int8Array(a);k.HEAP16=Da=new Int16Array(a);k.HEAPU8=r=new Uint8Array(a);k.HEAPU16=Ea=new Uint16Array(a);k.HEAP32=u=new Int32Array(a);k.HEAPU32=v=new Uint32Array(a);k.HEAPF32=w=new Float32Array(a);k.HEAPF64=Fa=new Float64Array(a);k.HEAP64=z=new BigInt64Array(a);k.HEAPU64=new BigUint64Array(a)}
function Ia(){Ga=!0;if(l)sa();else{if(!k.noFSInit&&!Ja){var a,b,c;Ja=!0;a??=k.stdin;b??=k.stdout;c??=k.stderr;a?Ka("stdin",a):La("/dev/tty","/dev/stdin");b?Ka("stdout",null,b):La("/dev/tty","/dev/stdout");c?Ka("stderr",null,c):La("/dev/tty1","/dev/stderr");Ma("/dev/stdin",0);Ma("/dev/stdout",1);Ma("/dev/stderr",1)}Na.If();Oa=!1}}function Qa(a){k.onAbort?.(a);a="Aborted("+a+")";ja(a);ma=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ra?.(a);throw a;}var Ra;
async function Sa(a){if(!ka)try{var b=await fa(a);return new Uint8Array(b)}catch{}if(a==Ra&&ka)a=new Uint8Array(ka);else if(ha)a=ha(a);else throw"both async and sync fetching of the wasm failed";return a}async function Ta(a,b){try{var c=await Sa(a);return await WebAssembly.instantiate(c,b)}catch(d){ja(`failed to asynchronously prepare wasm: ${d}`),Qa(d)}}
async function Ua(a){var b=Ra;if(!ka)try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){ja(`wasm streaming compile failed: ${d}`),ja("falling back to ArrayBuffer instantiation")}return Ta(b,a)}
function Va(){Wa={rd:Xa,ud:Ya,Td:Za,C:$a,Vd:ab,Pd:bb,c:cb,Od:db,Jd:eb,Id:fb,qd:gb,m:hb,Ld:ib,Bd:jb,Ad:kb,Kd:lb,A:mb,pd:nb,od:ob,u:pb,Md:qb,nd:tb,ld:ub,v:vb,Wd:wb,Fd:xb,id:yb,he:zb,vd:Ab,td:Bb,w:Cb,Ed:za,Rd:Db,yd:Eb,zd:Fb,wd:Gb,xd:Hb,gd:Ib,Xd:Jb,Sd:Kb,pf:Lb,y:Mb,B:Nb,je:Ob,Qd:Pb,qf:Qb,jd:Rb,b:Sb,Nb:Tb,Mb:Ub,Y:Vb,Lb:Wb,V:Xb,W:Yb,Kb:Zb,Jb:$b,Ib:ac,$:bc,Hb:dc,Gb:ec,Fb:fc,Eb:gc,ca:hc,Db:ic,Cb:jc,Bb:kc,Ab:lc,P:mc,zb:nc,yb:oc,xb:pc,wb:qc,vb:rc,ub:sc,ha:tc,ga:uc,O:vc,tb:wc,sb:xc,rb:yc,qb:zc,pb:Ac,ob:Bc,ea:Cc,
nb:Dc,mb:Ec,I:Fc,lb:Gc,_:Hc,kb:Ic,jb:Jc,ib:Kc,hb:Lc,gb:Mc,L:Nc,da:Oc,fb:Pc,K:Qc,eb:Rc,db:Sc,X:Tc,J:Wc,cb:Xc,bb:Yc,ab:Zc,aa:$c,$a:ad,_a:bd,Ya:cd,fa:dd,Xa:ed,Wa:fd,Z:gd,Za:hd,Va:jd,H:kd,Ua:ld,Sa:md,Ta:nd,Qa:od,Ra:pd,Pa:qd,G:rd,N:sd,Oa:td,Ma:ud,La:vd,ka:wd,Ka:xd,Ja:yd,ba:zd,Ia:Ad,Ha:Bd,Ga:Cd,Fa:Dd,Ea:Ed,Da:Fd,ja:Gd,Ca:Hd,Ba:Id,E:Jd,ia:Kd,U:Ld,Aa:Md,za:Nd,ya:Od,R:Pd,Q:Qd,xa:Rd,wa:Sd,va:Td,ua:Ud,ta:Vd,ra:Wd,M:Xd,qa:Yd,pa:Zd,oa:$d,na:ae,F:be,S:ce,T:de,ma:ee,la:fe,kd:ge,hd:he,fd:ie,n:je,ie:ke,nc:le,Ob:me,
Qb:ne,Dc:oe,le:pe,Pb:qe,Gd:re,Hd:se,f:te,e:ue,z:ve,D:we,Cd:xe,l:ye,bf:ze,Yd:Ae,$d:Be,Gf:Ce,bd:De,Vc:Ee,Hf:Fe,g:Ge,ke:He,ge:Ie,re:Je,Be:Ke,be:Le,ee:Me,ce:Ne,de:Oe,nf:Pe,Bc:Qe,fe:Re,vf:Se,Ke:Te,hc:Ue,Ff:Ve,Lc:We,qc:Xe,Ue:Ye,Ud:Ze,Nd:$e,_d:af,Zd:bf,Na:cf,sa:df,ae:ef,Ic:ff,cf:gf,mf:hf,Tc:jf,Uc:kf,Jc:lf,Kc:mf,Xc:nf,Wc:of,j:pf,t:qf,Yc:rf,k:sf,gc:tf,sc:uf,fc:vf,ec:wf,Ec:xf,Gc:yf,pc:zf,jc:Af,kc:Bf,lc:Cf,Hc:Df,md:Ef,Sc:Ff,mc:Gf,q:Hf,oc:If,Qc:Jf,Rc:Kf,rc:Lf,r:Mf,p:Nf,ic:Of,of:Pf,uf:Qf,cc:Rf,o:Sf,$b:Tf,bc:Uf,
ac:Vf,Ef:Wf,i:Xf,vc:Yf,uc:Zf,dc:$f,Nc:ag,Mc:bg,xc:cg,Cc:dg,Ac:eg,zc:fg,wc:gg,yc:hg,ef:ig,s:jg,Zb:kg,kf:lg,Yb:mg,$e:ng,lf:og,gf:pg,jf:qg,Fc:rg,ff:sg,hf:tg,af:ug,df:vg,Xb:wg,Re:xg,Oe:yg,Se:zg,Xe:Ag,Te:Bg,Ye:Cg,Qe:Dg,We:Eg,Ve:Fg,Pe:Gg,_e:Hg,Ze:Ig,Wb:Jg,Ie:Kg,He:Lg,Vb:Mg,Je:Ng,Me:Og,Ne:Pg,Le:Qg,Pc:Rg,tc:Sg,Oc:Tg,cd:Ug,dd:Vg,ed:Wg,$c:Xg,_c:Yg,ad:Zg,Zc:$g,x:ah,Dd:bh,Ee:ch,De:dh,Ge:eh,Ub:fh,Fe:gh,yf:hh,wf:ih,xf:jh,Af:kh,Cf:lh,_b:mh,tf:nh,Df:oh,zf:ph,Bf:qh,sf:rh,rf:sh,Rb:th,d:uh,h:vh,ze:wh,pe:xh,oe:yh,ye:zh,
qe:Ah,se:Bh,we:Ch,Sb:Dh,ne:Eh,Tb:Fh,Ae:Gh,ue:Hh,Ce:Ih,ve:Jh,te:Kh,me:Lh,xe:Mh,a:oa,sd:Nh};return{a:Wa}}
async function ua(){function a(d,e){Na=d.exports;Oh.push(Na.Qf);d=Na;B=k._free=d.Jf;k.__Z14godot_web_mainiPPc=d.Kf;Ph=k._main=d.Lf;Qh=k._malloc=d.Mf;Rh=d.Nf;k.__emwebxr_on_input_event=d.Of;k.__emwebxr_on_simple_event=d.Pf;Sh=d.Rf;Th=d.Sf;Uh=d.Tf;Vh=d.Vf;xa=d.Wf;Ca=k.__emscripten_thread_crashed=d.Xf;Wh=d.Yf;Xh=d.Zf;Yh=d._f;Zh=d.$f;$h=d.ag;ai=d.bg;bi=d.cg;ci=d.dg;di=d.eg;ei=d.Uf;la=e;return Na}var b=Va();if(k.instantiateWasm)return new Promise(d=>{k.instantiateWasm(b,(e,f)=>{d(a(e,f))})});if(l){var c=
new WebAssembly.Instance(la,Va());return a(c,la)}Ra??=k.locateFile?k.locateFile("godot.web.editor.wasm32.wasm",da):da+"godot.web.editor.wasm32.wasm";return function(d){return a(d.instance,d.module)}(await Ua(b))}class fi{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
var gi=a=>{a.terminate();a.onmessage=()=>{}},hi=a=>{for(;0<a.length;)a.shift()(k)},ii=[],ji=0,ki=null,qi=a=>{0==li.length&&(mi(),ni(li[0]));var b=li.pop();if(!b)return 6;oi.push(b);pi[a.Cg]=b;b.Cg=a.Cg;b.postMessage({Fg:"run",kj:a.jj,jh:a.jh,Cg:a.Cg},a.fi);return 0},ri=0,C=(a,b,...c)=>{for(var d=2*c.length,e=di(),f=ci(8*d),g=f>>3,h=0;h<c.length;h++){var m=c[h];"bigint"==typeof m?((n(),z)[g+2*h]=1n,(n(),z)[g+2*h+1]=m):((n(),z)[g+2*h]=0n,(n(),Fa)[g+2*h+1]=m)}a=Wh(a,0,d,f,b);bi(e);return a};
function Nh(a){if(l)return C(0,1,a);na=a;si||0<ri||(ti(),k.onExit?.(a),ma=!0);throw new fi(a);}function ui(a){if(l)return C(1,0,a);te(a)}var te=a=>{na=a;if(l)throw ui(a),"unwind";if(!(si||0<ri||l)){Vh();Ja=!1;Rh(0);for(var b of vi)b&&wi(b);D.cj();ti();Ha=!0}Nh(a)},li=[],oi=[],Oh=[],pi={};function xi(){for(var a=k.emscriptenPoolSize||8;a--;)mi();ii.push(async()=>{var b=yi();ji++;k.monitorRunDependencies?.(ji);await b;ji--;k.monitorRunDependencies?.(ji);0==ji&&ki&&(b=ki,ki=null,b())})}
var ti=()=>{for(var a of oi)gi(a);for(a of li)gi(a);li=[];oi=[];pi={}},zi=a=>{var b=a.Cg;delete pi[b];li.push(a);oi.splice(oi.indexOf(a),1);a.Cg=0;Xh(b)};function ya(){Oh.forEach(a=>a())}
var ni=a=>new Promise(b=>{a.onmessage=f=>{var g=f.data;f=g.Fg;if(g.wh&&g.wh!=Sh()){var h=pi[g.wh];h?h.postMessage(g,g.fi):ja(`Internal error! Worker sent a message "${f}" to target pthread ${g.wh}, but that thread no longer exists!`)}else if("checkMailbox"===f)Ba();else if("spawnThread"===f)qi(g);else if("cleanupThread"===f)Ai(()=>{zi(pi[g.oj])});else if("loaded"===f)a.loaded=!0,b(a);else if("setimmediate"===g.target)a.postMessage(g);else if("callHandler"===f)k[g.Li](...g.li);else f&&ja(`worker sent an unknown command ${f}`)};
a.onerror=f=>{ja(`${"worker sent an error!"} ${f.filename}:${f.lineno}: ${f.message}`);throw f;};var c=[],d=["onExit","onAbort","print","printErr"],e;for(e of d)k.propertyIsEnumerable(e)&&c.push(e);a.postMessage({Fg:"load",Mi:c,qj:oa,rj:la})});async function yi(){if(!l)return Promise.all(li.map(ni))}function mi(){var a=_scriptName;k.mainScriptUrlOrBlob&&(a=k.mainScriptUrlOrBlob,"string"!=typeof a&&(a=URL.createObjectURL(a)));a=new Worker(a,{name:"em-pthread"});li.push(a)}var Bi={},Ci=[];
function wa(a){var b=(n(),v)[a+52>>2];a=(n(),v)[a+56>>2];ai(b,b-a);bi(b)}function Di(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return(n(),p)[a];case "i8":return(n(),p)[a];case "i16":return(n(),Da)[a>>1];case "i32":return(n(),u)[a>>2];case "i64":return(n(),z)[a>>3];case "float":return(n(),w)[a>>2];case "double":return(n(),Fa)[a>>3];case "*":return(n(),v)[a>>2];default:Qa(`invalid type for getValue: ${b}`)}}var Aa=(a,b)=>{si=ri=0;a=ei.get(a)(b);si||0<ri?na=a:Yh(a)},si=!1;
function E(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":(n(),p)[a]=b;break;case "i8":(n(),p)[a]=b;break;case "i16":(n(),Da)[a>>1]=b;break;case "i32":(n(),u)[a>>2]=b;break;case "i64":(n(),z)[a>>3]=BigInt(b);break;case "float":(n(),w)[a>>2]=b;break;case "double":(n(),Fa)[a>>3]=b;break;case "*":(n(),v)[a>>2]=b;break;default:Qa(`invalid type for setValue: ${c}`)}}
var oa,Ei=globalThis.TextDecoder&&new TextDecoder,Fi=(a,b=0,c)=>{var d=b;for(c=d+c;a[d]&&!(d>=c);)++d;if(16<d-b&&a.buffer&&Ei)return Ei.decode(a.buffer instanceof ArrayBuffer?a.subarray(b,d):a.slice(b,d));for(c="";b<d;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}return c},
F=(a,b)=>a?Fi((n(),r),a,b):"",Xa=(a,b)=>ei.get(a)(b);function Gi(a,b,c,d){return l?C(2,1,a,b,c,d):Ya(a,b,c,d)}
var Ya=(a,b,c,d)=>{if(!globalThis.SharedArrayBuffer)return 6;var e=[];if(l&&0===e.length)return Gi(a,b,c,d);a={jj:c,Cg:a,jh:d,fi:e};return l?(a.Fg="spawnThread",postMessage(a,e),0):qi(a)},Hi=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ii=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=Hi(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":
"")+a},Ji=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.slice(0,-1);return a+b},Ki=a=>a&&a.match(/([^\/]+|\/)\/*$/)[1],Li=()=>a=>a.set(crypto.getRandomValues(new Uint8Array(a.byteLength))),Mi=a=>{(Mi=Li())(a)},Oi=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:Ni;if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=
Hi(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."},Pi=(a,b)=>{function c(g){for(var h=0;h<g.length&&""===g[h];h++);for(var m=g.length-1;0<=m&&""===g[m];m--);return h>m?[]:g.slice(h,m-h+1)}a=Oi(a).slice(1);b=Oi(b).slice(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,f=0;f<d;f++)if(a[f]!==b[f]){e=f;break}d=[];for(f=e;f<a.length;f++)d.push("..");d=d.concat(b.slice(e));return d.join("/")},Qi=[],Ri=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);
127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},Si=(a,b,c,d)=>{if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},Ti=a=>{var b=Array(Ri(a)+1);a=
Si(a,b,0,b.length);b.length=a;return b},Ui=[];function Vi(a,b){Ui[a]={input:[],output:[],Hg:b};Wi(a,Xi)}
var Xi={open(a){var b=Ui[a.node.hh];if(!b)throw new G(43);a.lg=b;a.seekable=!1},close(a){a.lg.Hg.mh(a.lg)},mh(a){a.lg.Hg.mh(a.lg)},read(a,b,c,d){if(!a.lg||!a.lg.Hg.Sh)throw new G(60);for(var e=0,f=0;f<d;f++){try{var g=a.lg.Hg.Sh(a.lg)}catch(h){throw new G(29);}if(void 0===g&&0===e)throw new G(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.Eg=Date.now());return e},write(a,b,c,d){if(!a.lg||!a.lg.Hg.Ih)throw new G(60);try{for(var e=0;e<d;e++)a.lg.Hg.Ih(a.lg,b[c+e])}catch(f){throw new G(29);
}d&&(a.node.qg=a.node.rg=Date.now());return e}},Yi={Sh(){a:{if(!Qi.length){var a=null;globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}Qi=Ti(a)}a=Qi.shift()}return a},Ih(a,b){null===b||10===b?(ia(Fi(a.output)),a.output=[]):0!=b&&a.output.push(b)},mh(a){0<a.output?.length&&(ia(Fi(a.output)),a.output=[])},Ri(){return{wj:25856,yj:5,vj:191,xj:35387,uj:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Si(){return 0},Ti(){return[24,
80]}},Zi={Ih(a,b){null===b||10===b?(ja(Fi(a.output)),a.output=[]):0!=b&&a.output.push(b)},mh(a){0<a.output?.length&&(ja(Fi(a.output)),a.output=[])}},H={Bg:null,mg(){return H.createNode(null,"/",16895,0)},createNode(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new G(63);H.Bg||(H.Bg={dir:{node:{tg:H.fg.tg,xg:H.fg.xg,fh:H.fg.fh,Vg:H.fg.Vg,Yg:H.fg.Yg,ah:H.fg.ah,Zg:H.fg.Zg,th:H.fg.th,$g:H.fg.$g},stream:{Ag:H.hg.Ag}},file:{node:{tg:H.fg.tg,xg:H.fg.xg},stream:{Ag:H.hg.Ag,read:H.hg.read,write:H.hg.write,
qh:H.hg.qh,sh:H.hg.sh}},link:{node:{tg:H.fg.tg,xg:H.fg.xg,Rg:H.fg.Rg},stream:{}},Nh:{node:{tg:H.fg.tg,xg:H.fg.xg},stream:$i}});c=aj(a,b,c,d);I(c.mode)?(c.fg=H.Bg.dir.node,c.hg=H.Bg.dir.stream,c.jg={}):32768===(c.mode&61440)?(c.fg=H.Bg.file.node,c.hg=H.Bg.file.stream,c.og=0,c.jg=null):40960===(c.mode&61440)?(c.fg=H.Bg.link.node,c.hg=H.Bg.link.stream):8192===(c.mode&61440)&&(c.fg=H.Bg.Nh.node,c.hg=H.Bg.Nh.stream);c.Eg=c.qg=c.rg=Date.now();a&&(a.jg[b]=c,a.Eg=a.qg=a.rg=c.Eg);return c},fg:{tg(a){var b=
{};b.yi=8192===(a.mode&61440)?a.id:1;b.Pi=a.id;b.mode=a.mode;b.Yi=1;b.uid=0;b.Ki=0;b.hh=a.hh;I(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.og:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.Eg=new Date(a.Eg);b.qg=new Date(a.qg);b.rg=new Date(a.rg);b.si=4096;b.yh=Math.ceil(b.size/b.si);return b},xg(a,b){for(var c of["mode","atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==b.size&&(b=b.size,a.og!=b&&(0==b?(a.jg=null,a.og=0):(c=a.jg,a.jg=new Uint8Array(b),c&&a.jg.set(c.subarray(0,
Math.min(b,a.og))),a.og=b)))},fh(){H.Dh||(H.Dh=new G(44),H.Dh.stack="<generic error, no stack>");throw H.Dh;},Vg(a,b,c,d){return H.createNode(a,b,c,d)},Yg(a,b,c){try{var d=bj(b,c)}catch(f){}if(d){if(I(a.mode))for(var e in d.jg)throw new G(55);cj(d)}delete a.parent.jg[a.name];b.jg[c]=a;a.name=c;b.rg=b.qg=a.parent.rg=a.parent.qg=Date.now()},ah(a,b){delete a.jg[b];a.rg=a.qg=Date.now()},Zg(a,b){var c=bj(a,b),d;for(d in c.jg)throw new G(55);delete a.jg[b];a.rg=a.qg=Date.now()},th(a){return[".","..",...Object.keys(a.jg)]},
$g(a,b,c){a=H.createNode(a,b,41471,0);a.link=c;return a},Rg(a){if(40960!==(a.mode&61440))throw new G(28);return a.link}},hg:{read(a,b,c,d,e){var f=a.node.jg;if(e>=a.node.og)return 0;a=Math.min(a.node.og-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write(a,b,c,d,e,f){b.buffer===(n(),p).buffer&&(f=!1);if(!d)return 0;a=a.node;a.qg=a.rg=Date.now();if(b.subarray&&(!a.jg||a.jg.subarray)){if(f)return a.jg=b.subarray(c,c+d),a.og=d;if(0===a.og&&0===e)return a.jg=
b.slice(c,c+d),a.og=d;if(e+d<=a.og)return a.jg.set(b.subarray(c,c+d),e),d}f=e+d;var g=a.jg?a.jg.length:0;g>=f||(f=Math.max(f,g*(1048576>g?2:1.125)>>>0),0!=g&&(f=Math.max(f,256)),g=a.jg,a.jg=new Uint8Array(f),0<a.og&&a.jg.set(g.subarray(0,a.og),0));if(a.jg.subarray&&b.subarray)a.jg.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.jg[e+f]=b[c+f];a.og=Math.max(a.og,e+d);return d},Ag(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.og);if(0>b)throw new G(28);return b},qh(a,b,c,
d,e){if(32768!==(a.node.mode&61440))throw new G(43);a=a.node.jg;if(e&2||!a||a.buffer!==(n(),p).buffer){e=!0;var f=65536*Math.ceil(b/65536);(d=Th(65536,f))&&(n(),r).fill(0,d,d+f);if(!d)throw new G(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);(n(),p).set(a,d)}}else e=!1,d=a.byteOffset;return{bj:d,ki:e}},sh(a,b,c,d){H.hg.write(a,b,0,d,c,!1);return 0}}},dj=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},D={Lg:{},indexedDB:()=>indexedDB,ji:21,Kg:"FILE_DATA",
Wg:a=>{function b(){"again"===a.Ng?c():a.Ng=0}function c(){a.Ng="idb";D.Kh(a,!1,b)}a.Ng?"idb"===a.Ng&&(a.Ng="again"):a.Ng=setTimeout(c,0)},mg:a=>{var b=H.mg(a);if(a?.bi?.tj){a.Ng=0;var c=b.fg;b.fg={...b.fg};b.fg.Vg=(d,e,f,g)=>{var h=c.Vg(d,e,f,g);h.fg=b.fg;h.Ni=b.mg;h.Eh=h.hg;h.hg={...h.hg};h.hg.write=(m,q,t,x,A,J)=>{m.node.Vh=!0;return h.Eh.write(m,q,t,x,A,J)};h.hg.close=m=>{var q=m.node;q.Vh&&(D.Wg(q.Ni),q.Vh=!1);if(q.Eh.close)return q.Eh.close(m)};D.Wg(b.mg);return h};b.fg.Zg=(...d)=>(D.Wg(b.mg),
c.Zg(...d));b.fg.$g=(...d)=>(D.Wg(b.mg),c.$g(...d));b.fg.ah=(...d)=>(D.Wg(b.mg),c.ah(...d));b.fg.Yg=(...d)=>(D.Wg(b.mg),c.Yg(...d))}return b},Kh:(a,b,c)=>{D.Hi(a,(d,e)=>{if(d)return c(d);D.Ii(a,(f,g)=>{if(f)return c(f);D.ej(b?g:e,b?e:g,c)})})},cj:()=>{for(var a of Object.values(D.Lg))a.close();D.Lg={}},Gi:(a,b)=>{var c=D.Lg[a];if(c)return b(null,c);try{var d=D.indexedDB().open(a,D.ji)}catch(e){return b(e)}if(!d)return b("Unable to connect to IndexedDB");d.onupgradeneeded=e=>{var f=e.target.result;
e=e.target.transaction;var g;f.objectStoreNames.contains(D.Kg)?g=e.objectStore(D.Kg):g=f.createObjectStore(D.Kg);g.indexNames.contains("timestamp")||g.createIndex("timestamp","timestamp",{unique:!1})};d.onsuccess=()=>{c=d.result;D.Lg[a]=c;b(null,c)};d.onerror=e=>{b(e.target.error);e.preventDefault()}},Hi:(a,b)=>{function c(h){return"."!==h&&".."!==h}function d(h){return m=>Ii(h+"/"+m)}var e={};for(a=ej(a.gh).filter(c).map(d(a.gh));a.length;){var f=a.pop();try{var g=fj(f)}catch(h){return b(h)}I(g.mode)&&
a.push(...ej(f).filter(c).map(d(f)));e[f]={timestamp:g.qg}}return b(null,{type:"local",entries:e})},Ii:(a,b)=>{var c={};D.Gi(a.gh,(d,e)=>{if(d)return b(d);try{var f=e.transaction([D.Kg],"readonly");f.onerror=g=>{b(g.target.error);g.preventDefault()};f.objectStore(D.Kg).index("timestamp").openKeyCursor().onsuccess=g=>{g=g.target.result;if(!g)return b(null,{type:"remote",db:e,entries:c});c[g.primaryKey]={timestamp:g.key};g.continue()}}catch(g){return b(g)}})},Ui:(a,b)=>{try{var c=gj(a).node;var d=fj(a)}catch(f){return b(f)}if(I(d.mode))return b(null,
{timestamp:d.qg,mode:d.mode});if(32768===(d.mode&61440)){a=c;var e=c.jg?c.jg.subarray?c.jg.subarray(0,c.og):new Uint8Array(c.jg):new Uint8Array(0);a.jg=e;return b(null,{timestamp:d.qg,mode:d.mode,contents:c.jg})}return b(Error("node type not supported"))},mj:(a,b,c)=>{try{if(I(b.mode))hj(a,b.mode);else if(32768===(b.mode&61440))ij(a,b.contents,{ui:!0});else return c(Error("node type not supported"));jj(a,b.mode);var d=b.timestamp,e=b.timestamp,f=gj(a,{Gg:!0}).node;kj(f.fg.xg,63)(f,{Eg:d,qg:e})}catch(g){return c(g)}c(null)},
gj:(a,b)=>{try{var c=fj(a);I(c.mode)?lj(a):32768===(c.mode&61440)&&mj(a)}catch(d){return b(d)}b(null)},Vi:(a,b,c)=>{a=a.get(b);a.onsuccess=d=>c(null,d.target.result);a.onerror=d=>{c(d.target.error);d.preventDefault()}},nj:(a,b,c,d)=>{try{var e=a.put(c,b)}catch(f){d(f);return}e.onsuccess=()=>d();e.onerror=f=>{d(f.target.error);f.preventDefault()}},hj:(a,b,c)=>{a=a.delete(b);a.onsuccess=()=>c();a.onerror=d=>{c(d.target.error);d.preventDefault()}},ej:(a,b,c)=>{function d(A){if(A&&!q)return q=!0,c(A)}
var e=0,f=[],g;for([g,m]of Object.entries(a.entries)){var h=b.entries[g];h&&m.timestamp.getTime()==h.timestamp.getTime()||(f.push(g),e++)}var m=[];for(g of Object.keys(b.entries))a.entries[g]||(m.push(g),e++);if(!e)return c(null);var q=!1;a=("remote"===a.type?a.db:b.db).transaction([D.Kg],"readwrite");var t=a.objectStore(D.Kg);a.onerror=a.onabort=A=>{d(A.target.error);A.preventDefault()};a.oncomplete=()=>{q||c(null)};for(const A of f.sort())"local"===b.type?D.Vi(t,A,(J,P)=>{if(J)return d(J);D.mj(A,
P,d)}):D.Ui(A,(J,P)=>{if(J)return d(J);D.nj(t,A,P,d)});for(var x of m.sort().reverse())"local"===b.type?D.gj(x,d):D.hj(t,x,d)}},nj=null,oj={},vi=[],pj=1,qj=null,Ni="/",Ja=!1,Oa=!0,rj=0,sj={},G=class{name="ErrnoError";constructor(a){this.ig=a}},tj=class{gg={};node=null;get flags(){return this.gg.flags}set flags(a){this.gg.flags=a}get position(){return this.gg.position}set position(a){this.gg.position=a}},uj=class{fg={};hg={};wg=null;constructor(a,b,c,d){a||=this;this.parent=a;this.mg=a.mg;this.id=
pj++;this.name=b;this.mode=c;this.hh=d;this.Eg=this.qg=this.rg=Date.now()}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}};
function gj(a,b={}){if(!a)throw new G(44);b.lh??(b.lh=!0);"/"===a.charAt(0)||(a=Ni+"/"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(h=>!!h);for(var d=nj,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;if("."!==a[f])if(".."===a[f])if(e=Ji(e),d===d.parent){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=Ii(e+"/"+a[f]);try{d=bj(d,a[f])}catch(h){if(44===h?.ig&&g&&b.Zi)return{path:e};throw h;}!d.wg||g&&!b.lh||(d=d.wg.root);if(40960===(d.mode&61440)&&(!g||b.Gg)){if(!d.fg.Rg)throw new G(52);
d=d.fg.Rg(d);"/"===d.charAt(0)||(d=Ji(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new G(32);}function vj(a){for(var b;;){if(a===a.parent)return a=a.mg.gh,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function wj(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%qj.length}function xj(a){var b=wj(a.parent.id,a.name);a.Qg=qj[b];qj[b]=a}
function cj(a){var b=wj(a.parent.id,a.name);if(qj[b]===a)qj[b]=a.Qg;else for(b=qj[b];b;){if(b.Qg===a){b.Qg=a.Qg;break}b=b.Qg}}function bj(a,b){var c=I(a.mode)?(c=yj(a,"x"))?c:a.fg.fh?0:2:54;if(c)throw new G(c);for(c=qj[wj(a.id,b)];c;c=c.Qg){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.fg.fh(a,b)}function aj(a,b,c,d){a=new uj(a,b,c,d);xj(a);return a}function I(a){return 16384===(a&61440)}function zj(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}
function yj(a,b){if(Oa)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function Aj(a,b){if(!I(a.mode))return 54;try{return bj(a,b),20}catch(c){}return yj(a,"wx")}function Bj(a,b,c){try{var d=bj(a,b)}catch(e){return e.ig}if(a=yj(a,"wx"))return a;if(c){if(!I(d.mode))return 54;if(d===d.parent||vj(d)===Ni)return 10}else if(I(d.mode))return 31;return 0}function kj(a,b){if(!a)throw new G(b);return a}
function Cj(a){a=vi[a];if(!a)throw new G(8);return a}function Dj(a,b=-1){a=Object.assign(new tj,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!vi[b])break a;throw new G(33);}a.fd=b;return vi[b]=a}function Ej(a,b=-1){a=Dj(a,b);a.hg?.Hj?.(a);return a}function Fj(a,b,c){var d=a?.hg.xg;a=d?a:b;d??=b.fg.xg;kj(d,63);d(a,c)}var $i={open(a){a.hg=oj[a.node.hh].hg;a.hg.open?.(a)},Ag(){throw new G(70);}};function Wi(a,b){oj[a]={hg:b}}
function Gj(a){var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push(...c.rh)}return b}function Hj(a,b){function c(h){rj--;return b(h)}function d(h){if(h){if(!d.Ai)return d.Ai=!0,c(h)}else++f>=e.length&&c(null)}"function"==typeof a&&(b=a,a=!1);rj++;1<rj&&ja(`warning: ${rj} FS.syncfs operations in flight at once, probably just doing extra work`);var e=Gj(nj.mg),f=0,g;for(g of e)g.type.Kh?g.type.Kh(g,a,d):d(null)}
function Ij(a,b){var c="/"===b;if(c&&nj)throw new G(10);if(!c&&b){var d=gj(b,{lh:!1});b=d.path;d=d.node;if(d.wg)throw new G(10);if(!I(d.mode))throw new G(54);}b={type:a,bi:{},gh:b,rh:[]};a=a.mg(b);a.mg=b;b.root=a;c?nj=a:d&&(d.wg=b,d.mg&&d.mg.rh.push(b))}function Jj(a,b,c){var d=gj(a,{parent:!0}).node;a=Ki(a);if(!a)throw new G(28);if("."===a||".."===a)throw new G(20);var e=Aj(d,a);if(e)throw new G(e);if(!d.fg.Vg)throw new G(63);return d.fg.Vg(d,a,b,c)}
function Kj(a,b=511){return Jj(a,b&1023|16384,0)}function hj(a,b){var c=a.split("/"),d="",e;for(e of c)if(e){if(d||"/"===a.charAt(0))d+="/";d+=e;try{Kj(d,b)}catch(f){if(20!=f.ig)throw f;}}}function Lj(a,b,c){"undefined"==typeof c&&(c=b,b=438);Jj(a,b|8192,c)}function La(a,b){if(!Oi(a))throw new G(44);var c=gj(b,{parent:!0}).node;if(!c)throw new G(44);b=Ki(b);var d=Aj(c,b);if(d)throw new G(d);if(!c.fg.$g)throw new G(63);c.fg.$g(c,b,a)}
function lj(a){var b=gj(a,{parent:!0}).node;a=Ki(a);var c=bj(b,a),d=Bj(b,a,!0);if(d)throw new G(d);if(!b.fg.Zg)throw new G(63);if(c.wg)throw new G(10);b.fg.Zg(b,a);cj(c)}function ej(a){a=gj(a,{Gg:!0}).node;return kj(a.fg.th,54)(a)}function mj(a){var b=gj(a,{parent:!0}).node;if(!b)throw new G(44);a=Ki(a);var c=bj(b,a),d=Bj(b,a,!1);if(d)throw new G(d);if(!b.fg.ah)throw new G(63);if(c.wg)throw new G(10);b.fg.ah(b,a);cj(c)}function fj(a,b){a=gj(a,{Gg:!b}).node;return kj(a.fg.tg,63)(a)}
function Mj(a,b,c,d){Fj(a,b,{mode:c&4095|b.mode&-4096,rg:Date.now(),Gj:d})}function jj(a,b){a="string"==typeof a?gj(a,{Gg:!0}).node:a;Mj(null,a,b)}function Nj(a,b,c){if(I(b.mode))throw new G(31);if(32768!==(b.mode&61440))throw new G(28);var d=yj(b,"w");if(d)throw new G(d);Fj(a,b,{size:c,timestamp:Date.now()})}
function Ma(a,b,c=438){if(""===a)throw new G(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?c&4095|32768:0;if("object"==typeof a)d=a;else{var e=a.endsWith("/");a=gj(a,{Gg:!(b&131072),Zi:!0});d=a.node;a=a.path}var f=!1;if(b&64)if(d){if(b&128)throw new G(20);}else{if(e)throw new G(31);d=Jj(a,c|511,0);f=!0}if(!d)throw new G(44);8192===(d.mode&61440)&&(b&=-513);if(b&65536&&!I(d.mode))throw new G(54);
if(!f&&(e=d?40960===(d.mode&61440)?32:I(d.mode)&&("r"!==zj(b)||b&576)?31:yj(d,zj(b)):44))throw new G(e);b&512&&!f&&(e=d,e="string"==typeof e?gj(e,{Gg:!0}).node:e,Nj(null,e,0));b&=-131713;e=Dj({node:d,path:vj(d),flags:b,seekable:!0,position:0,hg:d.hg,pj:[],error:!1});e.hg.open&&e.hg.open(e);f&&jj(d,c&511);!k.logReadFiles||b&1||a in sj||(sj[a]=1);return e}function wi(a){if(null===a.fd)throw new G(8);a.Mg&&(a.Mg=null);try{a.hg.close&&a.hg.close(a)}catch(b){throw b;}finally{vi[a.fd]=null}a.fd=null}
function Oj(a,b,c){if(null===a.fd)throw new G(8);if(!a.seekable||!a.hg.Ag)throw new G(70);if(0!=c&&1!=c&&2!=c)throw new G(28);a.position=a.hg.Ag(a,b,c);a.pj=[];return a.position}
function Pj(a,b,c,d,e,f){if(0>d||0>e)throw new G(28);if(null===a.fd)throw new G(8);if(0===(a.flags&2097155))throw new G(8);if(I(a.node.mode))throw new G(31);if(!a.hg.write)throw new G(28);a.seekable&&a.flags&1024&&Oj(a,0,2);var g="undefined"!=typeof e;if(!g)e=a.position;else if(!a.seekable)throw new G(70);b=a.hg.write(a,b,c,d,e,f);g||(a.position+=b);return b}
function ij(a,b,c={}){c.flags=c.flags||577;a=Ma(a,c.flags,c.mode);"string"==typeof b&&(b=new Uint8Array(Ti(b)));ArrayBuffer.isView(b)?Pj(a,b,0,b.byteLength,void 0,c.ui):Qa("Unsupported data type");wi(a)}
function Ka(a,b,c){a=Ii("/dev/"+a);var d=dj(!!b,!!c);Ka.Xh??(Ka.Xh=64);var e=Ka.Xh++<<8|0;Wi(e,{open(f){f.seekable=!1},close(){c?.buffer?.length&&c(10)},read(f,g,h,m){for(var q=0,t=0;t<m;t++){try{var x=b()}catch(A){throw new G(29);}if(void 0===x&&0===q)throw new G(6);if(null===x||void 0===x)break;q++;g[h+t]=x}q&&(f.node.Eg=Date.now());return q},write(f,g,h,m){for(var q=0;q<m;q++)try{c(g[h+q])}catch(t){throw new G(29);}m&&(f.node.qg=f.node.rg=Date.now());return q}});Lj(a,d,e)}var K={};
function Qj(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?Ni:Cj(a).path;if(0==b.length){if(!c)throw new G(44);return a}return a+"/"+b}
function Rj(a,b){(n(),v)[a>>2]=b.yi;(n(),v)[a+4>>2]=b.mode;(n(),v)[a+8>>2]=b.Yi;(n(),v)[a+12>>2]=b.uid;(n(),v)[a+16>>2]=b.Ki;(n(),v)[a+20>>2]=b.hh;(n(),z)[a+24>>3]=BigInt(b.size);(n(),u)[a+32>>2]=4096;(n(),u)[a+36>>2]=b.yh;var c=b.Eg.getTime(),d=b.qg.getTime(),e=b.rg.getTime();(n(),z)[a+40>>3]=BigInt(Math.floor(c/1E3));(n(),v)[a+48>>2]=c%1E3*1E6;(n(),z)[a+56>>3]=BigInt(Math.floor(d/1E3));(n(),v)[a+64>>2]=d%1E3*1E6;(n(),z)[a+72>>3]=BigInt(Math.floor(e/1E3));(n(),v)[a+80>>2]=e%1E3*1E6;(n(),z)[a+88>>
3]=BigInt(b.Pi);return 0}var Sj=void 0;function Za(a){if(l)return C(3,1,a);try{a=F(a);var b=gj(a,{Gg:!0});if(null===b.node)throw new G(44);if(!I(b.node.mode))throw new G(54);var c=yj(b.node,"x");if(c)throw new G(c);Ni=b.path;return 0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}function $a(a,b){if(l)return C(4,1,a,b);try{return a=F(a),jj(a,b),0}catch(c){if("undefined"==typeof K||"ErrnoError"!==c.name)throw c;return-c.ig}}
function ab(a,b,c,d){if(l)return C(5,1,a,b,c,d);try{b=F(b);b=Qj(a,b);if(c&-8)return-28;var e=gj(b,{Gg:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&yj(e,a)?-2:0}catch(f){if("undefined"==typeof K||"ErrnoError"!==f.name)throw f;return-f.ig}}function bb(a,b){if(l)return C(6,1,a,b);try{var c=Cj(a);Mj(c,c.node,b,!1);return 0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}var Tj=()=>{var a=(n(),u)[+Sj>>2];Sj+=4;return a};
function cb(a,b,c){if(l)return C(7,1,a,b,c);Sj=c;try{var d=Cj(a);switch(b){case 0:var e=Tj();if(0>e)break;for(;vi[e];)e++;return Ej(d,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=Tj(),d.flags|=e,0;case 12:return e=Tj(),(n(),Da)[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof K||"ErrnoError"!==f.name)throw f;return-f.ig}}
function db(a,b){if(l)return C(8,1,a,b);try{var c=Cj(a),d=c.node,e=c.hg.tg;a=e?c:d;e??=d.fg.tg;kj(e,63);var f=e(a);return Rj(b,f)}catch(g){if("undefined"==typeof K||"ErrnoError"!==g.name)throw g;return-g.ig}}function eb(a,b){if(l)return C(9,1,a,b);b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return-61;var c=Cj(a);if(0>b||0===(c.flags&2097155))throw new G(28);Nj(c,c.node,b);return 0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}
var Uj=(a,b,c)=>Si(a,(n(),r),b,c);function fb(a,b){if(l)return C(10,1,a,b);try{if(0===b)return-28;var c=Ni,d=Ri(c)+1;if(b<d)return-68;Uj(c,a,b);return d}catch(e){if("undefined"==typeof K||"ErrnoError"!==e.name)throw e;return-e.ig}}
function gb(a,b,c){if(l)return C(11,1,a,b,c);try{var d=Cj(a);d.Mg||(d.Mg=ej(d.path));a=0;var e=Oj(d,0,1),f=Math.floor(e/280),g=Math.min(d.Mg.length,f+Math.floor(c/280));for(c=f;c<g;c++){var h=d.Mg[c];if("."===h){var m=d.node.id;var q=4}else if(".."===h)m=gj(d.path,{parent:!0}).node.id,q=4;else{try{var t=bj(d.node,h)}catch(x){if(28===x?.ig)continue;throw x;}m=t.id;q=8192===(t.mode&61440)?2:I(t.mode)?4:40960===(t.mode&61440)?10:8}(n(),z)[b+a>>3]=BigInt(m);(n(),z)[b+a+8>>3]=BigInt(280*(c+1));(n(),Da)[b+
a+16>>1]=280;(n(),p)[b+a+18]=q;Uj(h,b+a+19,256);a+=280}Oj(d,280*c,0);return a}catch(x){if("undefined"==typeof K||"ErrnoError"!==x.name)throw x;return-x.ig}}
function hb(a,b,c){if(l)return C(12,1,a,b,c);Sj=c;try{var d=Cj(a);switch(b){case 21509:return d.lg?0:-59;case 21505:if(!d.lg)return-59;if(d.lg.Hg.Ri){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=Tj();(n(),u)[e>>2]=25856;(n(),u)[e+4>>2]=5;(n(),u)[e+8>>2]=191;(n(),u)[e+12>>2]=35387;for(var f=0;32>f;f++)(n(),p)[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.lg?0:-59;case 21506:case 21507:case 21508:if(!d.lg)return-59;if(d.lg.Hg.Si)for(e=Tj(),
n(),n(),n(),n(),a=[],f=0;32>f;f++)a.push((n(),p)[e+f+17]);return 0;case 21519:if(!d.lg)return-59;e=Tj();return(n(),u)[e>>2]=0;case 21520:return d.lg?-28:-59;case 21537:case 21531:e=Tj();if(!d.hg.Qi)throw new G(59);return d.hg.Qi(d,b,e);case 21523:if(!d.lg)return-59;d.lg.Hg.Ti&&(f=[24,80],e=Tj(),(n(),Da)[e>>1]=f[0],(n(),Da)[e+2>>1]=f[1]);return 0;case 21524:return d.lg?0:-59;case 21515:return d.lg?0:-59;default:return-28}}catch(g){if("undefined"==typeof K||"ErrnoError"!==g.name)throw g;return-g.ig}}
function ib(a,b){if(l)return C(13,1,a,b);try{return a=F(a),Rj(b,fj(a,!0))}catch(c){if("undefined"==typeof K||"ErrnoError"!==c.name)throw c;return-c.ig}}function jb(a,b,c){if(l)return C(14,1,a,b,c);try{return b=F(b),b=Qj(a,b),Kj(b,c),0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}
function kb(a,b,c,d){if(l)return C(15,1,a,b,c,d);try{b=F(b);b=Qj(a,b);switch(c&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}Jj(b,c,d);return 0}catch(e){if("undefined"==typeof K||"ErrnoError"!==e.name)throw e;return-e.ig}}function lb(a,b,c,d){if(l)return C(16,1,a,b,c,d);try{b=F(b);var e=d&256;b=Qj(a,b,d&4096);return Rj(c,e?fj(b,!0):fj(b))}catch(f){if("undefined"==typeof K||"ErrnoError"!==f.name)throw f;return-f.ig}}
function mb(a,b,c,d){if(l)return C(17,1,a,b,c,d);Sj=d;try{b=F(b);b=Qj(a,b);var e=d?Tj():0;return Ma(b,c,e).fd}catch(f){if("undefined"==typeof K||"ErrnoError"!==f.name)throw f;return-f.ig}}
function nb(a,b,c,d){if(l)return C(18,1,a,b,c,d);try{b=F(b);b=Qj(a,b);if(0>=d)return-28;var e=gj(b).node;if(!e)throw new G(44);if(!e.fg.Rg)throw new G(28);var f=e.fg.Rg(e);var g=Math.min(d,Ri(f)),h=(n(),p)[c+g];Uj(f,c,d+1);(n(),p)[c+g]=h;return g}catch(m){if("undefined"==typeof K||"ErrnoError"!==m.name)throw m;return-m.ig}}
function ob(a,b,c,d){if(l)return C(19,1,a,b,c,d);try{b=F(b);d=F(d);b=Qj(a,b);d=Qj(c,d);a=b;var e=Ji(a),f=Ji(d),g=Ki(a),h=Ki(d);var m=gj(a,{parent:!0});var q=m.node;m=gj(d,{parent:!0});var t=m.node;if(!q||!t)throw new G(44);if(q.mg!==t.mg)throw new G(75);var x=bj(q,g),A=Pi(a,f);if("."!==A.charAt(0))throw new G(28);A=Pi(d,e);if("."!==A.charAt(0))throw new G(55);try{var J=bj(t,h)}catch(T){}if(x!==J){var P=I(x.mode),y=Bj(q,g,P);if(y)throw new G(y);if(y=J?Bj(t,h,P):Aj(t,h))throw new G(y);if(!q.fg.Yg)throw new G(63);
if(x.wg||J&&J.wg)throw new G(10);if(t!==q&&(y=yj(q,"w")))throw new G(y);cj(x);try{q.fg.Yg(x,t,h),x.parent=t}catch(T){throw T;}finally{xj(x)}}return 0}catch(T){if("undefined"==typeof K||"ErrnoError"!==T.name)throw T;return-T.ig}}function pb(a){if(l)return C(20,1,a);try{return a=F(a),lj(a),0}catch(b){if("undefined"==typeof K||"ErrnoError"!==b.name)throw b;return-b.ig}}
function qb(a,b){if(l)return C(21,1,a,b);try{return a=F(a),Rj(b,fj(a))}catch(c){if("undefined"==typeof K||"ErrnoError"!==c.name)throw c;return-c.ig}}
function tb(a,b,c){if(l)return C(22,1,a,b,c);try{var d=gj(F(a),{Gg:!0}).node;a={Mh:4096,Jj:4096,yh:1E6,oi:5E5,ni:5E5,files:pj,Ei:pj-1,Fi:42,flags:2,Xi:255};d.fg.lj&&Object.assign(a,d.fg.lj(d.mg.bi.root));(n(),v)[c+4>>2]=a.Mh;(n(),v)[c+60>>2]=a.Mh;(n(),z)[c+8>>3]=BigInt(a.yh);(n(),z)[c+16>>3]=BigInt(a.oi);(n(),z)[c+24>>3]=BigInt(a.ni);(n(),z)[c+32>>3]=BigInt(a.files);(n(),z)[c+40>>3]=BigInt(a.Ei);(n(),v)[c+48>>2]=a.Fi;(n(),v)[c+64>>2]=a.flags;(n(),v)[c+56>>2]=a.Xi;return 0}catch(e){if("undefined"==
typeof K||"ErrnoError"!==e.name)throw e;return-e.ig}}function ub(a,b,c){if(l)return C(23,1,a,b,c);try{return a=F(a),c=F(c),c=Qj(b,c),La(a,c),0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}function vb(a,b,c){if(l)return C(24,1,a,b,c);try{b=F(b);b=Qj(a,b);if(c)if(512===c)lj(b);else return-28;else mj(b);return 0}catch(d){if("undefined"==typeof K||"ErrnoError"!==d.name)throw d;return-d.ig}}
var wb=()=>Qa(""),xb=a=>{xa(a,!ba,1,!aa,2097152,!1);ya()},Vj=a=>{if(a instanceof fi||"unwind"==a)return na;throw a;},Wj=()=>{if(!(Ha||si||0<ri))try{l?Sh()&&Yh(na):te(na)}catch(a){Vj(a)}},Ai=a=>{if(!Ha&&!ma)try{a(),Wj()}catch(b){Vj(b)}},za=a=>{Atomics.waitAsync&&(Atomics.waitAsync((n(),u),a>>2,a).value.then(Ba),a+=128,Atomics.store((n(),u),a>>2,1))},Ba=()=>Ai(()=>{var a=Sh();a&&(za(a),$h())}),yb=(a,b)=>{a==b?setTimeout(Ba):l?postMessage({wh:a,Fg:"checkMailbox"}):(a=pi[a])&&a.postMessage({Fg:"checkMailbox"})},
L,Xj=a=>{var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=(c,d)=>b.vertexAttribDivisorANGLE(c,d),a.drawArraysInstanced=(c,d,e,f)=>b.drawArraysInstancedANGLE(c,d,e,f),a.drawElementsInstanced=(c,d,e,f,g)=>b.drawElementsInstancedANGLE(c,d,e,f,g))},Yj=a=>{var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=()=>b.createVertexArrayOES(),a.deleteVertexArray=c=>b.deleteVertexArrayOES(c),a.bindVertexArray=c=>b.bindVertexArrayOES(c),a.isVertexArray=c=>b.isVertexArrayOES(c))},
Zj=a=>{var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=(c,d)=>b.drawBuffersWEBGL(c,d))},ak=a=>{a.Fj=a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")},bk=a=>{a.Oj=a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")},ck=a=>{var b="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");
return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},dk=1,ek=[],fk=[],gk=[],hk=[],jk=[],kk=[],lk=[],mk={},nk=[],ok=[],pk={},qk=4,rk=0,sk=a=>{for(var b=dk++,c=a.length;c<b;c++)a[c]=null;return b},tk=(a,b,c,d)=>{for(var e=0;e<a;e++){var f=L[c](),g=f&&sk(d);f?(f.name=g,d[g]=f):M||=1282;(n(),u)[b+4*e>>2]=g}},uk=(a,b,c)=>{for(var d="",e=0;e<a;++e){var f=c?(n(),v)[c+4*e>>2]:void 0;d+=F((n(),v)[b+4*e>>2],f)}return d},vk=a=>{var b=a.ng;if(a.dh){var c=b.getParameter(32873);b.bindTexture(3553,a.dh);
b.texImage2D(3553,0,6408,b.drawingBufferWidth,b.drawingBufferHeight,0,6408,5121,null);b.bindTexture(3553,c)}a.kh&&(c=b.getParameter(36007),b.bindRenderbuffer(36161,a.kh),b.renderbufferStorage(36161,33189,b.drawingBufferWidth,b.drawingBufferHeight),b.bindRenderbuffer(36161,c))},wk=()=>{var a=N,b=a.ng,c=b.getParameter(3089);c&&b.disable(3089);var d=b.getParameter(36006);if(b.blitFramebuffer&&!a.Oh)b.bindFramebuffer(36008,a.Bh),b.bindFramebuffer(36009,null),b.blitFramebuffer(0,0,b.canvas.width,b.canvas.height,
0,0,b.canvas.width,b.canvas.height,16384,9728);else{b.bindFramebuffer(36160,null);var e=b.getParameter(35725);b.useProgram(a.pi);b.isProgram(e)||(e=null);var f=b.getParameter(34964);b.bindBuffer(34962,a.ri);var g=b.getParameter(34016);b.activeTexture(33984);var h=b.getParameter(32873);b.bindTexture(3553,a.dh);var m=b.getParameter(3042);m&&b.disable(3042);var q=b.getParameter(2884);q&&b.disable(2884);var t=b.getParameter(2929);t&&b.disable(2929);var x=b.getParameter(2960);x&&b.disable(2960);function Z(){b.vertexAttribPointer(a.sg,
2,5126,!1,0,0);b.drawArrays(5,0,4)}if(a.Ch){var A=b.getParameter(34229);b.bindVertexArray(a.Ch);Z();b.bindVertexArray(A)}else{A={buffer:b.getVertexAttrib(a.sg,34975),size:b.getVertexAttrib(a.sg,34339),stride:b.getVertexAttrib(a.sg,34340),type:b.getVertexAttrib(a.sg,34341),$i:b.getVertexAttrib(a.sg,34922),Rj:b.getVertexAttribOffset(a.sg,34373)};for(var J=b.getParameter(34921),P=[],y=0;y<J;++y){var T=b.getVertexAttrib(y,34338),ea=y==a.sg;T&&!ea&&b.disableVertexAttribArray(y);!T&&ea&&b.enableVertexAttribArray(y);
P[y]=T}Z();for(y=0;y<J;++y)T=P[y],ea=y==a.sg,T&&!ea&&b.enableVertexAttribArray(y),!T&&ea&&b.disableVertexAttribArray(y);b.bindBuffer(34962,A.buffer);b.vertexAttribPointer(a.sg,A.size,A.type,A.$i,A.stride,A.offset)}x&&b.enable(2960);t&&b.enable(2929);q&&b.enable(2884);m&&b.enable(3042);b.bindTexture(3553,h);b.activeTexture(g);b.bindBuffer(34962,f);b.useProgram(e)}b.bindFramebuffer(36160,d);c&&b.enable(3089)},M,N,zb=a=>{L=k.ctx=N=a},xk=[],Ab=(a,b,c,d,e)=>{d/=2;xk.length=d;b=e>>3;for(c=0;c<d;c++)(n(),
z)[b+2*c]?xk[c]=(n(),z)[b+2*c+1]:xk[c]=(n(),Fa)[b+2*c+1];return(0,yk[a])(...xk)},Bb=()=>{si=!1;ri=0},Cb=a=>{l?postMessage({Fg:"cleanupThread",oj:a}):zi(pi[a])},Db=()=>{};
function Eb(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);(n(),u)[b>>2]=a.getUTCSeconds();(n(),u)[b+4>>2]=a.getUTCMinutes();(n(),u)[b+8>>2]=a.getUTCHours();(n(),u)[b+12>>2]=a.getUTCDate();(n(),u)[b+16>>2]=a.getUTCMonth();(n(),u)[b+20>>2]=a.getUTCFullYear()-1900;(n(),u)[b+24>>2]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;(n(),u)[b+28>>2]=a}
var zk=[0,31,60,91,121,152,182,213,244,274,305,335],Ak=[0,31,59,90,120,151,181,212,243,273,304,334];
function Fb(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);(n(),u)[b>>2]=a.getSeconds();(n(),u)[b+4>>2]=a.getMinutes();(n(),u)[b+8>>2]=a.getHours();(n(),u)[b+12>>2]=a.getDate();(n(),u)[b+16>>2]=a.getMonth();(n(),u)[b+20>>2]=a.getFullYear()-1900;(n(),u)[b+24>>2]=a.getDay();var c=a.getFullYear();c=(0!==c%4||0===c%100&&0!==c%400?Ak:zk)[a.getMonth()]+a.getDate()-1|0;(n(),u)[b+28>>2]=c;(n(),u)[b+36>>2]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();
var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;(n(),u)[b+32>>2]=a}
function Gb(a,b,c,d,e,f,g){if(l)return C(25,1,a,b,c,d,e,f,g);e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{var h=Cj(d);if(0!==(b&2)&&0===(c&2)&&2!==(h.flags&2097155))throw new G(2);if(1===(h.flags&2097155))throw new G(2);if(!h.hg.qh)throw new G(43);if(!a)throw new G(28);var m=h.hg.qh(h,a,e,b,c);var q=m.bj;(n(),u)[f>>2]=m.ki;(n(),v)[g>>2]=q;return 0}catch(t){if("undefined"==typeof K||"ErrnoError"!==t.name)throw t;return-t.ig}}
function Hb(a,b,c,d,e,f){if(l)return C(26,1,a,b,c,d,e,f);f=-9007199254740992>f||9007199254740992<f?NaN:Number(f);try{var g=Cj(e);if(c&2){c=f;if(32768!==(g.node.mode&61440))throw new G(43);if(!(d&2)){var h=(n(),r).slice(a,a+b);g.hg.sh&&g.hg.sh(g,h,c,b,d)}}}catch(m){if("undefined"==typeof K||"ErrnoError"!==m.name)throw m;return-m.ig}}var Bk={},Sb=()=>performance.timeOrigin+performance.now();
function Ib(a,b){if(l)return C(27,1,a,b);Bk[a]&&(clearTimeout(Bk[a].id),delete Bk[a]);if(!b)return 0;var c=setTimeout(()=>{delete Bk[a];Ai(()=>Zh(a,performance.timeOrigin+performance.now()))},b);Bk[a]={id:c,Wj:b};return 0}
var Jb=(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();var g=Math.max(f,e);(n(),v)[a>>2]=60*g;(n(),u)[b>>2]=Number(f!=e);b=h=>{var m=Math.abs(h);return`UTC${0<=h?"-":"+"}${String(Math.floor(m/60)).padStart(2,"0")}${String(m%60).padStart(2,"0")}`};a=b(f);b=b(e);e<f?(Uj(a,c,17),Uj(b,d,17)):(Uj(a,d,17),Uj(b,c,17))},Nb=()=>Date.now(),Ck=1;
function Kb(a,b,c){if(!(0<=a&&3>=a))return 28;if(0===a)a=Date.now();else if(Ck)a=performance.timeOrigin+performance.now();else return 52;a=Math.round(1E6*a);(n(),z)[c>>3]=BigInt(a);return 0}
var Mk=(a,b)=>{Dk=a;Ek=b;if(Fk)if(Gk||(ri+=1,Gk=!0),0==a)Hk=function(){setTimeout(Ik,Math.max(0,Jk+b-(performance.timeOrigin+performance.now()))|0)};else if(1==a)Hk=function(){Kk(Ik)};else if(2==a){if(!Lk)if(globalThis.setImmediate)Lk=setImmediate;else{var c=[];addEventListener("message",d=>{if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);Lk=d=>{c.push(d);ba?(k.setImmediates??(k.setImmediates=[]),k.setImmediates.push(d),postMessage({target:"setimmediate"})):
postMessage("setimmediate","*")}}Hk=function(){Lk(Ik)}}},Vk=(a,b,c,d,e)=>{function f(){return g<Nk?(--ri,Wj(),!1):!0}Fk=a;Ok=d;var g=Nk;Gk=!1;Ik=function(){if(!ma)if(0<Pk.length){var h=Pk.shift();h.Kj(h.jh);if(Qk){var m=Qk,q=0==m%1?m-1:Math.floor(m);Qk=h.Ej?q:(8*m+(q+.5))/9}k.setStatus&&(h=k.statusMessage||"Please wait...",m=Qk??0,q=Rk.Ij??0,m?m<q?k.setStatus("{message} ({expected - remaining}/{expected})"):k.setStatus(h):k.setStatus(""));f()&&setTimeout(Ik,0)}else if(f())if(Sk=Sk+1|0,1==Dk&&1<Ek&&
0!=Sk%Ek)Hk();else{0==Dk&&(Jk=performance.timeOrigin+performance.now());a:if(!ma){for(h of Tk)if(!1===h())break a;Ai(a);for(m of Uk)m()}f()&&Hk()}};e||(0<b?Mk(0,1E3/b):Mk(1,1),Hk());if(c)throw"unwind";},Gk=!1,Hk=null,Nk=0,Fk=null,Ok=0,Dk=0,Ek=0,Sk=0,Pk=[],Tk=[],Uk=[];function Wk(){Hk=null;Nk++}function Xk(){Nk++;var a=Dk,b=Ek,c=Fk;Fk=null;Vk(c,0,!1,Ok,!0);Mk(a,b);Hk()}var Yk=0;
function Kk(a){if(globalThis.requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===Yk)Yk=b+1E3/60;else for(;b+2>=Yk;)Yk+=1E3/60;setTimeout(a,Math.max(Yk-b,0))}}var Rk={},Jk,Ik,Lk,Qk,Lb=()=>{Wk();Fk=null},Mb=()=>{},Ob=a=>ja(F(a)),Pb=()=>{ri+=1;throw"unwind";};function Qb(a){if(l)return C(28,1,a);si=!1;ri=0;te(a)}
var Rb=()=>2147483648,Tb=a=>L.activeTexture(a),Ub=(a,b)=>{L.attachShader(fk[a],kk[b])},Vb=a=>L.beginTransformFeedback(a),Wb=(a,b)=>{35051==a?L.Ah=b:35052==a&&(L.Ig=b);L.bindBuffer(a,ek[b])},Xb=(a,b,c)=>{L.bindBufferBase(a,b,ek[c])},Yb=(a,b,c,d,e)=>{L.bindBufferRange(a,b,ek[c],d,e)},Zb=(a,b)=>{L.bindFramebuffer(a,b?gk[b]:N.Bh)},$b=(a,b)=>{L.bindRenderbuffer(a,hk[b])},ac=(a,b)=>{L.bindTexture(a,jk[b])},bc=a=>{L.bindVertexArray(lk[a])},dc=(a,b,c,d)=>L.blendColor(a,b,c,d),ec=a=>L.blendEquation(a),fc=
(a,b)=>L.blendFunc(a,b),gc=(a,b,c,d)=>L.blendFuncSeparate(a,b,c,d),hc=(a,b,c,d,e,f,g,h,m,q)=>L.blitFramebuffer(a,b,c,d,e,f,g,h,m,q),ic=(a,b,c,d)=>{2<=N.version?c&&b?L.bufferData(a,(n(),r),d,c,b):L.bufferData(a,b,d):L.bufferData(a,c?(n(),r).subarray(c,c+b):b,d)},jc=(a,b,c,d)=>{2<=N.version?c&&L.bufferSubData(a,b,(n(),r),d,c):L.bufferSubData(a,b,(n(),r).subarray(d,d+c))},kc=a=>L.checkFramebufferStatus(a),lc=a=>L.clear(a),mc=(a,b,c)=>{L.clearBufferfv(a,b,(n(),w),c>>2)},nc=(a,b,c,d)=>L.clearColor(a,b,
c,d),oc=a=>L.clearDepth(a),pc=a=>L.clearStencil(a),qc=(a,b,c,d)=>{L.colorMask(!!a,!!b,!!c,!!d)},rc=a=>{L.compileShader(kk[a])},sc=(a,b,c,d,e,f,g,h)=>{2<=N.version?L.Ig||!g?L.compressedTexImage2D(a,b,c,d,e,f,g,h):L.compressedTexImage2D(a,b,c,d,e,f,(n(),r),h,g):L.compressedTexImage2D(a,b,c,d,e,f,(n(),r).subarray(h,h+g))},tc=(a,b,c,d,e,f,g,h,m)=>{L.Ig?L.compressedTexImage3D(a,b,c,d,e,f,g,h,m):L.compressedTexImage3D(a,b,c,d,e,f,g,(n(),r),m,h)},uc=(a,b,c,d,e,f,g,h,m,q,t)=>{L.Ig?L.compressedTexSubImage3D(a,
b,c,d,e,f,g,h,m,q,t):L.compressedTexSubImage3D(a,b,c,d,e,f,g,h,m,(n(),r),t,q)},vc=(a,b,c,d,e)=>L.copyBufferSubData(a,b,c,d,e),wc=()=>{var a=sk(fk),b=L.createProgram();b.name=a;b.ph=b.nh=b.oh=0;b.Lh=1;fk[a]=b;return a},xc=a=>{var b=sk(kk);kk[b]=L.createShader(a);return b},yc=a=>L.cullFace(a),zc=(a,b)=>{for(var c=0;c<a;c++){var d=(n(),u)[b+4*c>>2],e=ek[d];e&&(L.deleteBuffer(e),e.name=0,ek[d]=null,d==L.Ah&&(L.Ah=0),d==L.Ig&&(L.Ig=0))}},Ac=(a,b)=>{for(var c=0;c<a;++c){var d=(n(),u)[b+4*c>>2],e=gk[d];
e&&(L.deleteFramebuffer(e),e.name=0,gk[d]=null)}},Bc=a=>{if(a){var b=fk[a];b?(L.deleteProgram(b),b.name=0,fk[a]=null):M||=1281}},Cc=(a,b)=>{for(var c=0;c<a;c++){var d=(n(),u)[b+4*c>>2],e=nk[d];e&&(L.deleteQuery(e),nk[d]=null)}},Dc=(a,b)=>{for(var c=0;c<a;c++){var d=(n(),u)[b+4*c>>2],e=hk[d];e&&(L.deleteRenderbuffer(e),e.name=0,hk[d]=null)}},Ec=a=>{if(a){var b=kk[a];b?(L.deleteShader(b),kk[a]=null):M||=1281}},Fc=a=>{if(a){var b=ok[a];b?(L.deleteSync(b),b.name=0,ok[a]=null):M||=1281}},Gc=(a,b)=>{for(var c=
0;c<a;c++){var d=(n(),u)[b+4*c>>2],e=jk[d];e&&(L.deleteTexture(e),e.name=0,jk[d]=null)}},Hc=(a,b)=>{for(var c=0;c<a;c++){var d=(n(),u)[b+4*c>>2];L.deleteVertexArray(lk[d]);lk[d]=null}},Ic=a=>L.depthFunc(a),Jc=a=>{L.depthMask(!!a)},Kc=a=>L.disable(a),Lc=a=>{L.disableVertexAttribArray(a)},Mc=(a,b,c)=>{L.drawArrays(a,b,c)},Nc=(a,b,c,d)=>{L.drawArraysInstanced(a,b,c,d)},Zk=[],Oc=(a,b)=>{for(var c=Zk[a],d=0;d<a;d++)c[d]=(n(),u)[b+4*d>>2];L.drawBuffers(c)},Pc=(a,b,c,d)=>{L.drawElements(a,b,c,d)},Qc=(a,
b,c,d,e)=>{L.drawElementsInstanced(a,b,c,d,e)},Rc=a=>L.enable(a),Sc=a=>{L.enableVertexAttribArray(a)},Tc=()=>L.endTransformFeedback(),Wc=(a,b)=>(a=L.fenceSync(a,b))?(b=sk(ok),a.name=b,ok[b]=a,b):0,Xc=()=>L.finish(),Yc=(a,b,c,d)=>{L.framebufferRenderbuffer(a,b,c,hk[d])},Zc=(a,b,c,d,e)=>{L.framebufferTexture2D(a,b,c,jk[d],e)},$c=(a,b,c,d,e)=>{L.framebufferTextureLayer(a,b,jk[c],d,e)},ad=a=>L.frontFace(a),bd=(a,b)=>{tk(a,b,"createBuffer",ek)},cd=(a,b)=>{tk(a,b,"createFramebuffer",gk)},dd=(a,b)=>{tk(a,
b,"createQuery",nk)},ed=(a,b)=>{tk(a,b,"createRenderbuffer",hk)},fd=(a,b)=>{tk(a,b,"createTexture",jk)},gd=(a,b)=>{tk(a,b,"createVertexArray",lk)},hd=a=>L.generateMipmap(a),$k=()=>{var a=ck(L);return a=a.concat(a.map(b=>"GL_"+b))},al=(a,b,c)=>{if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&(M||=1280);return;case 34814:case 36345:d=0;break;case 34466:var e=L.getParameter(34467);d=e?e.length:0;break;case 33309:if(2>N.version){M||=1282;return}d=$k().length;break;case 33307:case 33308:if(2>
N.version){M||=1280;return}d=33307==a?3:0}if(void 0===d)switch(e=L.getParameter(a),typeof e){case "number":d=e;break;case "boolean":d=e?1:0;break;case "string":M||=1280;return;case "object":if(null===e)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:d=0;break;default:M||=1280;return}else{if(e instanceof Float32Array||e instanceof
Uint32Array||e instanceof Int32Array||e instanceof Array){for(a=0;a<e.length;++a)switch(c){case 0:(n(),u)[b+4*a>>2]=e[a];break;case 2:(n(),w)[b+4*a>>2]=e[a];break;case 4:(n(),p)[b+a]=e[a]?1:0}return}try{d=e.name|0}catch(f){M||=1280;ja(`GL_INVALID_ENUM in glGet${c}v: Unknown object returned from WebGL getParameter(${a})! (error: ${f})`);return}}break;default:M||=1280;ja(`GL_INVALID_ENUM in glGet${c}v: Native code calling glGet${c}v(${a}) and it returns ${e} of type ${typeof e}!`);return}switch(c){case 1:c=
d;(n(),v)[b>>2]=c;a=(n(),v)[b>>2];(n(),v)[b+4>>2]=(c-a)/4294967296;break;case 0:(n(),u)[b>>2]=d;break;case 2:(n(),w)[b>>2]=d;break;case 4:(n(),p)[b]=d?1:0}}else M||=1281},jd=(a,b)=>al(a,b,2),kd=(a,b)=>{al(a,b,1)},ld=(a,b)=>al(a,b,0),md=(a,b,c,d)=>{a=L.getProgramInfoLog(fk[a]);null===a&&(a="(unknown error)");b=0<b&&d?Uj(a,d,b):0;c&&((n(),u)[c>>2]=b)},nd=(a,b,c)=>{if(c)if(a>=dk)M||=1281;else if(a=fk[a],35716==b)a=L.getProgramInfoLog(a),null===a&&(a="(unknown error)"),(n(),u)[c>>2]=a.length+1;else if(35719==
b){if(!a.ph){var d=L.getProgramParameter(a,35718);for(b=0;b<d;++b)a.ph=Math.max(a.ph,L.getActiveUniform(a,b).name.length+1)}(n(),u)[c>>2]=a.ph}else if(35722==b){if(!a.nh)for(d=L.getProgramParameter(a,35721),b=0;b<d;++b)a.nh=Math.max(a.nh,L.getActiveAttrib(a,b).name.length+1);(n(),u)[c>>2]=a.nh}else if(35381==b){if(!a.oh)for(d=L.getProgramParameter(a,35382),b=0;b<d;++b)a.oh=Math.max(a.oh,L.getActiveUniformBlockName(a,b).length+1);(n(),u)[c>>2]=a.oh}else(n(),u)[c>>2]=L.getProgramParameter(a,b);else M||=
1281},od=(a,b,c,d)=>{a=L.getShaderInfoLog(kk[a]);null===a&&(a="(unknown error)");b=0<b&&d?Uj(a,d,b):0;c&&((n(),u)[c>>2]=b)},pd=(a,b,c)=>{c?35716==b?(a=L.getShaderInfoLog(kk[a]),null===a&&(a="(unknown error)"),a=a?a.length+1:0,(n(),u)[c>>2]=a):35720==b?(a=(a=L.getShaderSource(kk[a]))?a.length+1:0,(n(),u)[c>>2]=a):(n(),u)[c>>2]=L.getShaderParameter(kk[a],b):M||=1281},bl=a=>{var b=Ri(a)+1,c=Qh(b);c&&Uj(a,c,b);return c},qd=a=>{var b=pk[a];if(!b){switch(a){case 7939:b=bl($k().join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=
L.getParameter(a))||(M||=1280);b=b?bl(b):0;break;case 7938:b=L.getParameter(7938);var c=`OpenGL ES 2.0 (${b})`;2<=N.version&&(c=`OpenGL ES 3.0 (${b})`);b=bl(c);break;case 35724:b=L.getParameter(35724);c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b=`OpenGL ES GLSL ES ${c[1]} (${b})`);b=bl(b);break;default:M||=1280}pk[a]=b}return b},rd=(a,b,c,d,e)=>{0>c?M||=1281:e?(a=L.getSyncParameter(ok[a],b),null!==a&&((n(),u)[e>>2]=a,d&&((n(),u)[d>>2]=1))):M||=
1281},sd=(a,b)=>L.getUniformBlockIndex(fk[a],F(b)),cl=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),td=(a,b)=>{b=F(b);if(a=fk[a]){var c=a,d=c.ih,e=c.hi,f;if(!d){c.ih=d={};c.gi={};var g=L.getProgramParameter(c,35718);for(f=0;f<g;++f){var h=L.getActiveUniform(c,f);var m=h.name;h=h.size;var q=cl(m);q=0<q?m.slice(0,q):m;var t=c.Lh;c.Lh+=h;e[q]=[h,t];for(m=0;m<h;++m)d[t]=m,c.gi[t++]=q}}c=a.ih;d=0;e=b;f=cl(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.hi[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||L.getUniformLocation(a,
b)))return d}else M||=1281;return-1},ud=a=>{a=fk[a];L.linkProgram(a);a.ih=0;a.hi={}},vd=(a,b)=>{3317==a?qk=b:3314==a&&(rk=b);L.pixelStorei(a,b)},wd=a=>L.readBuffer(a),dl=a=>{a-=5120;return 0==a?(n(),p):1==a?(n(),r):2==a?(n(),Da):4==a?(n(),u):6==a?(n(),w):5==a||28922==a||28520==a||30779==a||30782==a?(n(),v):(n(),Ea)},el=(a,b,c,d,e)=>{a=dl(a);b=d*((rk||c)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*a.BYTES_PER_ELEMENT+qk-1&-qk);return a.subarray(e>>>31-Math.clz32(a.BYTES_PER_ELEMENT),
e+b>>>31-Math.clz32(a.BYTES_PER_ELEMENT))},xd=(a,b,c,d,e,f,g)=>{if(2<=N.version)if(L.Ah)L.readPixels(a,b,c,d,e,f,g);else{var h=dl(f);g>>>=31-Math.clz32(h.BYTES_PER_ELEMENT);L.readPixels(a,b,c,d,e,f,h,g)}else(h=el(f,e,c,d,g))?L.readPixels(a,b,c,d,e,f,h):M||=1280},yd=(a,b,c,d)=>L.renderbufferStorage(a,b,c,d),zd=(a,b,c,d,e)=>L.renderbufferStorageMultisample(a,b,c,d,e),Ad=(a,b,c,d)=>L.scissor(a,b,c,d),Bd=(a,b,c,d)=>{b=uk(b,c,d);L.shaderSource(kk[a],b)},Cd=(a,b,c)=>L.stencilFunc(a,b,c),Dd=a=>L.stencilMask(a),
Ed=(a,b,c)=>L.stencilOp(a,b,c),Fd=(a,b,c,d,e,f,g,h,m)=>{if(2<=N.version){if(L.Ig){L.texImage2D(a,b,c,d,e,f,g,h,m);return}if(m){var q=dl(h);m>>>=31-Math.clz32(q.BYTES_PER_ELEMENT);L.texImage2D(a,b,c,d,e,f,g,h,q,m);return}}q=m?el(h,g,d,e,m):null;L.texImage2D(a,b,c,d,e,f,g,h,q)},Gd=(a,b,c,d,e,f,g,h,m,q)=>{if(L.Ig)L.texImage3D(a,b,c,d,e,f,g,h,m,q);else if(q){var t=dl(m);L.texImage3D(a,b,c,d,e,f,g,h,m,t,q>>>31-Math.clz32(t.BYTES_PER_ELEMENT))}else L.texImage3D(a,b,c,d,e,f,g,h,m,null)},Hd=(a,b,c)=>L.texParameterf(a,
b,c),Id=(a,b,c)=>L.texParameteri(a,b,c),Jd=(a,b,c,d,e)=>L.texStorage2D(a,b,c,d,e),Kd=(a,b,c,d,e,f,g,h,m,q,t)=>{if(L.Ig)L.texSubImage3D(a,b,c,d,e,f,g,h,m,q,t);else if(t){var x=dl(q);L.texSubImage3D(a,b,c,d,e,f,g,h,m,q,x,t>>>31-Math.clz32(x.BYTES_PER_ELEMENT))}else L.texSubImage3D(a,b,c,d,e,f,g,h,m,q,null)},Ld=(a,b,c,d)=>{a=fk[a];for(var e=[],f=0;f<b;f++)e.push(F((n(),u)[c+4*f>>2]));L.transformFeedbackVaryings(a,e,d)},fl=a=>{var b=L.xi;if(b){var c=b.ih[a];"number"==typeof c&&(b.ih[a]=c=L.getUniformLocation(b,
b.gi[a]+(0<c?`[${c}]`:"")));return c}M||=1282},Md=(a,b)=>{L.uniform1f(fl(a),b)},Nd=(a,b)=>{L.uniform1i(fl(a),b)},gl=[],Od=(a,b,c)=>{if(2<=N.version)b&&L.uniform1iv(fl(a),(n(),u),c>>2,b);else{if(288>=b)for(var d=gl[b],e=0;e<b;++e)d[e]=(n(),u)[c+4*e>>2];else d=(n(),u).subarray(c>>2,c+4*b>>2);L.uniform1iv(fl(a),d)}},Pd=(a,b)=>{L.uniform1ui(fl(a),b)},Qd=(a,b,c)=>{b&&L.uniform1uiv(fl(a),(n(),v),c>>2,b)},Rd=(a,b,c)=>{L.uniform2f(fl(a),b,c)},hl=[],Sd=(a,b,c)=>{if(2<=N.version)b&&L.uniform2fv(fl(a),(n(),
w),c>>2,2*b);else{if(144>=b){b*=2;for(var d=hl[b],e=0;e<b;e+=2)d[e]=(n(),w)[c+4*e>>2],d[e+1]=(n(),w)[c+(4*e+4)>>2]}else d=(n(),w).subarray(c>>2,c+8*b>>2);L.uniform2fv(fl(a),d)}},Td=(a,b,c)=>{if(2<=N.version)b&&L.uniform2iv(fl(a),(n(),u),c>>2,2*b);else{if(144>=b){b*=2;for(var d=gl[b],e=0;e<b;e+=2)d[e]=(n(),u)[c+4*e>>2],d[e+1]=(n(),u)[c+(4*e+4)>>2]}else d=(n(),u).subarray(c>>2,c+8*b>>2);L.uniform2iv(fl(a),d)}},Ud=(a,b,c)=>{if(2<=N.version)b&&L.uniform3fv(fl(a),(n(),w),c>>2,3*b);else{if(96>=b){b*=3;
for(var d=hl[b],e=0;e<b;e+=3)d[e]=(n(),w)[c+4*e>>2],d[e+1]=(n(),w)[c+(4*e+4)>>2],d[e+2]=(n(),w)[c+(4*e+8)>>2]}else d=(n(),w).subarray(c>>2,c+12*b>>2);L.uniform3fv(fl(a),d)}},Vd=(a,b,c,d,e)=>{L.uniform4f(fl(a),b,c,d,e)},Wd=(a,b,c)=>{if(2<=N.version)b&&L.uniform4fv(fl(a),(n(),w),c>>2,4*b);else{if(72>=b){var d=hl[4*b],e=(n(),w);c>>=2;b*=4;for(var f=0;f<b;f+=4){var g=c+f;d[f]=e[g];d[f+1]=e[g+1];d[f+2]=e[g+2];d[f+3]=e[g+3]}}else d=(n(),w).subarray(c>>2,c+16*b>>2);L.uniform4fv(fl(a),d)}},Xd=(a,b,c)=>{a=
fk[a];L.uniformBlockBinding(a,b,c)},Yd=(a,b,c,d)=>{if(2<=N.version)b&&L.uniformMatrix3fv(fl(a),!!c,(n(),w),d>>2,9*b);else{if(32>=b){b*=9;for(var e=hl[b],f=0;f<b;f+=9)e[f]=(n(),w)[d+4*f>>2],e[f+1]=(n(),w)[d+(4*f+4)>>2],e[f+2]=(n(),w)[d+(4*f+8)>>2],e[f+3]=(n(),w)[d+(4*f+12)>>2],e[f+4]=(n(),w)[d+(4*f+16)>>2],e[f+5]=(n(),w)[d+(4*f+20)>>2],e[f+6]=(n(),w)[d+(4*f+24)>>2],e[f+7]=(n(),w)[d+(4*f+28)>>2],e[f+8]=(n(),w)[d+(4*f+32)>>2]}else e=(n(),w).subarray(d>>2,d+36*b>>2);L.uniformMatrix3fv(fl(a),!!c,e)}},
Zd=(a,b,c,d)=>{if(2<=N.version)b&&L.uniformMatrix4fv(fl(a),!!c,(n(),w),d>>2,16*b);else{if(18>=b){var e=hl[16*b],f=(n(),w);d>>=2;b*=16;for(var g=0;g<b;g+=16){var h=d+g;e[g]=f[h];e[g+1]=f[h+1];e[g+2]=f[h+2];e[g+3]=f[h+3];e[g+4]=f[h+4];e[g+5]=f[h+5];e[g+6]=f[h+6];e[g+7]=f[h+7];e[g+8]=f[h+8];e[g+9]=f[h+9];e[g+10]=f[h+10];e[g+11]=f[h+11];e[g+12]=f[h+12];e[g+13]=f[h+13];e[g+14]=f[h+14];e[g+15]=f[h+15]}}else e=(n(),w).subarray(d>>2,d+64*b>>2);L.uniformMatrix4fv(fl(a),!!c,e)}},$d=a=>{a=fk[a];L.useProgram(a);
L.xi=a},ae=(a,b,c,d,e)=>L.vertexAttrib4f(a,b,c,d,e),be=(a,b)=>{L.vertexAttribDivisor(a,b)},ce=(a,b,c,d,e)=>L.vertexAttribI4ui(a,b,c,d,e),de=(a,b,c,d,e)=>{L.vertexAttribIPointer(a,b,c,d,e)},ee=(a,b,c,d,e,f)=>{L.vertexAttribPointer(a,b,c,!!d,e,f)},fe=(a,b,c,d)=>L.viewport(a,b,c,d),ge=()=>navigator.hardwareConcurrency,he=a=>{var b=(n(),r).length;a>>>=0;if(a<=b||2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,
d)/65536))-oa.buffer.byteLength+65535)/65536|0;try{oa.grow(d);pa();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},il=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0],jl=a=>{a=2<a?F(a):a;return il[a]||("undefined"!=typeof document?document.querySelector(a):null)},kl=(a,b,c)=>{a=jl(a);if(!a||a.Dj)return-4;var d=!1;a.Tg?.ng&&(d=a.Tg.ng.getParameter(2978),d=0===d[0]&&0===d[1]&&d[2]===a.width&&d[3]===a.height);a.width=b;a.height=c;d&&a.Tg.ng.viewport(0,0,b,c);
a.Tg&&vk(a.Tg);return 0};function ll(a,b,c){return l?C(29,1,a,b,c):kl(a,b,c)}var ie=(a,b,c)=>jl(a)?kl(a,b,c):ll(a,b,c),je=(a,b,c)=>{a=ei.get(a);Vk(a,b,c)},ke=()=>0;function le(a){if(l)return C(30,1,a);N==a&&(N=0);N===mk[a]&&(N=null);"object"==typeof JSEvents&&JSEvents.Tj(mk[a].ng.canvas);mk[a]?.ng.canvas&&(mk[a].ng.canvas.Tg=void 0);B(mk[a].handle);mk[a]=null}var me=()=>N&&N.ng?N.Bh?(wk(),0):N.attributes.Rh?0:-3:-3;function ml(a,b){return l?C(31,1,a,b):ne(a,b)}
var nl=["default","low-power","high-performance"],ne=(a,b)=>{var c=b>>2,d=(n(),u)[c+2];c={alpha:!!(n(),p)[b+0],depth:!!(n(),p)[b+1],stencil:!!(n(),p)[b+2],antialias:!!(n(),p)[b+3],premultipliedAlpha:!!(n(),p)[b+4],preserveDrawingBuffer:!!(n(),p)[b+5],powerPreference:nl[d],failIfMajorPerformanceCaveat:!!(n(),p)[b+12],Yh:(n(),u)[c+4],Pj:(n(),u)[c+5],Qh:(n(),p)[b+24],Rh:(n(),p)[b+25],ci:(n(),u)[c+7],vh:(n(),p)[b+32]};d=jl(a);if(l&&(2===c.ci||!d&&1===c.ci))return(n(),p)[b+32]=1,(n(),p)[b+5]=1,ml(a,b);
if(!d)return 0;c.Rh&&!c.vh&&(c.vh=!0);c.vh&&(c.preserveDrawingBuffer=!0);if(d=1<c.Yh?d.getContext("webgl2",c):d.getContext("webgl",c)){a=Qh(8);(n(),v)[a+4>>2]=Sh();b={handle:a,attributes:c,version:c.Yh,ng:d};d.canvas&&(d.canvas.Tg=b);mk[a]=b;if("undefined"==typeof c.Qh||c.Qh)if((d=b)||(d=N),!d.Oi){d.Oi=!0;var e=d.ng;e.Wi=e.getExtension("WEBGL_multi_draw");e.Ci=e.getExtension("EXT_polygon_offset_clamp");e.Bi=e.getExtension("EXT_clip_control");e.sj=e.getExtension("WEBGL_polygon_mode");Xj(e);Yj(e);Zj(e);
ak(e);bk(e);2<=d.version&&(e.Ph=e.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>d.version||!e.Ph)e.Ph=e.getExtension("EXT_disjoint_timer_query");for(var f of ck(e))f.includes("lose_context")||f.includes("debug")||e.getExtension(f)}c.vh&&(f=b.ng,c=f.createFramebuffer(),f.bindFramebuffer(36160,c),b.Bh=c,b.Oh=!1,f.getContextAttributes().antialias&&(b.Oh=!0),b.dh=f.createTexture(),b.kh=f.createRenderbuffer(),vk(b),f.bindTexture(3553,b.dh),f.texParameteri(3553,10241,9728),f.texParameteri(3553,
10240,9728),f.texParameteri(3553,10242,33071),f.texParameteri(3553,10243,33071),f.texImage2D(3553,0,6408,f.canvas.width,f.canvas.height,0,6408,5121,null),f.framebufferTexture2D(36160,36064,3553,b.dh,0),f.bindTexture(3553,null),f.bindRenderbuffer(36161,b.kh),f.renderbufferStorage(36161,33189,f.canvas.width,f.canvas.height),f.framebufferRenderbuffer(36160,36096,36161,b.kh),f.bindRenderbuffer(36161,null),c=f.createBuffer(),f.bindBuffer(34962,c),f.bufferData(34962,new Float32Array([-1,-1,-1,1,1,-1,1,
1]),35044),f.bindBuffer(34962,null),b.ri=c,c=f.createShader(35633),f.shaderSource(c,"attribute vec2 pos;varying lowp vec2 tex;void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }"),f.compileShader(c),d=f.createShader(35632),f.shaderSource(d,"varying lowp vec2 tex;uniform sampler2D sampler;void main() { gl_FragColor = texture2D(sampler, tex); }"),f.compileShader(d),e=f.createProgram(),f.attachShader(e,c),f.attachShader(e,d),f.linkProgram(e),b.pi=e,b.sg=f.getAttribLocation(e,
"pos"),f.useProgram(e),f.uniform1i(f.getUniformLocation(e,"sampler"),0),f.useProgram(null),f.createVertexArray&&(b.Ch=f.createVertexArray(),f.bindVertexArray(b.Ch),f.enableVertexAttribArray(b.sg),f.bindVertexArray(null)))}else a=0;return a};
function oe(a,b){if(l)return C(32,1,a,b);a=mk[a];b=F(b);b.startsWith("GL_")&&(b=b.slice(3));"ANGLE_instanced_arrays"==b&&Xj(L);"OES_vertex_array_object"==b&&Yj(L);"WEBGL_draw_buffers"==b&&Zj(L);"WEBGL_draw_instanced_base_vertex_base_instance"==b&&ak(L);"WEBGL_multi_draw_instanced_base_vertex_base_instance"==b&&bk(L);"WEBGL_multi_draw"==b&&(L.Wi=L.getExtension("WEBGL_multi_draw"));"EXT_polygon_offset_clamp"==b&&(L.Ci=L.getExtension("EXT_polygon_offset_clamp"));"EXT_clip_control"==b&&(L.Bi=L.getExtension("EXT_clip_control"));
"WEBGL_polygon_mode"==b&&(L.sj=L.getExtension("WEBGL_polygon_mode"));return!!a.ng.getExtension(b)}function pe(){return l?C(33,1):bl(L.getSupportedExtensions().join(" "))}
var qe=a=>{N=mk[a];k.ctx=L=N?.ng;return!a||L?0:-5},ol={},ql=()=>{if(!pl){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:ca||"./this.program"},b;for(b in ol)void 0===ol[b]?delete a[b]:a[b]=ol[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);pl=c}return pl},pl;
function re(a,b){if(l)return C(34,1,a,b);var c=0,d=0,e;for(e of ql()){var f=b+c;(n(),v)[a+d>>2]=f;c+=Uj(e,f,Infinity)+1;d+=4}return 0}function se(a,b){if(l)return C(35,1,a,b);var c=ql();(n(),v)[a>>2]=c.length;a=0;for(var d of c)a+=Ri(d)+1;(n(),v)[b>>2]=a;return 0}function ue(a){if(l)return C(36,1,a);try{var b=Cj(a);wi(b);return 0}catch(c){if("undefined"==typeof K||"ErrnoError"!==c.name)throw c;return c.ig}}
function ve(a,b){if(l)return C(37,1,a,b);try{var c=Cj(a),d=c.lg?2:I(c.mode)?3:40960===(c.mode&61440)?7:4;(n(),p)[b]=d;(n(),Da)[b+2>>1]=0;(n(),z)[b+8>>3]=BigInt(0);(n(),z)[b+16>>3]=BigInt(0);return 0}catch(e){if("undefined"==typeof K||"ErrnoError"!==e.name)throw e;return e.ig}}
function we(a,b,c,d){if(l)return C(38,1,a,b,c,d);try{a:{var e=Cj(a);a=b;for(var f,g=b=0;g<c;g++){var h=(n(),v)[a>>2],m=(n(),v)[a+4>>2];a+=8;var q=e,t=(n(),p),x=h,A=m,J=f;if(0>A||0>J)throw new G(28);if(null===q.fd)throw new G(8);if(1===(q.flags&2097155))throw new G(8);if(I(q.node.mode))throw new G(31);if(!q.hg.read)throw new G(28);var P="undefined"!=typeof J;if(!P)J=q.position;else if(!q.seekable)throw new G(70);var y=q.hg.read(q,t,x,A,J);P||(q.position+=y);var T=y;if(0>T){var ea=-1;break a}b+=T;if(T<
m)break;"undefined"!=typeof f&&(f+=T)}ea=b}(n(),v)[d>>2]=ea;return 0}catch(Z){if("undefined"==typeof K||"ErrnoError"!==Z.name)throw Z;return Z.ig}}function xe(a,b,c,d){if(l)return C(39,1,a,b,c,d);b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=Cj(a);Oj(e,b,c);(n(),z)[d>>3]=BigInt(e.position);e.Mg&&0===b&&0===c&&(e.Mg=null);return 0}catch(f){if("undefined"==typeof K||"ErrnoError"!==f.name)throw f;return f.ig}}
function ye(a,b,c,d){if(l)return C(40,1,a,b,c,d);try{a:{var e=Cj(a);a=b;for(var f,g=b=0;g<c;g++){var h=(n(),v)[a>>2],m=(n(),v)[a+4>>2];a+=8;var q=Pj(e,(n(),p),h,m,f);if(0>q){var t=-1;break a}b+=q;if(q<m)break;"undefined"!=typeof f&&(f+=q)}t=b}(n(),v)[d>>2]=t;return 0}catch(x){if("undefined"==typeof K||"ErrnoError"!==x.name)throw x;return x.ig}}function O(a){return ei.get(a)}function Q(){ja.apply(null,Array.from(arguments))}function rl(){ia.apply(null,Array.from(arguments))}
function sl(a,b){E(a,b,"*")}function tl(a,b,c){const d=a.BYTES_PER_ELEMENT;return a.subarray(b/d,b/d+c)}function ul(a,b,c){const d=a.BYTES_PER_ELEMENT;return a.slice(b/d,b/d+c)}function vl(a,b){const c=[];tl((n(),u),a,b).forEach(function(d){c.push(F(d))});return c}function R(a){const b=Ri(a)+1,c=Qh(b);Uj(a,c,b);return c}function wl(a){const b=a.length,c=Qh(4*b);for(let d=0;d<b;d++)(n(),u)[(c>>2)+d]=R(a[d]);return c}function xl(a,b){for(let c=0;c<b;c++)B((n(),u)[(a>>2)+c]);B(a)}
function yl(a,b,c){Si(a,(n(),p),b,c)}var S=null,zl="en",Al=2,Bl=!1,Cl=!1,Dl=4,El=null,Fl=null,Gl=!1,Hl=!1,Il=[];function Jl(){Il.forEach(function(a){try{var b=gj(a,{lh:!1});if(!b.node.wg)throw new G(28);var c=b.node,d=c.wg,e=Gj(d);for([,g]of Object.entries(qj))for(;g;){var f=g.Qg;e.includes(g.mg)&&cj(g);var g=f}c.wg=null;c.mg.rh.splice(c.mg.rh.indexOf(d),1)}catch(h){rl("Already unmounted",h)}Gl&&D.Lg[a]&&(D.Lg[a].close(),delete D.Lg[a])});Il=[];Hl=Gl=!1}
function Kl(){if(Hl)return Q("Already syncing!"),Promise.resolve();Hl=!0;return new Promise(function(a){Hj(!1,function(b){b&&Q(`Failed to save IDB file system: ${b.message}`);Hl=!1;a(b)})})}function Ll(a,b){const c=a.lastIndexOf("/");let d="/";0<c&&(d=a.slice(0,c));try{fj(d)}catch(e){44!==e.ig&&Q(e),hj(d)}ij(a,new Uint8Array(b))}function Ml(){}var Nl=[],Ol=null;
function Pl(a){Ol.then(function(){const b=[];Nl.forEach(function(c){b.push(new Promise(c))});return Promise.all(b)}).then(function(){return Kl()}).then(function(){setTimeout(function(){a()},0)})}var Ql=null;function Rl(a){if(!Ql.has(a))throw new ReferenceError(`Could not find sample "${a}"`);return Ql.get(a)}
function Sl(a){if(null==a.gg)throw Error("couldn't duplicate a null audioBuffer");const b=Array(a.gg.numberOfChannels);for(var c=0;c<a.gg.numberOfChannels;c++){const d=new Float32Array(a.gg.getChannelData(c));b[c]=d}a=U.createBuffer(a.numberOfChannels,a.gg.length,a.gg.sampleRate);for(c=0;c<b.length;c++)a.copyToChannel(b[c],c,0);return a}
var Tl=class{static create(a,b={}){b=new Tl(a,b);Ql.set(a.id,b);return b}static delete(a){Ql.delete(a)}constructor(a,b={}){this.id=a.id;this.gg=null;this.numberOfChannels=b.numberOfChannels??2;this.sampleRate=b.sampleRate??44100;this.Ug=b.Ug??"disabled";this.Wh=b.Wh??0;this.loopEnd=b.loopEnd??0;this.gg=a.mi}clear(){this.gg=null;Tl.delete(this.id)}};
function Ul(a,b){if(8!==b.length)throw Error(`Volume length isn't "${8}", is ${b.length} instead`);a.pg.gain.value=b[0]??0;a.vg.gain.value=b[1]??0;a.yg.gain.value=b[7]??0;a.zg.gain.value=b[8]??0;a._c.gain.value=b[3]??0;a.ug.gain.value=b[4]??0}
var Vl=class{static create(a){return new Vl(a)}constructor(a){this.Pg=a;this.kg=U.createChannelSplitter(6);this.pg=U.createGain();this.vg=U.createGain();this.yg=U.createGain();this.zg=U.createGain();this._c=U.createGain();this.ug=U.createGain();this.gg=U.createChannelMerger(6);this.kg.connect(this.pg,0).connect(this.gg,0,0);this.kg.connect(this.vg,1).connect(this.gg,0,1);this.kg.connect(this.yg,2).connect(this.gg,0,2);this.kg.connect(this.zg,3).connect(this.gg,0,3);this.kg.connect(this._c,4).connect(this.gg,
0,4);this.kg.connect(this.ug,0).connect(this.gg,0,5);this.gg.connect(this.Pg.eh())}eh(){return this.kg}clear(){this.Pg=null;this.kg.disconnect();this.kg=null;this.pg.disconnect();this.pg=null;this.vg.disconnect();this.vg=null;this.yg.disconnect();this.yg=null;this.zg.disconnect();this.zg=null;this._c.disconnect();this._c=null;this.ug.disconnect();this.ug=null;this.gg.disconnect();this.gg=null}},Wl=null;function Xl(a){a=Wl.get(a)??null;null!=a&&a.clear()}
function Yl(a,b=!0){b?a.yg&&(a.vg=!0,a.zg=(U.currentTime-a.Hh)/a.Pg,a.gg.stop()):(Zl(a),a.vg=!1,a.zg=0)}function $l(a){null!=a.pg&&a.gg.removeEventListener("ended",a.pg);a.pg=()=>{if(!a.vg)switch(Rl(a.Sg).Ug){case "disabled":a.clear();break;case "forward":case "backward":a.vg=!1,a.zg=0,a.Hh=U.currentTime,Zl(a)}};a.gg.addEventListener("ended",a.pg)}function am(a,b){if(!a.ug.has(b)){const c=Vl.create(b);a.ug.set(b,c);a.gg.connect(c.eh())}return a.ug.get(b)}
async function bm(a,b){await cm;a.di||(a.gg.connect(dm(a)),b&&a.start())}function Zl(a){null!=a.gg&&a.gg.disconnect();a.gg=U.createBufferSource();a.gg.buffer=Sl(Rl(a.Sg));for(var b of a.ug.values())a.connect(b.eh());$l(a);b=a.vg?a.zg:0;null!=a.kg&&(a.kg.port.postMessage({type:"clear"}),a.gg.connect(a.kg));a.gg.start(a.startTime,a.offset+b);a.yg=!0}function em(a,b,c){for(let d=0;d<b.length;d++)Ul(am(a,b[d]),c.slice(8*d,8*d+8))}
function dm(a){if(null!=a.kg)return a.kg;0<fm.length?a.kg=fm.pop():a.kg=new AudioWorkletNode(U,"godot-position-reporting-processor");a.Gh=a.offset;a.kg.port.onmessage=c=>{switch(c.data.type){case "position":a.Gh=parseInt(c.data.data,10)/Rl(a.Sg).sampleRate+a.offset}};const b=a.kg.parameters.get("reset");b.setValueAtTime(1,U.currentTime);b.setValueAtTime(0,U.currentTime+1);return a.kg}
var gm=class{static create(a,b={}){b=new gm(a,b);Wl.set(a.id,b);return b}static delete(a){Wl.delete(a);null!=hm&&(a=R(a),hm(a),B(a))}constructor(a,b={}){this.id=a.id;this.Sg=a.Sg;this.offset=b.offset??0;this.Gh=b.offset;this.startTime=b.startTime??0;this.di=this.yg=this.vg=!1;this.zg=0;this.Pg=44100;this.Ug=b.Ug??Rl(this.Sg).Ug??"disabled";this.Fh=b.aj??1;this.Hh=0;this.ug=new Map;this.gg=U.createBufferSource();this.kg=this.pg=null;this.Pg=b.playbackRate??44100;this.gg.playbackRate.value=this.Pg*
this.Fh;this.gg.buffer=Sl(Rl(this.Sg));$l(this);a=im(a.ti);Ul(am(this,a),b.volume);bm(this,b.start).catch(c=>{const d=Error("Failed to create PositionWorklet.");d.cause=c;Q(d)})}start(){this.yg||(this.Hh=U.currentTime,this.gg.start(this.startTime,this.offset),this.yg=!0)}connect(a){return this.gg.connect(a)}clear(){this.di=!0;this.vg=!1;this.zg=0;null!=this.gg&&(this.gg.removeEventListener("ended",this.pg),this.pg=null,this.yg&&this.gg.stop(),this.gg.disconnect(),this.gg=null);for(const a of this.ug.values())a.clear();
this.ug.clear();this.kg&&(this.kg.disconnect(),this.kg.port.onmessage=null,fm.push(this.kg),this.kg=null);gm.delete(this.id)}},jm=null,km=null;function im(a){if(0>a||a>=jm.length)throw new ReferenceError(`invalid bus index "${a}"`);return jm[a]}function lm(a){return 0>a||a>=jm.length?null:jm[a]}function mm(a,b){const c=lm(a);if(null!=c){var d=jm.filter((e,f)=>f!==a);d.splice(b-1,0,c);jm=d}}
function nm(a,b){if(null==b){if(0==jm.indexOf(a)){a.gg.connect(U.destination);return}throw Error(`Cannot send to "${b}" without the bus being at index 0 (current index: ${jm.indexOf(a)})`);}a.connect(b)}function om(a){a.pg=!1;km=null;a.bh.gain.value=1;const b=jm.filter(c=>c!==a);for(let c=0;c<b.length;c++)b[c].bh.gain.value=1}function pm(a){a.pg=!0;km=a;a.bh.gain.value=1;const b=jm.filter(c=>c!==a);for(let c=0;c<b.length;c++)b[c].bh.gain.value=0}
var qm=class{static create(){const a=new qm,b=0===jm.length;jm.push(a);b?nm(a,null):nm(a,im(0));return a}constructor(){this.pg=!1;this.kg=U.createGain();this.bh=U.createGain();this.gg=U.createGain();this.kg.connect(this.bh).connect(this.gg)}eh(){return this.kg}connect(a){if(null==a)throw Error("cannot connect to null bus");this.gg.disconnect();this.gg.connect(a.eh());return a}clear(){jm=jm.filter(a=>a!==this)}},hm=null,U=null,rm=null,sm=null,tm=0,cm=null,fm=null;
function um(a,b,c){Ql=new Map;Wl=new Map;jm=[];km=null;fm=[];const d={};a&&(d.sampleRate=a);const e=new (window.AudioContext||window.webkitAudioContext)(d);U=e;e.onstatechange=function(){let f=0;switch(e.state){case "suspended":f=0;break;case "running":f=1;break;case "closed":f=2}b(f)};e.onstatechange();tm=setInterval(function(){let f=0;e.baseLatency&&(f+=U.baseLatency);e.outputLatency&&(f+=U.outputLatency);c(f)},1E3);Nl.push(vm);a=k.locateFile("godot.audio.position.worklet.js");cm=e.audioWorklet.addModule(a);
return e.destination.channelCount}
function wm(a){function b(c){try{rm=U.createMediaStreamSource(c),a(rm)}catch(d){Q("Failed creating input.",d)}}if(rm)return 0;if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia({audio:!0}).then(b,function(c){Q("Error getting user media.",c)});else{navigator.getUserMedia||(navigator.getUserMedia=navigator.webkitGetUserMedia||navigator.gg);if(!navigator.getUserMedia)return Q("getUserMedia not available."),1;navigator.getUserMedia({audio:!0},b,function(c){rl(c)})}return 0}
function vm(a){const b=U;U=null;if(b){tm&&(clearInterval(tm),tm=0);rm&&(rm.disconnect(),rm=null);var c=Promise.resolve();sm&&(c=sm.close());c.then(function(){return b.close()}).then(function(){b.onstatechange=null;a()}).catch(function(d){b.onstatechange=null;Q("Error closing AudioContext",d);a()})}else a()}function xm(a,b,c){a=Wl.get(a)??null;null!=a&&(b=b.map(d=>im(d)),em(a,b,c))}function ze(a){if(l)return C(41,1,a);a=F(a);a=Wl.get(a)??null;return null==a?0:a.Gh}
function Ae(){return l?C(42,1):U&&U.createScriptProcessor?1:0}function Be(){return l?C(43,1):U&&U.audioWorklet?1:0}function Ce(a,b,c,d){if(l)return C(44,1,a,b,c,d);b=O(c);d=O(d);c=Di(a,"i32");d=um(c,b,d);E(a,U.sampleRate,"i32");return d}function De(){return l?C(45,1):wm(function(a){a.connect(sm.Uh())})}function Ee(){if(l)return C(46,1);if(rm){const a=rm.mediaStream.getTracks();for(let b=0;b<a.length;b++)a[b].stop();rm.disconnect();rm=null}}
function Fe(){return l?C(47,1):window.AudioContext||window.webkitAudioContext?1:0}function Ge(){if(l)return C(48,1);U&&"running"!==U.state&&U.resume()}function He(a){if(l)return C(49,1,a);const b=qm.create();a!==jm.indexOf(b)&&mm(jm.indexOf(b),a)}function Ie(a,b){if(l)return C(50,1,a,b);mm(a,b)}function Je(a){if(l)return C(51,1,a);a=lm(a);null!=a&&a.clear()}
function Ke(a){if(l)return C(52,1,a);var b=jm;if(a!==b.length)if(a<b.length){const c=b.slice(a);for(let d=0;d<c.length;d++)c[d].clear();jm=b.slice(0,a)}else for(b=jm.length;b<a;b++)qm.create()}function Le(a,b){if(l)return C(53,1,a,b);a=lm(a);null!=a&&(a.gg.gain.value=b?0:1)}function Me(a,b){if(l)return C(54,1,a,b);a=lm(a);null!=a&&(b=lm(b),null==b&&(b=im(0)),nm(a,b))}function Ne(a,b){if(l)return C(55,1,a,b);a=lm(a);null!=a&&(b=!!b,a.pg!==b&&(b?(null!=km&&km!==a&&om(km),pm(a)):om(a)))}
function Oe(a,b){if(l)return C(56,1,a,b);a=lm(a);null!=a&&(b=Math.exp(.11512925464970228*b),isFinite(b)&&(a.kg.gain.value=b))}function Pe(a){if(l)return C(57,1,a);a=F(a);return Number(Wl.has(a))}
function Qe(a,b,c,d,e,f){if(l)return C(58,1,a,b,c,d,e,f);a=F(a);d=F(d);const g=U.sampleRate,h=tl((n(),w),b,c);b=tl((n(),w),b+4*c,c);c=U.createBuffer(2,c,g);c.copyToChannel(new Float32Array(h),0,0);c.copyToChannel(new Float32Array(b),1,0);Tl.create({id:a,mi:c},{Wh:e,loopEnd:f,Ug:d,numberOfChannels:2,sampleRate:g})}function Re(a){if(l)return C(59,1,a);hm=O(a)}function Se(a,b){if(l)return C(60,1,a,b);a=F(a);b=!!b;a=Wl.get(a)??null;null!=a&&Yl(a,b)}
function Te(a,b,c,d,e){if(l)return C(61,1,a,b,c,d,e);a=F(a);b=tl((n(),u),b,c);d=tl((n(),w),d,e);xm(a,Array.from(b),d)}function Ue(a,b,c,d,e,f){if(l)return C(62,1,a,b,c,d,e,f);a=F(a);b=F(b);f=tl((n(),w),f,8);d={offset:d,volume:f,playbackRate:1,aj:e,start:!0};Xl(a);gm.create({ti:c,id:a,Sg:b},d)}function Ve(a){if(l)return C(63,1,a);a=F(a);Xl(a)}function We(a){if(l)return C(64,1,a);a=F(a);return Number(null!=(Ql.get(a)??null))}
function Xe(a){if(l)return C(65,1,a);a=F(a);a=Ql.get(a)??null;null!=a&&a.clear()}function Ye(a,b){if(l)return C(66,1,a,b);a=F(a);a=Wl.get(a)??null;null!=a&&(a.Fh=b,a.gg.playbackRate.value=a.Pg*a.Fh)}
var ym={Jg:null,create:function(a,b){ym.Jg=U.createScriptProcessor(a,2,b);sm=ym;return ym.Jg.bufferSize},start:function(a,b,c,d,e){ym.Jg.onaudioprocess=function(f){var g=tl((n(),w),a,b),h=f.inputBuffer;if(rm){var m=h.getChannelData(0).length;for(var q=0;2>q;q++){var t=h.getChannelData(q);for(let x=0;x<m;x++)g[2*x+q]=t[x]}}e();g=tl((n(),w),c,d);f=f.outputBuffer;h=f.numberOfChannels;for(m=0;m<h;m++)for(q=f.getChannelData(m),t=0;t<q.length;t++)q[t]=g[t*h+m]};ym.Jg.connect(U.destination)},Uh:function(){return ym.Jg},
close:function(){return new Promise(function(a){ym.Jg.disconnect();ym.Jg.onaudioprocess=null;ym.Jg=null;a()})}};function Ze(a,b){if(l)return C(67,1,a,b);const c=Di(a,"i32");try{const d=ym.create(c,b);E(a,d,"i32")}catch(d){return Q("Error starting AudioDriverScriptProcessor",d),1}return 0}function $e(a,b,c,d,e){if(l)return C(68,1,a,b,c,d,e);e=O(e);ym.start(a,b,c,d,e)}
var V={promise:null,Dg:null,Jh:null,create:function(a){const b=k.locateFile("godot.audio.worklet.js");V.promise=U.audioWorklet.addModule(b).then(function(){V.Dg=new AudioWorkletNode(U,"godot-processor",{outputChannelCount:[a]});return Promise.resolve()});sm=V},start:function(a,b,c){V.promise.then(function(){const d=V.Dg;d.connect(U.destination);d.port.postMessage({cmd:"start",data:[c,a,b]});d.port.onmessage=function(e){Q(e.data)}})},Vj:function(a,b,c,d,e,f){V.Jh=new function(){let g=0,h=0,m=0;const q=
new Float32Array(b);this.dj=function(t){const x=tl((n(),w),d,e),A=h;let J=t.length,P=0;h+J>=e&&(P=e-h,x.set(t.subarray(0,P),h),J-=P,h=0);J&&x.set(t.subarray(P,J),h);f(A,t.length);h+=J};this.wi=function(t){var x=V.Dg.port;m+=t;if(0!==m){t=tl((n(),w),a,b);var A=t.length,J=m;c(g,m);if(g+m>=A){const P=A-g;q.set(t.subarray(g,A));m-=P;g=0}0<m&&q.set(t.subarray(g,g+m),J-m);x.postMessage({cmd:"chunk",data:q.subarray(0,J)});g+=m;m=0}}};V.promise.then(function(){const g=V.Dg,h=ul((n(),w),a,b);g.connect(U.destination);
g.port.postMessage({cmd:"start_nothreads",data:[h,e]});g.port.onmessage=function(m){V.Dg&&("read"===m.data.cmd?V.Jh.wi(m.data.data):"input"===m.data.cmd?(m=m.data.data,m.length>e?Q("Input chunk is too big"):V.Jh.dj(m)):Q(m.data))}})},Uh:function(){return V.Dg},close:function(){return new Promise(function(a){null!==V.promise&&V.promise.then(function(){V.Dg.port.postMessage({cmd:"stop",data:null});V.Dg.disconnect();V.Dg.port.onmessage=null;V.Dg=null;V.promise=null;a()}).catch(function(b){Q(b)})})}};
function af(a){if(l)return C(69,1,a);try{V.create(a)}catch(b){return Q("Error starting AudioDriverWorklet",b),1}return 0}function bf(a,b,c,d,e){if(l)return C(70,1,a,b,c,d,e);c=tl((n(),w),c,d);a=tl((n(),w),a,b);e=tl((n(),u),e,4);V.start(a,c,e)}function cf(a,b,c){return Atomics.add((n(),u),(a>>2)+b,c)}function df(a,b){return Atomics.load((n(),u),(a>>2)+b)}function ef(a,b,c,d){Atomics.wait((n(),u),(a>>2)+b,c,d);return Atomics.load((n(),u),(a>>2)+b)}
function ff(a,b){if(l)return C(71,1,a,b);yl(`#${S.id}`,a,b)}function gf(a,b){if(l)return C(72,1,a,b);yl(zl,a,b)}var zm="default",Am=!0,Bm={};function Cm(a){let b=zm=a;a in Bm&&(a=Bm[a],b=`url("${a.url}") ${a.x} ${a.y}, default`);Am&&(S.style.cursor=b)}function Dm(){S.style.cursor="";zm="default";Am=!0;Object.keys(Bm).forEach(function(a){URL.revokeObjectURL(Bm[a]);delete Bm[a]})}var Em=[];
function Fm(a,b,c,d){return-1!==Em.findIndex(function(e){return e.target===a&&e.event===b&&e.method===c&&e.capture===d})}function W(a,b,c,d){Fm(a,b,c,d)||(Em.push(new function(e,f,g,h){this.target=e;this.event=f;this.method=g;this.capture=h}(a,b,c,d)),a.addEventListener(b,c,d))}function Gm(){Em.forEach(function(a){a.target.removeEventListener(a.event,a.method,a.capture)});Em.length=0}var Hm=[0,0],Im=!0;
function Jm(){const a=document.fullscreenElement||document.kg||document.webkitFullscreenElement||document.msFullscreenElement;return a?a===S:document.gg||document.mozFullScreen||document.pg}function Km(){if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled))return 1;const a=S;try{const b=(a.requestFullscreen||a.msRequestFullscreen||a.mozRequestFullScreen||a.Qj||a.webkitRequestFullscreen).call(a);b&&b.catch(function(){})}catch(b){return 1}return 0}
function Lm(){if(!Jm())return 0;try{const a=document.exitFullscreen();a&&a.catch(function(){})}catch(a){return 1}return 0}function Mm(){var a=Uh();(a=mk[a])&&vk(a)}
function Nm(){var a=Jm();const b=2===Al,c=S;let d=Hm[0],e=Hm[1];if(0===Al)return c.width!==d||c.height!==e?(Hm=[c.width,c.height],Mm(),1):0;var f=Im?window.devicePixelRatio||1:1;if(a||b)d=Math.floor(window.innerWidth*f),e=Math.floor(window.innerHeight*f);a=`${Math.floor(d/f)}px`;f=`${Math.floor(e/f)}px`;return c.style.width!==a||c.style.height!==f||c.width!==d||c.height!==e?(c.width=d,c.height=e,c.style.width=a,c.style.height=f,Mm(),1):0}var Om=[];
function Pm(){try{const a=navigator.getGamepads();return a?a:[]}catch(a){return[]}}
function Qm(a){function b(d){if(d.mapping)var e=d.mapping;else{var f=navigator.userAgent;e="Unknown";0<=f.indexOf("Android")?e="Android":0<=f.indexOf("Linux")?e="Linux":0<=f.indexOf("iPhone")?e="iOS":0<=f.indexOf("Macintosh")?e="MacOSX":0<=f.indexOf("Windows")&&(e="Windows");var g=d.id,h=/vendor: ([0-9a-f]{4}) product: ([0-9a-f]{4})/i,m=/^([0-9a-f]+)-([0-9a-f]+)-/i,q=f="";h.test(g)?(g=h.exec(g),f=g[1].padStart(4,"0"),q=g[2].padStart(4,"0")):m.test(g)&&(g=m.exec(g),f=g[1].padStart(4,"0"),q=g[2].padStart(4,
"0"));e=f&&q?e+f+q:`${e}Unknown`}f=e;e=R(d.id);f=R(f);a(d.index,1,e,f);B(e);B(f)}Om=[];const c=Pm();for(let d=0;d<c.length;d++)c[d]&&b(c[d]);W(window,"gamepadconnected",function(d){d.gamepad&&b(d.gamepad)},!1);W(window,"gamepaddisconnected",function(d){d.gamepad&&a(d.gamepad.index,0)},!1)}var Rm=[],Sm=[];function Tm(a){a.isDirectory?Um(a):a.isFile?Vm(a):Q("Unrecognized entry...",a)}
function Um(a){Rm.push(new Promise(function(b){a.createReader().readEntries(function(c){for(let d=0;d<c.length;d++)Tm(c[d]);b()})}))}function Vm(a){Rm.push(new Promise(function(b,c){a.file(function(d){const e=new FileReader;e.onload=function(){const f={path:d.Sj||d.webkitRelativePath,name:d.name,type:d.type,size:d.size,data:e.result};f.path||(f.path=f.name);Sm.push(f);b()};e.onerror=function(){rl("Error reading file");c()};e.readAsArrayBuffer(d)},function(){rl("Error!");c()})}))}
function Wm(a,b){0===Rm.length?a():Rm.pop().then(function(){setTimeout(function(){Wm(a,b)},0)})}
function Xm(a,b){a.preventDefault();if(a.dataTransfer.items)for(let c=0;c<a.dataTransfer.items.length;c++){const d=a.dataTransfer.items[c];let e=null;"getAsEntry"in d?e=d.Mj():"webkitGetAsEntry"in d&&(e=d.webkitGetAsEntry());e&&Tm(e)}else Q("File upload not supported");(new Promise(Wm)).then(function(){const c=`/tmp/drop-${parseInt(1073741824*Math.random(),10)}/`,d=[],e=[];Kj(c.slice(0,-1));Sm.forEach(f=>{const g=f.path;Ll(c+g,f.data);f=g.indexOf("/");if(-1===f)d.push(c+g);else{const h=g.substr(0,
f);f=h.indexOf("/");0>f&&-1===d.indexOf(c+h)&&d.push(c+h)}e.push(c+g)});Rm=[];Sm=[];b(d);Cl?Nl.push(function(f){Ym(e,c);f()}):Ym(e,c)})}function Ym(a,b){const c=[b.substr(0,b.length-1)];a.forEach(function(d){mj(d);d=d.replace(b,"");let e=d.lastIndexOf("/");for(;0<e;)d=d.substr(0,e),-1===c.indexOf(b+d)&&c.push(b+d),e=d.lastIndexOf("/")});c.sort(function(d,e){d=(d.match(/\//g)||[]).length;e=(e.match(/\//g)||[]).length;return d>e?-1:d<e?1:0}).forEach(function(d){lj(d)})}
function Zm(a){return function(b){Xm(b,a)}}var $m=null,an=!1,bn=-1;function cn(a){function b(){null==$m?(clearInterval(bn),bn=-1):$m.focus()}-1<bn&&(clearInterval(bn),bn=-1);null!=$m&&((an=a)?($m.style.display="block",bn=setInterval(b,100)):($m.style.display="none",S.focus()))}
function dn(a,b,c,d){function e(h,m){const q=m.shiftKey+0+(m.altKey+0<<1)+(m.ctrlKey+0<<2)+(m.metaKey+0<<3);yl(m.code,c,32);yl(m.key,d,32);b(h,m.repeat,q);m.preventDefault()}function f(h){if(null!=$m)switch(h.type){case "compositionstart":a(0,null);$m.innerHTML="";break;case "compositionupdate":h=R(h.data);a(1,h);B(h);break;case "compositionend":h=R(h.data),a(2,h),B(h),$m.innerHTML=""}}const g=document.createElement("div");g.className="ime";g.style.background="none";g.style.opacity=0;g.style.position=
"fixed";g.style.textAlign="left";g.style.fontSize="1px";g.style.left="0px";g.style.top="0px";g.style.width="100%";g.style.height="40px";g.style.pointerEvents="none";g.style.display="none";g.contentEditable="true";W(g,"compositionstart",f,!1);W(g,"compositionupdate",f,!1);W(g,"compositionend",f,!1);W(g,"keydown",e.bind(null,1),!1);W(g,"keyup",e.bind(null,0),!1);g.onblur=function(){this.style.display="none";S.focus();an=!1};S.parentElement.appendChild(g);$m=g}var en=null,fn=null;
function gn(a){return a.shiftKey+0+(a.altKey+0<<1)+(a.ctrlKey+0<<2)+(a.metaKey+0<<3)}function hn(a,b){const c=S;return[c.width/b.width*(a.clientX-b.x),c.height/b.height*(a.clientY-b.y)]}
function jn(a,b){if(null==en)throw new TypeError("GodotInput.onKeyEvent(): GodotInput.inputKeyCallback is null, cannot process key event.");if(null==fn)throw new TypeError("GodotInput.onKeyEvent(): GodotInput.setInputKeyData is null, cannot process key event.");const c=gn(b);fn(b.code,b.key);en(a?1:0,b.repeat,c);b.preventDefault()}var kn=null,ln=null;
function mn(a){function b(c){const d=document.createElement(c);d.style.display="none";d.style.position="absolute";d.style.zIndex="-1";d.style.background="transparent";d.style.padding="0px";d.style.margin="0px";d.style.overflow="hidden";d.style.width="0px";d.style.height="0px";d.style.border="0px";d.style.outline="none";d.ei=!0;d.disabled=!0;W(d,"input",function(){const e=R(d.value);a(e,d.selectionEnd);B(e)},!1);"input"===c&&(W(d,"keydown",e=>{"Enter"===e.key&&jn(!0,e)},!1),W(d,"keyup",e=>{"Enter"===
e.key&&jn(!1,e)},!1));W(d,"blur",function(){d.style.display="none";d.ei=!0;d.disabled=!0},!1);S.insertAdjacentElement("beforebegin",d);return d}kn=b("input");ln=b("textarea");nn()}function on(){kn&&ln&&[kn,ln].forEach(function(a){a.blur();a.style.display="none";a.value=""})}function nn(){function a(c){c.style.left=`${b.left}px`;c.style.top=`${b.top}px`;c.style.width=`${b.width}px`;c.style.height=`${b.height}px`}if(kn&&ln){var b=S.getBoundingClientRect();a(kn);a(ln)}}var pn="";
function hf(a){if(l)return C(73,1,a);window.alert(F(a))}function jf(){if(l)return C(74,1);S.focus()}function kf(){return l?C(75,1):document.activeElement===S}function lf(a){if(l)return C(76,1,a);const b=O(a);try{navigator.clipboard.readText().then(function(c){c=R(c);b(c);B(c)}).catch(function(){})}catch(c){}}
function mf(a){if(l)return C(77,1,a);a=F(a);if(!navigator.clipboard||!navigator.clipboard.writeText)return 1;navigator.clipboard.writeText(a).catch(function(b){Q("Setting OS clipboard is only possible from an input callback for the Web platform. Exception:",b)});return 0}function nf(){return l?C(78,1):!Am}function of(){return l?C(79,1):document.pointerLockElement===S?1:0}
function pf(a){if(l)return C(80,1,a);a?(a=S,a.requestPointerLock&&a.requestPointerLock()):document.exitPointerLock&&document.exitPointerLock()}function qf(a,b,c,d,e){if(l)return C(81,1,a,b,c,d,e);a=F(a);const f=Bm[a];0<c?(b=new Blob([ul((n(),r),b,c)],{type:"image/png"}),b=URL.createObjectURL(b),Bm[a]={url:b,x:d,y:e}):delete Bm[a];a===zm&&Cm(zm);f&&URL.revokeObjectURL(f.url)}function rf(a){if(l)return C(82,1,a);Cm(F(a))}
function sf(a){if(l)return C(83,1,a);a=0!==a;a!==Am&&((Am=a)?Cm(zm):S.style.cursor="none")}function tf(a,b){if(l)return C(84,1,a,b);Hm=[a,b];Nm()}function uf(a){function b(e){e.target===c&&d(Jm())}if(l)return C(85,1,a);const c=S,d=O(a);W(document,"fullscreenchange",b,!1);W(document,"mozfullscreenchange",b,!1);W(document,"webkitfullscreenchange",b,!1)}function vf(){return l?C(86,1):Lm()}function wf(){return l?C(87,1):Km()}
function xf(a){if(l)return C(88,1,a);if(1!==a&&2!==a)return!1;try{return!!document.createElement("canvas").getContext(2===a?"webgl2":"webgl")}catch(b){}return!1}function yf(){return l?C(89,1):-1!==["Windows","Win64","Win32","WinCE"].indexOf(navigator.platform||"")?1:0}function zf(a,b,c,d,e){if(l)return C(90,1,a,b,c,d,e);const f=S,g=O(a),h=[b,c,d,e];["mouseover","mouseleave","focus","blur"].forEach(function(m,q){W(f,m,function(){g(h[q])},!0)})}
function Af(){return l?C(91,1):Im?window.devicePixelRatio||1:1}function Bf(){if(l)var a=C(92,1);else a=Math.round(96*window.devicePixelRatio),a=96<=a?a:96;return a}function Cf(a,b){if(l)return C(93,1,a,b);const c=Im?window.devicePixelRatio||1:1;E(a,window.screen.width*c,"i32");E(b,window.screen.height*c,"i32")}
function Df(a,b,c,d){if(l)return C(94,1,a,b,c,d);const e=S;W(e,"contextmenu",function(f){f.preventDefault()},!1);W(e,"webglcontextlost",function(f){alert("WebGL context lost, please reload the page");f.preventDefault()},!1);Im=!!d;switch(Al){case 0:Hm=[e.width,e.height];break;case 1:Hm=[a,b];break;default:e.style.position="absolute",e.style.top=0,e.style.left=0}Nm();c&&Km()}function Ef(){if(l)return C(95,1);const a=Nm();a&&nn();return a}function Ff(){return l?C(96,1):"ontouchstart"in window}
function Gf(){return l?C(97,1):"speechSynthesis"in window}function Hf(){return l?C(98,1):Bl&&"ontouchstart"in window}function If(a){if(l)return C(99,1,a);a=O(a);Bl&&"ontouchstart"in window&&mn(a)}function Jf(){if(l)return C(100,1);on()}
function Kf(a,b,c,d){if(l)return C(101,1,a,b,c,d);a=F(a);c=0<c?c:0;d=0<d?d:c;if(kn&&ln){""===kn.style.display&&""===ln.style.display||on();nn();var e=kn;switch(b){case 0:e.type="text";e.Og="";break;case 1:e=ln;break;case 2:e.type="text";e.Og="numeric";break;case 3:e.type="text";e.Og="decimal";break;case 4:e.type="tel";e.Og="";break;case 5:e.type="email";e.Og="";break;case 6:e.type="password";e.Og="";break;case 7:e.type="url";e.Og="";break;default:e.type="text",e.Og=""}e.ei=!1;e.disabled=!1;e.value=
a;e.style.display="block";e.focus();e.setSelectionRange(c,d)}}function Lf(a){if(l)return C(102,1,a);const b=O(a);W(window,"blur",function(){b()},!1)}function Mf(a,b){if(l)return C(103,1,a,b);let c=document.getElementById("-gd-engine-icon");const d=pn;a?(null===c&&(c=document.createElement("link"),c.rel="icon",c.id="-gd-engine-icon",document.head.appendChild(c)),a=new Blob([ul((n(),r),a,b)],{type:"image/png"}),pn=URL.createObjectURL(a),c.href=pn):(c&&c.remove(),pn=null);d&&URL.revokeObjectURL(d)}
function Nf(a,b){if(l)return C(104,1,a,b);E(a,S.width,"i32");E(b,S.height,"i32")}function Of(a){if(l)return C(105,1,a);document.title=F(a)}function Pf(){return l?C(106,1):R("4.0.20")}
function Qf(a,b,c,d,e,f){b=F(a);a=null;try{a=(0,eval)(b)}catch(g){Q(g)}switch(typeof a){case "boolean":return E(c,a,"i32"),1;case "number":return E(c,a,"double"),3;case "string":return sl(c,R(a)),4;case "object":if(null!==a&&(!ArrayBuffer.isView(a)||a instanceof Uint8Array?a instanceof ArrayBuffer&&(a=new Uint8Array(a)):a=new Uint8Array(a.buffer),a instanceof Uint8Array))return c=O(f)(d,e,a.length),(n(),r).set(a,c),29}return 0}var qn=0,X={};function rn(a){const b=++qn;X[b]=a;return b}
function sn(a){delete X[a]}function tn(a,b){if(a=X[a])b.value&&a.zh.push(b.value),a.uh=!1,a.done=b.done}function un(a,b){if(a=X[a]){var c=!1;b.headers.forEach(function(d,e){d=d.toLowerCase().trim();"transfer-encoding"===e.toLowerCase().trim()&&"chunked"===d&&(c=!0)});a.status=b.status;a.response=b;a.Xg=b.body?.getReader();a.vi=c}}function vn(a,b){Q(b);if(a=X[a])a.error=b}
function wn(a,b,c,d){const e={request:null,response:null,Xg:null,error:null,done:!1,uh:!1,status:0,zh:[]},f=rn(e);e.request=fetch(b,{method:a,headers:c,body:d});e.request.then(un.bind(null,f)).catch(vn.bind(null,f));return f}function xn(a){const b=X[a];b&&(sn(a),b.request&&b.request.then(function(c){c.abort()}).catch(function(){}))}
function Rf(a,b,c,d,e,f){if(l)return C(107,1,a,b,c,d,e,f);a=F(a);b=F(b);c=vl(c,d);e=f?ul((n(),p),e,f):null;return wn(a,b,c.map(function(g){const h=g.indexOf(":");return 0>=h?[]:[g.slice(0,h).trim(),g.slice(h+1).trim()]}).filter(function(g){return 2===g.length}),e)}function Sf(a){if(l)return C(108,1,a);xn(a)}function Tf(a){return l?C(109,1,a):(a=X[a])&&a.response?a.status:0}function Uf(a){return l?C(110,1,a):(a=X[a])&&a.response?a.vi?1:0:-1}
function Vf(a,b,c){if(l)return C(111,1,a,b,c);const d=X[a];if(!d||!d.response)return 0;let e=c;const f=d.zh;for(;e&&f.length;){const m=d.zh[0];if(m.length>e){var g=(n(),p),h=m.slice(0,e);g.set(h,b/h.BYTES_PER_ELEMENT);f[0]=m.slice(e);e=0}else(n(),p).set(m,b/m.BYTES_PER_ELEMENT),e-=m.length,f.pop()}!f.length&&(b=X[a])&&(b.Xg&&!b.uh?b.done?b.Xg=null:(b.uh=!0,b.Xg.read().then(tn.bind(null,a)).catch(vn.bind(null,a))):null==b.Xg&&null==b.response.body&&(b.uh=!0,tn(a,{value:void 0,done:!0})));return c-
e}function Wf(a,b,c){if(l)return C(112,1,a,b,c);a=X[a];if(!a||!a.response)return 1;b=O(b);const d=[];a.response.headers.forEach(function(e,f){d.push(`${f}:${e}`)});a=wl(d);b(d.length,a,c);xl(a,d.length);return 0}function Xf(a){if(l)return C(113,1,a);a=X[a];return!a||a.error?-1:a.response?a.Xg||null==a.response.body&&!a.done?1:a.done?2:-1:0}
function Yf(a){if(l)return C(114,1,a);const b=O(a);a=S;W(a,"dragover",function(c){c.preventDefault()},!1);W(a,"drop",Zm(function(c){var d=c||[];d.length&&(c=d.length,d=wl(d),b(d,c),xl(d,c))}))}function Zf(a){if(l)return C(115,1,a);a=O(a);Qm(a)}
function $f(){if(l)return C(116,1);const a=Pm(),b=[];for(let d=0;d<a.length;d++){const e=a[d];if(!e){b.push(null);continue}const f={ij:"standard"===e.mapping,buttons:[],axes:[],connected:e.connected};for(var c=0;c<e.buttons.length;c++)f.buttons.push(e.buttons[c].value);for(c=0;c<e.axes.length;c++)f.axes.push(e.axes[c]);b.push(f)}Om=b;return 0}function ag(){return l?C(117,1):Om.length}
function bg(a,b,c,d,e,f){if(l)return C(118,1,a,b,c,d,e,f);var g=Om;a=a<g.length?g[a]:null;if(!a||!a.connected)return 1;g=a.buttons;const h=16>g.length?g.length:16;for(let m=0;m<h;m++)E(b+(m<<2),g[m],"float");E(c,h,"i32");b=a.axes;c=10>b.length?b.length:10;for(g=0;g<c;g++)E(d+(g<<2),b[g],"float");E(e,c,"i32");E(f,a.ij?1:0,"i32");return 0}function cg(a,b,c){if(l)return C(119,1,a,b,c);en=O(a);fn=(d,e)=>{yl(d,b,32);yl(e,c,32)};W(S,"keydown",jn.bind(null,!0),!1);W(S,"keyup",jn.bind(null,!1),!1)}
function dg(a){function b(e,f){var g=d.getBoundingClientRect();g=hn(f,g);const h=gn(f);e&&S.focus();c(e,f.button,g[0],g[1],h)&&f.preventDefault()}if(l)return C(120,1,a);const c=O(a),d=S;W(d,"mousedown",b.bind(null,1),!1);W(window,"mouseup",b.bind(null,0),!1)}function eg(a){if(l)return C(121,1,a);const b=O(a),c=S;W(window,"pointermove",function(d){const e=c.getBoundingClientRect(),f=hn(d,e);b(f[0],f[1],c.width/e.width*d.movementX,c.height/e.height*d.movementY,gn(d),d.pressure)},!1)}
function fg(a){if(l)return C(122,1,a);const b=O(a);W(S,"wheel",function(c){b(c.deltaMode,c.deltaX??0,c.deltaY??0)&&c.preventDefault()},!1)}function gg(a){if(l)return C(123,1,a);const b=O(a);W(window,"paste",function(c){c=c.clipboardData.getData("text");c=R(c);b(c);B(c)},!1)}
function hg(a,b,c){function d(g,h){0===g&&S.focus();const m=f.getBoundingClientRect(),q=h.changedTouches;for(let t=0;t<q.length;t++){const x=q[t],A=hn(x,m);E(c+16*t,A[0],"double");E(c+8*(2*t+1),A[1],"double");E(b+4*t,x.identifier,"i32")}e(g,q.length);h.cancelable&&h.preventDefault()}if(l)return C(124,1,a,b,c);const e=O(a),f=S;W(f,"touchstart",d.bind(null,0),!1);W(f,"touchend",d.bind(null,1),!1);W(f,"touchcancel",d.bind(null,1),!1);W(f,"touchmove",d.bind(null,2),!1)}
function ig(a){if(l)return C(125,1,a);"function"!==typeof navigator.vibrate?rl("This browser does not support vibration."):navigator.vibrate(a)}function jg(){return l?C(126,1):an}function kg(a,b,c,d){if(l)return C(127,1,a,b,c,d);a=ul((n(),p),a,b);c=F(c);d=F(d);d=window.URL.createObjectURL(new Blob([a],{type:d}));a=document.createElement("a");a.href=d;a.download=c;a.style.display="none";document.body.appendChild(a);a.click();a.remove();window.URL.revokeObjectURL(d)}
function lg(a){if(l)return C(128,1,a);a=F(a);a=JSON.parse(a);return El?(El(a),0):1}function mg(a){if(l)return C(129,1,a);a=O(a);Pl(a)}function ng(){return l?C(130,1):Gl?1:0}function og(a){if(l)return C(131,1,a);const b=O(a);Ol=Kl();Ol.then(function(){b()})}
function pg(a){if(l)return C(132,1,a);a=F(a);const b=navigator.userAgent;return"web_macos"===a?-1!==b.indexOf("Mac")?1:0:"web_windows"===a?-1!==b.indexOf("Windows")?1:0:"web_android"===a?-1!==b.indexOf("Android")?1:0:"web_ios"===a?-1!==b.indexOf("iPhone")||-1!==b.indexOf("iPad")||-1!==b.indexOf("iPod")?1:0:"web_linuxbsd"===a?-1!==b.indexOf("CrOS")||-1!==b.indexOf("BSD")||-1!==b.indexOf("Linux")||-1!==b.indexOf("X11")?1:0:0}
function qg(){if(l)return C(133,1);const a=navigator.hardwareConcurrency||1;return 2>a?a:2}function rg(a){if(l)return C(134,1,a);Ml=O(a)}function sg(a){if(l)return C(135,1,a);window.open(F(a),"_blank")}function tg(){return l?C(136,1):"undefined"===typeof Bi?1:Dl}var yn=!1;function zn(a,b){b&&b.active&&(b.waiting&&(yn=!0,a()),W(b,"updatefound",function(){const c=b.installing;W(c,"statechange",function(){"installed"===c.state&&(yn=!0,a())})}))}
function ug(a){if(l)return C(137,1,a);if("serviceWorker"in navigator)try{const b=O(a);navigator.serviceWorker.getRegistration().then(zn.bind(null,b))}catch(b){Q("Failed to assign PWA callback",b)}}function vg(){if(l)return C(138,1);if("serviceWorker"in navigator&&yn){try{navigator.serviceWorker.getRegistration().then(function(a){a&&a.waiting&&a.waiting.postMessage("update")})}catch(a){return Q(a),1}return 0}return 1}
function An(a,b,c,d,e){if(a=X[a])a.binaryType="arraybuffer",a.onopen=function(){b()},a.onclose=function(){e()},a.onerror=function(){d()},a.onmessage=function(f){let g=0;if(f.data instanceof ArrayBuffer)f=new Uint8Array(f.data);else{if(f.data instanceof Blob){Q("Blob type not supported");return}if("string"===typeof f.data){g=1;var h=new TextEncoder("utf-8");f=new Uint8Array(h.encode(f.data))}else{Q("Unknown message type");return}}h=f.length*f.BYTES_PER_ELEMENT;const m=Qh(h);(n(),r).set(f,m);c(m,h,
g);B(m)}}function Bn(a){if(a=X[a])a.onopen=null,a.onmessage=null,a.onerror=null,a.onclose=null,a.close()}function Cn(a,b,c){return(a=X[a])&&void 0!==a[b]?a[b]:c}function wg(a){if(l)return C(139,1,a);X[a]&&Bn(a)}function xg(a,b,c,d,e,f){if(l)return C(140,1,a,b,c,d,e,f);c=O(c).bind(null,b);d=O(d).bind(null,b);e=O(e).bind(null,b);b=O(f).bind(null,b);An(a,c,d,e,b)}function yg(a){if(l)return C(141,1,a);Bn(a);sn(a)}function zg(a){return l?C(142,1,a):Cn(a,"bufferedAmount",0)}
function Ag(a){return l?C(143,1,a):Cn(a,"id",65535)}function Bg(a){return l?C(144,1,a):Cn(a,"negotiated",65535)}function Cg(a){return l?C(145,1,a):Cn(a,"ordered",!0)}function Dg(a){return l?C(146,1,a):(a=X[a])&&a.label?R(a.label):0}function Eg(a){return l?C(147,1,a):(a=X[a])?void 0!==a.maxPacketLifeTime?a.maxPacketLifeTime:void 0!==a.maxRetransmitTime?a.maxRetransmitTime:65535:65535}function Fg(a){return l?C(148,1,a):Cn(a,"maxRetransmits",65535)}
function Gg(a){return(a=X[a])&&a.protocol?R(a.protocol):0}function Hg(a){if(l)return C(149,1,a);a=X[a];if(!a)return 3;switch(a.readyState){case "connecting":return 0;case "open":return 1;case "closing":return 2;default:return 3}}function Ig(a,b,c,d){if(l)return C(150,1,a,b,c,d);a=X[a];if(!a)return 1;const e=new Uint8Array(c);for(let f=0;f<c;f++)e[f]=Di(b+f,"i8");d?a.send(e.buffer):(b=(new TextDecoder("utf-8")).decode(e),a.send(b));return 0}
var Dn={$h:0,Cj:1,connected:2,zi:3,Di:4,closed:5},En={$h:0,Aj:1,connected:2,Bj:2,zi:3,Di:4,closed:5},Fn={$h:0,Lj:1,complete:2},Gn={Uj:0,"have-local-offer":1,"have-remote-offer":2,"have-local-pranswer":3,"have-remote-pranswer":4,closed:5};
function Hn(a,b,c,d,e,f){let g=null;try{g=new RTCPeerConnection(a)}catch(m){return Q(m),0}const h=rn(g);"connectionState"in g&&void 0!==g.connectionState?g.onconnectionstatechange=function(){X[h]&&b(Dn[g.connectionState]||0)}:g.oniceconnectionstatechange=function(){X[h]&&b(En[g.iceConnectionState]||0)};g.onicegatheringstatechange=function(){X[h]&&d(Fn[g.iceGatheringState]||0)};g.onsignalingstatechange=function(){X[h]&&c(Gn[g.signalingState]||0)};g.onicecandidate=function(m){if(X[h]&&(m=m.candidate)&&
m.candidate){var q=R(m.candidate),t=R(m.sdpMid);e(t,m.sdpMLineIndex,q);B(q);B(t)}};g.ondatachannel=function(m){X[h]&&(m=rn(m.channel),f(m))};return h}function In(a,b,c){X[a]&&(a=R(c.type),c=R(c.sdp),b(a,c),B(a),B(c))}function Jg(a){if(l)return C(151,1,a);(a=X[a])&&a.close()}function Kg(a,b,c,d,e,f,g){function h(m){return O(m).bind(null,b)}return l?C(152,1,a,b,c,d,e,f,g):Hn(JSON.parse(F(a)),h(c),h(e),h(d),h(f),h(g))}
function Lg(a,b,c){if(l)return C(153,1,a,b,c);try{const d=X[a];if(!d)return 0;const e=F(b),f=JSON.parse(F(c)),g=d.createDataChannel(e,f);return rn(g)}catch(d){return Q(d),0}}function Mg(a){if(l)return C(154,1,a);const b=X[a];b&&(b.onconnectionstatechange=null,b.oniceconnectionstatechange=null,b.onicegatheringstatechange=null,b.onsignalingstatechange=null,b.onicecandidate=null,b.ondatachannel=null,sn(a))}
function Ng(a,b,c,d){if(l)return C(155,1,a,b,c,d);if(a=X[a])b=F(b),d=F(d),a.addIceCandidate(new RTCIceCandidate({candidate:d,sdpMid:b,sdpMlineIndex:c}))}function Og(a,b,c,d,e){if(l)return C(156,1,a,b,c,d,e);const f=X[a];if(f){b=F(b);c=F(c);var g=O(e).bind(null,d);f.setLocalDescription({sdp:c,type:b}).catch(function(h){X[a]&&(Q(h),g())})}}
function Pg(a,b,c,d){if(l)return C(157,1,a,b,c,d);const e=X[a];if(e){var f=O(c).bind(null,b),g=O(d).bind(null,b);e.createOffer().then(function(h){In(a,f,h)}).catch(function(h){X[a]&&(Q(h),g())})}}
function Qg(a,b,c,d,e,f){if(l)return C(158,1,a,b,c,d,e,f);const g=X[a];if(g){var h=F(b);b=F(c);var m=O(f).bind(null,d),q=O(e).bind(null,d);g.setRemoteDescription({sdp:b,type:h}).then(function(){return"offer"!==h?Promise.resolve():g.createAnswer().then(function(t){In(a,q,t)})}).catch(function(t){X[a]&&(Q(t),m())})}}function Rg(a){if(l)return C(159,1,a);cn(a)}function Sg(a,b,c,d){if(l)return C(160,1,a,b,c,d);a=O(a);b=O(b);dn(a,b,c,d)}
function Tg(a,b){if(l)return C(161,1,a,b);if(null!=$m){var c=S,d=c.getBoundingClientRect();b=b/(c.height/d.height)+d.y;$m.style.left=`${a/(c.width/d.width)+d.x}px`;$m.style.top=`${b}px`}}function Ug(a){if(l)return C(162,1,a);a=O(a);try{const b=[],c=window.speechSynthesis.getVoices();for(let e=0;e<c.length;e++)b.push(`${c[e].lang};${c[e].name}`);const d=wl(b);a(b.length,d);xl(d,b.length)}catch(b){}}function Vg(){return l?C(163,1):window.speechSynthesis.paused}
function Wg(){return l?C(164,1):window.speechSynthesis.gg}function Xg(){if(l)return C(165,1);window.speechSynthesis.pause()}function Yg(){if(l)return C(166,1);window.speechSynthesis.resume()}
function Zg(a,b,c,d,e,f,g){if(l)return C(167,1,a,b,c,d,e,f,g);g=O(g);a=new SpeechSynthesisUtterance(F(a));a.rate=e;a.pitch=d;a.volume=c/100;a.addEventListener("end",function(h){h.currentTarget.cb(1,h.currentTarget.id,0)});a.addEventListener("start",function(h){h.currentTarget.cb(0,h.currentTarget.id,0)});a.addEventListener("error",function(h){h.currentTarget.cb(2,h.currentTarget.id,0)});a.addEventListener("boundary",function(h){h.currentTarget.cb(3,h.currentTarget.id,h.zj)});a.id=f;a.cb=g;b=F(b);
c=window.speechSynthesis.getVoices();for(d=0;d<c.length;d++)if(c[d].name===b){a.voice=c[d];break}window.speechSynthesis.resume();window.speechSynthesis.speak(a)}function $g(){if(l)return C(168,1);window.speechSynthesis.cancel();window.speechSynthesis.resume()}var Jn=[],Kn={};function ah(){if(l)return C(169,1);for(const a of Jn)a.abort();Jn=[]}
function bh(a,b,c,d){if(l)return C(170,1,a,b,c,d);if(Kn.Nj)return 0;if(!navigator.requestMIDIAccess)return 2;const e=O(a),f=O(b);navigator.requestMIDIAccess().then(g=>{g=[...g.inputs.values()];const h=g.map(q=>q.name),m=wl(h);e(h.length,m);xl(m,h.length);g.forEach((q,t)=>{const x=new AbortController;Jn.push(x);q.addEventListener("midimessage",A=>{const J=A.data[0];A=A.data.slice(1);const P=A.length;if(P>d)throw Error(`data too big ${P} > ${d}`);(n(),r).set(A,c);f(t,J,c,A.length)},{signal:x.signal})})});
return 0}function Ln(a,b){if(a=X[a])a=R(a.protocol),b(a),B(a)}function Mn(a,b,c){if(X[a]){a=0;if(c.data instanceof ArrayBuffer)c=new Uint8Array(c.data);else{if(c.data instanceof Blob){Q("Blob type not supported");return}if("string"===typeof c.data)a=1,c=(new TextEncoder("utf-8")).encode(c.data);else{Q("Unknown message type");return}}var d=c.length*c.BYTES_PER_ELEMENT,e=Qh(d);(n(),r).set(c,e);b(e,d,a);B(e)}}function Nn(a,b){X[a]&&b()}
function On(a,b,c){X[a]&&(a=R(c.reason),b(c.code,a,c.wasClean?1:0),B(a))}function ch(a){l?a=C(171,1,a):a=(a=X[a])?a.bufferedAmount:0;return a}function dh(a,b,c){if(l)return C(172,1,a,b,c);c=F(c);(a=X[a])&&a.readyState<a.CLOSING&&a.close(b,c)}
function eh(a,b,c,d,e,f,g){if(l)return C(173,1,a,b,c,d,e,f,g);d=O(d).bind(null,a);e=O(e).bind(null,a);f=O(f).bind(null,a);a=O(g).bind(null,a);b=F(b);c=F(c);g=null;try{g=c?new WebSocket(b,c.split(",")):new WebSocket(b)}catch(h){return 0}g.binaryType="arraybuffer";c=g;b=rn(c);c.onopen=Ln.bind(null,b,d);c.onmessage=Mn.bind(null,b,e);c.onerror=Nn.bind(null,b,f);c.onclose=On.bind(null,b,a);return b}
function fh(a){if(l)return C(174,1,a);const b=X[a];if(b){const c=X[a];c&&c.readyState<c.CLOSING&&c.close(3001,"destroyed");sn(a);b.onopen=null;b.onmessage=null;b.onerror=null;b.onclose=null}}function gh(a,b,c,d){if(l)return C(175,1,a,b,c,d);const e=new Uint8Array(c);let f;for(f=0;f<c;f++)e[f]=Di(b+f,"i8");b=e.buffer;d||(b=(new TextDecoder("utf-8")).decode(e));(a=X[a])&&a.readyState===a.OPEN?(a.send(b),a=0):a=1;return a}var Pn=null,Qn=null;
function Rn(a){const b=rn(this);Pn.set(a,b);let c=1;this.fj=function(){c++};this.ii=function(){c--;0===c&&(sn(b),Pn.delete(a))};this.Ji=function(){return a};this.Th=function(){return b}}function Sn(a){const b=Pn.get(a);if(void 0===b)return(new Rn(a)).Th();X[b].fj();return b}function Tn(a){a=X[a];if(void 0!==a)return a.Ji()}
function Un(a,b){switch(a){case 0:return null;case 1:return!!Di(b,"i64");case 2:return a=Di(b,"i64"),a>=Number.MIN_SAFE_INTEGER&&a<=Number.MAX_SAFE_INTEGER?Number(a):a;case 3:return Number(Di(b,"double"));case 4:return F(Di(b,"*"));case 24:return Tn(Di(b,"i64"))}}
function Vn(a,b){if(void 0===a||null===a)return 0;const c=typeof a;if("boolean"===c)return E(b,a,"i64"),1;if("number"===c){if(Number.isInteger(a))return E(b,a,"i64"),2;E(b,a,"double");return 3}if("bigint"===c)return E(b,a,"i64"),2;if("string"===c)return a=R(a),E(b,a,"*"),4;a=Sn(a);E(b,a,"i64");return 24}function Wn(a){return a instanceof ArrayBuffer||ArrayBuffer.isView(a)}
function hh(a,b){if(l)return C(176,1,a,b);const c=O(b);let d=0;return d=Sn(function(){if(Tn(d)){Qn=null;var e=Array.from(arguments),f=new Rn(e);c(a,f.Th(),e.length);f.ii();e=Qn;Qn=null;return e}})}
function ih(a,b,c,d,e,f,g){if(l)return C(177,1,a,b,c,d,e,f,g);a=F(a);if("undefined"===typeof window[a])return-1;d=O(d);g=O(g);const h=Array(c);for(let m=0;m<c;m++){const q=d(b,m,e,f),t=Di(f,"*");h[m]=Un(q,e);t&&g(f,q)}try{const m=new window[a](...h);return Vn(m,e)}catch(m){return Q(`Error calling constructor ${a} with args:`,h,"error:",m),-1}}function jh(a){if(l)return C(178,1,a);a=F(a);return"undefined"!==typeof window[a]?Sn(window[a]):0}
function kh(a,b,c,d,e,f,g,h){if(l)return C(179,1,a,b,c,d,e,f,g,h);a=Tn(a);if(void 0===a)return-1;b=F(b);e=O(e);h=O(h);const m=Array(d);for(let q=0;q<d;q++){const t=e(c,q,f,g),x=Di(g,"*");m[q]=Un(t,f);x&&h(g,t)}try{const q=a[b](...m);return Vn(q,f)}catch(q){return Q(`Error calling method ${b} on:`,a,"error:",q),-1}}
function lh(a,b,c){if(l)return C(180,1,a,b,c);a=Tn(a);if(void 0===a)return 0;if(c){c=F(c);try{return Vn(a[c],b)}catch(d){return Q(`Error getting variable ${c} on object`,a),0}}return Vn(a,b)}function mh(a,b,c){if(l)return C(181,1,a,b,c);a=Tn(a);if(void 0===a)return-1;b=Un(b,c);if(void 0===b||null===b)return-1;try{return Vn(a[b],c)}catch(d){return Q(`Error getting variable ${b} on object`,a,d),-1}}function nh(a){return l?C(182,1,a):Wn(Tn(a))?1:0}
function oh(a,b,c,d){if(l)return C(183,1,a,b,c,d);a=Tn(a);if(void 0!==a){b=F(b);try{a[b]=Un(c,d)}catch(e){Q(`Error setting variable ${b} on object`,a)}}}function ph(a,b){if(l)return C(184,1,a,b);Qn=Un(a,b)}function qh(a,b,c,d,e){if(l)return C(185,1,a,b,c,d,e);a=Tn(a);if(void 0===a)return-1;b=Un(b,c);try{return a[b]=Un(d,e),0}catch(f){return Q(`Error setting variable ${b} on object`,a),-1}}
function rh(a,b,c,d){if(l)return C(186,1,a,b,c,d);a=Tn(a);Wn(a)&&(!ArrayBuffer.isView(a)||a instanceof Uint8Array?a instanceof ArrayBuffer&&(a=new Uint8Array(a)):a=new Uint8Array(a.buffer),b=O(d)(b,c,a.length),(n(),r).set(a,b))}function sh(a){if(l)return C(187,1,a);a=X[a];void 0!==a&&a.ii()}
function th(a,b,c,d,e,f,g){if(l)return C(188,1,a,b,c,d,e,f,g);const h=N;if("undefined"===typeof h.ai){const m=h.ng.getExtension("OCULUS_multiview");if(!m){Q("Trying to call glFramebufferTextureMultisampleMultiviewOVR() without the OCULUS_multiview extension");return}h.ai=m}h.ai.framebufferTextureMultisampleMultiviewOVR(a,b,jk[c],d,e,f,g)}
function uh(a,b,c,d,e,f){if(l)return C(189,1,a,b,c,d,e,f);const g=N;if("undefined"===typeof g.Zh){const h=g.ng.getExtension("OVR_multiview2");if(!h){Q("Trying to call glFramebufferTextureMultiviewOVR() without the OVR_multiview2 extension");return}g.Zh=h}g.Zh.framebufferTextureMultiviewOVR(a,b,jk[c],d,e,f)}function vh(a,b,c,d){if(l)return C(190,1,a,b,c,d);var e=Uh();(e=mk[e])&&e.ng.getBufferSubData(a,b,(n(),r),d,c)}
var Xn=null,Y=null,Yn=null,Zn=null,$n=null,ao=null,bo=null,co=1,eo=[,,,,,,,,,,,,,,,],fo=[,,,,],go=null,ho=null,io=a=>{Y&&$n?Y.requestAnimationFrame(function(b,c){ao=c;bo=c.getViewerPose($n);a(b);bo=ao=null}):ho(a)},jo=()=>{Wk();ri+=1;window.setTimeout(function(){--ri;Xk()},0)},ko=()=>{const a=bo?bo.views.length:1;var b=Zn;if(b&&co===a)return b;if(!Y||!Yn||!Yn.createProjectionLayer)return null;b=Xn;b=Yn.createProjectionLayer({textureType:1<a?"texture-array":"texture",colorFormat:b.RGBA8,depthFormat:b.DEPTH_COMPONENT24});
Y.updateRenderState({layers:[b]});Zn=b;co=a;return b},lo=()=>{if(!bo)return null;const a=ko();return null===a?null:Yn.getViewSubImage(a,bo.views[0])},mo=a=>{if(void 0!==a.name)return a.name;const b=sk(jk);a.name=b;jk[b]=a;return b},no=a=>{let b=-1;if("tracked-pointer"===a.targetRayMode&&"left"===a.handedness)b=0;else if("tracked-pointer"===a.targetRayMode&&"right"===a.handedness)b=1;else for(var c=2;16>c;c++)if(!eo[c]){b=c;break}if(0<=b&&(eo[b]=a,a.name=b,"screen"===a.targetRayMode)){c=-1;for(let d=
0;5>d;d++)if(!fo[d]){c=d;break}0<=c&&(fo[c]=a,a.xh=c)}return b},oo=a=>{if(void 0!==a.name){const b=a.name;0<=b&&16>b&&(eo[b]=null);void 0!==a.xh&&(a=a.xh,0<=a&&5>a&&(fo[a]=null));return b}return-1};function wh(a){if(l)return C(191,1,a);if(!$n||!$n.boundsGeometry)return 0;const b=$n.boundsGeometry.length;if(0===b)return 0;const c=Qh(12*b);for(let d=0;d<b;d++){const e=$n.boundsGeometry[d];E(c+12*d,e.x,"float");E(c+4*(3*d+1),e.y,"float");E(c+4*(3*d+2),e.z,"float")}E(a,c,"i32");return b}
function xh(){if(l)return C(192,1);const a=lo();return null===a?0:mo(a.colorTexture)}function yh(){if(l)return C(193,1);const a=lo();return null!==a&&a.depthStencilTexture?mo(a.depthStencilTexture):0}function zh(){return l?C(194,1):Y&&void 0!==Y.frameRate?Y.frameRate:0}function Ah(a,b){if(l)return C(195,1,a,b);if(!Y||!bo)return!1;a=bo.views[a].projectionMatrix;for(let c=0;16>c;c++)E(b+4*c,a[c],"float");return!0}
function Bh(a){if(l)return C(196,1,a);const b=lo();if(null===b)return!1;E(a+0,b.viewport.width,"i32");E(a+4,b.viewport.height,"i32");return!0}function Ch(a){if(l)return C(197,1,a);if(!Y||void 0===Y.supportedFrameRates)return 0;const b=Y.supportedFrameRates.length;if(0===b)return 0;const c=Qh(4*b);for(let d=0;d<b;d++)E(c+4*d,Y.supportedFrameRates[d],"float");E(a,c,"i32");return b}
function Dh(a,b){if(l)return C(198,1,a,b);if(!Y||!bo)return!1;var c=bo.views;a=0<=a?c[a].transform.matrix:bo.transform.matrix;for(c=0;16>c;c++)E(b+4*c,a[c],"float");return!0}function Eh(){if(l)return C(199,1);const a=lo();return null!==a&&a.motionVectorTexture?mo(a.motionVectorTexture):0}function Fh(){if(l)return C(200,1);if(!Y||!bo)return 1;const a=bo.views.length;return 0<a?a:1}function Gh(){return l?C(201,1):Y&&Y.visibilityState?R(Y.visibilityState):0}
function Hh(a,b,c,d,e,f,g,h,m){if(l)return C(202,1,a,b,c,d,e,f,g,h,m);null===ho&&(ho=Kk);Kk=io;a=F(a);b=F(b).split(",").map(y=>y.trim()).filter(y=>""!==y);c=F(c).split(",").map(y=>y.trim()).filter(y=>""!==y);const q=F(d).split(",").map(y=>y.trim()),t=O(e),x=O(f),A=O(g),J=O(h),P=O(m);d={};0<b.length&&(d.requiredFeatures=b);0<c.length&&(d.optionalFeatures=c);navigator.xr.requestSession(a,d).then(function(y){Y=y;y.addEventListener("end",function(){x()});y.addEventListener("inputsourceschange",function(Z){Z.added.forEach(no);
Z.removed.forEach(oo)});["selectstart","selectend","squeezestart","squeezeend"].forEach((Z,Uc)=>{y.addEventListener(Z,function(Pa){ao=Pa.frame;Pa=Pa.inputSource;J(Uc,void 0!==Pa?Pa.name:-1);ao=null})});y.addEventListener("visibilitychange",function(){const Z=R("visibility_state_changed");P(Z);B(Z)});go=P;const T=Uh(),ea=mk[T].ng;Xn=ea;ea.makeXRCompatible().then(function(){function Z(rb,sb){$n=rb;rb.onreset=function(){const cc=R("reference_space_reset");P(cc);B(cc)};jo();window.setTimeout(function(){const cc=
R(sb);var Vc="enabledFeatures"in y?Array.from(y.enabledFeatures):[];Vc=R(Vc.join(","));const ik=R("environmentBlendMode"in y?y.environmentBlendMode:"");t(cc,Vc,ik);B(cc);B(Vc);B(ik)},0)}function Uc(){const rb=q.shift();y.requestReferenceSpace(rb).then(sb=>{Z(sb,rb)}).catch(()=>{if(0===q.length){const sb=R("Unable to get any of the requested reference space types");A(sb);B(sb)}else Uc()})}const Pa=()=>{throw Error("This browser doesn't support WebXR Layers (which Godot requires) nor is the polyfill in use. If you are the developer of this application, please consider including the polyfill.");
};try{Yn=new XRWebGLBinding(y,ea)}catch(rb){Pa()}Yn.createProjectionLayer||Pa();if(!ko())throw Error("Unable to create WebXR Layer.");Uc()}).catch(function(Z){Z=R(`Unable to make WebGL context compatible with WebXR: ${Z}`);A(Z);B(Z)})}).catch(function(y){y=R(`Unable to start session: ${y}`);A(y);B(y)})}function Ih(a,b){if(l)return C(203,1,a,b);const c=F(a),d=O(b);navigator.xr?navigator.xr.isSessionSupported(c).then(function(e){const f=R(c);d(f,e?1:0);B(f)}):(a=R(c),d(a,0),B(a))}
function Jh(){return l?C(204,1):!!navigator.xr}function Kh(){if(l)return C(205,1);Y&&Y.end().catch(()=>{});bo=ao=$n=Zn=Yn=Y=null;co=1;eo=Array(16);fo=Array(5);go=null;null===ho&&(ho=Kk);Kk=ho;jo()}
function Lh(a,b,c,d,e,f,g,h,m,q,t,x,A,J){if(l)return C(206,1,a,b,c,d,e,f,g,h,m,q,t,x,A,J);if(!Y||!ao)return 0;if(0>a||a>=eo.length||!eo[a])return!1;a=eo[a];const P=ao,y=$n;var T=P.getPose(a.targetRaySpace,y);if(!T)return!1;T=T.transform.matrix;for(let ea=0;16>ea;ea++)E(b+4*ea,T[ea],"float");b=0;switch(a.targetRayMode){case "gaze":b=1;break;case "tracked-pointer":b=2;break;case "screen":b=3}E(c,b,"i32");E(d,void 0!==a.xh?a.xh:-1,"i32");c=!1;if(a.gripSpace&&(d=P.getPose(a.gripSpace,y))){c=d.transform.matrix;
for(d=0;16>d;d++)E(f+4*d,c[d],"float");c=!0}E(e,c?1:0,"i32");e=!1;c=f=0;if(a.gamepad){"xr-standard"===a.gamepad.mapping&&(e=!0);f=Math.min(a.gamepad.buttons.length,10);for(c=0;c<f;c++)E(m+4*c,a.gamepad.buttons[c].value,"float");c=Math.min(a.gamepad.axes.length,10);for(m=0;m<c;m++)E(t+4*m,a.gamepad.axes[m],"float")}E(g,e?1:0,"i32");E(h,f,"i32");E(q,c,"i32");g=!1;a.hand&&0!==A&&0!==J&&(h=new Float32Array(400),q=new Float32Array(25),P.fillPoses(a.hand.values(),y,h)&&P.fillJointRadii(a.hand.values(),
q)&&((n(),w).set(h,A/h.BYTES_PER_ELEMENT),(n(),w).set(q,J/q.BYTES_PER_ELEMENT),g=!0));E(x,g?1:0,"i32");return!0}function Mh(a){if(l)return C(207,1,a);Y&&void 0!==Y.updateTargetFrameRate&&Y.updateTargetFrameRate(a).then(()=>{const b=R("display_refresh_rate_changed");go(b);B(b)})}
var po=a=>{var b=Ri(a)+1,c=ci(b);Uj(a,c,b);return c},qo=(a,b,c,d)=>{var e={string:q=>{var t=0;null!==q&&void 0!==q&&0!==q&&(t=po(q));return t},array:q=>{var t=ci(q.length);(n(),p).set(q,t);return t}};a=k["_"+a];var f=[],g=0;if(d)for(var h=0;h<d.length;h++){var m=e[c[h]];m?(0===g&&(g=di()),f[h]=m(d[h])):f[h]=d[h]}c=a(...f);return c=function(q){0!==g&&bi(g);return"string"===b?F(q):"boolean"===b?!!q:q}(c)};l||xi();qj=Array(4096);Ij(H,"/");Kj("/tmp");Kj("/home");Kj("/home/web_user");
(function(){Kj("/dev");Wi(259,{read:()=>0,write:(d,e,f,g)=>g,Ag:()=>0});Lj("/dev/null",259);Vi(1280,Yi);Vi(1536,Zi);Lj("/dev/tty",1280);Lj("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Mi(a),b=a.byteLength);return a[--b]};Ka("random",c);Ka("urandom",c);Kj("/dev/shm");Kj("/dev/shm/tmp")})();
(function(){Kj("/proc");var a=Kj("/proc/self");Kj("/proc/self/fd");Ij({mg(){var b=aj(a,"fd",16895,73);b.hg={Ag:H.hg.Ag};b.fg={fh(c,d){c=+d;var e=Cj(c);c={parent:null,mg:{gh:"fake"},fg:{Rg:()=>e.path},id:c+1};return c.parent=c},th(){return Array.from(vi.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},"/proc/self/fd")})();k.requestAnimationFrame=Kk;k.pauseMainLoop=Wk;k.resumeMainLoop=Xk;k.preMainLoop&&Tk.push(k.preMainLoop);k.postMainLoop&&Uk.push(k.postMainLoop);for(let a=0;32>a;++a)Zk.push(Array(a));
for(var ro=new Int32Array(288),so=0;288>=so;++so)gl[so]=ro.subarray(0,so);var to=new Float32Array(288);for(so=0;288>=so;++so)hl[so]=to.subarray(0,so);k.request_quit=function(){Ml()};k.onExit=function(a){const b=Fl;Jl();S=null;zl="en";Al=2;Cl=Bl=!1;Fl=El=null;b&&b(a)};Ol=Promise.resolve();k.initConfig=function(a){Al=a.canvasResizePolicy;S=a.canvas;zl=a.locale||zl;Bl=a.virtualKeyboard;Cl=!!a.persistentDrops;Dl=a.godotPoolSize;El=a.onExecute;Fl=a.onExit;a.focusCanvas&&S.focus()};
k.initFS=function(a){Gl=!1;if(!Array.isArray(a))return Promise.reject(Error("Persistent paths must be an array"));if(!a.length)return Promise.resolve();Il=a.slice();Il.forEach(function(b){try{fj(b)}catch(c){44!==c.ig&&Q(c),hj(b)}Ij(D,b)});return new Promise(function(b){Hj(!0,function(c){c?(Il=[],Gl=!1,rl(`IndexedDB not available: ${c.message}`)):Gl=!0;b(c)})})};k.copyToFS=Ll;Nl.push(function(a){Dm();a()});Nl.push(function(a){Gm();a()});
Nl.push(function(a){kn&&(kn.remove(),kn=null);ln&&(ln.remove(),ln=null);a()});Nl.push(function(a){null!=$m&&(-1<bn&&(clearInterval(bn),bn=-1),$m.remove(),$m=null);a()});Pn=new Map;l||(k.wasmMemory?oa=k.wasmMemory:oa=new WebAssembly.Memory({initial:(k.INITIAL_MEMORY||67108864)/65536,maximum:32768,shared:!0}),pa());k.noExitRuntime&&(si=k.noExitRuntime);k.print&&(ia=k.print);k.printErr&&(ja=k.printErr);k.wasmBinary&&(ka=k.wasmBinary);k.thisProgram&&(ca=k.thisProgram);
if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);0<k.preInit.length;)k.preInit.shift()();k.callMain=uo;k.cwrap=(a,b,c,d)=>{var e=!c||c.every(f=>"number"===f||"boolean"===f);return"string"!==b&&e&&!d?k["_"+a]:(...f)=>qo(a,b,c,f)};
var yk=[Nh,ui,Gi,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,tb,ub,vb,Gb,Hb,Ib,Qb,ll,le,ml,oe,pe,re,se,ue,ve,we,xe,ye,ze,Ae,Be,Ce,De,Ee,Fe,Ge,He,Ie,Je,Ke,Le,Me,Ne,Oe,Pe,Qe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,af,bf,ff,gf,hf,jf,kf,lf,mf,nf,of,pf,qf,rf,sf,tf,uf,vf,wf,xf,yf,zf,Af,Bf,Cf,Df,Ef,Ff,Gf,Hf,If,Jf,Kf,Lf,Mf,Nf,Of,Pf,Rf,Sf,Tf,Uf,Vf,Wf,Xf,Yf,Zf,$f,ag,bg,cg,dg,eg,fg,gg,hg,ig,jg,kg,lg,mg,ng,og,pg,qg,rg,sg,tg,ug,vg,wg,xg,yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Ug,Vg,Wg,
Xg,Yg,Zg,$g,ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,uh,vh,wh,xh,yh,zh,Ah,Bh,Ch,Dh,Eh,Fh,Gh,Hh,Ih,Jh,Kh,Lh,Mh],B,Ph,Qh,Rh,Sh,Th,Uh,Vh,xa,Ca,Wh,Xh,Yh,Zh,$h,ai,bi,ci,di,ei,Wa;function uo(a=[]){var b=Ph;a.unshift(ca);var c=a.length,d=ci(4*(c+1)),e=d,f;for(f of a)(n(),v)[e>>2]=po(f),e+=4;(n(),v)[e>>2]=0;try{var g=b(c,d);te(g,!0);return g}catch(h){return Vj(h)}}
function va(){function a(){k.calledRun=!0;if(!ma&&(Ia(),qa?.(k),k.onRuntimeInitialized?.(),!l)){if(k.postRun)for("function"==typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;)Ci.push(k.postRun.shift());hi(Ci)}}if(0<ji)ki=va;else if(l)qa?.(k),Ia();else{if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.preRun]);k.preRun.length;)ii.push(k.preRun.shift());hi(ii);0<ji?ki=va:k.setStatus?(k.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>k.setStatus(""),1);a()},1)):a()}}var Na;
l||(Na=await (ua()),va());Ci.push(function(){uk=(a,b,c)=>{let d="";for(let g=0;g<a;++g){var e=(n(),v)[b+4*g>>2],f=c?(n(),v)[c+4*g>>2]:void 0;f?(f=e+f,e=(n(),r).buffer instanceof ArrayBuffer?(n(),r).subarray(e,f):(n(),r).slice(e,f),d+=Ei.decode(e)):d+=F(e,f)}return d}});Ga?moduleRtn=k:moduleRtn=new Promise((a,b)=>{qa=a;ra=b});
;return moduleRtn}})();if(typeof exports==="object"&&typeof module==="object"){module.exports=Godot;module.exports.default=Godot}else if(typeof define==="function"&&define["amd"])define([],()=>Godot);var isPthread=globalThis.self?.name?.startsWith("em-pthread");isPthread&&Godot();

function t(c=1){try{return!!document.createElement("canvas").getContext(["webgl","webgl2"][c-1])}catch(e){}return!1}function u(){return"fetch"in window&&"Response"in window&&"body"in window.Response.prototype}function v(){return!0===window.isSecureContext}function w(){return!0===window.crossOriginIsolated}function x(){return"SharedArrayBuffer"in window}function y(){return"AudioContext"in window&&"audioWorklet"in AudioContext.prototype}
function z(c={}){({threads:c=!0}=c);const e=[];t(2)||e.push("WebGL2 - Check web browser configuration and hardware support");u()||e.push("Fetch - Check web browser version");v()||e.push("Secure Context - Check web server configuration (use HTTPS)");c&&(w()||e.push("Cross-Origin Isolation - Check that the web server configuration sends the correct headers."),x()||e.push("SharedArrayBuffer - Check that the web server configuration sends the correct headers."));return e};function A(){function c(){let a=0,d=0,l=!0,m=!0;Object.keys(n).forEach(function(f){f=n[f];f.done||(m=!1);l&&0!==f.total?d+=f.total:(l=!1,d=0);a+=f.loaded});if(a!==p||d!==h)p=a,h=d,"function"===typeof g&&g(a,d);m||requestAnimationFrame(c)}function e(a,d){function l(f,q){return f.read().then(function(r){if(d.done)return Promise.resolve();r.value&&(q.enqueue(r.value),d.loaded+=r.value.length);if(!r.done)return l(f,q);d.done=!0;return Promise.resolve()})}const m=a.body.getReader();return new Response(new ReadableStream({start:function(f){l(m,
f).then(function(){f.close()})}}),{headers:a.headers})}function k(a,d,l,m){d[a]={total:l||0,loaded:0,done:!1};return fetch(a).then(function(f){if(!f.ok)return Promise.reject(Error(`Failed loading file '${a}'`));f=e(f,d[a]);return m?Promise.resolve(f):f.arrayBuffer()})}function b(a,d=1){return a().catch(function(l){return 1>=d?Promise.reject(l):new Promise(function(m,f){setTimeout(function(){b(a,d-1).then(m).catch(f)},1E3)})})}const n={};var p=0,h=0;let g=null;this.T=c;this.U=function(a){g=a};this.o=
function(a,d,l=!1){return b(k.bind(null,a,n,d,l),4)};this.h=[];this.C=function(a,d,l){let m=null;if("string"===typeof a){const f=this;return this.o(a,l).then(function(q){f.h.push({path:d||a,buffer:q});return Promise.resolve()})}a instanceof ArrayBuffer?m=new Uint8Array(a):ArrayBuffer.isView(a)&&(m=new Uint8Array(a.buffer));return m?(this.h.push({path:d,buffer:a}),Promise.resolve()):Promise.reject(Error("Invalid object for preloading"))}};function B(c){function e(k){this.update(k)}e.prototype={N:!0,canvas:null,l:"",F:null,locale:null,s:2,i:[],A:!0,v:!1,serviceWorker:"",M:["/userfs"],L:!1,j:[],m:[],u:8,B:4,G:null,H:null,K:null,I:function(){console.log.apply(console,Array.from(arguments))},J:function(k){console.error.apply(console,Array.from(arguments))}};e.prototype.update=function(k){function b(p,h){return"undefined"===typeof n[p]?h:n[p]}const n=k||{};this.N=b("unloadAfterInit",this.N);this.J=b("onPrintError",this.J);this.I=b("onPrint",
this.I);this.K=b("onProgress",this.K);this.canvas=b("canvas",this.canvas);this.l=b("executable",this.l);this.F=b("mainPack",this.F);this.locale=b("locale",this.locale);this.s=b("canvasResizePolicy",this.s);this.M=b("persistentPaths",this.M);this.L=b("persistentDrops",this.L);this.v=b("experimentalVK",this.v);this.A=b("focusCanvas",this.A);this.serviceWorker=b("serviceWorker",this.serviceWorker);this.j=b("gdextensionLibs",this.j);this.m=b("fileSizes",this.m);this.u=b("emscriptenPoolSize",this.u);this.B=
b("godotPoolSize",this.B);this.i=b("args",this.i);this.G=b("onExecute",this.G);this.H=b("onExit",this.H)};e.prototype.S=function(k,b){let n=b;const p=this.j;return{print:this.I,printErr:this.J,thisProgram:this.l,noExitRuntime:!1,dynamicLibraries:[`${k}.side.wasm`].concat(this.j),emscriptenPoolSize:this.u,instantiateWasm:function(h,g){function a(d){g(d.instance,d.module)}"undefined"!==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(Promise.resolve(n),h).then(a):n.arrayBuffer().then(function(d){WebAssembly.instantiate(d,
h).then(a)});n=null;return{}},locateFile:function(h){if(h.startsWith("godot.")){if(h.endsWith(".audio.worklet.js"))return`${k}.audio.worklet.js`;if(h.endsWith(".audio.position.worklet.js"))return`${k}.audio.position.worklet.js`;if(h.endsWith(".js"))return`${k}.js`;if(!(h in p)){if(h.endsWith(".side.wasm"))return`${k}.side.wasm`;if(h.endsWith(".wasm"))return`${k}.wasm`}}return h}}};e.prototype.R=function(k){if(!(this.canvas instanceof HTMLCanvasElement)){var b=document.getElementsByTagName("canvas");
b.length&&b[0]instanceof HTMLCanvasElement&&(this.canvas=b[0]);if(!this.canvas)throw Error("No canvas found in page");}0>this.canvas.tabIndex&&(this.canvas.tabIndex=0);b=this.locale;b||(b=navigator.languages?navigator.languages[0]:navigator.language,b=b.split(".")[0]);b=b.replace("-","_");const n=this.H;return{canvas:this.canvas,canvasResizePolicy:this.s,locale:b,persistentDrops:this.L,virtualKeyboard:this.v,godotPoolSize:this.B,focusCanvas:this.A,onExecute:this.G,onExit:function(p){k();"function"===
typeof n&&n(p)}}};return new e(c)};const C=function(){function c(h){this.config=new B(h);this.g=null}function e(h){c.prototype={D:function(g){if(p)return p;if(null==b){if(!g)return p=Promise.reject(Error("A base path must be provided when calling `init` and the engine is not loaded."));c.load(g,this.config.m[`${g}.wasm`])}const a=this;k.U(this.config.K);return p=function(d){return new Promise(function(l){d.then(function(m){m=new Response(m.clone().body,{headers:[["content-type","application/wasm"]]});Godot(a.config.S(n,m)).then(function(f){f.initFS(a.config.M).then(function(){a.g=
f;a.config.N&&c.h();l()})})})})}(b)},P:function(g,a){return k.C(g,a,this.config.m[g])},start:function(g){this.config.update(g);const a=this;return a.D().then(function(){if(!a.g)return Promise.reject(Error("The engine must be initialized before it can be started"));let d={};try{d=a.config.R(function(){a.g=null})}catch(l){return Promise.reject(l)}a.g.initConfig(d);return 0<a.config.j.length&&!a.g.loadDynamicLibrary?Promise.reject(Error('GDExtension libraries are not supported by this engine version. Enable "Extensions Support" for your export preset and/or build your custom template with "dlink_enabled=yes".')):
new Promise(function(l){for(const m of k.h)a.g.copyToFS(m.path,m.buffer);k.h.length=0;a.g.callMain(a.config.i);p=null;a.O();l()})})},C:function(g){this.config.update(g);g=this.config.l;const a=this.config.F||`${g}.pck`;this.config.i=["--main-pack",a].concat(this.config.i);const d=this;return Promise.all([this.D(g),this.P(a,a)]).then(function(){return d.start.apply(d)})},h:function(g,a){if(null==this.g)throw Error("Engine must be inited before copying files");this.g.copyToFS(g,a)},o:function(){this.g&&
this.g.request_quit()},O:function(){if(this.config.serviceWorker&&"serviceWorker"in navigator)try{return navigator.serviceWorker.register(this.config.serviceWorker)}catch(g){return Promise.reject(g)}return Promise.resolve()}};c.prototype.init=c.prototype.D;c.prototype.preloadFile=c.prototype.P;c.prototype.start=c.prototype.start;c.prototype.startGame=c.prototype.C;c.prototype.copyToFS=c.prototype.h;c.prototype.requestQuit=c.prototype.o;c.prototype.installServiceWorker=c.prototype.O;c.prototype.load=
c.load;c.prototype.unload=c.h;return new c(h)}const k=new A;let b=null,n="",p=null;c.load=function(h,g){null==b&&(n=h,b=k.o(`${n}.wasm`,g,!0),requestAnimationFrame(k.T));return b};c.h=function(){b=null};e.load=c.load;e.unload=c.h;e.isWebGLAvailable=t;e.isFetchAvailable=u;e.isSecureContext=v;e.isCrossOriginIsolated=w;e.isSharedArrayBufferAvailable=x;e.isAudioWorkletAvailable=y;e.getMissingFeatures=z;return e}();"undefined"!==typeof window&&(window.Engine=C);
