UNPKG

@thorvg/lottie-player

Version:

A web lottie player using ThorVG as a renderer

1 lines 80.5 kB
const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let i=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const r=this.t;if(t&&void 0===e){const t=void 0!==r&&1===r.length;t&&(e=n.get(r)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&n.set(r,e))}return e}toString(){return this.cssText}};const o=(r,n)=>{if(t)r.adoptedStyleSheets=n.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const t of n){const n=document.createElement("style"),i=e.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},a=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new i("string"==typeof e?e:e+"",void 0,r))(t)})(e):e,{is:s,defineProperty:c,getOwnPropertyDescriptor:l,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:d}=Object,b=globalThis,f=b.trustedTypes,p=f?f.emptyScript:"",v=b.reactiveElementPolyfillSupport,m=(e,t)=>e,w={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},y=(e,t)=>!s(e,t),g={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class _ extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=g){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&c(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=l(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??g}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const e=d(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const e=this.properties,t=[...h(e),...u(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(a(e))}else void 0!==e&&t.push(a(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return o(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:w).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:w;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??y)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[m("elementProperties")]=new Map,_[m("finalized")]=new Map,v?.({ReactiveElement:_}),(b.reactiveElementVersions??=[]).push("2.0.4");const E={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:y},$=(e=E,t,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function A(e){return(t,r)=>"object"==typeof r?$(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}const S=globalThis,x=S.trustedTypes,k=x?x.createPolicy("lit-html",{createHTML:e=>e}):void 0,T="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+P,R=`<${C}>`,O=document,U=()=>O.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,B=Array.isArray,F="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,M=/>/g,G=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,I=/"/g,j=/^(?:script|style|textarea|title)$/i,q=(e,...t)=>({_$litType$:1,strings:e,values:t}),V=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),W=new WeakMap,X=O.createTreeWalker(O,129);function J(e,t){if(!B(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(t):t}class K{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[c,l]=((e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",a=N;for(let t=0;t<r;t++){const r=e[t];let s,c,l=-1,h=0;for(;h<r.length&&(a.lastIndex=h,c=a.exec(r),null!==c);)h=a.lastIndex,a===N?"!--"===c[1]?a=D:void 0!==c[1]?a=M:void 0!==c[2]?(j.test(c[2])&&(i=RegExp("</"+c[2],"g")),a=G):void 0!==c[3]&&(a=G):a===G?">"===c[0]?(a=i??N,l=-1):void 0===c[1]?l=-2:(l=a.lastIndex-c[2].length,s=c[1],a=void 0===c[3]?G:'"'===c[3]?I:z):a===I||a===z?a=G:a===D||a===M?a=N:(a=G,i=void 0);const u=a===G&&e[t+1].startsWith("/>")?" ":"";o+=a===N?r+R:l>=0?(n.push(s),r.slice(0,l)+T+r.slice(l)+P+u):r+P+(-2===l?t:u)}return[J(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(e,t);if(this.el=K.createElement(c,r),X.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=X.nextNode())&&s.length<a;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(T)){const t=l[o++],r=n.getAttribute(e).split(P),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:i,name:a[2],strings:r,ctor:"."===a[1]?te:"?"===a[1]?re:"@"===a[1]?ne:ee}),n.removeAttribute(e)}else e.startsWith(P)&&(s.push({type:6,index:i}),n.removeAttribute(e));if(j.test(n.tagName)){const e=n.textContent.split(P),t=e.length-1;if(t>0){n.textContent=x?x.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],U()),X.nextNode(),s.push({type:2,index:++i});n.append(e[t],U())}}}else if(8===n.nodeType)if(n.data===C)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(P,e+1));)s.push({type:7,index:i}),e+=P.length-1}i++}}static createElement(e,t){const r=O.createElement("template");return r.innerHTML=e,r}}function Q(e,t,r=e,n){if(t===V)return t;let i=void 0!==n?r.o?.[n]:r.l;const o=L(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r.o??=[])[n]=i:r.l=i),void 0!==i&&(t=Q(e,i._$AS(e,t.values),i,n)),t}class Z{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??O).importNode(t,!0);X.currentNode=n;let i=X.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new Y(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new ie(i,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(i=X.nextNode(),o++)}return X.currentNode=O,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Y{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,n){this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this.v=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Q(this,e,t),L(e)?e===H||null==e||""===e?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==V&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>B(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==H&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(O.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=K.createElement(J(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Z(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=W.get(e.strings);return void 0===t&&W.set(e.strings,t=new K(e)),t}k(e){B(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new Y(this.O(U()),this.O(U()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=H}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Q(this,e,t,0),o=!L(e)||e!==this._$AH&&e!==V,o&&(this._$AH=e);else{const n=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Q(this,n[r+a],t,a),s===V&&(s=this._$AH[a]),o||=!L(s)||s!==this._$AH[a],s===H?e=H:e!==H&&(e+=(s??"")+i[a+1]),this._$AH[a]=s}o&&!n&&this.j(e)}j(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class te extends ee{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===H?void 0:e}}class re extends ee{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==H)}}class ne extends ee{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=Q(this,e,t,0)??H)===V)return;const r=this._$AH,n=e===H&&r!==H||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==H&&(r===H||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ie{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Q(this,e)}}const oe=S.litHtmlPolyfillSupport;oe?.(K,Y),(S.litHtmlVersions??=[]).push("3.2.0");class ae extends _{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=((e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new Y(t.insertBefore(U(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return V}}ae._$litElement$=!0,ae.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ae});const se=globalThis.litElementPolyfillSupport;async function ce(e={}){var t,r=e,n=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,o=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(o){const{createRequire:e}=await Promise.resolve().then((function(){return $e}));var a=e(import.meta.url)}var s,c,l=(e,t)=>{throw t},h=import.meta.url,u="";if(o){var d=a("fs");h.startsWith("file:")&&(u=a("path").dirname(a("url").fileURLToPath(h))+"/"),c=e=>(e=R(e)?new URL(e):e,d.readFileSync(e)),s=async e=>(e=R(e)?new URL(e):e,d.readFileSync(e,void 0)),process.argv.slice(2),l=(e,t)=>{throw process.exitCode=e,t}}else if(n||i){try{u=new URL(".",h).href}catch{}i&&(c=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),s=async e=>{if(R(e))return new Promise(((t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r(n.status)},n.onerror=r,n.send(null)}));var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)}}var b,f,p,v,m,w,y,g,_,E,$,A,S,x,k,T=void 0,P=void 0,C=!1,R=e=>e.startsWith("file://"),O=!1;function U(){var e=kr.buffer;m=new Int8Array(e),y=new Int16Array(e),w=new Uint8Array(e),g=new Uint16Array(e),_=new Int32Array(e),E=new Uint32Array(e),$=new Float32Array(e),A=new Float64Array(e),S=new BigInt64Array(e),x=new BigUint64Array(e)}function L(e){throw r.onAbort?.(e),P(e="Aborted("+e+")"),C=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),v?.(e),e}class B{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var F=e=>{for(;0<e.length;)e.shift()(r)},N=[],D=[],M=()=>{var e=r.preRun.shift();D.push(e)},G=!0,z=new TextDecoder,I=(e,t,r,n)=>{if(r=t+r,n)return r;for(;e[t]&&!(t>=r);)++t;return t},j=(e,t,r)=>e?z.decode(w.subarray(e,I(w,e,t,r))):"",q=e=>{for(var t="";;){var r=w[e++];if(!r)return t;t+=String.fromCharCode(r)}},V={},H={},W={},X=class extends Error{constructor(e){super(e),this.name="BindingError"}},J=e=>{throw new X(e)};function K(e,t,r={}){return function(e,t,r={}){var n=t.name;if(!e)throw new X(`type "${n}" must have a positive integer typeid pointer`);if(H.hasOwnProperty(e)){if(r.zd)return;throw new X(`Cannot register type '${n}' twice`)}H[e]=t,delete W[e],V.hasOwnProperty(e)&&(t=V[e],delete V[e],t.forEach((e=>e())))}(e,t,r)}var Q=(e,t,r)=>{switch(t){case 1:return r?e=>m[e]:e=>w[e];case 2:return r?e=>y[e>>1]:e=>g[e>>1];case 4:return r?e=>_[e>>2]:e=>E[e>>2];case 8:return r?e=>S[e>>3]:e=>x[e>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Z=e=>{throw new X(e.pb.wb.ub.name+" instance already deleted")},Y=!1,ee=()=>{},te=e=>globalThis.FinalizationRegistry?(Y=new FinalizationRegistry((e=>{--(e=e.pb).count.value,0===e.count.value&&(e.zb?e.Eb.Qb(e.zb):e.wb.ub.Qb(e.tb))})),te=e=>{var t=e.pb;return t.zb&&Y.register(e,{pb:t},e),e},ee=e=>{Y.unregister(e)},te(e)):(te=e=>e,e);function re(){}var ne=(e,t)=>Object.defineProperty(t,"name",{value:e}),ie={},oe=(e,t,r)=>{if(void 0===e[t].yb){var n=e[t];e[t]=function(...n){if(!e[t].yb.hasOwnProperty(n.length))throw new X(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].yb})!`);return e[t].yb[n.length].apply(this,n)},e[t].yb=[],e[t].yb[n.cc]=n}},ae=(e,t,n)=>{if(r.hasOwnProperty(e)){if(void 0===n||void 0!==r[e].yb&&void 0!==r[e].yb[n])throw new X(`Cannot register public name '${e}' twice`);if(oe(r,e,e),r[e].yb.hasOwnProperty(n))throw new X(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].yb[n]=t}else r[e]=t,r[e].cc=n};function se(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.Yb=r,this.Qb=n,this.Bb=i,this.vd=o,this.lc=a,this.rd=s,this.Gd=[]}var ce=(e,t,r)=>{for(;t!==r;){if(!t.lc)throw new X(`Expected null or instance of ${r.name}, got an instance of ${t.name}`);e=t.lc(e),t=t.Bb}return e},le=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e};function he(e,t){if(null===t){if(this.Ac)throw new X(`null is not a valid ${this.name}`);return 0}if(!t.pb)throw new X(`Cannot pass "${le(t)}" as a ${this.name}`);if(!t.pb.tb)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);return ce(t.pb.tb,t.pb.wb.ub,this.ub)}function ue(e,t){if(null===t){if(this.Ac)throw new X(`null is not a valid ${this.name}`);if(this.qc){var r=this.Hd();return null!==e&&e.push(this.Qb,r),r}return 0}if(!t||!t.pb)throw new X(`Cannot pass "${le(t)}" as a ${this.name}`);if(!t.pb.tb)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.pc&&t.pb.wb.pc)throw new X(`Cannot convert argument of type ${t.pb.Eb?t.pb.Eb.name:t.pb.wb.name} to parameter type ${this.name}`);if(r=ce(t.pb.tb,t.pb.wb.ub,this.ub),this.qc){if(void 0===t.pb.zb)throw new X("Passing raw pointer to smart pointer is illegal");switch(this.Jd){case 0:if(t.pb.Eb!==this)throw new X(`Cannot convert argument of type ${t.pb.Eb?t.pb.Eb.name:t.pb.wb.name} to parameter type ${this.name}`);r=t.pb.zb;break;case 1:r=t.pb.zb;break;case 2:if(t.pb.Eb===this)r=t.pb.zb;else{var n=t.clone();r=this.Id(r,Me((()=>n.delete()))),null!==e&&e.push(this.Qb,r)}break;default:throw new X("Unsupporting sharing policy")}}return r}function de(e,t){if(null===t){if(this.Ac)throw new X(`null is not a valid ${this.name}`);return 0}if(!t.pb)throw new X(`Cannot pass "${le(t)}" as a ${this.name}`);if(!t.pb.tb)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.pb.wb.pc)throw new X(`Cannot convert argument of type ${t.pb.wb.name} to parameter type ${this.name}`);return ce(t.pb.tb,t.pb.wb.ub,this.ub)}function be(e){return this.Ab(E[e>>2])}var fe=(e,t,r)=>t===r?e:void 0===r.Bb||null===(e=fe(e,t,r.Bb))?null:r.rd(e),pe={},ve=class extends Error{constructor(e){super(e),this.name="InternalError"}},me=(e,t)=>{if(!t.wb||!t.tb)throw new ve("makeClassHandle requires ptr and ptrType");if(!!t.Eb!=!!t.zb)throw new ve("Both smartPtrType and smartPtr must be specified");return t.count={value:1},te(Object.create(e,{pb:{value:t,writable:!0}}))};function we(e,t,r,n,i,o,a,s,c,l,h){this.name=e,this.ub=t,this.Ac=r,this.pc=n,this.qc=i,this.Fd=o,this.Jd=a,this.Zc=s,this.Hd=c,this.Id=l,this.Qb=h,i||void 0!==t.Bb?this.Fb=ue:(this.Fb=n?he:de,this.Gb=null)}var ye=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new ve("Replacing nonexistent public symbol");void 0!==r[e].yb&&void 0!==n?r[e].yb[n]=t:(r[e]=t,r[e].cc=n)},ge=(e,t)=>{e=q(e);var r=Tr.get(t);if("function"!=typeof r)throw new X(`unknown function pointer with signature ${e}: ${t}`);return r};class _e extends Error{}var Ee=e=>{e=Er(e);var t=q(e);return gr(e),t},Ae=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||H[t]||(W[t]?W[t].forEach(e):(r.push(t),n[t]=!0))})),new _e(`${e}: `+r.map(Ee).join([", "]))},Se=(e,t,r)=>{function n(t){if((t=r(t)).length!==e.length)throw new ve("Mismatched type converter count");for(var n=0;n<e.length;++n)K(e[n],t[n])}e.forEach((e=>W[e]=t));var i=Array(t.length),o=[],a=0;t.forEach(((e,t)=>{H.hasOwnProperty(e)?i[t]=H[e]:(o.push(e),V.hasOwnProperty(e)||(V[e]=[]),V[e].push((()=>{i[t]=H[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},xe=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(E[t+4*n>>2]);return r},ke=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Te(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].Gb)return!0;return!1}function Pe(e,t,r,n,i,o){var a=t.length;if(2>a)throw new X("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==t[1]&&null!==r,c=Te(t);r=!t[0].Vc;var l=t[0],h=t[1];for(n=[e,J,n,i,ke,l.Ab.bind(l),h?.Fb.bind(h)],i=2;i<a;++i)n.push((l=t[i]).Fb.bind(l));if(!c)for(i=s?1:2;i<t.length;++i)null!==t[i].Gb&&n.push(t[i].Gb);for(c=Te(t),i=t.length-2,h=[],l=["fn"],s&&l.push("thisWired"),a=0;a<i;++a)h.push(`arg${a}`),l.push(`arg${a}Wired`);h=h.join(","),l=l.join(","),h=`return function (${h}) {\n`,c&&(h+="var destructors = [];\n");var u=c?"destructors":"null",d="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(s&&(h+=`var thisWired = toClassParamWire(${u}, this);\n`),a=0;a<i;++a){var b=`toArg${a}Wire`;h+=`var arg${a}Wired = ${b}(${u}, arg${a});\n`,d.push(b)}if(h+=(r||o?"var rv = ":"")+`invoker(${l});\n`,c)h+="runDestructors(destructors);\n";else for(a=s?1:2;a<t.length;++a)o=1===a?"thisWired":"arg"+(a-2)+"Wired",null!==t[a].Gb&&(h+=`${o}_dtor(${o});\n`,d.push(`${o}_dtor`));return r&&(h+="var ret = fromRetWire(rv);\nreturn ret;\n"),t=new Function(d,h+"}\n")(...n),ne(e,t)}var Ce,Re,Oe,Ue,Le=e=>{const t=(e=e.trim()).indexOf("(");return-1===t?e:e.slice(0,t)},Be=[],Fe=[0,1,,1,null,1,!0,1,!1,1],Ne=e=>{9<e&&0==--Fe[e+1]&&(Fe[e]=void 0,Be.push(e))},De=e=>{if(!e)throw new X(`Cannot use deleted val. handle = ${e}`);return Fe[e]},Me=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const t=Be.pop()||Fe.length;return Fe[t]=e,Fe[t+1]=1,t}},Ge={name:"emscripten::val",Ab:e=>{var t=De(e);return Ne(e),t},Fb:(e,t)=>Me(t),Ob:be,Gb:null},ze=(e,t)=>{switch(t){case 4:return function(e){return this.Ab($[e>>2])};case 8:return function(e){return this.Ab(A[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ie=(e,t,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var o=0;o<e.length;++o){var a=e.codePointAt(o);if(127>=a){if(r>=n)break;t[r++]=a}else if(2047>=a){if(r+1>=n)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(65535>=a){if(r+2>=n)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=n)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a,o++}}return t[r]=0,r-i},je=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);127>=n?t++:2047>=n?t+=2:55296<=n&&57343>=n?(t+=4,++r):t+=3}return t},qe=new TextDecoder("utf-16le"),Ve=(e,t,r)=>qe.decode(g.subarray(e>>=1,I(g,e,t/2,r))),He=(e,t,r)=>{if(r??=2147483647,2>r)return 0;var n=t;r=(r-=2)<2*e.length?r/2:e.length;for(var i=0;i<r;++i)y[t>>1]=e.charCodeAt(i),t+=2;return y[t>>1]=0,t-n},We=e=>2*e.length,Xe=(e,t,r)=>{var n="";e>>=2;for(var i=0;!(i>=t/4);i++){var o=E[e+i];if(!o&&!r)break;n+=String.fromCodePoint(o)}return n},Je=(e,t,r)=>{if(r??=2147483647,4>r)return 0;var n=t;r=n+r-4;for(var i=0;i<e.length;++i){var o=e.codePointAt(i);if(65535<o&&i++,_[t>>2]=o,(t+=4)+4>r)break}return _[t>>2]=0,t-n},Ke=e=>{for(var t=0,r=0;r<e.length;++r)65535<e.codePointAt(r)&&r++,t+=4;return t},Qe=0,Ze=[],Ye=(e,t,r)=>{var n=[];return e=e(n,r),n.length&&(E[t>>2]=Me(n)),e},et={},tt=e=>{var t=et[e];return void 0===t?q(e):t},rt={},nt=e=>{f=e,G||0<Qe||(r.onExit?.(e),C=!0),l(e,new B(e))},it=e=>{var t="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");return(e.getSupportedExtensions()||[]).filter((e=>t.includes(e)))},ot=1,at=[],st=[],ct=[],lt=[],ht=[],ut=[],dt=[],bt=[],ft=[1,1,2,2,4,4,4,2,3,4,8],pt=e=>{for(var t=ot++,r=e.length;r<t;r++)e[r]=null;for(;e[t];)t=ot++;return t},vt=(e,t,r,n)=>{for(var i=0;i<e;i++){var o=Ce[r](),a=o&&pt(n);o?(o.name=a,n[a]=o):Re||=1282,_[t+4*i>>2]=a}},mt=["default","low-power","high-performance"],wt=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0],yt=(e,t)=>{for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},gt=e=>{var t="/"===e.charAt(0),r="/"===e.slice(-1);return(e=yt(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},_t=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.slice(0,-1),e+t):"."},Et=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],$t=e=>{($t=(()=>{if(o){var e=a("crypto");return t=>e.randomFillSync(t)}return e=>crypto.getRandomValues(e)})())(e)},At=(...e)=>{for(var t="",r=!1,n=e.length-1;-1<=n&&!r;n--){if("string"!=typeof(r=0<=n?e[n]:dr.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";t=r+"/"+t,r="/"===r.charAt(0)}return t=yt(t.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+t||"."},St=(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=At(e).slice(1),t=At(t).slice(1),e=r(e.split("/")),t=r(t.split("/"));for(var n=Math.min(e.length,t.length),i=n,o=0;o<n;o++)if(e[o]!==t[o]){i=o;break}for(n=[],o=i;o<e.length;o++)n.push("..");return(n=n.concat(t.slice(i))).join("/")},xt=e=>{var t=I(e,0);return z.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},kt=[],Tt=e=>{var t=Array(je(e)+1);return e=Ie(e,t,0,t.length),t.length=e,t},Pt=[];function Ct(e,t){Pt[e]={input:[],output:[],$b:t},jt(e,Rt)}var Rt={open(e){var t=Pt[e.node.rdev];if(!t)throw new dr.ob(43);e.tty=t,e.seekable=!1},close(e){e.tty.$b.fsync(e.tty)},fsync(e){e.tty.$b.fsync(e.tty)},read(e,t,r,n){if(!e.tty||!e.tty.$b.Sc)throw new dr.ob(60);for(var i=0,o=0;o<n;o++){try{var a=e.tty.$b.Sc(e.tty)}catch(e){throw new dr.ob(29)}if(void 0===a&&0===i)throw new dr.ob(6);if(null==a)break;i++,t[r+o]=a}return i&&(e.node.atime=Date.now()),i},write(e,t,r,n){if(!e.tty||!e.tty.$b.Gc)throw new dr.ob(60);try{for(var i=0;i<n;i++)e.tty.$b.Gc(e.tty,t[r+i])}catch(e){throw new dr.ob(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),i}},Ot={Sc(){e:{if(!kt.length){var e=null;if(o){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=d.readSync(n,t,0,256)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}0<r&&(e=t.slice(0,r).toString("utf-8"))}else globalThis.window?.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n");if(!e){e=null;break e}kt=Tt(e)}e=kt.shift()}return e},Gc(e,t){null===t||10===t?(T(xt(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){0<e.output?.length&&(T(xt(e.output)),e.output=[])},he:()=>({Sd:25856,Ud:5,Rd:191,Td:35387,Qd:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ie:()=>0,je:()=>[24,80]},Ut={Gc(e,t){null===t||10===t?(P(xt(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){0<e.output?.length&&(P(xt(e.output)),e.output=[])}},Lt={Mb:null,vb:()=>Lt.createNode(null,"/",16895,0),createNode(e,t,r,n){if(24576==(61440&r)||dr.isFIFO(r))throw new dr.ob(63);return Lt.Mb||(Lt.Mb={dir:{node:{Ib:Lt.qb.Ib,Kb:Lt.qb.Kb,lookup:Lt.qb.lookup,Nb:Lt.qb.Nb,rename:Lt.qb.rename,unlink:Lt.qb.unlink,rmdir:Lt.qb.rmdir,readdir:Lt.qb.readdir,symlink:Lt.qb.symlink},stream:{Cb:Lt.rb.Cb}},file:{node:{Ib:Lt.qb.Ib,Kb:Lt.qb.Kb},stream:{Cb:Lt.rb.Cb,read:Lt.rb.read,write:Lt.rb.write,Zb:Lt.rb.Zb,hc:Lt.rb.hc}},link:{node:{Ib:Lt.qb.Ib,Kb:Lt.qb.Kb,readlink:Lt.qb.readlink},stream:{}},Kc:{node:{Ib:Lt.qb.Ib,Kb:Lt.qb.Kb},stream:dr.od}}),qt((r=dr.createNode(e,t,r,n)).mode)?(r.qb=Lt.Mb.dir.node,r.rb=Lt.Mb.dir.stream,r.sb={}):dr.isFile(r.mode)?(r.qb=Lt.Mb.file.node,r.rb=Lt.Mb.file.stream,r.xb=0,r.sb=null):40960==(61440&r.mode)?(r.qb=Lt.Mb.link.node,r.rb=Lt.Mb.link.stream):8192==(61440&r.mode)&&(r.qb=Lt.Mb.Kc.node,r.rb=Lt.Mb.Kc.stream),r.atime=r.mtime=r.ctime=Date.now(),e&&(e.sb[t]=r,e.atime=e.mtime=e.ctime=r.atime),r},ge:e=>e.sb?e.sb.subarray?e.sb.subarray(0,e.xb):new Uint8Array(e.sb):new Uint8Array(0),qb:{Ib(e){var t={};return t.dev=8192==(61440&e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=qt(e.mode)?4096:dr.isFile(e.mode)?e.xb:40960==(61440&e.mode)?e.link.length:0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},Kb(e,t){for(var r of["mode","atime","mtime","ctime"])null!=t[r]&&(e[r]=t[r]);void 0!==t.size&&e.xb!=(t=t.size)&&(0==t?(e.sb=null,e.xb=0):(r=e.sb,e.sb=new Uint8Array(t),r&&e.sb.set(r.subarray(0,Math.min(t,e.xb))),e.xb=t))},lookup(){throw Lt.xc||(Lt.xc=new dr.ob(44),Lt.xc.stack="<generic error, no stack>"),Lt.xc},Nb:(e,t,r,n)=>Lt.createNode(e,t,r,n),rename(e,t,r){try{var n=Vt(t,r)}catch(e){}if(n){if(qt(e.mode))for(var i in n.sb)throw new dr.ob(55);Ht(n)}delete e.parent.sb[e.name],t.sb[r]=e,e.name=r,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.sb[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var r,n=Vt(e,t);for(r in n.sb)throw new dr.ob(55);delete e.sb[t],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.sb)],symlink:(e,t,r)=>((e=Lt.createNode(e,t,41471,0)).link=r,e),readlink(e){if(40960!=(61440&e.mode))throw new dr.ob(28);return e.link}},rb:{read(e,t,r,n,i){var o=e.node.sb;if(i>=e.node.xb)return 0;if(8<(e=Math.min(e.node.xb-i,n))&&o.subarray)t.set(o.subarray(i,i+e),r);else for(n=0;n<e;n++)t[r+n]=o[i+n];return e},write(e,t,r,n,i,o){if(t.buffer===m.buffer&&(o=!1),!n)return 0;if((e=e.node).mtime=e.ctime=Date.now(),t.subarray&&(!e.sb||e.sb.subarray)){if(o)return e.sb=t.subarray(r,r+n),e.xb=n;if(0===e.xb&&0===i)return e.sb=t.slice(r,r+n),e.xb=n;if(i+n<=e.xb)return e.sb.set(t.subarray(r,r+n),i),n}var a=e.sb?e.sb.length:0;if(a>=(o=i+n)||(o=Math.max(o,a*(1048576>a?2:1.125)>>>0),0!=a&&(o=Math.max(o,256)),a=e.sb,e.sb=new Uint8Array(o),0<e.xb&&e.sb.set(a.subarray(0,e.xb),0)),e.sb.subarray&&t.subarray)e.sb.set(t.subarray(r,r+n),i);else for(o=0;o<n;o++)e.sb[i+o]=t[r+o];return e.xb=Math.max(e.xb,i+n),n},Cb(e,t,r){if(1===r?t+=e.position:2===r&&dr.isFile(e.node.mode)&&(t+=e.node.xb),0>t)throw new dr.ob(28);return t},Zb(e,t,r,n,i){if(!dr.isFile(e.node.mode))throw new dr.ob(43);if(e=e.node.sb,2&i||!e||e.buffer!==m.buffer){if(n=!0,L(),!(i=void 0))throw new dr.ob(48);e&&((0<r||r+t<e.length)&&(e=e.subarray?e.subarray(r,r+t):Array.prototype.slice.call(e,r,r+t)),m.set(e,i))}else n=!1,i=e.byteOffset;return{tb:i,Md:n}},hc:(e,t,r,n)=>(Lt.rb.write(e,t,0,n,r,!1),0)}},Bt=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Ft=0,Nt=null,Dt=()=>{if(Ft--,r.monitorRunDependencies?.(Ft),0==Ft&&Nt){var e=Nt;Nt=null,e()}},Mt=()=>{Ft++,r.monitorRunDependencies?.(Ft)},Gt=[],zt=async(e,t,r,n,i,o,a,c)=>{var l=t?At(gt(e+"/"+t)):e;Mt();try{var h=r;"string"==typeof r&&(h=await(async e=>(e=await s(e),new Uint8Array(e)))(r)),h=await(async(e,t)=>{for(var r of("undefined"!=typeof Browser&&It(),Gt))if(r.canHandle(t))return r.handle(e,t);return e})(h,l),c?.(),o||Wt(e,t,h,n,i,a)}finally{Dt()}};function It(){var e,t,n;dr.zc=!0,e??=r.stdin,t??=r.stdout,n??=r.stderr,e?dr.Pb("/dev","stdin",e):dr.symlink("/dev/tty","/dev/stdin"),t?dr.Pb("/dev","stdout",null,t):dr.symlink("/dev/tty","/dev/stdout"),n?dr.Pb("/dev","stderr",null,n):dr.symlink("/dev/tty1","/dev/stderr"),dr.open("/dev/stdin",0),dr.open("/dev/stdout",1),dr.open("/dev/stderr",1)}function jt(e,t){dr.Oc[e]={rb:t}}function qt(e){return 16384==(61440&e)}function Vt(e,t){var r=qt(e.mode)?(r=Yt(e,"x"))?r:e.qb.lookup?0:2:54;if(r)throw new dr.ob(r);for(r=dr.Lb[Kt(e.id,t)];r;r=r.Vb)if(r.parent.id===e.id&&r.name===t)return r;return dr.lookup(e,t)}function Ht(e){var t=Kt(e.parent.id,e.name);if(dr.Lb[t]===e)dr.Lb[t]=e.Vb;else for(t=dr.Lb[t];t;){if(t.Vb===e){t.Vb=e.Vb;break}t=t.Vb}}function Wt(e,t,r,n,i,o){var a=t;if(e&&(e="string"==typeof e?e:Jt(e),a=t?gt(e+"/"+t):e),e=Bt(n,i),a=dr.create(a,e),r){if("string"==typeof r){for(t=Array(r.length),n=0,i=r.length;n<i;++n)t[n]=r.charCodeAt(n);r=t}dr.chmod(a,146|e),t=dr.open(a,577),dr.write(t,r,0,r.length,0,o),dr.close(t),dr.chmod(a,e)}}function Xt(e,t={}){if(!e)throw new dr.ob(44);t.oc??(t.oc=!0),"/"===e.charAt(0)||(e=dr.cwd()+"/"+e);var r=0;e:for(;40>r;r++){e=e.split("/").filter((e=>!!e));for(var n=dr.root,i="/",o=0;o<e.length;o++){var a=o===e.length-1;if(a&&t.parent)break;if("."!==e[o])if(".."===e[o]){if(i=_t(i),dr.Bc(n)){e=i+"/"+e.slice(o+1).join("/"),r--;continue e}n=n.parent}else{i=gt(i+"/"+e[o]);try{n=Vt(n,e[o])}catch(e){if(44===e?.Tb&&a&&t.Dd)return{path:i};throw e}if(!n.Jb||a&&!t.oc||(n=n.Jb.root),40960==(61440&n.mode)&&(!a||t.Hb)){if(!n.qb.readlink)throw new dr.ob(52);"/"===(n=n.qb.readlink(n)).charAt(0)||(n=_t(i)+"/"+n),e=n+"/"+e.slice(o+1).join("/");continue e}}}return{path:i,node:n}}throw new dr.ob(32)}function Jt(e){for(var t;;){if(dr.Bc(e))return e=e.vb.Xc,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Kt(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%dr.Lb.length}function Qt(e){var t=Kt(e.parent.id,e.name);e.Vb=dr.Lb[t],dr.Lb[t]=e}function Zt(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Yt(e,t){return dr.Tc?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function er(e,t){if(!qt(e.mode))return 54;try{return Vt(e,t),20}catch(e){}return Yt(e,"wx")}function tr(e,t,r){try{var n=Vt(e,t)}catch(e){return e.Tb}if(e=Yt(e,"wx"))return e;if(r){if(!qt(n.mode))return 54;if(dr.Bc(n)||Jt(n)===dr.cwd())return 10}else if(qt(n.mode))return 31;return 0}function rr(e,t){if(!e)throw new dr.ob(t);return e}function nr(e){if(!(e=dr.yd(e)))throw new dr.ob(8);return e}function ir(e,t=-1){if(e=Object.assign(new dr.ld,e),-1==t)e:{for(t=0;t<=dr.nd;t++)if(!dr.streams[t])break e;throw new dr.ob(33)}return e.fd=t,dr.streams[t]=e}function or(e,t,r){var n=e?.rb.Kb;e=n?e:t,n??=t.qb.Kb,rr(n,63),n(e,r)}function ar(e){var t=[];for(e=[e];e.length;){var r=e.pop();t.push(r),e.push(...r.fc)}return t}function sr(e){var t={Pd:4096,de:4096,blocks:1e6,Od:5e5,Nd:5e5,files:dr.Ec,be:dr.Ec-1,ee:42,flags:2,pe:255};return e.qb.cd&&Object.assign(t,e.qb.cd(e.vb.Ed.root)),t}function cr(e,t,r){return void 0===r&&(r=t,t=438),dr.Nb(e,8192|t,r)}function lr(e,t,r,n){or(e,t,{mode:4095&r|-4096&t.mode,ctime:Date.now(),Qc:n})}function hr(e,t,r){if(qt(t.mode))throw new dr.ob(31);if(!dr.isFile(t.mode))throw new dr.ob(28);var n=Yt(t,"w");if(n)throw new dr.ob(n);or(e,t,{size:r,timestamp:Date.now()})}function ur(e){if(!(e.Bd||e.Cd||e.link||e.sb))if(globalThis.XMLHttpRequest)L("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.");else try{e.sb=c(e.url)}catch(e){throw new dr.ob(29)}}var dr={root:null,fc:[],Oc:{},streams:[],Ec:1,Lb:null,Lc:"/",zc:!1,Tc:!0,ud:null,uc:0,ad:{},ob:class{name="ErrnoError";constructor(e){this.Tb=e}},ld:class{Db={};node=null;get object(){return this.node}set object(e){this.node=e}get flags(){return this.Db.flags}set flags(e){this.Db.flags=e}get position(){return this.Db.position}set position(e){this.Db.position=e}},kd:class{qb={};rb={};Jb=null;constructor(e,t,r,n){e||=this,this.parent=e,this.vb=e.vb,this.id=dr.Ec++,this.name=t,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return!(365&~this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}get Cd(){return qt(this.mode)}get Bd(){return 8192==(61440&this.mode)}},createNode:(e,t,r,n)=>(Qt(e=new dr.kd(e,t,r,n)),e),Bc:e=>e===e.parent,isFile:e=>32768==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),nd:4096,yd:e=>dr.streams[e],Zd:(e,t=-1)=>(e=ir(e,t),e.rb?.Yd?.(e),e),od:{open(e){e.rb=dr.wd(e.node.rdev).rb,e.rb.open?.(e)},Cb(){throw new dr.ob(70)}},Cc:e=>e>>8,le:e=>255&e,Ub:(e,t)=>e<<8|t,wd:e=>dr.Oc[e],dd(e,t){function r(e){return dr.uc--,t(e)}function n(e){if(e){if(!n.sd)return n.sd=!0,r(e)}else++o>=i.length&&r(null)}"function"==typeof e&&(t=e,e=!1),dr.uc++,1<dr.uc&&P(`warning: ${dr.uc} FS.syncfs operations in flight at once, probably just doing extra work`);var i=ar(dr.root.vb),o=0;i.forEach((t=>{if(!t.type.dd)return n(null);t.type.dd(t,e,n)}))},vb(e,t,r){var n="/"===r;if(n&&dr.root)throw new dr.ob(10);if(!n&&r){var i=Xt(r,{oc:!1});if(r=i.path,(i=i.node).Jb)throw new dr.ob(10);if(!qt(i.mode))throw new dr.ob(54)}return(e=e.vb(t={type:e,Ed:t,Xc:r,fc:[]})).vb=t,t.root=e,n?dr.root=e:i&&(i.Jb=t,i.vb&&i.vb.fc.push(t)),e},ye(e){if(!(e=Xt(e,{oc:!1})).node.Jb)throw new dr.ob(28);var t=(e=e.node).Jb,r=ar(t);Object.keys(dr.Lb).forEach((e=>{for(e=dr.Lb[e];e;){var t=e.Vb;r.includes(e.vb)&&Ht(e),e=t}})),e.Jb=null,e.vb.fc.splice(e.vb.fc.indexOf(t),1)},lookup:(e,t)=>e.qb.lookup(e,t),Nb(e,t,r){var n=Xt(e,{parent:!0}).node;if(!(e=Et(e)))throw new dr.ob(28);if("."===e||".."===e)throw new dr.ob(20);var i=er(n,e);if(i)throw new dr.ob(i);if(!n.qb.Nb)throw new dr.ob(63);return n.qb.Nb(n,e,t,r)},cd:e=>sr(Xt(e,{Hb:!0}).node),we:e=>sr(e.node),create:(e,t=438)=>dr.Nb(e,4095&t|32768,0),mkdir:(e,t=511)=>dr.Nb(e,1023&t|16384,0),ne(e,t){var r,n=e.split("/"),i="";for(r of n)if(r){(i||"/"===e.charAt(0))&&(i+="/"),i+=r;try{dr.mkdir(i,t)}catch(e){if(20!=e.Tb)throw e}}},symlink(e,t){if(!At(e))throw new dr.ob(44);var r=Xt(t,{parent:!0}).node;if(!r)throw new dr.ob(44);var n=er(r,t=Et(t));if(n)throw new dr.ob(n);if(!r.qb.symlink)throw new dr.ob(63);return r.qb.symlink(r,t,e)},rename(e,t){var r=_t(e),n=_t(t),i=Et(e),o=Et(t),a=Xt(e,{parent:!0}),s=a.node;if(a=(a=Xt(t,{parent:!0})).node,!s||!a)throw new dr.ob(44);if(s.vb!==a.vb)throw new dr.ob(75);var c=Vt(s,i);if("."!==(e=St(e,n)).charAt(0))throw new dr.ob(28);if("."!==(e=St(t,r)).charAt(0))throw new dr.ob(55);try{var l=Vt(a,o)}catch(e){}if(c!==l){if(i=tr(s,i,t=qt(c.mode)))throw new dr.ob(i);if(i=l?tr(a,o,t):er(a,o))throw new dr.ob(i);if(!s.qb.rename)throw new dr.ob(63);if(c.Jb||l&&l.Jb)throw new dr.ob(10);if(a!==s&&(i=Yt(s,"w")))throw new dr.ob(i);Ht(c);try{s.qb.rename(c,a,o),c.parent=a}catch(e){throw e}finally{Qt(c)}}},rmdir(e){var t=Xt(e,{parent:!0}).node,r=Vt(t,e=Et(e)),n=tr(t,e,!0);if(n)throw new dr.ob(n);if(!t.qb.rmdir)throw new dr.ob(63);if(r.Jb)throw new dr.ob(10);t.qb.rmdir(t,e),Ht(r)},readdir:e=>rr((e=Xt(e,{Hb:!0}).node).qb.readdir,54)(e),unlink(e){var t=Xt(e,{parent:!0}).node;if(!t)throw new dr.ob(44);var r=Vt(t,e=Et(e)),n=tr(t,e,!1);if(n)throw new dr.ob(n);if(!t.qb.unlink)throw new dr.ob(63);if(r.Jb)throw new dr.ob(10);t.qb.unlink(t,e),Ht(r)},readlink(e){if(!(e=Xt(e).node))throw new dr.ob(44);if(!e.qb.readlink)throw new dr.ob(28);return e.qb.readlink(e)},stat:(e,t)=>rr((e=Xt(e,{Hb:!t}).node).qb.Ib,63)(e),fstat(e){var t=nr(e);e=t.node;var r=t.rb.Ib;return t=r?t:e,r??=e.qb.Ib,rr(r,63),r(t)},lstat:e=>dr.stat(e,!0),chmod(e,t,r){lr(null,e="string"==typeof e?Xt(e,{Hb:!r}).node:e,t,r)},lchmod(e,t){dr.chmod(e,t,!0)},fchmod(e,t){lr(e=nr(e),e.node,t,!1)},chown(e,t,r,n){or(null,e="string"==typeof e?Xt(e,{Hb:!n}).node:e,{timestamp:Date.now(),Qc:n})},lchown(e,t,r){dr.chown(e,t,r,!0)},fchown(e){or(e=nr(e),e.node,{timestamp:Date.now(),Qc:!1})},truncate(e,t){if(0>t)throw new dr.ob(28);hr(null,e="string"==typeof e?Xt(e,{Hb:!0}).node:e,t)},fe(e,t){if(e=nr(e),0>t||!(2097155&e.flags))throw new dr.ob(28);hr(e,e.node,t)},ze(e,t,r){rr((e=Xt(e,{Hb:!0}).node).qb.Kb,63)(e,{atime:t,mtime:r})},open(e,t,n=438){if(""===e)throw new dr.ob(44);if("string"==typeof t){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===i)throw Error(`Unknown file open mode: ${t}`);t=i}if(n=64&t?4095&n|32768:0,"object"==typeof e)i=e;else{var o=e.endsWith("/");i=(e=Xt(e,{Hb:!(131072&t),Dd:!0})).node,e=e.path}var a=!1;if(64&t)if(i){if(128&t)throw new dr.ob(20)}else{if(o)throw new dr.ob(31);i=dr.Nb(e,511|n,0),a=!0}if(!i)throw new dr.ob(44);if(8192==(61440&i.mode)&&(t&=-513),65536&t&&!qt(i.mode))throw new dr.ob(54);if(!a&&(o=i?40960==(61440&i.mode)?32:qt(i.mode)&&("r"!==Zt(t)||576&t)?31:Yt(i,Zt(t)):44))throw new dr.ob(o);return 512&t&&!a&&dr.truncate(i,0),t&=-131713,(o=ir({node:i,path:Jt(i),flags:t,seekable:!0,position:0,rb:i.rb,Ld:[],error:!1})).rb.open&&o.rb.open(o),a&&dr.chmod(i,511&n),!r.logReadFiles||1&t||e in dr.ad||(dr.ad[e]=1),o},close(e){if(null===e.fd)throw new dr.ob(8);e.yc&&(e.yc=null);try{e.rb.close&&e.rb.close(e)}catch(e){throw e}finally{dr.streams[e.fd]=null}e.fd=null},Cb(e,t,r){if(null===e.fd)throw new dr.ob(8);if(!e.seekable||!e.rb.Cb)throw new dr.ob(70);if(0!=r&&1!=r&&2!=r)throw new dr.ob(28);return e.position=e.rb.Cb(e,t,r),e.Ld=[],e.position},read(e,t,r,n,i){if(0>n||0>i)throw new dr.ob(28);if(null===e.fd)throw new dr.ob(8);if(1==(2097155&e.flags))throw new dr.ob(8);if(qt(e.node.mode))throw new dr.ob(31);if(!e.rb.read)throw new dr.ob(28);var o=void 0!==i;if(o){if(!e.seekable)throw new dr.ob(70)}else i=e.position;return t=e.rb.read(e,t,r,n,i),o||(e.position+=t),t},write(e,t,r,n,i,o){if(0>n||0>i)throw new dr.ob(28);if(null===e.fd)throw new dr.ob(8);if(!(2097155&e.flags))throw new dr.ob(8);if(qt(e.node.mode))throw new dr.ob(31);if(!e.rb.write)throw new dr.ob(28);e.seekable&&1024&e.flags&&dr.Cb(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new dr.ob(70)}else i=e.position;return t=e.rb.write(e,t,r,n,i,o),a||(e.position+=t),t},Zb(e,t,r,n,i){if(2&n&&!(2&i)&&2!=(2097155&e.flags))throw new dr.ob(2);if(1==(2097155&e.flags))throw new dr.ob(2);if(!e.rb.Zb)throw new dr.ob(43);if(!t)throw new dr.ob(28);return e.rb.Zb(e,t,r,n,i)},hc:(e,t,r,n,i)=>e.rb.hc?e.rb.hc(e,t,r,n,i):0,Uc(e,t,r){if(!e.rb.Uc)throw new dr.ob(59);return e.rb.Uc(e,t,r)},readFile(e,t={}){t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding&&L(`Invalid encoding type "${t.encoding}"`);var r=dr.open(e,t.flags);e=dr.stat(e).size;var n=new Uint8Array(e);return dr.read(r,n,0,e,0),"utf8"===t.encoding&&(n=xt(n)),dr.close(r),n},writeFile(e,t,r={}){r.flags=r.flags||577,e=dr.open(e,r.flags,r.mode),"string"==typeof t&&(t=new Uint8Array(Tt(t))),ArrayBuffer.isView(t)?dr.write(e,t,0,t.byteLength,void 0,r.Vd):L("Unsupported data type"),dr.close(e)},cwd:()=>dr.Lc,chdir(e){if(null===(e=Xt(e,{Hb:!0})).node)throw new dr.ob(44);if(!qt(e.node.mode))throw new dr.ob(54);var t=Yt(e.node,"x");if(t)throw new dr.ob(t);dr.Lc=e.path},te(){for(var e of(dr.zc=!1,dr.streams))e&&dr.close(e)},ce(e,t){try{var r=Xt(e,{Hb:!t});e=r.path}catch(e){}var n=!1,i=null;try{r=Xt(e,{parent:!0}),Et(e),r=Xt(e,{Hb:!t}),n=!0,i=r.node}catch(e){}return n?i:null},Pb(e,t,r,n){var i;return e=((e,t)=>gt(e+"/"+t))("string"==typeof e?e:Jt(e),t),t=Bt(!!r,!!n),(i=dr.Pb).Cc??(i.Cc=64),jt(i=dr.Ub(dr.Pb.Cc++,0),{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,t,n,i){for(var o=0,a=0;a<i;a++){try{var s=r()}catch(e){throw new dr.ob(29)}if(void 0===s&&0===o)throw new dr.ob(6);if(null==s)break;o++,t[n+a]=s}return o&&(e.node.atime=Date.now()),o},write(e,t,r,i){for(var o=0;o<i;o++)try{n(t[r+o])}catch(e){throw new dr.ob(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),o}}),cr(e,t,i)}},br=e=>"]"==e.slice(-1)&&e.lastIndexOf("["),fr=[],pr=e=>0==(e-=5120)?m:1==e?w:2==e?y:4==e?_:6==e?$:5==e||28922==e||28520==e||30779==e||30782==e?E:g,vr=e=>{var t=Ce.qd;if(t){var r=t.kc[e];return"number"==typeof r&&(t.kc[e]=r=Ce.getUniformLocation(t,t.gd[e]+(0<r?`[${r}]`:""))),r}Re||=1282},mr=[];(()=>{let e=re.prototype;Object.assign(e,{isAliasOf:function(e){if(!(this instanceof re&&e instanceof re))return!1;var t=this.pb.wb.ub,r=this.pb.tb;e.pb=e.pb;var n=e.pb.wb.ub;for(e=e.pb.tb;t.Bb;)r=t.lc(r),t=t.Bb;for(;n.Bb;)e=n.lc(e),n=n.Bb;return t===n&&r===e},clone:function(){if(this.pb.tb||Z(this),this.pb.ic)return this.pb.count.value+=1,this;var e=te,t=Object,r=t.create,n=Object.getPrototypeOf(this),i=this.pb;return(e=e(r.call(t,n,{pb:{value:{count:i.count,ec:i.ec,ic:i.ic,tb:i.tb,wb:i.wb,zb:i.zb,Eb:i.Eb}}}))).pb.count.value+=1,e.pb.ec=!1,e},delete(){if(this.pb.tb||Z(this),this.pb.ec&&!this.pb.ic)throw new X("Object already scheduled for deletion");ee(this);var e=this.pb;--e.count.value,0===e.count.value&&(e.zb?e.Eb.Qb(e.zb):e.wb.ub.Qb(e.tb)),this.pb.ic||(this.pb.zb=void 0,this.pb.tb=void 0)},isDeleted:function(){return!this.pb.tb},deleteLater:function(){if(this.pb.tb||Z(this),this.pb.ec&&!this.pb.ic)throw new X("Object already scheduled for deletion");return this.pb.ec=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(we.prototype,{xd(e){return this.Zc&&(e=this.Zc(e)),e},Nc(e){this.Qb?.(e)},Ob:be,Ab:function(e){function t(){return me(this.ub.Yb,this.qc?{wb:this.Fd,tb:r,Eb:this,zb:e}:{wb:this,tb:e})}var r=this.xd(e);if(!r)return this.Nc(e),null;var n=((e,t)=>{if(void 0===t)throw new X("ptr should not be undefined");for(;e.Bb;)t=e.lc(t),e=e.Bb;return pe[t]})(this.ub,r);if(void 0!==n)return 0===n.pb.count.value?(n.pb.tb=r,n.pb.zb=e,n.clone()):(n=n.clone(),this.Nc(e),n);if(n=this.ub.vd(r),!(n=ie[n]))return t.call(this);var i=fe(r,this.ub,(n=this.pc?n.pd:n.pointerType).ub);return null===i?t.call(this):me(n.ub.Yb,this.qc?{wb:n,tb:i,Eb:this,zb:e}:{wb:n,tb:i})}}),"undefined"!=typeof MainLoop&&MainLoop.qe.push((()=>{if(Oe){var e=Oe.bc;for(Oe.bc=Oe.jc,Oe.jc=e,e=Oe.Rb,Oe.Rb=Oe.vc,Oe.vc=e,e=0;21>=e;++e)Oe.Rb[e]=0}})),dr.Wd=(e,t,r,n,i,o,a,s,c,l)=>{zt(e,t,r,n,i,s,c,l).then(o).catch(a)},dr.re=zt,dr.Lb=Array(4096),dr.vb(Lt,{},"/"),dr.mkdir("/tmp"),dr.mkdir("/home"),dr.mkdir("/home/web_user"),function(){dr.mkdir("/dev"),jt(dr.Ub(1,3),{read:()=>0,write:(e,t,r,n)=>n,Cb:()=>0}),cr("/dev/null",dr.Ub(1,3)),Ct(dr.Ub(5,0),Ot),Ct(dr.Ub(6,0),Ut),cr("/dev/tty",dr.Ub(5,0)),cr("/dev/tty1",dr.Ub(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&($t(e),t=e.byteLength),e[--t]);dr.Pb("/dev","random",r),dr.Pb("/dev","urandom",r),dr.mkdir("/dev/shm"),dr.mkdir("/dev/shm/tmp")}(),function(){dr.mkdir("/proc");var e=dr.mkdir("/proc/self");dr.mkdir("/proc/self/fd"),dr.vb({vb(){var t=dr.createNode(e,"fd",16895,73);return t.rb={Cb:Lt.rb.Cb},t.qb={lookup(e,t){var r=nr(e=+t);return(e={parent:null,vb:{Xc:"fake"},qb:{readlink:()=>r.path},id:e+1}).parent=e},readdir:()=>Array.from(dr.streams.entries()).filter((([,e])=>e)).map((([e])=>e.toString()))},t}},{},"/proc/self/fd")}(),dr.ud={MEMFS:Lt};for(let e=0;32>e;++e)fr.push(Array(e));for(var wr=new Int32Array(288),yr=0;288>=yr;++yr)mr[yr]=wr.subarray(0,yr);if(r.noExitRuntime&&(G=r.noExitRuntime),r.preloadPlugins&&(Gt=r.preloadPlugins),r.print&&(T=r.print),r.printErr&&(P=r.printErr),r.wasmBinary&&(b=r.wasmBinary),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.shift()();r.addRunDependency=Mt,r.removeRunDependency=Dt,r.FS_preloadFile=zt,r.FS_unlink=(...e)=>dr.unlink(...e),r.FS_createPath=(...e)=>function(e,t){for(e="string"==typeof e?e:Jt(e),t=t.split("/").reverse();t.length;){var r=t.pop();if(r){var n=gt(e+"/"+r);try{dr.mkdir(n)}catch(e){if(20!=e.Tb)throw e}e=n}}return n}(...e),r.FS_createDevice=(...e)=>dr.Pb(...e),r.FS=dr,r.FS_createDataFile=(...e)=>Wt(...e),r.FS_createLazyFile=(...e)=>function(e,t,r,n,o){class a{H