mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-04 17:07:22 +00:00
2 lines
310 KiB
JavaScript
2 lines
310 KiB
JavaScript
!function(){function e(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}var r,t,n,o,a,i,s,u,l,c,d,f,m,h,p,v,w,g,_,y,E,b,k,S,D,F,M,A,P,x,R,C,T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},N={},z={},B=T.parcelRequire847f;null==B&&((B=function(e){if(e in N)return N[e].exports;if(e in z){var r=z[e];delete z[e];var t={id:e,exports:{}};return N[e]=t,r.call(t.exports,t,t.exports),t.exports}var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,r){z[e]=r},T.parcelRequire847f=B),B.register("6kBsm",function(r,t){e(r.exports,"getBundleURL",function(){return n},function(e){return n=e});"use strict";var n,o={};n=function(e){var r=o[e];return r||(r=function(){try{throw Error()}catch(r){var e=(""+r.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g);if(e)return(""+e[2]).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}return"/"}(),o[e]=r),r}});var j,O,I,L,U,H,W,q,Y,G={},V=[],X=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,K=Array.isArray;function $(e,r){for(var t in r)e[t]=r[t];return e}function J(e){var r=e.parentNode;r&&r.removeChild(e)}function Z(e,r,t){var n,o,a,i={};for(a in r)"key"==a?n=r[a]:"ref"==a?o=r[a]:i[a]=r[a];if(arguments.length>2&&(i.children=arguments.length>3?j.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return Q(e,i,n,o,null)}function Q(e,r,t,n,o){var a={type:e,props:r,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++I:o};return null==o&&null!=O.vnode&&O.vnode(a),a}function ee(e){return e.children}function er(e,r){this.props=e,this.context=r}function et(e,r){if(null==r)return e.__?et(e.__,e.__.__k.indexOf(e)+1):null;for(var t;r<e.__k.length;r++)if(null!=(t=e.__k[r])&&null!=t.__e)return t.__e;return"function"==typeof e.type?et(e):null}function en(e){(!e.__d&&(e.__d=!0)&&U.push(e)&&!eo.__r++||H!==O.debounceRendering)&&((H=O.debounceRendering)||W)(eo)}function eo(){var e,r,t,n,o,a,i,s;for(U.sort(q);e=U.shift();)e.__d&&(r=U.length,n=void 0,o=void 0,i=(a=(t=e).__v).__e,(s=t.__P)&&(n=[],(o=$({},a)).__v=a.__v+1,ed(s,a,o,t.__n,void 0!==s.ownerSVGElement,null!=a.__h?[i]:null,n,null==i?et(a):i,a.__h),ef(n,a),a.__e!=i&&function e(r){var t,n;if(null!=(r=r.__)&&null!=r.__c){for(r.__e=r.__c.base=null,t=0;t<r.__k.length;t++)if(null!=(n=r.__k[t])&&null!=n.__e){r.__e=r.__c.base=n.__e;break}return e(r)}}(a)),U.length>r&&U.sort(q));eo.__r=0}function ea(e,r,t,n,o,a,i,s,u,l){var c,d,f,m,h,p,v,w=n&&n.__k||V,g=w.length;for(t.__k=[],c=0;c<r.length;c++)if(null!=(m=t.__k[c]=null==(m=r[c])||"boolean"==typeof m||"function"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?Q(null,m,null,null,m):K(m)?Q(ee,{children:m},null,null,null):m.__b>0?Q(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=t,m.__b=t.__b+1,null===(f=w[c])||f&&m.key==f.key&&m.type===f.type)w[c]=void 0;else for(d=0;d<g;d++){if((f=w[d])&&m.key==f.key&&m.type===f.type){w[d]=void 0;break}f=null}ed(e,m,f=f||G,o,a,i,s,u,l),h=m.__e,(d=m.ref)&&f.ref!=d&&(v||(v=[]),f.ref&&v.push(f.ref,null,m),v.push(d,m.__c||h,m)),null!=h?(null==p&&(p=h),"function"==typeof m.type&&m.__k===f.__k?m.__d=u=function e(r,t,n){for(var o,a=r.__k,i=0;a&&i<a.length;i++)(o=a[i])&&(o.__=r,t="function"==typeof o.type?e(o,t,n):ei(n,o,o,a,o.__e,t));return t}(m,u,e):u=ei(e,m,f,w,h,u),"function"==typeof t.type&&(t.__d=u)):u&&f.__e==u&&u.parentNode!=e&&(u=et(f))}for(t.__e=p,c=g;c--;)null!=w[c]&&("function"==typeof t.type&&null!=w[c].__e&&w[c].__e==t.__d&&(t.__d=function e(r){var t,n,o;if(null==r.type||"string"==typeof r.type)return r.__e;if(r.__k){for(t=r.__k.length-1;t>=0;t--)if((n=r.__k[t])&&(o=e(n)))return o}return null}(n).nextSibling),function e(r,t,n){var o,a;if(O.unmount&&O.unmount(r),(o=r.ref)&&(o.current&&o.current!==r.__e||em(o,null,t)),null!=(o=r.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){O.__e(e,t)}o.base=o.__P=null,r.__c=void 0}if(o=r.__k)for(a=0;a<o.length;a++)o[a]&&e(o[a],t,n||"function"!=typeof r.type);n||null==r.__e||J(r.__e),r.__=r.__e=r.__d=void 0}(w[c],w[c]));if(v)for(c=0;c<v.length;c++)em(v[c],v[++c],v[++c])}function ei(e,r,t,n,o,a){var i,s,u;if(void 0!==r.__d)i=r.__d,r.__d=void 0;else if(null==t||o!=a||null==o.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(o),i=null;else{for(s=a,u=0;(s=s.nextSibling)&&u<n.length;u+=1)if(s==o)break e;e.insertBefore(o,a),i=a}return void 0!==i?i:o.nextSibling}function es(e,r,t){"-"===r[0]?e.setProperty(r,null==t?"":t):e[r]=null==t?"":"number"!=typeof t||X.test(r)?t:t+"px"}function eu(e,r,t,n,o){var a;e:if("style"===r){if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(r in n)t&&r in t||es(e.style,r,"");if(t)for(r in t)n&&t[r]===n[r]||es(e.style,r,t[r])}}else if("o"===r[0]&&"n"===r[1])a=r!==(r=r.replace(/Capture$/,"")),r=r.toLowerCase() in e?r.toLowerCase().slice(2):r.slice(2),e.l||(e.l={}),e.l[r+a]=t,t?n||e.addEventListener(r,a?ec:el,a):e.removeEventListener(r,a?ec:el,a);else if("dangerouslySetInnerHTML"!==r){if(o)r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==r&&"height"!==r&&"href"!==r&&"list"!==r&&"form"!==r&&"tabIndex"!==r&&"download"!==r&&"rowSpan"!==r&&"colSpan"!==r&&r in e)try{e[r]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==r[4]?e.removeAttribute(r):e.setAttribute(r,t))}}function el(e){return this.l[e.type+!1](O.event?O.event(e):e)}function ec(e){return this.l[e.type+!0](O.event?O.event(e):e)}function ed(e,r,t,n,o,a,i,s,u){var l,c,d,f,m,h,p,v,w,g,_,y,E,b,k,S=r.type;if(void 0!==r.constructor)return null;null!=t.__h&&(u=t.__h,s=r.__e=t.__e,r.__h=null,a=[s]),(l=O.__b)&&l(r);try{e:if("function"==typeof S){if(v=r.props,w=(l=S.contextType)&&n[l.__c],g=l?w?w.props.value:l.__:n,t.__c?p=(c=r.__c=t.__c).__=c.__E:("prototype"in S&&S.prototype.render?r.__c=c=new S(v,g):(r.__c=c=new er(v,g),c.constructor=S,c.render=eh),w&&w.sub(c),c.props=v,c.state||(c.state={}),c.context=g,c.__n=n,d=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=S.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=$({},c.__s)),$(c.__s,S.getDerivedStateFromProps(v,c.__s))),f=c.props,m=c.state,c.__v=r,d)null==S.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==S.getDerivedStateFromProps&&v!==f&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,g),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,g)||r.__v===t.__v){for(r.__v!==t.__v&&(c.props=v,c.state=c.__s,c.__d=!1),c.__e=!1,r.__e=t.__e,r.__k=t.__k,r.__k.forEach(function(e){e&&(e.__=r)}),_=0;_<c._sb.length;_++)c.__h.push(c._sb[_]);c._sb=[],c.__h.length&&i.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,g),null!=c.componentDidUpdate&&c.__h.push(function(){c.componentDidUpdate(f,m,h)})}if(c.context=g,c.props=v,c.__P=e,y=O.__r,E=0,"prototype"in S&&S.prototype.render){for(c.state=c.__s,c.__d=!1,y&&y(r),l=c.render(c.props,c.state,c.context),b=0;b<c._sb.length;b++)c.__h.push(c._sb[b]);c._sb=[]}else do c.__d=!1,y&&y(r),l=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++E<25)c.state=c.__s,null!=c.getChildContext&&(n=$($({},n),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(f,m)),ea(e,K(k=null!=l&&l.type===ee&&null==l.key?l.props.children:l)?k:[k],r,t,n,o,a,i,s,u),c.base=r.__e,r.__h=null,c.__h.length&&i.push(c),p&&(c.__E=c.__=null),c.__e=!1}else null==a&&r.__v===t.__v?(r.__k=t.__k,r.__e=t.__e):r.__e=function(e,r,t,n,o,a,i,s){var u,l,c,d=t.props,f=r.props,m=r.type,h=0;if("svg"===m&&(o=!0),null!=a){for(;h<a.length;h++)if((u=a[h])&&"setAttribute"in u==!!m&&(m?u.localName===m:3===u.nodeType)){e=u,a[h]=null;break}}if(null==e){if(null===m)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,f.is&&f),a=null,s=!1}if(null===m)d===f||s&&e.data===f||(e.data=f);else{if(a=a&&j.call(e.childNodes),l=(d=t.props||G).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!s){if(null!=a)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,r,t,n,o){var a;for(a in t)"children"===a||"key"===a||a in r||eu(e,a,null,t[a],n);for(a in r)o&&"function"!=typeof r[a]||"children"===a||"key"===a||"value"===a||"checked"===a||t[a]===r[a]||eu(e,a,r[a],t[a],n)}(e,f,d,o,s),c)r.__k=[];else if(ea(e,K(h=r.props.children)?h:[h],r,t,n,o&&"foreignObject"!==m,a,i,a?a[0]:t.__k&&et(t,0),s),null!=a)for(h=a.length;h--;)null!=a[h]&&J(a[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===m&&!h||"option"===m&&h!==d.value)&&eu(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&eu(e,"checked",h,d.checked,!1))}return e}(t.__e,r,t,n,o,a,i,u);(l=O.diffed)&&l(r)}catch(e){r.__v=null,(u||null!=a)&&(r.__e=s,r.__h=!!u,a[a.indexOf(s)]=null),O.__e(e,r,t)}}function ef(e,r){O.__c&&O.__c(r,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(e){e.call(r)})}catch(e){O.__e(e,r.__v)}})}function em(e,r,t){try{"function"==typeof e?e(r):e.current=r}catch(e){O.__e(e,t)}}function eh(e,r,t){return this.constructor(e,t)}function ep(e,r,t){var n,o,a,i,s=$({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),r)"key"==a?n=r[a]:"ref"==a?o=r[a]:s[a]=void 0===r[a]&&void 0!==i?i[a]:r[a];return arguments.length>2&&(s.children=arguments.length>3?j.call(arguments,2):t),Q(e.type,s,n||e.key,o||e.ref,null)}j=V.slice,O={__e:function(e,r,t,n){for(var o,a,i;r=r.__;)if((o=r.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),i=o.__d),i)return o.__E=o}catch(r){e=r}throw e}},I=0,L=function(e){return null!=e&&void 0===e.constructor},er.prototype.setState=function(e,r){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=$({},this.state),"function"==typeof e&&(e=e($({},t),this.props)),e&&$(t,e),null!=e&&this.__v&&(r&&this._sb.push(r),en(this))},er.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),en(this))},er.prototype.render=ee,U=[],W="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q=function(e,r){return e.__v.__b-r.__v.__b},eo.__r=0,Y=0;var ev=0;function ew(e,r,t,n,o,a){var i,s,u={};for(s in r)"ref"==s?i=r[s]:u[s]=r[s];var l={type:e,props:u,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ev,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(s in i)void 0===u[s]&&(u[s]=i[s]);return O.vnode&&O.vnode(l),l}var eg,e_,ey,eE,eb=0,ek=[],eS=[],eD=O.__b,eF=O.__r,eM=O.diffed,eA=O.__c,eP=O.unmount;function ex(e,r){O.__h&&O.__h(e_,e,eb||r),eb=0;var t=e_.__H||(e_.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:eS}),t.__[e]}function eR(e){return eb=1,function(e,r,t){var n=ex(eg++,2);if(n.t=e,!n.__c&&(n.__=[t?t(r):eH(void 0,r),function(e){var r=n.__N?n.__N[0]:n.__[0],t=n.t(r,e);r!==t&&(n.__N=[t,n.__[1]],n.__c.setState({}))}],n.__c=e_,!e_.u)){var o=function(e,r,t){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter(function(e){return e.__c});if(o.every(function(e){return!e.__N}))return!a||a.call(this,e,r,t);var i=!1;return o.forEach(function(e){if(e.__N){var r=e.__[0];e.__=e.__N,e.__N=void 0,r!==e.__[0]&&(i=!0)}}),!(!i&&n.__c.props===e)&&(!a||a.call(this,e,r,t))};e_.u=!0;var a=e_.shouldComponentUpdate,i=e_.componentWillUpdate;e_.componentWillUpdate=function(e,r,t){if(this.__e){var n=a;a=void 0,o(e,r,t),a=n}i&&i.call(this,e,r,t)},e_.shouldComponentUpdate=o}return n.__N||n.__}(eH,e)}function eC(e,r){var t=ex(eg++,3);!O.__s&&eU(t.__H,r)&&(t.__=e,t.i=r,e_.__H.__h.push(t))}function eT(e,r){var t=ex(eg++,4);!O.__s&&eU(t.__H,r)&&(t.__=e,t.i=r,e_.__h.push(t))}function eN(e){return eb=5,ez(function(){return{current:e}},[])}function ez(e,r){var t=ex(eg++,7);return eU(t.__H,r)?(t.__V=e(),t.i=r,t.__h=e,t.__V):t.__}function eB(){for(var e;e=ek.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(eI),e.__H.__h.forEach(eL),e.__H.__h=[]}catch(r){e.__H.__h=[],O.__e(r,e.__v)}}O.__b=function(e){e_=null,eD&&eD(e)},O.__r=function(e){eF&&eF(e),eg=0;var r=(e_=e.__c).__H;r&&(ey===e_?(r.__h=[],e_.__h=[],r.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=eS,e.__N=e.i=void 0})):(r.__h.forEach(eI),r.__h.forEach(eL),r.__h=[],eg=0)),ey=e_},O.diffed=function(e){eM&&eM(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(1!==ek.push(r)&&eE===O.requestAnimationFrame||((eE=O.requestAnimationFrame)||eO)(eB)),r.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==eS&&(e.__=e.__V),e.i=void 0,e.__V=eS})),ey=e_=null},O.__c=function(e,r){r.some(function(e){try{e.__h.forEach(eI),e.__h=e.__h.filter(function(e){return!e.__||eL(e)})}catch(t){r.some(function(e){e.__h&&(e.__h=[])}),r=[],O.__e(t,e.__v)}}),eA&&eA(e,r)},O.unmount=function(e){eP&&eP(e);var r,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(e){try{eI(e)}catch(e){r=e}}),t.__H=void 0,r&&O.__e(r,t.__v))};var ej="function"==typeof requestAnimationFrame;function eO(e){var r,t=function(){clearTimeout(n),ej&&cancelAnimationFrame(r),setTimeout(e)},n=setTimeout(t,100);ej&&(r=requestAnimationFrame(t))}function eI(e){var r=e_,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),e_=r}function eL(e){var r=e_;e.__c=e.__(),e_=r}function eU(e,r){return!e||e.length!==r.length||r.some(function(r,t){return r!==e[t]})}function eH(e,r){return"function"==typeof r?r(e):r}let eW=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement);function eq(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r}let eY=e=>{let r=eN([e,(...e)=>r[0](...e)]).current;return eT(()=>{r[0]=e}),r[1]},eG=(e="",r=location.pathname)=>r.toLowerCase().indexOf(e.toLowerCase())?"~"+r:r.slice(e.length)||"/",eV=(e,r="")=>"~"===e[0]?e.slice(1):r+e,eX="pushState",eK="replaceState",e$=["popstate",eX,eK,"hashchange"],eJ=e=>{for(let r of e$)addEventListener(r,e);return()=>{for(let r of e$)removeEventListener(r,e)}},eZ=(e,r)=>(function(e,r,t){t&&!eW&&(r=t);let n=r(),[{_instance:o},a]=eR({_instance:{_value:n,_getSnapshot:r}});return eT(()=>{o._value=n,o._getSnapshot=r,eq(o._value,r())||a({_instance:o})},[e,n,r]),eC(()=>(eq(o._value,o._getSnapshot())||a({_instance:o}),e(()=>{eq(o._value,o._getSnapshot())||a({_instance:o})})),[e]),n})(eJ,e,r),eQ=()=>location.pathname,e0=({ssrPath:e}={})=>eZ(eQ,e?()=>e:eQ),e1=(e,{replace:r=!1}={})=>history[r?eK:eX](null,"",e);if("undefined"!=typeof history)for(let e of[eX,eK]){let r=history[e];history[e]=function(){let t=r.apply(this,arguments),n=new Event(e);return n.arguments=arguments,dispatchEvent(n),t}}let e2=e=>e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),e4=(e,r,t)=>{let n=e?"((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*)":"([^\\/]+?)";return r&&t&&(n="(?:\\/"+n+")"),n+(r?"?":"")},e6=e=>{let r=/:([A-Za-z0-9_]+)([?+*]?)/g,t=null,n=0,o=[],a="";for(;null!==(t=r.exec(e));){let[i,s,u]=t,l="+"===u||"*"===u,c="?"===u||"*"===u,d=c&&"/"===e[t.index-1]?1:0,f=e.substring(n,t.index-d);o.push({name:s}),n=r.lastIndex,a+=e2(f)+e4(l,c,d)}return{keys:o,regexp:RegExp("^"+(a+=e2(e.substring(n)))+"(?:\\/)?$","i")}},e3={hook:(e={})=>[eG(e.base,e0(e)),eY((r,t)=>e1(eV(r,e.base),t))],matcher:function(e=e6){let r={},t=t=>r[t]||(r[t]=e(t));return(e,r)=>{let{regexp:n,keys:o}=t(e||""),a=n.exec(r);if(!a)return[!1,null];let i=o.reduce((e,r,t)=>(e[r.name]=a[t+1],e),{});return[!0,i]}}(),base:""},e9=(t={__c:r="__cC"+Y++,__:e3,Consumer:function(e,r){return e.children(r)},Provider:function(e){var t,n;return this.getChildContext||(t=[],(n={})[r]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(function(e){e.__e=!0,en(e)})},this.sub=function(e){t.push(e);var r=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),r&&r.call(e)}}),e.children}}).Provider.__=t.Consumer.contextType=t,e8=()=>{var e,r;return e=e_.context[e9.__c],(r=ex(eg++,9)).c=e9,e?(null==r.__&&(r.__=!0,e.sub(e_)),e.props.value):e9.__},e5=e=>e.hook(e),e7=e=>{let r=e8(),[t]=e5(r);return r.matcher(e,t)},re=({hook:e,matcher:r,ssrPath:t,base:n="",parent:o,children:a})=>{let i=(a,i=o||e3)=>(a.hook=e||i.hook,a.matcher=r||i.matcher,a.ssrPath=t||i.ssrPath,a.ownBase=n,a.parent=o,a),[s]=eR(()=>i({get base(){return(s.parent||e3).base+s.ownBase}}));return eT(()=>{i(s)}),Z(e9.Provider,{value:s,children:a})},rr=({path:e,match:r,component:t,children:n})=>{let o=e7(e),[a,i]=r||o;return a?t?Z(t,{params:i}):"function"==typeof n?n(i):n:null},rt=(e,r)=>{let t=e8(),[,n]=e5(t),{to:o,href:a=o,children:i,onClick:s}=e,u=eY(r=>{r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||0!==r.button||(s&&s(r),r.defaultPrevented||(r.preventDefault(),n(o||a,e)))}),l={href:"~"===a[0]?a.slice(1):t.base+a,onClick:u,to:null,ref:r},c=L(i)?i:Z("a",e);return ep(c,l)},rn=e=>Array.isArray(e)?[].concat(...e.map(e=>e&&e.type===ee?rn(e.props.children):rn(e))):[e],ro=({children:e,location:r})=>{let t=e8(),n=t.matcher,[o]=e5(t);for(let t of rn(e)){let e=0;if(L(t)&&(e=t.props.path?n(t.props.path,r||o):[!0,{}])[0])return ep(t,{match:e})}return null},ra=()=>window.location.hash.replace("#","")||"/",ri=({url:e})=>`/#/play/${encodeURIComponent(e)}`,rs=e=>{if("/"===e)return"home";let r=e.split("/").filter(Boolean)[0];return r||""},ru=()=>{var e;let[r,t]=eR(ra());eC(()=>{let e=()=>{let e=ra();e!==r&&(t(e),window.scrollTo(0,0))};return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[r,t]);let n=(e=e=>{window.location.hash=e.replace("#/","")},eb=8,ez(function(){return e},[]));return[r,n]},rl=["light","dim","dark","solarized-light","solarized-dark","emo","redrum","toxin","valve","wasp","a8008","a80s_after_dark","a9009","aether","alduin","alpine","arch","aurora","beach","bento","bingsu","bliss","blue_dolphin","blueberry_dark","blueberry_light","botanical","bouquet","breeze","bushido","cafe","camping","carbon","catppuccin","chaos_theory","cheesecake","cherry_blossom","comfy","copper","creamsicle","cyberspace","dark_magic_girl","dark_note","darling","deku","desert_oasis","dev","diner","dino","dmg","dollar","dots","dracula","drowning","dualshot","earthsong","everblush","evil_eye","ez_mode","fire","fledgling","fleuriste","froyo","frozen_llama","fruit_chew","fundamentals","future_funk","godspeed","graen","grand_prix","gruvbox_dark","gruvbox_light","hammerhead","hanok","hedge","honey","horizon","husqy","iceberg_dark","iceberg_light","ishtar","iv_clover","iv_spade","joker","laser","lavender","leather","lil_dragon","lime","luna","magic_girl","mashu","matcha_moccha","material","matrix","menthol","metaverse","metropolis","mexican","miami","miami_nights","midnight","milkshake","mint","mizu","modern_dolch","modern_dolch_light","modern_ink","monokai","moonlight","mountain","mr_sleeves","ms_cupcakes","muted","nautilus","nebula","night_runner","nord","nord_light","norse","oblivion","olive","olivia","onedark","our_theme","paper","passion_fruit","pastel","peach_blossom","peaches","pink_lemonade","pulse","purpurite","red_dragon","red_samurai","repose_dark","repose_light","retro","retrocast","rose_pine","rose_pine_dawn","rose_pine_moon","rudy","ryujinscales","serika","serika_dark","sewing_tin","sewing_tin_light","shadow","shoko","slambook","snes","soaring_skies","sonokai","stealth","strawberry","striker","superuser","sweden","taro","terminal","terra","terror_below","tiramisu","trackday","trance","tron_orange","vaporwave","viridescent","voc","vscode","watermelon","wavez","witch_girl"],rc="elseifplayer/theme",rd=rl[0],rf=()=>{let e=localStorage.getItem(rc);return e||rd},rm=e=>rl.includes(e)?e:rf(),rh=(e=rf())=>{let[r,t]=eR(e),n=e=>{let r=rm(e);t(r),localStorage.setItem(rc,r)};return{currentTheme:r,setTheme:n,setRandomTheme:()=>{let e=rl[Math.floor(Math.random()*rl.length)];n(e)},themes:rl}};function rp({theme:e,setLocation:r,buildLink:t}){return ew("input",{type:"file",onChange:({target:n})=>{let o=n.files[0],a=`${URL.createObjectURL(o)}#${o.name}`;r(t({url:a,theme:e}))}})}function rv({theme:e,setLocation:r,buildLink:t}){let n=/^(http|https):\/\/[^ "]+$/;return ew("input",{type:"text",placeholder:"https://...",onKeyPress:({keyCode:o,target:a})=>{if(13!==o)return;let i=encodeURI(a.value);n.test(i)&&r(t({url:i,theme:e}))}})}function rw({themeEngine:e}){let r=e.themes.map(e=>ew("option",{value:e,children:e},e));return ew("select",{value:e.currentTheme,onChange:({target:r})=>e.setTheme(r.value),children:r})}function rg({themeEngine:e}){let r=ru()[1];return ew("main",{children:[ew("h1",{children:"ElseIFPlayer"}),ew("section",{children:ew("p",{children:["Interactive Fiction interpreter that runs right in your browser.",ew("br",{}),"Source code can be found in this ",ew("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/He4eT/elseifplayer",children:"repository"}),"."]})}),ew("hr",{}),ew("section",{children:[ew("h2",{children:"Interface Theme"}),ew(rw,{themeEngine:e}),ew("p",{children:["Preview and choose from available themes on the ",ew(rt,{href:"/#/themes/",children:"themes page"}),"."]}),ew("p",{children:ew("small",{children:"Double-click the input field during the game to enter full-screen mode."})})]}),ew("hr",{}),ew("section",{children:[ew("h2",{children:"Play a Game from the List"}),ew("p",{children:ew(rt,{href:"/#/games/",children:"IFDB games"})})]}),ew("hr",{}),ew("section",{children:[ew("h2",{children:"Play the Game from a File"}),ew("p",{children:ew("details",{children:[ew("summary",{children:"Supported formats"}),ew("p",{children:"Text-only games are supported:"}),ew("ul",{children:[ew("li",{children:"ADRIFT 4 (.taf)"}),ew("li",{children:"Glulx (.gblorb, .ulx)"}),ew("li",{children:"Hugo (.hex)"}),ew("li",{children:"TADS 2/3 (.gam, .t3)"}),ew("li",{children:"Z-code (.z3, .z4, .z5, .z8, .blorb)"})]})]})}),ew("p",{children:ew("label",{children:["Local file: ",ew("br",{}),ew(rp,{setLocation:r,buildLink:ri,theme:e.currentTheme})]})}),ew("p",{children:ew("label",{children:["Direct link: ",ew("br",{}),ew(rv,{setLocation:r,buildLink:ri,theme:e.currentTheme})]})})]})]})}function r_({name:e,ifdb:r,url:t}){return ew("div",{children:[ew("h4",{children:e}),ew("a",{target:"_blank",rel:"noopener noreferrer",href:r,children:"IFDB page"}),ew("span",{children:" | "}),ew(rt,{href:ri({url:t}),children:"Play"})]})}var ry=[["Lost Pig","https://ifdb.org/viewgame?id=mohwfk47yjzii14w","https://mirror.ifarchive.org/if-archive/games/zcode/LostPig.z8"],["Counterfeit Monkey","https://ifdb.org/viewgame?id=aearuuxv83plclpl","https://mirror.ifarchive.org/if-archive/games/glulx/CounterfeitMonkey.gblorb"],["Anchorhead","https://ifdb.org/viewgame?id=op0uw1gn1tjqmjt7","https://ifarchive.org/if-archive/games/zcode/anchor.z8"],["Galatea","https://ifdb.org/viewgame?id=urxrv27t7qtu52lb","https://mirror.ifarchive.org/if-archive/games/zcode/Galatea.zblorb"],["Photopia","https://ifdb.org/viewgame?id=ju778uv5xaswnlpl","https://mirror.ifarchive.org/if-archive/games/zcode/photopia.z5"],["Spider and Web","https://ifdb.org/viewgame?id=2xyccw3pe0uovfad","https://mirror.ifarchive.org/if-archive/games/zcode/Tangle.z5"],["Slouching Towards Bedlam","https://ifdb.org/viewgame?id=032krqe6bjn5au78","https://mirror.ifarchive.org/if-archive/games/competition2003/zcode/slouch/slouch.z5"],["Curses!","https://ifdb.org/viewgame?id=plvzam05bmz3enh8","https://mirror.ifarchive.org/if-archive/games/zcode/curses.z5"],["Violet","https://ifdb.org/viewgame?id=4glrrfh7wrp9zz7b","https://mirror.ifarchive.org/if-archive/games/zcode/Violet.zblorb"],["The Wizard Sniffer","https://ifdb.org/viewgame?id=uq18rw9gt8j58da","https://ifarchive.org/if-archive/games/competition2017/The%20Wizard%20Sniffer/The_Wizard_Sniffer.gblorb"],["Shade","https://ifdb.org/viewgame?id=hsfc7fnl40k4a30q","https://mirror.ifarchive.org/if-archive/games/zcode/shade.z5"],["Vespers","https://ifdb.org/viewgame?id=6dj2vguyiagrhvc2","https://mirror.ifarchive.org/if-archive/games/zcode/vespers.z8"],["Savoir-Faire","https://ifdb.org/viewgame?id=p0cizeb3kiwzlm2p","https://mirror.ifarchive.org/if-archive/games/zcode/Savoir-Faire.zblorb"],["Aisle","https://ifdb.org/viewgame?id=j49crlvd62mhwuzu","https://mirror.ifarchive.org/if-archive/games/zcode/Aisle.z5"],["Gun Mute","https://ifdb.org/viewgame?id=xwedbibfksczn7eq","https://mirror.ifarchive.org/if-archive/games/tads/GunMute.t3"],["A Beauty Cold and Austere","https://ifdb.org/viewgame?id=y9y7jozi0l76bb82","https://ifarchive.org/if-archive/games/competition2017/A%20Beauty%20Cold%20and%20Austere/A_Beauty_Cold_and_Austere.gblorb"],["Coloratura","https://ifdb.org/viewgame?id=g0fl99ovcrq2sqzk","https://mirror.ifarchive.org/if-archive/games/competition2013/glulx/coloratura/Coloratura.gblorb"],["Lime Ergot","https://ifdb.org/viewgame?id=b8mb4fcwmf1hrxl","https://mirror.ifarchive.org/if-archive/games/glulx/Lime_Ergot.gblorb"],["Rameses","https://ifdb.org/viewgame?id=0stz0hr7a98bp9mp","https://mirror.ifarchive.org/if-archive/games/zcode/rameses.zblorb"],["The Wand","https://ifdb.org/viewgame?id=2jil5vbxmbv8riv1","https://ifarchive.org/if-archive/games/glulx/Wand.ulx"],["1893: A World's Fair Mystery","https://ifdb.org/viewgame?id=00e0t7swrris5pg6","https://mirror.ifarchive.org/if-archive/games/tads/1893.gam"],["Adventure","https://ifdb.org/viewgame?id=fft6pu91j85y4acv","https://mirror.ifarchive.org/if-archive/games/zcode/Advent.z5"],["Alias 'The Magpie'","https://ifdb.org/viewgame?id=yspn49v69hzc8rtb","https://ifarchive.org/if-archive/games/competition2018/Alias%20The%20Magpie/Alias%20%27The%20Magpie%27.gblorb"],["Cragne Manor","https://ifdb.org/viewgame?id=4x7nltu8p851tn4x","https://mirror.ifarchive.org/if-archive/games/glulx/cragne.gblorb"],["The Edifice","https://ifdb.org/viewgame?id=4tb9soabrb4apqzd","https://mirror.ifarchive.org/if-archive/games/zcode/edifice.z5"],["Endless, Nameless","https://ifdb.org/viewgame?id=7vtm1rq16hh3xch","https://ifarchive.org/if-archive/games/zcode/nameless.z8"],["Everybody Dies","https://ifdb.org/viewgame?id=lyblvftb8xtlo0a1","https://mirror.ifarchive.org/if-archive/games/competition2008/glulx/everybodydies/EverybodyDies.gblorb"],["Foo Foo","https://ifdb.org/viewgame?id=ec6x9y8qcmsrxob9","https://ifarchive.org/if-archive/games/springthing/2016/FooFoo.gblorb"],["The Gostak","https://ifdb.org/viewgame?id=w5s3sv43s3p98v45","https://mirror.ifarchive.org/if-archive/games/zcode/gostak.z5"],["Inside the Facility","https://ifdb.org/viewgame?id=stsdri5zh7a4i5my","https://ifarchive.org/if-archive/games/competition2016/Inside%20the%20Facility/Facility.z8"],["Make It Good","https://ifdb.org/viewgame?id=jdrbw1htq4ah8q57","https://mirror.ifarchive.org/if-archive/games/zcode/MakeItGood.z8"],["Sub Rosa","https://ifdb.org/viewgame?id=73nvz9yui87ub3sd","https://mirror.ifarchive.org/if-archive/games/glulx/Sub_Rosa.gblorb"],["Suveh Nux","https://ifdb.org/viewgame?id=xkai23ry99qdxce3","https://mirror.ifarchive.org/if-archive/games/zcode/suvehnux.z5"],["Varicella","https://ifdb.org/viewgame?id=ywwlr3tpxnktjasd","https://mirror.ifarchive.org/if-archive/games/zcode/vgame.z8"]].map(([e,r,t])=>({name:e,ifdb:r,url:t}));let rE={name:"The Dreamhold",ifdb:"https://ifdb.org/viewgame?id=3myqnrs64nbtwdaz",url:"https://mirror.ifarchive.org/if-archive/games/zcode/dreamhold.z8"};function rb(){return ew("main",{className:"-soi4G_games",children:[ew("h1",{children:[ew("a",{target:"_blank",rel:"noopener noreferrer",href:"https://ifdb.org/",title:"The Interactive Fiction Database",children:"IFDB"})," Games"]}),ew("p",{children:["Choose one or ",ew(rt,{href:"/",children:"go back"}),"."]}),ew("section",{className:"-soi4G_tutorial",children:[ew("h2",{children:"Tutorial"}),ew("p",{children:"If you are not familiar with Interactive Fiction, you should start with this tutorial game by\xa0Andrew\xa0Plotkin:"}),ew("ul",{children:ew("li",{children:ew(r_,{...rE})})})]}),ew("h2",{children:"Interactive Fiction Top 50 of All Time"}),ew("p",{children:[ew("a",{target:"_blank",rel:"noopener noreferrer",href:"https://ifdb.org/search?comp&sortby=awn&searchfor=series%3AInteractive+Fiction+Top+50+of+All+Time",children:"Every four years "}),", Victor Gijsbers puts together a list of the top 50 IF games of all time. Here is an almost complete and slightly rearranged version of the ",ew("a",{target:"_blank",rel:"noopener noreferrer",href:"https://ifdb.org/viewcomp?id=1lv599reviaxvwo7",children:"list from 2019"}),":"]}),ew("ol",{children:ry.map(e=>ew("li",{children:ew(r_,{...e})},e.name))})]})}h="qdlvgW_input",p="qdlvgW_message",v="qdlvgW_output",w="qdlvgW_subheader",g="qdlvgW_themePreview";let rk=(e,r)=>ew("section",{className:[g,r].join(" "),children:[ew("div",{className:v,children:[ew("div",{className:[p,h].join(" "),children:"> look"}),ew("div",{children:ew("br",{})}),ew("div",{className:[p,w].join(" "),children:r}),ew("div",{children:"Observe a vibrant demonstration of colors at work, showcasing their versatile usage right before your eyes."}),ew("div",{children:ew("br",{})})]}),ew("button",{onClick:()=>e.setTheme(r),children:"Apply this colors"})]},r);function rS({themeEngine:e}){let r=e.themes.map(r=>rk(e,r));return ew("main",{className:"qdlvgW_themes",children:[ew("h1",{children:"Themes Page"}),ew("p",{children:["Choose one or ",ew(rt,{href:"/",children:"go back"}),"."]}),ew("section",{className:[g,"qdlvgW_current"].join(" "),children:[ew("h2",{children:"Current Theme"}),ew("div",{className:v,children:[ew("div",{className:[p,h].join(" "),children:"> look"}),ew("div",{children:ew("br",{})}),ew("div",{className:[p,w].join(" "),children:["Selected: ",e.currentTheme]}),ew("div",{children:"You can set random one with the button below or choose any theme from the list."}),ew("div",{children:ew("br",{})})]}),ew("button",{onClick:()=>e.setRandomTheme(),children:"Set a random theme"})]}),ew("h2",{children:"Theme List"}),ew("section",{children:r})]})}class rD{constructor(e){this.dialog=e.options.Dialog,this.streaming=this.dialog.streaming,this.FS=e.Module.FS,this.VM=e,this.filename_map={},this.filename_counter=0}close(e){"storyfile"===e.name||(this.streaming?e.fstream.fclose():2!==e.fmode&&this.dialog.file_write(e.fref,e.data))}createNode(e,r,t){let n=this.FS;if(!n.isDir(t)&&!n.isFile(t))throw new n.ErrnoError(28);let o=n.createNode(e,r,t);return o.node_ops=this,o.stream_ops=this,o.timestamp=Date.now(),o}getattr(e){let r="storyfile"===e.name?this.VM.data.length:0;return{atime:new Date(e.timestamp),ctime:new Date(e.timestamp),dev:1,gid:0,ino:e.id,mode:e.mode,mtime:new Date(e.timestamp),nlink:1,rdev:e.rdev,size:r,uid:0}}get_dialog_ref(e){let[r,t]=e.split(".");t=t.replace("glk","");let n="";return"save"===t&&(n=this.VM.Module.AsciiToString(this.VM.Module._gidispatch_get_game_id())),this.dialog.file_construct_ref(r,t,n)}llseek(e,r,t){let n=r;if(1===t)n+=e.position;else if(2===t){if("storyfile"===e.name)n+=e.data.length;else if(this.streaming){let r=e.fstream.ftell();e.fstream.fseek(0,2),n+=e.fstream.ftell(),e.fstream.fseek(r,0)}else n+=e.data.length}if(n<0)throw new this.FS.ErrnoError(28);return n}lookup(e,r){if("storyfile"!==r){let e=this.filename_map[r]||r;if(!this.dialog.file_ref_exists(this.streaming?{filename:e}:this.get_dialog_ref(e)))throw new this.FS.ErrnoError(44)}return this.createNode(e,r,33206)}mknod(e,r,t){return this.createNode(e,r,t)}mmap(){throw Error("EmglkenFS.mmap")}mount(){return this.createNode(null,"/",16895,0)}msync(){throw Error("EmglkenFS.msync")}open(e){if(e.name=e.node.name,"storyfile"===e.name)e.data=this.VM.data;else{var r;let t=1024&(r=e.flags)?5:1&r?1:2&r?3:2,n=this.filename_map[e.name]||e.name;this.streaming?e.fstream=this.dialog.file_fopen(t,{filename:n}):(e.fref=this.get_dialog_ref(n),e.fmode=t,e.data=null,1!==t&&(e.data=this.dialog.file_read(e.fref)),null==e.data&&(e.data=new Uint8Array(0),2!==t&&this.dialog.file_write(e.fref,"",!0)))}}read(e,r,t,n,o){if(0===n)return 0;if("storyfile"===e.name){let a=Math.min(e.data.length-o,n);return r.set(e.data.subarray(o,o+a),t),a}if(this.streaming){e.fstream.fseek(o,0);let a=e.fstream.BufferClass.from(r.buffer,t,n);return e.fstream.fread(a,n)}{let a=Math.min(e.data.length-o,n);return r.set(e.data.subarray(o,o+a),t),a}}readdir(){throw Error("EmglkenFS.readdir")}readlink(){throw new this.FS.ErrnoError(28)}register_filename(e,r){let t="save"===r?".glksave":"data"===r?".glkdata":".txt";if(/\.(glkdata|glksave|txt)$/.test(e)||(e+=t),this.filename_map[e])return this.filename_map[e];let n="emglken_fake_file_"+this.filename_counter++;return this.filename_map[e]=n,this.filename_map[n+t]=e,n}rename(){throw Error("EmglkenFS.rename")}rmdir(){throw Error("EmglkenFS.rmdir")}setattr(){}symlink(){throw Error("EmglkenFS.symlink")}unlink(e,r){let t=this.filename_map[r]||r;this.dialog.file_remove_ref(this.get_dialog_ref(t))}write(e,r,t,n,o){if("storyfile"===e.name)throw Error("EmglkenFS.write: cannot write to storyfile");if(this.streaming){e.fstream.fseek(o,0);let a=e.fstream.BufferClass.from(r).subarray(t,t+n);return e.fstream.fwrite(a,n)}{o=o||e.position;let a=n+o;if(a>e.data.length){let r=e.data;e.data=new Uint8Array(a),e.data.set(r)}return e.data.set(r.subarray(t,t+n),o),n}}}let rF={arguments:["storyfile"]};class rM{init(e,r){this.data=e,this.options=Object.assign({},rF,this.default_options(),r)}async start(){let e=new TextEncoder,r="",t={arguments:this.options.show_help?["-help"]:this.options.arguments,emglken_stdin_buffers:[],emglken_stdin_ready(){},locateFile(){},print:e=>{if(""!==r||""===e||e.startsWith("{")){if(r+=e,e.endsWith("}")){let e;try{e=JSON.parse(r)}catch(e){}e&&(r="",e.specialinput&&"fileref_prompt"===e.specialinput.type&&(this.last_fr_usage=e.specialinput.filetype),this.options.GlkOte.update(e))}}else console.log(e)},preRun:()=>{let e=t.FS;this.EFS=new rD(this),e.mkdir("/emglken"),e.mount(this.EFS,{},"/emglken"),e.chdir("/emglken")},wasmBinary:this.options.wasmBinary};this.Module=t,this.options.accept=r=>{"specialresponse"===r.type&&"fileref_prompt"===r.response&&r.value&&(this.EFS.streaming?r.value=this.EFS.register_filename(r.value.filename,this.last_fr_usage):r.value=r.value.filename);let n=JSON.stringify(r),o=e.encode(n);t.emglken_stdin_buffers.push(o),t.emglken_stdin_ready()},await this.options.vmcore(t),this.options.GlkOte.init(this.options)}}var rA={};rA=B("6kBsm").getBundleURL("ejVIo")+B("n9Yfb").resolve("5EF4K");var rP=(n="file:///node_modules/emglken/build/bocfel-core.js",function(e={}){var r,t,o,a,i,s,u,l,c,d,f,m,h,p,v,w,g,_,e=void 0!==e?e:{};e.ready=new Promise(function(e,r){t=e,o=r});var y=Object.assign({},e),E=[],b="./this.program",k=(e,r)=>{throw r},S="";"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),n&&(S=n),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(200==n.status||0==n.status&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)};var D=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);Object.assign(e,y),y=null,e.arguments&&(E=e.arguments),e.thisProgram&&(b=e.thisProgram),e.quit&&(k=e.quit),e.wasmBinary&&(u=e.wasmBinary);var M=e.noExitRuntime||!1;"object"!=typeof WebAssembly&&V("no native wasm support detected");var A=!1,P=new TextDecoder("utf8");function x(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;return P.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))}function R(e,r){if(!e)return"";for(var t=e+r,n=e;!(n>=t)&&f[n];)++n;return P.decode(f.subarray(e,n))}function C(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function T(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function N(){var r=l.buffer;e.HEAP8=d=new Int8Array(r),e.HEAP16=m=new Int16Array(r),e.HEAP32=h=new Int32Array(r),e.HEAPU8=f=new Uint8Array(r),e.HEAPU16=new Uint16Array(r),e.HEAPU32=p=new Uint32Array(r),e.HEAPF32=new Float32Array(r),e.HEAPF64=new Float64Array(r)}var z=[],B=[],j=[],O=[],I=[],L=!1,U=0,H=0,W=null,q=null;function Y(r){H++,e.monitorRunDependencies&&e.monitorRunDependencies(H)}function G(r){if(H--,e.monitorRunDependencies&&e.monitorRunDependencies(H),0==H&&(null!==W&&(clearInterval(W),W=null),q)){var t=q;q=null,t()}}function V(r){e.onAbort&&e.onAbort(r),F(r="Aborted("+r+")"),A=!0,c=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw o(t),t}function X(e){return e.startsWith("data:application/octet-stream;base64,")}function K(e){try{if(e==v&&u)return new Uint8Array(u);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function $(e,r,t){return(u||"function"!=typeof fetch?Promise.resolve().then(function(){return K(e)}):fetch(e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()}).catch(function(){return K(e)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(t,function(e){F("failed to asynchronously prepare wasm: "+e),V(e)})}function J(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Z(r){for(;r.length>0;)r.shift()(e)}e.locateFile?X(v="bocfel-core.wasm")||(r=v,v=e.locateFile?e.locateFile(r,S):S+r):v=new URL(rA).href;var Q=[],ee=0,er=0;function et(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){p[this.ptr+4>>2]=e},this.get_type=function(){return p[this.ptr+4>>2]},this.set_destructor=function(e){p[this.ptr+8>>2]=e},this.get_destructor=function(){return p[this.ptr+8>>2]},this.set_refcount=function(e){h[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,d[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=d[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,d[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=d[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=h[this.ptr>>2];h[this.ptr>>2]=e+1},this.release_ref=function(){var e=h[this.ptr>>2];return h[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){p[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return p[this.ptr+16>>2]},this.get_exception_ptr=function(){if(eI(this.get_type()))return p[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function en(){var e=er;if(!e)return eN(0),0;var r=new et(e);r.set_adjusted_ptr(e);var t=r.get_type();if(!t)return eN(0),e;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===t)break;if(eO(o,t,r.ptr+16))return eN(o),e}return eN(t),e}var eo={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=eo.isAbs(e),t="/"===e.substr(-1);return(e=eo.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=eo.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=eo.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return eo.normalize(e.join("/"))},join2:(e,r)=>eo.normalize(e+"/"+r)},ea={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:el.cwd();if("string"!=typeof n)throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=eo.isAbs(n)}return e=eo.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ea.resolve(e).substr(1),r=ea.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}for(var u=[],s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function ei(e,r,t){var n=Array(t>0?t:T(e)+1),o=C(e,n,0,n.length);return r&&(n.length=o),n}var es={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){es.ttys[e]={input:[],output:[],ops:r},el.registerDevice(e,es.stream_ops)},stream_ops:{open:function(e){var r=es.ttys[e.node.rdev];if(!r)throw new el.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new el.ErrnoError(60);for(var a,i=0,s=0;s<n;s++){try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new el.ErrnoError(29)}if(void 0===a&&0===i)throw new el.ErrnoError(6);if(null==a)break;i++,r[t+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new el.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new el.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=ei(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(D(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(D(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(F(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(F(x(e.output,0)),e.output=[])}}},eu={ops_table:null,mount:function(e){return eu.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(el.isBlkdev(t)||el.isFIFO(t))throw new el.ErrnoError(63);eu.ops_table||(eu.ops_table={dir:{node:{getattr:eu.node_ops.getattr,setattr:eu.node_ops.setattr,lookup:eu.node_ops.lookup,mknod:eu.node_ops.mknod,rename:eu.node_ops.rename,unlink:eu.node_ops.unlink,rmdir:eu.node_ops.rmdir,readdir:eu.node_ops.readdir,symlink:eu.node_ops.symlink},stream:{llseek:eu.stream_ops.llseek}},file:{node:{getattr:eu.node_ops.getattr,setattr:eu.node_ops.setattr},stream:{llseek:eu.stream_ops.llseek,read:eu.stream_ops.read,write:eu.stream_ops.write,allocate:eu.stream_ops.allocate,mmap:eu.stream_ops.mmap,msync:eu.stream_ops.msync}},link:{node:{getattr:eu.node_ops.getattr,setattr:eu.node_ops.setattr,readlink:eu.node_ops.readlink},stream:{}},chrdev:{node:{getattr:eu.node_ops.getattr,setattr:eu.node_ops.setattr},stream:el.chrdev_stream_ops}});var o=el.createNode(e,r,t,n);return el.isDir(o.mode)?(o.node_ops=eu.ops_table.dir.node,o.stream_ops=eu.ops_table.dir.stream,o.contents={}):el.isFile(o.mode)?(o.node_ops=eu.ops_table.file.node,o.stream_ops=eu.ops_table.file.stream,o.usedBytes=0,o.contents=null):el.isLink(o.mode)?(o.node_ops=eu.ops_table.link.node,o.stream_ops=eu.ops_table.link.stream):el.isChrdev(o.mode)&&(o.node_ops=eu.ops_table.chrdev.node,o.stream_ops=eu.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}}},node_ops:{getattr:function(e){var r={};return r.dev=el.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,el.isDir(e.mode)?r.size=4096:el.isFile(e.mode)?r.size=e.usedBytes:el.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&eu.resizeFileStorage(e,r.size)},lookup:function(e,r){throw el.genericErrors[44]},mknod:function(e,r,t,n){return eu.createNode(e,r,t,n)},rename:function(e,r,t){if(el.isDir(e.mode)){var n;try{n=el.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new el.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=el.lookupNode(e,r);for(var n in t.contents)throw new el.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=eu.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!el.isLink(e.mode))throw new el.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===d.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(eu.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&el.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new el.ErrnoError(28);return n},allocate:function(e,r,t){eu.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!el.isFile(e.node.mode))throw new el.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==d.buffer)throw(t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,a=void V(),new el.ErrnoError(48);return i=!1,{ptr:a=s.byteOffset,allocated:i}},msync:function(e,r,t,n,o){return eu.stream_ops.write(e,r,0,n,t,!1),0}}},el={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=ea.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new el.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=el.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=el.lookupNode(n,t[a]),o=eo.join2(o,t[a]),el.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;el.isLink(n.mode);){var u=el.readlink(o);if(o=ea.resolve(eo.dirname(o),u),n=el.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new el.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(el.isRoot(e)){var t=e.mount.mountpoint;if(!r)return t;return"/"!==t[t.length-1]?t+"/"+r:t+r}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%el.nameTable.length},hashAddNode:e=>{var r=el.hashName(e.parent.id,e.name);e.name_next=el.nameTable[r],el.nameTable[r]=e},hashRemoveNode:e=>{var r=el.hashName(e.parent.id,e.name);if(el.nameTable[r]===e)el.nameTable[r]=e.name_next;else for(var t=el.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=el.mayLookup(e);if(t)throw new el.ErrnoError(t,e);for(var n=el.hashName(e.id,r),o=el.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return el.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new el.FSNode(e,r,t,n);return el.hashAddNode(o),o},destroyNode:e=>{el.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=el.flagModes[e];if(void 0===r)throw Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>el.ignorePermissions?0:r.includes("r")&&!(292&e.mode)||r.includes("w")&&!(146&e.mode)||r.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>el.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return el.lookupNode(e,r),20}catch(e){}return el.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{try{n=el.lookupNode(e,r)}catch(e){return e.errno}var n,o=el.nodePermissions(e,"wx");if(o)return o;if(t){if(!el.isDir(n.mode))return 54;if(el.isRoot(n)||el.getPath(n)===el.cwd())return 10}else if(el.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?el.isLink(e.mode)?32:el.isDir(e.mode)&&("r"!==el.flagsToPermissionString(r)||512&r)?31:el.nodePermissions(e,el.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=el.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!el.streams[t])return t;throw new el.ErrnoError(33)},getStream:e=>el.streams[e],createStream:(e,r,t)=>{el.FSStream||(el.FSStream=function(){this.shared={}},el.FSStream.prototype={},Object.defineProperties(el.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return(2097155&this.flags)!=1}},isWrite:{get:function(){return(2097155&this.flags)!=0}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new el.FSStream,e);var n=el.nextfd(r,t);return e.fd=n,el.streams[n]=e,e},closeStream:e=>{el.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=el.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new el.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{el.devices[e]={stream_ops:r}},getDevice:e=>el.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),el.syncFSRequests++,el.syncFSRequests>1&&F("warning: "+el.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=el.getMounts(el.root.mount),n=0;function o(e){return el.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&el.root)throw new el.ErrnoError(10);if(!o&&!a){var i=el.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,el.isMountpoint(n))throw new el.ErrnoError(10);if(!el.isDir(n.mode))throw new el.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?el.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=el.lookupPath(e,{follow_mount:!1});if(!el.isMountpoint(r.node))throw new el.ErrnoError(28);var t=r.node,n=t.mounted,o=el.getMounts(n);Object.keys(el.nameTable).forEach(e=>{for(var r=el.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&el.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=el.lookupPath(e,{parent:!0}).node,o=eo.basename(e);if(!o||"."===o||".."===o)throw new el.ErrnoError(28);var a=el.mayCreate(n,o);if(a)throw new el.ErrnoError(a);if(!n.node_ops.mknod)throw new el.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=(void 0!==r?r:438)&4095|32768,el.mknod(e,r,0)),mkdir:(e,r)=>(r=(void 0!==r?r:511)&1023|16384,el.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{el.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,el.mknod(e,r,t)),symlink:(e,r)=>{if(!ea.resolve(e))throw new el.ErrnoError(44);var t=el.lookupPath(r,{parent:!0}).node;if(!t)throw new el.ErrnoError(44);var n=eo.basename(r),o=el.mayCreate(t,n);if(o)throw new el.ErrnoError(o);if(!t.node_ops.symlink)throw new el.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o,a=eo.dirname(e),i=eo.dirname(r),s=eo.basename(e),u=eo.basename(r);if(t=el.lookupPath(e,{parent:!0}).node,n=el.lookupPath(r,{parent:!0}).node,!t||!n)throw new el.ErrnoError(44);if(t.mount!==n.mount)throw new el.ErrnoError(75);var l=el.lookupNode(t,s),c=ea.relative(e,i);if("."!==c.charAt(0))throw new el.ErrnoError(28);if("."!==(c=ea.relative(r,a)).charAt(0))throw new el.ErrnoError(55);try{o=el.lookupNode(n,u)}catch(e){}if(l!==o){var d=el.isDir(l.mode),f=el.mayDelete(t,s,d);if(f||(f=o?el.mayDelete(n,u,d):el.mayCreate(n,u)))throw new el.ErrnoError(f);if(!t.node_ops.rename)throw new el.ErrnoError(63);if(el.isMountpoint(l)||o&&el.isMountpoint(o))throw new el.ErrnoError(10);if(n!==t&&(f=el.nodePermissions(t,"w")))throw new el.ErrnoError(f);el.hashRemoveNode(l);try{t.node_ops.rename(l,n,u)}catch(e){throw e}finally{el.hashAddNode(l)}}},rmdir:e=>{var r=el.lookupPath(e,{parent:!0}).node,t=eo.basename(e),n=el.lookupNode(r,t),o=el.mayDelete(r,t,!0);if(o)throw new el.ErrnoError(o);if(!r.node_ops.rmdir)throw new el.ErrnoError(63);if(el.isMountpoint(n))throw new el.ErrnoError(10);r.node_ops.rmdir(r,t),el.destroyNode(n)},readdir:e=>{var r=el.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new el.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=el.lookupPath(e,{parent:!0}).node;if(!r)throw new el.ErrnoError(44);var t=eo.basename(e),n=el.lookupNode(r,t),o=el.mayDelete(r,t,!1);if(o)throw new el.ErrnoError(o);if(!r.node_ops.unlink)throw new el.ErrnoError(63);if(el.isMountpoint(n))throw new el.ErrnoError(10);r.node_ops.unlink(r,t),el.destroyNode(n)},readlink:e=>{var r=el.lookupPath(e).node;if(!r)throw new el.ErrnoError(44);if(!r.node_ops.readlink)throw new el.ErrnoError(28);return ea.resolve(el.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=el.lookupPath(e,{follow:!r}).node;if(!t)throw new el.ErrnoError(44);if(!t.node_ops.getattr)throw new el.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>el.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?el.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new el.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{el.chmod(e,r,!0)},fchmod:(e,r)=>{var t=el.getStream(e);if(!t)throw new el.ErrnoError(8);el.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?el.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new el.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{el.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=el.getStream(e);if(!n)throw new el.ErrnoError(8);el.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new el.ErrnoError(28);if("string"==typeof e){var t;t=el.lookupPath(e,{follow:!0}).node}else t=e;if(!t.node_ops.setattr)throw new el.ErrnoError(63);if(el.isDir(t.mode))throw new el.ErrnoError(31);if(!el.isFile(t.mode))throw new el.ErrnoError(28);var n=el.nodePermissions(t,"w");if(n)throw new el.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=el.getStream(e);if(!t)throw new el.ErrnoError(8);if((2097155&t.flags)==0)throw new el.ErrnoError(28);el.truncate(t.node,r)},utime:(e,r,t)=>{var n=el.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(r,t,n)=>{if(""===r)throw new el.ErrnoError(44);if(t="string"==typeof t?el.modeStringToFlags(t):t,n=void 0===n?438:n,n=64&t?4095&n|32768:0,"object"==typeof r)o=r;else{r=eo.normalize(r);try{var o;o=el.lookupPath(r,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t){if(o){if(128&t)throw new el.ErrnoError(20)}else o=el.mknod(r,n,0),a=!0}if(!o)throw new el.ErrnoError(44);if(el.isChrdev(o.mode)&&(t&=-513),65536&t&&!el.isDir(o.mode))throw new el.ErrnoError(54);if(!a){var i=el.mayOpen(o,t);if(i)throw new el.ErrnoError(i)}512&t&&!a&&el.truncate(o,0),t&=-131713;var s=el.createStream({node:o,path:el.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!e.logReadFiles||1&t||(el.readFiles||(el.readFiles={}),r in el.readFiles||(el.readFiles[r]=1)),s},close:e=>{if(el.isClosed(e))throw new el.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{el.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(el.isClosed(e))throw new el.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new el.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new el.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new el.ErrnoError(28);if(el.isClosed(e)||(2097155&e.flags)==1)throw new el.ErrnoError(8);if(el.isDir(e.node.mode))throw new el.ErrnoError(31);if(!e.stream_ops.read)throw new el.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new el.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new el.ErrnoError(28);if(el.isClosed(e)||(2097155&e.flags)==0)throw new el.ErrnoError(8);if(el.isDir(e.node.mode))throw new el.ErrnoError(31);if(!e.stream_ops.write)throw new el.ErrnoError(28);e.seekable&&1024&e.flags&&el.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new el.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(el.isClosed(e))throw new el.ErrnoError(8);if(r<0||t<=0)throw new el.ErrnoError(28);if((2097155&e.flags)==0)throw new el.ErrnoError(8);if(!el.isFile(e.node.mode)&&!el.isDir(e.node.mode))throw new el.ErrnoError(43);if(!e.stream_ops.allocate)throw new el.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if((2&n)!=0&&(2&o)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new el.ErrnoError(2);if(!e.stream_ops.mmap)throw new el.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new el.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw Error('Invalid encoding type "'+r.encoding+'"');var t,n=el.open(e,r.flags),o=el.stat(e).size,a=new Uint8Array(o);return el.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),el.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=el.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(T(r)+1),a=C(r,o,0,o.length);el.write(n,o,0,a,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))el.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw Error("Unsupported data type");el.close(n)},cwd:()=>el.currentPath,chdir:e=>{var r=el.lookupPath(e,{follow:!0});if(null===r.node)throw new el.ErrnoError(44);if(!el.isDir(r.node.mode))throw new el.ErrnoError(54);var t=el.nodePermissions(r.node,"x");if(t)throw new el.ErrnoError(t);el.currentPath=r.path},createDefaultDirectories:()=>{el.mkdir("/tmp"),el.mkdir("/home"),el.mkdir("/home/web_user")},createDefaultDevices:()=>{el.mkdir("/dev"),el.registerDevice(el.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),el.mkdev("/dev/null",el.makedev(1,3)),es.register(el.makedev(5,0),es.default_tty_ops),es.register(el.makedev(6,0),es.default_tty1_ops),el.mkdev("/dev/tty",el.makedev(5,0)),el.mkdev("/dev/tty1",el.makedev(6,0));var e=function(){if("object"!=typeof crypto||"function"!=typeof crypto.getRandomValues)return()=>V("randomDevice");var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}();el.createDevice("/dev","random",e),el.createDevice("/dev","urandom",e),el.mkdir("/dev/shm"),el.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{el.mkdir("/proc");var e=el.mkdir("/proc/self");el.mkdir("/proc/self/fd"),el.mount({mount:()=>{var r=el.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=el.getStream(+r);if(!t)throw new el.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return n.parent=n,n}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?el.createDevice("/dev","stdin",e.stdin):el.symlink("/dev/tty","/dev/stdin"),e.stdout?el.createDevice("/dev","stdout",null,e.stdout):el.symlink("/dev/tty","/dev/stdout"),e.stderr?el.createDevice("/dev","stderr",null,e.stderr):el.symlink("/dev/tty1","/dev/stderr"),el.open("/dev/stdin",0),el.open("/dev/stdout",1),el.open("/dev/stderr",1)},ensureErrnoError:()=>{el.ErrnoError||(el.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},el.ErrnoError.prototype=Error(),el.ErrnoError.prototype.constructor=el.ErrnoError,[44].forEach(e=>{el.genericErrors[e]=new el.ErrnoError(e),el.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{el.ensureErrnoError(),el.nameTable=Array(4096),el.mount(eu,{},"/"),el.createDefaultDirectories(),el.createDefaultDevices(),el.createSpecialDirectories(),el.filesystems={MEMFS:eu}},init:(r,t,n)=>{el.init.initialized=!0,el.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=t||e.stdout,e.stderr=n||e.stderr,el.createStandardStreams()},quit:()=>{el.init.initialized=!1,eM(0);for(var e=0;e<el.streams.length;e++){var r=el.streams[e];r&&el.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=el.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=el.lookupPath(e,{follow:!r});e=t.path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=el.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=eo.basename(e),t=el.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(e){n.error=e.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:el.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=eo.join2(e,a);try{el.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=eo.join2("string"==typeof e?e:el.getPath(e),r),i=el.getMode(n,o);return el.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:el.getPath(e),i=r?eo.join2(e,r):e);var s=el.getMode(n,o),u=el.create(i,s);if(t){if("string"==typeof t){for(var l=Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}el.chmod(u,146|s);var f=el.open(u,577);el.write(f,t,0,t.length,0,a),el.close(f),el.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=eo.join2("string"==typeof e?e:el.getPath(e),r),a=el.getMode(!!t,!!n);el.createDevice.major||(el.createDevice.major=64);var i=el.makedev(el.createDevice.major++,0);return el.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i,s=0,u=0;u<o;u++){try{i=t()}catch(e){throw new el.ErrnoError(29)}if(void 0===i&&0===s)throw new el.ErrnoError(6);if(null==i)break;s++,r[n+u]=i}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new el.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),el.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(a)try{e.contents=ei(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new el.ErrnoError(29)}else throw Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1)&&!(e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e,r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw Error("Couldn't load "+t+". Status: "+r.status);var n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ei(o.responseText||"",!0)},u=this;u.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw Error("doXHR failed!");return u.chunks[e]}),(a||!n)&&(i=n=1,i=n=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i;throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var i={isDevice:!1,url:t},s=el.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(var s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];u[e]=function(){return el.forceLoadFile(s),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(el.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{el.forceLoadFile(s);var a=void V();if(!a)throw new el.ErrnoError(48);return l(e,d,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,a,s,u,l,c)=>{var d,f,m=r?ea.resolve(eo.join2(e,r)):e,h="cp "+m;function p(t){function i(t){c&&c(),u||el.createDataFile(e,r,t,n,o,l),a&&a(),G(h)}Browser.handledByPreloadPlugin(t,m,i,()=>{s&&s(),G(h)})||i(t)}Y(h),"string"==typeof t?(d=e=>p(e),f="al "+t,i(t,e=>{var r;r='Loading data file "'+t+'" failed (no arrayBuffer).',e||V(r),d(new Uint8Array(e)),f&&G(f)},e=>{if(s)s();else throw'Loading data file "'+t+'" failed.'}),f&&Y(f)):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r=()=>{},t=()=>{})=>{var n=el.indexedDB();try{var o=n.open(el.DB_NAME(),el.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{D("creating db"),o.result.createObjectStore(el.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([el.DB_STORE_NAME],"readwrite"),a=n.objectStore(el.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(e=>{var r=a.put(el.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&l()},r.onerror=()=>{i+ ++s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r=()=>{},t=()=>{})=>{var n=el.indexedDB();try{var o=n.open(el.DB_NAME(),el.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([el.DB_STORE_NAME],"readonly")}catch(e){t(e);return}var i=a.objectStore(el.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=()=>{el.analyzePath(e).exists&&el.unlink(e),el.createDataFile(eo.dirname(e),eo.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=()=>{s+ ++u==l&&c()}}),a.onerror=t},o.onerror=t}},ec={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(eo.isAbs(r))return r;if(-100===e)n=el.cwd();else{var n;n=ec.getStreamFromFD(e).path}if(0==r.length){if(!t)throw new el.ErrnoError(44);return n}return eo.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&eo.normalize(r)!==eo.normalize(el.getPath(e.node)))return -54;throw e}h[t>>2]=n.dev,h[t+8>>2]=n.ino,h[t+12>>2]=n.mode,p[t+16>>2]=n.nlink,h[t+20>>2]=n.uid,h[t+24>>2]=n.gid,h[t+28>>2]=n.rdev,g=[n.size>>>0,+Math.abs(w=n.size)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+40>>2]=g[0],h[t+44>>2]=g[1],h[t+48>>2]=4096,h[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return g=[Math.floor(o/1e3)>>>0,+Math.abs(w=Math.floor(o/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+56>>2]=g[0],h[t+60>>2]=g[1],p[t+64>>2]=o%1e3*1e3,g=[Math.floor(a/1e3)>>>0,+Math.abs(w=Math.floor(a/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+72>>2]=g[0],h[t+76>>2]=g[1],p[t+80>>2]=a%1e3*1e3,g=[Math.floor(i/1e3)>>>0,+Math.abs(w=Math.floor(i/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+88>>2]=g[0],h[t+92>>2]=g[1],p[t+96>>2]=i%1e3*1e3,g=[n.ino>>>0,+Math.abs(w=n.ino)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+104>>2]=g[0],h[t+108>>2]=g[1],0},doMsync:function(e,r,t,n,o){if(!el.isFile(r.node.mode))throw new el.ErrnoError(43);if(2&n)return 0;var a=f.slice(e,e+t);el.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ec.varargs+=4,h[ec.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var r=el.getStream(e);if(!r)throw new el.ErrnoError(8);return r}};function ed(e){return e%4==0&&(e%100!=0||e%400==0)}var ef=[0,31,60,91,121,152,182,213,244,274,305,335],em=[0,31,59,90,120,151,181,212,243,273,304,334];function eh(e){var r=T(e)+1,t=ex(r);return t&&C(e,d,t,r),t}var ep={};function ev(){if(!ev.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:b||"./this.program"};for(var r in ep)void 0===ep[r]?delete e[r]:e[r]=ep[r];var t=[];for(var r in e)t.push(r+"="+e[r]);ev.strings=t}return ev.strings}function ew(r,t){c=r,M||U>0||(eC(),Z(O),el.quit(),es.shutdown(),L=!0),c=r,M||U>0||(e.onExit&&e.onExit(r),A=!0),k(r,new J(r))}var eg=[31,29,31,30,31,30,31,31,30,31,30,31],e_=[31,28,31,30,31,30,31,31,30,31,30,31];function ey(e,r,t,n){var o=h[n+40>>2],a={tm_sec:h[n>>2],tm_min:h[n+4>>2],tm_hour:h[n+8>>2],tm_mday:h[n+12>>2],tm_mon:h[n+16>>2],tm_year:h[n+20>>2],tm_wday:h[n+24>>2],tm_yday:h[n+28>>2],tm_isdst:h[n+32>>2],tm_gmtoff:h[n+36>>2],tm_zone:o?R(o):""},i=R(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function m(e,r){return f(e,r,"0")}function p(e,r){var t;function n(e){return e<0?-1:e>0?1:0}return 0===(t=n(e.getFullYear()-r.getFullYear()))&&0===(t=n(e.getMonth()-r.getMonth()))&&(t=n(e.getDate()-r.getDate())),t}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function w(e){var r=function(e,r){for(var t=new Date(e.getTime());r>0;){var n=ed(t.getFullYear()),o=t.getMonth(),a=(n?eg:e_)[o];if(r>a-t.getDate())r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else{t.setDate(t.getDate()+r);break}}return t}(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=v(t),a=v(n);return 0>=p(o,r)?0>=p(a,r)?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var g={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return m((e.tm_year+1900)/100|0,2)},"%d":function(e){return m(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return w(e).toString().substring(2)},"%G":function(e){return w(e)},"%H":function(e){return m(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),m(r,2)},"%j":function(e){return m(e.tm_mday+function(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}(ed(e.tm_year+1900)?eg:e_,e.tm_mon-1),3)},"%m":function(e){return m(e.tm_mon+1,2)},"%M":function(e){return m(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return m(e.tm_sec,2)},"%t":function(){return" "},"%u":function(e){return e.tm_wday||7},"%U":function(e){return m(Math.floor((e.tm_yday+7-e.tm_wday)/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&ed(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ed(e.tm_year%400-1))&&r++}return m(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){return m(Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff;return(r>=0?"+":"-")+String("0000"+(r=(r=Math.abs(r)/60)/60*100+r%60)).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\x00\x00"),g)i.includes(u)&&(i=i.replace(RegExp(u,"g"),g[u](a)));var _=ei(i=i.replace(/\0\0/g,"%"),!1);return _.length>r?0:(d.set(_,e),_.length-1)}function eE(e){if(e instanceof J||"unwind"==e)return c;k(1,e)}function eb(e){try{return e()}catch(e){V(e)}}var ek={instrumentWasmImports:function(e){var r=["invoke_*","emscripten_sleep","emscripten_wget","emscripten_wget_data","emscripten_idb_load","emscripten_idb_store","emscripten_idb_delete","emscripten_idb_exists","emscripten_idb_load_blob","emscripten_idb_store_blob","SDL_Delay","emscripten_scan_registers","emscripten_lazy_load_code","emscripten_fiber_swap","__load_secondary_module","fd_sync","__wasi_fd_sync","_emval_await","_dlopen_js","__asyncjs__*"];for(var t in e)!function(t){var n=e[t];n.sig,"function"==typeof n&&(r.indexOf(t)>=0||t.startsWith("__asyncjs__"))}(t)},instrumentWasmExports:function(e){var r={};for(var t in e)!function(t){var n=e[t];"function"==typeof n?r[t]=function(){ek.exportCallStack.push(t);try{return n.apply(null,arguments)}finally{A||(ek.exportCallStack.pop()===t||V(void 0),ek.maybeStopUnwind())}}:r[t]=n}(t);return r},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:8192,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(e){var r=ek.callStackNameToId[e];return void 0===r&&(r=ek.callStackId++,ek.callStackNameToId[e]=r,ek.callStackIdToName[r]=e),r},maybeStopUnwind:function(){ek.currData&&ek.state===ek.State.Unwinding&&0===ek.exportCallStack.length&&(ek.state=ek.State.Normal,U+=1,eb(e7),"undefined"!=typeof Fibers&&Fibers.trampoline())},whenDone:function(){return new Promise((e,r)=>{ek.asyncPromiseHandlers={resolve:e,reject:r}})},allocateData:function(){var e=ex(12+ek.StackSize);return ek.setDataHeader(e,e+12,ek.StackSize),ek.setDataRewindFunc(e),e},setDataHeader:function(e,r,t){h[e>>2]=r,h[e+4>>2]=r+t},setDataRewindFunc:function(e){var r=ek.exportCallStack[0],t=ek.getCallStackId(r);h[e+8>>2]=t},getDataRewindFunc:function(r){var t=h[r+8>>2],n=ek.callStackIdToName[t];return e.asm[n]},doRewind:function(e){var r=ek.getDataRewindFunc(e);return U-=1,r()},handleSleep:function(e){if(!A){if(ek.state===ek.State.Normal){var r=!1,t=!1;e((e=0)=>{if(!A&&(ek.handleSleepReturnValue=e,r=!0,t)){ek.state=ek.State.Rewinding,eb(()=>re(ek.currData)),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,o=!1;try{n=ek.doRewind(ek.currData)}catch(e){n=e,o=!0}var a=!1;if(!ek.currData){var i=ek.asyncPromiseHandlers;i&&(ek.asyncPromiseHandlers=null,(o?i.reject:i.resolve)(n),a=!0)}if(o&&!a)throw n}}),t=!0,r||(ek.state=ek.State.Unwinding,ek.currData=ek.allocateData(),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.pause(),eb(()=>e5(ek.currData)))}else ek.state===ek.State.Rewinding?(ek.state=ek.State.Normal,eb(rr),eR(ek.currData),ek.currData=null,ek.sleepCallbacks.forEach(e=>(function(e){if(!L&&!A)try{e(),function(){if(!(M||U>0))try{ew(c)}catch(e){eE(e)}}()}catch(e){eE(e)}})(e))):V("invalid state: "+ek.state);return ek.handleSleepReturnValue}},handleAsync:function(e){return ek.handleSleep(r=>{e().then(r)})}},eS=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=el.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(eS.prototype,{read:{get:function(){return(365&this.mode)==365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(146&this.mode)==146},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return el.isDir(this.mode)}},isDevice:{get:function(){return el.isChrdev(this.mode)}}}),el.FSNode=eS,el.staticInit();var eD={S:function(r,t){return ek.handleAsync(async()=>{e.emglken_stdin_buffers.length||await new Promise(r=>{e.emglken_stdin_ready=r});let n=e.emglken_stdin_buffers.shift(),o=Math.min(n.length,t);return o==n.length?f.set(n,r):(f.set(n.subarray(0,o),r),e.emglken_stdin_buffers.unshift(n.subarray(o))),o})},k:function(e){var r=new et(e);return!r.get_caught()&&(r.set_caught(!0),ee--),r.set_rethrown(!1),Q.push(r),function(e){e.add_ref()}(r),r.get_exception_ptr()},n:function(){eT(0),function(e){if(e.release_ref()&&!e.get_rethrown()){var r,t=e.get_destructor();t&&(r=e.excPtr,eL.apply(null,[t,r])),eF(e.excPtr)}}(Q.pop()),er=0},a:en,d:en,m:en,s:en,x:en,ca:en,K:function(){var e=Q.pop();e||V("no exception to throw");var r=e.excPtr;throw!e.get_rethrown()&&(Q.push(e),e.set_rethrown(!0),e.set_caught(!1),ee++),er=r,r},o:function(e,r,t){throw new et(e).init(r,t),er=e,ee++,e},ba:function(){return ee},g:function(e){throw er||(er=e),e},aa:function(e,r,t,n){try{if(r=ec.getStr(r),r=ec.calculateAt(e,r),-8&t)return -28;var o=el.lookupPath(r,{follow:!0}).node;if(!o)return -44;var a="";if(4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&el.nodePermissions(o,a))return -2;return 0}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return-e.errno}},J:function(e,r,t){ec.varargs=t;try{var n=ec.getStreamFromFD(e);switch(r){case 0:var o=ec.get();if(o<0)return -28;return el.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ec.get();return n.flags|=o,0;case 5:var o=ec.get();return m[o+0>>1]=2,0;case 16:case 8:default:return -28;case 9:return h[eA()>>2]=28,-1}}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return-e.errno}},$:function(e,r){try{if(0===r)return -28;var t=el.cwd(),n=T(t)+1;if(r<n)return -68;return C(t,f,e,r),n}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return-e.errno}},_:function(e,r,t){ec.varargs=t;try{var n=ec.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:if(!n.tty)return -59;return 0;case 21519:if(!n.tty)return -59;var o=ec.get();return h[o>>2]=0,0;case 21520:if(!n.tty)return -59;return -28;case 21531:var o=ec.get();return el.ioctl(n,r,o);default:return -28}}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return-e.errno}},Z:function(e,r,t,n){ec.varargs=n;try{r=ec.getStr(r),r=ec.calculateAt(e,r);var o=n?ec.get():0;return el.open(r,t,o).fd}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return-e.errno}},V:function(){return!0},U:function(e,r){var t=new Date(1e3*(p[e>>2]+4294967296*h[e+4>>2]));h[r>>2]=t.getSeconds(),h[r+4>>2]=t.getMinutes(),h[r+8>>2]=t.getHours(),h[r+12>>2]=t.getDate(),h[r+16>>2]=t.getMonth(),h[r+20>>2]=t.getFullYear()-1900,h[r+24>>2]=t.getDay();var n=0|(ed(t.getFullYear())?ef:em)[t.getMonth()]+t.getDate()-1;h[r+28>>2]=n,h[r+36>>2]=-(60*t.getTimezoneOffset());var o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&t.getTimezoneOffset()==Math.min(i,a));h[r+32>>2]=s},T:function(e,r,t){var n=new Date().getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset();function u(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}p[e>>2]=60*Math.max(i,s),h[r>>2]=Number(i!=s);var l=u(o),c=u(a),d=eh(l),f=eh(c);s<i?(p[t>>2]=d,p[t+4>>2]=f):(p[t>>2]=f,p[t+4>>2]=d)},D:function(){V("")},B:function(){return Date.now()},R:function(e,r,t){f.copyWithin(e,r,r+t)},Q:function(e){var r=f.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),function(e){var r=l.buffer;try{return l.grow(e-r.byteLength+65535>>>16),N(),1}catch(e){}}(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},Y:function(e,r){var t=0;return ev().forEach(function(n,o){var a=r+t;p[e+4*o>>2]=a,function(e,r,t){for(var n=0;n<e.length;++n)d[r++>>0]=e.charCodeAt(n);d[r>>0]=0}(n,a),t+=n.length+1}),0},X:function(e,r){var t=ev();p[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),p[r>>2]=n,0},C:ew,I:function(e){try{var r=ec.getStreamFromFD(e);return el.close(r),0}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return e.errno}},W:function(e,r,t,n){try{var o=ec.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=el.read(e,d,i,s,n);if(u<0)return -1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return e.errno}},P:function(e,r,t,n,o){try{var a=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(a))return 61;var i=ec.getStreamFromFD(e);return el.llseek(i,a,n),g=[i.position>>>0,(w=i.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[o>>2]=g[0],h[o+4>>2]=g[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return e.errno}},H:function(e,r,t,n){try{var o=ec.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=el.write(e,d,i,s,n);if(u<0)return -1;o+=u,void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===el||"ErrnoError"!==e.name)throw e;return e.errno}},G:function(e,r,t,n){var o=ez();try{return e4(e,r,t,n)}catch(e){if(eB(o),e!==e+0)throw e;eT(1,0)}},F:function(e,r,t,n){var o=ez();try{return e2(e,r,t,n)}catch(e){if(eB(o),e!==e+0)throw e;eT(1,0)}},q:function(e){var r=ez();try{return eK(e)}catch(e){if(eB(r),e!==e+0)throw e;eT(1,0)}},b:function(e,r){var t=ez();try{return eL(e,r)}catch(e){if(eB(t),e!==e+0)throw e;eT(1,0)}},c:function(e,r,t){var n=ez();try{return eY(e,r,t)}catch(e){if(eB(n),e!==e+0)throw e;eT(1,0)}},e:function(e,r,t,n){var o=ez();try{return eU(e,r,t,n)}catch(e){if(eB(o),e!==e+0)throw e;eT(1,0)}},p:function(e,r,t,n,o){var a=ez();try{return eX(e,r,t,n,o)}catch(e){if(eB(a),e!==e+0)throw e;eT(1,0)}},u:function(e,r,t,n,o,a){var i=ez();try{return eV(e,r,t,n,o,a)}catch(e){if(eB(i),e!==e+0)throw e;eT(1,0)}},w:function(e,r,t,n,o,a,i){var s=ez();try{return e$(e,r,t,n,o,a,i)}catch(e){if(eB(s),e!==e+0)throw e;eT(1,0)}},E:function(e,r,t,n,o,a,i,s){var u=ez();try{return e0(e,r,t,n,o,a,i,s)}catch(e){if(eB(u),e!==e+0)throw e;eT(1,0)}},A:function(e,r,t,n,o,a,i,s,u,l,c,d){var f=ez();try{return e3(e,r,t,n,o,a,i,s,u,l,c,d)}catch(e){if(eB(f),e!==e+0)throw e;eT(1,0)}},O:function(e,r){var t=ez();try{return eZ(e,r)}catch(e){if(eB(t),e!==e+0)throw e;eT(1,0)}},N:function(e,r,t,n,o){var a=ez();try{return e1(e,r,t,n,o)}catch(e){if(eB(a),e!==e+0)throw e;eT(1,0)}},h:function(e){var r=ez();try{eW(e)}catch(e){if(eB(r),e!==e+0)throw e;eT(1,0)}},i:function(e,r){var t=ez();try{eq(e,r)}catch(e){if(eB(t),e!==e+0)throw e;eT(1,0)}},f:function(e,r,t){var n=ez();try{eG(e,r,t)}catch(e){if(eB(n),e!==e+0)throw e;eT(1,0)}},j:function(e,r,t,n){var o=ez();try{eH(e,r,t,n)}catch(e){if(eB(o),e!==e+0)throw e;eT(1,0)}},r:function(e,r,t,n,o){var a=ez();try{eJ(e,r,t,n,o)}catch(e){if(eB(a),e!==e+0)throw e;eT(1,0)}},t:function(e,r,t,n,o,a){var i=ez();try{eQ(e,r,t,n,o,a)}catch(e){if(eB(i),e!==e+0)throw e;eT(1,0)}},v:function(e,r,t,n,o,a,i,s){var u=ez();try{e6(e,r,t,n,o,a,i,s)}catch(e){if(eB(u),e!==e+0)throw e;eT(1,0)}},y:function(e,r,t,n,o,a,i,s,u,l,c){var d=ez();try{e9(e,r,t,n,o,a,i,s,u,l,c)}catch(e){if(eB(d),e!==e+0)throw e;eT(1,0)}},z:function(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p){var v=ez();try{e8(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p)}catch(e){if(eB(v),e!==e+0)throw e;eT(1,0)}},l:function(e){return e},M:ey,L:function(e,r,t,n,o){return ey(e,r,t,n)}};!function(){var r,t,n,a={a:eD};function i(r,t){var n,o=r.exports;return o=ek.instrumentWasmExports(o),e.asm=o,l=e.asm.da,N(),e.asm.na,n=e.asm.ea,B.unshift(n),G("wasm-instantiate"),o}if(Y("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(a,i)}catch(e){F("Module.instantiateWasm callback failed with error: "+e),o(e)}(r=u,t=v,n=function(e){i(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||X(t)||"function"!=typeof fetch?$(t,a,n):fetch(t,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,a).then(n,function(e){return F("wasm streaming compile failed: "+e),F("falling back to ArrayBuffer instantiation"),$(t,a,n)})})).catch(o)}();var eF=function(){return(eF=e.asm.fa).apply(null,arguments)},eM=e._fflush=function(){return(eM=e._fflush=e.asm.ga).apply(null,arguments)},eA=function(){return(eA=e.asm.ha).apply(null,arguments)},eP=e._main=function(){return(eP=e._main=e.asm.ia).apply(null,arguments)},ex=function(){return(ex=e.asm.ja).apply(null,arguments)},eR=function(){return(eR=e.asm.ka).apply(null,arguments)},eC=(e._gidispatch_get_game_id=function(){return(e._gidispatch_get_game_id=e.asm.la).apply(null,arguments)},function(){return(eC=e.asm.ma).apply(null,arguments)}),eT=function(){return(eT=e.asm.oa).apply(null,arguments)},eN=function(){return(eN=e.asm.pa).apply(null,arguments)},ez=function(){return(ez=e.asm.qa).apply(null,arguments)},eB=function(){return(eB=e.asm.ra).apply(null,arguments)},ej=function(){return(ej=e.asm.sa).apply(null,arguments)},eO=function(){return(eO=e.asm.ta).apply(null,arguments)},eI=function(){return(eI=e.asm.ua).apply(null,arguments)},eL=e.dynCall_ii=function(){return(eL=e.dynCall_ii=e.asm.va).apply(null,arguments)},eU=e.dynCall_iiii=function(){return(eU=e.dynCall_iiii=e.asm.wa).apply(null,arguments)},eH=e.dynCall_viii=function(){return(eH=e.dynCall_viii=e.asm.xa).apply(null,arguments)},eW=e.dynCall_v=function(){return(eW=e.dynCall_v=e.asm.ya).apply(null,arguments)},eq=e.dynCall_vi=function(){return(eq=e.dynCall_vi=e.asm.za).apply(null,arguments)},eY=e.dynCall_iii=function(){return(eY=e.dynCall_iii=e.asm.Aa).apply(null,arguments)},eG=e.dynCall_vii=function(){return(eG=e.dynCall_vii=e.asm.Ba).apply(null,arguments)},eV=e.dynCall_iiiiii=function(){return(eV=e.dynCall_iiiiii=e.asm.Ca).apply(null,arguments)},eX=e.dynCall_iiiii=function(){return(eX=e.dynCall_iiiii=e.asm.Da).apply(null,arguments)},eK=e.dynCall_i=function(){return(eK=e.dynCall_i=e.asm.Ea).apply(null,arguments)},e$=e.dynCall_iiiiiii=function(){return(e$=e.dynCall_iiiiiii=e.asm.Fa).apply(null,arguments)},eJ=e.dynCall_viiii=function(){return(eJ=e.dynCall_viiii=e.asm.Ga).apply(null,arguments)},eZ=e.dynCall_ji=function(){return(eZ=e.dynCall_ji=e.asm.Ha).apply(null,arguments)},eQ=e.dynCall_viiiii=function(){return(eQ=e.dynCall_viiiii=e.asm.Ia).apply(null,arguments)},e0=e.dynCall_iiiiiiii=function(){return(e0=e.dynCall_iiiiiiii=e.asm.Ja).apply(null,arguments)},e1=e.dynCall_jiiii=function(){return(e1=e.dynCall_jiiii=e.asm.Ka).apply(null,arguments)},e2=e.dynCall_fiii=function(){return(e2=e.dynCall_fiii=e.asm.La).apply(null,arguments)},e4=e.dynCall_diii=function(){return(e4=e.dynCall_diii=e.asm.Ma).apply(null,arguments)},e6=e.dynCall_viiiiiii=function(){return(e6=e.dynCall_viiiiiii=e.asm.Na).apply(null,arguments)},e3=e.dynCall_iiiiiiiiiiii=function(){return(e3=e.dynCall_iiiiiiiiiiii=e.asm.Oa).apply(null,arguments)},e9=e.dynCall_viiiiiiiiii=function(){return(e9=e.dynCall_viiiiiiiiii=e.asm.Pa).apply(null,arguments)},e8=e.dynCall_viiiiiiiiiiiiiii=function(){return(e8=e.dynCall_viiiiiiiiiiiiiii=e.asm.Qa).apply(null,arguments)},e5=function(){return(e5=e.asm.Ra).apply(null,arguments)},e7=function(){return(e7=e.asm.Sa).apply(null,arguments)},re=function(){return(re=e.asm.Ta).apply(null,arguments)},rr=function(){return(rr=e.asm.Ua).apply(null,arguments)};function rt(r=E){!(H>0)&&(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;){var r;r=e.preRun.shift(),z.unshift(r)}Z(z)}(),H>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()));function n(){!_&&(_=!0,e.calledRun=!0,A||(e.noFSInit||el.init.initialized||el.init(),el.ignorePermissions=!1,es.init(),Z(B),Z(j),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),rn&&function(e=[]){var r=eP;e.unshift(b);var t=e.length,n=ej((t+1)*4),o=n>>2;e.forEach(e=>{var r,t;h[o++]=(t=ej(r=T(e)+1),C(e,d,t,r),t)}),h[o]=0;try{var a=r(t,n);ew(a,!0)}catch(e){return eE(e)}}(r),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r;r=e.postRun.shift(),I.unshift(r)}Z(I)}()))}}if(e.___start_em_js=52440,e.___stop_em_js=55125,e.AsciiToString=function(e){for(var r="";;){var t=f[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}},e.FS=el,q=function e(){_||rt(),_||(q=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();var rn=!0;return e.noInitialRun&&(rn=!1),rt(),e.ready}),rx={};rx=B("6kBsm").getBundleURL("ejVIo")+B("n9Yfb").resolve("9Qh6d");var rR=(o="file:///node_modules/emglken/build/git-core.js",function(e={}){var r,t,n,a,i,s,u,l,c,d,f,m,h,p,v,w,g,_,e=void 0!==e?e:{};e.ready=new Promise(function(e,r){t=e,n=r});var y=Object.assign({},e),E=[],b="./this.program",k=(e,r)=>{throw r},S="";"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),o&&(S=o),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(200==n.status||0==n.status&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)};var D=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);Object.assign(e,y),y=null,e.arguments&&(E=e.arguments),e.thisProgram&&(b=e.thisProgram),e.quit&&(k=e.quit),e.wasmBinary&&(u=e.wasmBinary);var M=e.noExitRuntime||!1;"object"!=typeof WebAssembly&&G("no native wasm support detected");var A=!1,P=new TextDecoder("utf8");function x(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;return P.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))}function R(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function C(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function T(){var r=l.buffer;e.HEAP8=d=new Int8Array(r),e.HEAP16=m=new Int16Array(r),e.HEAP32=h=new Int32Array(r),e.HEAPU8=f=new Uint8Array(r),e.HEAPU16=new Uint16Array(r),e.HEAPU32=p=new Uint32Array(r),e.HEAPF32=new Float32Array(r),e.HEAPF64=new Float64Array(r)}var N=[],z=[],B=[],j=[],O=[],I=!1,L=0,U=0,H=null,W=null;function q(r){U++,e.monitorRunDependencies&&e.monitorRunDependencies(U)}function Y(r){if(U--,e.monitorRunDependencies&&e.monitorRunDependencies(U),0==U&&(null!==H&&(clearInterval(H),H=null),W)){var t=W;W=null,t()}}function G(r){e.onAbort&&e.onAbort(r),F(r="Aborted("+r+")"),A=!0,c=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function V(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e){try{if(e==v&&u)return new Uint8Array(u);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){G(e)}}function K(e,r,t){return(u||"function"!=typeof fetch?Promise.resolve().then(function(){return X(e)}):fetch(e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()}).catch(function(){return X(e)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(t,function(e){F("failed to asynchronously prepare wasm: "+e),G(e)})}function $(e,r,t,n,o){let a=e>>2,i=p.subarray(a,a+t),s=o?i:i.reduce((e,r)=>e+String.fromCodePoint(r),""),u=n(s),l=Uint32Array.from(u,e=>e.codePointAt(0)),c=l.length;return p.set(l.subarray(0,Math.min(r,c)),a),c}function J(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Z(r){for(;r.length>0;)r.shift()(e)}e.locateFile?V(v="git-core.wasm")||(r=v,v=e.locateFile?e.locateFile(r,S):S+r):v=new URL(rx).href;var Q={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Q.isAbs(e),t="/"===e.substr(-1);return(e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Q.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Q.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Q.normalize(e.join("/"))},join2:(e,r)=>Q.normalize(e+"/"+r)},ee={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:eo.cwd();if("string"!=typeof n)throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Q.isAbs(n)}return e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ee.resolve(e).substr(1),r=ee.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}for(var u=[],s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function er(e,r,t){var n=Array(t>0?t:C(e)+1),o=R(e,n,0,n.length);return r&&(n.length=o),n}var et={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){et.ttys[e]={input:[],output:[],ops:r},eo.registerDevice(e,et.stream_ops)},stream_ops:{open:function(e){var r=et.ttys[e.node.rdev];if(!r)throw new eo.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new eo.ErrnoError(60);for(var a,i=0,s=0;s<n;s++){try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new eo.ErrnoError(29)}if(void 0===a&&0===i)throw new eo.ErrnoError(6);if(null==a)break;i++,r[t+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new eo.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new eo.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=er(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(D(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(D(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(F(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(F(x(e.output,0)),e.output=[])}}},en={ops_table:null,mount:function(e){return en.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(eo.isBlkdev(t)||eo.isFIFO(t))throw new eo.ErrnoError(63);en.ops_table||(en.ops_table={dir:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,lookup:en.node_ops.lookup,mknod:en.node_ops.mknod,rename:en.node_ops.rename,unlink:en.node_ops.unlink,rmdir:en.node_ops.rmdir,readdir:en.node_ops.readdir,symlink:en.node_ops.symlink},stream:{llseek:en.stream_ops.llseek}},file:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:{llseek:en.stream_ops.llseek,read:en.stream_ops.read,write:en.stream_ops.write,allocate:en.stream_ops.allocate,mmap:en.stream_ops.mmap,msync:en.stream_ops.msync}},link:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,readlink:en.node_ops.readlink},stream:{}},chrdev:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:eo.chrdev_stream_ops}});var o=eo.createNode(e,r,t,n);return eo.isDir(o.mode)?(o.node_ops=en.ops_table.dir.node,o.stream_ops=en.ops_table.dir.stream,o.contents={}):eo.isFile(o.mode)?(o.node_ops=en.ops_table.file.node,o.stream_ops=en.ops_table.file.stream,o.usedBytes=0,o.contents=null):eo.isLink(o.mode)?(o.node_ops=en.ops_table.link.node,o.stream_ops=en.ops_table.link.stream):eo.isChrdev(o.mode)&&(o.node_ops=en.ops_table.chrdev.node,o.stream_ops=en.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}}},node_ops:{getattr:function(e){var r={};return r.dev=eo.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,eo.isDir(e.mode)?r.size=4096:eo.isFile(e.mode)?r.size=e.usedBytes:eo.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&en.resizeFileStorage(e,r.size)},lookup:function(e,r){throw eo.genericErrors[44]},mknod:function(e,r,t,n){return en.createNode(e,r,t,n)},rename:function(e,r,t){if(eo.isDir(e.mode)){var n;try{n=eo.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new eo.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=eo.lookupNode(e,r);for(var n in t.contents)throw new eo.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=en.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!eo.isLink(e.mode))throw new eo.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===d.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(en.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&eo.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new eo.ErrnoError(28);return n},allocate:function(e,r,t){en.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!eo.isFile(e.node.mode))throw new eo.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==d.buffer)throw(t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,a=void G(),new eo.ErrnoError(48);return i=!1,{ptr:a=s.byteOffset,allocated:i}},msync:function(e,r,t,n,o){return en.stream_ops.write(e,r,0,n,t,!1),0}}},eo={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=ee.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new eo.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=eo.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=eo.lookupNode(n,t[a]),o=Q.join2(o,t[a]),eo.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;eo.isLink(n.mode);){var u=eo.readlink(o);if(o=ee.resolve(Q.dirname(o),u),n=eo.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new eo.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(eo.isRoot(e)){var t=e.mount.mountpoint;if(!r)return t;return"/"!==t[t.length-1]?t+"/"+r:t+r}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%eo.nameTable.length},hashAddNode:e=>{var r=eo.hashName(e.parent.id,e.name);e.name_next=eo.nameTable[r],eo.nameTable[r]=e},hashRemoveNode:e=>{var r=eo.hashName(e.parent.id,e.name);if(eo.nameTable[r]===e)eo.nameTable[r]=e.name_next;else for(var t=eo.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=eo.mayLookup(e);if(t)throw new eo.ErrnoError(t,e);for(var n=eo.hashName(e.id,r),o=eo.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return eo.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new eo.FSNode(e,r,t,n);return eo.hashAddNode(o),o},destroyNode:e=>{eo.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=eo.flagModes[e];if(void 0===r)throw Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>eo.ignorePermissions?0:r.includes("r")&&!(292&e.mode)||r.includes("w")&&!(146&e.mode)||r.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eo.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return eo.lookupNode(e,r),20}catch(e){}return eo.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{try{n=eo.lookupNode(e,r)}catch(e){return e.errno}var n,o=eo.nodePermissions(e,"wx");if(o)return o;if(t){if(!eo.isDir(n.mode))return 54;if(eo.isRoot(n)||eo.getPath(n)===eo.cwd())return 10}else if(eo.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?eo.isLink(e.mode)?32:eo.isDir(e.mode)&&("r"!==eo.flagsToPermissionString(r)||512&r)?31:eo.nodePermissions(e,eo.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=eo.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!eo.streams[t])return t;throw new eo.ErrnoError(33)},getStream:e=>eo.streams[e],createStream:(e,r,t)=>{eo.FSStream||(eo.FSStream=function(){this.shared={}},eo.FSStream.prototype={},Object.defineProperties(eo.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return(2097155&this.flags)!=1}},isWrite:{get:function(){return(2097155&this.flags)!=0}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new eo.FSStream,e);var n=eo.nextfd(r,t);return e.fd=n,eo.streams[n]=e,e},closeStream:e=>{eo.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=eo.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new eo.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{eo.devices[e]={stream_ops:r}},getDevice:e=>eo.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),eo.syncFSRequests++,eo.syncFSRequests>1&&F("warning: "+eo.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=eo.getMounts(eo.root.mount),n=0;function o(e){return eo.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&eo.root)throw new eo.ErrnoError(10);if(!o&&!a){var i=eo.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,eo.isMountpoint(n))throw new eo.ErrnoError(10);if(!eo.isDir(n.mode))throw new eo.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?eo.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=eo.lookupPath(e,{follow_mount:!1});if(!eo.isMountpoint(r.node))throw new eo.ErrnoError(28);var t=r.node,n=t.mounted,o=eo.getMounts(n);Object.keys(eo.nameTable).forEach(e=>{for(var r=eo.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&eo.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=eo.lookupPath(e,{parent:!0}).node,o=Q.basename(e);if(!o||"."===o||".."===o)throw new eo.ErrnoError(28);var a=eo.mayCreate(n,o);if(a)throw new eo.ErrnoError(a);if(!n.node_ops.mknod)throw new eo.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=(void 0!==r?r:438)&4095|32768,eo.mknod(e,r,0)),mkdir:(e,r)=>(r=(void 0!==r?r:511)&1023|16384,eo.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{eo.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,eo.mknod(e,r,t)),symlink:(e,r)=>{if(!ee.resolve(e))throw new eo.ErrnoError(44);var t=eo.lookupPath(r,{parent:!0}).node;if(!t)throw new eo.ErrnoError(44);var n=Q.basename(r),o=eo.mayCreate(t,n);if(o)throw new eo.ErrnoError(o);if(!t.node_ops.symlink)throw new eo.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o,a=Q.dirname(e),i=Q.dirname(r),s=Q.basename(e),u=Q.basename(r);if(t=eo.lookupPath(e,{parent:!0}).node,n=eo.lookupPath(r,{parent:!0}).node,!t||!n)throw new eo.ErrnoError(44);if(t.mount!==n.mount)throw new eo.ErrnoError(75);var l=eo.lookupNode(t,s),c=ee.relative(e,i);if("."!==c.charAt(0))throw new eo.ErrnoError(28);if("."!==(c=ee.relative(r,a)).charAt(0))throw new eo.ErrnoError(55);try{o=eo.lookupNode(n,u)}catch(e){}if(l!==o){var d=eo.isDir(l.mode),f=eo.mayDelete(t,s,d);if(f||(f=o?eo.mayDelete(n,u,d):eo.mayCreate(n,u)))throw new eo.ErrnoError(f);if(!t.node_ops.rename)throw new eo.ErrnoError(63);if(eo.isMountpoint(l)||o&&eo.isMountpoint(o))throw new eo.ErrnoError(10);if(n!==t&&(f=eo.nodePermissions(t,"w")))throw new eo.ErrnoError(f);eo.hashRemoveNode(l);try{t.node_ops.rename(l,n,u)}catch(e){throw e}finally{eo.hashAddNode(l)}}},rmdir:e=>{var r=eo.lookupPath(e,{parent:!0}).node,t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!0);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.rmdir)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.rmdir(r,t),eo.destroyNode(n)},readdir:e=>{var r=eo.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new eo.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=eo.lookupPath(e,{parent:!0}).node;if(!r)throw new eo.ErrnoError(44);var t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!1);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.unlink)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.unlink(r,t),eo.destroyNode(n)},readlink:e=>{var r=eo.lookupPath(e).node;if(!r)throw new eo.ErrnoError(44);if(!r.node_ops.readlink)throw new eo.ErrnoError(28);return ee.resolve(eo.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=eo.lookupPath(e,{follow:!r}).node;if(!t)throw new eo.ErrnoError(44);if(!t.node_ops.getattr)throw new eo.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>eo.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?eo.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{eo.chmod(e,r,!0)},fchmod:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);eo.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?eo.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{eo.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=eo.getStream(e);if(!n)throw new eo.ErrnoError(8);eo.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new eo.ErrnoError(28);if("string"==typeof e){var t;t=eo.lookupPath(e,{follow:!0}).node}else t=e;if(!t.node_ops.setattr)throw new eo.ErrnoError(63);if(eo.isDir(t.mode))throw new eo.ErrnoError(31);if(!eo.isFile(t.mode))throw new eo.ErrnoError(28);var n=eo.nodePermissions(t,"w");if(n)throw new eo.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);if((2097155&t.flags)==0)throw new eo.ErrnoError(28);eo.truncate(t.node,r)},utime:(e,r,t)=>{var n=eo.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(r,t,n)=>{if(""===r)throw new eo.ErrnoError(44);if(t="string"==typeof t?eo.modeStringToFlags(t):t,n=void 0===n?438:n,n=64&t?4095&n|32768:0,"object"==typeof r)o=r;else{r=Q.normalize(r);try{var o;o=eo.lookupPath(r,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t){if(o){if(128&t)throw new eo.ErrnoError(20)}else o=eo.mknod(r,n,0),a=!0}if(!o)throw new eo.ErrnoError(44);if(eo.isChrdev(o.mode)&&(t&=-513),65536&t&&!eo.isDir(o.mode))throw new eo.ErrnoError(54);if(!a){var i=eo.mayOpen(o,t);if(i)throw new eo.ErrnoError(i)}512&t&&!a&&eo.truncate(o,0),t&=-131713;var s=eo.createStream({node:o,path:eo.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!e.logReadFiles||1&t||(eo.readFiles||(eo.readFiles={}),r in eo.readFiles||(eo.readFiles[r]=1)),s},close:e=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eo.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eo.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new eo.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==1)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.read)throw new eo.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==0)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.write)throw new eo.ErrnoError(28);e.seekable&&1024&e.flags&&eo.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(r<0||t<=0)throw new eo.ErrnoError(28);if((2097155&e.flags)==0)throw new eo.ErrnoError(8);if(!eo.isFile(e.node.mode)&&!eo.isDir(e.node.mode))throw new eo.ErrnoError(43);if(!e.stream_ops.allocate)throw new eo.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if((2&n)!=0&&(2&o)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eo.ErrnoError(2);if(!e.stream_ops.mmap)throw new eo.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new eo.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw Error('Invalid encoding type "'+r.encoding+'"');var t,n=eo.open(e,r.flags),o=eo.stat(e).size,a=new Uint8Array(o);return eo.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),eo.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=eo.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(C(r)+1),a=R(r,o,0,o.length);eo.write(n,o,0,a,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))eo.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw Error("Unsupported data type");eo.close(n)},cwd:()=>eo.currentPath,chdir:e=>{var r=eo.lookupPath(e,{follow:!0});if(null===r.node)throw new eo.ErrnoError(44);if(!eo.isDir(r.node.mode))throw new eo.ErrnoError(54);var t=eo.nodePermissions(r.node,"x");if(t)throw new eo.ErrnoError(t);eo.currentPath=r.path},createDefaultDirectories:()=>{eo.mkdir("/tmp"),eo.mkdir("/home"),eo.mkdir("/home/web_user")},createDefaultDevices:()=>{eo.mkdir("/dev"),eo.registerDevice(eo.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),eo.mkdev("/dev/null",eo.makedev(1,3)),et.register(eo.makedev(5,0),et.default_tty_ops),et.register(eo.makedev(6,0),et.default_tty1_ops),eo.mkdev("/dev/tty",eo.makedev(5,0)),eo.mkdev("/dev/tty1",eo.makedev(6,0));var e=function(){if("object"!=typeof crypto||"function"!=typeof crypto.getRandomValues)return()=>G("randomDevice");var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}();eo.createDevice("/dev","random",e),eo.createDevice("/dev","urandom",e),eo.mkdir("/dev/shm"),eo.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{eo.mkdir("/proc");var e=eo.mkdir("/proc/self");eo.mkdir("/proc/self/fd"),eo.mount({mount:()=>{var r=eo.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=eo.getStream(+r);if(!t)throw new eo.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return n.parent=n,n}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?eo.createDevice("/dev","stdin",e.stdin):eo.symlink("/dev/tty","/dev/stdin"),e.stdout?eo.createDevice("/dev","stdout",null,e.stdout):eo.symlink("/dev/tty","/dev/stdout"),e.stderr?eo.createDevice("/dev","stderr",null,e.stderr):eo.symlink("/dev/tty1","/dev/stderr"),eo.open("/dev/stdin",0),eo.open("/dev/stdout",1),eo.open("/dev/stderr",1)},ensureErrnoError:()=>{eo.ErrnoError||(eo.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},eo.ErrnoError.prototype=Error(),eo.ErrnoError.prototype.constructor=eo.ErrnoError,[44].forEach(e=>{eo.genericErrors[e]=new eo.ErrnoError(e),eo.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{eo.ensureErrnoError(),eo.nameTable=Array(4096),eo.mount(en,{},"/"),eo.createDefaultDirectories(),eo.createDefaultDevices(),eo.createSpecialDirectories(),eo.filesystems={MEMFS:en}},init:(r,t,n)=>{eo.init.initialized=!0,eo.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=t||e.stdout,e.stderr=n||e.stderr,eo.createStandardStreams()},quit:()=>{eo.init.initialized=!1,ey(0);for(var e=0;e<eo.streams.length;e++){var r=eo.streams[e];r&&eo.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=eo.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=eo.lookupPath(e,{follow:!r});e=t.path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=eo.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Q.basename(e),t=eo.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(e){n.error=e.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:eo.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Q.join2(e,a);try{eo.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=Q.join2("string"==typeof e?e:eo.getPath(e),r),i=eo.getMode(n,o);return eo.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:eo.getPath(e),i=r?Q.join2(e,r):e);var s=eo.getMode(n,o),u=eo.create(i,s);if(t){if("string"==typeof t){for(var l=Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}eo.chmod(u,146|s);var f=eo.open(u,577);eo.write(f,t,0,t.length,0,a),eo.close(f),eo.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=Q.join2("string"==typeof e?e:eo.getPath(e),r),a=eo.getMode(!!t,!!n);eo.createDevice.major||(eo.createDevice.major=64);var i=eo.makedev(eo.createDevice.major++,0);return eo.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i,s=0,u=0;u<o;u++){try{i=t()}catch(e){throw new eo.ErrnoError(29)}if(void 0===i&&0===s)throw new eo.ErrnoError(6);if(null==i)break;s++,r[n+u]=i}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new eo.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),eo.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(a)try{e.contents=er(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new eo.ErrnoError(29)}else throw Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1)&&!(e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e,r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw Error("Couldn't load "+t+". Status: "+r.status);var n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):er(o.responseText||"",!0)},u=this;u.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw Error("doXHR failed!");return u.chunks[e]}),(a||!n)&&(i=n=1,i=n=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i;throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var i={isDevice:!1,url:t},s=eo.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(var s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];u[e]=function(){return eo.forceLoadFile(s),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(eo.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{eo.forceLoadFile(s);var a=void G();if(!a)throw new eo.ErrnoError(48);return l(e,d,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,a,s,u,l,c)=>{var d,f,m=r?ee.resolve(Q.join2(e,r)):e,h="cp "+m;function p(t){function i(t){c&&c(),u||eo.createDataFile(e,r,t,n,o,l),a&&a(),Y(h)}Browser.handledByPreloadPlugin(t,m,i,()=>{s&&s(),Y(h)})||i(t)}q(h),"string"==typeof t?(d=e=>p(e),f="al "+t,i(t,e=>{var r;r='Loading data file "'+t+'" failed (no arrayBuffer).',e||G(r),d(new Uint8Array(e)),f&&Y(f)},e=>{if(s)s();else throw'Loading data file "'+t+'" failed.'}),f&&q(f)):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{D("creating db"),o.result.createObjectStore(eo.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([eo.DB_STORE_NAME],"readwrite"),a=n.objectStore(eo.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(e=>{var r=a.put(eo.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&l()},r.onerror=()=>{i+ ++s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([eo.DB_STORE_NAME],"readonly")}catch(e){t(e);return}var i=a.objectStore(eo.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=()=>{eo.analyzePath(e).exists&&eo.unlink(e),eo.createDataFile(Q.dirname(e),Q.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=()=>{s+ ++u==l&&c()}}),a.onerror=t},o.onerror=t}},ea={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(Q.isAbs(r))return r;if(-100===e)n=eo.cwd();else{var n;n=ea.getStreamFromFD(e).path}if(0==r.length){if(!t)throw new eo.ErrnoError(44);return n}return Q.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Q.normalize(r)!==Q.normalize(eo.getPath(e.node)))return -54;throw e}h[t>>2]=n.dev,h[t+8>>2]=n.ino,h[t+12>>2]=n.mode,p[t+16>>2]=n.nlink,h[t+20>>2]=n.uid,h[t+24>>2]=n.gid,h[t+28>>2]=n.rdev,g=[n.size>>>0,+Math.abs(w=n.size)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+40>>2]=g[0],h[t+44>>2]=g[1],h[t+48>>2]=4096,h[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return g=[Math.floor(o/1e3)>>>0,+Math.abs(w=Math.floor(o/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+56>>2]=g[0],h[t+60>>2]=g[1],p[t+64>>2]=o%1e3*1e3,g=[Math.floor(a/1e3)>>>0,+Math.abs(w=Math.floor(a/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+72>>2]=g[0],h[t+76>>2]=g[1],p[t+80>>2]=a%1e3*1e3,g=[Math.floor(i/1e3)>>>0,+Math.abs(w=Math.floor(i/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+88>>2]=g[0],h[t+92>>2]=g[1],p[t+96>>2]=i%1e3*1e3,g=[n.ino>>>0,+Math.abs(w=n.ino)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+104>>2]=g[0],h[t+108>>2]=g[1],0},doMsync:function(e,r,t,n,o){if(!eo.isFile(r.node.mode))throw new eo.ErrnoError(43);if(2&n)return 0;var a=f.slice(e,e+t);eo.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ea.varargs+=4,h[ea.varargs-4>>2]},getStr:function(e){return function(e,r){if(!e)return"";for(var t=e+void 0,n=e;!(n>=t)&&f[n];)++n;return P.decode(f.subarray(e,n))}(e)},getStreamFromFD:function(e){var r=eo.getStream(e);if(!r)throw new eo.ErrnoError(8);return r}};function ei(e){return p[e>>2]+4294967296*h[e+4>>2]}var es=[0,31,60,91,121,152,182,213,244,274,305,335],eu=[0,31,59,90,120,151,181,212,243,273,304,334];function el(e){var r;return((r=e.getFullYear())%4==0&&(r%100!=0||r%400==0)?es:eu)[e.getMonth()]+e.getDate()-1}function ec(e){var r=C(e)+1,t=ew(r);return t&&R(e,d,t,r),t}function ed(r,t){c=r,M||L>0||(eb(),Z(j),eo.quit(),et.shutdown(),I=!0),c=r,M||L>0||(e.onExit&&e.onExit(r),A=!0),k(r,new J(r))}function ef(e){if(e instanceof J||"unwind"==e)return c;k(1,e)}function em(e){try{return e()}catch(e){G(e)}}var eh={instrumentWasmImports:function(e){var r=["emscripten_sleep","emscripten_wget","emscripten_wget_data","emscripten_idb_load","emscripten_idb_store","emscripten_idb_delete","emscripten_idb_exists","emscripten_idb_load_blob","emscripten_idb_store_blob","SDL_Delay","emscripten_scan_registers","emscripten_lazy_load_code","emscripten_fiber_swap","__load_secondary_module","fd_sync","__wasi_fd_sync","_emval_await","_dlopen_js","__asyncjs__*"];for(var t in e)!function(t){var n=e[t];n.sig,"function"==typeof n&&(r.indexOf(t)>=0||t.startsWith("__asyncjs__"))}(t)},instrumentWasmExports:function(e){var r={};for(var t in e)!function(t){var n=e[t];"function"==typeof n?r[t]=function(){eh.exportCallStack.push(t);try{return n.apply(null,arguments)}finally{A||(eh.exportCallStack.pop()===t||G(void 0),eh.maybeStopUnwind())}}:r[t]=n}(t);return r},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:8192,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(e){var r=eh.callStackNameToId[e];return void 0===r&&(r=eh.callStackId++,eh.callStackNameToId[e]=r,eh.callStackIdToName[r]=e),r},maybeStopUnwind:function(){eh.currData&&eh.state===eh.State.Unwinding&&0===eh.exportCallStack.length&&(eh.state=eh.State.Normal,L+=1,em(ex),"undefined"!=typeof Fibers&&Fibers.trampoline())},whenDone:function(){return new Promise((e,r)=>{eh.asyncPromiseHandlers={resolve:e,reject:r}})},allocateData:function(){var e=ew(12+eh.StackSize);return eh.setDataHeader(e,e+12,eh.StackSize),eh.setDataRewindFunc(e),e},setDataHeader:function(e,r,t){h[e>>2]=r,h[e+4>>2]=r+t},setDataRewindFunc:function(e){var r=eh.exportCallStack[0],t=eh.getCallStackId(r);h[e+8>>2]=t},getDataRewindFunc:function(r){var t=h[r+8>>2],n=eh.callStackIdToName[t];return e.asm[n]},doRewind:function(e){var r=eh.getDataRewindFunc(e);return L-=1,r()},handleSleep:function(e){if(!A){if(eh.state===eh.State.Normal){var r=!1,t=!1;e((e=0)=>{if(!A&&(eh.handleSleepReturnValue=e,r=!0,t)){eh.state=eh.State.Rewinding,em(()=>eR(eh.currData)),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,o=!1;try{n=eh.doRewind(eh.currData)}catch(e){n=e,o=!0}var a=!1;if(!eh.currData){var i=eh.asyncPromiseHandlers;i&&(eh.asyncPromiseHandlers=null,(o?i.reject:i.resolve)(n),a=!0)}if(o&&!a)throw n}}),t=!0,r||(eh.state=eh.State.Unwinding,eh.currData=eh.allocateData(),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.pause(),em(()=>eP(eh.currData)))}else eh.state===eh.State.Rewinding?(eh.state=eh.State.Normal,em(eC),eg(eh.currData),eh.currData=null,eh.sleepCallbacks.forEach(e=>(function(e){if(!I&&!A)try{e(),function(){if(!(M||L>0))try{ed(c)}catch(e){ef(e)}}()}catch(e){ef(e)}})(e))):G("invalid state: "+eh.state);return eh.handleSleepReturnValue}},handleAsync:function(e){return eh.handleSleep(r=>{e().then(r)})}},ep=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=eo.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(ep.prototype,{read:{get:function(){return(365&this.mode)==365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(146&this.mode)==146},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return eo.isDir(this.mode)}},isDevice:{get:function(){return eo.isChrdev(this.mode)}}}),eo.FSNode=ep,eo.staticInit();var ev={q:function(r,t){return eh.handleAsync(async()=>{e.emglken_stdin_buffers.length||await new Promise(r=>{e.emglken_stdin_ready=r});let n=e.emglken_stdin_buffers.shift(),o=Math.min(n.length,t);return o==n.length?f.set(n,r):(f.set(n.subarray(0,o),r),e.emglken_stdin_buffers.unshift(n.subarray(o))),o})},D:function(e,r,t,n){try{if(r=ea.getStr(r),r=ea.calculateAt(e,r),-8&t)return -28;var o=eo.lookupPath(r,{follow:!0}).node;if(!o)return -44;var a="";if(4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&eo.nodePermissions(o,a))return -2;return 0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},l:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 0:var o=ea.get();if(o<0)return -28;return eo.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ea.get();return n.flags|=o,0;case 5:var o=ea.get();return m[o+0>>1]=2,0;case 16:case 8:default:return -28;case 9:return h[eE()>>2]=28,-1}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},C:function(e,r){try{if(0===r)return -28;var t=eo.cwd(),n=C(t)+1;if(r<n)return -68;return R(t,f,e,r),n}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},B:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:if(!n.tty)return -59;return 0;case 21519:if(!n.tty)return -59;var o=ea.get();return h[o>>2]=0,0;case 21520:if(!n.tty)return -59;return -28;case 21531:var o=ea.get();return eo.ioctl(n,r,o);default:return -28}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},k:function(e,r,t,n){ea.varargs=n;try{r=ea.getStr(r),r=ea.calculateAt(e,r);var o=n?ea.get():0;return eo.open(r,t,o).fd}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},A:function(e,r){try{return e=ea.getStr(e),ea.doStat(eo.stat,e,r)}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},z:function(e,r,t){try{return r=ea.getStr(r),r=ea.calculateAt(e,r),0===t?eo.unlink(r):512===t?eo.rmdir(r):G("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},x:function(){return!0},w:function(){throw 1/0},v:function(e,r){var t=new Date(1e3*ei(e));h[r>>2]=t.getUTCSeconds(),h[r+4>>2]=t.getUTCMinutes(),h[r+8>>2]=t.getUTCHours(),h[r+12>>2]=t.getUTCDate(),h[r+16>>2]=t.getUTCMonth(),h[r+20>>2]=t.getUTCFullYear()-1900,h[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;h[r+28>>2]=o},u:function(e,r){var t=new Date(1e3*ei(e));h[r>>2]=t.getSeconds(),h[r+4>>2]=t.getMinutes(),h[r+8>>2]=t.getHours(),h[r+12>>2]=t.getDate(),h[r+16>>2]=t.getMonth(),h[r+20>>2]=t.getFullYear()-1900,h[r+24>>2]=t.getDay();var n=0|el(t);h[r+28>>2]=n,h[r+36>>2]=-(60*t.getTimezoneOffset());var o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&t.getTimezoneOffset()==Math.min(i,a));h[r+32>>2]=s},t:function(e){var r=new Date(h[e+20>>2]+1900,h[e+16>>2],h[e+12>>2],h[e+8>>2],h[e+4>>2],h[e>>2],0),t=h[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(t<0)h[e+32>>2]=Number(a!=i&&s==n);else if(t>0!=(s==n)){var u=t>0?s:Math.max(i,a);r.setTime(r.getTime()+(u-n)*6e4)}h[e+24>>2]=r.getDay();var l=0|el(r);return h[e+28>>2]=l,h[e>>2]=r.getSeconds(),h[e+4>>2]=r.getMinutes(),h[e+8>>2]=r.getHours(),h[e+12>>2]=r.getDate(),h[e+16>>2]=r.getMonth(),h[e+20>>2]=r.getYear(),r.getTime()/1e3|0},s:function(e){var r=Date.UTC(h[e+20>>2]+1900,h[e+16>>2],h[e+12>>2],h[e+8>>2],h[e+4>>2],h[e>>2],0),t=new Date(r);h[e+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;return h[e+28>>2]=o,t.getTime()/1e3|0},r:function(e,r,t){var n=new Date().getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset();function u(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}p[e>>2]=60*Math.max(i,s),h[r>>2]=Number(i!=s);var l=u(o),c=u(a),d=ec(l),f=ec(c);s<i?(p[t>>2]=d,p[t+4>>2]=f):(p[t>>2]=f,p[t+4>>2]=d)},i:function(){return Date.now()},p:function(e,r,t){f.copyWithin(e,r,r+t)},o:function(e){var r=f.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),function(e){var r=l.buffer;try{return l.grow(e-r.byteLength+65535>>>16),T(),1}catch(e){}}(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},a:ed,c:function(e){try{var r=ea.getStreamFromFD(e);return eo.close(r),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},y:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.read(e,d,i,s,n);if(u<0)return -1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},m:function(e,r,t,n,o){try{var a=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(a))return 61;var i=ea.getStreamFromFD(e);return eo.llseek(i,a,n),g=[i.position>>>0,(w=i.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[o>>2]=g[0],h[o+4>>2]=g[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},j:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.write(e,d,i,s,n);if(u<0)return -1;o+=u,void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},h:function(e,r,t){return $(e,r,t,e=>e.normalize("NFD"))},g:function(e,r,t){return $(e,r,t,e=>e.normalize("NFC"))},f:function(e,r,t){return $(e,r,t,e=>e.toLowerCase())},e:function(e,r,t,n){return $(e,r,t,e=>e.reduce((e,r,t)=>{let o={ß:"Ss",DŽ:"Dž",Dž:"Dž",dž:"Dž",LJ:"Lj",Lj:"Lj",lj:"Lj",NJ:"Nj",Nj:"Nj",nj:"Nj",DZ:"Dz",Dz:"Dz",dz:"Dz",և:"Եւ",ᾲ:"Ὰͅ",ᾳ:"ᾼ",ᾴ:"Άͅ",ᾷ:"ᾼ͂",ᾼ:"ᾼ",ῂ:"Ὴͅ",ῃ:"ῌ",ῄ:"Ήͅ",ῇ:"ῌ͂",ῌ:"ῌ",ῲ:"Ὼͅ",ῳ:"ῼ",ῴ:"Ώͅ",ῷ:"ῼ͂",ῼ:"ῼ",ff:"Ff",fi:"Fi",fl:"Fl",ffi:"Ffi",ffl:"Ffl",ſt:"St",st:"St",ﬓ:"Մն",ﬔ:"Մե",ﬕ:"Մի",ﬖ:"Վն",ﬗ:"Մխ"},a=String.fromCodePoint(r);return 0===t?a=o[a]?o[a]:r>=8064&&r<8112?["ᾈᾉᾊᾋᾌᾍᾎᾏ","ᾘᾙᾚᾛᾜᾝᾞᾟ","ᾨᾩᾪᾫᾬᾭᾮᾯ"][(r-8064)/16|0][r%8]:a.toUpperCase():n&&(a=a.toLowerCase()),e+a},""),1)},d:function(e,r,t){return $(e,r,t,e=>e.toUpperCase())},n:function(e,r){var t=eS();try{eA(e,r)}catch(e){if(eD(t),e!==e+0)throw e;ek(1,0)}},b:function(e,r,t){var n=eS();try{eM(e,r,t)}catch(e){if(eD(n),e!==e+0)throw e;ek(1,0)}}};!function(){var r,t,o,a={a:ev};function i(r,t){var n,o=r.exports;return o=eh.instrumentWasmExports(o),e.asm=o,l=e.asm.E,T(),e.asm.N,n=e.asm.F,z.unshift(n),Y("wasm-instantiate"),o}if(q("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(a,i)}catch(e){F("Module.instantiateWasm callback failed with error: "+e),n(e)}(r=u,t=v,o=function(e){i(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||V(t)||"function"!=typeof fetch?K(t,a,o):fetch(t,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,a).then(o,function(e){return F("wasm streaming compile failed: "+e),F("falling back to ArrayBuffer instantiation"),K(t,a,o)})})).catch(n)}();var ew=function(){return(ew=e.asm.G).apply(null,arguments)},eg=function(){return(eg=e.asm.H).apply(null,arguments)},e_=e._main=function(){return(e_=e._main=e.asm.I).apply(null,arguments)},ey=(e._gidispatch_get_game_id=function(){return(e._gidispatch_get_game_id=e.asm.J).apply(null,arguments)},e._fflush=function(){return(ey=e._fflush=e.asm.K).apply(null,arguments)}),eE=function(){return(eE=e.asm.L).apply(null,arguments)},eb=function(){return(eb=e.asm.M).apply(null,arguments)},ek=function(){return(ek=e.asm.O).apply(null,arguments)},eS=function(){return(eS=e.asm.P).apply(null,arguments)},eD=function(){return(eD=e.asm.Q).apply(null,arguments)},eF=function(){return(eF=e.asm.R).apply(null,arguments)},eM=e.dynCall_vii=function(){return(eM=e.dynCall_vii=e.asm.S).apply(null,arguments)},eA=e.dynCall_vi=function(){return(eA=e.dynCall_vi=e.asm.T).apply(null,arguments)},eP=function(){return(eP=e.asm.U).apply(null,arguments)},ex=function(){return(ex=e.asm.V).apply(null,arguments)},eR=function(){return(eR=e.asm.W).apply(null,arguments)},eC=function(){return(eC=e.asm.X).apply(null,arguments)};function eT(r=E){!(U>0)&&(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;){var r;r=e.preRun.shift(),N.unshift(r)}Z(N)}(),U>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()));function n(){!_&&(_=!0,e.calledRun=!0,A||(e.noFSInit||eo.init.initialized||eo.init(),eo.ignorePermissions=!1,et.init(),Z(z),Z(B),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),eN&&function(e=[]){var r=e_;e.unshift(b);var t=e.length,n=eF((t+1)*4),o=n>>2;e.forEach(e=>{var r,t;h[o++]=(t=eF(r=C(e)+1),R(e,d,t,r),t)}),h[o]=0;try{var a=r(t,n);ed(a,!0)}catch(e){return ef(e)}}(r),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r;r=e.postRun.shift(),O.unshift(r)}Z(O)}()))}}if(e.___start_em_js=33568,e.___stop_em_js=36253,e.AsciiToString=function(e){for(var r="";;){var t=f[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}},e.FS=eo,W=function e(){_||eT(),_||(W=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();var eN=!0;return e.noInitialRun&&(eN=!1),eT(),e.ready}),rC={};rC=B("6kBsm").getBundleURL("ejVIo")+B("n9Yfb").resolve("huVfu");var rT=(a="file:///node_modules/emglken/build/hugo-core.js",function(e={}){var r,t,n,o,i,s,u,l,c,d,f,m,h,p,v,w,g,_,e=void 0!==e?e:{};e.ready=new Promise(function(e,r){t=e,n=r});var y=Object.assign({},e),E=[],b="./this.program",k=(e,r)=>{throw r},S="";"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),a&&(S=a),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(200==n.status||0==n.status&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)};var D=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);Object.assign(e,y),y=null,e.arguments&&(E=e.arguments),e.thisProgram&&(b=e.thisProgram),e.quit&&(k=e.quit),e.wasmBinary&&(u=e.wasmBinary);var M=e.noExitRuntime||!1;"object"!=typeof WebAssembly&&V("no native wasm support detected");var A=!1,P=new TextDecoder("utf8");function x(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;return P.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))}function R(e,r){if(!e)return"";for(var t=e+r,n=e;!(n>=t)&&f[n];)++n;return P.decode(f.subarray(e,n))}function C(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function T(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function N(){var r=l.buffer;e.HEAP8=d=new Int8Array(r),e.HEAP16=m=new Int16Array(r),e.HEAP32=h=new Int32Array(r),e.HEAPU8=f=new Uint8Array(r),e.HEAPU16=new Uint16Array(r),e.HEAPU32=p=new Uint32Array(r),e.HEAPF32=new Float32Array(r),e.HEAPF64=new Float64Array(r)}var z=[],B=[],j=[],O=[],I=[],L=!1,U=0,H=0,W=null,q=null;function Y(r){H++,e.monitorRunDependencies&&e.monitorRunDependencies(H)}function G(r){if(H--,e.monitorRunDependencies&&e.monitorRunDependencies(H),0==H&&(null!==W&&(clearInterval(W),W=null),q)){var t=q;q=null,t()}}function V(r){e.onAbort&&e.onAbort(r),F(r="Aborted("+r+")"),A=!0,c=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function X(e){return e.startsWith("data:application/octet-stream;base64,")}function K(e){try{if(e==v&&u)return new Uint8Array(u);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function $(e,r,t){return(u||"function"!=typeof fetch?Promise.resolve().then(function(){return K(e)}):fetch(e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()}).catch(function(){return K(e)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(t,function(e){F("failed to asynchronously prepare wasm: "+e),V(e)})}function J(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Z(r){for(;r.length>0;)r.shift()(e)}e.locateFile?X(v="hugo-core.wasm")||(r=v,v=e.locateFile?e.locateFile(r,S):S+r):v=new URL(rC).href;var Q={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Q.isAbs(e),t="/"===e.substr(-1);return(e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Q.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Q.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Q.normalize(e.join("/"))},join2:(e,r)=>Q.normalize(e+"/"+r)},ee={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:eo.cwd();if("string"!=typeof n)throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Q.isAbs(n)}return e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ee.resolve(e).substr(1),r=ee.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}for(var u=[],s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function er(e,r,t){var n=Array(t>0?t:T(e)+1),o=C(e,n,0,n.length);return r&&(n.length=o),n}var et={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){et.ttys[e]={input:[],output:[],ops:r},eo.registerDevice(e,et.stream_ops)},stream_ops:{open:function(e){var r=et.ttys[e.node.rdev];if(!r)throw new eo.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new eo.ErrnoError(60);for(var a,i=0,s=0;s<n;s++){try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new eo.ErrnoError(29)}if(void 0===a&&0===i)throw new eo.ErrnoError(6);if(null==a)break;i++,r[t+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new eo.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new eo.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=er(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(D(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(D(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(F(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(F(x(e.output,0)),e.output=[])}}},en={ops_table:null,mount:function(e){return en.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(eo.isBlkdev(t)||eo.isFIFO(t))throw new eo.ErrnoError(63);en.ops_table||(en.ops_table={dir:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,lookup:en.node_ops.lookup,mknod:en.node_ops.mknod,rename:en.node_ops.rename,unlink:en.node_ops.unlink,rmdir:en.node_ops.rmdir,readdir:en.node_ops.readdir,symlink:en.node_ops.symlink},stream:{llseek:en.stream_ops.llseek}},file:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:{llseek:en.stream_ops.llseek,read:en.stream_ops.read,write:en.stream_ops.write,allocate:en.stream_ops.allocate,mmap:en.stream_ops.mmap,msync:en.stream_ops.msync}},link:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,readlink:en.node_ops.readlink},stream:{}},chrdev:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:eo.chrdev_stream_ops}});var o=eo.createNode(e,r,t,n);return eo.isDir(o.mode)?(o.node_ops=en.ops_table.dir.node,o.stream_ops=en.ops_table.dir.stream,o.contents={}):eo.isFile(o.mode)?(o.node_ops=en.ops_table.file.node,o.stream_ops=en.ops_table.file.stream,o.usedBytes=0,o.contents=null):eo.isLink(o.mode)?(o.node_ops=en.ops_table.link.node,o.stream_ops=en.ops_table.link.stream):eo.isChrdev(o.mode)&&(o.node_ops=en.ops_table.chrdev.node,o.stream_ops=en.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}}},node_ops:{getattr:function(e){var r={};return r.dev=eo.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,eo.isDir(e.mode)?r.size=4096:eo.isFile(e.mode)?r.size=e.usedBytes:eo.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&en.resizeFileStorage(e,r.size)},lookup:function(e,r){throw eo.genericErrors[44]},mknod:function(e,r,t,n){return en.createNode(e,r,t,n)},rename:function(e,r,t){if(eo.isDir(e.mode)){var n;try{n=eo.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new eo.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=eo.lookupNode(e,r);for(var n in t.contents)throw new eo.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=en.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!eo.isLink(e.mode))throw new eo.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===d.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(en.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&eo.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new eo.ErrnoError(28);return n},allocate:function(e,r,t){en.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!eo.isFile(e.node.mode))throw new eo.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==d.buffer)throw(t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,a=void V(),new eo.ErrnoError(48);return i=!1,{ptr:a=s.byteOffset,allocated:i}},msync:function(e,r,t,n,o){return en.stream_ops.write(e,r,0,n,t,!1),0}}},eo={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=ee.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new eo.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=eo.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=eo.lookupNode(n,t[a]),o=Q.join2(o,t[a]),eo.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;eo.isLink(n.mode);){var u=eo.readlink(o);if(o=ee.resolve(Q.dirname(o),u),n=eo.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new eo.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(eo.isRoot(e)){var t=e.mount.mountpoint;if(!r)return t;return"/"!==t[t.length-1]?t+"/"+r:t+r}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%eo.nameTable.length},hashAddNode:e=>{var r=eo.hashName(e.parent.id,e.name);e.name_next=eo.nameTable[r],eo.nameTable[r]=e},hashRemoveNode:e=>{var r=eo.hashName(e.parent.id,e.name);if(eo.nameTable[r]===e)eo.nameTable[r]=e.name_next;else for(var t=eo.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=eo.mayLookup(e);if(t)throw new eo.ErrnoError(t,e);for(var n=eo.hashName(e.id,r),o=eo.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return eo.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new eo.FSNode(e,r,t,n);return eo.hashAddNode(o),o},destroyNode:e=>{eo.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=eo.flagModes[e];if(void 0===r)throw Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>eo.ignorePermissions?0:r.includes("r")&&!(292&e.mode)||r.includes("w")&&!(146&e.mode)||r.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eo.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return eo.lookupNode(e,r),20}catch(e){}return eo.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{try{n=eo.lookupNode(e,r)}catch(e){return e.errno}var n,o=eo.nodePermissions(e,"wx");if(o)return o;if(t){if(!eo.isDir(n.mode))return 54;if(eo.isRoot(n)||eo.getPath(n)===eo.cwd())return 10}else if(eo.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?eo.isLink(e.mode)?32:eo.isDir(e.mode)&&("r"!==eo.flagsToPermissionString(r)||512&r)?31:eo.nodePermissions(e,eo.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=eo.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!eo.streams[t])return t;throw new eo.ErrnoError(33)},getStream:e=>eo.streams[e],createStream:(e,r,t)=>{eo.FSStream||(eo.FSStream=function(){this.shared={}},eo.FSStream.prototype={},Object.defineProperties(eo.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return(2097155&this.flags)!=1}},isWrite:{get:function(){return(2097155&this.flags)!=0}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new eo.FSStream,e);var n=eo.nextfd(r,t);return e.fd=n,eo.streams[n]=e,e},closeStream:e=>{eo.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=eo.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new eo.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{eo.devices[e]={stream_ops:r}},getDevice:e=>eo.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),eo.syncFSRequests++,eo.syncFSRequests>1&&F("warning: "+eo.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=eo.getMounts(eo.root.mount),n=0;function o(e){return eo.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&eo.root)throw new eo.ErrnoError(10);if(!o&&!a){var i=eo.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,eo.isMountpoint(n))throw new eo.ErrnoError(10);if(!eo.isDir(n.mode))throw new eo.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?eo.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=eo.lookupPath(e,{follow_mount:!1});if(!eo.isMountpoint(r.node))throw new eo.ErrnoError(28);var t=r.node,n=t.mounted,o=eo.getMounts(n);Object.keys(eo.nameTable).forEach(e=>{for(var r=eo.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&eo.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=eo.lookupPath(e,{parent:!0}).node,o=Q.basename(e);if(!o||"."===o||".."===o)throw new eo.ErrnoError(28);var a=eo.mayCreate(n,o);if(a)throw new eo.ErrnoError(a);if(!n.node_ops.mknod)throw new eo.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=(void 0!==r?r:438)&4095|32768,eo.mknod(e,r,0)),mkdir:(e,r)=>(r=(void 0!==r?r:511)&1023|16384,eo.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{eo.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,eo.mknod(e,r,t)),symlink:(e,r)=>{if(!ee.resolve(e))throw new eo.ErrnoError(44);var t=eo.lookupPath(r,{parent:!0}).node;if(!t)throw new eo.ErrnoError(44);var n=Q.basename(r),o=eo.mayCreate(t,n);if(o)throw new eo.ErrnoError(o);if(!t.node_ops.symlink)throw new eo.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o,a=Q.dirname(e),i=Q.dirname(r),s=Q.basename(e),u=Q.basename(r);if(t=eo.lookupPath(e,{parent:!0}).node,n=eo.lookupPath(r,{parent:!0}).node,!t||!n)throw new eo.ErrnoError(44);if(t.mount!==n.mount)throw new eo.ErrnoError(75);var l=eo.lookupNode(t,s),c=ee.relative(e,i);if("."!==c.charAt(0))throw new eo.ErrnoError(28);if("."!==(c=ee.relative(r,a)).charAt(0))throw new eo.ErrnoError(55);try{o=eo.lookupNode(n,u)}catch(e){}if(l!==o){var d=eo.isDir(l.mode),f=eo.mayDelete(t,s,d);if(f||(f=o?eo.mayDelete(n,u,d):eo.mayCreate(n,u)))throw new eo.ErrnoError(f);if(!t.node_ops.rename)throw new eo.ErrnoError(63);if(eo.isMountpoint(l)||o&&eo.isMountpoint(o))throw new eo.ErrnoError(10);if(n!==t&&(f=eo.nodePermissions(t,"w")))throw new eo.ErrnoError(f);eo.hashRemoveNode(l);try{t.node_ops.rename(l,n,u)}catch(e){throw e}finally{eo.hashAddNode(l)}}},rmdir:e=>{var r=eo.lookupPath(e,{parent:!0}).node,t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!0);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.rmdir)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.rmdir(r,t),eo.destroyNode(n)},readdir:e=>{var r=eo.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new eo.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=eo.lookupPath(e,{parent:!0}).node;if(!r)throw new eo.ErrnoError(44);var t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!1);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.unlink)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.unlink(r,t),eo.destroyNode(n)},readlink:e=>{var r=eo.lookupPath(e).node;if(!r)throw new eo.ErrnoError(44);if(!r.node_ops.readlink)throw new eo.ErrnoError(28);return ee.resolve(eo.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=eo.lookupPath(e,{follow:!r}).node;if(!t)throw new eo.ErrnoError(44);if(!t.node_ops.getattr)throw new eo.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>eo.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?eo.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{eo.chmod(e,r,!0)},fchmod:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);eo.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?eo.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{eo.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=eo.getStream(e);if(!n)throw new eo.ErrnoError(8);eo.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new eo.ErrnoError(28);if("string"==typeof e){var t;t=eo.lookupPath(e,{follow:!0}).node}else t=e;if(!t.node_ops.setattr)throw new eo.ErrnoError(63);if(eo.isDir(t.mode))throw new eo.ErrnoError(31);if(!eo.isFile(t.mode))throw new eo.ErrnoError(28);var n=eo.nodePermissions(t,"w");if(n)throw new eo.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);if((2097155&t.flags)==0)throw new eo.ErrnoError(28);eo.truncate(t.node,r)},utime:(e,r,t)=>{var n=eo.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(r,t,n)=>{if(""===r)throw new eo.ErrnoError(44);if(t="string"==typeof t?eo.modeStringToFlags(t):t,n=void 0===n?438:n,n=64&t?4095&n|32768:0,"object"==typeof r)o=r;else{r=Q.normalize(r);try{var o;o=eo.lookupPath(r,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t){if(o){if(128&t)throw new eo.ErrnoError(20)}else o=eo.mknod(r,n,0),a=!0}if(!o)throw new eo.ErrnoError(44);if(eo.isChrdev(o.mode)&&(t&=-513),65536&t&&!eo.isDir(o.mode))throw new eo.ErrnoError(54);if(!a){var i=eo.mayOpen(o,t);if(i)throw new eo.ErrnoError(i)}512&t&&!a&&eo.truncate(o,0),t&=-131713;var s=eo.createStream({node:o,path:eo.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!e.logReadFiles||1&t||(eo.readFiles||(eo.readFiles={}),r in eo.readFiles||(eo.readFiles[r]=1)),s},close:e=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eo.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eo.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new eo.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==1)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.read)throw new eo.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==0)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.write)throw new eo.ErrnoError(28);e.seekable&&1024&e.flags&&eo.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(r<0||t<=0)throw new eo.ErrnoError(28);if((2097155&e.flags)==0)throw new eo.ErrnoError(8);if(!eo.isFile(e.node.mode)&&!eo.isDir(e.node.mode))throw new eo.ErrnoError(43);if(!e.stream_ops.allocate)throw new eo.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if((2&n)!=0&&(2&o)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eo.ErrnoError(2);if(!e.stream_ops.mmap)throw new eo.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new eo.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw Error('Invalid encoding type "'+r.encoding+'"');var t,n=eo.open(e,r.flags),o=eo.stat(e).size,a=new Uint8Array(o);return eo.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),eo.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=eo.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(T(r)+1),a=C(r,o,0,o.length);eo.write(n,o,0,a,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))eo.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw Error("Unsupported data type");eo.close(n)},cwd:()=>eo.currentPath,chdir:e=>{var r=eo.lookupPath(e,{follow:!0});if(null===r.node)throw new eo.ErrnoError(44);if(!eo.isDir(r.node.mode))throw new eo.ErrnoError(54);var t=eo.nodePermissions(r.node,"x");if(t)throw new eo.ErrnoError(t);eo.currentPath=r.path},createDefaultDirectories:()=>{eo.mkdir("/tmp"),eo.mkdir("/home"),eo.mkdir("/home/web_user")},createDefaultDevices:()=>{eo.mkdir("/dev"),eo.registerDevice(eo.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),eo.mkdev("/dev/null",eo.makedev(1,3)),et.register(eo.makedev(5,0),et.default_tty_ops),et.register(eo.makedev(6,0),et.default_tty1_ops),eo.mkdev("/dev/tty",eo.makedev(5,0)),eo.mkdev("/dev/tty1",eo.makedev(6,0));var e=function(){if("object"!=typeof crypto||"function"!=typeof crypto.getRandomValues)return()=>V("randomDevice");var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}();eo.createDevice("/dev","random",e),eo.createDevice("/dev","urandom",e),eo.mkdir("/dev/shm"),eo.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{eo.mkdir("/proc");var e=eo.mkdir("/proc/self");eo.mkdir("/proc/self/fd"),eo.mount({mount:()=>{var r=eo.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=eo.getStream(+r);if(!t)throw new eo.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return n.parent=n,n}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?eo.createDevice("/dev","stdin",e.stdin):eo.symlink("/dev/tty","/dev/stdin"),e.stdout?eo.createDevice("/dev","stdout",null,e.stdout):eo.symlink("/dev/tty","/dev/stdout"),e.stderr?eo.createDevice("/dev","stderr",null,e.stderr):eo.symlink("/dev/tty1","/dev/stderr"),eo.open("/dev/stdin",0),eo.open("/dev/stdout",1),eo.open("/dev/stderr",1)},ensureErrnoError:()=>{eo.ErrnoError||(eo.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},eo.ErrnoError.prototype=Error(),eo.ErrnoError.prototype.constructor=eo.ErrnoError,[44].forEach(e=>{eo.genericErrors[e]=new eo.ErrnoError(e),eo.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{eo.ensureErrnoError(),eo.nameTable=Array(4096),eo.mount(en,{},"/"),eo.createDefaultDirectories(),eo.createDefaultDevices(),eo.createSpecialDirectories(),eo.filesystems={MEMFS:en}},init:(r,t,n)=>{eo.init.initialized=!0,eo.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=t||e.stdout,e.stderr=n||e.stderr,eo.createStandardStreams()},quit:()=>{eo.init.initialized=!1,eE(0);for(var e=0;e<eo.streams.length;e++){var r=eo.streams[e];r&&eo.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=eo.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=eo.lookupPath(e,{follow:!r});e=t.path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=eo.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Q.basename(e),t=eo.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(e){n.error=e.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:eo.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Q.join2(e,a);try{eo.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=Q.join2("string"==typeof e?e:eo.getPath(e),r),i=eo.getMode(n,o);return eo.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:eo.getPath(e),i=r?Q.join2(e,r):e);var s=eo.getMode(n,o),u=eo.create(i,s);if(t){if("string"==typeof t){for(var l=Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}eo.chmod(u,146|s);var f=eo.open(u,577);eo.write(f,t,0,t.length,0,a),eo.close(f),eo.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=Q.join2("string"==typeof e?e:eo.getPath(e),r),a=eo.getMode(!!t,!!n);eo.createDevice.major||(eo.createDevice.major=64);var i=eo.makedev(eo.createDevice.major++,0);return eo.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i,s=0,u=0;u<o;u++){try{i=t()}catch(e){throw new eo.ErrnoError(29)}if(void 0===i&&0===s)throw new eo.ErrnoError(6);if(null==i)break;s++,r[n+u]=i}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new eo.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),eo.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(o)try{e.contents=er(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new eo.ErrnoError(29)}else throw Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1)&&!(e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e,r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw Error("Couldn't load "+t+". Status: "+r.status);var n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):er(o.responseText||"",!0)},u=this;u.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw Error("doXHR failed!");return u.chunks[e]}),(a||!n)&&(i=n=1,i=n=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i;throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var i={isDevice:!1,url:t},s=eo.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(var s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];u[e]=function(){return eo.forceLoadFile(s),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(eo.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{eo.forceLoadFile(s);var a=void V();if(!a)throw new eo.ErrnoError(48);return l(e,d,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,a,s,u,l,c)=>{var d,f,m=r?ee.resolve(Q.join2(e,r)):e,h="cp "+m;function p(t){function i(t){c&&c(),u||eo.createDataFile(e,r,t,n,o,l),a&&a(),G(h)}Browser.handledByPreloadPlugin(t,m,i,()=>{s&&s(),G(h)})||i(t)}Y(h),"string"==typeof t?(d=e=>p(e),f="al "+t,i(t,e=>{var r;r='Loading data file "'+t+'" failed (no arrayBuffer).',e||V(r),d(new Uint8Array(e)),f&&G(f)},e=>{if(s)s();else throw'Loading data file "'+t+'" failed.'}),f&&Y(f)):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{D("creating db"),o.result.createObjectStore(eo.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([eo.DB_STORE_NAME],"readwrite"),a=n.objectStore(eo.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(e=>{var r=a.put(eo.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&l()},r.onerror=()=>{i+ ++s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([eo.DB_STORE_NAME],"readonly")}catch(e){t(e);return}var i=a.objectStore(eo.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=()=>{eo.analyzePath(e).exists&&eo.unlink(e),eo.createDataFile(Q.dirname(e),Q.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=()=>{s+ ++u==l&&c()}}),a.onerror=t},o.onerror=t}},ea={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(Q.isAbs(r))return r;if(-100===e)n=eo.cwd();else{var n;n=ea.getStreamFromFD(e).path}if(0==r.length){if(!t)throw new eo.ErrnoError(44);return n}return Q.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Q.normalize(r)!==Q.normalize(eo.getPath(e.node)))return -54;throw e}h[t>>2]=n.dev,h[t+8>>2]=n.ino,h[t+12>>2]=n.mode,p[t+16>>2]=n.nlink,h[t+20>>2]=n.uid,h[t+24>>2]=n.gid,h[t+28>>2]=n.rdev,g=[n.size>>>0,+Math.abs(w=n.size)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+40>>2]=g[0],h[t+44>>2]=g[1],h[t+48>>2]=4096,h[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return g=[Math.floor(o/1e3)>>>0,+Math.abs(w=Math.floor(o/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+56>>2]=g[0],h[t+60>>2]=g[1],p[t+64>>2]=o%1e3*1e3,g=[Math.floor(a/1e3)>>>0,+Math.abs(w=Math.floor(a/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+72>>2]=g[0],h[t+76>>2]=g[1],p[t+80>>2]=a%1e3*1e3,g=[Math.floor(i/1e3)>>>0,+Math.abs(w=Math.floor(i/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+88>>2]=g[0],h[t+92>>2]=g[1],p[t+96>>2]=i%1e3*1e3,g=[n.ino>>>0,+Math.abs(w=n.ino)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+104>>2]=g[0],h[t+108>>2]=g[1],0},doMsync:function(e,r,t,n,o){if(!eo.isFile(r.node.mode))throw new eo.ErrnoError(43);if(2&n)return 0;var a=f.slice(e,e+t);eo.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ea.varargs+=4,h[ea.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var r=eo.getStream(e);if(!r)throw new eo.ErrnoError(8);return r}};function ei(e){return e%4==0&&(e%100!=0||e%400==0)}var es=[0,31,60,91,121,152,182,213,244,274,305,335],eu=[0,31,59,90,120,151,181,212,243,273,304,334];function el(e){var r=T(e)+1,t=eg(r);return t&&C(e,d,t,r),t}function ec(r,t){c=r,M||U>0||(ek(),Z(O),eo.quit(),et.shutdown(),L=!0),c=r,M||U>0||(e.onExit&&e.onExit(r),A=!0),k(r,new J(r))}var ed=[31,29,31,30,31,30,31,31,30,31,30,31],ef=[31,28,31,30,31,30,31,31,30,31,30,31];function em(e){if(e instanceof J||"unwind"==e)return c;k(1,e)}function eh(e){try{return e()}catch(e){V(e)}}var ep={instrumentWasmImports:function(e){var r=["emscripten_sleep","emscripten_wget","emscripten_wget_data","emscripten_idb_load","emscripten_idb_store","emscripten_idb_delete","emscripten_idb_exists","emscripten_idb_load_blob","emscripten_idb_store_blob","SDL_Delay","emscripten_scan_registers","emscripten_lazy_load_code","emscripten_fiber_swap","__load_secondary_module","fd_sync","__wasi_fd_sync","_emval_await","_dlopen_js","__asyncjs__*"];for(var t in e)!function(t){var n=e[t];n.sig,"function"==typeof n&&(r.indexOf(t)>=0||t.startsWith("__asyncjs__"))}(t)},instrumentWasmExports:function(e){var r={};for(var t in e)!function(t){var n=e[t];"function"==typeof n?r[t]=function(){ep.exportCallStack.push(t);try{return n.apply(null,arguments)}finally{A||(ep.exportCallStack.pop()===t||V(void 0),ep.maybeStopUnwind())}}:r[t]=n}(t);return r},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:8192,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(e){var r=ep.callStackNameToId[e];return void 0===r&&(r=ep.callStackId++,ep.callStackNameToId[e]=r,ep.callStackIdToName[r]=e),r},maybeStopUnwind:function(){ep.currData&&ep.state===ep.State.Unwinding&&0===ep.exportCallStack.length&&(ep.state=ep.State.Normal,U+=1,eh(eF),"undefined"!=typeof Fibers&&Fibers.trampoline())},whenDone:function(){return new Promise((e,r)=>{ep.asyncPromiseHandlers={resolve:e,reject:r}})},allocateData:function(){var e=eg(12+ep.StackSize);return ep.setDataHeader(e,e+12,ep.StackSize),ep.setDataRewindFunc(e),e},setDataHeader:function(e,r,t){h[e>>2]=r,h[e+4>>2]=r+t},setDataRewindFunc:function(e){var r=ep.exportCallStack[0],t=ep.getCallStackId(r);h[e+8>>2]=t},getDataRewindFunc:function(r){var t=h[r+8>>2],n=ep.callStackIdToName[t];return e.asm[n]},doRewind:function(e){var r=ep.getDataRewindFunc(e);return U-=1,r()},handleSleep:function(e){if(!A){if(ep.state===ep.State.Normal){var r=!1,t=!1;e((e=0)=>{if(!A&&(ep.handleSleepReturnValue=e,r=!0,t)){ep.state=ep.State.Rewinding,eh(()=>eM(ep.currData)),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,o=!1;try{n=ep.doRewind(ep.currData)}catch(e){n=e,o=!0}var a=!1;if(!ep.currData){var i=ep.asyncPromiseHandlers;i&&(ep.asyncPromiseHandlers=null,(o?i.reject:i.resolve)(n),a=!0)}if(o&&!a)throw n}}),t=!0,r||(ep.state=ep.State.Unwinding,ep.currData=ep.allocateData(),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.pause(),eh(()=>eD(ep.currData)))}else ep.state===ep.State.Rewinding?(ep.state=ep.State.Normal,eh(eA),e_(ep.currData),ep.currData=null,ep.sleepCallbacks.forEach(e=>(function(e){if(!L&&!A)try{e(),function(){if(!(M||U>0))try{ec(c)}catch(e){em(e)}}()}catch(e){em(e)}})(e))):V("invalid state: "+ep.state);return ep.handleSleepReturnValue}},handleAsync:function(e){return ep.handleSleep(r=>{e().then(r)})}},ev=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=eo.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(ev.prototype,{read:{get:function(){return(365&this.mode)==365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(146&this.mode)==146},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return eo.isDir(this.mode)}},isDevice:{get:function(){return eo.isChrdev(this.mode)}}}),eo.FSNode=ev,eo.staticInit();var ew={j:function(r,t){return ep.handleAsync(async()=>{e.emglken_stdin_buffers.length||await new Promise(r=>{e.emglken_stdin_ready=r});let n=e.emglken_stdin_buffers.shift(),o=Math.min(n.length,t);return o==n.length?f.set(n,r):(f.set(n.subarray(0,o),r),e.emglken_stdin_buffers.unshift(n.subarray(o))),o})},s:function(e,r,t,n){try{if(r=ea.getStr(r),r=ea.calculateAt(e,r),-8&t)return -28;var o=eo.lookupPath(r,{follow:!0}).node;if(!o)return -44;var a="";if(4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&eo.nodePermissions(o,a))return -2;return 0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},e:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 0:var o=ea.get();if(o<0)return -28;return eo.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ea.get();return n.flags|=o,0;case 5:var o=ea.get();return m[o+0>>1]=2,0;case 16:case 8:default:return -28;case 9:return h[eb()>>2]=28,-1}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},r:function(e,r){try{if(0===r)return -28;var t=eo.cwd(),n=T(t)+1;if(r<n)return -68;return C(t,f,e,r),n}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},q:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:if(!n.tty)return -59;return 0;case 21519:if(!n.tty)return -59;var o=ea.get();return h[o>>2]=0,0;case 21520:if(!n.tty)return -59;return -28;case 21531:var o=ea.get();return eo.ioctl(n,r,o);default:return -28}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},p:function(e,r,t,n){ea.varargs=n;try{r=ea.getStr(r),r=ea.calculateAt(e,r);var o=n?ea.get():0;return eo.open(r,t,o).fd}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},o:function(e,r){try{return e=ea.getStr(e),ea.doStat(eo.stat,e,r)}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},m:function(){return!0},l:function(e,r){var t=new Date(1e3*(p[e>>2]+4294967296*h[e+4>>2]));h[r>>2]=t.getSeconds(),h[r+4>>2]=t.getMinutes(),h[r+8>>2]=t.getHours(),h[r+12>>2]=t.getDate(),h[r+16>>2]=t.getMonth(),h[r+20>>2]=t.getFullYear()-1900,h[r+24>>2]=t.getDay();var n=0|(ei(t.getFullYear())?es:eu)[t.getMonth()]+t.getDate()-1;h[r+28>>2]=n,h[r+36>>2]=-(60*t.getTimezoneOffset());var o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&t.getTimezoneOffset()==Math.min(i,a));h[r+32>>2]=s},k:function(e,r,t){var n=new Date().getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset();function u(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}p[e>>2]=60*Math.max(i,s),h[r>>2]=Number(i!=s);var l=u(o),c=u(a),d=el(l),f=el(c);s<i?(p[t>>2]=d,p[t+4>>2]=f):(p[t>>2]=f,p[t+4>>2]=d)},b:function(){return Date.now()},i:function(e,r,t){f.copyWithin(e,r,r+t)},h:function(e){var r=f.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),function(e){var r=l.buffer;try{return l.grow(e-r.byteLength+65535>>>16),N(),1}catch(e){}}(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},a:ec,d:function(e){try{var r=ea.getStreamFromFD(e);return eo.close(r),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.read(e,d,i,s,n);if(u<0)return -1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},g:function(e,r,t,n,o){try{var a=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(a))return 61;var i=ea.getStreamFromFD(e);return eo.llseek(i,a,n),g=[i.position>>>0,(w=i.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[o>>2]=g[0],h[o+4>>2]=g[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},c:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.write(e,d,i,s,n);if(u<0)return -1;o+=u,void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},f:function(e,r,t,n){var o=h[n+40>>2],a={tm_sec:h[n>>2],tm_min:h[n+4>>2],tm_hour:h[n+8>>2],tm_mday:h[n+12>>2],tm_mon:h[n+16>>2],tm_year:h[n+20>>2],tm_wday:h[n+24>>2],tm_yday:h[n+28>>2],tm_isdst:h[n+32>>2],tm_gmtoff:h[n+36>>2],tm_zone:o?R(o):""},i=R(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function m(e,r){return f(e,r,"0")}function p(e,r){var t;function n(e){return e<0?-1:e>0?1:0}return 0===(t=n(e.getFullYear()-r.getFullYear()))&&0===(t=n(e.getMonth()-r.getMonth()))&&(t=n(e.getDate()-r.getDate())),t}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function w(e){var r=function(e,r){for(var t=new Date(e.getTime());r>0;){var n=ei(t.getFullYear()),o=t.getMonth(),a=(n?ed:ef)[o];if(r>a-t.getDate())r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else{t.setDate(t.getDate()+r);break}}return t}(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=v(t),a=v(n);return 0>=p(o,r)?0>=p(a,r)?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var g={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return m((e.tm_year+1900)/100|0,2)},"%d":function(e){return m(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return w(e).toString().substring(2)},"%G":function(e){return w(e)},"%H":function(e){return m(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),m(r,2)},"%j":function(e){return m(e.tm_mday+function(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}(ei(e.tm_year+1900)?ed:ef,e.tm_mon-1),3)},"%m":function(e){return m(e.tm_mon+1,2)},"%M":function(e){return m(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return m(e.tm_sec,2)},"%t":function(){return" "},"%u":function(e){return e.tm_wday||7},"%U":function(e){return m(Math.floor((e.tm_yday+7-e.tm_wday)/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&ei(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ei(e.tm_year%400-1))&&r++}return m(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){return m(Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff;return(r>=0?"+":"-")+String("0000"+(r=(r=Math.abs(r)/60)/60*100+r%60)).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\x00\x00"),g)i.includes(u)&&(i=i.replace(RegExp(u,"g"),g[u](a)));var _=er(i=i.replace(/\0\0/g,"%"),!1);return _.length>r?0:(d.set(_,e),_.length-1)}};!function(){var r,t,o,a={a:ew};function i(r,t){var n,o=r.exports;return o=ep.instrumentWasmExports(o),e.asm=o,l=e.asm.t,N(),e.asm.C,n=e.asm.u,B.unshift(n),G("wasm-instantiate"),o}if(Y("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(a,i)}catch(e){F("Module.instantiateWasm callback failed with error: "+e),n(e)}(r=u,t=v,o=function(e){i(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||X(t)||"function"!=typeof fetch?$(t,a,o):fetch(t,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,a).then(o,function(e){return F("wasm streaming compile failed: "+e),F("falling back to ArrayBuffer instantiation"),$(t,a,o)})})).catch(n)}();var eg=function(){return(eg=e.asm.v).apply(null,arguments)},e_=function(){return(e_=e.asm.w).apply(null,arguments)},ey=e._main=function(){return(ey=e._main=e.asm.x).apply(null,arguments)},eE=(e._gidispatch_get_game_id=function(){return(e._gidispatch_get_game_id=e.asm.y).apply(null,arguments)},e._fflush=function(){return(eE=e._fflush=e.asm.z).apply(null,arguments)}),eb=function(){return(eb=e.asm.A).apply(null,arguments)},ek=function(){return(ek=e.asm.B).apply(null,arguments)},eS=function(){return(eS=e.asm.D).apply(null,arguments)},eD=function(){return(eD=e.asm.E).apply(null,arguments)},eF=function(){return(eF=e.asm.F).apply(null,arguments)},eM=function(){return(eM=e.asm.G).apply(null,arguments)},eA=function(){return(eA=e.asm.H).apply(null,arguments)};function eP(r=E){!(H>0)&&(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;){var r;r=e.preRun.shift(),z.unshift(r)}Z(z)}(),H>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()));function n(){!_&&(_=!0,e.calledRun=!0,A||(e.noFSInit||eo.init.initialized||eo.init(),eo.ignorePermissions=!1,et.init(),Z(B),Z(j),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),ex&&function(e=[]){var r=ey;e.unshift(b);var t=e.length,n=eS((t+1)*4),o=n>>2;e.forEach(e=>{var r,t;h[o++]=(t=eS(r=T(e)+1),C(e,d,t,r),t)}),h[o]=0;try{var a=r(t,n);ec(a,!0)}catch(e){return em(e)}}(r),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r;r=e.postRun.shift(),I.unshift(r)}Z(I)}()))}}if(e.___start_em_js=18128,e.___stop_em_js=20813,e.AsciiToString=function(e){for(var r="";;){var t=f[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}},e.FS=eo,q=function e(){_||eP(),_||(q=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();var ex=!0;return e.noInitialRun&&(ex=!1),eP(),e.ready}),rN={};rN=B("6kBsm").getBundleURL("ejVIo")+B("n9Yfb").resolve("b8QSH");var rz=(i="file:///node_modules/emglken/build/tads-core.js",function(e={}){var r,t,n,o,a,s,u,l,c,d,f,m,h,p,v,w,g,_,e=void 0!==e?e:{};e.ready=new Promise(function(e,r){t=e,n=r});var y=Object.assign({},e),E=[],b="./this.program",k=(e,r)=>{throw r},S="";"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},a=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(200==n.status||0==n.status&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)};var D=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);Object.assign(e,y),y=null,e.arguments&&(E=e.arguments),e.thisProgram&&(b=e.thisProgram),e.quit&&(k=e.quit),e.wasmBinary&&(u=e.wasmBinary);var M=e.noExitRuntime||!1;"object"!=typeof WebAssembly&&V("no native wasm support detected");var A=!1,P=new TextDecoder("utf8");function x(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;return P.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))}function R(e,r){if(!e)return"";for(var t=e+r,n=e;!(n>=t)&&f[n];)++n;return P.decode(f.subarray(e,n))}function C(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function T(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function N(){var r=l.buffer;e.HEAP8=d=new Int8Array(r),e.HEAP16=m=new Int16Array(r),e.HEAP32=h=new Int32Array(r),e.HEAPU8=f=new Uint8Array(r),e.HEAPU16=new Uint16Array(r),e.HEAPU32=p=new Uint32Array(r),e.HEAPF32=new Float32Array(r),e.HEAPF64=new Float64Array(r)}var z=[],B=[],j=[],O=[],I=[],L=!1,U=0,H=0,W=null,q=null;function Y(r){H++,e.monitorRunDependencies&&e.monitorRunDependencies(H)}function G(r){if(H--,e.monitorRunDependencies&&e.monitorRunDependencies(H),0==H&&(null!==W&&(clearInterval(W),W=null),q)){var t=q;q=null,t()}}function V(r){e.onAbort&&e.onAbort(r),F(r="Aborted("+r+")"),A=!0,c=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function X(e){return e.startsWith("data:application/octet-stream;base64,")}function K(e){try{if(e==v&&u)return new Uint8Array(u);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function $(e,r,t){return(u||"function"!=typeof fetch?Promise.resolve().then(function(){return K(e)}):fetch(e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()}).catch(function(){return K(e)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(t,function(e){F("failed to asynchronously prepare wasm: "+e),V(e)})}function J(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Z(r){for(;r.length>0;)r.shift()(e)}e.locateFile?X(v="tads-core.wasm")||(r=v,v=e.locateFile?e.locateFile(r,S):S+r):v=new URL(rN).href;var Q={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Q.isAbs(e),t="/"===e.substr(-1);return(e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Q.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Q.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Q.normalize(e.join("/"))},join2:(e,r)=>Q.normalize(e+"/"+r)},ee={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:eo.cwd();if("string"!=typeof n)throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Q.isAbs(n)}return e=Q.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ee.resolve(e).substr(1),r=ee.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}for(var u=[],s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function er(e,r,t){var n=Array(t>0?t:T(e)+1),o=C(e,n,0,n.length);return r&&(n.length=o),n}var et={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){et.ttys[e]={input:[],output:[],ops:r},eo.registerDevice(e,et.stream_ops)},stream_ops:{open:function(e){var r=et.ttys[e.node.rdev];if(!r)throw new eo.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new eo.ErrnoError(60);for(var a,i=0,s=0;s<n;s++){try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new eo.ErrnoError(29)}if(void 0===a&&0===i)throw new eo.ErrnoError(6);if(null==a)break;i++,r[t+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new eo.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new eo.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=er(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(D(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(D(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(F(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(F(x(e.output,0)),e.output=[])}}},en={ops_table:null,mount:function(e){return en.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(eo.isBlkdev(t)||eo.isFIFO(t))throw new eo.ErrnoError(63);en.ops_table||(en.ops_table={dir:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,lookup:en.node_ops.lookup,mknod:en.node_ops.mknod,rename:en.node_ops.rename,unlink:en.node_ops.unlink,rmdir:en.node_ops.rmdir,readdir:en.node_ops.readdir,symlink:en.node_ops.symlink},stream:{llseek:en.stream_ops.llseek}},file:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:{llseek:en.stream_ops.llseek,read:en.stream_ops.read,write:en.stream_ops.write,allocate:en.stream_ops.allocate,mmap:en.stream_ops.mmap,msync:en.stream_ops.msync}},link:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr,readlink:en.node_ops.readlink},stream:{}},chrdev:{node:{getattr:en.node_ops.getattr,setattr:en.node_ops.setattr},stream:eo.chrdev_stream_ops}});var o=eo.createNode(e,r,t,n);return eo.isDir(o.mode)?(o.node_ops=en.ops_table.dir.node,o.stream_ops=en.ops_table.dir.stream,o.contents={}):eo.isFile(o.mode)?(o.node_ops=en.ops_table.file.node,o.stream_ops=en.ops_table.file.stream,o.usedBytes=0,o.contents=null):eo.isLink(o.mode)?(o.node_ops=en.ops_table.link.node,o.stream_ops=en.ops_table.link.stream):eo.isChrdev(o.mode)&&(o.node_ops=en.ops_table.chrdev.node,o.stream_ops=en.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}}},node_ops:{getattr:function(e){var r={};return r.dev=eo.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,eo.isDir(e.mode)?r.size=4096:eo.isFile(e.mode)?r.size=e.usedBytes:eo.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&en.resizeFileStorage(e,r.size)},lookup:function(e,r){throw eo.genericErrors[44]},mknod:function(e,r,t,n){return en.createNode(e,r,t,n)},rename:function(e,r,t){if(eo.isDir(e.mode)){var n;try{n=eo.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new eo.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=eo.lookupNode(e,r);for(var n in t.contents)throw new eo.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=en.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!eo.isLink(e.mode))throw new eo.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===d.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(en.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&eo.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new eo.ErrnoError(28);return n},allocate:function(e,r,t){en.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!eo.isFile(e.node.mode))throw new eo.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==d.buffer)throw(t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,a=void V(),new eo.ErrnoError(48);return i=!1,{ptr:a=s.byteOffset,allocated:i}},msync:function(e,r,t,n,o){return en.stream_ops.write(e,r,0,n,t,!1),0}}},eo={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=ee.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new eo.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=eo.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=eo.lookupNode(n,t[a]),o=Q.join2(o,t[a]),eo.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;eo.isLink(n.mode);){var u=eo.readlink(o);if(o=ee.resolve(Q.dirname(o),u),n=eo.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new eo.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(eo.isRoot(e)){var t=e.mount.mountpoint;if(!r)return t;return"/"!==t[t.length-1]?t+"/"+r:t+r}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%eo.nameTable.length},hashAddNode:e=>{var r=eo.hashName(e.parent.id,e.name);e.name_next=eo.nameTable[r],eo.nameTable[r]=e},hashRemoveNode:e=>{var r=eo.hashName(e.parent.id,e.name);if(eo.nameTable[r]===e)eo.nameTable[r]=e.name_next;else for(var t=eo.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=eo.mayLookup(e);if(t)throw new eo.ErrnoError(t,e);for(var n=eo.hashName(e.id,r),o=eo.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return eo.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new eo.FSNode(e,r,t,n);return eo.hashAddNode(o),o},destroyNode:e=>{eo.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=eo.flagModes[e];if(void 0===r)throw Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>eo.ignorePermissions?0:r.includes("r")&&!(292&e.mode)||r.includes("w")&&!(146&e.mode)||r.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eo.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return eo.lookupNode(e,r),20}catch(e){}return eo.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{try{n=eo.lookupNode(e,r)}catch(e){return e.errno}var n,o=eo.nodePermissions(e,"wx");if(o)return o;if(t){if(!eo.isDir(n.mode))return 54;if(eo.isRoot(n)||eo.getPath(n)===eo.cwd())return 10}else if(eo.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?eo.isLink(e.mode)?32:eo.isDir(e.mode)&&("r"!==eo.flagsToPermissionString(r)||512&r)?31:eo.nodePermissions(e,eo.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=eo.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!eo.streams[t])return t;throw new eo.ErrnoError(33)},getStream:e=>eo.streams[e],createStream:(e,r,t)=>{eo.FSStream||(eo.FSStream=function(){this.shared={}},eo.FSStream.prototype={},Object.defineProperties(eo.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return(2097155&this.flags)!=1}},isWrite:{get:function(){return(2097155&this.flags)!=0}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new eo.FSStream,e);var n=eo.nextfd(r,t);return e.fd=n,eo.streams[n]=e,e},closeStream:e=>{eo.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=eo.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new eo.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{eo.devices[e]={stream_ops:r}},getDevice:e=>eo.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),eo.syncFSRequests++,eo.syncFSRequests>1&&F("warning: "+eo.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=eo.getMounts(eo.root.mount),n=0;function o(e){return eo.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&eo.root)throw new eo.ErrnoError(10);if(!o&&!a){var i=eo.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,eo.isMountpoint(n))throw new eo.ErrnoError(10);if(!eo.isDir(n.mode))throw new eo.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?eo.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=eo.lookupPath(e,{follow_mount:!1});if(!eo.isMountpoint(r.node))throw new eo.ErrnoError(28);var t=r.node,n=t.mounted,o=eo.getMounts(n);Object.keys(eo.nameTable).forEach(e=>{for(var r=eo.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&eo.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=eo.lookupPath(e,{parent:!0}).node,o=Q.basename(e);if(!o||"."===o||".."===o)throw new eo.ErrnoError(28);var a=eo.mayCreate(n,o);if(a)throw new eo.ErrnoError(a);if(!n.node_ops.mknod)throw new eo.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=(void 0!==r?r:438)&4095|32768,eo.mknod(e,r,0)),mkdir:(e,r)=>(r=(void 0!==r?r:511)&1023|16384,eo.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{eo.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,eo.mknod(e,r,t)),symlink:(e,r)=>{if(!ee.resolve(e))throw new eo.ErrnoError(44);var t=eo.lookupPath(r,{parent:!0}).node;if(!t)throw new eo.ErrnoError(44);var n=Q.basename(r),o=eo.mayCreate(t,n);if(o)throw new eo.ErrnoError(o);if(!t.node_ops.symlink)throw new eo.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o,a=Q.dirname(e),i=Q.dirname(r),s=Q.basename(e),u=Q.basename(r);if(t=eo.lookupPath(e,{parent:!0}).node,n=eo.lookupPath(r,{parent:!0}).node,!t||!n)throw new eo.ErrnoError(44);if(t.mount!==n.mount)throw new eo.ErrnoError(75);var l=eo.lookupNode(t,s),c=ee.relative(e,i);if("."!==c.charAt(0))throw new eo.ErrnoError(28);if("."!==(c=ee.relative(r,a)).charAt(0))throw new eo.ErrnoError(55);try{o=eo.lookupNode(n,u)}catch(e){}if(l!==o){var d=eo.isDir(l.mode),f=eo.mayDelete(t,s,d);if(f||(f=o?eo.mayDelete(n,u,d):eo.mayCreate(n,u)))throw new eo.ErrnoError(f);if(!t.node_ops.rename)throw new eo.ErrnoError(63);if(eo.isMountpoint(l)||o&&eo.isMountpoint(o))throw new eo.ErrnoError(10);if(n!==t&&(f=eo.nodePermissions(t,"w")))throw new eo.ErrnoError(f);eo.hashRemoveNode(l);try{t.node_ops.rename(l,n,u)}catch(e){throw e}finally{eo.hashAddNode(l)}}},rmdir:e=>{var r=eo.lookupPath(e,{parent:!0}).node,t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!0);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.rmdir)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.rmdir(r,t),eo.destroyNode(n)},readdir:e=>{var r=eo.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new eo.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=eo.lookupPath(e,{parent:!0}).node;if(!r)throw new eo.ErrnoError(44);var t=Q.basename(e),n=eo.lookupNode(r,t),o=eo.mayDelete(r,t,!1);if(o)throw new eo.ErrnoError(o);if(!r.node_ops.unlink)throw new eo.ErrnoError(63);if(eo.isMountpoint(n))throw new eo.ErrnoError(10);r.node_ops.unlink(r,t),eo.destroyNode(n)},readlink:e=>{var r=eo.lookupPath(e).node;if(!r)throw new eo.ErrnoError(44);if(!r.node_ops.readlink)throw new eo.ErrnoError(28);return ee.resolve(eo.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=eo.lookupPath(e,{follow:!r}).node;if(!t)throw new eo.ErrnoError(44);if(!t.node_ops.getattr)throw new eo.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>eo.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?eo.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{eo.chmod(e,r,!0)},fchmod:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);eo.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?eo.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eo.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{eo.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=eo.getStream(e);if(!n)throw new eo.ErrnoError(8);eo.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new eo.ErrnoError(28);if("string"==typeof e){var t;t=eo.lookupPath(e,{follow:!0}).node}else t=e;if(!t.node_ops.setattr)throw new eo.ErrnoError(63);if(eo.isDir(t.mode))throw new eo.ErrnoError(31);if(!eo.isFile(t.mode))throw new eo.ErrnoError(28);var n=eo.nodePermissions(t,"w");if(n)throw new eo.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=eo.getStream(e);if(!t)throw new eo.ErrnoError(8);if((2097155&t.flags)==0)throw new eo.ErrnoError(28);eo.truncate(t.node,r)},utime:(e,r,t)=>{var n=eo.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(r,t,n)=>{if(""===r)throw new eo.ErrnoError(44);if(t="string"==typeof t?eo.modeStringToFlags(t):t,n=void 0===n?438:n,n=64&t?4095&n|32768:0,"object"==typeof r)o=r;else{r=Q.normalize(r);try{var o;o=eo.lookupPath(r,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t){if(o){if(128&t)throw new eo.ErrnoError(20)}else o=eo.mknod(r,n,0),a=!0}if(!o)throw new eo.ErrnoError(44);if(eo.isChrdev(o.mode)&&(t&=-513),65536&t&&!eo.isDir(o.mode))throw new eo.ErrnoError(54);if(!a){var i=eo.mayOpen(o,t);if(i)throw new eo.ErrnoError(i)}512&t&&!a&&eo.truncate(o,0),t&=-131713;var s=eo.createStream({node:o,path:eo.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!e.logReadFiles||1&t||(eo.readFiles||(eo.readFiles={}),r in eo.readFiles||(eo.readFiles[r]=1)),s},close:e=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eo.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eo.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new eo.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==1)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.read)throw new eo.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new eo.ErrnoError(28);if(eo.isClosed(e)||(2097155&e.flags)==0)throw new eo.ErrnoError(8);if(eo.isDir(e.node.mode))throw new eo.ErrnoError(31);if(!e.stream_ops.write)throw new eo.ErrnoError(28);e.seekable&&1024&e.flags&&eo.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new eo.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(eo.isClosed(e))throw new eo.ErrnoError(8);if(r<0||t<=0)throw new eo.ErrnoError(28);if((2097155&e.flags)==0)throw new eo.ErrnoError(8);if(!eo.isFile(e.node.mode)&&!eo.isDir(e.node.mode))throw new eo.ErrnoError(43);if(!e.stream_ops.allocate)throw new eo.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if((2&n)!=0&&(2&o)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eo.ErrnoError(2);if(!e.stream_ops.mmap)throw new eo.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new eo.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw Error('Invalid encoding type "'+r.encoding+'"');var t,n=eo.open(e,r.flags),o=eo.stat(e).size,a=new Uint8Array(o);return eo.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),eo.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=eo.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(T(r)+1),a=C(r,o,0,o.length);eo.write(n,o,0,a,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))eo.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw Error("Unsupported data type");eo.close(n)},cwd:()=>eo.currentPath,chdir:e=>{var r=eo.lookupPath(e,{follow:!0});if(null===r.node)throw new eo.ErrnoError(44);if(!eo.isDir(r.node.mode))throw new eo.ErrnoError(54);var t=eo.nodePermissions(r.node,"x");if(t)throw new eo.ErrnoError(t);eo.currentPath=r.path},createDefaultDirectories:()=>{eo.mkdir("/tmp"),eo.mkdir("/home"),eo.mkdir("/home/web_user")},createDefaultDevices:()=>{eo.mkdir("/dev"),eo.registerDevice(eo.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),eo.mkdev("/dev/null",eo.makedev(1,3)),et.register(eo.makedev(5,0),et.default_tty_ops),et.register(eo.makedev(6,0),et.default_tty1_ops),eo.mkdev("/dev/tty",eo.makedev(5,0)),eo.mkdev("/dev/tty1",eo.makedev(6,0));var e=function(){if("object"!=typeof crypto||"function"!=typeof crypto.getRandomValues)return()=>V("randomDevice");var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}();eo.createDevice("/dev","random",e),eo.createDevice("/dev","urandom",e),eo.mkdir("/dev/shm"),eo.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{eo.mkdir("/proc");var e=eo.mkdir("/proc/self");eo.mkdir("/proc/self/fd"),eo.mount({mount:()=>{var r=eo.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=eo.getStream(+r);if(!t)throw new eo.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return n.parent=n,n}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?eo.createDevice("/dev","stdin",e.stdin):eo.symlink("/dev/tty","/dev/stdin"),e.stdout?eo.createDevice("/dev","stdout",null,e.stdout):eo.symlink("/dev/tty","/dev/stdout"),e.stderr?eo.createDevice("/dev","stderr",null,e.stderr):eo.symlink("/dev/tty1","/dev/stderr"),eo.open("/dev/stdin",0),eo.open("/dev/stdout",1),eo.open("/dev/stderr",1)},ensureErrnoError:()=>{eo.ErrnoError||(eo.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},eo.ErrnoError.prototype=Error(),eo.ErrnoError.prototype.constructor=eo.ErrnoError,[44].forEach(e=>{eo.genericErrors[e]=new eo.ErrnoError(e),eo.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{eo.ensureErrnoError(),eo.nameTable=Array(4096),eo.mount(en,{},"/"),eo.createDefaultDirectories(),eo.createDefaultDevices(),eo.createSpecialDirectories(),eo.filesystems={MEMFS:en}},init:(r,t,n)=>{eo.init.initialized=!0,eo.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=t||e.stdout,e.stderr=n||e.stderr,eo.createStandardStreams()},quit:()=>{eo.init.initialized=!1,ek(0);for(var e=0;e<eo.streams.length;e++){var r=eo.streams[e];r&&eo.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=eo.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=eo.lookupPath(e,{follow:!r});e=t.path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=eo.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Q.basename(e),t=eo.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(e){n.error=e.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:eo.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Q.join2(e,a);try{eo.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=Q.join2("string"==typeof e?e:eo.getPath(e),r),i=eo.getMode(n,o);return eo.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:eo.getPath(e),i=r?Q.join2(e,r):e);var s=eo.getMode(n,o),u=eo.create(i,s);if(t){if("string"==typeof t){for(var l=Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}eo.chmod(u,146|s);var f=eo.open(u,577);eo.write(f,t,0,t.length,0,a),eo.close(f),eo.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=Q.join2("string"==typeof e?e:eo.getPath(e),r),a=eo.getMode(!!t,!!n);eo.createDevice.major||(eo.createDevice.major=64);var i=eo.makedev(eo.createDevice.major++,0);return eo.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i,s=0,u=0;u<o;u++){try{i=t()}catch(e){throw new eo.ErrnoError(29)}if(void 0===i&&0===s)throw new eo.ErrnoError(6);if(null==i)break;s++,r[n+u]=i}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new eo.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),eo.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(o)try{e.contents=er(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new eo.ErrnoError(29)}else throw Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1)&&!(e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e,r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw Error("Couldn't load "+t+". Status: "+r.status);var n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):er(o.responseText||"",!0)},u=this;u.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw Error("doXHR failed!");return u.chunks[e]}),(a||!n)&&(i=n=1,i=n=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i;throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var i={isDevice:!1,url:t},s=eo.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(var s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];u[e]=function(){return eo.forceLoadFile(s),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(eo.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{eo.forceLoadFile(s);var a=void V();if(!a)throw new eo.ErrnoError(48);return l(e,d,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,i,s,u,l,c)=>{var d,f,m=r?ee.resolve(Q.join2(e,r)):e,h="cp "+m;function p(t){function a(t){c&&c(),u||eo.createDataFile(e,r,t,n,o,l),i&&i(),G(h)}Browser.handledByPreloadPlugin(t,m,a,()=>{s&&s(),G(h)})||a(t)}Y(h),"string"==typeof t?(d=e=>p(e),f="al "+t,a(t,e=>{var r;r='Loading data file "'+t+'" failed (no arrayBuffer).',e||V(r),d(new Uint8Array(e)),f&&G(f)},e=>{if(s)s();else throw'Loading data file "'+t+'" failed.'}),f&&Y(f)):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{D("creating db"),o.result.createObjectStore(eo.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([eo.DB_STORE_NAME],"readwrite"),a=n.objectStore(eo.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(e=>{var r=a.put(eo.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&l()},r.onerror=()=>{i+ ++s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r=()=>{},t=()=>{})=>{var n=eo.indexedDB();try{var o=n.open(eo.DB_NAME(),eo.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([eo.DB_STORE_NAME],"readonly")}catch(e){t(e);return}var i=a.objectStore(eo.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=()=>{eo.analyzePath(e).exists&&eo.unlink(e),eo.createDataFile(Q.dirname(e),Q.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=()=>{s+ ++u==l&&c()}}),a.onerror=t},o.onerror=t}},ea={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(Q.isAbs(r))return r;if(-100===e)n=eo.cwd();else{var n;n=ea.getStreamFromFD(e).path}if(0==r.length){if(!t)throw new eo.ErrnoError(44);return n}return Q.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Q.normalize(r)!==Q.normalize(eo.getPath(e.node)))return -54;throw e}h[t>>2]=n.dev,h[t+8>>2]=n.ino,h[t+12>>2]=n.mode,p[t+16>>2]=n.nlink,h[t+20>>2]=n.uid,h[t+24>>2]=n.gid,h[t+28>>2]=n.rdev,g=[n.size>>>0,+Math.abs(w=n.size)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+40>>2]=g[0],h[t+44>>2]=g[1],h[t+48>>2]=4096,h[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return g=[Math.floor(o/1e3)>>>0,+Math.abs(w=Math.floor(o/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+56>>2]=g[0],h[t+60>>2]=g[1],p[t+64>>2]=o%1e3*1e3,g=[Math.floor(a/1e3)>>>0,+Math.abs(w=Math.floor(a/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+72>>2]=g[0],h[t+76>>2]=g[1],p[t+80>>2]=a%1e3*1e3,g=[Math.floor(i/1e3)>>>0,+Math.abs(w=Math.floor(i/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+88>>2]=g[0],h[t+92>>2]=g[1],p[t+96>>2]=i%1e3*1e3,g=[n.ino>>>0,+Math.abs(w=n.ino)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+104>>2]=g[0],h[t+108>>2]=g[1],0},doMsync:function(e,r,t,n,o){if(!eo.isFile(r.node.mode))throw new eo.ErrnoError(43);if(2&n)return 0;var a=f.slice(e,e+t);eo.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ea.varargs+=4,h[ea.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var r=eo.getStream(e);if(!r)throw new eo.ErrnoError(8);return r}};function ei(e){return p[e>>2]+4294967296*h[e+4>>2]}function es(e){return e%4==0&&(e%100!=0||e%400==0)}var eu=[0,31,60,91,121,152,182,213,244,274,305,335],el=[0,31,59,90,120,151,181,212,243,273,304,334];function ec(e){var r=T(e)+1,t=eE(r);return t&&C(e,d,t,r),t}var ed={};function ef(){if(!ef.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:b||"./this.program"};for(var r in ed)void 0===ed[r]?delete e[r]:e[r]=ed[r];var t=[];for(var r in e)t.push(r+"="+e[r]);ef.strings=t}return ef.strings}function em(r,t){c=r,M||U>0||(eF(),Z(O),eo.quit(),et.shutdown(),L=!0),c=r,M||U>0||(e.onExit&&e.onExit(r),A=!0),k(r,new J(r))}var eh=[31,29,31,30,31,30,31,31,30,31,30,31],ep=[31,28,31,30,31,30,31,31,30,31,30,31];function ev(e){if(e instanceof J||"unwind"==e)return c;k(1,e)}function ew(e){try{return e()}catch(e){V(e)}}var eg={instrumentWasmImports:function(e){var r=["invoke_*","emscripten_sleep","emscripten_wget","emscripten_wget_data","emscripten_idb_load","emscripten_idb_store","emscripten_idb_delete","emscripten_idb_exists","emscripten_idb_load_blob","emscripten_idb_store_blob","SDL_Delay","emscripten_scan_registers","emscripten_lazy_load_code","emscripten_fiber_swap","__load_secondary_module","fd_sync","__wasi_fd_sync","_emval_await","_dlopen_js","__asyncjs__*"];for(var t in e)!function(t){var n=e[t];n.sig,"function"==typeof n&&(r.indexOf(t)>=0||t.startsWith("__asyncjs__"))}(t)},instrumentWasmExports:function(e){var r={};for(var t in e)!function(t){var n=e[t];"function"==typeof n?r[t]=function(){eg.exportCallStack.push(t);try{return n.apply(null,arguments)}finally{A||(eg.exportCallStack.pop()===t||V(void 0),eg.maybeStopUnwind())}}:r[t]=n}(t);return r},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:8192,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(e){var r=eg.callStackNameToId[e];return void 0===r&&(r=eg.callStackId++,eg.callStackNameToId[e]=r,eg.callStackIdToName[r]=e),r},maybeStopUnwind:function(){eg.currData&&eg.state===eg.State.Unwinding&&0===eg.exportCallStack.length&&(eg.state=eg.State.Normal,U+=1,ew(e3),"undefined"!=typeof Fibers&&Fibers.trampoline())},whenDone:function(){return new Promise((e,r)=>{eg.asyncPromiseHandlers={resolve:e,reject:r}})},allocateData:function(){var e=eE(12+eg.StackSize);return eg.setDataHeader(e,e+12,eg.StackSize),eg.setDataRewindFunc(e),e},setDataHeader:function(e,r,t){h[e>>2]=r,h[e+4>>2]=r+t},setDataRewindFunc:function(e){var r=eg.exportCallStack[0],t=eg.getCallStackId(r);h[e+8>>2]=t},getDataRewindFunc:function(r){var t=h[r+8>>2],n=eg.callStackIdToName[t];return e.asm[n]},doRewind:function(e){var r=eg.getDataRewindFunc(e);return U-=1,r()},handleSleep:function(e){if(!A){if(eg.state===eg.State.Normal){var r=!1,t=!1;e((e=0)=>{if(!A&&(eg.handleSleepReturnValue=e,r=!0,t)){eg.state=eg.State.Rewinding,ew(()=>e9(eg.currData)),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,o=!1;try{n=eg.doRewind(eg.currData)}catch(e){n=e,o=!0}var a=!1;if(!eg.currData){var i=eg.asyncPromiseHandlers;i&&(eg.asyncPromiseHandlers=null,(o?i.reject:i.resolve)(n),a=!0)}if(o&&!a)throw n}}),t=!0,r||(eg.state=eg.State.Unwinding,eg.currData=eg.allocateData(),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.pause(),ew(()=>e6(eg.currData)))}else eg.state===eg.State.Rewinding?(eg.state=eg.State.Normal,ew(e8),eb(eg.currData),eg.currData=null,eg.sleepCallbacks.forEach(e=>(function(e){if(!L&&!A)try{e(),function(){if(!(M||U>0))try{em(c)}catch(e){ev(e)}}()}catch(e){ev(e)}})(e))):V("invalid state: "+eg.state);return eg.handleSleepReturnValue}},handleAsync:function(e){return eg.handleSleep(r=>{e().then(r)})}},e_=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=eo.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(e_.prototype,{read:{get:function(){return(365&this.mode)==365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(146&this.mode)==146},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return eo.isDir(this.mode)}},isDevice:{get:function(){return eo.isChrdev(this.mode)}}}),eo.FSNode=e_,eo.staticInit();var ey={O:function(r,t){return eg.handleAsync(async()=>{e.emglken_stdin_buffers.length||await new Promise(r=>{e.emglken_stdin_ready=r});let n=e.emglken_stdin_buffers.shift(),o=Math.min(n.length,t);return o==n.length?f.set(n,r):(f.set(n.subarray(0,o),r),e.emglken_stdin_buffers.unshift(n.subarray(o))),o})},ga:function(e){try{var r=ea.getStreamFromFD(e);return eo.createStream(r,0).fd}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},fa:function(e,r,t,n){try{if(r=ea.getStr(r),r=ea.calculateAt(e,r),-8&t)return -28;var o=eo.lookupPath(r,{follow:!0}).node;if(!o)return -44;var a="";if(4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&eo.nodePermissions(o,a))return -2;return 0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},G:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 0:var o=ea.get();if(o<0)return -28;return eo.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ea.get();return n.flags|=o,0;case 5:var o=ea.get();return m[o+0>>1]=2,0;case 16:case 8:default:return -28;case 9:return h[eD()>>2]=28,-1}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},ea:function(e,r){try{if(0===r)return -28;var t=eo.cwd(),n=T(t)+1;if(r<n)return -68;return C(t,f,e,r),n}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},da:function(e,r,t){try{var n=ea.getStreamFromFD(e);n.getdents||(n.getdents=eo.readdir(n.path));for(var o=0,a=eo.llseek(n,0,1),i=Math.floor(a/280);i<n.getdents.length&&o+280<=t;){var s,u,l,c=n.getdents[i];if("."===c)u=n.node.id,l=4;else if(".."===c)u=eo.lookupPath(n.path,{parent:!0}).node.id,l=4;else{var p=eo.lookupNode(n.node,c);u=p.id,l=eo.isChrdev(p.mode)?2:eo.isDir(p.mode)?4:eo.isLink(p.mode)?10:8}g=[u>>>0,(w=u,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[r+o>>2]=g[0],h[r+o+4>>2]=g[1],g=[(i+1)*280>>>0,(w=(i+1)*280,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[r+o+8>>2]=g[0],h[r+o+12>>2]=g[1],m[r+o+16>>1]=280,d[r+o+18>>0]=l,s=r+o+19,C(c,f,s,256),o+=280,i+=1}return eo.llseek(n,280*i,0),o}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},ca:function(e,r,t){ea.varargs=t;try{var n=ea.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:if(!n.tty)return -59;return 0;case 21519:if(!n.tty)return -59;var o=ea.get();return h[o>>2]=0,0;case 21520:if(!n.tty)return -59;return -28;case 21531:var o=ea.get();return eo.ioctl(n,r,o);default:return -28}}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},ba:function(e,r){try{return e=ea.getStr(e),ea.doStat(eo.lstat,e,r)}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},aa:function(e,r,t){try{return r=ea.getStr(r),r=ea.calculateAt(e,r),r=Q.normalize(r),"/"===r[r.length-1]&&(r=r.substr(0,r.length-1)),eo.mkdir(r,t,0),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},$:function(e,r,t,n){try{r=ea.getStr(r);var o=256&n,a=4096&n;return n&=-6401,r=ea.calculateAt(e,r,a),ea.doStat(o?eo.lstat:eo.stat,r,t)}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},F:function(e,r,t,n){ea.varargs=n;try{r=ea.getStr(r),r=ea.calculateAt(e,r);var o=n?ea.get():0;return eo.open(r,t,o).fd}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},_:function(e,r,t,n){try{if(r=ea.getStr(r),r=ea.calculateAt(e,r),n<=0)return -28;var o=eo.readlink(r),a=Math.min(n,T(o)),i=d[t+a];return C(o,f,t,n+1),d[t+a]=i,a}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},Z:function(e,r,t,n){try{return r=ea.getStr(r),n=ea.getStr(n),r=ea.calculateAt(e,r),n=ea.calculateAt(t,n),eo.rename(r,n),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},E:function(e){try{return e=ea.getStr(e),eo.rmdir(e),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},Y:function(e,r){try{return e=ea.getStr(e),ea.doStat(eo.stat,e,r)}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},X:function(e,r,t){try{return r=ea.getStr(r),r=ea.calculateAt(e,r),0===t?eo.unlink(r):512===t?eo.rmdir(r):V("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return-e.errno}},T:function(){return!0},S:function(){throw 1/0},R:function(e,r){var t=new Date(1e3*ei(e));h[r>>2]=t.getUTCSeconds(),h[r+4>>2]=t.getUTCMinutes(),h[r+8>>2]=t.getUTCHours(),h[r+12>>2]=t.getUTCDate(),h[r+16>>2]=t.getUTCMonth(),h[r+20>>2]=t.getUTCFullYear()-1900,h[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;h[r+28>>2]=o},Q:function(e,r){var t=new Date(1e3*ei(e));h[r>>2]=t.getSeconds(),h[r+4>>2]=t.getMinutes(),h[r+8>>2]=t.getHours(),h[r+12>>2]=t.getDate(),h[r+16>>2]=t.getMonth(),h[r+20>>2]=t.getFullYear()-1900,h[r+24>>2]=t.getDay();var n=0|(es(t.getFullYear())?eu:el)[t.getMonth()]+t.getDate()-1;h[r+28>>2]=n,h[r+36>>2]=-(60*t.getTimezoneOffset());var o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&t.getTimezoneOffset()==Math.min(i,a));h[r+32>>2]=s},P:function(e,r,t){var n=new Date().getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset();function u(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}p[e>>2]=60*Math.max(i,s),h[r>>2]=Number(i!=s);var l=u(o),c=u(a),d=ec(l),f=ec(c);s<i?(p[t>>2]=d,p[t+4>>2]=f):(p[t>>2]=f,p[t+4>>2]=d)},C:function(){V("")},B:function(){return Date.now()},A:()=>performance.now(),N:function(e,r,t){f.copyWithin(e,r,r+t)},M:function(e){var r=f.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),function(e){var r=l.buffer;try{return l.grow(e-r.byteLength+65535>>>16),N(),1}catch(e){}}(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},W:function(e,r){var t=0;return ef().forEach(function(n,o){var a=r+t;p[e+4*o>>2]=a,function(e,r,t){for(var n=0;n<e.length;++n)d[r++>>0]=e.charCodeAt(n);d[r>>0]=0}(n,a),t+=n.length+1}),0},V:function(e,r){var t=ef();p[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),p[r>>2]=n,0},y:em,w:function(e){try{var r=ea.getStreamFromFD(e);return eo.close(r),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},U:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.read(e,d,i,s,n);if(u<0)return -1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},I:function(e,r,t,n,o){try{var a=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(a))return 61;var i=ea.getStreamFromFD(e);return eo.llseek(i,a,n),g=[i.position>>>0,(w=i.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[o>>2]=g[0],h[o+4>>2]=g[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},D:function(e,r,t,n){try{var o=ea.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=eo.write(e,d,i,s,n);if(u<0)return -1;o+=u,void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===eo||"ErrnoError"!==e.name)throw e;return e.errno}},L:function(e){var r=eA();try{return e1(e)}catch(e){if(eP(r),e!==e+0)throw e;eM(1,0)}},b:function(e,r){var t=eA();try{return eC(e,r)}catch(e){if(eP(t),e!==e+0)throw e;eM(1,0)}},f:function(e,r,t){var n=eA();try{return eN(e,r,t)}catch(e){if(eP(n),e!==e+0)throw e;eM(1,0)}},e:function(e,r,t,n){var o=eA();try{return eH(e,r,t,n)}catch(e){if(eP(o),e!==e+0)throw e;eM(1,0)}},c:function(e,r,t,n,o){var a=eA();try{return eR(e,r,t,n,o)}catch(e){if(eP(a),e!==e+0)throw e;eM(1,0)}},j:function(e,r,t,n,o,a){var i=eA();try{return eI(e,r,t,n,o,a)}catch(e){if(eP(i),e!==e+0)throw e;eM(1,0)}},l:function(e,r,t,n,o,a,i){var s=eA();try{return eY(e,r,t,n,o,a,i)}catch(e){if(eP(s),e!==e+0)throw e;eM(1,0)}},m:function(e,r,t,n,o,a,i,s){var u=eA();try{return eX(e,r,t,n,o,a,i,s)}catch(e){if(eP(u),e!==e+0)throw e;eM(1,0)}},s:function(e,r,t,n,o,a,i,s,u){var l=eA();try{return eU(e,r,t,n,o,a,i,s,u)}catch(e){if(eP(l),e!==e+0)throw e;eM(1,0)}},t:function(e,r,t,n,o,a,i,s,u,l){var c=eA();try{return eV(e,r,t,n,o,a,i,s,u,l)}catch(e){if(eP(c),e!==e+0)throw e;eM(1,0)}},p:function(e,r,t,n,o,a,i,s,u,l,c){var d=eA();try{return eK(e,r,t,n,o,a,i,s,u,l,c)}catch(e){if(eP(d),e!==e+0)throw e;eM(1,0)}},x:function(e,r,t,n,o,a,i,s,u,l,c,d){var f=eA();try{return e2(e,r,t,n,o,a,i,s,u,l,c,d)}catch(e){if(eP(f),e!==e+0)throw e;eM(1,0)}},q:function(e,r,t,n,o,a,i,s,u,l,c,d,f,m){var h=eA();try{return e$(e,r,t,n,o,a,i,s,u,l,c,d,f,m)}catch(e){if(eP(h),e!==e+0)throw e;eM(1,0)}},z:function(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p){var v=eA();try{return e4(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p)}catch(e){if(eP(v),e!==e+0)throw e;eM(1,0)}},v:function(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p,v,w){var g=eA();try{return eZ(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p,v,w)}catch(e){if(eP(g),e!==e+0)throw e;eM(1,0)}},i:function(e){var r=eA();try{eJ(e)}catch(e){if(eP(r),e!==e+0)throw e;eM(1,0)}},h:function(e,r){var t=eA();try{eT(e,r)}catch(e){if(eP(t),e!==e+0)throw e;eM(1,0)}},d:function(e,r,t){var n=eA();try{ej(e,r,t)}catch(e){if(eP(n),e!==e+0)throw e;eM(1,0)}},a:function(e,r,t,n){var o=eA();try{ez(e,r,t,n)}catch(e){if(eP(o),e!==e+0)throw e;eM(1,0)}},g:function(e,r,t,n,o){var a=eA();try{eq(e,r,t,n,o)}catch(e){if(eP(a),e!==e+0)throw e;eM(1,0)}},o:function(e,r,t,n,o,a){var i=eA();try{eO(e,r,t,n,o,a)}catch(e){if(eP(i),e!==e+0)throw e;eM(1,0)}},n:function(e,r,t,n,o,a,i){var s=eA();try{eL(e,r,t,n,o,a,i)}catch(e){if(eP(s),e!==e+0)throw e;eM(1,0)}},K:function(e,r,t,n,o,a,i,s){var u=eA();try{eQ(e,r,t,n,o,a,i,s)}catch(e){if(eP(u),e!==e+0)throw e;eM(1,0)}},r:function(e,r,t,n,o,a,i,s,u){var l=eA();try{eB(e,r,t,n,o,a,i,s,u)}catch(e){if(eP(l),e!==e+0)throw e;eM(1,0)}},k:function(e,r,t,n,o,a,i,s,u,l){var c=eA();try{eW(e,r,t,n,o,a,i,s,u,l)}catch(e){if(eP(c),e!==e+0)throw e;eM(1,0)}},u:function(e,r,t,n,o,a,i,s,u,l,c,d){var f=eA();try{eG(e,r,t,n,o,a,i,s,u,l,c,d)}catch(e){if(eP(f),e!==e+0)throw e;eM(1,0)}},J:function(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p){var v=eA();try{e0(e,r,t,n,o,a,i,s,u,l,c,d,f,m,h,p)}catch(e){if(eP(v),e!==e+0)throw e;eM(1,0)}},H:function(e,r,t,n){var o=h[n+40>>2],a={tm_sec:h[n>>2],tm_min:h[n+4>>2],tm_hour:h[n+8>>2],tm_mday:h[n+12>>2],tm_mon:h[n+16>>2],tm_year:h[n+20>>2],tm_wday:h[n+24>>2],tm_yday:h[n+28>>2],tm_isdst:h[n+32>>2],tm_gmtoff:h[n+36>>2],tm_zone:o?R(o):""},i=R(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function m(e,r){return f(e,r,"0")}function p(e,r){var t;function n(e){return e<0?-1:e>0?1:0}return 0===(t=n(e.getFullYear()-r.getFullYear()))&&0===(t=n(e.getMonth()-r.getMonth()))&&(t=n(e.getDate()-r.getDate())),t}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function w(e){var r=function(e,r){for(var t=new Date(e.getTime());r>0;){var n=es(t.getFullYear()),o=t.getMonth(),a=(n?eh:ep)[o];if(r>a-t.getDate())r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else{t.setDate(t.getDate()+r);break}}return t}(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=v(t),a=v(n);return 0>=p(o,r)?0>=p(a,r)?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var g={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return m((e.tm_year+1900)/100|0,2)},"%d":function(e){return m(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return w(e).toString().substring(2)},"%G":function(e){return w(e)},"%H":function(e){return m(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),m(r,2)},"%j":function(e){return m(e.tm_mday+function(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}(es(e.tm_year+1900)?eh:ep,e.tm_mon-1),3)},"%m":function(e){return m(e.tm_mon+1,2)},"%M":function(e){return m(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return m(e.tm_sec,2)},"%t":function(){return" "},"%u":function(e){return e.tm_wday||7},"%U":function(e){return m(Math.floor((e.tm_yday+7-e.tm_wday)/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&es(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&es(e.tm_year%400-1))&&r++}return m(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){return m(Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff;return(r>=0?"+":"-")+String("0000"+(r=(r=Math.abs(r)/60)/60*100+r%60)).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\x00\x00"),g)i.includes(u)&&(i=i.replace(RegExp(u,"g"),g[u](a)));var _=er(i=i.replace(/\0\0/g,"%"),!1);return _.length>r?0:(d.set(_,e),_.length-1)}};!function(){var r,t,o,a={a:ey};function i(r,t){var n,o=r.exports;return o=eg.instrumentWasmExports(o),e.asm=o,l=e.asm.ha,N(),e.asm.qa,n=e.asm.ia,B.unshift(n),G("wasm-instantiate"),o}if(Y("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(a,i)}catch(e){F("Module.instantiateWasm callback failed with error: "+e),n(e)}(r=u,t=v,o=function(e){i(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||X(t)||"function"!=typeof fetch?$(t,a,o):fetch(t,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,a).then(o,function(e){return F("wasm streaming compile failed: "+e),F("falling back to ArrayBuffer instantiation"),$(t,a,o)})})).catch(n)}();var eE=function(){return(eE=e.asm.ja).apply(null,arguments)},eb=function(){return(eb=e.asm.ka).apply(null,arguments)},ek=e._fflush=function(){return(ek=e._fflush=e.asm.la).apply(null,arguments)},eS=e._main=function(){return(eS=e._main=e.asm.ma).apply(null,arguments)},eD=(e._gidispatch_get_game_id=function(){return(e._gidispatch_get_game_id=e.asm.na).apply(null,arguments)},function(){return(eD=e.asm.oa).apply(null,arguments)}),eF=function(){return(eF=e.asm.pa).apply(null,arguments)},eM=function(){return(eM=e.asm.ra).apply(null,arguments)},eA=function(){return(eA=e.asm.sa).apply(null,arguments)},eP=function(){return(eP=e.asm.ta).apply(null,arguments)},ex=function(){return(ex=e.asm.ua).apply(null,arguments)},eR=e.dynCall_iiiii=function(){return(eR=e.dynCall_iiiii=e.asm.va).apply(null,arguments)},eC=e.dynCall_ii=function(){return(eC=e.dynCall_ii=e.asm.wa).apply(null,arguments)},eT=e.dynCall_vi=function(){return(eT=e.dynCall_vi=e.asm.xa).apply(null,arguments)},eN=e.dynCall_iii=function(){return(eN=e.dynCall_iii=e.asm.ya).apply(null,arguments)},ez=e.dynCall_viii=function(){return(ez=e.dynCall_viii=e.asm.za).apply(null,arguments)},eB=e.dynCall_viiiiiiii=function(){return(eB=e.dynCall_viiiiiiii=e.asm.Aa).apply(null,arguments)},ej=e.dynCall_vii=function(){return(ej=e.dynCall_vii=e.asm.Ba).apply(null,arguments)},eO=e.dynCall_viiiii=function(){return(eO=e.dynCall_viiiii=e.asm.Ca).apply(null,arguments)},eI=e.dynCall_iiiiii=function(){return(eI=e.dynCall_iiiiii=e.asm.Da).apply(null,arguments)},eL=e.dynCall_viiiiii=function(){return(eL=e.dynCall_viiiiii=e.asm.Ea).apply(null,arguments)},eU=e.dynCall_iiiiiiiii=function(){return(eU=e.dynCall_iiiiiiiii=e.asm.Fa).apply(null,arguments)},eH=e.dynCall_iiii=function(){return(eH=e.dynCall_iiii=e.asm.Ga).apply(null,arguments)},eW=e.dynCall_viiiiiiiii=function(){return(eW=e.dynCall_viiiiiiiii=e.asm.Ha).apply(null,arguments)},eq=e.dynCall_viiii=function(){return(eq=e.dynCall_viiii=e.asm.Ia).apply(null,arguments)},eY=e.dynCall_iiiiiii=function(){return(eY=e.dynCall_iiiiiii=e.asm.Ja).apply(null,arguments)},eG=e.dynCall_viiiiiiiiiii=function(){return(eG=e.dynCall_viiiiiiiiiii=e.asm.Ka).apply(null,arguments)},eV=e.dynCall_iiiiiiiiii=function(){return(eV=e.dynCall_iiiiiiiiii=e.asm.La).apply(null,arguments)},eX=e.dynCall_iiiiiiii=function(){return(eX=e.dynCall_iiiiiiii=e.asm.Ma).apply(null,arguments)},eK=e.dynCall_iiiiiiiiiii=function(){return(eK=e.dynCall_iiiiiiiiiii=e.asm.Na).apply(null,arguments)},e$=e.dynCall_iiiiiiiiiiiiii=function(){return(e$=e.dynCall_iiiiiiiiiiiiii=e.asm.Oa).apply(null,arguments)},eJ=e.dynCall_v=function(){return(eJ=e.dynCall_v=e.asm.Pa).apply(null,arguments)},eZ=e.dynCall_iiiiiiiiiiiiiiiiii=function(){return(eZ=e.dynCall_iiiiiiiiiiiiiiiiii=e.asm.Qa).apply(null,arguments)},eQ=e.dynCall_viiiiiii=function(){return(eQ=e.dynCall_viiiiiii=e.asm.Ra).apply(null,arguments)},e0=e.dynCall_viiiiiiiiiiiiiii=function(){return(e0=e.dynCall_viiiiiiiiiiiiiii=e.asm.Sa).apply(null,arguments)},e1=e.dynCall_i=function(){return(e1=e.dynCall_i=e.asm.Ta).apply(null,arguments)},e2=e.dynCall_iiiiiiiiiiii=function(){return(e2=e.dynCall_iiiiiiiiiiii=e.asm.Ua).apply(null,arguments)},e4=e.dynCall_iiiiiiiiiiiiiiii=function(){return(e4=e.dynCall_iiiiiiiiiiiiiiii=e.asm.Va).apply(null,arguments)},e6=function(){return(e6=e.asm.Wa).apply(null,arguments)},e3=function(){return(e3=e.asm.Xa).apply(null,arguments)},e9=function(){return(e9=e.asm.Ya).apply(null,arguments)},e8=function(){return(e8=e.asm.Za).apply(null,arguments)};function e5(r=E){!(H>0)&&(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;){var r;r=e.preRun.shift(),z.unshift(r)}Z(z)}(),H>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()));function n(){!_&&(_=!0,e.calledRun=!0,A||(e.noFSInit||eo.init.initialized||eo.init(),eo.ignorePermissions=!1,et.init(),Z(B),Z(j),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e7&&function(e=[]){var r=eS;e.unshift(b);var t=e.length,n=ex((t+1)*4),o=n>>2;e.forEach(e=>{var r,t;h[o++]=(t=ex(r=T(e)+1),C(e,d,t,r),t)}),h[o]=0;try{var a=r(t,n);em(a,!0)}catch(e){return ev(e)}}(r),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r;r=e.postRun.shift(),I.unshift(r)}Z(I)}()))}}if(e.___start_em_js=356528,e.___stop_em_js=359213,e.AsciiToString=function(e){for(var r="";;){var t=f[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}},e.FS=eo,q=function e(){_||e5(),_||(q=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();var e7=!0;return e.noInitialRun&&(e7=!1),e5(),e.ready}),rB={};rB=B("6kBsm").getBundleURL("ejVIo")+B("n9Yfb").resolve("iM1SU");var rj=(s="file:///node_modules/emglken/build/scare-core.js",function(e={}){var r,t,n,o,a,i,u,l,c,d,f,m,h,p,v,w,g,_,e=void 0!==e?e:{};e.ready=new Promise(function(e,r){t=e,n=r});var y=Object.assign({},e),E=[],b="./this.program",k=(e,r)=>{throw r},S="";"undefined"!=typeof document&&document.currentScript&&(S=document.currentScript.src),s&&(S=s),S=0!==S.indexOf("blob:")?S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},a=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(200==n.status||0==n.status&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)};var D=e.print||console.log.bind(console),F=e.printErr||console.warn.bind(console);Object.assign(e,y),y=null,e.arguments&&(E=e.arguments),e.thisProgram&&(b=e.thisProgram),e.quit&&(k=e.quit),e.wasmBinary&&(u=e.wasmBinary);var M=e.noExitRuntime||!1;"object"!=typeof WebAssembly&&G("no native wasm support detected");var A=!1,P=new TextDecoder("utf8");function x(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;return P.decode(e.buffer?e.subarray(r,o):new Uint8Array(e.slice(r,o)))}function R(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function C(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function T(){var r=l.buffer;e.HEAP8=d=new Int8Array(r),e.HEAP16=m=new Int16Array(r),e.HEAP32=h=new Int32Array(r),e.HEAPU8=f=new Uint8Array(r),e.HEAPU16=new Uint16Array(r),e.HEAPU32=p=new Uint32Array(r),e.HEAPF32=new Float32Array(r),e.HEAPF64=new Float64Array(r)}var N=[],z=[],B=[],j=[],O=[],I=!1,L=0,U=0,H=null,W=null;function q(r){U++,e.monitorRunDependencies&&e.monitorRunDependencies(U)}function Y(r){if(U--,e.monitorRunDependencies&&e.monitorRunDependencies(U),0==U&&(null!==H&&(clearInterval(H),H=null),W)){var t=W;W=null,t()}}function G(r){e.onAbort&&e.onAbort(r),F(r="Aborted("+r+")"),A=!0,c=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function V(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e){try{if(e==v&&u)return new Uint8Array(u);if(i)return i(e);throw"both async and sync fetching of the wasm failed"}catch(e){G(e)}}function K(e,r,t){return(u||"function"!=typeof fetch?Promise.resolve().then(function(){return X(e)}):fetch(e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()}).catch(function(){return X(e)})).then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(t,function(e){F("failed to asynchronously prepare wasm: "+e),G(e)})}function $(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function J(r){for(;r.length>0;)r.shift()(e)}e.locateFile?V(v="scare-core.wasm")||(r=v,v=e.locateFile?e.locateFile(r,S):S+r):v=new URL(rB).href;var Z={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Z.isAbs(e),t="/"===e.substr(-1);return(e=Z.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Z.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Z.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Z.normalize(e.join("/"))},join2:(e,r)=>Z.normalize(e+"/"+r)},Q={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:en.cwd();if("string"!=typeof n)throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Z.isAbs(n)}return e=Z.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Q.resolve(e).substr(1),r=Q.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}for(var u=[],s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function ee(e,r,t){var n=Array(t>0?t:C(e)+1),o=R(e,n,0,n.length);return r&&(n.length=o),n}var er={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){er.ttys[e]={input:[],output:[],ops:r},en.registerDevice(e,er.stream_ops)},stream_ops:{open:function(e){var r=er.ttys[e.node.rdev];if(!r)throw new en.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new en.ErrnoError(60);for(var a,i=0,s=0;s<n;s++){try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new en.ErrnoError(29)}if(void 0===a&&0===i)throw new en.ErrnoError(6);if(null==a)break;i++,r[t+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new en.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new en.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=ee(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(D(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(D(x(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(F(x(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(F(x(e.output,0)),e.output=[])}}},et={ops_table:null,mount:function(e){return et.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(en.isBlkdev(t)||en.isFIFO(t))throw new en.ErrnoError(63);et.ops_table||(et.ops_table={dir:{node:{getattr:et.node_ops.getattr,setattr:et.node_ops.setattr,lookup:et.node_ops.lookup,mknod:et.node_ops.mknod,rename:et.node_ops.rename,unlink:et.node_ops.unlink,rmdir:et.node_ops.rmdir,readdir:et.node_ops.readdir,symlink:et.node_ops.symlink},stream:{llseek:et.stream_ops.llseek}},file:{node:{getattr:et.node_ops.getattr,setattr:et.node_ops.setattr},stream:{llseek:et.stream_ops.llseek,read:et.stream_ops.read,write:et.stream_ops.write,allocate:et.stream_ops.allocate,mmap:et.stream_ops.mmap,msync:et.stream_ops.msync}},link:{node:{getattr:et.node_ops.getattr,setattr:et.node_ops.setattr,readlink:et.node_ops.readlink},stream:{}},chrdev:{node:{getattr:et.node_ops.getattr,setattr:et.node_ops.setattr},stream:en.chrdev_stream_ops}});var o=en.createNode(e,r,t,n);return en.isDir(o.mode)?(o.node_ops=et.ops_table.dir.node,o.stream_ops=et.ops_table.dir.stream,o.contents={}):en.isFile(o.mode)?(o.node_ops=et.ops_table.file.node,o.stream_ops=et.ops_table.file.stream,o.usedBytes=0,o.contents=null):en.isLink(o.mode)?(o.node_ops=et.ops_table.link.node,o.stream_ops=et.ops_table.link.stream):en.isChrdev(o.mode)&&(o.node_ops=et.ops_table.chrdev.node,o.stream_ops=et.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}}},node_ops:{getattr:function(e){var r={};return r.dev=en.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,en.isDir(e.mode)?r.size=4096:en.isFile(e.mode)?r.size=e.usedBytes:en.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&et.resizeFileStorage(e,r.size)},lookup:function(e,r){throw en.genericErrors[44]},mknod:function(e,r,t,n){return et.createNode(e,r,t,n)},rename:function(e,r,t){if(en.isDir(e.mode)){var n;try{n=en.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new en.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=en.lookupNode(e,r);for(var n in t.contents)throw new en.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=et.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!en.isLink(e.mode))throw new en.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write:function(e,r,t,n,o,a){if(r.buffer===d.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(et.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&en.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new en.ErrnoError(28);return n},allocate:function(e,r,t){et.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!en.isFile(e.node.mode))throw new en.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==d.buffer)throw(t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,a=void G(),new en.ErrnoError(48);return i=!1,{ptr:a=s.byteOffset,allocated:i}},msync:function(e,r,t,n,o){return et.stream_ops.write(e,r,0,n,t,!1),0}}},en={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=Q.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new en.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=en.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=en.lookupNode(n,t[a]),o=Z.join2(o,t[a]),en.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;en.isLink(n.mode);){var u=en.readlink(o);if(o=Q.resolve(Z.dirname(o),u),n=en.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new en.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(en.isRoot(e)){var t=e.mount.mountpoint;if(!r)return t;return"/"!==t[t.length-1]?t+"/"+r:t+r}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%en.nameTable.length},hashAddNode:e=>{var r=en.hashName(e.parent.id,e.name);e.name_next=en.nameTable[r],en.nameTable[r]=e},hashRemoveNode:e=>{var r=en.hashName(e.parent.id,e.name);if(en.nameTable[r]===e)en.nameTable[r]=e.name_next;else for(var t=en.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=en.mayLookup(e);if(t)throw new en.ErrnoError(t,e);for(var n=en.hashName(e.id,r),o=en.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return en.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new en.FSNode(e,r,t,n);return en.hashAddNode(o),o},destroyNode:e=>{en.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=en.flagModes[e];if(void 0===r)throw Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>en.ignorePermissions?0:r.includes("r")&&!(292&e.mode)||r.includes("w")&&!(146&e.mode)||r.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>en.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return en.lookupNode(e,r),20}catch(e){}return en.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{try{n=en.lookupNode(e,r)}catch(e){return e.errno}var n,o=en.nodePermissions(e,"wx");if(o)return o;if(t){if(!en.isDir(n.mode))return 54;if(en.isRoot(n)||en.getPath(n)===en.cwd())return 10}else if(en.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?en.isLink(e.mode)?32:en.isDir(e.mode)&&("r"!==en.flagsToPermissionString(r)||512&r)?31:en.nodePermissions(e,en.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=en.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!en.streams[t])return t;throw new en.ErrnoError(33)},getStream:e=>en.streams[e],createStream:(e,r,t)=>{en.FSStream||(en.FSStream=function(){this.shared={}},en.FSStream.prototype={},Object.defineProperties(en.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return(2097155&this.flags)!=1}},isWrite:{get:function(){return(2097155&this.flags)!=0}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new en.FSStream,e);var n=en.nextfd(r,t);return e.fd=n,en.streams[n]=e,e},closeStream:e=>{en.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=en.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new en.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{en.devices[e]={stream_ops:r}},getDevice:e=>en.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),en.syncFSRequests++,en.syncFSRequests>1&&F("warning: "+en.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=en.getMounts(en.root.mount),n=0;function o(e){return en.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&en.root)throw new en.ErrnoError(10);if(!o&&!a){var i=en.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,en.isMountpoint(n))throw new en.ErrnoError(10);if(!en.isDir(n.mode))throw new en.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?en.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=en.lookupPath(e,{follow_mount:!1});if(!en.isMountpoint(r.node))throw new en.ErrnoError(28);var t=r.node,n=t.mounted,o=en.getMounts(n);Object.keys(en.nameTable).forEach(e=>{for(var r=en.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&en.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=en.lookupPath(e,{parent:!0}).node,o=Z.basename(e);if(!o||"."===o||".."===o)throw new en.ErrnoError(28);var a=en.mayCreate(n,o);if(a)throw new en.ErrnoError(a);if(!n.node_ops.mknod)throw new en.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=(void 0!==r?r:438)&4095|32768,en.mknod(e,r,0)),mkdir:(e,r)=>(r=(void 0!==r?r:511)&1023|16384,en.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{en.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,en.mknod(e,r,t)),symlink:(e,r)=>{if(!Q.resolve(e))throw new en.ErrnoError(44);var t=en.lookupPath(r,{parent:!0}).node;if(!t)throw new en.ErrnoError(44);var n=Z.basename(r),o=en.mayCreate(t,n);if(o)throw new en.ErrnoError(o);if(!t.node_ops.symlink)throw new en.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o,a=Z.dirname(e),i=Z.dirname(r),s=Z.basename(e),u=Z.basename(r);if(t=en.lookupPath(e,{parent:!0}).node,n=en.lookupPath(r,{parent:!0}).node,!t||!n)throw new en.ErrnoError(44);if(t.mount!==n.mount)throw new en.ErrnoError(75);var l=en.lookupNode(t,s),c=Q.relative(e,i);if("."!==c.charAt(0))throw new en.ErrnoError(28);if("."!==(c=Q.relative(r,a)).charAt(0))throw new en.ErrnoError(55);try{o=en.lookupNode(n,u)}catch(e){}if(l!==o){var d=en.isDir(l.mode),f=en.mayDelete(t,s,d);if(f||(f=o?en.mayDelete(n,u,d):en.mayCreate(n,u)))throw new en.ErrnoError(f);if(!t.node_ops.rename)throw new en.ErrnoError(63);if(en.isMountpoint(l)||o&&en.isMountpoint(o))throw new en.ErrnoError(10);if(n!==t&&(f=en.nodePermissions(t,"w")))throw new en.ErrnoError(f);en.hashRemoveNode(l);try{t.node_ops.rename(l,n,u)}catch(e){throw e}finally{en.hashAddNode(l)}}},rmdir:e=>{var r=en.lookupPath(e,{parent:!0}).node,t=Z.basename(e),n=en.lookupNode(r,t),o=en.mayDelete(r,t,!0);if(o)throw new en.ErrnoError(o);if(!r.node_ops.rmdir)throw new en.ErrnoError(63);if(en.isMountpoint(n))throw new en.ErrnoError(10);r.node_ops.rmdir(r,t),en.destroyNode(n)},readdir:e=>{var r=en.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new en.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=en.lookupPath(e,{parent:!0}).node;if(!r)throw new en.ErrnoError(44);var t=Z.basename(e),n=en.lookupNode(r,t),o=en.mayDelete(r,t,!1);if(o)throw new en.ErrnoError(o);if(!r.node_ops.unlink)throw new en.ErrnoError(63);if(en.isMountpoint(n))throw new en.ErrnoError(10);r.node_ops.unlink(r,t),en.destroyNode(n)},readlink:e=>{var r=en.lookupPath(e).node;if(!r)throw new en.ErrnoError(44);if(!r.node_ops.readlink)throw new en.ErrnoError(28);return Q.resolve(en.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=en.lookupPath(e,{follow:!r}).node;if(!t)throw new en.ErrnoError(44);if(!t.node_ops.getattr)throw new en.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>en.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?en.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new en.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{en.chmod(e,r,!0)},fchmod:(e,r)=>{var t=en.getStream(e);if(!t)throw new en.ErrnoError(8);en.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?en.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new en.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{en.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=en.getStream(e);if(!n)throw new en.ErrnoError(8);en.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new en.ErrnoError(28);if("string"==typeof e){var t;t=en.lookupPath(e,{follow:!0}).node}else t=e;if(!t.node_ops.setattr)throw new en.ErrnoError(63);if(en.isDir(t.mode))throw new en.ErrnoError(31);if(!en.isFile(t.mode))throw new en.ErrnoError(28);var n=en.nodePermissions(t,"w");if(n)throw new en.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=en.getStream(e);if(!t)throw new en.ErrnoError(8);if((2097155&t.flags)==0)throw new en.ErrnoError(28);en.truncate(t.node,r)},utime:(e,r,t)=>{var n=en.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(r,t,n)=>{if(""===r)throw new en.ErrnoError(44);if(t="string"==typeof t?en.modeStringToFlags(t):t,n=void 0===n?438:n,n=64&t?4095&n|32768:0,"object"==typeof r)o=r;else{r=Z.normalize(r);try{var o;o=en.lookupPath(r,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t){if(o){if(128&t)throw new en.ErrnoError(20)}else o=en.mknod(r,n,0),a=!0}if(!o)throw new en.ErrnoError(44);if(en.isChrdev(o.mode)&&(t&=-513),65536&t&&!en.isDir(o.mode))throw new en.ErrnoError(54);if(!a){var i=en.mayOpen(o,t);if(i)throw new en.ErrnoError(i)}512&t&&!a&&en.truncate(o,0),t&=-131713;var s=en.createStream({node:o,path:en.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!e.logReadFiles||1&t||(en.readFiles||(en.readFiles={}),r in en.readFiles||(en.readFiles[r]=1)),s},close:e=>{if(en.isClosed(e))throw new en.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{en.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(en.isClosed(e))throw new en.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new en.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new en.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new en.ErrnoError(28);if(en.isClosed(e)||(2097155&e.flags)==1)throw new en.ErrnoError(8);if(en.isDir(e.node.mode))throw new en.ErrnoError(31);if(!e.stream_ops.read)throw new en.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new en.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new en.ErrnoError(28);if(en.isClosed(e)||(2097155&e.flags)==0)throw new en.ErrnoError(8);if(en.isDir(e.node.mode))throw new en.ErrnoError(31);if(!e.stream_ops.write)throw new en.ErrnoError(28);e.seekable&&1024&e.flags&&en.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new en.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate:(e,r,t)=>{if(en.isClosed(e))throw new en.ErrnoError(8);if(r<0||t<=0)throw new en.ErrnoError(28);if((2097155&e.flags)==0)throw new en.ErrnoError(8);if(!en.isFile(e.node.mode)&&!en.isDir(e.node.mode))throw new en.ErrnoError(43);if(!e.stream_ops.allocate)throw new en.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if((2&n)!=0&&(2&o)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new en.ErrnoError(2);if(!e.stream_ops.mmap)throw new en.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new en.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw Error('Invalid encoding type "'+r.encoding+'"');var t,n=en.open(e,r.flags),o=en.stat(e).size,a=new Uint8Array(o);return en.read(n,a,0,o,0),"utf8"===r.encoding?t=x(a,0):"binary"===r.encoding&&(t=a),en.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=en.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(C(r)+1),a=R(r,o,0,o.length);en.write(n,o,0,a,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))en.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw Error("Unsupported data type");en.close(n)},cwd:()=>en.currentPath,chdir:e=>{var r=en.lookupPath(e,{follow:!0});if(null===r.node)throw new en.ErrnoError(44);if(!en.isDir(r.node.mode))throw new en.ErrnoError(54);var t=en.nodePermissions(r.node,"x");if(t)throw new en.ErrnoError(t);en.currentPath=r.path},createDefaultDirectories:()=>{en.mkdir("/tmp"),en.mkdir("/home"),en.mkdir("/home/web_user")},createDefaultDevices:()=>{en.mkdir("/dev"),en.registerDevice(en.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),en.mkdev("/dev/null",en.makedev(1,3)),er.register(en.makedev(5,0),er.default_tty_ops),er.register(en.makedev(6,0),er.default_tty1_ops),en.mkdev("/dev/tty",en.makedev(5,0)),en.mkdev("/dev/tty1",en.makedev(6,0));var e=function(){if("object"!=typeof crypto||"function"!=typeof crypto.getRandomValues)return()=>G("randomDevice");var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}();en.createDevice("/dev","random",e),en.createDevice("/dev","urandom",e),en.mkdir("/dev/shm"),en.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{en.mkdir("/proc");var e=en.mkdir("/proc/self");en.mkdir("/proc/self/fd"),en.mount({mount:()=>{var r=en.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=en.getStream(+r);if(!t)throw new en.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return n.parent=n,n}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?en.createDevice("/dev","stdin",e.stdin):en.symlink("/dev/tty","/dev/stdin"),e.stdout?en.createDevice("/dev","stdout",null,e.stdout):en.symlink("/dev/tty","/dev/stdout"),e.stderr?en.createDevice("/dev","stderr",null,e.stderr):en.symlink("/dev/tty1","/dev/stderr"),en.open("/dev/stdin",0),en.open("/dev/stdout",1),en.open("/dev/stderr",1)},ensureErrnoError:()=>{en.ErrnoError||(en.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},en.ErrnoError.prototype=Error(),en.ErrnoError.prototype.constructor=en.ErrnoError,[44].forEach(e=>{en.genericErrors[e]=new en.ErrnoError(e),en.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{en.ensureErrnoError(),en.nameTable=Array(4096),en.mount(et,{},"/"),en.createDefaultDirectories(),en.createDefaultDevices(),en.createSpecialDirectories(),en.filesystems={MEMFS:et}},init:(r,t,n)=>{en.init.initialized=!0,en.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=t||e.stdout,e.stderr=n||e.stderr,en.createStandardStreams()},quit:()=>{en.init.initialized=!1,ev(0);for(var e=0;e<en.streams.length;e++){var r=en.streams[e];r&&en.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=en.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=en.lookupPath(e,{follow:!r});e=t.path}catch(e){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=en.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=Z.basename(e),t=en.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(e){n.error=e.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:en.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Z.join2(e,a);try{en.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,r,t,n,o)=>{var a=Z.join2("string"==typeof e?e:en.getPath(e),r),i=en.getMode(n,o);return en.create(a,i)},createDataFile:(e,r,t,n,o,a)=>{var i=r;e&&(e="string"==typeof e?e:en.getPath(e),i=r?Z.join2(e,r):e);var s=en.getMode(n,o),u=en.create(i,s);if(t){if("string"==typeof t){for(var l=Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}en.chmod(u,146|s);var f=en.open(u,577);en.write(f,t,0,t.length,0,a),en.close(f),en.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=Z.join2("string"==typeof e?e:en.getPath(e),r),a=en.getMode(!!t,!!n);en.createDevice.major||(en.createDevice.major=64);var i=en.makedev(en.createDevice.major++,0);return en.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var i,s=0,u=0;u<o;u++){try{i=t()}catch(e){throw new en.ErrnoError(29)}if(void 0===i&&0===s)throw new en.ErrnoError(6);if(null==i)break;s++,r[n+u]=i}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new en.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),en.mkdev(o,a,i)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(o)try{e.contents=ee(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new en.ErrnoError(29)}else throw Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1)&&!(e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e,r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw Error("Couldn't load "+t+". Status: "+r.status);var n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ee(o.responseText||"",!0)},u=this;u.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw Error("doXHR failed!");return u.chunks[e]}),(a||!n)&&(i=n=1,i=n=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i;throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"}var i={isDevice:!1,url:t},s=en.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(var s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach(e=>{var r=s.stream_ops[e];u[e]=function(){return en.forceLoadFile(s),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(en.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{en.forceLoadFile(s);var a=void G();if(!a)throw new en.ErrnoError(48);return l(e,d,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s},createPreloadedFile:(e,r,t,n,o,i,s,u,l,c)=>{var d,f,m=r?Q.resolve(Z.join2(e,r)):e,h="cp "+m;function p(t){function a(t){c&&c(),u||en.createDataFile(e,r,t,n,o,l),i&&i(),Y(h)}Browser.handledByPreloadPlugin(t,m,a,()=>{s&&s(),Y(h)})||a(t)}q(h),"string"==typeof t?(d=e=>p(e),f="al "+t,a(t,e=>{var r;r='Loading data file "'+t+'" failed (no arrayBuffer).',e||G(r),d(new Uint8Array(e)),f&&Y(f)},e=>{if(s)s();else throw'Loading data file "'+t+'" failed.'}),f&&q(f)):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r=()=>{},t=()=>{})=>{var n=en.indexedDB();try{var o=n.open(en.DB_NAME(),en.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{D("creating db"),o.result.createObjectStore(en.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([en.DB_STORE_NAME],"readwrite"),a=n.objectStore(en.DB_STORE_NAME),i=0,s=0,u=e.length;function l(){0==s?r():t()}e.forEach(e=>{var r=a.put(en.analyzePath(e).object.contents,e);r.onsuccess=()=>{++i+s==u&&l()},r.onerror=()=>{i+ ++s==u&&l()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r=()=>{},t=()=>{})=>{var n=en.indexedDB();try{var o=n.open(en.DB_NAME(),en.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([en.DB_STORE_NAME],"readonly")}catch(e){t(e);return}var i=a.objectStore(en.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach(e=>{var r=i.get(e);r.onsuccess=()=>{en.analyzePath(e).exists&&en.unlink(e),en.createDataFile(Z.dirname(e),Z.basename(e),r.result,!0,!0,!0),++s+u==l&&c()},r.onerror=()=>{s+ ++u==l&&c()}}),a.onerror=t},o.onerror=t}},eo={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(Z.isAbs(r))return r;if(-100===e)n=en.cwd();else{var n;n=eo.getStreamFromFD(e).path}if(0==r.length){if(!t)throw new en.ErrnoError(44);return n}return Z.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Z.normalize(r)!==Z.normalize(en.getPath(e.node)))return -54;throw e}h[t>>2]=n.dev,h[t+8>>2]=n.ino,h[t+12>>2]=n.mode,p[t+16>>2]=n.nlink,h[t+20>>2]=n.uid,h[t+24>>2]=n.gid,h[t+28>>2]=n.rdev,g=[n.size>>>0,+Math.abs(w=n.size)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+40>>2]=g[0],h[t+44>>2]=g[1],h[t+48>>2]=4096,h[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return g=[Math.floor(o/1e3)>>>0,+Math.abs(w=Math.floor(o/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+56>>2]=g[0],h[t+60>>2]=g[1],p[t+64>>2]=o%1e3*1e3,g=[Math.floor(a/1e3)>>>0,+Math.abs(w=Math.floor(a/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+72>>2]=g[0],h[t+76>>2]=g[1],p[t+80>>2]=a%1e3*1e3,g=[Math.floor(i/1e3)>>>0,+Math.abs(w=Math.floor(i/1e3))>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+88>>2]=g[0],h[t+92>>2]=g[1],p[t+96>>2]=i%1e3*1e3,g=[n.ino>>>0,+Math.abs(w=n.ino)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0],h[t+104>>2]=g[0],h[t+108>>2]=g[1],0},doMsync:function(e,r,t,n,o){if(!en.isFile(r.node.mode))throw new en.ErrnoError(43);if(2&n)return 0;var a=f.slice(e,e+t);en.msync(r,a,o,t,n)},varargs:void 0,get:function(){return eo.varargs+=4,h[eo.varargs-4>>2]},getStr:function(e){return function(e,r){if(!e)return"";for(var t=e+void 0,n=e;!(n>=t)&&f[n];)++n;return P.decode(f.subarray(e,n))}(e)},getStreamFromFD:function(e){var r=en.getStream(e);if(!r)throw new en.ErrnoError(8);return r}},ea={};function ei(){if(!ei.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:b||"./this.program"};for(var r in ea)void 0===ea[r]?delete e[r]:e[r]=ea[r];var t=[];for(var r in e)t.push(r+"="+e[r]);ei.strings=t}return ei.strings}function es(r,t){c=r,M||L>0||(eg(),J(j),en.quit(),er.shutdown(),I=!0),c=r,M||L>0||(e.onExit&&e.onExit(r),A=!0),k(r,new $(r))}function eu(e){if(e instanceof $||"unwind"==e)return c;k(1,e)}function el(e){try{return e()}catch(e){G(e)}}var ec={instrumentWasmImports:function(e){var r=["invoke_*","emscripten_sleep","emscripten_wget","emscripten_wget_data","emscripten_idb_load","emscripten_idb_store","emscripten_idb_delete","emscripten_idb_exists","emscripten_idb_load_blob","emscripten_idb_store_blob","SDL_Delay","emscripten_scan_registers","emscripten_lazy_load_code","emscripten_fiber_swap","__load_secondary_module","fd_sync","__wasi_fd_sync","_emval_await","_dlopen_js","__asyncjs__*"];for(var t in e)!function(t){var n=e[t];n.sig,"function"==typeof n&&(r.indexOf(t)>=0||t.startsWith("__asyncjs__"))}(t)},instrumentWasmExports:function(e){var r={};for(var t in e)!function(t){var n=e[t];"function"==typeof n?r[t]=function(){ec.exportCallStack.push(t);try{return n.apply(null,arguments)}finally{A||(ec.exportCallStack.pop()===t||G(void 0),ec.maybeStopUnwind())}}:r[t]=n}(t);return r},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:8192,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(e){var r=ec.callStackNameToId[e];return void 0===r&&(r=ec.callStackId++,ec.callStackNameToId[e]=r,ec.callStackIdToName[r]=e),r},maybeStopUnwind:function(){ec.currData&&ec.state===ec.State.Unwinding&&0===ec.exportCallStack.length&&(ec.state=ec.State.Normal,L+=1,el(eN),"undefined"!=typeof Fibers&&Fibers.trampoline())},whenDone:function(){return new Promise((e,r)=>{ec.asyncPromiseHandlers={resolve:e,reject:r}})},allocateData:function(){var e=eh(12+ec.StackSize);return ec.setDataHeader(e,e+12,ec.StackSize),ec.setDataRewindFunc(e),e},setDataHeader:function(e,r,t){h[e>>2]=r,h[e+4>>2]=r+t},setDataRewindFunc:function(e){var r=ec.exportCallStack[0],t=ec.getCallStackId(r);h[e+8>>2]=t},getDataRewindFunc:function(r){var t=h[r+8>>2],n=ec.callStackIdToName[t];return e.asm[n]},doRewind:function(e){var r=ec.getDataRewindFunc(e);return L-=1,r()},handleSleep:function(e){if(!A){if(ec.state===ec.State.Normal){var r=!1,t=!1;e((e=0)=>{if(!A&&(ec.handleSleepReturnValue=e,r=!0,t)){ec.state=ec.State.Rewinding,el(()=>ez(ec.currData)),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,o=!1;try{n=ec.doRewind(ec.currData)}catch(e){n=e,o=!0}var a=!1;if(!ec.currData){var i=ec.asyncPromiseHandlers;i&&(ec.asyncPromiseHandlers=null,(o?i.reject:i.resolve)(n),a=!0)}if(o&&!a)throw n}}),t=!0,r||(ec.state=ec.State.Unwinding,ec.currData=ec.allocateData(),"undefined"!=typeof Browser&&Browser.mainLoop.func&&Browser.mainLoop.pause(),el(()=>eT(ec.currData)))}else ec.state===ec.State.Rewinding?(ec.state=ec.State.Normal,el(eB),em(ec.currData),ec.currData=null,ec.sleepCallbacks.forEach(e=>(function(e){if(!I&&!A)try{e(),function(){if(!(M||L>0))try{es(c)}catch(e){eu(e)}}()}catch(e){eu(e)}})(e))):G("invalid state: "+ec.state);return ec.handleSleepReturnValue}},handleAsync:function(e){return ec.handleSleep(r=>{e().then(r)})}},ed=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=en.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(ed.prototype,{read:{get:function(){return(365&this.mode)==365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(146&this.mode)==146},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return en.isDir(this.mode)}},isDevice:{get:function(){return en.isChrdev(this.mode)}}}),en.FSNode=ed,en.staticInit();var ef={s:function(r,t){return ec.handleAsync(async()=>{e.emglken_stdin_buffers.length||await new Promise(r=>{e.emglken_stdin_ready=r});let n=e.emglken_stdin_buffers.shift(),o=Math.min(n.length,t);return o==n.length?f.set(n,r):(f.set(n.subarray(0,o),r),e.emglken_stdin_buffers.unshift(n.subarray(o))),o})},D:function(e,r,t,n){try{if(r=eo.getStr(r),r=eo.calculateAt(e,r),-8&t)return -28;var o=en.lookupPath(r,{follow:!0}).node;if(!o)return -44;var a="";if(4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&en.nodePermissions(o,a))return -2;return 0}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},n:function(e,r,t){eo.varargs=t;try{var n=eo.getStreamFromFD(e);switch(r){case 0:var o=eo.get();if(o<0)return -28;return en.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=eo.get();return n.flags|=o,0;case 5:var o=eo.get();return m[o+0>>1]=2,0;case 16:case 8:default:return -28;case 9:return h[ew()>>2]=28,-1}}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},C:function(e,r){try{if(0===r)return -28;var t=en.cwd(),n=C(t)+1;if(r<n)return -68;return R(t,f,e,r),n}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},B:function(e,r,t){eo.varargs=t;try{var n=eo.getStreamFromFD(e);switch(r){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:if(!n.tty)return -59;return 0;case 21519:if(!n.tty)return -59;var o=eo.get();return h[o>>2]=0,0;case 21520:if(!n.tty)return -59;return -28;case 21531:var o=eo.get();return en.ioctl(n,r,o);default:return -28}}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},A:function(e,r,t,n){eo.varargs=n;try{r=eo.getStr(r),r=eo.calculateAt(e,r);var o=n?eo.get():0;return en.open(r,t,o).fd}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},z:function(e,r){try{return e=eo.getStr(e),eo.doStat(en.stat,e,r)}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return-e.errno}},v:function(){return!0},u:function(){throw 1/0},t:function(){G("")},k:function(){return Date.now()},r:function(e,r,t){f.copyWithin(e,r,r+t)},q:function(e){var r=f.length;if((e>>>=0)>2147483648)return!1;let t=(e,r)=>e+(r-e%r)%r;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);if(o=Math.min(o,e+100663296),function(e){var r=l.buffer;try{return l.grow(e-r.byteLength+65535>>>16),T(),1}catch(e){}}(Math.min(2147483648,t(Math.max(e,o),65536))))return!0}return!1},y:function(e,r){var t=0;return ei().forEach(function(n,o){var a=r+t;p[e+4*o>>2]=a,function(e,r,t){for(var n=0;n<e.length;++n)d[r++>>0]=e.charCodeAt(n);d[r>>0]=0}(n,a),t+=n.length+1}),0},x:function(e,r){var t=ei();p[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),p[r>>2]=n,0},i:es,m:function(e){try{var r=eo.getStreamFromFD(e);return en.close(r),0}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=eo.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=en.read(e,d,i,s,n);if(u<0)return -1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return e.errno}},p:function(e,r,t,n,o){try{var a=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(a))return 61;var i=eo.getStreamFromFD(e);return en.llseek(i,a,n),g=[i.position>>>0,(w=i.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],h[o>>2]=g[0],h[o+4>>2]=g[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return e.errno}},l:function(e,r,t,n){try{var o=eo.getStreamFromFD(e),a=function(e,r,t,n){for(var o=0,a=0;a<t;a++){var i=p[r>>2],s=p[r+4>>2];r+=8;var u=en.write(e,d,i,s,n);if(u<0)return -1;o+=u,void 0!==n&&(n+=u)}return o}(o,r,t);return p[n>>2]=a,0}catch(e){if(void 0===en||"ErrnoError"!==e.name)throw e;return e.errno}},c:function(e){var r=ey();try{return eM(e)}catch(e){if(eE(r),e!==e+0)throw e;e_(1,0)}},g:function(e,r){var t=ey();try{return eD(e,r)}catch(e){if(eE(t),e!==e+0)throw e;e_(1,0)}},f:function(e,r,t,n){var o=ey();try{return eS(e,r,t,n)}catch(e){if(eE(o),e!==e+0)throw e;e_(1,0)}},d:function(e,r,t,n,o){var a=ey();try{return eP(e,r,t,n,o)}catch(e){if(eE(a),e!==e+0)throw e;e_(1,0)}},o:function(e,r){var t=ey();try{return eC(e,r)}catch(e){if(eE(t),e!==e+0)throw e;e_(1,0)}},j:function(e){var r=ey();try{eA(e)}catch(e){if(eE(r),e!==e+0)throw e;e_(1,0)}},b:function(e,r){var t=ey();try{ek(e,r)}catch(e){if(eE(t),e!==e+0)throw e;e_(1,0)}},a:function(e,r,t){var n=ey();try{eF(e,r,t)}catch(e){if(eE(n),e!==e+0)throw e;e_(1,0)}},h:function(e,r,t,n){var o=ey();try{ex(e,r,t,n)}catch(e){if(eE(o),e!==e+0)throw e;e_(1,0)}},e:function(e,r,t,n,o){var a=ey();try{eR(e,r,t,n,o)}catch(e){if(eE(a),e!==e+0)throw e;e_(1,0)}}};!function(){var r,t,o,a={a:ef};function i(r,t){var n,o=r.exports;return o=ec.instrumentWasmExports(o),e.asm=o,l=e.asm.E,T(),e.asm.N,n=e.asm.F,z.unshift(n),Y("wasm-instantiate"),o}if(q("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(a,i)}catch(e){F("Module.instantiateWasm callback failed with error: "+e),n(e)}(r=u,t=v,o=function(e){i(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||V(t)||"function"!=typeof fetch?K(t,a,o):fetch(t,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,a).then(o,function(e){return F("wasm streaming compile failed: "+e),F("falling back to ArrayBuffer instantiation"),K(t,a,o)})})).catch(n)}();var em=function(){return(em=e.asm.G).apply(null,arguments)},eh=function(){return(eh=e.asm.H).apply(null,arguments)},ep=e._main=function(){return(ep=e._main=e.asm.I).apply(null,arguments)},ev=(e._gidispatch_get_game_id=function(){return(e._gidispatch_get_game_id=e.asm.J).apply(null,arguments)},e._fflush=function(){return(ev=e._fflush=e.asm.K).apply(null,arguments)}),ew=function(){return(ew=e.asm.L).apply(null,arguments)},eg=function(){return(eg=e.asm.M).apply(null,arguments)},e_=function(){return(e_=e.asm.O).apply(null,arguments)},ey=function(){return(ey=e.asm.P).apply(null,arguments)},eE=function(){return(eE=e.asm.Q).apply(null,arguments)},eb=function(){return(eb=e.asm.R).apply(null,arguments)},ek=e.dynCall_vi=function(){return(ek=e.dynCall_vi=e.asm.S).apply(null,arguments)},eS=e.dynCall_iiii=function(){return(eS=e.dynCall_iiii=e.asm.T).apply(null,arguments)},eD=e.dynCall_ii=function(){return(eD=e.dynCall_ii=e.asm.U).apply(null,arguments)},eF=e.dynCall_vii=function(){return(eF=e.dynCall_vii=e.asm.V).apply(null,arguments)},eM=e.dynCall_i=function(){return(eM=e.dynCall_i=e.asm.W).apply(null,arguments)},eA=e.dynCall_v=function(){return(eA=e.dynCall_v=e.asm.X).apply(null,arguments)},eP=e.dynCall_iiiii=function(){return(eP=e.dynCall_iiiii=e.asm.Y).apply(null,arguments)},ex=e.dynCall_viii=function(){return(ex=e.dynCall_viii=e.asm.Z).apply(null,arguments)},eR=e.dynCall_viiii=function(){return(eR=e.dynCall_viiii=e.asm._).apply(null,arguments)},eC=e.dynCall_ji=function(){return(eC=e.dynCall_ji=e.asm.$).apply(null,arguments)},eT=function(){return(eT=e.asm.aa).apply(null,arguments)},eN=function(){return(eN=e.asm.ba).apply(null,arguments)},ez=function(){return(ez=e.asm.ca).apply(null,arguments)},eB=function(){return(eB=e.asm.da).apply(null,arguments)};function ej(r=E){!(U>0)&&(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;){var r;r=e.preRun.shift(),N.unshift(r)}J(N)}(),U>0||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()));function n(){!_&&(_=!0,e.calledRun=!0,A||(e.noFSInit||en.init.initialized||en.init(),en.ignorePermissions=!1,er.init(),J(z),J(B),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),eO&&function(e=[]){var r=ep;e.unshift(b);var t=e.length,n=eb((t+1)*4),o=n>>2;e.forEach(e=>{var r,t;h[o++]=(t=eb(r=C(e)+1),R(e,d,t,r),t)}),h[o]=0;try{var a=r(t,n);es(a,!0)}catch(e){return eu(e)}}(r),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var r;r=e.postRun.shift(),O.unshift(r)}J(O)}()))}}if(e.___start_em_js=107504,e.___stop_em_js=110189,e.AsciiToString=function(e){for(var r="";;){var t=f[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}},e.FS=en,W=function e(){_||ej(),_||(W=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();var eO=!0;return e.noInitialRun&&(eO=!1),ej(),e.ready});let rO=[{id:"bocfel",extensions:/z([3458]|blorb)$/,engine:class extends rM{default_options(){return{vmcore:rP}}}},{id:"git",extensions:/(gblorb|ulx)$/,engine:class extends rM{default_options(){return{vmcore:rR}}}},{id:"hugo",extensions:/hex$/,engine:class extends rM{default_options(){return{vmcore:rT}}}},{id:"scare",extensions:/taf$/,engine:class extends rM{default_options(){return{vmcore:rj}}}},{id:"tads",extensions:/(gam|t3)$/,engine:class extends rM{default_options(){return{vmcore:rz}}}}],rI=e=>{let r=rO.find(r=>r.extensions.test(e));if(r)return{...r,wasmBinaryName:`emglken/${r.id}-core.wasm`};throw Error("Unsupported file type")};var rL=class{constructor(e,r){this.streaming=!1,this.handlers=e,this.loggers=r}file_ref_exists({usage:e}){return"save"===e}file_remove_ref(){return!0}file_construct_ref(e,r){return{filename:e,usage:r||""}}file_read(e,r){return this.handlers.onFileRead(e,r)}file_write(e,r,t){0!==r.length&&this.handlers.onFileWrite(e,r,t)}open(e,r,t,n){this.handlers.onFileNameRequest(e,r,t,n)}log(e){this.loggers.log(e)}warning(e){this.loggers.warn(e)}error(e){this.loggers.error(e)}},rU=class{constructor({width:e,height:r}){this.width=e,this.height=r,this.current_metrics=null,this.disabled=!1,this.generation=0,this.interface=null,this.version="0.5.1"}measure_window(){return{width:this.width,height:this.height,buffercharheight:1,buffercharwidth:1,buffermarginx:0,buffermarginy:0,graphicsmarginx:0,graphicsmarginy:0,gridcharheight:1,gridcharwidth:1,gridmarginx:0,gridmarginy:0,inspacingx:0,inspacingy:0,outspacingx:0,outspacingy:0}}getinterface(){return this.interface}init(e){e||this.error("No game interface object has been provided."),e.accept||this.error("The game interface object must have an accept() function."),this.interface=e,this.current_metrics=this.measure_window(),this.send_response("init",null,this.current_metrics)}update(e){if("error"===e.type&&this.error(e.message),"pass"!==e.type){if("update"!==e.type&&"exit"!==e.type){this.log(`Ignoring unknown message type: ${e.type}`);return}if(e.gen===this.generation){this.log(`Ignoring repeated generation number: ${e.gen}`);return}if(e.gen<this.generation){this.log(`Ignoring out-of-order generation number: got ${e.gen}, currently at ${this.generation}`);return}this.generation=e.gen,this.disabled&&this.disable(!1),null!=e.input&&this.cancel_inputs(e.input),null!=e.windows&&this.update_windows(e.windows),null!=e.content&&e.content.length&&this.update_content(e.content),null!=e.input&&this.update_inputs(e.input),this.disabled=!1,(e.disabled||e.specialinput)&&this.disable(!0),null!=e.specialinput&&this.accept_specialinput(e.specialinput),"exit"===e.type&&this.exit()}}send_response(e,r,t,n){let o={type:e,gen:this.generation};r&&(o.window=r.id),("init"===e||"arrange"===e)&&(o.metrics=t),"init"===e&&(o.support=this.support()),"char"===e&&(o.value=t),"line"===e&&(o.value=t),"specialresponse"===e&&(o.response=t,o.value=n),this.interface.accept(o)}support(){return[]}},rH=class extends rU{constructor(e,r,t){super(t),this.handlers=e,this.loggers=r}sendFn(e,r,t){this.send_response(r,t,e)}init(e){this.handlers.onInit(),super.init(e)}update_inputs(e){if(!e.length)return[];this.handlers.onUpdateInputs(e)}accept_specialinput(e){"fileref_prompt"===e.type?this.interface.Dialog.open("read"!==e.filemode,e.filetype,e.gameid,e=>this.send_response("specialresponse",null,"fileref_prompt",e)):this.error("Request for unknown special input type: "+e.type)}update_content(e){this.handlers.onUpdateContent(e)}exit(){this.handlers.onExit(),super.exit()}cancel_inputs(e){this.handlers.onUpdateInputs(e)}disable(e){this.handlers.onDisable(e)}update_windows(e){this.handlers.onUpdateWindows(e)}log(e){this.loggers.log(e)}warning(e){this.loggers.warn(e)}error(e){this.loggers.error(e)}};let rW=()=>void 0,rq=["onInit","onUpdateWindows","onUpdateInputs","onUpdateContent","onDisable","onFileNameRequest","onFileRead","onFileWrite","onExit"].reduce((e,r)=>(e[r]=rW,e),{}),rY={log:console.log,warning:console.warn,error:console.error},rG={width:80,height:25};var rV=(e,{loggers:r,size:t}={})=>{let n=Object.assign({},rq,e),o=Object.assign({},rY,r),a=Object.assign({},rG,t),i=new rL(n,o),s=new rH(n,o,a),u=s.sendFn.bind(s);return{Dialog:i,GlkOte:s,send:u}},rX={};function rK({style:e,text:r}){let t=ew("span",{className:[rX.message,rX[e]].join(" "),children:r});return({grid:r?.length>0?ew("div",{children:r}):ew("br",{}),input:ew("span",{className:[rX.message,rX.input].join(" "),children:["> ",r]}),subheader:ew("strong",{className:[rX.message,rX.subheader].join(" "),children:r}),emphasized:ew("em",{className:[rX.message,rX.emphasized].join(" "),children:r}),scrollTarget:ew("div",{className:[rX.scrollTarget,e].join(" ")}),endOfLine:ew("br",{})})[e]||t}e(rX,"emphasized",function(){return _},function(e){return _=e}),e(rX,"input",function(){return y},function(e){return y=e}),e(rX,"message",function(){return E},function(e){return E=e}),e(rX,"scrollTarget",function(){return b},function(e){return b=e}),e(rX,"subheader",function(){return k},function(e){return k=e}),_="hBGgUq_emphasized",y="hBGgUq_input",E="hBGgUq_message",b="hBGgUq_scrollTarget",k="hBGgUq_subheader",S="PwGQsW_buffer",D="PwGQsW_gridBuffer";let r$={style:"endOfLine"},rJ={style:"scrollTarget"},rZ=e=>e.height<5,rQ=e=>e.length<1?e:">"===e.slice(-1)[0].text?e.slice(0,e.length-1):e,r0=(e,r)=>{let t=e.find(({id:e})=>e===r.id);if(!t)return{clear:!1,incoming:[rJ]};let{text:n}=t,o=n.map(({content:e})=>e?[...rQ(e),r$]:[r$]).reduce((e,r)=>e.concat(r),[rJ]);return{incoming:o,clear:!!rZ(r)||t.clear}};function r1({inbox:e,currentWindow:r}){let[t,n]=eR([]),o=eN(null);return eC(()=>{let{incoming:t,clear:a}=r0(e,r);n(e=>a?t:e.concat(t)),setTimeout(()=>{let e=o.current.querySelectorAll(`.${rJ.style}`),r=e[e.length-1];r?r.scrollIntoView():o.current.scrollTo({top:o.current.scrollHeight,behavior:"smooth"})},0)},[r,e]),ew("section",{tabindex:"0",ref:o,className:[S,rZ(r)?D:"PwGQsW_textBuffer"].join(" "),children:t.map(rK)})}function r2({inbox:e,currentWindow:r}){let[t,n]=eR([]),[o,a]=eR([]);return eC(()=>{let o=e.find(({id:e})=>e===r.id),i=o?.lines??[],s=Array(r.gridheight).fill(null).map((e,r)=>r).map(e=>{let r=(e,r)=>e.find(({line:e})=>e===r);return r(i,e)||r(t,e)});((e,r)=>{let t=JSON.stringify;return t(e)!==t(r)})(s,t)&&n(s);let u=s.map(e=>e.content).flat().map(e=>({...e,text:e.text.trim()})),l=u.map(({text:e})=>e.length).every(e=>0===e),c=({style:e})=>["alert","normal"].includes(e)?"grid":e||"grid",d=u.map(e=>({style:c(e),text:e.text.replace(" "," / ")}));a(l?[]:d)},[e,r,t]),ew("section",{className:[S,D].join(" "),children:o.map(rK)})}function r4({onClick:e}){return ew("button",{"aria-label":"Menu",className:"gUkI1a_menuButton",onClick:e,children:ew("svg",{class:"gUkI1a_menuIcon",viewBox:"0 0 28 32",xmlns:"http://www.w3.org/2000/svg",children:[ew("rect",{x:"12",y:"4",width:"4",height:"4"}),ew("rect",{x:"12",y:"14",width:"4",height:"4"}),ew("rect",{x:"12",y:"24",width:"4",height:"4"})]})})}let r6={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40},r3={[r6.KEY_BACKSPACE]:"delete",[r6.KEY_TAB]:"tab",[r6.KEY_RETURN]:"return",[r6.KEY_ESC]:"escape",[r6.KEY_PAGEUP]:"pageup",[r6.KEY_PAGEDOWN]:"pagedown",[r6.KEY_END]:"end",[r6.KEY_HOME]:"home",[r6.KEY_LEFT]:"left",[r6.KEY_UP]:"up",[r6.KEY_RIGHT]:"right",[r6.KEY_DOWN]:"down"},r9=e=>{let r=[e.altKey,e.ctrlKey,e.metaKey,e.shiftKey];return r.some(e=>!0===e)};function r8({inputType:e,windows:r,currentWindowId:t,sendMessage:n,onFullscreenRequest:o,setMenuOpen:a}){let[i,s]=eR(null),[u,l]=eR(""),[c,d]=eR(""),f=eN(null);eC(()=>{let e=()=>{f.current&&f.current.focus()};return l(""),e(),document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[e]),eC(()=>{s(r.find(({id:e})=>e===t))},[t,r]);let m=r=>{n(r,e,i),d(r),l("")},h=e=>{if(r9(e))return;e.preventDefault();let r=r3[e.keyCode]||e.key;m(r)},p=e=>setTimeout(()=>{m(e.target.value.slice(-1).toUpperCase()),l("")});return ew("section",{className:"LdLucW_inputControls",children:[ew("input",{...{char:{maxlength:"1",placeholder:"Press any key here",onKeyDown:e=>(229===e.keyCode?p:h)(e)},line:{placeholder:" > ",onKeyDown:({keyCode:e})=>{e===r6.KEY_UP&&(l(c),setTimeout(()=>{let e=c.length;f.current.setSelectionRange(e,e)},0)),e===r6.KEY_DOWN&&l("")},onKeyPress:({keyCode:e,target:{value:r}})=>{e===r6.KEY_RETURN&&m(r)}},finished:{placeholder:"The program has finished",disabled:!0}}[e],className:"LdLucW_inputBox",ref:f,value:u,autofocus:!0,autocomplete:"off",spellCheck:"false",autocapitalize:"off",autocorrect:"off",onDblClick:o,onInput:({target:{value:e}})=>l(e),type:"search"}),ew(r4,{onClick:()=>a(!0)})]})}F="zi213q_status";let r5=e=>ew("div",{className:[F].join(" "),children:[ew("h1",{children:"Error"}),e.map(e=>ew("p",{children:e},e)),ew("hr",{}),ew(rt,{href:"/",children:"Home"}),"|",ew("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/He4eT/elseifplayer/issues",children:"Report bug"})]}),r7=e=>ew("div",{className:[F,"zi213q_loading"].join(" "),children:e.map(e=>ew("div",{children:e},e))});var te=({stage:e,details:r})=>({fail:r5,loading:r7})[e](r);let tr={},tt={};["ҠҿԀԟڀڿݠޟ߀ߟကဟႠႿᄀᅟᆀᆟᇠሿበቿዠዿጠጿᎠᏟᐠᙟᚠᛟកសᠠᡟᣀᣟᦀᦟ᧠᧿ᨠᨿᯀᯟᰀᰟᴀᴟ⇠⇿⋀⋟⍀⏟␀␟─❟➀➿⠀⥿⦠⦿⨠⩟⪀⪿⫠⭟ⰀⰟⲀⳟⴀⴟⵀⵟ⺠⻟㇀㇟㐀䶟䷀龿ꀀꑿ꒠꒿ꔀꗿꙀꙟꚠꛟ꜀ꝟꞀꞟꡀꡟ","ƀƟɀʟ"].forEach((e,r)=>{let t=[];e.match(/../gu).forEach(e=>{let r=e.codePointAt(0),n=e.codePointAt(1);for(let e=r;e<=n;e++)t.push(String.fromCodePoint(e))});let n=15-8*r;tr[n]=t,t.forEach((e,r)=>{tt[e]=[n,r]})});let tn=e=>{let r=e.length,t="",n=0,o=0;for(let a=0;a<r;a++){let r=e[a];for(let e=7;e>=0;e--){let a=r>>e&1;n=(n<<1)+a,15==++o&&(t+=tr[o][n],n=0,o=0)}}if(0!==o){for(;!(o in tr);)n=(n<<1)+1,o++;t+=tr[o][n]}return t},to=e=>{let r=e.length,t=new Uint8Array(Math.floor(15*r/8)),n=0,o=0,a=0;for(let i=0;i<r;i++){let s=e.charAt(i);if(!(s in tt))throw Error(`Unrecognised Base32768 character: ${s}`);let[u,l]=tt[s];if(15!==u&&i!==r-1)throw Error("Secondary character found before end of input at position "+String(i));for(let e=u-1;e>=0;e--){let r=l>>e&1;o=(o<<1)+r,8==++a&&(t[n]=o,n++,o=0,a=0)}}if(o!==(1<<a)-1)throw Error("Padding mismatch");return new Uint8Array(t.buffer,0,n)},ta=({setStatus:e,setWindows:r,setCurrentWindowId:t,setInputType:n,setInbox:o})=>({onInit:()=>{e({stage:"ready"})},onUpdateWindows:e=>{r(e)},onUpdateInputs:e=>{if(0===e.length)return null;let{type:r,id:o}=e[0];t(o),n(r)},onUpdateContent:e=>{o(e)},onDisable:()=>{n(null)},onFileNameRequest:(e,r,t,n)=>{n({usage:r,filename:prompt("Enter the filename")})},onFileRead:({filename:e})=>{let r=localStorage.getItem(`fake-fs/${e}`);return to(r)},onFileWrite:({filename:e},r)=>{localStorage.setItem(`fake-fs/${e}`,tn(r))},onExit:()=>{n("finished")}}),ti=e=>r=>{"ExitStatus"===r.reason.name||"Program terminated with exit(0)"===r.reason.message?e():console.error("Unhandled rejection (promise: ",r.promise,", reason: ",r.reason,")."),r.preventDefault()},ts={stage:"loading",details:["Preparing"]},tu=({engine:e,wasmBinary:r,storyfile:t,handlers:n})=>{let{Dialog:o,GlkOte:a,send:i}=rV(n),s=new e;return s.init(t,{Dialog:o,GlkOte:a,Glk:{},wasmBinary:r,arguments:["storyfile"]}),s.start(),{send:i,instance:s}};function tl({vmParts:{storyfile:e,engine:r,wasmBinary:t},onFullscreenRequest:n,setMenuOpen:o,singleWindow:a}){let[i,s]=eR(ts),[u,l]=eR([]),[c,d]=eR(null),[f,m]=eR(null),[h,p]=eR([]),[v,w]=eR(null),[g,_]=eR(null);return eC(()=>{let n=ta({setStatus:s,setWindows:l,setCurrentWindowId:d,setInputType:m,setInbox:p});w(tu({engine:r,wasmBinary:t,storyfile:e,handlers:n}));let o=ti(n.onExit);return window.addEventListener("unhandledrejection",o),()=>{w(null),window.removeEventListener("unhandledrejection",o)}},[e,r,t]),eC(()=>(_(()=>v?v.send:null),()=>_(null)),[v]),"ready"!==i.stage?ew(te,{...i}):ew("section",{className:"PwGQsW_elseifplayer",children:[ew("section",{className:"PwGQsW_output",children:u.sort((e,r)=>e.top-r.top).filter(a?({id:e})=>e===c:()=>!0).map(e=>{let r={inbox:h,currentWindow:e};return({buffer:ew(r1,{...r}),grid:ew(r2,{...r})})[e.type]})}),ew(r8,{inputType:f,windows:u,currentWindowId:c,sendMessage:g,onFullscreenRequest:n,setMenuOpen:o})]})}let tc={stage:"loading",details:["Loading"]},td=({url:e,setStatus:r,setParts:t})=>{let n=(e,t)=>n=>(r({stage:e,details:[t]}),n),o=e=>fetch(e).then(e=>e.arrayBuffer());return Promise.resolve(e).then(n("loading","Downloading file")).then(e=>e.startsWith("blob:")?e.replace(/#(.*)$/g,""):e).then(fetch).then(e=>{if(e.ok)return e;throw Error(e.statusText)}).then(n("loading","Processing file")).then(e=>e.arrayBuffer()).then(e=>new Uint8Array(e)).then(n("loading","Downloading engine")).then(r=>{let t=rI(e);return[r,t.engine,t.wasmBinaryName]}).then(([e,r,t])=>Promise.all([e,r,o(t)])).then(([e,r,n])=>t({storyfile:e,engine:r,wasmBinary:n})).then(n("loading","Running")).catch(t=>{console.error(t),r({stage:"fail",details:[t.message,e]})})};function tf({url:e,singleWindow:r,onFullscreenRequest:t,setMenuOpen:n}){let[o,a]=eR(tc),[i,s]=eR(null);return eC(()=>(a(tc),s(null),td({url:e,setStatus:a,setParts:s}),()=>s(null)),[e]),i?ew(tl,{vmParts:i,onFullscreenRequest:t,setMenuOpen:n,singleWindow:r}):ew(te,{...o})}function tm({themeEngine:e,onFullscreenRequest:r,menuOpen:t,setMenuOpen:n}){let o=eN(null);return eC(()=>{let e=o.current.open;t&&!e&&o.current.showModal(),!t&&e&&o.current.close()},[t]),eC(()=>{let e=o.current,r=()=>{n(!1)};return e.addEventListener("close",r),()=>e.removeEventListener("close",r)},[o,n]),ew("dialog",{ref:o,className:"J9zJZG_menu",children:ew("section",{children:[ew("div",{children:ew("button",{tabIndex:0,onClick:()=>o.current.close(),children:"Close this menu"})}),ew("div",{className:"J9zJZG_appearance",children:[ew("button",{onClick:()=>{o.current.close(),r()},children:"Full screen"}),ew("button",{onClick:()=>e.setRandomTheme(),children:"Set a random theme"}),ew("label",{children:["Current theme:",ew(rw,{themeEngine:e})]})]}),ew("div",{className:"J9zJZG_navigation",children:ew(rt,{href:"/",tabIndex:0,children:"ElseIfPlayer"})})]})})}let th=e=>decodeURIComponent(e);function tp({theme:e,themeEngine:r,encodedUrl:t,singleWindow:n}){eC(()=>{r.setTheme(e)},[e,r]);let[o,a]=eR(th(t));eC(()=>{a(th(t))},[t]);let[i,s]=eR(!1),u=()=>{document.documentElement.requestFullscreen()};return ew("main",{children:[ew(tm,{themeEngine:r,onFullscreenRequest:u,menuOpen:i,setMenuOpen:s}),ew(tf,{url:o,onFullscreenRequest:u,setMenuOpen:s,singleWindow:n})]})}function tv(){return ew("main",{children:ew(te,{stage:"fail",details:["404","Page Not Found"]})})}var tw={};e(tw,"app",function(){return M},function(e){return M=e}),e(tw,"focus",function(){return A},function(e){return A=e}),e(tw,"games",function(){return P},function(e){return P=e}),e(tw,"home",function(){return x},function(e){return x=e}),e(tw,"play",function(){return R},function(e){return R=e}),e(tw,"themes",function(){return C},function(e){return C=e}),M="X8uEDW_app",A="X8uEDW_focus",P="X8uEDW_games",x="X8uEDW_home",R="X8uEDW_play",C="X8uEDW_themes",u=ew(function(){let e=rh(),[r]=ru(),t=(e,r)=>function(t){return ew(tp,{themeEngine:e,singleWindow:r,...t})};return ew(re,{hook:ru,children:ew("div",{className:[tw.app,tw[rs(r)],e.currentTheme].join(" "),children:ew(ro,{children:[ew(rr,{path:"/",children:ew(rg,{themeEngine:e})}),ew(rr,{path:"/games/",children:ew(rb,{})}),ew(rr,{path:"/themes/",children:ew(rS,{themeEngine:e})}),ew(rr,{path:"/play/:encodedUrl",children:t(e,!1)}),ew(rr,{path:"/play/:encodedUrl/:theme",children:t(e,!1)}),ew(rr,{path:"/focus/:encodedUrl",children:t(e,!0)}),ew(rr,{path:"/focus/:encodedUrl/:theme",children:t(e,!0)}),ew(rr,{children:ew(tv,{})})]})})})},{}),l=document.getElementById("root"),O.__&&O.__(u,l),f=(d="function"==typeof c)?null:c&&c.__k||l.__k,m=[],ed(l,u=(!d&&c||l).__k=Z(ee,null,[u]),f||G,G,void 0!==l.ownerSVGElement,!d&&c?[c]:f?null:l.firstChild?j.call(l.childNodes):null,m,!d&&c?c:f?f.__e:l.firstChild,d),ef(m,u)}();
|
|
//# sourceMappingURL=index.7852e909.js.map
|