@jupyterlite/xeus 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/comlink.worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see comlink.worker.js.LICENSE.txt */
|
|
2
|
-
define((()=>(()=>{var __webpack_modules__={704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityMonitor=void 0;const n=r(992);t.ActivityMonitor=class{constructor(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new n.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}get activityStopped(){return this._activityStopped}get timeout(){return this._timeout}set timeout(e){this._timeout=e}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,n.Signal.clearData(this))}_onSignalFired(e,t){clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=setTimeout((()=>{this._activityStopped.emit({sender:this._sender,args:this._args})}),this._timeout)}}},925:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(704),t),o(r(269),t),o(r(232),t),o(r(547),t),o(r(964),t),o(r(830),t),o(r(361),t),o(r(126),t),o(r(796),t),o(r(692),t)},269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},232:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LruCache=void 0,t.LruCache=class{constructor(e={}){this._map=new Map,this._maxSize=(null==e?void 0:e.maxSize)||128}get size(){return this._map.size}clear(){this._map.clear()}get(e){const t=this._map.get(e)||null;return null!=t&&(this._map.delete(e),this._map.set(e,t)),t}set(e,t){this._map.size>=this._maxSize&&this._map.delete(this._map.keys().next().value),this._map.set(e,t)}}},547:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownCodeBlocks=void 0,function(e){e.CODE_BLOCK_MARKER="```";const t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"];class r{constructor(e){this.startLine=e,this.code="",this.endLine=-1}}e.MarkdownCodeBlock=r,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];const n=t.split("\n"),o=[];let i=null;for(let t=0;t<n.length;t++){const a=n[t],s=0===a.indexOf(e.CODE_BLOCK_MARKER),u=null!=i;if(s||u)if(u)i&&(s?(i.endLine=t-1,o.push(i),i=null):i.code+=a+"\n");else{i=new r(t);const n=a.indexOf(e.CODE_BLOCK_MARKER),s=a.lastIndexOf(e.CODE_BLOCK_MARKER);n!==s&&(i.code=a.substring(n+e.CODE_BLOCK_MARKER.length,s),i.endLine=t,o.push(i),i=null)}}return o}}(r||(t.MarkdownCodeBlocks=r={}))},964:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PageConfig=void 0;const coreutils_1=__webpack_require__(764),minimist_1=__importDefault(__webpack_require__(600)),url_1=__webpack_require__(692);var PageConfig;(function(PageConfig){function getOption(name){if(configData)return configData[name]||getBodyData(name);configData=Object.create(null);let found=!1;if("undefined"!=typeof document&&document){const e=document.getElementById("jupyter-config-data");e&&(configData=JSON.parse(e.textContent||""),found=!0)}if(!found&&"undefined"!=typeof process&&process.argv)try{const cli=(0,minimist_1.default)(process.argv.slice(2)),path=__webpack_require__(942);let fullPath="";"jupyter-config-data"in cli?fullPath=path.resolve(cli["jupyter-config-data"]):"JUPYTER_CONFIG_DATA"in process.env&&(fullPath=path.resolve(process.env.JUPYTER_CONFIG_DATA)),fullPath&&(configData=eval("require")(fullPath))}catch(e){console.error(e)}if(coreutils_1.JSONExt.isObject(configData))for(const e in configData)"string"!=typeof configData[e]&&(configData[e]=JSON.stringify(configData[e]));else configData=Object.create(null);return configData[name]||getBodyData(name)}function setOption(e,t){const r=getOption(e);return configData[e]=t,r}function getBaseUrl(){return url_1.URLExt.normalize(getOption("baseUrl")||"/")}function getTreeUrl(){return url_1.URLExt.join(getBaseUrl(),getOption("treeUrl"))}function getShareUrl(){return url_1.URLExt.normalize(getOption("shareUrl")||getBaseUrl())}function getTreeShareUrl(){return url_1.URLExt.normalize(url_1.URLExt.join(getShareUrl(),getOption("treeUrl")))}function getUrl(e){var t,r,n,o;let i=e.toShare?getShareUrl():getBaseUrl();const a=null!==(t=e.mode)&&void 0!==t?t:getOption("mode"),s=null!==(r=e.workspace)&&void 0!==r?r:getOption("workspace"),u="single-document"===a?"doc":"lab";i=url_1.URLExt.join(i,u),s!==PageConfig.defaultWorkspace&&(i=url_1.URLExt.join(i,"workspaces",encodeURIComponent(null!==(n=getOption("workspace"))&&void 0!==n?n:PageConfig.defaultWorkspace)));const l=null!==(o=e.treePath)&&void 0!==o?o:getOption("treePath");return l&&(i=url_1.URLExt.join(i,"tree",url_1.URLExt.encodeParts(l))),i}function getWsUrl(e){let t=getOption("wsUrl");if(!t){if(0!==(e=e?url_1.URLExt.normalize(e):getBaseUrl()).indexOf("http"))return"";t="ws"+e.slice(4)}return url_1.URLExt.normalize(t)}function getNBConvertURL({path:e,format:t,download:r}){const n=url_1.URLExt.encodeParts(e),o=url_1.URLExt.join(getBaseUrl(),"nbconvert",t,n);return r?o+"?download=true":o}function getToken(){return getOption("token")||getBodyData("jupyterApiToken")}function getNotebookVersion(){const e=getOption("notebookVersion");return""===e?[0,0,0]:JSON.parse(e)}PageConfig.getOption=getOption,PageConfig.setOption=setOption,PageConfig.getBaseUrl=getBaseUrl,PageConfig.getTreeUrl=getTreeUrl,PageConfig.getShareUrl=getShareUrl,PageConfig.getTreeShareUrl=getTreeShareUrl,PageConfig.getUrl=getUrl,PageConfig.defaultWorkspace="default",PageConfig.getWsUrl=getWsUrl,PageConfig.getNBConvertURL=getNBConvertURL,PageConfig.getToken=getToken,PageConfig.getNotebookVersion=getNotebookVersion;let configData=null,Extension;function getBodyData(e){if("undefined"==typeof document||!document.body)return"";const t=document.body.dataset[e];return void 0===t?"":decodeURIComponent(t)}!function(e){function t(e){try{const t=getOption(e);if(t)return JSON.parse(t)}catch(t){console.warn(`Unable to parse ${e}.`,t)}return[]}e.deferred=t("deferredExtensions"),e.disabled=t("disabledExtensions"),e.isDeferred=function(t){const r=t.indexOf(":");let n="";return-1!==r&&(n=t.slice(0,r)),e.deferred.some((e=>e===t||n&&e===n))},e.isDisabled=function(t){const r=t.indexOf(":");let n="";return-1!==r&&(n=t.slice(0,r)),e.disabled.some((e=>e===t||n&&e===n))}}(Extension=PageConfig.Extension||(PageConfig.Extension={}))})(PageConfig||(exports.PageConfig=PageConfig={}))},830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathExt=void 0;const n=r(942);var o;!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(...e){const r=n.posix.join(...e);return"."===r?"":t(r)},e.joinWithLeadingSlash=function(...e){const t=n.posix.join(...e);return"."===t?"":t},e.basename=function(e,t){return n.posix.basename(e,t)},e.dirname=function(e){const r=t(n.posix.dirname(e));return"."===r?"":r},e.extname=function(e){return n.posix.extname(e)},e.normalize=function(e){return""===e?"":t(n.posix.normalize(e))},e.resolve=function(...e){return t(n.posix.resolve(...e))},e.relative=function(e,r){return t(n.posix.relative(e,r))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e},e.removeSlash=t}(o||(t.PathExt=o={}))},361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signalToPromise=void 0;const n=r(764);t.signalToPromise=function(e,t){const r=new n.PromiseDelegate;function o(){e.disconnect(i)}function i(e,t){o(),r.resolve([e,t])}return e.connect(i),(null!=t?t:0)>0&&setTimeout((()=>{o(),r.reject(`Signal not emitted within ${t} ms.`)}),t),r.promise}},126:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,function(e){e.jsIndexToCharIndex=function(e,t){return e},e.charIndexToJsIndex=function(e,t){return e},e.camelCase=function(e,t=!1){return e.replace(/^(\w)|[\s-_:]+(\w)/g,(function(e,r,n){return n?n.toUpperCase():t?r.toUpperCase():r.toLowerCase()}))},e.titleCase=function(e){return(e||"").toLowerCase().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")}}(r||(t.Text=r={}))},796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;const r=[{name:"years",milliseconds:31536e6},{name:"months",milliseconds:2592e6},{name:"days",milliseconds:864e5},{name:"hours",milliseconds:36e5},{name:"minutes",milliseconds:6e4},{name:"seconds",milliseconds:1e3}];var n;!function(e){e.formatHuman=function(e,t="long"){const n=document.documentElement.lang||"en",o=new Intl.RelativeTimeFormat(n,{numeric:"auto",style:t}),i=new Date(e).getTime()-Date.now();for(let e of r){const t=Math.ceil(i/e.milliseconds);if(0!==t)return o.format(t,e.name)}return o.format(0,"seconds")},e.format=function(e){const t=document.documentElement.lang||"en";return new Intl.DateTimeFormat(t,{dateStyle:"short",timeStyle:"short"}).format(new Date(e))}}(n||(t.Time=n={}))},692:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.URLExt=void 0;const o=r(942),i=n(r(225));var a;!function(e){function t(e){if("undefined"!=typeof document&&document){const t=document.createElement("a");return t.href=e,t}return(0,i.default)(e)}function r(...e){let t=(0,i.default)(e[0],{});const r=""===t.protocol&&t.slashes;r&&(t=(0,i.default)(e[0],"https:"+e[0]));const n=`${r?"":t.protocol}${t.slashes?"//":""}${t.auth}${t.auth?"@":""}${t.host}`,a=o.posix.join(`${n&&"/"!==t.pathname[0]?"/":""}${t.pathname}`,...e.slice(1));return`${n}${"."===a?"":a}`}e.parse=t,e.getHostName=function(e){return(0,i.default)(e).hostname},e.normalize=function(e){return e&&t(e).toString()},e.join=r,e.encodeParts=function(e){return r(...e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){const t=Object.keys(e).filter((e=>e.length>0));return t.length?"?"+t.map((t=>{const r=encodeURIComponent(String(e[t]));return t+(r?"="+r:"")})).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce(((e,t)=>{const[r,n]=t.split("=");return r.length>0&&(e[r]=decodeURIComponent(n||"")),e}),{})},e.isLocal=function(e,r=!1){const{protocol:n}=t(e);return(!n||0!==e.toLowerCase().indexOf(n))&&(r?0!==e.indexOf("//"):0!==e.indexOf("/"))}}(a||(t.URLExt=a={}))},135:(e,t,r)=>{"use strict";var n,o,i;function*a(...e){for(const t of e)yield*t}function*s(){}function*u(e,t=0){for(const r of e)yield[t++,r]}function*l(e,t){let r=0;for(const n of e)t(n,r++)&&(yield n)}function c(e,t){let r=0;for(const n of e)if(t(n,r++))return n}function f(e,t){let r=0;for(const n of e)if(t(n,r++))return r-1;return-1}function h(e,t){let r;for(const n of e)void 0!==r?t(n,r)<0&&(r=n):r=n;return r}function d(e,t){let r;for(const n of e)void 0!==r?t(n,r)>0&&(r=n):r=n;return r}function p(e,t){let r,n,o=!0;for(const i of e)o?(r=i,n=i,o=!1):t(i,r)<0?r=i:t(i,n)>0&&(n=i);return o?void 0:[r,n]}function m(e){return Array.from(e)}function g(e){const t={};for(const[r,n]of e)t[r]=n;return t}function v(e,t){let r=0;for(const n of e)if(!1===t(n,r++))return}function w(e,t){let r=0;for(const n of e)if(!1===t(n,r++))return!1;return!0}function y(e,t){let r=0;for(const n of e)if(t(n,r++))return!0;return!1}function*_(e,t){let r=0;for(const n of e)yield t(n,r++)}function*E(e,t,r){void 0===t?(t=e,e=0,r=1):void 0===r&&(r=1);const n=o.rangeLength(e,t,r);for(let t=0;t<n;t++)yield e+r*t}function b(e,t,r){const n=e[Symbol.iterator]();let o=0,i=n.next();if(i.done&&void 0===r)throw new TypeError("Reduce of empty iterable with no initial value.");if(i.done)return r;let a,s,u=n.next();if(u.done&&void 0===r)return i.value;if(u.done)return t(r,i.value,o++);for(a=t(void 0===r?i.value:t(r,i.value,o++),u.value,o++);!(s=n.next()).done;)a=t(a,s.value,o++);return a}function*k(e,t){for(;0<t--;)yield e}function*P(e){yield e}function*S(e){if("function"==typeof e.retro)yield*e.retro();else for(let t=e.length-1;t>-1;t--)yield e[t]}function A(e){let t=[],r=new Set,n=new Map;for(const t of e)o(t);for(const[e]of n)i(e);return t;function o(e){let[t,r]=e,o=n.get(r);o?o.push(t):n.set(r,[t])}function i(e){if(r.has(e))return;r.add(e);let o=n.get(e);if(o)for(const e of o)i(e);t.push(e)}}function*x(e,t){let r=0;for(const n of e)0==r++%t&&(yield n)}function*R(e,t){if(t<1)return;const r=e[Symbol.iterator]();let n;for(;0<t--&&!(n=r.next()).done;)yield n.value}function*T(...e){const t=e.map((e=>e[Symbol.iterator]()));let r=t.map((e=>e.next()));for(;w(r,(e=>!e.done));r=t.map((e=>e.next())))yield r.map((e=>e.value))}r.r(t),r.d(t,{ArrayExt:()=>n,StringExt:()=>i,chain:()=>a,each:()=>v,empty:()=>s,enumerate:()=>u,every:()=>w,filter:()=>l,find:()=>c,findIndex:()=>f,map:()=>_,max:()=>d,min:()=>h,minmax:()=>p,once:()=>P,range:()=>E,reduce:()=>b,repeat:()=>k,retro:()=>S,some:()=>y,stride:()=>x,take:()=>R,toArray:()=>m,toObject:()=>g,topologicSort:()=>A,zip:()=>T}),function(e){function t(e,t,r=0,n=-1){let o,i=e.length;if(0===i)return-1;r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n){let o=(r+n)%i;if(e[o]===t)return o}return-1}function r(e,t,r=-1,n=0){let o,i=e.length;if(0===i)return-1;o=(r=r<0?Math.max(0,r+i):Math.min(r,i-1))<(n=n<0?Math.max(0,n+i):Math.min(n,i-1))?r+1+(i-n):r-n+1;for(let n=0;n<o;++n){let o=(r-n+i)%i;if(e[o]===t)return o}return-1}function n(e,t,r=0,n=-1){let o,i=e.length;if(0===i)return-1;r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n){let o=(r+n)%i;if(t(e[o],o))return o}return-1}function o(e,t,r=-1,n=0){let o,i=e.length;if(0===i)return-1;o=(r=r<0?Math.max(0,r+i):Math.min(r,i-1))<(n=n<0?Math.max(0,n+i):Math.min(n,i-1))?r+1+(i-n):r-n+1;for(let n=0;n<o;++n){let o=(r-n+i)%i;if(t(e[o],o))return o}return-1}function i(e,t=0,r=-1){let n=e.length;if(!(n<=1))for(t=t<0?Math.max(0,t+n):Math.min(t,n-1),r=r<0?Math.max(0,r+n):Math.min(r,n-1);t<r;){let n=e[t],o=e[r];e[t++]=o,e[r--]=n}}function a(e,t){let r=e.length;if(t<0&&(t+=r),t<0||t>=r)return;let n=e[t];for(let n=t+1;n<r;++n)e[n-1]=e[n];return e.length=r-1,n}e.firstIndexOf=t,e.lastIndexOf=r,e.findFirstIndex=n,e.findLastIndex=o,e.findFirstValue=function(e,t,r=0,o=-1){let i=n(e,t,r,o);return-1!==i?e[i]:void 0},e.findLastValue=function(e,t,r=-1,n=0){let i=o(e,t,r,n);return-1!==i?e[i]:void 0},e.lowerBound=function(e,t,r,n=0,o=-1){let i=e.length;if(0===i)return 0;let a=n=n<0?Math.max(0,n+i):Math.min(n,i-1),s=(o=o<0?Math.max(0,o+i):Math.min(o,i-1))-n+1;for(;s>0;){let n=s>>1,o=a+n;r(e[o],t)<0?(a=o+1,s-=n+1):s=n}return a},e.upperBound=function(e,t,r,n=0,o=-1){let i=e.length;if(0===i)return 0;let a=n=n<0?Math.max(0,n+i):Math.min(n,i-1),s=(o=o<0?Math.max(0,o+i):Math.min(o,i-1))-n+1;for(;s>0;){let n=s>>1,o=a+n;r(e[o],t)>0?s=n:(a=o+1,s-=n+1)}return a},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;++n)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0},e.slice=function(e,t={}){let{start:r,stop:n,step:o}=t;if(void 0===o&&(o=1),0===o)throw new Error("Slice `step` cannot be zero.");let i,a=e.length;void 0===r?r=o<0?a-1:0:r<0?r=Math.max(r+a,o<0?-1:0):r>=a&&(r=o<0?a-1:a),void 0===n?n=o<0?-1:a:n<0?n=Math.max(n+a,o<0?-1:0):n>=a&&(n=o<0?a-1:a),i=o<0&&n>=r||o>0&&r>=n?0:o<0?Math.floor((n-r+1)/o+1):Math.floor((n-r-1)/o+1);let s=[];for(let t=0;t<i;++t)s[t]=e[r+t*o];return s},e.move=function(e,t,r){let n=e.length;if(n<=1)return;if((t=t<0?Math.max(0,t+n):Math.min(t,n-1))===(r=r<0?Math.max(0,r+n):Math.min(r,n-1)))return;let o=e[t],i=t<r?1:-1;for(let n=t;n!==r;n+=i)e[n]=e[n+i];e[r]=o},e.reverse=i,e.rotate=function(e,t,r=0,n=-1){let o=e.length;if(o<=1)return;if((r=r<0?Math.max(0,r+o):Math.min(r,o-1))>=(n=n<0?Math.max(0,n+o):Math.min(n,o-1)))return;let a=n-r+1;if(t>0?t%=a:t<0&&(t=(t%a+a)%a),0===t)return;let s=r+t;i(e,r,s-1),i(e,s,n),i(e,r,n)},e.fill=function(e,t,r=0,n=-1){let o,i=e.length;if(0!==i){r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n)e[(r+n)%i]=t}},e.insert=function(e,t,r){let n=e.length;t=t<0?Math.max(0,t+n):Math.min(t,n);for(let r=n;r>t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=a,e.removeFirstOf=function(e,r,n=0,o=-1){let i=t(e,r,n,o);return-1!==i&&a(e,i),i},e.removeLastOf=function(e,t,n=-1,o=0){let i=r(e,t,n,o);return-1!==i&&a(e,i),i},e.removeAllOf=function(e,t,r=0,n=-1){let o=e.length;if(0===o)return 0;r=r<0?Math.max(0,r+o):Math.min(r,o-1),n=n<0?Math.max(0,n+o):Math.min(n,o-1);let i=0;for(let a=0;a<o;++a)r<=n&&a>=r&&a<=n&&e[a]===t||n<r&&(a<=n||a>=r)&&e[a]===t?i++:i>0&&(e[a-i]=e[a]);return i>0&&(e.length=o-i),i},e.removeFirstWhere=function(e,t,r=0,o=-1){let i,s=n(e,t,r,o);return-1!==s&&(i=a(e,s)),{index:s,value:i}},e.removeLastWhere=function(e,t,r=-1,n=0){let i,s=o(e,t,r,n);return-1!==s&&(i=a(e,s)),{index:s,value:i}},e.removeAllWhere=function(e,t,r=0,n=-1){let o=e.length;if(0===o)return 0;r=r<0?Math.max(0,r+o):Math.min(r,o-1),n=n<0?Math.max(0,n+o):Math.min(n,o-1);let i=0;for(let a=0;a<o;++a)r<=n&&a>=r&&a<=n&&t(e[a],a)||n<r&&(a<=n||a>=r)&&t(e[a],a)?i++:i>0&&(e[a-i]=e[a]);return i>0&&(e.length=o-i),i}}(n||(n={})),function(e){e.rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||e<t&&r<0?0:Math.ceil((t-e)/r)}}(o||(o={})),function(e){function t(e,t,r=0){let n=new Array(t.length);for(let o=0,i=r,a=t.length;o<a;++o,++i){if(i=e.indexOf(t[o],i),-1===i)return null;n[o]=i}return n}e.findIndices=t,e.matchSumOfSquares=function(e,r,n=0){let o=t(e,r,n);if(!o)return null;let i=0;for(let e=0,t=o.length;e<t;++e){let t=o[e]-n;i+=t*t}return{score:i,indices:o}},e.matchSumOfDeltas=function(e,r,n=0){let o=t(e,r,n);if(!o)return null;let i=0,a=n-1;for(let e=0,t=o.length;e<t;++e){let t=o[e];i+=t-a-1,a=t}return{score:i,indices:o}},e.highlight=function(e,t,r){let n=[],o=0,i=0,a=t.length;for(;o<a;){let s=t[o],u=t[o];for(;++o<a&&t[o]===u+1;)u++;i<s&&n.push(e.slice(i,s)),s<u+1&&n.push(r(e.slice(s,u+1))),i=u+1}return i<e.length&&n.push(e.slice(i)),n},e.cmp=function(e,t){return e<t?-1:e>t?1:0}}(i||(i={}))},764:function(e,t,r){!function(e,t){"use strict";e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}function n(e,o){if(e===o)return!0;if(t(e)||t(o))return!1;let i=r(e),a=r(o);return i===a&&(i&&a?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;++r)if(!n(e[r],t[r]))return!1;return!0}(e,o):function(e,t){if(e===t)return!0;for(let r in e)if(void 0!==e[r]&&!(r in t))return!1;for(let r in t)if(void 0!==t[r]&&!(r in e))return!1;for(let r in e){let o=e[r],i=t[r];if(void 0!==o||void 0!==i){if(void 0===o||void 0===i)return!1;if(!n(o,i))return!1}}return!0}(e,o))}function o(e){return t(e)?e:r(e)?function(e){let t=new Array(e.length);for(let r=0,n=e.length;r<n;++r)t[r]=o(e[r]);return t}(e):function(e){let t={};for(let r in e){let n=e[r];void 0!==n&&(t[r]=o(n))}return t}(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r,e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=n,e.deepCopy=o}(e.JSONExt||(e.JSONExt={}));var r;!function(e){class r{constructor(e){var t,r,n,o;this._activated=!1,this._promise=null,this._service=null,this.id=e.id,this.description=null!==(t=e.description)&&void 0!==t?t:"",this.activate=e.activate,this.deactivate=null!==(r=e.deactivate)&&void 0!==r?r:null,this.provides=null!==(n=e.provides)&&void 0!==n?n:null,this.autoStart=null!==(o=e.autoStart)&&void 0!==o&&o,this.requires=e.requires?e.requires.slice():[],this.optional=e.optional?e.optional.slice():[]}get activated(){return this._activated}set activated(e){this._activated=e}get service(){return this._service}set service(e){this._service=e}get promise(){return this._promise}set promise(e){this._promise=e}}e.createPluginData=function(e){return new r(e)},e.ensureNoCycle=function(e,t,r){const n=[...e.requires,...e.optional],o=n=>{if(n===e.provides)return!0;const a=r.get(n);if(!a)return!1;const s=t.get(a),u=[...s.requires,...s.optional];return 0!==u.length&&(i.push(a),!!u.some(o)||(i.pop(),!1))};if(!e.provides||0===n.length)return;const i=[e.id];if(n.some(o))throw new ReferenceError(`Cycle detected: ${i.join(" -> ")}.`)},e.findDependents=function(e,r,n){const o=new Array,i=e=>{const t=r.get(e),i=[...t.requires,...t.optional];o.push(...i.reduce(((t,r)=>{const o=n.get(r);return o&&t.push([e,o]),t}),[]))};for(const e of r.keys())i(e);const a=o.filter((t=>t[1]===e));let s=0;for(;a.length>s;){const e=a.length,t=new Set(a.map((e=>e[0])));for(const e of t)o.filter((t=>t[1]===e)).forEach((e=>{a.includes(e)||a.push(e)}));s=e}const u=t.topologicSort(a),l=u.findIndex((t=>t===e));return-1===l?[e]:u.slice(0,l+1)},e.collectStartupPlugins=function(e,t){const r=new Set;for(const t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(const e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(const e of t.ignorePlugins)r.delete(e);return Array.from(r)}}(r||(r={}));function n(e){let t=0;for(let r=0,n=e.length;r<n;++r)r%4==0&&(t=4294967295*Math.random()>>>0),e[r]=255&t,t>>>=8}e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{const e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:n})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){const t=new Uint8Array(16),r=new Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter((([e,t])=>"defer"===t.autoStart)).map((([e,t])=>e))}getPluginDescription(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==r?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==r&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);const t=r.createPluginData(e);r.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(const t of e)this.registerPlugin(t)}deregisterPlugin(e,t){const r=this._plugins.get(e);if(r){if(r.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;const r=t.requires.map((e=>this.resolveRequiredService(e))),n=t.optional.map((e=>this.resolveOptionalService(e)));return t.promise=Promise.all([...r,...n]).then((e=>t.activate.apply(void 0,[this.application,...e]))).then((e=>{t.service=e,t.activated=!0,t.promise=null})).catch((e=>{throw t.promise=null,e})),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{const e=this.deferredPlugins.filter((e=>this._plugins.get(e).autoStart)).map((e=>this.activatePlugin(e)));await Promise.all(e);break}case"startUp":{const e=r.collectStartupPlugins(this._plugins,t).map((async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}}));await Promise.all(e);break}}}async deactivatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);const n=r.findDependents(e,this._plugins,this._services),o=n.map((e=>this._plugins.get(e)));for(const t of o)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(const e of o){const t=[...e.requires,...e.optional].map((e=>{const t=this._services.get(e);return t?this._plugins.get(t).service:null}));await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return n.pop(),n}async resolveRequiredService(e){const t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);const r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){const t=this._services.get(e);if(!t)return null;const r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=null!=t?t:"",this._tokenStructuralPropertyT=null}}}(t,r(135))},992:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Signal:()=>a,Stream:()=>s});var n,o=r(135),i=r(764);class a{constructor(e){this.sender=e}connect(e,t){return n.connect(this,e,t)}disconnect(e,t){return n.disconnect(this,e,t)}emit(e){n.emit(this,e)}}!function(e){e.disconnectBetween=function(e,t){n.disconnectBetween(e,t)},e.disconnectSender=function(e){n.disconnectSender(e)},e.disconnectReceiver=function(e){n.disconnectReceiver(e)},e.disconnectAll=function(e){n.disconnectAll(e)},e.clearData=function(e){n.disconnectAll(e)},e.getExceptionHandler=function(){return n.exceptionHandler},e.setExceptionHandler=function(e){let t=n.exceptionHandler;return n.exceptionHandler=e,t}}(a||(a={}));class s extends a{constructor(){super(...arguments),this._pending=new i.PromiseDelegate}async*[Symbol.asyncIterator](){let e=this._pending;for(;;)try{const{args:t,next:r}=await e.promise;e=r,yield t}catch(e){return}}emit(e){const t=this._pending,r=this._pending=new i.PromiseDelegate;t.resolve({args:e,next:r}),super.emit(e)}stop(){this._pending.promise.catch((()=>{})),this._pending.reject("stop"),this._pending=new i.PromiseDelegate}}!function(e){function t(e){let t=n.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,c(i.get(t))}c(t)}}function r(e){let t=i.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,c(n.get(t))}c(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let o=n.get(e.sender);if(o||(o=[],n.set(e.sender,o)),u(o,e,t,r))return!1;let a=r||t,s=i.get(a);s||(s=[],i.set(a,s));let l={signal:e,slot:t,thisArg:r};return o.push(l),s.push(l),!0},e.disconnect=function(e,t,r){r=r||void 0;let o=n.get(e.sender);if(!o||0===o.length)return!1;let a=u(o,e,t,r);if(!a)return!1;let s=r||t,l=i.get(s);return a.signal=null,c(o),c(l),!0},e.disconnectBetween=function(e,t){let r=n.get(e);if(!r||0===r.length)return;let o=i.get(t);if(o&&0!==o.length){for(const t of o)t.signal&&t.signal.sender===e&&(t.signal=null);c(r),c(o)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(e,t){let r=n.get(e.sender);if(r&&0!==r.length)for(let n=0,o=r.length;n<o;++n){let o=r[n];o.signal===e&&l(o,t)}};const n=new WeakMap,i=new WeakMap,a=new Set,s="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function u(e,t,r,n){return(0,o.find)(e,(e=>e.signal===t&&e.slot===r&&e.thisArg===n))}function l(t,r){let{signal:n,slot:o,thisArg:i}=t;try{o.call(i,n.sender,r)}catch(t){e.exceptionHandler(t)}}function c(e){0===a.size&&s(f),a.add(e)}function f(){a.forEach(h),a.clear()}function h(e){o.ArrayExt.removeAllWhere(e,d)}function d(e){return null===e.signal}}(n||(n={}))},600:e=>{"use strict";function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function r(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,n){n||(n={});var o={bools:{},strings:{},unknownFn:null};"function"==typeof n.unknown&&(o.unknownFn=n.unknown),"boolean"==typeof n.boolean&&n.boolean?o.allBools=!0:[].concat(n.boolean).filter(Boolean).forEach((function(e){o.bools[e]=!0}));var i={};function a(e){return i[e].some((function(e){return o.bools[e]}))}Object.keys(n.alias||{}).forEach((function(e){i[e]=[].concat(n.alias[e]),i[e].forEach((function(t){i[t]=[e].concat(i[e].filter((function(e){return t!==e})))}))})),[].concat(n.string).filter(Boolean).forEach((function(e){o.strings[e]=!0,i[e]&&[].concat(i[e]).forEach((function(e){o.strings[e]=!0}))}));var s=n.default||{},u={_:[]};function l(e,t,n){for(var i=e,a=0;a<t.length-1;a++){var s=t[a];if(r(i,s))return;void 0===i[s]&&(i[s]={}),i[s]!==Object.prototype&&i[s]!==Number.prototype&&i[s]!==String.prototype||(i[s]={}),i[s]===Array.prototype&&(i[s]=[]),i=i[s]}var u=t[t.length-1];r(i,u)||(i!==Object.prototype&&i!==Number.prototype&&i!==String.prototype||(i={}),i===Array.prototype&&(i=[]),void 0===i[u]||o.bools[u]||"boolean"==typeof i[u]?i[u]=n:Array.isArray(i[u])?i[u].push(n):i[u]=[i[u],n])}function c(e,r,n){if(!n||!o.unknownFn||function(e,t){return o.allBools&&/^--[^=]+$/.test(t)||o.strings[e]||o.bools[e]||i[e]}(e,n)||!1!==o.unknownFn(n)){var a=!o.strings[e]&&t(r)?Number(r):r;l(u,e.split("."),a),(i[e]||[]).forEach((function(e){l(u,e.split("."),a)}))}}Object.keys(o.bools).forEach((function(e){c(e,void 0!==s[e]&&s[e])}));var f=[];-1!==e.indexOf("--")&&(f=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var h=0;h<e.length;h++){var d,p,m=e[h];if(/^--.+=/.test(m)){var g=m.match(/^--([^=]+)=([\s\S]*)$/);d=g[1];var v=g[2];o.bools[d]&&(v="false"!==v),c(d,v,m)}else if(/^--no-.+/.test(m))c(d=m.match(/^--no-(.+)/)[1],!1,m);else if(/^--.+/.test(m))d=m.match(/^--(.+)/)[1],void 0===(p=e[h+1])||/^(-|--)[^-]/.test(p)||o.bools[d]||o.allBools||i[d]&&a(d)?/^(true|false)$/.test(p)?(c(d,"true"===p,m),h+=1):c(d,!o.strings[d]||"",m):(c(d,p,m),h+=1);else if(/^-[^-]+/.test(m)){for(var w=m.slice(1,-1).split(""),y=!1,_=0;_<w.length;_++)if("-"!==(p=m.slice(_+2))){if(/[A-Za-z]/.test(w[_])&&"="===p[0]){c(w[_],p.slice(1),m),y=!0;break}if(/[A-Za-z]/.test(w[_])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){c(w[_],p,m),y=!0;break}if(w[_+1]&&w[_+1].match(/\W/)){c(w[_],m.slice(_+2),m),y=!0;break}c(w[_],!o.strings[w[_]]||"",m)}else c(w[_],p,m);d=m.slice(-1)[0],y||"-"===d||(!e[h+1]||/^(-|--)[^-]/.test(e[h+1])||o.bools[d]||i[d]&&a(d)?e[h+1]&&/^(true|false)$/.test(e[h+1])?(c(d,"true"===e[h+1],m),h+=1):c(d,!o.strings[d]||"",m):(c(d,e[h+1],m),h+=1))}else if(o.unknownFn&&!1===o.unknownFn(m)||u._.push(o.strings._||!t(m)?m:Number(m)),n.stopEarly){u._.push.apply(u._,e.slice(h+1));break}}return Object.keys(s).forEach((function(e){var t,r,n;t=u,r=e.split("."),n=t,r.slice(0,-1).forEach((function(e){n=n[e]||{}})),r[r.length-1]in n||(l(u,e.split("."),s[e]),(i[e]||[]).forEach((function(t){l(u,t.split("."),s[e])})))})),n["--"]?u["--"]=f.slice():f.forEach((function(e){u._.push(e)})),u}},942:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",o=0):o=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),i=s,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var o=arguments[r];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,a=i-o,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>l&&(47===e.charCodeAt(o+f)?c=f:0===f&&(c=0));break}var h=e.charCodeAt(o+f);if(h!==r.charCodeAt(s+f))break;47===h&&(c=f)}var d="";for(f=o+c+1;f<=i;++f)f!==i&&47!==e.charCodeAt(f)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,o=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===r.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=u))}return o===i?i=u:-1===i&&(i=e.length),e.slice(o,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var r=-1,n=0,o=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===o&&(i=!1,o=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=s+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,o=e.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=n;--c)if(47!==(o=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===o?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&i?e.slice(1,u):e.slice(s,u)):(0===s&&i?(r.name=e.slice(1,a),r.base=e.slice(1,u)):(r.name=e.slice(s,a),r.base=e.slice(s,u)),r.ext=e.slice(a,u)),s>0?r.dir=e.slice(0,s-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},359:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;a.push(i+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),a=n(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},62:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},225:(e,t,r)=>{"use strict";var n=r(62),o=r(359),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function f(e){return(e||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function p(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new v(unescape(e.pathname),{});else if("string"===i)for(t in o=new v(e,{}),d)delete o[t];else if("object"===i){for(t in e)t in d||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=f(e)).replace(a,""),t=t||{};var r,n=l.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],u=0;return i?s?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):s?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):m(o)?r=n[4]:o?i&&(r=r.slice(2)):u>=2&&m(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||m(o),slashesCount:u,rest:r}}function v(e,t,r){if(e=(e=f(e)).replace(a,""),!(this instanceof v))return new v(e,t,r);var i,s,u,l,d,w,y=h.slice(),_=typeof t,E=this,b=0;for("object"!==_&&"string"!==_&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(s=g(e||"",t=p(t))).protocol&&!s.slashes,E.slashes=s.slashes||i&&t.slashes,E.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||c.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(E.protocol)))&&(y[3]=[/(.*)/,"pathname"]);b<y.length;b++)"function"!=typeof(l=y[b])?(u=l[0],w=l[1],u!=u?E[w]=e:"string"==typeof u?~(d="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(E[w]=e.slice(0,d),e=e.slice(d+l[2])):(E[w]=e.slice(d),e=e.slice(0,d))):(d=u.exec(e))&&(E[w]=d[1],e=e.slice(0,d.index)),E[w]=E[w]||i&&l[3]&&t[w]||"",l[4]&&(E[w]=E[w].toLowerCase())):e=l(e,E);r&&(E.query=r(E.query)),i&&t.slashes&&"/"!==E.pathname.charAt(0)&&(""!==E.pathname||""!==t.pathname)&&(E.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(E.pathname,t.pathname)),"/"!==E.pathname.charAt(0)&&m(E.protocol)&&(E.pathname="/"+E.pathname),n(E.port,E.protocol)||(E.host=E.hostname,E.port=""),E.username=E.password="",E.auth&&(~(d=E.auth.indexOf(":"))?(E.username=E.auth.slice(0,d),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=E.auth.slice(d+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(E.auth)),E.auth=E.password?E.username+":"+E.password:E.username),E.origin="file:"!==E.protocol&&m(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString()}v.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,u.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<h.length;l++){var c=h[l];c[4]&&(i[c[1]]=i[c[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&m(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||u.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},v.extractProtocol=g,v.location=p,v.trimLeft=f,v.qs=o,e.exports=v}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{XeusComlinkKernel:()=>Ft});const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),r=Symbol("Comlink.releaseProxy"),n=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),i=e=>"object"==typeof e&&null!==e||"function"==typeof e,a={canHandle:t=>i(t)&&t[e],serialize(e){const{port1:t,port2:r}=new MessageChannel;return u(e,t),[r,[r]]},deserialize:e=>(e.start(),function(e){const t=new Map;return e.addEventListener("message",(function(e){const{data:r}=e;if(!r||!r.id)return;const n=t.get(r.id);if(n)try{n(r)}finally{t.delete(r.id)}})),p(e,t,[],void 0)}(e))},s=new Map([["proxy",a],["throw",{canHandle:e=>i(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function u(t,r=globalThis,i=["*"]){r.addEventListener("message",(function a(s){if(!s||!s.data)return;if(!function(e,t){for(const r of e){if(t===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}return!1}(i,s.origin))return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`);const{id:c,type:f,path:h}=Object.assign({path:[]},s.data),d=(s.data.argumentList||[]).map(w);let p;try{const r=h.slice(0,-1).reduce(((e,t)=>e[t]),t),n=h.reduce(((e,t)=>e[t]),t);switch(f){case"GET":p=n;break;case"SET":r[h.slice(-1)[0]]=w(s.data.value),p=!0;break;case"APPLY":p=n.apply(r,d);break;case"CONSTRUCT":p=function(t){return Object.assign(t,{[e]:!0})}(new n(...d));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;u(t,r),p=function(e,t){return g.set(e,t),e}(e,[e])}break;case"RELEASE":p=void 0;break;default:return}}catch(e){p={value:e,[o]:0}}Promise.resolve(p).catch((e=>({value:e,[o]:0}))).then((e=>{const[o,i]=v(e);r.postMessage(Object.assign(Object.assign({},o),{id:c}),i),"RELEASE"===f&&(r.removeEventListener("message",a),l(r),n in t&&"function"==typeof t[n]&&t[n]())})).catch((e=>{const[t,n]=v({value:new TypeError("Unserializable return value"),[o]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),n)}))})),r.start&&r.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function c(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return y(e,new Map,{type:"RELEASE"}).then((()=>{l(e)}))}const h=new WeakMap,d="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(h.get(e)||0)-1;h.set(e,t),0===t&&f(e)}));function p(e,n,o=[],i=function(){}){let a=!1;const s=new Proxy(i,{get(t,i){if(c(a),i===r)return()=>{!function(e){d&&d.unregister(e)}(s),f(e),n.clear(),a=!0};if("then"===i){if(0===o.length)return{then:()=>s};const t=y(e,n,{type:"GET",path:o.map((e=>e.toString()))}).then(w);return t.then.bind(t)}return p(e,n,[...o,i])},set(t,r,i){c(a);const[s,u]=v(i);return y(e,n,{type:"SET",path:[...o,r].map((e=>e.toString())),value:s},u).then(w)},apply(r,i,s){c(a);const u=o[o.length-1];if(u===t)return y(e,n,{type:"ENDPOINT"}).then(w);if("bind"===u)return p(e,n,o.slice(0,-1));const[l,f]=m(s);return y(e,n,{type:"APPLY",path:o.map((e=>e.toString())),argumentList:l},f).then(w)},construct(t,r){c(a);const[i,s]=m(r);return y(e,n,{type:"CONSTRUCT",path:o.map((e=>e.toString())),argumentList:i},s).then(w)}});return function(e,t){const r=(h.get(t)||0)+1;h.set(t,r),d&&d.register(e,t,e)}(s,e),s}function m(e){const t=e.map(v);return[t.map((e=>e[0])),(r=t.map((e=>e[1])),Array.prototype.concat.apply([],r))];var r}const g=new WeakMap;function v(e){for(const[t,r]of s)if(r.canHandle(e)){const[n,o]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},o]}return[{type:"RAW",value:e},g.get(e)||[]]}function w(e){switch(e.type){case"HANDLER":return s.get(e.name).deserialize(e.value);case"RAW":return e.value}}function y(e,t,r,n){return new Promise((o=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(i,o),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),n)}))}const _=new TextEncoder,E=new TextDecoder("utf-8"),b={0:!1,1:!0,2:!0,64:!0,65:!0,66:!0,129:!0,193:!0,514:!0,577:!0,578:!0,705:!0,706:!0,1024:!0,1025:!0,1026:!0,1089:!0,1090:!0,1153:!0,1154:!0,1217:!0,1218:!0,4096:!0,4098:!0};class k{constructor(e){this.fs=e}open(e){const t=this.fs.realPath(e.node);this.fs.FS.isFile(e.node.mode)&&(e.file=this.fs.API.get(t))}close(e){if(!this.fs.FS.isFile(e.node.mode)||!e.file)return;const t=this.fs.realPath(e.node),r=e.flags;let n="string"==typeof r?parseInt(r,10):r;n&=8191;let o=!0;n in b&&(o=b[n]),o&&this.fs.API.put(t,e.file),e.file=void 0}read(e,t,r,n,o){if(n<=0||void 0===e.file||o>=(e.file.data.length||0))return 0;const i=Math.min(e.file.data.length-o,n);return t.set(e.file.data.subarray(o,o+i),r),i}write(e,t,r,n,o){var i;if(n<=0||void 0===e.file)return 0;if(e.node.timestamp=Date.now(),o+n>((null===(i=e.file)||void 0===i?void 0:i.data.length)||0)){const t=e.file.data?e.file.data:new Uint8Array;e.file.data=new Uint8Array(o+n),e.file.data.set(t)}return e.file.data.set(t.subarray(r,r+n),o),n}llseek(e,t,r){let n=t;if(1===r)n+=e.position;else if(2===r&&this.fs.FS.isFile(e.node.mode)){if(void 0===e.file)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM);n+=e.file.data.length}if(n<0)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EINVAL);return n}}class P{constructor(e){this.fs=e}node(e){return function(e){return"node"in e}(e)?e.node:e}getattr(e){const t=this.node(e);return{...this.fs.API.getattr(this.fs.realPath(t)),mode:t.mode,ino:t.id}}setattr(e,t){const r=this.node(e);for(const[e,n]of Object.entries(t))switch(e){case"mode":r.mode=n;break;case"timestamp":r.timestamp=n;break;case"size":{const e=n,t=this.fs.realPath(r);if(this.fs.FS.isFile(r.mode)&&e>=0){const r=this.fs.API.get(t),n=r.data?r.data:new Uint8Array;e!==n.length&&(e<n.length?r.data=r.data.slice(0,e):(r.data=new Uint8Array(e),r.data.set(n)),this.fs.API.put(t,r))}else console.warn("setattr size of",e,"on",r,"not yet implemented");break}default:console.warn("setattr",e,"of",n,"on",r,"not yet implemented")}}lookup(e,t){const r=this.node(e),n=this.fs.PATH.join2(this.fs.realPath(r),t),o=this.fs.API.lookup(n);if(!o.ok)throw this.fs.FS.genericErrors[this.fs.ERRNO_CODES.ENOENT];return this.fs.createNode(r,t,o.mode,0)}mknod(e,t,r,n){const o=this.node(e),i=this.fs.PATH.join2(this.fs.realPath(o),t);return this.fs.API.mknod(i,r),this.fs.createNode(o,t,r,n)}rename(e,t,r){const n=this.node(e),o=this.node(t);this.fs.API.rename(n.parent?this.fs.PATH.join2(this.fs.realPath(n.parent),n.name):n.name,this.fs.PATH.join2(this.fs.realPath(o),r)),n.name=r,n.parent=o}unlink(e,t){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(e)),t))}rmdir(e,t){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(e)),t))}readdir(e){return this.fs.API.readdir(this.fs.realPath(this.node(e)))}symlink(e,t,r){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}readlink(e){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}}class S{constructor(e,t,r,n){this._driveName=e,this._mountpoint=t,this.FS=r,this.ERRNO_CODES=n}lookup(e){return this.request({method:"lookup",path:this.normalizePath(e)})}getmode(e){return this.request({method:"getmode",path:this.normalizePath(e)})}mknod(e,t){return this.request({method:"mknod",path:this.normalizePath(e),data:{mode:t}})}rename(e,t){return this.request({method:"rename",path:this.normalizePath(e),data:{newPath:this.normalizePath(t)}})}readdir(e){const t=this.request({method:"readdir",path:this.normalizePath(e)});return t.push("."),t.push(".."),t}rmdir(e){return this.request({method:"rmdir",path:this.normalizePath(e)})}get(e){const t=this.request({method:"get",path:this.normalizePath(e)});if(!t)throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT);const r=t.content,n=t.format;switch(n){case"json":case"text":return{data:_.encode(r),format:n};case"base64":{const e=atob(r),t=e.length,o=new Uint8Array(t);for(let r=0;r<t;r++)o[r]=e.charCodeAt(r);return{data:o,format:n}}default:throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT)}}put(e,t){switch(t.format){case"json":case"text":return this.request({method:"put",path:this.normalizePath(e),data:{format:t.format,data:E.decode(t.data)}});case"base64":{let r="";for(let e=0;e<t.data.byteLength;e++)r+=String.fromCharCode(t.data[e]);return this.request({method:"put",path:this.normalizePath(e),data:{format:t.format,data:btoa(r)}})}}}getattr(e){const t=this.request({method:"getattr",path:this.normalizePath(e)});return t.atime&&(t.atime=new Date(t.atime)),t.mtime&&(t.mtime=new Date(t.mtime)),t.ctime&&(t.ctime=new Date(t.ctime)),t.size=t.size||0,t}normalizePath(e){return e.startsWith(this._mountpoint)&&(e=e.slice(this._mountpoint.length)),this._driveName&&(e=`${this._driveName}:${e}`),e}}class A extends S{constructor(e,t,r,n,o){super(t,r,n,o),this._baseUrl=e}request(e){const t=new XMLHttpRequest;t.open("POST",encodeURI(this.endpoint),!1);try{t.send(JSON.stringify(e))}catch(e){console.error(e)}if(t.status>=400)throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);return JSON.parse(t.responseText)}get endpoint(){return`${this._baseUrl}api/drive`}}class x{constructor(e){this.FS=e.FS,this.PATH=e.PATH,this.ERRNO_CODES=e.ERRNO_CODES,this.API=this.createAPI(e),this.driveName=e.driveName,this.node_ops=new P(this),this.stream_ops=new k(this)}createAPI(e){return new A(e.baseUrl,e.driveName,e.mountpoint,e.FS,e.ERRNO_CODES)}mount(e){return this.createNode(null,e.mountpoint,16895,0)}createNode(e,t,r,n){const o=this.FS;if(!o.isDir(r)&&!o.isFile(r))throw new o.ErrnoError(this.ERRNO_CODES.EINVAL);const i=o.createNode(e,t,r,n);return i.node_ops=this.node_ops,i.stream_ops=this.stream_ops,i}getMode(e){return this.API.getmode(e)}realPath(e){const t=[];let r=e;for(t.push(r.name);r.parent!==r;)r=r.parent,t.push(r.name);return t.reverse(),this.PATH.join.apply(null,t)}}var R,T,M,O,D,C,U,F,j,L,N,I,B,z,$,q,H,Y,W,V,K,Z,J,X=__webpack_require__(925),G=Object.create,Q=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,re=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,oe=(e,t)=>function(){return e&&(t=(0,e[te(e)[0]])(e=0)),t};function ie(){throw new Error("setTimeout has not been defined")}function ae(){throw new Error("clearTimeout has not been defined")}function se(e){if(R===setTimeout)return setTimeout(e,0);if((R===ie||!R)&&setTimeout)return R=setTimeout,setTimeout(e,0);try{return R(e,0)}catch(t){try{return R.call(null,e,0)}catch(t){return R.call(this,e,0)}}}function ue(){O&&D&&(O=!1,D.length?M=D.concat(M):C=-1,M.length&&le())}function le(){if(!O){var e=se(ue);O=!0;for(var t=M.length;t;){for(D=M,M=[];++C<t;)D&&D[C].run();C=-1,t=M.length}D=null,O=!1,function(e){if(T===clearTimeout)return clearTimeout(e);if((T===ae||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(e);try{return T(e)}catch(t){try{return T.call(null,e)}catch(t){return T.call(this,e)}}}(e)}}function ce(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];M.push(new fe(e,t)),1!==M.length||O||se(le)}function fe(e,t){this.fun=e,this.array=t}function he(){}function de(e){throw new Error("process.binding is not supported")}function pe(){return"/"}function me(e){throw new Error("process.chdir is not supported")}function ge(){return 0}function ve(e){var t=.001*V.call(W),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}function we(){return(new Date-K)/1e3}var ye,_e,Ee,be,ke,Pe,Se=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/process.js"(){R=ie,T=ae,"function"==typeof globalThis.setTimeout&&(R=setTimeout),"function"==typeof globalThis.clearTimeout&&(T=clearTimeout),M=[],O=!1,C=-1,fe.prototype.run=function(){this.fun.apply(null,this.array)},U={},F=[],j={},L={},N={},I=he,B=he,z=he,$=he,q=he,H=he,Y=he,W=globalThis.performance||{},V=W.now||W.mozNow||W.msNow||W.oNow||W.webkitNow||function(){return(new Date).getTime()},K=new Date,Z={nextTick:ce,title:"browser",browser:!0,env:U,argv:F,version:"",versions:j,on:I,addListener:B,once:z,off:$,removeListener:q,removeAllListeners:H,emit:Y,binding:de,cwd:pe,chdir:me,umask:ge,hrtime:ve,platform:"browser",release:L,config:N,uptime:we},J={},Object.keys(J).forEach((e=>{const t=e.split(".");let r=Z;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=J[e]:r=r[o]||(r[o]={})}}))}});function Ae(){be=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)ye[t]=e[t],_e[e.charCodeAt(t)]=t;_e["-".charCodeAt(0)]=62,_e["_".charCodeAt(0)]=63}function xe(e,t,r){for(var n,o,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(ye[(o=n)>>18&63]+ye[o>>12&63]+ye[o>>6&63]+ye[63&o]);return i.join("")}function Re(e){var t;be||Ae();for(var r=e.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(xe(e,s,s+a>u?u:s+a));return 1===n?(t=e[r-1],o+=ye[t>>2],o+=ye[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=ye[t>>10],o+=ye[t>>4&63],o+=ye[t<<2&63],o+="="),i.push(o),i.join("")}function Te(){return Oe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Me(e,t){if(Te()<t)throw new RangeError("Invalid typed array length");return Oe.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Oe.prototype:(null===e&&(e=new Oe(t)),e.length=t),e}function Oe(e,t,r){if(!(Oe.TYPED_ARRAY_SUPPORT||this instanceof Oe))return new Oe(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Ue(this,e)}return De(this,e,t,r)}function De(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),Oe.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Oe.prototype:e=Fe(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!Oe.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ne(t,r),o=(e=Me(e,n)).write(t,r);return o!==n&&(e=e.slice(0,o)),e}(e,t,r):function(e,t){if(Le(t)){var r=0|je(t.length);return 0===(e=Me(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Me(e,0):Fe(e,t);if("Buffer"===t.type&&Array.isArray(t.data))return Fe(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Ce(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Ue(e,t){if(Ce(t),e=Me(e,t<0?0:0|je(t)),!Oe.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Fe(e,t){var r=t.length<0?0:0|je(t.length);e=Me(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function je(e){if(e>=Te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Te().toString(16)+" bytes");return 0|e}function Le(e){return!(null==e||!e._isBuffer)}function Ne(e,t){if(Le(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ut(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lt(e).length;default:if(n)return ut(e).length;t=(""+t).toLowerCase(),n=!0}}function Ie(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qe(this,t,r);case"utf8":case"utf-8":return Je(this,t,r);case"ascii":return Xe(this,t,r);case"latin1":case"binary":return Ge(this,t,r);case"base64":return Ze(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Be(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ze(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Oe.from(t,n)),Le(t))return 0===t.length?-1:$e(e,t,r,n,o);if("number"==typeof t)return t&=255,Oe.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):$e(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function $e(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=r;i<s;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(l(e,i+h)!==l(t,h)){f=!1;break}if(f)return i}return-1}function qe(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function He(e,t,r,n){return ct(ut(t,e.length-r),e,r,n)}function Ye(e,t,r,n){return ct(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function We(e,t,r,n){return Ye(e,t,r,n)}function Ve(e,t,r,n){return ct(lt(t),e,r,n)}function Ke(e,t,r,n){return ct(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function Ze(e,t,r){return 0===t&&r===e.length?Re(e):Re(e.slice(t,r))}function Je(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&l)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(e){var t=e.length;if(t<=ke)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ke));return r}(n)}function Xe(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function Ge(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function Qe(e,t,r){var n,o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);for(var i="",a=t;a<r;++a)i+=(n=e[a])<16?"0"+n.toString(16):n.toString(16);return i}function et(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function tt(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function rt(e,t,r,n,o,i){if(!Le(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function nt(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function ot(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function it(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function at(e,t,r,n,o){return o||it(e,0,r,4),pt(e,t,r,n,23,4),r+4}function st(e,t,r,n,o){return o||it(e,0,r,8),pt(e,t,r,n,52,8),r+8}function ut(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function lt(e){return function(e){var t,r,n,o,i,a;be||Ae();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Ee(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)o=_e[e.charCodeAt(t)]<<18|_e[e.charCodeAt(t+1)]<<12|_e[e.charCodeAt(t+2)]<<6|_e[e.charCodeAt(t+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=_e[e.charCodeAt(t)]<<2|_e[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=_e[e.charCodeAt(t)]<<10|_e[e.charCodeAt(t+1)]<<4|_e[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Pe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ct(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ft(e){return null!=e&&(!!e._isBuffer||ht(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ht(e.slice(0,0))}(e))}function ht(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function dt(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?o-1:0,h=r?-1:1,d=e[t+f];for(f+=h,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=l}return(d?-1:1)*a*Math.pow(2,i-n)}function pt(e,t,r,n,o,i){var a,s,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*m}var mt,gt,vt=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/Buffer.js"(){Se(),wt(),ye=[],_e=[],Ee="undefined"!=typeof Uint8Array?Uint8Array:Array,be=!1,Oe.TYPED_ARRAY_SUPPORT=void 0===globalThis.TYPED_ARRAY_SUPPORT||globalThis.TYPED_ARRAY_SUPPORT,Oe.poolSize=8192,Oe._augment=function(e){return e.__proto__=Oe.prototype,e},Oe.from=function(e,t,r){return De(null,e,t,r)},Oe.kMaxLength=Te(),Oe.TYPED_ARRAY_SUPPORT&&(Oe.prototype.__proto__=Uint8Array.prototype,Oe.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Oe[Symbol.species]),Oe.alloc=function(e,t,r){return function(e,t,r,n){return Ce(t),t<=0?Me(e,t):void 0!==r?"string"==typeof n?Me(e,t).fill(r,n):Me(e,t).fill(r):Me(e,t)}(null,e,t,r)},Oe.allocUnsafe=function(e){return Ue(null,e)},Oe.allocUnsafeSlow=function(e){return Ue(null,e)},Oe.isBuffer=ft,Oe.compare=function(e,t){if(!Le(e)||!Le(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},Oe.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Oe.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Oe.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Oe.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(!Le(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},Oe.byteLength=Ne,Oe.prototype._isBuffer=!0,Oe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Be(this,t,t+1);return this},Oe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Be(this,t,t+3),Be(this,t+1,t+2);return this},Oe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Be(this,t,t+7),Be(this,t+1,t+6),Be(this,t+2,t+5),Be(this,t+3,t+4);return this},Oe.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Je(this,0,e):Ie.apply(this,arguments)},Oe.prototype.equals=function(e){if(!Le(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Oe.compare(this,e)},Oe.prototype.compare=function(e,t,r,n,o){if(!Le(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r),c=0;c<s;++c)if(u[c]!==l[c]){i=u[c],a=l[c];break}return i<a?-1:a<i?1:0},Oe.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Oe.prototype.indexOf=function(e,t,r){return ze(this,e,t,r,!0)},Oe.prototype.lastIndexOf=function(e,t,r){return ze(this,e,t,r,!1)},Oe.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return qe(this,e,t,r);case"utf8":case"utf-8":return He(this,e,t,r);case"ascii":return Ye(this,e,t,r);case"latin1":case"binary":return We(this,e,t,r);case"base64":return Ve(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ke(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Oe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},ke=4096,Oe.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Oe.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Oe.prototype;else{var o=t-e;r=new Oe(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},Oe.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},Oe.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},Oe.prototype.readUInt8=function(e,t){return t||tt(e,1,this.length),this[e]},Oe.prototype.readUInt16LE=function(e,t){return t||tt(e,2,this.length),this[e]|this[e+1]<<8},Oe.prototype.readUInt16BE=function(e,t){return t||tt(e,2,this.length),this[e]<<8|this[e+1]},Oe.prototype.readUInt32LE=function(e,t){return t||tt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Oe.prototype.readUInt32BE=function(e,t){return t||tt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Oe.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},Oe.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Oe.prototype.readInt8=function(e,t){return t||tt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Oe.prototype.readInt16LE=function(e,t){t||tt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Oe.prototype.readInt16BE=function(e,t){t||tt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Oe.prototype.readInt32LE=function(e,t){return t||tt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Oe.prototype.readInt32BE=function(e,t){return t||tt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Oe.prototype.readFloatLE=function(e,t){return t||tt(e,4,this.length),dt(this,e,!0,23,4)},Oe.prototype.readFloatBE=function(e,t){return t||tt(e,4,this.length),dt(this,e,!1,23,4)},Oe.prototype.readDoubleLE=function(e,t){return t||tt(e,8,this.length),dt(this,e,!0,52,8)},Oe.prototype.readDoubleBE=function(e,t){return t||tt(e,8,this.length),dt(this,e,!1,52,8)},Oe.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||rt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},Oe.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||rt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},Oe.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,1,255,0),Oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Oe.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,65535,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):nt(this,e,t,!0),t+2},Oe.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,65535,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):nt(this,e,t,!1),t+2},Oe.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,4294967295,0),Oe.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ot(this,e,t,!0),t+4},Oe.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,4294967295,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ot(this,e,t,!1),t+4},Oe.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);rt(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},Oe.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);rt(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},Oe.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,1,127,-128),Oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Oe.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,32767,-32768),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):nt(this,e,t,!0),t+2},Oe.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,32767,-32768),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):nt(this,e,t,!1),t+2},Oe.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,2147483647,-2147483648),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ot(this,e,t,!0),t+4},Oe.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ot(this,e,t,!1),t+4},Oe.prototype.writeFloatLE=function(e,t,r){return at(this,e,t,!0,r)},Oe.prototype.writeFloatBE=function(e,t,r){return at(this,e,t,!1,r)},Oe.prototype.writeDoubleLE=function(e,t,r){return st(this,e,t,!0,r)},Oe.prototype.writeDoubleBE=function(e,t,r){return st(this,e,t,!1,r)},Oe.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!Oe.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Oe.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Oe.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=Le(e)?e:ut(new Oe(e,n).toString()),s=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this},Pe=/[^+\/0-9A-Za-z-_]/g}}),wt=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/_buffer.js"(){vt()}}),yt=(mt={"node_modules/@emscripten-forge/untarjs/lib/unpack.js"(e,t){Se(),wt();var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,n,o=e;o.ready=new Promise(((e,r)=>{t=e,n=r}));var i,a,s=Object.assign({},o),u="./this.program",l=(e,t)=>{throw t},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),r&&(c=r),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a=(e,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.onerror=r,n.send(null)};var f,h=o.print||console.log.bind(console),d=o.printErr||console.error.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(f=o.wasmBinary);var p,m=o.noExitRuntime||!1;function g(e){return L?ot(e):S[e]}function v(e){return L?it(e):A[e]}function w(e){return L?at(e)>>>0:x[e]}function y(e,t){return L?lt(e,t):k[e]=t}function _(e,t){return L?ct(e,t):S[e]=t}function E(e,t){return L?ft(e,t):A[e]=t}function b(e,t){return L?ht(e,t)>>>0:x[e]=t}"object"!=typeof WebAssembly&&Z("no native wasm support detected");var k,P,S,A,x,R,T,M=!1;function O(e,t){e||Z(t)}function D(){var e=p.buffer;o.HEAP8=k=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=P=new Uint8Array(e),o.HEAPU16=new Uint16Array(e),o.HEAP32=A=new Int32Array(e),o.HEAPU32=x=new Uint32Array(e),o.HEAPF32=R=new Float32Array(e),o.HEAPF64=T=new Float64Array(e)}var C=[],U=[],F=[],j=[],L=!1;function N(){return m||!1}var I,B,z,$,q,H=0,Y=null,W=null;function V(e){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function K(e){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&(null!==Y&&(clearInterval(Y),Y=null),W)){var t=W;W=null,t()}}function Z(e){o.onAbort&&o.onAbort(e),d(e="Aborted("+e+")"),M=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function J(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e){if(e==I&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function G(e,t){var r=8,n=0;this.offset_map={},this.func_starts=[],this.name_map={},this.import_functions=0;var o=e;function i(){var e=0,t=0;do{var n=o[r++];e+=(127&n)<<t,t+=7}while(128&n);return e}function a(){var e=i();i(),1&e&&i()}e:for(;r<o.length;){var s=o[r++],u=i()+r;switch(s){case 2:for(var l=i();l-- >0;)switch(r=i()+r,r=i()+r,o[r++]){case 0:++n,i();break;case 1:i(),a();break;case 2:a();break;case 3:r+=2;break;case 4:++r,i()}this.import_functions=n;break;case 10:for(l=i();l-- >0;){var c=i();this.offset_map[n++]=r,this.func_starts.push(r),r+=c}break e}r=u}var f=WebAssembly.Module.customSections(t,"name"),h=f.length?f[0]:void 0;if(h)for(o=new Uint8Array(h),r=0;r<o.length;){var d=o[r++],p=i();if(1==d)for(l=i();l-- >0;){var m=i(),g=i();this.name_map[m]=re(o,r,g),r+=g}else r+=p}}function Q(e,t,r){var n;return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>X(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>X(e)))}(e).then((e=>(n=e,WebAssembly.instantiate(e,t)))).then((e=>(z=new G(n,e.module),e))).then(r,(e=>{d(`failed to asynchronously prepare wasm: ${e}`),Z(e)}))}function ee(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}J(I="unpack.wasm")||(B=I,I=o.locateFile?o.locateFile(B,c):c+B),G.prototype.convert=function(e,t){return this.offset_map[e]+t},G.prototype.getIndex=function(e){for(var t,r=0,n=this.func_starts.length;r<n;)t=Math.floor((r+n)/2),this.func_starts[t]>e?n=t:r=t+1;return r+this.import_functions-1},G.prototype.isSameFunc=function(e,t){return this.getIndex(e)==this.getIndex(t)},G.prototype.getName=function(e){var t=this.getIndex(e);return this.name_map[t]||"wasm-function["+t+"]"};var te="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,re=(e,t,r)=>{for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&te)return te.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i},ne=e=>{for(;e.length>0;)e.shift()(o)},oe=(e,t)=>e?re(P,e,t):"",ie={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ie.isAbs(e),r="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ie.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ie.normalize(e.join("/"))},join2:(e,t)=>ie.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);Z("initRandomDevice")})())(e),se={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:we.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ie.isAbs(n)}return(t?"/":"")+(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=se.resolve(e).substr(1),t=se.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},ue=[],le=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ce=(e,t,r,n)=>{if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o};function fe(e,t,r){var n=r>0?r:le(e)+1,o=new Array(n),i=ce(e,o,0,o.length);return t&&(o.length=i),o}var he,de={ttys:[],init(){},shutdown(){},register(e,t){de.ttys[e]={input:[],output:[],ops:t},we.registerDevice(e,de.stream_ops)},stream_ops:{open(e){var t=de.ttys[e.node.rdev];if(!t)throw new we.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new we.ErrnoError(29)}if(void 0===s&&0===i)throw new we.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new we.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new we.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:e=>(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=fe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(h(re(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(h(re(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[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]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(d(re(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(d(re(e.output,0)),e.output=[])}}},pe=e=>{e=(e=>65536*Math.ceil(e/65536))(e);var t=Ge(65536,e);return t?((e,t)=>(P.fill(0,e,e+t),e))(t,e):0},me={ops_table:null,mount:e=>me.createNode(null,"/",16895,0),createNode(e,t,r,n){if(we.isBlkdev(r)||we.isFIFO(r))throw new we.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:we.chrdev_stream_ops}});var o=we.createNode(e,t,r,n);return we.isDir(o.mode)?(o.node_ops=me.ops_table.dir.node,o.stream_ops=me.ops_table.dir.stream,o.contents={}):we.isFile(o.mode)?(o.node_ops=me.ops_table.file.node,o.stream_ops=me.ops_table.file.stream,o.usedBytes=0,o.contents=null):we.isLink(o.mode)?(o.node_ops=me.ops_table.link.node,o.stream_ops=me.ops_table.link.stream):we.isChrdev(o.mode)&&(o.node_ops=me.ops_table.chrdev.node,o.stream_ops=me.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=we.isChrdev(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,we.isDir(e.mode)?t.size=4096:we.isFile(e.mode)?t.size=e.usedBytes:we.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup(e,t){throw we.genericErrors[44]},mknod:(e,t,r,n)=>me.createNode(e,t,r,n),rename(e,t,r){if(we.isDir(e.mode)){var n;try{n=we.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=we.lookupNode(e,t);for(var n in r.contents)throw new we.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=me.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write(e,t,r,n,o,i){if(t.buffer===k.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(me.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&we.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new we.ErrnoError(28);return n},allocate(e,t,r){me.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==k.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(i=pe(t)))throw new we.ErrnoError(48);k.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:(e,t,r,n,o)=>(me.stream_ops.write(e,t,0,n,r,!1),0)}},ge=o.preloadPlugins||[],ve=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=se.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new we.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=we.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=we.lookupNode(n,r[i]),o=ie.join2(o,r[i]),we.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;we.isLink(n.mode);){var u=we.readlink(o);if(o=se.resolve(ie.dirname(o),u),n=we.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new we.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var t;;){if(we.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%we.nameTable.length},hashAddNode(e){var t=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[t],we.nameTable[t]=e},hashRemoveNode(e){var t=we.hashName(e.parent.id,e.name);if(we.nameTable[t]===e)we.nameTable[t]=e.name_next;else for(var r=we.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=we.mayLookup(e);if(r)throw new we.ErrnoError(r,e);for(var n=we.hashName(e.id,t),o=we.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return we.lookup(e,t)},createNode(e,t,r,n){var o=new we.FSNode(e,t,r,n);return we.hashAddNode(o),o},destroyNode(e){we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>we.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>we.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return we.lookupNode(e,t),20}catch(e){}return we.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=we.lookupNode(e,t)}catch(e){return e.errno}var o=we.nodePermissions(e,"wx");if(o)return o;if(r){if(!we.isDir(n.mode))return 54;if(we.isRoot(n)||we.getPath(n)===we.cwd())return 10}else if(we.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(t)||512&t)?31:we.nodePermissions(e,we.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=we.MAX_OPEN_FDS;e++)if(!we.streams[e])return e;throw new we.ErrnoError(33)},getStreamChecked(e){var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);return t},getStream:e=>we.streams[e],createStream:(e,t=-1)=>(we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e),-1==t&&(t=we.nextfd()),e.fd=t,we.streams[t]=e,e),closeStream(e){we.streams[e]=null},chrdev_stream_ops:{open(e){var t=we.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){we.devices[e]={stream_ops:t}},getDevice:e=>we.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&d(`warning: ${we.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=we.getMounts(we.root.mount),n=0;function o(e){return we.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,r){var n,o="/"===r,i=!r;if(o&&we.root)throw new we.ErrnoError(10);if(!o&&!i){var a=we.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,we.isMountpoint(n))throw new we.ErrnoError(10);if(!we.isDir(n.mode))throw new we.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?we.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(t.node))throw new we.ErrnoError(28);var r=t.node,n=r.mounted,o=we.getMounts(n);Object.keys(we.nameTable).forEach((e=>{for(var t=we.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&we.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=we.lookupPath(e,{parent:!0}).node,o=ie.basename(e);if(!o||"."===o||".."===o)throw new we.ErrnoError(28);var i=we.mayCreate(n,o);if(i)throw new we.ErrnoError(i);if(!n.node_ops.mknod)throw new we.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,we.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,we.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{we.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,we.mknod(e,t,r)),symlink(e,t){if(!se.resolve(e))throw new we.ErrnoError(44);var r=we.lookupPath(t,{parent:!0}).node;if(!r)throw new we.ErrnoError(44);var n=ie.basename(t),o=we.mayCreate(r,n);if(o)throw new we.ErrnoError(o);if(!r.node_ops.symlink)throw new we.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,o=ie.dirname(e),i=ie.dirname(t),a=ie.basename(e),s=ie.basename(t);if(r=we.lookupPath(e,{parent:!0}).node,n=we.lookupPath(t,{parent:!0}).node,!r||!n)throw new we.ErrnoError(44);if(r.mount!==n.mount)throw new we.ErrnoError(75);var u,l=we.lookupNode(r,a),c=se.relative(e,i);if("."!==c.charAt(0))throw new we.ErrnoError(28);if("."!==(c=se.relative(t,o)).charAt(0))throw new we.ErrnoError(55);try{u=we.lookupNode(n,s)}catch(e){}if(l!==u){var f=we.isDir(l.mode),h=we.mayDelete(r,a,f);if(h)throw new we.ErrnoError(h);if(h=u?we.mayDelete(n,s,f):we.mayCreate(n,s))throw new we.ErrnoError(h);if(!r.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(l)||u&&we.isMountpoint(u))throw new we.ErrnoError(10);if(n!==r&&(h=we.nodePermissions(r,"w")))throw new we.ErrnoError(h);we.hashRemoveNode(l);try{r.node_ops.rename(l,n,s)}catch(e){throw e}finally{we.hashAddNode(l)}}},rmdir(e){var t=we.lookupPath(e,{parent:!0}).node,r=ie.basename(e),n=we.lookupNode(t,r),o=we.mayDelete(t,r,!0);if(o)throw new we.ErrnoError(o);if(!t.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);t.node_ops.rmdir(t,r),we.destroyNode(n)},readdir(e){var t=we.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new we.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=we.lookupPath(e,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var r=ie.basename(e),n=we.lookupNode(t,r),o=we.mayDelete(t,r,!1);if(o)throw new we.ErrnoError(o);if(!t.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);t.node_ops.unlink(t,r),we.destroyNode(n)},readlink(e){var t=we.lookupPath(e).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.readlink)throw new we.ErrnoError(28);return se.resolve(we.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=we.lookupPath(e,{follow:!t}).node;if(!r)throw new we.ErrnoError(44);if(!r.node_ops.getattr)throw new we.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>we.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new we.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){we.chmod(e,t,!0)},fchmod(e,t){var r=we.getStreamChecked(e);we.chmod(r.node,t)},chown(e,t,r,n){var o;if(!(o="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,r){we.chown(e,t,r,!0)},fchown(e,t,r){var n=we.getStreamChecked(e);we.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new we.ErrnoError(28);var r;if(!(r="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(r.mode))throw new we.ErrnoError(31);if(!we.isFile(r.mode))throw new we.ErrnoError(28);var n=we.nodePermissions(r,"w");if(n)throw new we.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=we.getStreamChecked(e);if(!(2097155&r.flags))throw new we.ErrnoError(28);we.truncate(r.node,t)},utime(e,t,r){var n=we.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new we.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ie.normalize(e);try{n=we.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new we.ErrnoError(20)}else n=we.mknod(e,r,0),i=!0;if(!n)throw new we.ErrnoError(44);if(we.isChrdev(n.mode)&&(t&=-513),65536&t&&!we.isDir(n.mode))throw new we.ErrnoError(54);if(!i){var a=we.mayOpen(n,t);if(a)throw new we.ErrnoError(a)}512&t&&!i&&we.truncate(n,0),t&=-131713;var s=we.createStream({node:n,path:we.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),s},close(e){if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,o){if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write(e,t,r,n,o,i){if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate(e,t,r){if(we.isClosed(e))throw new we.ErrnoError(8);if(t<0||r<=0)throw new we.ErrnoError(28);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=we.open(e,t.flags),o=we.stat(e).size,i=new Uint8Array(o);return we.read(n,i,0,o,0),"utf8"===t.encoding?r=re(i,0):"binary"===t.encoding&&(r=i),we.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=we.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(le(t)+1),i=ce(t,o,0,o.length);we.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");we.write(n,t,0,t.byteLength,void 0,r.canOwn)}we.close(n)},cwd:()=>we.currentPath,chdir(e){var t=we.lookupPath(e,{follow:!0});if(null===t.node)throw new we.ErrnoError(44);if(!we.isDir(t.node.mode))throw new we.ErrnoError(54);var r=we.nodePermissions(t.node,"x");if(r)throw new we.ErrnoError(r);we.currentPath=t.path},createDefaultDirectories(){we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices(){we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),we.mkdev("/dev/null",we.makedev(1,3)),de.register(we.makedev(5,0),de.default_tty_ops),de.register(we.makedev(6,0),de.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ae(e).byteLength),e[--t]);we.createDevice("/dev","random",r),we.createDevice("/dev","urandom",r),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories(){we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount(){var t=we.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=we.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?we.createDevice("/dev","stdin",o.stdin):we.symlink("/dev/tty","/dev/stdin"),o.stdout?we.createDevice("/dev","stdout",null,o.stdout):we.symlink("/dev/tty","/dev/stdout"),o.stderr?we.createDevice("/dev","stderr",null,o.stderr):we.symlink("/dev/tty1","/dev/stderr"),we.open("/dev/stdin",0),we.open("/dev/stdout",1),we.open("/dev/stderr",1)},ensureErrnoError(){we.ErrnoError||(we.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(me,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:me}},init(e,t,r){we.init.initialized=!0,we.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,we.createStandardStreams()},quit(){we.init.initialized=!1;for(var e=0;e<we.streams.length;e++){var t=we.streams[e];t&&we.close(t)}},findObject(e,t){var r=we.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=we.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=we.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ie.basename(e),n=we.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:we.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ie.join2(e,i);try{we.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,o){var i=ie.join2("string"==typeof e?e:we.getPath(e),t),a=ve(n,o);return we.create(i,a)},createDataFile(e,t,r,n,o,i){var a=t;e&&(e="string"==typeof e?e:we.getPath(e),a=t?ie.join2(e,t):e);var s=ve(n,o),u=we.create(a,s);if(r){if("string"==typeof r){for(var l=new Array(r.length),c=0,f=r.length;c<f;++c)l[c]=r.charCodeAt(c);r=l}we.chmod(u,146|s);var h=we.open(u,577);we.write(h,r,0,r.length,0,i),we.close(h),we.chmod(u,s)}return u},createDevice(e,t,r,n){var o=ie.join2("string"==typeof e?e:we.getPath(e),t),i=ve(!!r,!!n);we.createDevice.major||(we.createDevice.major=64);var a=we.makedev(we.createDevice.major++,0);return we.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new we.ErrnoError(29)}if(void 0===u&&0===a)throw new we.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new we.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),we.mkdev(o,i,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new 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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=fe(i(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new we.ErrnoError(29)}},createLazyFile(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),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 new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):fe(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:r},s=we.createFile(e,t,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((e=>{var t=s.stream_ops[e];u[e]=function(){return we.forceLoadFile(s),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>(we.forceLoadFile(s),l(e,t,r,n,o)),u.mmap=(e,t,r,n,o)=>{we.forceLoadFile(s);var i=pe(t);if(!i)throw new we.ErrnoError(48);return l(e,k,i,t,r),{ptr:i,allocated:!0}},s.stream_ops=u,s}},ye={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ie.isAbs(t))return t;var n;if(n=-100===e?we.cwd():ye.getStreamFromFD(e).path,0==t.length){if(!r)throw new we.ErrnoError(44);return n}return ie.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ie.normalize(t)!==ie.normalize(we.getPath(e.node)))return-54;throw e}E(r>>2,n.dev),E(r+4>>2,n.mode),b(r+8>>2,n.nlink),E(r+12>>2,n.uid),E(r+16>>2,n.gid),E(r+20>>2,n.rdev),E(r+24>>2,(q=[n.size>>>0,($=n.size,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+28>>2,q[1]),E(r+32>>2,4096),E(r+36>>2,n.blocks);var o=n.atime.getTime(),i=n.mtime.getTime(),a=n.ctime.getTime();return E(r+40>>2,(q=[Math.floor(o/1e3)>>>0,($=Math.floor(o/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+44>>2,q[1]),b(r+48>>2,o%1e3*1e3),E(r+56>>2,(q=[Math.floor(i/1e3)>>>0,($=Math.floor(i/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+60>>2,q[1]),b(r+64>>2,i%1e3*1e3),E(r+72>>2,(q=[Math.floor(a/1e3)>>>0,($=Math.floor(a/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+76>>2,q[1]),b(r+80>>2,a%1e3*1e3),E(r+88>>2,(q=[n.ino>>>0,($=n.ino,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+92>>2,q[1]),0},doMsync(e,t,r,n,o){if(!we.isFile(t.node.mode))throw new we.ErrnoError(43);if(2&n)return 0;var i=P.slice(e,e+r);we.msync(t,i,o,r,n)},varargs:void 0,get(){var e=v(ye.varargs>>2);return ye.varargs+=4,e},getp:()=>ye.get(),getStr:e=>oe(e),getStreamFromFD:e=>we.getStreamChecked(e)},_e={BUCKET_BUFFER_SIZE:8192,mount:e=>we.createNode(null,"/",16895,0),createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=_e.nextname(),r=_e.nextname(),n=we.createNode(_e.root,t,4096,0),o=we.createNode(_e.root,r,4096,0);n.pipe=e,o.pipe=e;var i=we.createStream({path:t,node:n,flags:0,seekable:!1,stream_ops:_e.stream_ops});n.stream=i;var a=we.createStream({path:r,node:o,flags:1,seekable:!1,stream_ops:_e.stream_ops});return o.stream=a,{readable_fd:i.fd,writable_fd:a.fd}},stream_ops:{poll(e){var t=e.node.pipe;if(1==(2097155&e.flags))return 260;if(t.buckets.length>0)for(var r=0;r<t.buckets.length;r++){var n=t.buckets[r];if(n.offset-n.roffset>0)return 65}return 0},ioctl:(e,t,r)=>28,fsync:e=>28,read(e,t,r,n,o){for(var i=e.node.pipe,a=0,s=0;s<i.buckets.length;s++){var u=i.buckets[s];a+=u.offset-u.roffset}var l=t.subarray(r,r+n);if(n<=0)return 0;if(0==a)throw new we.ErrnoError(6);var c=Math.min(a,n),f=c,h=0;for(s=0;s<i.buckets.length;s++){var d=i.buckets[s],p=d.offset-d.roffset;if(c<=p){var m=d.buffer.subarray(d.roffset,d.offset);c<p?(m=m.subarray(0,c),d.roffset+=c):h++,l.set(m);break}m=d.buffer.subarray(d.roffset,d.offset),l.set(m),l=l.subarray(m.byteLength),c-=m.byteLength,h++}return h&&h==i.buckets.length&&(h--,i.buckets[h].offset=0,i.buckets[h].roffset=0),i.buckets.splice(0,h),f},write(e,t,r,n,o){var i=e.node.pipe,a=t.subarray(r,r+n),s=a.byteLength;if(s<=0)return 0;var u=null;0==i.buckets.length?(u={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(u)):u=i.buckets[i.buckets.length-1],O(u.offset<=_e.BUCKET_BUFFER_SIZE);var l=_e.BUCKET_BUFFER_SIZE-u.offset;if(l>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;l>0&&(u.buffer.set(a.subarray(0,l),u.offset),u.offset+=l,a=a.subarray(l,a.byteLength));for(var c=a.byteLength/_e.BUCKET_BUFFER_SIZE|0,f=a.byteLength%_e.BUCKET_BUFFER_SIZE,h=0;h<c;h++){var d={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:_e.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(d),d.buffer.set(a.subarray(0,_e.BUCKET_BUFFER_SIZE)),a=a.subarray(_e.BUCKET_BUFFER_SIZE,a.byteLength)}return f>0&&(d={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0},i.buckets.push(d),d.buffer.set(a)),s},close(e){var t=e.node.pipe;t.refcnt--,0===t.refcnt&&(t.buckets=null)}},nextname:()=>(_e.nextname.current||(_e.nextname.current=0),"pipe["+_e.nextname.current+++"]")},Ee=e=>{var t=void 0!==Ye?Ye:void 0,r=void 0!==Je?Je:void 0,n=void 0!==We?We:void 0;Ye=Ze,Je=Ge,We=Xe;try{return e()}finally{Ye=t,Je=r,We=n}},be=(e,t,r)=>ce(e,P,t,r),ke=e=>{var t=le(e)+1,r=Ye(t);return r&&be(e,r,t),r},Pe=[0,31,60,91,121,152,182,213,244,274,305,335],Se=[0,31,59,90,120,151,181,212,243,273,304,334],Ae=e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?Se:Pe)[e.getMonth()]+e.getDate()-1},xe=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN;he=()=>performance.now();var Re={},Te=e=>{var t;return(t=/\bwasm-function\[\d+\]:(0x[0-9a-f]+)/.exec(e))?+t[1]:(t=/\bwasm-function\[(\d+)\]:(\d+)/.exec(e))?z.convert(+t[1],+t[2]):(t=/:(\d+):\d+(?:\)|$)/.exec(e))?2147483648|+t[1]:0},Me=e=>{if(Re.last_get_source_pc==e)return Re.last_source;var t,r;if(!r){var n=Re[e];if(!n)return null;((t=/\((.*):(\d+):(\d+)\)$/.exec(n))||(t=/@(.*):(\d+):(\d+)/.exec(n)))&&(r={file:t[1],line:t[2],column:t[3]})}return Re.last_get_source_pc=e,Re.last_source=r,r},Oe=e=>Ee((()=>{var t=Me(e);return t?(Oe.ret&&We(Oe.ret),Oe.ret=ke(t.file),Oe.ret):0})),De=e=>Ee((()=>{var t;if(2147483648&e){var r,n=Re[e];if(!n)return 0;if(r=/^\s+at (.*) \(.*\)$/.exec(n))t=r[1];else{if(!(r=/^(.+?)@/.exec(n)))return 0;t=r[1]}}else t=z.getName(e);return De.ret&&We(De.ret),De.ret=ke(t),De.ret})),Ce=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),D(),1}catch(e){}};function Ue(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}var Fe=e=>{e.forEach((e=>{var t=Te(e);t&&(Re[t]=e)}))},je={},Le=()=>{if(!Le.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",_:u||"./this.program"};for(var t in je)void 0===je[t]?delete e[t]:e[t]=je[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Le.strings=r}return Le.strings},Ne=e=>{N()||(o.onExit&&o.onExit(e),M=!0),l(e,new ee(e))},Ie=e=>o["_"+e],Be=(e,t,r,n,o)=>{var i={string:e=>{var t=0;return null!=e&&0!==e&&(t=(e=>{var t=le(e)+1,r=rt(t);return be(e,r,t),r})(e)),t},array:e=>{var t,r,n=rt(e.length);return t=e,r=n,k.set(t,r),n}},a=Ie(e),s=[],u=0;if(n)for(var l=0;l<n.length;l++){var c=i[r[l]];c?(0===u&&(u=et()),s[l]=c(n[l])):s[l]=n[l]}var f,h=a.apply(null,s);return f=h,0!==u&&tt(u),h=function(e){return"string"===t?oe(e):"boolean"===t?Boolean(e):e}(f),h},ze=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(ze.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=ze,we.createPreloadedFile=(e,t,r,n,o,i,s,u,l,c)=>{var f=t?se.resolve(ie.join2(e,t)):e;function h(r){function a(r){c&&c(),u||we.createDataFile(e,t,r,n,o,l),i&&i(),K()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ge.forEach((i=>{o||i.canHandle(t)&&(i.handle(e,t,r,n),o=!0)})),o})(r,f,a,(()=>{s&&s(),K()}))||a(r)}V(),"string"==typeof r?((e,t,r)=>{var n=`al ${e}`;a(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),h(new Uint8Array(t)),n&&K()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()})(r,0,s):h(r)},we.staticInit();var $e,qe={E:(e,t,r,n)=>{Z(`Assertion failed: ${oe(e)}, at: `+[t?oe(t):"unknown filename",r,n?oe(n):"unknown function"])},p:function(e){try{var t=ye.getStreamFromFD(e);return we.createStream(t).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},c:function(e,t,r){ye.varargs=r;try{var n=ye.getStreamFromFD(e);switch(t){case 0:if((o=ye.get())<0)return-28;for(;we.streams[o];)o++;return we.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return _((o=ye.getp())+0>>1,2),0;case 16:case 8:default:return-28;case 9:return E(Ve()>>2,28),-1}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},P:function(e,t){try{var r=ye.getStreamFromFD(e);return ye.doStat(we.stat,r.path,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,t){try{return e=ye.getStr(e),ye.doStat(we.lstat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},D:function(e,t,r){try{return t=ye.getStr(t),t=ye.calculateAt(e,t),"/"===(t=ie.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),we.mkdir(t,r,0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,t,r,n){try{t=ye.getStr(t);var o=256&n,i=4096&n;return n&=-6401,t=ye.calculateAt(e,t,i),ye.doStat(o?we.lstat:we.stat,t,r)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},l:function(e,t,r,n){ye.varargs=n;try{t=ye.getStr(t),t=ye.calculateAt(e,t);var o=n?ye.get():0;return we.open(t,r,o).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},K:function(e){try{if(0==e)throw new we.ErrnoError(21);var t=_e.createPipe();return E(e>>2,t.readable_fd),E(e+4>>2,t.writable_fd),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},J:function(e,t,r){try{for(var n=0,o=0;o<t;o++){var i=e+8*o,a=v(i>>2),s=g(i+4>>1),u=32,l=we.getStream(a);l&&(u=ye.DEFAULT_POLLMASK,l.stream_ops.poll&&(u=l.stream_ops.poll(l,-1))),(u&=24|s)&&n++,_(i+6>>1,u)}return n}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},i:function(e,t){try{return e=ye.getStr(e),ye.doStat(we.stat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},L:()=>!0,g:e=>Ee((()=>ke(o[oe(e)]||""))),e:()=>{var e=o.printWithColors;return void 0!==e&&e},t:function(e,t,r){var n=xe(e,t),o=new Date(1e3*n);E(r>>2,o.getSeconds()),E(r+4>>2,o.getMinutes()),E(r+8>>2,o.getHours()),E(r+12>>2,o.getDate()),E(r+16>>2,o.getMonth()),E(r+20>>2,o.getFullYear()-1900),E(r+24>>2,o.getDay()),E(r+28>>2,0|Ae(o)),E(r+36>>2,-60*o.getTimezoneOffset());var i=new Date(o.getFullYear(),0,1),a=new Date(o.getFullYear(),6,1).getTimezoneOffset(),s=i.getTimezoneOffset();E(r+32>>2,0|(a!=s&&o.getTimezoneOffset()==Math.min(s,a)))},u:function(e){var t=(()=>{var t=new Date(v(e+20>>2)+1900,v(e+16>>2),v(e+12>>2),v(e+8>>2),v(e+4>>2),v(e>>2),0),r=v(e+32>>2),n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)E(e+32>>2,Number(i!=a&&s==n));else if(r>0!=(s==n)){var u=Math.max(a,i),l=r>0?s:u;t.setTime(t.getTime()+6e4*(l-n))}E(e+24>>2,t.getDay());var c=0|Ae(t);return E(e+28>>2,c),E(e>>2,t.getSeconds()),E(e+4>>2,t.getMinutes()),E(e+8>>2,t.getHours()),E(e+12>>2,t.getDate()),E(e+16>>2,t.getMonth()),E(e+20>>2,t.getYear()),t.getTime()/1e3})();return Qe(($=t,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)),t>>>0},r:function(e,t,r,n,o,i,a,s){var u=xe(o,i);try{if(isNaN(u))return 61;var l=ye.getStreamFromFD(n),c=we.mmap(l,e,u,t,r),f=c.ptr;return E(a>>2,c.allocated),b(s>>2,f),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},s:function(e,t,r,n,o,i,a){var s=xe(i,a);try{if(isNaN(s))return 61;var u=ye.getStreamFromFD(o);2&r&&ye.doMsync(e,u,t,n,s),we.munmap(u)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},v:function(e){var t=(()=>{var t=Date.UTC(v(e+20>>2)+1900,v(e+16>>2),v(e+12>>2),v(e+8>>2),v(e+4>>2),v(e>>2),0),r=new Date(t);E(e+24>>2,r.getUTCDay());var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;return E(e+28>>2,o),r.getTime()/1e3})();return Qe(($=t,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)),t>>>0},H:(e,t,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset();function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}b(e>>2,60*Math.max(a,s)),E(t>>2,Number(a!=s));var l=u(o),c=u(i),f=ke(l),h=ke(c);s<a?(b(r>>2,f),b(r+4>>2,h)):(b(r>>2,h),b(r+4>>2,f))},a:()=>{Z("")},M:()=>Date.now(),I:()=>2147483648,k:(e,t)=>be(I,e,t),h:he,x:e=>{var t=Me(e);return t&&t.column||0},z:Oe,A:De,y:e=>{var t=Me(e);return t?t.line:0},F:e=>{var t=P.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,o=1;o<=4;o*=2){var i=t*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(r,(n=Math.max(e,i))+(65536-n%65536)%65536);if(Ce(a))return!0}return!1},b:e=>{var t=Ue().split("\n");"Error"==t[0]&&t.shift();var r=t[e+3];return Te(r)},C:function(){var e=Ue().split("\n");return"Error"==e[0]&&e.shift(),Fe(e),Re.last_addr=Te(e[3]),Re.last_stack=e,Re.last_addr},B:(e,t,r)=>{var n;Re.last_addr==e?n=Re.last_stack:("Error"==(n=Ue().split("\n"))[0]&&n.shift(),Fe(n));for(var o=3;n[o]&&Te(n[o])!=e;)++o;for(var i=0;i<r&&n[i+o];++i)E(t+4*i>>2,Te(n[i+o]));return i},n:(e,t)=>{var r=0;return Le().forEach(((n,o)=>{var i=t+r;b(e+4*o>>2,i),((e,t)=>{for(var r=0;r<e.length;++r)y(0|t++,e.charCodeAt(r));y(0|t,0)})(n,i),r+=n.length+1})),0},o:(e,t)=>{var r=Le();b(e>>2,r.length);var n=0;return r.forEach((e=>n+=e.length+1)),b(t>>2,n),0},m:(e,t)=>{N()||(Ke(),ne(F),we.quit(),de.shutdown()),Ne(e)},f:function(e){try{var t=ye.getStreamFromFD(e);return we.close(t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},G:function(e,t){try{var r=ye.getStreamFromFD(e);return y(0|t,r.tty?2:we.isDir(r.mode)?3:we.isLink(r.mode)?7:4),_(t+2>>1,0),E(t+8>>2,(q=[0,($=0,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(t+12>>2,q[1]),E(t+16>>2,(q=[0,($=0,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(t+20>>2,q[1]),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},j:function(e,t,r,n){try{var o=((e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=w(t>>2),s=w(t+4>>2);t+=8;var u=we.read(e,k,a,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(ye.getStreamFromFD(e),t,r);return b(n>>2,o),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,t,r,n,o){var i=xe(t,r);try{if(isNaN(i))return 61;var a=ye.getStreamFromFD(e);return we.llseek(a,i,n),E(o>>2,(q=[a.position>>>0,($=a.position,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(o+4>>2,q[1]),a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},d:function(e,t,r,n){try{var o=((e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=w(t>>2),s=w(t+4>>2);t+=8;var u=we.write(e,k,a,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(ye.getStreamFromFD(e),t,r);return b(n>>2,o),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},q:Ne},He=function(){var e,t,r,i,a={a:qe};function s(e,t){var r,n=e.exports;return p=(He=n).Q,o.wasmMemory=p,D(),He.W,r=He.R,U.unshift(r),K(),n}if(V(),o.instantiateWasm)try{return o.instantiateWasm(a,s)}catch(e){d(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return(e=f,t=I,r=a,i=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||"function"!=typeof fetch?Q(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>{var n=WebAssembly.instantiateStreaming(e,r),o=e.clone().arrayBuffer();return n.then((function(e){o.then((t=>{z=new G(new Uint8Array(t),e.module),i(e)}),(e=>d(`failed to initialize offset-converter: ${e}`)))}),(function(e){return d(`wasm streaming compile failed: ${e}`),d("falling back to ArrayBuffer instantiation"),Q(t,r,i)}))}))).catch(n),{}}(),Ye=(o._extract_archive=(e,t,r)=>(o._extract_archive=He.S)(e,t,r),o._malloc=e=>(Ye=o._malloc=He.T)(e)),We=o._free=e=>(We=o._free=He.U)(e),Ve=(o._free_extracted_archive=e=>(o._free_extracted_archive=He.V)(e),()=>(Ve=He.X)()),Ke=()=>(Ke=He.Y)(),Ze=e=>(Ze=He.Z)(e),Je=(e,t)=>(Je=He._)(e,t),Xe=e=>(Xe=He.$)(e),Ge=(e,t)=>(Ge=He.aa)(e,t),Qe=e=>(Qe=He.ba)(e),et=()=>(et=He.ca)(),tt=e=>(tt=He.da)(e),rt=e=>(rt=He.ea)(e),nt=(o.__ZN6__asan9FakeStack17AddrIsInFakeStackEm=(e,t)=>(o.__ZN6__asan9FakeStack17AddrIsInFakeStackEm=He.fa)(e,t),o.__ZN6__asan9FakeStack8AllocateEmmm=(e,t,r,n)=>(o.__ZN6__asan9FakeStack8AllocateEmmm=He.ga)(e,t,r,n),e=>(nt=He.ha)(e)),ot=e=>(ot=He.ia)(e),it=e=>(it=He.ja)(e),at=e=>(at=He.ka)(e),st=e=>(st=He.la)(e),ut=e=>(ut=He.ma)(e),lt=(e,t)=>(lt=He.na)(e,t),ct=(e,t)=>(ct=He.oa)(e,t),ft=(e,t)=>(ft=He.pa)(e,t),ht=(e,t)=>(ht=He.qa)(e,t);function dt(){function e(){$e||($e=!0,o.calledRun=!0,M||(L=!0,o.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,de.init(),_e.root=we.mount(_e,{},null),ne(U),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),j.unshift(e);var e;ne(j)}()))}H>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),C.unshift(e);var e;ne(C)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.wasmMemory=p,o.ccall=Be,o.cwrap=(e,t,r,n)=>{var o=!r||r.every((e=>"number"===e||"boolean"===e));return"string"!==t&&o&&!n?Ie(e):function(){return Be(e,t,r,arguments)}},o.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return function(e){return L?nt(e):k[e]}(0|e);case"i16":return g(e>>1);case"i32":return v(e>>2);case"i64":Z("to do getValue(i64) use WASM_BIGINT");case"float":return function(e){return L?st(e):R[e]}(e>>2);case"double":return function(e){return L?ut(e):T[e]}(e>>3);case"*":return w(e>>2);default:Z(`invalid type for getValue: ${t}`)}},o.UTF8ToString=oe,W=function e(){$e||dt(),$e||(W=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return dt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&__webpack_require__.amdO&&define([],(()=>n))}},function(){return gt||(0,mt[te(mt)[0]])((gt={exports:{}}).exports,gt),gt.exports});Se(),wt(),Se(),wt(),Se(),wt();var _t=((e,t,r)=>(r=null!=e?G(re(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of te(t))ne.call(e,r)||undefined===r||Q(e,r,{get:()=>t[r],enumerable:!(n=ee(t,r))||n.enumerable});return e})(e&&e.__esModule?r:Q(r,"default",{value:e,enumerable:!0}),e)))(yt());Se(),wt();var Et=async()=>{const e=await(async()=>await(0,_t.default)({locateFile:e=>e.endsWith(".wasm")?"./unpack-UWASHBVL.wasm":e}))(),t=async(t,r=!1)=>{let n=e._malloc(t.length);e.HEAPU8.set(t,n);let o=e._extract_archive(n,t.length,r);const i={};let a=e.getValue(o+8,"i32"),s=o+12;if(1!==a){const t=e.UTF8ToString(s);throw console.error("Extraction failed with status:",a,"Error:",t),e._free(n),e._free_extracted_archive(o),n=null,o=null,s=null,new Error(t)}const u=e.getValue(o,"i32"),l=e.getValue(o+4,"i32");for(let t=0;t<l;t++){const r=u+12*t,n=e.getValue(r,"i32"),o=e.getValue(r+8,"i32"),a=e.getValue(r+4,"i32"),s=e.UTF8ToString(n),l=new Uint8Array(e.HEAPU8.buffer,a,o).slice(0);i[s]=l}return e._free(n),e._free_extracted_archive(o),n=null,o=null,s=null,i};return{extract:async e=>{let r=(e=>{let t=!1;return[".conda","tar.bz2","tar.gz"].forEach((r=>{e.toLowerCase().endsWith(r)&&(t=!0)})),t})(e);const n=await(async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.arrayBuffer();return new Uint8Array(r)})(e);return t(n,!r)},extractData:t}};function bt(e,t,r){try{Object.keys(t).forEach((n=>{const o=(i=n).substring(0,i.lastIndexOf("/"));var i;e.analyzePath(o).exists||e.mkdirTree(o),e.writeFile(`${r}/${n}`,t[n])}))}catch(e){throw new Error(e?.message)}}function kt(e,t,r,n){let o=new Uint8Array,i=function(e){let t=!1;return Object.keys(e).forEach((e=>{e.match("conda-meta")&&(t=!0)})),t}(e);if(i){let o=new Uint8Array,i="";Object.keys(e).forEach((t=>{t.match("conda-meta")&&(o=e[t],i=t)}));let a=`${t}/conda-meta`;r.analyzePath(`${a}`).exists||r.mkdirTree(`${a}`),n&&console.log(`Saving conda-meta file ${i}`);const s=JSON.stringify(o),u=(new TextEncoder).encode(s);r.writeFile(`${t}/${i}`,u)}else if(n&&console.log("Creating and saving conda-meta json"),Object.keys(e).map((t=>{t.match("index.json")&&(o=e[t])})),0!==o.byteLength){let e=new TextDecoder("utf-8").decode(o);try{let o=JSON.parse(e);const i=`${t}/conda-meta`,a=`${i}/${o.name}-${o.version}-${o.build}.json`,s={name:o.name,version:o.version,build:o.build,build_number:o.build_number};r.analyzePath(`${i}`).exists||r.mkdirTree(`${i}`),n&&console.log(`Creating conda-meta file for ${o.name}-${o.version}-${o.build} package`),r.writeFile(a,JSON.stringify(s))}catch(e){throw new Error(e?.message)}}else n&&console.log("There is no info folder, imposibly to create a conda meta json file")}function Pt(e,t){if(t.startsWith("/")){const r=t.substring(0,t.lastIndexOf("/"));return"/"==e?"/lib"==r:r==`${e}/lib`}return!1}async function St(e,t,r,n){if("/"==e)var o="/lib/python3.11/site-packages";else o=`${e}/lib/python3.11/site-packages`;const i=`${o}/${t}.libs`,a=(e=>{let t={};return(...r)=>{let n=r[0];if(n in t)return t[n];{let r=e(n);return t[n]=r,r}}})(n.FS.readFile);let s=[];const u=function(e,t,r){let n=r.FS.readFile;void 0!==t&&(n=t);const o=new Set;return e.map((e=>{const t=n(e);r.getDylinkMetadata(t).neededDynlibs.forEach((e=>{o.add(e)}))})),o}(r,a,n);s=r.map((t=>({path:t,global:u.has(n.PATH.basename(t))||Pt(e,t)||t.startsWith(i)}))),s.sort(((e,t)=>Number(t.global)-Number(e.global)));for(const{path:t,global:r}of s)try{await xt(e,t,r,[i],a,n)}catch(e){console.error(`Failed to load dynlib ${t}`,e)}}Se(),wt(),Se(),wt();var At=function(){let e=Promise.resolve();return async function(){const t=e;let r=()=>{};return e=new Promise((e=>r=e)),await t,r}}();async function xt(e,t,r,n,o,i){void 0===n&&(n=[]);const a=await At();try{const a=function(e,t,r,n,o){const i=t.substring(0,t.lastIndexOf("/"));let a=r||[];a="/"==e?a.concat([i],["/lib"]):a.concat([i],[`${e}/lib`]);const s=e=>{o.PATH.basename(e),o.PATH.basename(t);for(const t of a){const r=o.PATH.join2(t,e);if(null!==o.FS.findObject(r))return r}return e};let u=e=>o.FS.readFile(s(e));return void 0!==n&&(u=e=>n(s(e))),{findObject:(e,t)=>{let r=o.FS.findObject(s(e),t);return null===r&&console.debug(`Failed to find a library: ${s(e)}`),r},readFile:u}}(e,t,n,o,i),s=i.PATH.basename(t);await i.loadDynamicLibrary(s,{loadAsync:!0,nodelete:!0,allowUndefined:!0,global:r,fs:a});const u=i.LDSO.loadedLibsByName[s],l=i.LDSO.loadedLibsByName[t];u||l||console.execption(`Failed to load ${s} from ${t} LDSO not found`),u||(i.LDSO.loadedLibsByName[s]=l),l||(i.LDSO.loadedLibsByName[t]=u)}catch(e){throw new Error(e?.message)}finally{a()}}async function Rt(e){const t=new Promise((t=>{e.monitorRunDependencies=e=>{0===e&&t()}}));return e.addRunDependency("dummy"),e.removeRunDependency("dummy"),t}let Tt,Mt,Ot,Dt;globalThis.Module={},globalThis.toplevel_promise=null,globalThis.toplevel_promise_py_proxy=null,self.get_stdin=async function(){return new Promise((e=>{Tt=e}))},globalThis.ready=new Promise((e=>{Mt=e}));class Ct{constructor(e={}){this._sendWorkerMessage=()=>{}}async ready(){return await globalThis.ready}async cd(e){e&&globalThis.Module.FS&&globalThis.Module.FS.chdir(e)}async isDir(e){try{const t=globalThis.Module.FS.lookupPath(e);return globalThis.Module.FS.isDir(t.node.mode)}catch(e){return!1}}async processMessage(e){const t=e.msg.header.msg_type;await globalThis.ready,null!==globalThis.toplevel_promise&&null!==globalThis.toplevel_promise_py_proxy&&(await globalThis.toplevel_promise,globalThis.toplevel_promise_py_proxy.delete(),globalThis.toplevel_promise_py_proxy=null,globalThis.toplevel_promise=null),"input_reply"===t?Tt(e.msg):Dt.notify_listener(e.msg)}async initialize(e){const{baseUrl:t,kernelSpec:r,empackEnvMetaLink:n}=e,o=X.URLExt.join(t,r.argv[0]),i=o.replace(".js",".wasm"),a=o.replace(".js",".data"),s=X.URLExt.join(t,"xeus","kernels",r.dir),u=r.metadata&&r.metadata.shared?r.metadata.shared:{};importScripts(o),globalThis.Module=await createXeusModule({locateFile:e=>e in u?X.URLExt.join(s,e):e.endsWith(".wasm")?i:e.endsWith(".data")?a:e});try{if(await Rt(globalThis.Module),void 0!==globalThis.Module.FS&&void 0!==globalThis.Module.loadDynamicLibrary){const e=`${n||s}/empack_env_meta.json`,o=X.URLExt.join(t,"xeus/kernel_packages"),i=await async function(e){const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}(e),a=await(async e=>{const{empackEnvMeta:t,pkgRootUrl:r,Module:n,verbose:o,generateCondaMeta:i}=e;let a;if(e.untarjs)a=e.untarjs;else{const e=Et();a=await e}const s={};return t.packages.length&&(await Promise.all(t.packages.map((async e=>{const u=e?.url??`${r}/${e.filename}`;o&&console.log(`Install ${e.filename} taken from ${u}`),s[e.name]=await async function(e,t,r,n,o=!1,i=!1){if(!t)throw new Error(`There is no file in ${t}`);let a,s=await n.extract(t),u=e;if(0!==Object.keys(s).length)if("/"===e&&(u=""),t.toLowerCase().endsWith(".conda")){let e=new Uint8Array,l=new Uint8Array;if(Object.keys(s).map((t=>{t.startsWith("pkg-")?e=s[t]:t.startsWith("info-")&&(l=s[t])})),e&&0===e.byteLength||l&&0===l.byteLength)throw new Error(`Invalid .conda package ${t}`);const c=await n.extractData(e),f=await n.extractData(l);i&&kt(f,u,r,o),bt(r,{...c,...f},u),a=c}else i&&kt(s,u,r,o),bt(r,s,u),a=s;if(!a)throw new Error(`There is no file in ${t}`);return"/"===e&&(u=""),0!==Object.keys(a).length?function(e,t){let r=[];return Object.keys(e).map((n=>{(n.endsWith(".so")||n.includes(".so."))&&function(e){const t=[0,97,115,109];return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}(e[n])&&r.push(`${t}/${n}`)})),r}(a,u):[]}(t.prefix,u,n.FS,a,!!o,!!i)}))),await Rt(n)),s})({empackEnvMeta:i,pkgRootUrl:o,Module:globalThis.Module,verbose:!0});if("xpython"===r.name){const e=function(e){let t;for(let r=0;r<e.length;r++)if("python"==e[r].name){t=e[r];break}if(t)return t.version.split(".").map((e=>parseInt(e)))}(i.packages);if(!e)throw new Error("Failed to load Python!");await async function(e){await e.Module.init_phase_1(e.prefix,e.pythonVersion,e.verbose),e.Module.init_phase_2(e.prefix,e.pythonVersion,e.verbose)}({prefix:i.prefix,pythonVersion:e,Module:globalThis.Module})}await async function(e){const{sharedLibs:t,prefix:r,Module:n}=e,o=[];for(const e of Object.keys(t)){const i=t[e];i&&o.push(St(r,e,i,n))}return await Promise.all(o)}({sharedLibs:a,prefix:i.prefix,Module:globalThis.Module})}Ot=new globalThis.Module.xkernel,Dt=Ot.get_server(),Dt||console.error("Failed to start kernel!"),Ot.start()}catch(e){if("number"==typeof e){const t=globalThis.Module.get_exception_message(e);throw new Error(t)}throw e}Mt(1)}registerCallback(e){this._sendWorkerMessage=e}}class Ut extends x{createAPI(e){return new A(e.baseUrl,e.driveName,e.mountpoint,e.FS,e.ERRNO_CODES)}}class Ft extends Ct{async mount(e,t,r){const{FS:n,PATH:o,ERRNO_CODES:i}=globalThis.Module;if(!n)return;const a=new Ut({FS:n,PATH:o,ERRNO_CODES:i,baseUrl:r,driveName:e,mountpoint:t});n.mkdir(t),n.mount(a,{},t),n.chdir(t)}}u(new Ft)})(),__webpack_exports__})()));
|
|
2
|
+
define((()=>(()=>{var __webpack_modules__={704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityMonitor=void 0;const n=r(992);t.ActivityMonitor=class{constructor(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new n.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}get activityStopped(){return this._activityStopped}get timeout(){return this._timeout}set timeout(e){this._timeout=e}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,n.Signal.clearData(this))}_onSignalFired(e,t){clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=setTimeout((()=>{this._activityStopped.emit({sender:this._sender,args:this._args})}),this._timeout)}}},925:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(704),t),o(r(269),t),o(r(232),t),o(r(547),t),o(r(964),t),o(r(830),t),o(r(361),t),o(r(126),t),o(r(796),t),o(r(692),t)},269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},232:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LruCache=void 0,t.LruCache=class{constructor(e={}){this._map=new Map,this._maxSize=(null==e?void 0:e.maxSize)||128}get size(){return this._map.size}clear(){this._map.clear()}get(e){const t=this._map.get(e)||null;return null!=t&&(this._map.delete(e),this._map.set(e,t)),t}set(e,t){this._map.size>=this._maxSize&&this._map.delete(this._map.keys().next().value),this._map.set(e,t)}}},547:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownCodeBlocks=void 0,function(e){e.CODE_BLOCK_MARKER="```";const t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"];class r{constructor(e){this.startLine=e,this.code="",this.endLine=-1}}e.MarkdownCodeBlock=r,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];const n=t.split("\n"),o=[];let i=null;for(let t=0;t<n.length;t++){const a=n[t],s=0===a.indexOf(e.CODE_BLOCK_MARKER),u=null!=i;if(s||u)if(u)i&&(s?(i.endLine=t-1,o.push(i),i=null):i.code+=a+"\n");else{i=new r(t);const n=a.indexOf(e.CODE_BLOCK_MARKER),s=a.lastIndexOf(e.CODE_BLOCK_MARKER);n!==s&&(i.code=a.substring(n+e.CODE_BLOCK_MARKER.length,s),i.endLine=t,o.push(i),i=null)}}return o}}(r||(t.MarkdownCodeBlocks=r={}))},964:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PageConfig=void 0;const coreutils_1=__webpack_require__(764),minimist_1=__importDefault(__webpack_require__(600)),url_1=__webpack_require__(692);var PageConfig;(function(PageConfig){function getOption(name){if(configData)return configData[name]||getBodyData(name);configData=Object.create(null);let found=!1;if("undefined"!=typeof document&&document){const e=document.getElementById("jupyter-config-data");e&&(configData=JSON.parse(e.textContent||""),found=!0)}if(!found&&"undefined"!=typeof process&&process.argv)try{const cli=(0,minimist_1.default)(process.argv.slice(2)),path=__webpack_require__(942);let fullPath="";"jupyter-config-data"in cli?fullPath=path.resolve(cli["jupyter-config-data"]):"JUPYTER_CONFIG_DATA"in process.env&&(fullPath=path.resolve(process.env.JUPYTER_CONFIG_DATA)),fullPath&&(configData=eval("require")(fullPath))}catch(e){console.error(e)}if(coreutils_1.JSONExt.isObject(configData))for(const e in configData)"string"!=typeof configData[e]&&(configData[e]=JSON.stringify(configData[e]));else configData=Object.create(null);return configData[name]||getBodyData(name)}function setOption(e,t){const r=getOption(e);return configData[e]=t,r}function getBaseUrl(){return url_1.URLExt.normalize(getOption("baseUrl")||"/")}function getTreeUrl(){return url_1.URLExt.join(getBaseUrl(),getOption("treeUrl"))}function getShareUrl(){return url_1.URLExt.normalize(getOption("shareUrl")||getBaseUrl())}function getTreeShareUrl(){return url_1.URLExt.normalize(url_1.URLExt.join(getShareUrl(),getOption("treeUrl")))}function getUrl(e){var t,r,n,o;let i=e.toShare?getShareUrl():getBaseUrl();const a=null!==(t=e.mode)&&void 0!==t?t:getOption("mode"),s=null!==(r=e.workspace)&&void 0!==r?r:getOption("workspace"),u="single-document"===a?"doc":"lab";i=url_1.URLExt.join(i,u),s!==PageConfig.defaultWorkspace&&(i=url_1.URLExt.join(i,"workspaces",encodeURIComponent(null!==(n=getOption("workspace"))&&void 0!==n?n:PageConfig.defaultWorkspace)));const l=null!==(o=e.treePath)&&void 0!==o?o:getOption("treePath");return l&&(i=url_1.URLExt.join(i,"tree",url_1.URLExt.encodeParts(l))),i}function getWsUrl(e){let t=getOption("wsUrl");if(!t){if(0!==(e=e?url_1.URLExt.normalize(e):getBaseUrl()).indexOf("http"))return"";t="ws"+e.slice(4)}return url_1.URLExt.normalize(t)}function getNBConvertURL({path:e,format:t,download:r}){const n=url_1.URLExt.encodeParts(e),o=url_1.URLExt.join(getBaseUrl(),"nbconvert",t,n);return r?o+"?download=true":o}function getToken(){return getOption("token")||getBodyData("jupyterApiToken")}function getNotebookVersion(){const e=getOption("notebookVersion");return""===e?[0,0,0]:JSON.parse(e)}PageConfig.getOption=getOption,PageConfig.setOption=setOption,PageConfig.getBaseUrl=getBaseUrl,PageConfig.getTreeUrl=getTreeUrl,PageConfig.getShareUrl=getShareUrl,PageConfig.getTreeShareUrl=getTreeShareUrl,PageConfig.getUrl=getUrl,PageConfig.defaultWorkspace="default",PageConfig.getWsUrl=getWsUrl,PageConfig.getNBConvertURL=getNBConvertURL,PageConfig.getToken=getToken,PageConfig.getNotebookVersion=getNotebookVersion;let configData=null,Extension;function getBodyData(e){if("undefined"==typeof document||!document.body)return"";const t=document.body.dataset[e];return void 0===t?"":decodeURIComponent(t)}!function(e){function t(e){try{const t=getOption(e);if(t)return JSON.parse(t)}catch(t){console.warn(`Unable to parse ${e}.`,t)}return[]}e.deferred=t("deferredExtensions"),e.disabled=t("disabledExtensions"),e.isDeferred=function(t){const r=t.indexOf(":");let n="";return-1!==r&&(n=t.slice(0,r)),e.deferred.some((e=>e===t||n&&e===n))},e.isDisabled=function(t){const r=t.indexOf(":");let n="";return-1!==r&&(n=t.slice(0,r)),e.disabled.some((e=>e===t||n&&e===n))}}(Extension=PageConfig.Extension||(PageConfig.Extension={}))})(PageConfig||(exports.PageConfig=PageConfig={}))},830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathExt=void 0;const n=r(942);var o;!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(...e){const r=n.posix.join(...e);return"."===r?"":t(r)},e.joinWithLeadingSlash=function(...e){const t=n.posix.join(...e);return"."===t?"":t},e.basename=function(e,t){return n.posix.basename(e,t)},e.dirname=function(e){const r=t(n.posix.dirname(e));return"."===r?"":r},e.extname=function(e){return n.posix.extname(e)},e.normalize=function(e){return""===e?"":t(n.posix.normalize(e))},e.resolve=function(...e){return t(n.posix.resolve(...e))},e.relative=function(e,r){return t(n.posix.relative(e,r))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e},e.removeSlash=t}(o||(t.PathExt=o={}))},361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signalToPromise=void 0;const n=r(764);t.signalToPromise=function(e,t){const r=new n.PromiseDelegate;function o(){e.disconnect(i)}function i(e,t){o(),r.resolve([e,t])}return e.connect(i),(null!=t?t:0)>0&&setTimeout((()=>{o(),r.reject(`Signal not emitted within ${t} ms.`)}),t),r.promise}},126:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,function(e){e.jsIndexToCharIndex=function(e,t){return e},e.charIndexToJsIndex=function(e,t){return e},e.camelCase=function(e,t=!1){return e.replace(/^(\w)|[\s-_:]+(\w)/g,(function(e,r,n){return n?n.toUpperCase():t?r.toUpperCase():r.toLowerCase()}))},e.titleCase=function(e){return(e||"").toLowerCase().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")}}(r||(t.Text=r={}))},796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;const r=[{name:"years",milliseconds:31536e6},{name:"months",milliseconds:2592e6},{name:"days",milliseconds:864e5},{name:"hours",milliseconds:36e5},{name:"minutes",milliseconds:6e4},{name:"seconds",milliseconds:1e3}];var n;!function(e){e.formatHuman=function(e,t="long"){const n=document.documentElement.lang||"en",o=new Intl.RelativeTimeFormat(n,{numeric:"auto",style:t}),i=new Date(e).getTime()-Date.now();for(let e of r){const t=Math.ceil(i/e.milliseconds);if(0!==t)return o.format(t,e.name)}return o.format(0,"seconds")},e.format=function(e){const t=document.documentElement.lang||"en";return new Intl.DateTimeFormat(t,{dateStyle:"short",timeStyle:"short"}).format(new Date(e))}}(n||(t.Time=n={}))},692:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.URLExt=void 0;const o=r(942),i=n(r(225));var a;!function(e){function t(e){if("undefined"!=typeof document&&document){const t=document.createElement("a");return t.href=e,t}return(0,i.default)(e)}function r(...e){let t=(0,i.default)(e[0],{});const r=""===t.protocol&&t.slashes;r&&(t=(0,i.default)(e[0],"https:"+e[0]));const n=`${r?"":t.protocol}${t.slashes?"//":""}${t.auth}${t.auth?"@":""}${t.host}`,a=o.posix.join(`${n&&"/"!==t.pathname[0]?"/":""}${t.pathname}`,...e.slice(1));return`${n}${"."===a?"":a}`}e.parse=t,e.getHostName=function(e){return(0,i.default)(e).hostname},e.normalize=function(e){return e&&t(e).toString()},e.join=r,e.encodeParts=function(e){return r(...e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){const t=Object.keys(e).filter((e=>e.length>0));return t.length?"?"+t.map((t=>{const r=encodeURIComponent(String(e[t]));return t+(r?"="+r:"")})).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce(((e,t)=>{const[r,n]=t.split("=");return r.length>0&&(e[r]=decodeURIComponent(n||"")),e}),{})},e.isLocal=function(e,r=!1){const{protocol:n}=t(e);return(!n||0!==e.toLowerCase().indexOf(n))&&(r?0!==e.indexOf("//"):0!==e.indexOf("/"))}}(a||(t.URLExt=a={}))},135:(e,t,r)=>{"use strict";var n,o,i;function*a(...e){for(const t of e)yield*t}function*s(){}function*u(e,t=0){for(const r of e)yield[t++,r]}function*l(e,t){let r=0;for(const n of e)t(n,r++)&&(yield n)}function c(e,t){let r=0;for(const n of e)if(t(n,r++))return n}function f(e,t){let r=0;for(const n of e)if(t(n,r++))return r-1;return-1}function h(e,t){let r;for(const n of e)void 0!==r?t(n,r)<0&&(r=n):r=n;return r}function d(e,t){let r;for(const n of e)void 0!==r?t(n,r)>0&&(r=n):r=n;return r}function p(e,t){let r,n,o=!0;for(const i of e)o?(r=i,n=i,o=!1):t(i,r)<0?r=i:t(i,n)>0&&(n=i);return o?void 0:[r,n]}function m(e){return Array.from(e)}function g(e){const t={};for(const[r,n]of e)t[r]=n;return t}function v(e,t){let r=0;for(const n of e)if(!1===t(n,r++))return}function w(e,t){let r=0;for(const n of e)if(!1===t(n,r++))return!1;return!0}function y(e,t){let r=0;for(const n of e)if(t(n,r++))return!0;return!1}function*_(e,t){let r=0;for(const n of e)yield t(n,r++)}function*E(e,t,r){void 0===t?(t=e,e=0,r=1):void 0===r&&(r=1);const n=o.rangeLength(e,t,r);for(let t=0;t<n;t++)yield e+r*t}function b(e,t,r){const n=e[Symbol.iterator]();let o=0,i=n.next();if(i.done&&void 0===r)throw new TypeError("Reduce of empty iterable with no initial value.");if(i.done)return r;let a,s,u=n.next();if(u.done&&void 0===r)return i.value;if(u.done)return t(r,i.value,o++);for(a=t(void 0===r?i.value:t(r,i.value,o++),u.value,o++);!(s=n.next()).done;)a=t(a,s.value,o++);return a}function*k(e,t){for(;0<t--;)yield e}function*P(e){yield e}function*S(e){if("function"==typeof e.retro)yield*e.retro();else for(let t=e.length-1;t>-1;t--)yield e[t]}function A(e){let t=[],r=new Set,n=new Map;for(const t of e)o(t);for(const[e]of n)i(e);return t;function o(e){let[t,r]=e,o=n.get(r);o?o.push(t):n.set(r,[t])}function i(e){if(r.has(e))return;r.add(e);let o=n.get(e);if(o)for(const e of o)i(e);t.push(e)}}function*x(e,t){let r=0;for(const n of e)0==r++%t&&(yield n)}function*R(e,t){if(t<1)return;const r=e[Symbol.iterator]();let n;for(;0<t--&&!(n=r.next()).done;)yield n.value}function*T(...e){const t=e.map((e=>e[Symbol.iterator]()));let r=t.map((e=>e.next()));for(;w(r,(e=>!e.done));r=t.map((e=>e.next())))yield r.map((e=>e.value))}r.r(t),r.d(t,{ArrayExt:()=>n,StringExt:()=>i,chain:()=>a,each:()=>v,empty:()=>s,enumerate:()=>u,every:()=>w,filter:()=>l,find:()=>c,findIndex:()=>f,map:()=>_,max:()=>d,min:()=>h,minmax:()=>p,once:()=>P,range:()=>E,reduce:()=>b,repeat:()=>k,retro:()=>S,some:()=>y,stride:()=>x,take:()=>R,toArray:()=>m,toObject:()=>g,topologicSort:()=>A,zip:()=>T}),function(e){function t(e,t,r=0,n=-1){let o,i=e.length;if(0===i)return-1;r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n){let o=(r+n)%i;if(e[o]===t)return o}return-1}function r(e,t,r=-1,n=0){let o,i=e.length;if(0===i)return-1;o=(r=r<0?Math.max(0,r+i):Math.min(r,i-1))<(n=n<0?Math.max(0,n+i):Math.min(n,i-1))?r+1+(i-n):r-n+1;for(let n=0;n<o;++n){let o=(r-n+i)%i;if(e[o]===t)return o}return-1}function n(e,t,r=0,n=-1){let o,i=e.length;if(0===i)return-1;r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n){let o=(r+n)%i;if(t(e[o],o))return o}return-1}function o(e,t,r=-1,n=0){let o,i=e.length;if(0===i)return-1;o=(r=r<0?Math.max(0,r+i):Math.min(r,i-1))<(n=n<0?Math.max(0,n+i):Math.min(n,i-1))?r+1+(i-n):r-n+1;for(let n=0;n<o;++n){let o=(r-n+i)%i;if(t(e[o],o))return o}return-1}function i(e,t=0,r=-1){let n=e.length;if(!(n<=1))for(t=t<0?Math.max(0,t+n):Math.min(t,n-1),r=r<0?Math.max(0,r+n):Math.min(r,n-1);t<r;){let n=e[t],o=e[r];e[t++]=o,e[r--]=n}}function a(e,t){let r=e.length;if(t<0&&(t+=r),t<0||t>=r)return;let n=e[t];for(let n=t+1;n<r;++n)e[n-1]=e[n];return e.length=r-1,n}e.firstIndexOf=t,e.lastIndexOf=r,e.findFirstIndex=n,e.findLastIndex=o,e.findFirstValue=function(e,t,r=0,o=-1){let i=n(e,t,r,o);return-1!==i?e[i]:void 0},e.findLastValue=function(e,t,r=-1,n=0){let i=o(e,t,r,n);return-1!==i?e[i]:void 0},e.lowerBound=function(e,t,r,n=0,o=-1){let i=e.length;if(0===i)return 0;let a=n=n<0?Math.max(0,n+i):Math.min(n,i-1),s=(o=o<0?Math.max(0,o+i):Math.min(o,i-1))-n+1;for(;s>0;){let n=s>>1,o=a+n;r(e[o],t)<0?(a=o+1,s-=n+1):s=n}return a},e.upperBound=function(e,t,r,n=0,o=-1){let i=e.length;if(0===i)return 0;let a=n=n<0?Math.max(0,n+i):Math.min(n,i-1),s=(o=o<0?Math.max(0,o+i):Math.min(o,i-1))-n+1;for(;s>0;){let n=s>>1,o=a+n;r(e[o],t)>0?s=n:(a=o+1,s-=n+1)}return a},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;++n)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0},e.slice=function(e,t={}){let{start:r,stop:n,step:o}=t;if(void 0===o&&(o=1),0===o)throw new Error("Slice `step` cannot be zero.");let i,a=e.length;void 0===r?r=o<0?a-1:0:r<0?r=Math.max(r+a,o<0?-1:0):r>=a&&(r=o<0?a-1:a),void 0===n?n=o<0?-1:a:n<0?n=Math.max(n+a,o<0?-1:0):n>=a&&(n=o<0?a-1:a),i=o<0&&n>=r||o>0&&r>=n?0:o<0?Math.floor((n-r+1)/o+1):Math.floor((n-r-1)/o+1);let s=[];for(let t=0;t<i;++t)s[t]=e[r+t*o];return s},e.move=function(e,t,r){let n=e.length;if(n<=1)return;if((t=t<0?Math.max(0,t+n):Math.min(t,n-1))===(r=r<0?Math.max(0,r+n):Math.min(r,n-1)))return;let o=e[t],i=t<r?1:-1;for(let n=t;n!==r;n+=i)e[n]=e[n+i];e[r]=o},e.reverse=i,e.rotate=function(e,t,r=0,n=-1){let o=e.length;if(o<=1)return;if((r=r<0?Math.max(0,r+o):Math.min(r,o-1))>=(n=n<0?Math.max(0,n+o):Math.min(n,o-1)))return;let a=n-r+1;if(t>0?t%=a:t<0&&(t=(t%a+a)%a),0===t)return;let s=r+t;i(e,r,s-1),i(e,s,n),i(e,r,n)},e.fill=function(e,t,r=0,n=-1){let o,i=e.length;if(0!==i){r=r<0?Math.max(0,r+i):Math.min(r,i-1),o=(n=n<0?Math.max(0,n+i):Math.min(n,i-1))<r?n+1+(i-r):n-r+1;for(let n=0;n<o;++n)e[(r+n)%i]=t}},e.insert=function(e,t,r){let n=e.length;t=t<0?Math.max(0,t+n):Math.min(t,n);for(let r=n;r>t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=a,e.removeFirstOf=function(e,r,n=0,o=-1){let i=t(e,r,n,o);return-1!==i&&a(e,i),i},e.removeLastOf=function(e,t,n=-1,o=0){let i=r(e,t,n,o);return-1!==i&&a(e,i),i},e.removeAllOf=function(e,t,r=0,n=-1){let o=e.length;if(0===o)return 0;r=r<0?Math.max(0,r+o):Math.min(r,o-1),n=n<0?Math.max(0,n+o):Math.min(n,o-1);let i=0;for(let a=0;a<o;++a)r<=n&&a>=r&&a<=n&&e[a]===t||n<r&&(a<=n||a>=r)&&e[a]===t?i++:i>0&&(e[a-i]=e[a]);return i>0&&(e.length=o-i),i},e.removeFirstWhere=function(e,t,r=0,o=-1){let i,s=n(e,t,r,o);return-1!==s&&(i=a(e,s)),{index:s,value:i}},e.removeLastWhere=function(e,t,r=-1,n=0){let i,s=o(e,t,r,n);return-1!==s&&(i=a(e,s)),{index:s,value:i}},e.removeAllWhere=function(e,t,r=0,n=-1){let o=e.length;if(0===o)return 0;r=r<0?Math.max(0,r+o):Math.min(r,o-1),n=n<0?Math.max(0,n+o):Math.min(n,o-1);let i=0;for(let a=0;a<o;++a)r<=n&&a>=r&&a<=n&&t(e[a],a)||n<r&&(a<=n||a>=r)&&t(e[a],a)?i++:i>0&&(e[a-i]=e[a]);return i>0&&(e.length=o-i),i}}(n||(n={})),function(e){e.rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||e<t&&r<0?0:Math.ceil((t-e)/r)}}(o||(o={})),function(e){function t(e,t,r=0){let n=new Array(t.length);for(let o=0,i=r,a=t.length;o<a;++o,++i){if(i=e.indexOf(t[o],i),-1===i)return null;n[o]=i}return n}e.findIndices=t,e.matchSumOfSquares=function(e,r,n=0){let o=t(e,r,n);if(!o)return null;let i=0;for(let e=0,t=o.length;e<t;++e){let t=o[e]-n;i+=t*t}return{score:i,indices:o}},e.matchSumOfDeltas=function(e,r,n=0){let o=t(e,r,n);if(!o)return null;let i=0,a=n-1;for(let e=0,t=o.length;e<t;++e){let t=o[e];i+=t-a-1,a=t}return{score:i,indices:o}},e.highlight=function(e,t,r){let n=[],o=0,i=0,a=t.length;for(;o<a;){let s=t[o],u=t[o];for(;++o<a&&t[o]===u+1;)u++;i<s&&n.push(e.slice(i,s)),s<u+1&&n.push(r(e.slice(s,u+1))),i=u+1}return i<e.length&&n.push(e.slice(i)),n},e.cmp=function(e,t){return e<t?-1:e>t?1:0}}(i||(i={}))},764:function(e,t,r){!function(e,t){"use strict";e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}function n(e,o){if(e===o)return!0;if(t(e)||t(o))return!1;let i=r(e),a=r(o);return i===a&&(i&&a?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;++r)if(!n(e[r],t[r]))return!1;return!0}(e,o):function(e,t){if(e===t)return!0;for(let r in e)if(void 0!==e[r]&&!(r in t))return!1;for(let r in t)if(void 0!==t[r]&&!(r in e))return!1;for(let r in e){let o=e[r],i=t[r];if(void 0!==o||void 0!==i){if(void 0===o||void 0===i)return!1;if(!n(o,i))return!1}}return!0}(e,o))}function o(e){return t(e)?e:r(e)?function(e){let t=new Array(e.length);for(let r=0,n=e.length;r<n;++r)t[r]=o(e[r]);return t}(e):function(e){let t={};for(let r in e){let n=e[r];void 0!==n&&(t[r]=o(n))}return t}(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r,e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=n,e.deepCopy=o}(e.JSONExt||(e.JSONExt={}));var r;!function(e){class r{constructor(e){var t,r,n,o;this._activated=!1,this._promise=null,this._service=null,this.id=e.id,this.description=null!==(t=e.description)&&void 0!==t?t:"",this.activate=e.activate,this.deactivate=null!==(r=e.deactivate)&&void 0!==r?r:null,this.provides=null!==(n=e.provides)&&void 0!==n?n:null,this.autoStart=null!==(o=e.autoStart)&&void 0!==o&&o,this.requires=e.requires?e.requires.slice():[],this.optional=e.optional?e.optional.slice():[]}get activated(){return this._activated}set activated(e){this._activated=e}get service(){return this._service}set service(e){this._service=e}get promise(){return this._promise}set promise(e){this._promise=e}}e.createPluginData=function(e){return new r(e)},e.ensureNoCycle=function(e,t,r){const n=[...e.requires,...e.optional],o=n=>{if(n===e.provides)return!0;const a=r.get(n);if(!a)return!1;const s=t.get(a),u=[...s.requires,...s.optional];return 0!==u.length&&(i.push(a),!!u.some(o)||(i.pop(),!1))};if(!e.provides||0===n.length)return;const i=[e.id];if(n.some(o))throw new ReferenceError(`Cycle detected: ${i.join(" -> ")}.`)},e.findDependents=function(e,r,n){const o=new Array,i=e=>{const t=r.get(e),i=[...t.requires,...t.optional];o.push(...i.reduce(((t,r)=>{const o=n.get(r);return o&&t.push([e,o]),t}),[]))};for(const e of r.keys())i(e);const a=o.filter((t=>t[1]===e));let s=0;for(;a.length>s;){const e=a.length,t=new Set(a.map((e=>e[0])));for(const e of t)o.filter((t=>t[1]===e)).forEach((e=>{a.includes(e)||a.push(e)}));s=e}const u=t.topologicSort(a),l=u.findIndex((t=>t===e));return-1===l?[e]:u.slice(0,l+1)},e.collectStartupPlugins=function(e,t){const r=new Set;for(const t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(const e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(const e of t.ignorePlugins)r.delete(e);return Array.from(r)}}(r||(r={}));function n(e){let t=0;for(let r=0,n=e.length;r<n;++r)r%4==0&&(t=4294967295*Math.random()>>>0),e[r]=255&t,t>>>=8}e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{const e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:n})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){const t=new Uint8Array(16),r=new Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter((([e,t])=>"defer"===t.autoStart)).map((([e,t])=>e))}getPluginDescription(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==r?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==r&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);const t=r.createPluginData(e);r.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(const t of e)this.registerPlugin(t)}deregisterPlugin(e,t){const r=this._plugins.get(e);if(r){if(r.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;const r=t.requires.map((e=>this.resolveRequiredService(e))),n=t.optional.map((e=>this.resolveOptionalService(e)));return t.promise=Promise.all([...r,...n]).then((e=>t.activate.apply(void 0,[this.application,...e]))).then((e=>{t.service=e,t.activated=!0,t.promise=null})).catch((e=>{throw t.promise=null,e})),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{const e=this.deferredPlugins.filter((e=>this._plugins.get(e).autoStart)).map((e=>this.activatePlugin(e)));await Promise.all(e);break}case"startUp":{const e=r.collectStartupPlugins(this._plugins,t).map((async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}}));await Promise.all(e);break}}}async deactivatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);const n=r.findDependents(e,this._plugins,this._services),o=n.map((e=>this._plugins.get(e)));for(const t of o)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(const e of o){const t=[...e.requires,...e.optional].map((e=>{const t=this._services.get(e);return t?this._plugins.get(t).service:null}));await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return n.pop(),n}async resolveRequiredService(e){const t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);const r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){const t=this._services.get(e);if(!t)return null;const r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=null!=t?t:"",this._tokenStructuralPropertyT=null}}}(t,r(135))},992:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Signal:()=>a,Stream:()=>s});var n,o=r(135),i=r(764);class a{constructor(e){this.sender=e}connect(e,t){return n.connect(this,e,t)}disconnect(e,t){return n.disconnect(this,e,t)}emit(e){n.emit(this,e)}}!function(e){e.disconnectBetween=function(e,t){n.disconnectBetween(e,t)},e.disconnectSender=function(e){n.disconnectSender(e)},e.disconnectReceiver=function(e){n.disconnectReceiver(e)},e.disconnectAll=function(e){n.disconnectAll(e)},e.clearData=function(e){n.disconnectAll(e)},e.getExceptionHandler=function(){return n.exceptionHandler},e.setExceptionHandler=function(e){let t=n.exceptionHandler;return n.exceptionHandler=e,t}}(a||(a={}));class s extends a{constructor(){super(...arguments),this._pending=new i.PromiseDelegate}async*[Symbol.asyncIterator](){let e=this._pending;for(;;)try{const{args:t,next:r}=await e.promise;e=r,yield t}catch(e){return}}emit(e){const t=this._pending,r=this._pending=new i.PromiseDelegate;t.resolve({args:e,next:r}),super.emit(e)}stop(){this._pending.promise.catch((()=>{})),this._pending.reject("stop"),this._pending=new i.PromiseDelegate}}!function(e){function t(e){let t=n.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,c(i.get(t))}c(t)}}function r(e){let t=i.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,c(n.get(t))}c(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let o=n.get(e.sender);if(o||(o=[],n.set(e.sender,o)),u(o,e,t,r))return!1;let a=r||t,s=i.get(a);s||(s=[],i.set(a,s));let l={signal:e,slot:t,thisArg:r};return o.push(l),s.push(l),!0},e.disconnect=function(e,t,r){r=r||void 0;let o=n.get(e.sender);if(!o||0===o.length)return!1;let a=u(o,e,t,r);if(!a)return!1;let s=r||t,l=i.get(s);return a.signal=null,c(o),c(l),!0},e.disconnectBetween=function(e,t){let r=n.get(e);if(!r||0===r.length)return;let o=i.get(t);if(o&&0!==o.length){for(const t of o)t.signal&&t.signal.sender===e&&(t.signal=null);c(r),c(o)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(e,t){let r=n.get(e.sender);if(r&&0!==r.length)for(let n=0,o=r.length;n<o;++n){let o=r[n];o.signal===e&&l(o,t)}};const n=new WeakMap,i=new WeakMap,a=new Set,s="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function u(e,t,r,n){return(0,o.find)(e,(e=>e.signal===t&&e.slot===r&&e.thisArg===n))}function l(t,r){let{signal:n,slot:o,thisArg:i}=t;try{o.call(i,n.sender,r)}catch(t){e.exceptionHandler(t)}}function c(e){0===a.size&&s(f),a.add(e)}function f(){a.forEach(h),a.clear()}function h(e){o.ArrayExt.removeAllWhere(e,d)}function d(e){return null===e.signal}}(n||(n={}))},600:e=>{"use strict";function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function r(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,n){n||(n={});var o={bools:{},strings:{},unknownFn:null};"function"==typeof n.unknown&&(o.unknownFn=n.unknown),"boolean"==typeof n.boolean&&n.boolean?o.allBools=!0:[].concat(n.boolean).filter(Boolean).forEach((function(e){o.bools[e]=!0}));var i={};function a(e){return i[e].some((function(e){return o.bools[e]}))}Object.keys(n.alias||{}).forEach((function(e){i[e]=[].concat(n.alias[e]),i[e].forEach((function(t){i[t]=[e].concat(i[e].filter((function(e){return t!==e})))}))})),[].concat(n.string).filter(Boolean).forEach((function(e){o.strings[e]=!0,i[e]&&[].concat(i[e]).forEach((function(e){o.strings[e]=!0}))}));var s=n.default||{},u={_:[]};function l(e,t,n){for(var i=e,a=0;a<t.length-1;a++){var s=t[a];if(r(i,s))return;void 0===i[s]&&(i[s]={}),i[s]!==Object.prototype&&i[s]!==Number.prototype&&i[s]!==String.prototype||(i[s]={}),i[s]===Array.prototype&&(i[s]=[]),i=i[s]}var u=t[t.length-1];r(i,u)||(i!==Object.prototype&&i!==Number.prototype&&i!==String.prototype||(i={}),i===Array.prototype&&(i=[]),void 0===i[u]||o.bools[u]||"boolean"==typeof i[u]?i[u]=n:Array.isArray(i[u])?i[u].push(n):i[u]=[i[u],n])}function c(e,r,n){if(!n||!o.unknownFn||function(e,t){return o.allBools&&/^--[^=]+$/.test(t)||o.strings[e]||o.bools[e]||i[e]}(e,n)||!1!==o.unknownFn(n)){var a=!o.strings[e]&&t(r)?Number(r):r;l(u,e.split("."),a),(i[e]||[]).forEach((function(e){l(u,e.split("."),a)}))}}Object.keys(o.bools).forEach((function(e){c(e,void 0!==s[e]&&s[e])}));var f=[];-1!==e.indexOf("--")&&(f=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var h=0;h<e.length;h++){var d,p,m=e[h];if(/^--.+=/.test(m)){var g=m.match(/^--([^=]+)=([\s\S]*)$/);d=g[1];var v=g[2];o.bools[d]&&(v="false"!==v),c(d,v,m)}else if(/^--no-.+/.test(m))c(d=m.match(/^--no-(.+)/)[1],!1,m);else if(/^--.+/.test(m))d=m.match(/^--(.+)/)[1],void 0===(p=e[h+1])||/^(-|--)[^-]/.test(p)||o.bools[d]||o.allBools||i[d]&&a(d)?/^(true|false)$/.test(p)?(c(d,"true"===p,m),h+=1):c(d,!o.strings[d]||"",m):(c(d,p,m),h+=1);else if(/^-[^-]+/.test(m)){for(var w=m.slice(1,-1).split(""),y=!1,_=0;_<w.length;_++)if("-"!==(p=m.slice(_+2))){if(/[A-Za-z]/.test(w[_])&&"="===p[0]){c(w[_],p.slice(1),m),y=!0;break}if(/[A-Za-z]/.test(w[_])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){c(w[_],p,m),y=!0;break}if(w[_+1]&&w[_+1].match(/\W/)){c(w[_],m.slice(_+2),m),y=!0;break}c(w[_],!o.strings[w[_]]||"",m)}else c(w[_],p,m);d=m.slice(-1)[0],y||"-"===d||(!e[h+1]||/^(-|--)[^-]/.test(e[h+1])||o.bools[d]||i[d]&&a(d)?e[h+1]&&/^(true|false)$/.test(e[h+1])?(c(d,"true"===e[h+1],m),h+=1):c(d,!o.strings[d]||"",m):(c(d,e[h+1],m),h+=1))}else if(o.unknownFn&&!1===o.unknownFn(m)||u._.push(o.strings._||!t(m)?m:Number(m)),n.stopEarly){u._.push.apply(u._,e.slice(h+1));break}}return Object.keys(s).forEach((function(e){var t,r,n;t=u,r=e.split("."),n=t,r.slice(0,-1).forEach((function(e){n=n[e]||{}})),r[r.length-1]in n||(l(u,e.split("."),s[e]),(i[e]||[]).forEach((function(t){l(u,t.split("."),s[e])})))})),n["--"]?u["--"]=f.slice():f.forEach((function(e){u._.push(e)})),u}},942:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",o=0):o=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),i=s,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var o=arguments[r];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,a=i-o,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>l&&(47===e.charCodeAt(o+f)?c=f:0===f&&(c=0));break}var h=e.charCodeAt(o+f);if(h!==r.charCodeAt(s+f))break;47===h&&(c=f)}var d="";for(f=o+c+1;f<=i;++f)f!==i&&47!==e.charCodeAt(f)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,o=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===r.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=u))}return o===i?i=u:-1===i&&(i=e.length),e.slice(o,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var r=-1,n=0,o=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===o&&(i=!1,o=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=s+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,o=e.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=n;--c)if(47!==(o=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===o?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&i?e.slice(1,u):e.slice(s,u)):(0===s&&i?(r.name=e.slice(1,a),r.base=e.slice(1,u)):(r.name=e.slice(s,a),r.base=e.slice(s,u)),r.ext=e.slice(a,u)),s>0?r.dir=e.slice(0,s-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},359:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;a.push(i+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),a=n(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},62:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},225:(e,t,r)=>{"use strict";var n=r(62),o=r(359),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function f(e){return(e||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function p(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new v(unescape(e.pathname),{});else if("string"===i)for(t in o=new v(e,{}),d)delete o[t];else if("object"===i){for(t in e)t in d||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=f(e)).replace(a,""),t=t||{};var r,n=l.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],u=0;return i?s?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):s?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):m(o)?r=n[4]:o?i&&(r=r.slice(2)):u>=2&&m(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||m(o),slashesCount:u,rest:r}}function v(e,t,r){if(e=(e=f(e)).replace(a,""),!(this instanceof v))return new v(e,t,r);var i,s,u,l,d,w,y=h.slice(),_=typeof t,E=this,b=0;for("object"!==_&&"string"!==_&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(s=g(e||"",t=p(t))).protocol&&!s.slashes,E.slashes=s.slashes||i&&t.slashes,E.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||c.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(E.protocol)))&&(y[3]=[/(.*)/,"pathname"]);b<y.length;b++)"function"!=typeof(l=y[b])?(u=l[0],w=l[1],u!=u?E[w]=e:"string"==typeof u?~(d="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(E[w]=e.slice(0,d),e=e.slice(d+l[2])):(E[w]=e.slice(d),e=e.slice(0,d))):(d=u.exec(e))&&(E[w]=d[1],e=e.slice(0,d.index)),E[w]=E[w]||i&&l[3]&&t[w]||"",l[4]&&(E[w]=E[w].toLowerCase())):e=l(e,E);r&&(E.query=r(E.query)),i&&t.slashes&&"/"!==E.pathname.charAt(0)&&(""!==E.pathname||""!==t.pathname)&&(E.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(E.pathname,t.pathname)),"/"!==E.pathname.charAt(0)&&m(E.protocol)&&(E.pathname="/"+E.pathname),n(E.port,E.protocol)||(E.host=E.hostname,E.port=""),E.username=E.password="",E.auth&&(~(d=E.auth.indexOf(":"))?(E.username=E.auth.slice(0,d),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=E.auth.slice(d+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(E.auth)),E.auth=E.password?E.username+":"+E.password:E.username),E.origin="file:"!==E.protocol&&m(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString()}v.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,u.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<h.length;l++){var c=h[l];c[4]&&(i[c[1]]=i[c[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&m(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||u.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},v.extractProtocol=g,v.location=p,v.trimLeft=f,v.qs=o,e.exports=v}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{XeusComlinkKernel:()=>Ft});const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),r=Symbol("Comlink.releaseProxy"),n=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),i=e=>"object"==typeof e&&null!==e||"function"==typeof e,a={canHandle:t=>i(t)&&t[e],serialize(e){const{port1:t,port2:r}=new MessageChannel;return u(e,t),[r,[r]]},deserialize:e=>(e.start(),function(e){const t=new Map;return e.addEventListener("message",(function(e){const{data:r}=e;if(!r||!r.id)return;const n=t.get(r.id);if(n)try{n(r)}finally{t.delete(r.id)}})),p(e,t,[],void 0)}(e))},s=new Map([["proxy",a],["throw",{canHandle:e=>i(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function u(t,r=globalThis,i=["*"]){r.addEventListener("message",(function a(s){if(!s||!s.data)return;if(!function(e,t){for(const r of e){if(t===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}return!1}(i,s.origin))return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`);const{id:c,type:f,path:h}=Object.assign({path:[]},s.data),d=(s.data.argumentList||[]).map(w);let p;try{const r=h.slice(0,-1).reduce(((e,t)=>e[t]),t),n=h.reduce(((e,t)=>e[t]),t);switch(f){case"GET":p=n;break;case"SET":r[h.slice(-1)[0]]=w(s.data.value),p=!0;break;case"APPLY":p=n.apply(r,d);break;case"CONSTRUCT":p=function(t){return Object.assign(t,{[e]:!0})}(new n(...d));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;u(t,r),p=function(e,t){return g.set(e,t),e}(e,[e])}break;case"RELEASE":p=void 0;break;default:return}}catch(e){p={value:e,[o]:0}}Promise.resolve(p).catch((e=>({value:e,[o]:0}))).then((e=>{const[o,i]=v(e);r.postMessage(Object.assign(Object.assign({},o),{id:c}),i),"RELEASE"===f&&(r.removeEventListener("message",a),l(r),n in t&&"function"==typeof t[n]&&t[n]())})).catch((e=>{const[t,n]=v({value:new TypeError("Unserializable return value"),[o]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),n)}))})),r.start&&r.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function c(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return y(e,new Map,{type:"RELEASE"}).then((()=>{l(e)}))}const h=new WeakMap,d="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(h.get(e)||0)-1;h.set(e,t),0===t&&f(e)}));function p(e,n,o=[],i=function(){}){let a=!1;const s=new Proxy(i,{get(t,i){if(c(a),i===r)return()=>{!function(e){d&&d.unregister(e)}(s),f(e),n.clear(),a=!0};if("then"===i){if(0===o.length)return{then:()=>s};const t=y(e,n,{type:"GET",path:o.map((e=>e.toString()))}).then(w);return t.then.bind(t)}return p(e,n,[...o,i])},set(t,r,i){c(a);const[s,u]=v(i);return y(e,n,{type:"SET",path:[...o,r].map((e=>e.toString())),value:s},u).then(w)},apply(r,i,s){c(a);const u=o[o.length-1];if(u===t)return y(e,n,{type:"ENDPOINT"}).then(w);if("bind"===u)return p(e,n,o.slice(0,-1));const[l,f]=m(s);return y(e,n,{type:"APPLY",path:o.map((e=>e.toString())),argumentList:l},f).then(w)},construct(t,r){c(a);const[i,s]=m(r);return y(e,n,{type:"CONSTRUCT",path:o.map((e=>e.toString())),argumentList:i},s).then(w)}});return function(e,t){const r=(h.get(t)||0)+1;h.set(t,r),d&&d.register(e,t,e)}(s,e),s}function m(e){const t=e.map(v);return[t.map((e=>e[0])),(r=t.map((e=>e[1])),Array.prototype.concat.apply([],r))];var r}const g=new WeakMap;function v(e){for(const[t,r]of s)if(r.canHandle(e)){const[n,o]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},o]}return[{type:"RAW",value:e},g.get(e)||[]]}function w(e){switch(e.type){case"HANDLER":return s.get(e.name).deserialize(e.value);case"RAW":return e.value}}function y(e,t,r,n){return new Promise((o=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(i,o),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),n)}))}const _=new TextEncoder,E=new TextDecoder("utf-8"),b={0:!1,1:!0,2:!0,64:!0,65:!0,66:!0,129:!0,193:!0,514:!0,577:!0,578:!0,705:!0,706:!0,1024:!0,1025:!0,1026:!0,1089:!0,1090:!0,1153:!0,1154:!0,1217:!0,1218:!0,4096:!0,4098:!0};class k{constructor(e){this.fs=e}open(e){const t=this.fs.realPath(e.node);this.fs.FS.isFile(e.node.mode)&&(e.file=this.fs.API.get(t))}close(e){if(!this.fs.FS.isFile(e.node.mode)||!e.file)return;const t=this.fs.realPath(e.node),r=e.flags;let n="string"==typeof r?parseInt(r,10):r;n&=8191;let o=!0;n in b&&(o=b[n]),o&&this.fs.API.put(t,e.file),e.file=void 0}read(e,t,r,n,o){if(n<=0||void 0===e.file||o>=(e.file.data.length||0))return 0;const i=Math.min(e.file.data.length-o,n);return t.set(e.file.data.subarray(o,o+i),r),i}write(e,t,r,n,o){var i;if(n<=0||void 0===e.file)return 0;if(e.node.timestamp=Date.now(),o+n>((null===(i=e.file)||void 0===i?void 0:i.data.length)||0)){const t=e.file.data?e.file.data:new Uint8Array;e.file.data=new Uint8Array(o+n),e.file.data.set(t)}return e.file.data.set(t.subarray(r,r+n),o),n}llseek(e,t,r){let n=t;if(1===r)n+=e.position;else if(2===r&&this.fs.FS.isFile(e.node.mode)){if(void 0===e.file)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM);n+=e.file.data.length}if(n<0)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EINVAL);return n}}class P{constructor(e){this.fs=e}node(e){return function(e){return"node"in e}(e)?e.node:e}getattr(e){const t=this.node(e);return{...this.fs.API.getattr(this.fs.realPath(t)),mode:t.mode,ino:t.id}}setattr(e,t){const r=this.node(e);for(const[e,n]of Object.entries(t))switch(e){case"mode":r.mode=n;break;case"timestamp":r.timestamp=n;break;case"size":{const e=n,t=this.fs.realPath(r);if(this.fs.FS.isFile(r.mode)&&e>=0){const r=this.fs.API.get(t),n=r.data?r.data:new Uint8Array;e!==n.length&&(e<n.length?r.data=r.data.slice(0,e):(r.data=new Uint8Array(e),r.data.set(n)),this.fs.API.put(t,r))}else console.warn("setattr size of",e,"on",r,"not yet implemented");break}default:console.warn("setattr",e,"of",n,"on",r,"not yet implemented")}}lookup(e,t){const r=this.node(e),n=this.fs.PATH.join2(this.fs.realPath(r),t),o=this.fs.API.lookup(n);if(!o.ok)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.ENOENT);return this.fs.createNode(r,t,o.mode,0)}mknod(e,t,r,n){const o=this.node(e),i=this.fs.PATH.join2(this.fs.realPath(o),t);return this.fs.API.mknod(i,r),this.fs.createNode(o,t,r,n)}rename(e,t,r){const n=this.node(e),o=this.node(t);this.fs.API.rename(n.parent?this.fs.PATH.join2(this.fs.realPath(n.parent),n.name):n.name,this.fs.PATH.join2(this.fs.realPath(o),r)),n.name=r,n.parent=o}unlink(e,t){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(e)),t))}rmdir(e,t){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(e)),t))}readdir(e){return this.fs.API.readdir(this.fs.realPath(this.node(e)))}symlink(e,t,r){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}readlink(e){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}}class S{constructor(e,t,r,n){this._driveName=e,this._mountpoint=t,this.FS=r,this.ERRNO_CODES=n}lookup(e){return this.request({method:"lookup",path:this.normalizePath(e)})}getmode(e){return this.request({method:"getmode",path:this.normalizePath(e)})}mknod(e,t){return this.request({method:"mknod",path:this.normalizePath(e),data:{mode:t}})}rename(e,t){return this.request({method:"rename",path:this.normalizePath(e),data:{newPath:this.normalizePath(t)}})}readdir(e){const t=this.request({method:"readdir",path:this.normalizePath(e)});return t.push("."),t.push(".."),t}rmdir(e){return this.request({method:"rmdir",path:this.normalizePath(e)})}get(e){const t=this.request({method:"get",path:this.normalizePath(e)});if(!t)throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT);const r=t.content,n=t.format;switch(n){case"json":case"text":return{data:_.encode(r),format:n};case"base64":{const e=atob(r),t=e.length,o=new Uint8Array(t);for(let r=0;r<t;r++)o[r]=e.charCodeAt(r);return{data:o,format:n}}default:throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT)}}put(e,t){switch(t.format){case"json":case"text":return this.request({method:"put",path:this.normalizePath(e),data:{format:t.format,data:E.decode(t.data)}});case"base64":{let r="";for(let e=0;e<t.data.byteLength;e++)r+=String.fromCharCode(t.data[e]);return this.request({method:"put",path:this.normalizePath(e),data:{format:t.format,data:btoa(r)}})}}}getattr(e){const t=this.request({method:"getattr",path:this.normalizePath(e)});return t.atime&&(t.atime=new Date(t.atime)),t.mtime&&(t.mtime=new Date(t.mtime)),t.ctime&&(t.ctime=new Date(t.ctime)),t.size=t.size||0,t}normalizePath(e){return e.startsWith(this._mountpoint)&&(e=e.slice(this._mountpoint.length)),this._driveName&&(e=`${this._driveName}:${e}`),e}}class A extends S{constructor(e,t,r,n,o){super(t,r,n,o),this._baseUrl=e}request(e){const t=new XMLHttpRequest;t.open("POST",encodeURI(this.endpoint),!1);try{t.send(JSON.stringify(e))}catch(e){console.error(e)}if(t.status>=400)throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);return JSON.parse(t.responseText)}get endpoint(){return`${this._baseUrl}api/drive`}}class x{constructor(e){this.FS=e.FS,this.PATH=e.PATH,this.ERRNO_CODES=e.ERRNO_CODES,this.API=this.createAPI(e),this.driveName=e.driveName,this.node_ops=new P(this),this.stream_ops=new k(this)}createAPI(e){return new A(e.baseUrl,e.driveName,e.mountpoint,e.FS,e.ERRNO_CODES)}mount(e){return this.createNode(null,e.mountpoint,16895,0)}createNode(e,t,r,n){const o=this.FS;if(!o.isDir(r)&&!o.isFile(r))throw new o.ErrnoError(this.ERRNO_CODES.EINVAL);const i=o.createNode(e,t,r,n);return i.node_ops=this.node_ops,i.stream_ops=this.stream_ops,i}getMode(e){return this.API.getmode(e)}realPath(e){const t=[];let r=e;for(t.push(r.name);r.parent!==r;)r=r.parent,t.push(r.name);return t.reverse(),this.PATH.join.apply(null,t)}}var R,T,M,O,D,C,U,F,j,L,N,I,B,z,$,q,H,Y,W,V,K,Z,J,X=__webpack_require__(925),G=Object.create,Q=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,re=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,oe=(e,t)=>function(){return e&&(t=(0,e[te(e)[0]])(e=0)),t};function ie(){throw new Error("setTimeout has not been defined")}function ae(){throw new Error("clearTimeout has not been defined")}function se(e){if(R===setTimeout)return setTimeout(e,0);if((R===ie||!R)&&setTimeout)return R=setTimeout,setTimeout(e,0);try{return R(e,0)}catch(t){try{return R.call(null,e,0)}catch(t){return R.call(this,e,0)}}}function ue(){O&&D&&(O=!1,D.length?M=D.concat(M):C=-1,M.length&&le())}function le(){if(!O){var e=se(ue);O=!0;for(var t=M.length;t;){for(D=M,M=[];++C<t;)D&&D[C].run();C=-1,t=M.length}D=null,O=!1,function(e){if(T===clearTimeout)return clearTimeout(e);if((T===ae||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(e);try{return T(e)}catch(t){try{return T.call(null,e)}catch(t){return T.call(this,e)}}}(e)}}function ce(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];M.push(new fe(e,t)),1!==M.length||O||se(le)}function fe(e,t){this.fun=e,this.array=t}function he(){}function de(e){throw new Error("process.binding is not supported")}function pe(){return"/"}function me(e){throw new Error("process.chdir is not supported")}function ge(){return 0}function ve(e){var t=.001*V.call(W),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}function we(){return(new Date-K)/1e3}var ye,_e,Ee,be,ke,Pe,Se=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/process.js"(){R=ie,T=ae,"function"==typeof globalThis.setTimeout&&(R=setTimeout),"function"==typeof globalThis.clearTimeout&&(T=clearTimeout),M=[],O=!1,C=-1,fe.prototype.run=function(){this.fun.apply(null,this.array)},U={},F=[],j={},L={},N={},I=he,B=he,z=he,$=he,q=he,H=he,Y=he,W=globalThis.performance||{},V=W.now||W.mozNow||W.msNow||W.oNow||W.webkitNow||function(){return(new Date).getTime()},K=new Date,Z={nextTick:ce,title:"browser",browser:!0,env:U,argv:F,version:"",versions:j,on:I,addListener:B,once:z,off:$,removeListener:q,removeAllListeners:H,emit:Y,binding:de,cwd:pe,chdir:me,umask:ge,hrtime:ve,platform:"browser",release:L,config:N,uptime:we},J={},Object.keys(J).forEach((e=>{const t=e.split(".");let r=Z;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=J[e]:r=r[o]||(r[o]={})}}))}});function Ae(){be=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)ye[t]=e[t],_e[e.charCodeAt(t)]=t;_e["-".charCodeAt(0)]=62,_e["_".charCodeAt(0)]=63}function xe(e,t,r){for(var n,o,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(ye[(o=n)>>18&63]+ye[o>>12&63]+ye[o>>6&63]+ye[63&o]);return i.join("")}function Re(e){var t;be||Ae();for(var r=e.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(xe(e,s,s+a>u?u:s+a));return 1===n?(t=e[r-1],o+=ye[t>>2],o+=ye[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=ye[t>>10],o+=ye[t>>4&63],o+=ye[t<<2&63],o+="="),i.push(o),i.join("")}function Te(){return Oe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Me(e,t){if(Te()<t)throw new RangeError("Invalid typed array length");return Oe.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Oe.prototype:(null===e&&(e=new Oe(t)),e.length=t),e}function Oe(e,t,r){if(!(Oe.TYPED_ARRAY_SUPPORT||this instanceof Oe))return new Oe(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Ue(this,e)}return De(this,e,t,r)}function De(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),Oe.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Oe.prototype:e=Fe(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!Oe.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ne(t,r),o=(e=Me(e,n)).write(t,r);return o!==n&&(e=e.slice(0,o)),e}(e,t,r):function(e,t){if(Le(t)){var r=0|je(t.length);return 0===(e=Me(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Me(e,0):Fe(e,t);if("Buffer"===t.type&&Array.isArray(t.data))return Fe(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Ce(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Ue(e,t){if(Ce(t),e=Me(e,t<0?0:0|je(t)),!Oe.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Fe(e,t){var r=t.length<0?0:0|je(t.length);e=Me(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function je(e){if(e>=Te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Te().toString(16)+" bytes");return 0|e}function Le(e){return!(null==e||!e._isBuffer)}function Ne(e,t){if(Le(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ut(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lt(e).length;default:if(n)return ut(e).length;t=(""+t).toLowerCase(),n=!0}}function Ie(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qe(this,t,r);case"utf8":case"utf-8":return Je(this,t,r);case"ascii":return Xe(this,t,r);case"latin1":case"binary":return Ge(this,t,r);case"base64":return Ze(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Be(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ze(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Oe.from(t,n)),Le(t))return 0===t.length?-1:$e(e,t,r,n,o);if("number"==typeof t)return t&=255,Oe.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):$e(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function $e(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=r;i<s;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(l(e,i+h)!==l(t,h)){f=!1;break}if(f)return i}return-1}function qe(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function He(e,t,r,n){return ct(ut(t,e.length-r),e,r,n)}function Ye(e,t,r,n){return ct(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function We(e,t,r,n){return Ye(e,t,r,n)}function Ve(e,t,r,n){return ct(lt(t),e,r,n)}function Ke(e,t,r,n){return ct(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function Ze(e,t,r){return 0===t&&r===e.length?Re(e):Re(e.slice(t,r))}function Je(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&l)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(e){var t=e.length;if(t<=ke)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ke));return r}(n)}function Xe(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function Ge(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function Qe(e,t,r){var n,o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);for(var i="",a=t;a<r;++a)i+=(n=e[a])<16?"0"+n.toString(16):n.toString(16);return i}function et(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function tt(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function rt(e,t,r,n,o,i){if(!Le(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function nt(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function ot(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function it(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function at(e,t,r,n,o){return o||it(e,0,r,4),pt(e,t,r,n,23,4),r+4}function st(e,t,r,n,o){return o||it(e,0,r,8),pt(e,t,r,n,52,8),r+8}function ut(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function lt(e){return function(e){var t,r,n,o,i,a;be||Ae();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Ee(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)o=_e[e.charCodeAt(t)]<<18|_e[e.charCodeAt(t+1)]<<12|_e[e.charCodeAt(t+2)]<<6|_e[e.charCodeAt(t+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=_e[e.charCodeAt(t)]<<2|_e[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=_e[e.charCodeAt(t)]<<10|_e[e.charCodeAt(t+1)]<<4|_e[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Pe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ct(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function ft(e){return null!=e&&(!!e._isBuffer||ht(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ht(e.slice(0,0))}(e))}function ht(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function dt(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?o-1:0,h=r?-1:1,d=e[t+f];for(f+=h,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=l}return(d?-1:1)*a*Math.pow(2,i-n)}function pt(e,t,r,n,o,i){var a,s,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*m}var mt,gt,vt=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/Buffer.js"(){Se(),wt(),ye=[],_e=[],Ee="undefined"!=typeof Uint8Array?Uint8Array:Array,be=!1,Oe.TYPED_ARRAY_SUPPORT=void 0===globalThis.TYPED_ARRAY_SUPPORT||globalThis.TYPED_ARRAY_SUPPORT,Oe.poolSize=8192,Oe._augment=function(e){return e.__proto__=Oe.prototype,e},Oe.from=function(e,t,r){return De(null,e,t,r)},Oe.kMaxLength=Te(),Oe.TYPED_ARRAY_SUPPORT&&(Oe.prototype.__proto__=Uint8Array.prototype,Oe.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Oe[Symbol.species]),Oe.alloc=function(e,t,r){return function(e,t,r,n){return Ce(t),t<=0?Me(e,t):void 0!==r?"string"==typeof n?Me(e,t).fill(r,n):Me(e,t).fill(r):Me(e,t)}(null,e,t,r)},Oe.allocUnsafe=function(e){return Ue(null,e)},Oe.allocUnsafeSlow=function(e){return Ue(null,e)},Oe.isBuffer=ft,Oe.compare=function(e,t){if(!Le(e)||!Le(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},Oe.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Oe.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Oe.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Oe.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(!Le(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},Oe.byteLength=Ne,Oe.prototype._isBuffer=!0,Oe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Be(this,t,t+1);return this},Oe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Be(this,t,t+3),Be(this,t+1,t+2);return this},Oe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Be(this,t,t+7),Be(this,t+1,t+6),Be(this,t+2,t+5),Be(this,t+3,t+4);return this},Oe.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Je(this,0,e):Ie.apply(this,arguments)},Oe.prototype.equals=function(e){if(!Le(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Oe.compare(this,e)},Oe.prototype.compare=function(e,t,r,n,o){if(!Le(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r),c=0;c<s;++c)if(u[c]!==l[c]){i=u[c],a=l[c];break}return i<a?-1:a<i?1:0},Oe.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Oe.prototype.indexOf=function(e,t,r){return ze(this,e,t,r,!0)},Oe.prototype.lastIndexOf=function(e,t,r){return ze(this,e,t,r,!1)},Oe.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return qe(this,e,t,r);case"utf8":case"utf-8":return He(this,e,t,r);case"ascii":return Ye(this,e,t,r);case"latin1":case"binary":return We(this,e,t,r);case"base64":return Ve(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ke(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Oe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},ke=4096,Oe.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Oe.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Oe.prototype;else{var o=t-e;r=new Oe(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},Oe.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},Oe.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},Oe.prototype.readUInt8=function(e,t){return t||tt(e,1,this.length),this[e]},Oe.prototype.readUInt16LE=function(e,t){return t||tt(e,2,this.length),this[e]|this[e+1]<<8},Oe.prototype.readUInt16BE=function(e,t){return t||tt(e,2,this.length),this[e]<<8|this[e+1]},Oe.prototype.readUInt32LE=function(e,t){return t||tt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Oe.prototype.readUInt32BE=function(e,t){return t||tt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Oe.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},Oe.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||tt(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Oe.prototype.readInt8=function(e,t){return t||tt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Oe.prototype.readInt16LE=function(e,t){t||tt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Oe.prototype.readInt16BE=function(e,t){t||tt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Oe.prototype.readInt32LE=function(e,t){return t||tt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Oe.prototype.readInt32BE=function(e,t){return t||tt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Oe.prototype.readFloatLE=function(e,t){return t||tt(e,4,this.length),dt(this,e,!0,23,4)},Oe.prototype.readFloatBE=function(e,t){return t||tt(e,4,this.length),dt(this,e,!1,23,4)},Oe.prototype.readDoubleLE=function(e,t){return t||tt(e,8,this.length),dt(this,e,!0,52,8)},Oe.prototype.readDoubleBE=function(e,t){return t||tt(e,8,this.length),dt(this,e,!1,52,8)},Oe.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||rt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},Oe.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||rt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},Oe.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,1,255,0),Oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Oe.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,65535,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):nt(this,e,t,!0),t+2},Oe.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,65535,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):nt(this,e,t,!1),t+2},Oe.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,4294967295,0),Oe.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ot(this,e,t,!0),t+4},Oe.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,4294967295,0),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ot(this,e,t,!1),t+4},Oe.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);rt(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},Oe.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);rt(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},Oe.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,1,127,-128),Oe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Oe.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,32767,-32768),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):nt(this,e,t,!0),t+2},Oe.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,2,32767,-32768),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):nt(this,e,t,!1),t+2},Oe.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,2147483647,-2147483648),Oe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ot(this,e,t,!0),t+4},Oe.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||rt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Oe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ot(this,e,t,!1),t+4},Oe.prototype.writeFloatLE=function(e,t,r){return at(this,e,t,!0,r)},Oe.prototype.writeFloatBE=function(e,t,r){return at(this,e,t,!1,r)},Oe.prototype.writeDoubleLE=function(e,t,r){return st(this,e,t,!0,r)},Oe.prototype.writeDoubleBE=function(e,t,r){return st(this,e,t,!1,r)},Oe.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!Oe.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Oe.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Oe.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=Le(e)?e:ut(new Oe(e,n).toString()),s=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this},Pe=/[^+\/0-9A-Za-z-_]/g}}),wt=oe({"node_modules/@esbuild-plugins/node-globals-polyfill/_buffer.js"(){vt()}}),yt=(mt={"node_modules/@emscripten-forge/untarjs/lib/unpack.js"(e,t){Se(),wt();var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,n,o=e;o.ready=new Promise(((e,r)=>{t=e,n=r}));var i,a,s=Object.assign({},o),u="./this.program",l=(e,t)=>{throw t},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),r&&(c=r),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a=(e,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.onerror=r,n.send(null)};var f,h=o.print||console.log.bind(console),d=o.printErr||console.error.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(f=o.wasmBinary);var p,m=o.noExitRuntime||!1;function g(e){return L?ot(e):S[e]}function v(e){return L?it(e):A[e]}function w(e){return L?at(e)>>>0:x[e]}function y(e,t){return L?lt(e,t):k[e]=t}function _(e,t){return L?ct(e,t):S[e]=t}function E(e,t){return L?ft(e,t):A[e]=t}function b(e,t){return L?ht(e,t)>>>0:x[e]=t}"object"!=typeof WebAssembly&&Z("no native wasm support detected");var k,P,S,A,x,R,T,M=!1;function O(e,t){e||Z(t)}function D(){var e=p.buffer;o.HEAP8=k=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=P=new Uint8Array(e),o.HEAPU16=new Uint16Array(e),o.HEAP32=A=new Int32Array(e),o.HEAPU32=x=new Uint32Array(e),o.HEAPF32=R=new Float32Array(e),o.HEAPF64=T=new Float64Array(e)}var C=[],U=[],F=[],j=[],L=!1;function N(){return m||!1}var I,B,z,$,q,H=0,Y=null,W=null;function V(e){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function K(e){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&(null!==Y&&(clearInterval(Y),Y=null),W)){var t=W;W=null,t()}}function Z(e){o.onAbort&&o.onAbort(e),d(e="Aborted("+e+")"),M=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function J(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e){if(e==I&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function G(e,t){var r=8,n=0;this.offset_map={},this.func_starts=[],this.name_map={},this.import_functions=0;var o=e;function i(){var e=0,t=0;do{var n=o[r++];e+=(127&n)<<t,t+=7}while(128&n);return e}function a(){var e=i();i(),1&e&&i()}e:for(;r<o.length;){var s=o[r++],u=i()+r;switch(s){case 2:for(var l=i();l-- >0;)switch(r=i()+r,r=i()+r,o[r++]){case 0:++n,i();break;case 1:i(),a();break;case 2:a();break;case 3:r+=2;break;case 4:++r,i()}this.import_functions=n;break;case 10:for(l=i();l-- >0;){var c=i();this.offset_map[n++]=r,this.func_starts.push(r),r+=c}break e}r=u}var f=WebAssembly.Module.customSections(t,"name"),h=f.length?f[0]:void 0;if(h)for(o=new Uint8Array(h),r=0;r<o.length;){var d=o[r++],p=i();if(1==d)for(l=i();l-- >0;){var m=i(),g=i();this.name_map[m]=re(o,r,g),r+=g}else r+=p}}function Q(e,t,r){var n;return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>X(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>X(e)))}(e).then((e=>(n=e,WebAssembly.instantiate(e,t)))).then((e=>(z=new G(n,e.module),e))).then(r,(e=>{d(`failed to asynchronously prepare wasm: ${e}`),Z(e)}))}function ee(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}J(I="unpack.wasm")||(B=I,I=o.locateFile?o.locateFile(B,c):c+B),G.prototype.convert=function(e,t){return this.offset_map[e]+t},G.prototype.getIndex=function(e){for(var t,r=0,n=this.func_starts.length;r<n;)t=Math.floor((r+n)/2),this.func_starts[t]>e?n=t:r=t+1;return r+this.import_functions-1},G.prototype.isSameFunc=function(e,t){return this.getIndex(e)==this.getIndex(t)},G.prototype.getName=function(e){var t=this.getIndex(e);return this.name_map[t]||"wasm-function["+t+"]"};var te="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,re=(e,t,r)=>{for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&te)return te.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i},ne=e=>{for(;e.length>0;)e.shift()(o)},oe=(e,t)=>e?re(P,e,t):"",ie={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ie.isAbs(e),r="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ie.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ie.normalize(e.join("/"))},join2:(e,t)=>ie.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);Z("initRandomDevice")})())(e),se={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:we.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ie.isAbs(n)}return(t?"/":"")+(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=se.resolve(e).substr(1),t=se.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},ue=[],le=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ce=(e,t,r,n)=>{if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o};function fe(e,t,r){var n=r>0?r:le(e)+1,o=new Array(n),i=ce(e,o,0,o.length);return t&&(o.length=i),o}var he,de={ttys:[],init(){},shutdown(){},register(e,t){de.ttys[e]={input:[],output:[],ops:t},we.registerDevice(e,de.stream_ops)},stream_ops:{open(e){var t=de.ttys[e.node.rdev];if(!t)throw new we.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new we.ErrnoError(29)}if(void 0===s&&0===i)throw new we.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new we.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new we.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:e=>(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=fe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(h(re(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(h(re(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[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]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(d(re(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(d(re(e.output,0)),e.output=[])}}},pe=e=>{e=(e=>65536*Math.ceil(e/65536))(e);var t=Ge(65536,e);return t?((e,t)=>(P.fill(0,e,e+t),e))(t,e):0},me={ops_table:null,mount:e=>me.createNode(null,"/",16895,0),createNode(e,t,r,n){if(we.isBlkdev(r)||we.isFIFO(r))throw new we.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:we.chrdev_stream_ops}});var o=we.createNode(e,t,r,n);return we.isDir(o.mode)?(o.node_ops=me.ops_table.dir.node,o.stream_ops=me.ops_table.dir.stream,o.contents={}):we.isFile(o.mode)?(o.node_ops=me.ops_table.file.node,o.stream_ops=me.ops_table.file.stream,o.usedBytes=0,o.contents=null):we.isLink(o.mode)?(o.node_ops=me.ops_table.link.node,o.stream_ops=me.ops_table.link.stream):we.isChrdev(o.mode)&&(o.node_ops=me.ops_table.chrdev.node,o.stream_ops=me.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=we.isChrdev(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,we.isDir(e.mode)?t.size=4096:we.isFile(e.mode)?t.size=e.usedBytes:we.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup(e,t){throw we.genericErrors[44]},mknod:(e,t,r,n)=>me.createNode(e,t,r,n),rename(e,t,r){if(we.isDir(e.mode)){var n;try{n=we.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=we.lookupNode(e,t);for(var n in r.contents)throw new we.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=me.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write(e,t,r,n,o,i){if(t.buffer===k.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(me.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&we.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new we.ErrnoError(28);return n},allocate(e,t,r){me.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,n,o){if(!we.isFile(e.node.mode))throw new we.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==k.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(i=pe(t)))throw new we.ErrnoError(48);k.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:(e,t,r,n,o)=>(me.stream_ops.write(e,t,0,n,r,!1),0)}},ge=o.preloadPlugins||[],ve=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=se.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new we.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=we.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=we.lookupNode(n,r[i]),o=ie.join2(o,r[i]),we.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;we.isLink(n.mode);){var u=we.readlink(o);if(o=se.resolve(ie.dirname(o),u),n=we.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new we.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var t;;){if(we.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%we.nameTable.length},hashAddNode(e){var t=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[t],we.nameTable[t]=e},hashRemoveNode(e){var t=we.hashName(e.parent.id,e.name);if(we.nameTable[t]===e)we.nameTable[t]=e.name_next;else for(var r=we.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=we.mayLookup(e);if(r)throw new we.ErrnoError(r,e);for(var n=we.hashName(e.id,t),o=we.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return we.lookup(e,t)},createNode(e,t,r,n){var o=new we.FSNode(e,t,r,n);return we.hashAddNode(o),o},destroyNode(e){we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>we.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>we.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return we.lookupNode(e,t),20}catch(e){}return we.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=we.lookupNode(e,t)}catch(e){return e.errno}var o=we.nodePermissions(e,"wx");if(o)return o;if(r){if(!we.isDir(n.mode))return 54;if(we.isRoot(n)||we.getPath(n)===we.cwd())return 10}else if(we.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(t)||512&t)?31:we.nodePermissions(e,we.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=we.MAX_OPEN_FDS;e++)if(!we.streams[e])return e;throw new we.ErrnoError(33)},getStreamChecked(e){var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);return t},getStream:e=>we.streams[e],createStream:(e,t=-1)=>(we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e),-1==t&&(t=we.nextfd()),e.fd=t,we.streams[t]=e,e),closeStream(e){we.streams[e]=null},chrdev_stream_ops:{open(e){var t=we.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){we.devices[e]={stream_ops:t}},getDevice:e=>we.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&d(`warning: ${we.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=we.getMounts(we.root.mount),n=0;function o(e){return we.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,r){var n,o="/"===r,i=!r;if(o&&we.root)throw new we.ErrnoError(10);if(!o&&!i){var a=we.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,we.isMountpoint(n))throw new we.ErrnoError(10);if(!we.isDir(n.mode))throw new we.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?we.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(t.node))throw new we.ErrnoError(28);var r=t.node,n=r.mounted,o=we.getMounts(n);Object.keys(we.nameTable).forEach((e=>{for(var t=we.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&we.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=we.lookupPath(e,{parent:!0}).node,o=ie.basename(e);if(!o||"."===o||".."===o)throw new we.ErrnoError(28);var i=we.mayCreate(n,o);if(i)throw new we.ErrnoError(i);if(!n.node_ops.mknod)throw new we.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,we.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,we.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{we.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,we.mknod(e,t,r)),symlink(e,t){if(!se.resolve(e))throw new we.ErrnoError(44);var r=we.lookupPath(t,{parent:!0}).node;if(!r)throw new we.ErrnoError(44);var n=ie.basename(t),o=we.mayCreate(r,n);if(o)throw new we.ErrnoError(o);if(!r.node_ops.symlink)throw new we.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,o=ie.dirname(e),i=ie.dirname(t),a=ie.basename(e),s=ie.basename(t);if(r=we.lookupPath(e,{parent:!0}).node,n=we.lookupPath(t,{parent:!0}).node,!r||!n)throw new we.ErrnoError(44);if(r.mount!==n.mount)throw new we.ErrnoError(75);var u,l=we.lookupNode(r,a),c=se.relative(e,i);if("."!==c.charAt(0))throw new we.ErrnoError(28);if("."!==(c=se.relative(t,o)).charAt(0))throw new we.ErrnoError(55);try{u=we.lookupNode(n,s)}catch(e){}if(l!==u){var f=we.isDir(l.mode),h=we.mayDelete(r,a,f);if(h)throw new we.ErrnoError(h);if(h=u?we.mayDelete(n,s,f):we.mayCreate(n,s))throw new we.ErrnoError(h);if(!r.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(l)||u&&we.isMountpoint(u))throw new we.ErrnoError(10);if(n!==r&&(h=we.nodePermissions(r,"w")))throw new we.ErrnoError(h);we.hashRemoveNode(l);try{r.node_ops.rename(l,n,s)}catch(e){throw e}finally{we.hashAddNode(l)}}},rmdir(e){var t=we.lookupPath(e,{parent:!0}).node,r=ie.basename(e),n=we.lookupNode(t,r),o=we.mayDelete(t,r,!0);if(o)throw new we.ErrnoError(o);if(!t.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);t.node_ops.rmdir(t,r),we.destroyNode(n)},readdir(e){var t=we.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new we.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=we.lookupPath(e,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var r=ie.basename(e),n=we.lookupNode(t,r),o=we.mayDelete(t,r,!1);if(o)throw new we.ErrnoError(o);if(!t.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(n))throw new we.ErrnoError(10);t.node_ops.unlink(t,r),we.destroyNode(n)},readlink(e){var t=we.lookupPath(e).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.readlink)throw new we.ErrnoError(28);return se.resolve(we.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=we.lookupPath(e,{follow:!t}).node;if(!r)throw new we.ErrnoError(44);if(!r.node_ops.getattr)throw new we.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>we.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new we.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){we.chmod(e,t,!0)},fchmod(e,t){var r=we.getStreamChecked(e);we.chmod(r.node,t)},chown(e,t,r,n){var o;if(!(o="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,r){we.chown(e,t,r,!0)},fchown(e,t,r){var n=we.getStreamChecked(e);we.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new we.ErrnoError(28);var r;if(!(r="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(r.mode))throw new we.ErrnoError(31);if(!we.isFile(r.mode))throw new we.ErrnoError(28);var n=we.nodePermissions(r,"w");if(n)throw new we.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=we.getStreamChecked(e);if(!(2097155&r.flags))throw new we.ErrnoError(28);we.truncate(r.node,t)},utime(e,t,r){var n=we.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new we.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ie.normalize(e);try{n=we.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new we.ErrnoError(20)}else n=we.mknod(e,r,0),i=!0;if(!n)throw new we.ErrnoError(44);if(we.isChrdev(n.mode)&&(t&=-513),65536&t&&!we.isDir(n.mode))throw new we.ErrnoError(54);if(!i){var a=we.mayOpen(n,t);if(a)throw new we.ErrnoError(a)}512&t&&!i&&we.truncate(n,0),t&=-131713;var s=we.createStream({node:n,path:we.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),s},close(e){if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,o){if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write(e,t,r,n,o,i){if(n<0||o<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new we.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate(e,t,r){if(we.isClosed(e))throw new we.ErrnoError(8);if(t<0||r<=0)throw new we.ErrnoError(28);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=we.open(e,t.flags),o=we.stat(e).size,i=new Uint8Array(o);return we.read(n,i,0,o,0),"utf8"===t.encoding?r=re(i,0):"binary"===t.encoding&&(r=i),we.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=we.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(le(t)+1),i=ce(t,o,0,o.length);we.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");we.write(n,t,0,t.byteLength,void 0,r.canOwn)}we.close(n)},cwd:()=>we.currentPath,chdir(e){var t=we.lookupPath(e,{follow:!0});if(null===t.node)throw new we.ErrnoError(44);if(!we.isDir(t.node.mode))throw new we.ErrnoError(54);var r=we.nodePermissions(t.node,"x");if(r)throw new we.ErrnoError(r);we.currentPath=t.path},createDefaultDirectories(){we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices(){we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),we.mkdev("/dev/null",we.makedev(1,3)),de.register(we.makedev(5,0),de.default_tty_ops),de.register(we.makedev(6,0),de.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ae(e).byteLength),e[--t]);we.createDevice("/dev","random",r),we.createDevice("/dev","urandom",r),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories(){we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount(){var t=we.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=we.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?we.createDevice("/dev","stdin",o.stdin):we.symlink("/dev/tty","/dev/stdin"),o.stdout?we.createDevice("/dev","stdout",null,o.stdout):we.symlink("/dev/tty","/dev/stdout"),o.stderr?we.createDevice("/dev","stderr",null,o.stderr):we.symlink("/dev/tty1","/dev/stderr"),we.open("/dev/stdin",0),we.open("/dev/stdout",1),we.open("/dev/stderr",1)},ensureErrnoError(){we.ErrnoError||(we.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(me,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:me}},init(e,t,r){we.init.initialized=!0,we.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,we.createStandardStreams()},quit(){we.init.initialized=!1;for(var e=0;e<we.streams.length;e++){var t=we.streams[e];t&&we.close(t)}},findObject(e,t){var r=we.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=we.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=we.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ie.basename(e),n=we.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:we.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ie.join2(e,i);try{we.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,o){var i=ie.join2("string"==typeof e?e:we.getPath(e),t),a=ve(n,o);return we.create(i,a)},createDataFile(e,t,r,n,o,i){var a=t;e&&(e="string"==typeof e?e:we.getPath(e),a=t?ie.join2(e,t):e);var s=ve(n,o),u=we.create(a,s);if(r){if("string"==typeof r){for(var l=new Array(r.length),c=0,f=r.length;c<f;++c)l[c]=r.charCodeAt(c);r=l}we.chmod(u,146|s);var h=we.open(u,577);we.write(h,r,0,r.length,0,i),we.close(h),we.chmod(u,s)}return u},createDevice(e,t,r,n){var o=ie.join2("string"==typeof e?e:we.getPath(e),t),i=ve(!!r,!!n);we.createDevice.major||(we.createDevice.major=64);var a=we.makedev(we.createDevice.major++,0);return we.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new we.ErrnoError(29)}if(void 0===u&&0===a)throw new we.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new we.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),we.mkdev(o,i,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new 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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=fe(i(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new we.ErrnoError(29)}},createLazyFile(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),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 new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):fe(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:r},s=we.createFile(e,t,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a}return Object.keys(s.stream_ops).forEach((e=>{var t=s.stream_ops[e];u[e]=function(){return we.forceLoadFile(s),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>(we.forceLoadFile(s),l(e,t,r,n,o)),u.mmap=(e,t,r,n,o)=>{we.forceLoadFile(s);var i=pe(t);if(!i)throw new we.ErrnoError(48);return l(e,k,i,t,r),{ptr:i,allocated:!0}},s.stream_ops=u,s}},ye={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ie.isAbs(t))return t;var n;if(n=-100===e?we.cwd():ye.getStreamFromFD(e).path,0==t.length){if(!r)throw new we.ErrnoError(44);return n}return ie.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ie.normalize(t)!==ie.normalize(we.getPath(e.node)))return-54;throw e}E(r>>2,n.dev),E(r+4>>2,n.mode),b(r+8>>2,n.nlink),E(r+12>>2,n.uid),E(r+16>>2,n.gid),E(r+20>>2,n.rdev),E(r+24>>2,(q=[n.size>>>0,($=n.size,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+28>>2,q[1]),E(r+32>>2,4096),E(r+36>>2,n.blocks);var o=n.atime.getTime(),i=n.mtime.getTime(),a=n.ctime.getTime();return E(r+40>>2,(q=[Math.floor(o/1e3)>>>0,($=Math.floor(o/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+44>>2,q[1]),b(r+48>>2,o%1e3*1e3),E(r+56>>2,(q=[Math.floor(i/1e3)>>>0,($=Math.floor(i/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+60>>2,q[1]),b(r+64>>2,i%1e3*1e3),E(r+72>>2,(q=[Math.floor(a/1e3)>>>0,($=Math.floor(a/1e3),+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+76>>2,q[1]),b(r+80>>2,a%1e3*1e3),E(r+88>>2,(q=[n.ino>>>0,($=n.ino,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(r+92>>2,q[1]),0},doMsync(e,t,r,n,o){if(!we.isFile(t.node.mode))throw new we.ErrnoError(43);if(2&n)return 0;var i=P.slice(e,e+r);we.msync(t,i,o,r,n)},varargs:void 0,get(){var e=v(ye.varargs>>2);return ye.varargs+=4,e},getp:()=>ye.get(),getStr:e=>oe(e),getStreamFromFD:e=>we.getStreamChecked(e)},_e={BUCKET_BUFFER_SIZE:8192,mount:e=>we.createNode(null,"/",16895,0),createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=_e.nextname(),r=_e.nextname(),n=we.createNode(_e.root,t,4096,0),o=we.createNode(_e.root,r,4096,0);n.pipe=e,o.pipe=e;var i=we.createStream({path:t,node:n,flags:0,seekable:!1,stream_ops:_e.stream_ops});n.stream=i;var a=we.createStream({path:r,node:o,flags:1,seekable:!1,stream_ops:_e.stream_ops});return o.stream=a,{readable_fd:i.fd,writable_fd:a.fd}},stream_ops:{poll(e){var t=e.node.pipe;if(1==(2097155&e.flags))return 260;if(t.buckets.length>0)for(var r=0;r<t.buckets.length;r++){var n=t.buckets[r];if(n.offset-n.roffset>0)return 65}return 0},ioctl:(e,t,r)=>28,fsync:e=>28,read(e,t,r,n,o){for(var i=e.node.pipe,a=0,s=0;s<i.buckets.length;s++){var u=i.buckets[s];a+=u.offset-u.roffset}var l=t.subarray(r,r+n);if(n<=0)return 0;if(0==a)throw new we.ErrnoError(6);var c=Math.min(a,n),f=c,h=0;for(s=0;s<i.buckets.length;s++){var d=i.buckets[s],p=d.offset-d.roffset;if(c<=p){var m=d.buffer.subarray(d.roffset,d.offset);c<p?(m=m.subarray(0,c),d.roffset+=c):h++,l.set(m);break}m=d.buffer.subarray(d.roffset,d.offset),l.set(m),l=l.subarray(m.byteLength),c-=m.byteLength,h++}return h&&h==i.buckets.length&&(h--,i.buckets[h].offset=0,i.buckets[h].roffset=0),i.buckets.splice(0,h),f},write(e,t,r,n,o){var i=e.node.pipe,a=t.subarray(r,r+n),s=a.byteLength;if(s<=0)return 0;var u=null;0==i.buckets.length?(u={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(u)):u=i.buckets[i.buckets.length-1],O(u.offset<=_e.BUCKET_BUFFER_SIZE);var l=_e.BUCKET_BUFFER_SIZE-u.offset;if(l>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;l>0&&(u.buffer.set(a.subarray(0,l),u.offset),u.offset+=l,a=a.subarray(l,a.byteLength));for(var c=a.byteLength/_e.BUCKET_BUFFER_SIZE|0,f=a.byteLength%_e.BUCKET_BUFFER_SIZE,h=0;h<c;h++){var d={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:_e.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(d),d.buffer.set(a.subarray(0,_e.BUCKET_BUFFER_SIZE)),a=a.subarray(_e.BUCKET_BUFFER_SIZE,a.byteLength)}return f>0&&(d={buffer:new Uint8Array(_e.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0},i.buckets.push(d),d.buffer.set(a)),s},close(e){var t=e.node.pipe;t.refcnt--,0===t.refcnt&&(t.buckets=null)}},nextname:()=>(_e.nextname.current||(_e.nextname.current=0),"pipe["+_e.nextname.current+++"]")},Ee=e=>{var t=void 0!==Ye?Ye:void 0,r=void 0!==Je?Je:void 0,n=void 0!==We?We:void 0;Ye=Ze,Je=Ge,We=Xe;try{return e()}finally{Ye=t,Je=r,We=n}},be=(e,t,r)=>ce(e,P,t,r),ke=e=>{var t=le(e)+1,r=Ye(t);return r&&be(e,r,t),r},Pe=[0,31,60,91,121,152,182,213,244,274,305,335],Se=[0,31,59,90,120,151,181,212,243,273,304,334],Ae=e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?Se:Pe)[e.getMonth()]+e.getDate()-1},xe=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN;he=()=>performance.now();var Re={},Te=e=>{var t;return(t=/\bwasm-function\[\d+\]:(0x[0-9a-f]+)/.exec(e))?+t[1]:(t=/\bwasm-function\[(\d+)\]:(\d+)/.exec(e))?z.convert(+t[1],+t[2]):(t=/:(\d+):\d+(?:\)|$)/.exec(e))?2147483648|+t[1]:0},Me=e=>{if(Re.last_get_source_pc==e)return Re.last_source;var t,r;if(!r){var n=Re[e];if(!n)return null;((t=/\((.*):(\d+):(\d+)\)$/.exec(n))||(t=/@(.*):(\d+):(\d+)/.exec(n)))&&(r={file:t[1],line:t[2],column:t[3]})}return Re.last_get_source_pc=e,Re.last_source=r,r},Oe=e=>Ee((()=>{var t=Me(e);return t?(Oe.ret&&We(Oe.ret),Oe.ret=ke(t.file),Oe.ret):0})),De=e=>Ee((()=>{var t;if(2147483648&e){var r,n=Re[e];if(!n)return 0;if(r=/^\s+at (.*) \(.*\)$/.exec(n))t=r[1];else{if(!(r=/^(.+?)@/.exec(n)))return 0;t=r[1]}}else t=z.getName(e);return De.ret&&We(De.ret),De.ret=ke(t),De.ret})),Ce=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),D(),1}catch(e){}};function Ue(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}var Fe=e=>{e.forEach((e=>{var t=Te(e);t&&(Re[t]=e)}))},je={},Le=()=>{if(!Le.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",_:u||"./this.program"};for(var t in je)void 0===je[t]?delete e[t]:e[t]=je[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Le.strings=r}return Le.strings},Ne=e=>{N()||(o.onExit&&o.onExit(e),M=!0),l(e,new ee(e))},Ie=e=>o["_"+e],Be=(e,t,r,n,o)=>{var i={string:e=>{var t=0;return null!=e&&0!==e&&(t=(e=>{var t=le(e)+1,r=rt(t);return be(e,r,t),r})(e)),t},array:e=>{var t,r,n=rt(e.length);return t=e,r=n,k.set(t,r),n}},a=Ie(e),s=[],u=0;if(n)for(var l=0;l<n.length;l++){var c=i[r[l]];c?(0===u&&(u=et()),s[l]=c(n[l])):s[l]=n[l]}var f,h=a.apply(null,s);return f=h,0!==u&&tt(u),h=function(e){return"string"===t?oe(e):"boolean"===t?Boolean(e):e}(f),h},ze=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(ze.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=ze,we.createPreloadedFile=(e,t,r,n,o,i,s,u,l,c)=>{var f=t?se.resolve(ie.join2(e,t)):e;function h(r){function a(r){c&&c(),u||we.createDataFile(e,t,r,n,o,l),i&&i(),K()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ge.forEach((i=>{o||i.canHandle(t)&&(i.handle(e,t,r,n),o=!0)})),o})(r,f,a,(()=>{s&&s(),K()}))||a(r)}V(),"string"==typeof r?((e,t,r)=>{var n=`al ${e}`;a(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),h(new Uint8Array(t)),n&&K()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()})(r,0,s):h(r)},we.staticInit();var $e,qe={E:(e,t,r,n)=>{Z(`Assertion failed: ${oe(e)}, at: `+[t?oe(t):"unknown filename",r,n?oe(n):"unknown function"])},p:function(e){try{var t=ye.getStreamFromFD(e);return we.createStream(t).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},c:function(e,t,r){ye.varargs=r;try{var n=ye.getStreamFromFD(e);switch(t){case 0:if((o=ye.get())<0)return-28;for(;we.streams[o];)o++;return we.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return _((o=ye.getp())+0>>1,2),0;case 16:case 8:default:return-28;case 9:return E(Ve()>>2,28),-1}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},P:function(e,t){try{var r=ye.getStreamFromFD(e);return ye.doStat(we.stat,r.path,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,t){try{return e=ye.getStr(e),ye.doStat(we.lstat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},D:function(e,t,r){try{return t=ye.getStr(t),t=ye.calculateAt(e,t),"/"===(t=ie.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),we.mkdir(t,r,0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,t,r,n){try{t=ye.getStr(t);var o=256&n,i=4096&n;return n&=-6401,t=ye.calculateAt(e,t,i),ye.doStat(o?we.lstat:we.stat,t,r)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},l:function(e,t,r,n){ye.varargs=n;try{t=ye.getStr(t),t=ye.calculateAt(e,t);var o=n?ye.get():0;return we.open(t,r,o).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},K:function(e){try{if(0==e)throw new we.ErrnoError(21);var t=_e.createPipe();return E(e>>2,t.readable_fd),E(e+4>>2,t.writable_fd),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},J:function(e,t,r){try{for(var n=0,o=0;o<t;o++){var i=e+8*o,a=v(i>>2),s=g(i+4>>1),u=32,l=we.getStream(a);l&&(u=ye.DEFAULT_POLLMASK,l.stream_ops.poll&&(u=l.stream_ops.poll(l,-1))),(u&=24|s)&&n++,_(i+6>>1,u)}return n}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},i:function(e,t){try{return e=ye.getStr(e),ye.doStat(we.stat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},L:()=>!0,g:e=>Ee((()=>ke(o[oe(e)]||""))),e:()=>{var e=o.printWithColors;return void 0!==e&&e},t:function(e,t,r){var n=xe(e,t),o=new Date(1e3*n);E(r>>2,o.getSeconds()),E(r+4>>2,o.getMinutes()),E(r+8>>2,o.getHours()),E(r+12>>2,o.getDate()),E(r+16>>2,o.getMonth()),E(r+20>>2,o.getFullYear()-1900),E(r+24>>2,o.getDay()),E(r+28>>2,0|Ae(o)),E(r+36>>2,-60*o.getTimezoneOffset());var i=new Date(o.getFullYear(),0,1),a=new Date(o.getFullYear(),6,1).getTimezoneOffset(),s=i.getTimezoneOffset();E(r+32>>2,0|(a!=s&&o.getTimezoneOffset()==Math.min(s,a)))},u:function(e){var t=(()=>{var t=new Date(v(e+20>>2)+1900,v(e+16>>2),v(e+12>>2),v(e+8>>2),v(e+4>>2),v(e>>2),0),r=v(e+32>>2),n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)E(e+32>>2,Number(i!=a&&s==n));else if(r>0!=(s==n)){var u=Math.max(a,i),l=r>0?s:u;t.setTime(t.getTime()+6e4*(l-n))}E(e+24>>2,t.getDay());var c=0|Ae(t);return E(e+28>>2,c),E(e>>2,t.getSeconds()),E(e+4>>2,t.getMinutes()),E(e+8>>2,t.getHours()),E(e+12>>2,t.getDate()),E(e+16>>2,t.getMonth()),E(e+20>>2,t.getYear()),t.getTime()/1e3})();return Qe(($=t,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)),t>>>0},r:function(e,t,r,n,o,i,a,s){var u=xe(o,i);try{if(isNaN(u))return 61;var l=ye.getStreamFromFD(n),c=we.mmap(l,e,u,t,r),f=c.ptr;return E(a>>2,c.allocated),b(s>>2,f),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},s:function(e,t,r,n,o,i,a){var s=xe(i,a);try{if(isNaN(s))return 61;var u=ye.getStreamFromFD(o);2&r&&ye.doMsync(e,u,t,n,s),we.munmap(u)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},v:function(e){var t=(()=>{var t=Date.UTC(v(e+20>>2)+1900,v(e+16>>2),v(e+12>>2),v(e+8>>2),v(e+4>>2),v(e>>2),0),r=new Date(t);E(e+24>>2,r.getUTCDay());var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;return E(e+28>>2,o),r.getTime()/1e3})();return Qe(($=t,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)),t>>>0},H:(e,t,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset();function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}b(e>>2,60*Math.max(a,s)),E(t>>2,Number(a!=s));var l=u(o),c=u(i),f=ke(l),h=ke(c);s<a?(b(r>>2,f),b(r+4>>2,h)):(b(r>>2,h),b(r+4>>2,f))},a:()=>{Z("")},M:()=>Date.now(),I:()=>2147483648,k:(e,t)=>be(I,e,t),h:he,x:e=>{var t=Me(e);return t&&t.column||0},z:Oe,A:De,y:e=>{var t=Me(e);return t?t.line:0},F:e=>{var t=P.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,o=1;o<=4;o*=2){var i=t*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(r,(n=Math.max(e,i))+(65536-n%65536)%65536);if(Ce(a))return!0}return!1},b:e=>{var t=Ue().split("\n");"Error"==t[0]&&t.shift();var r=t[e+3];return Te(r)},C:function(){var e=Ue().split("\n");return"Error"==e[0]&&e.shift(),Fe(e),Re.last_addr=Te(e[3]),Re.last_stack=e,Re.last_addr},B:(e,t,r)=>{var n;Re.last_addr==e?n=Re.last_stack:("Error"==(n=Ue().split("\n"))[0]&&n.shift(),Fe(n));for(var o=3;n[o]&&Te(n[o])!=e;)++o;for(var i=0;i<r&&n[i+o];++i)E(t+4*i>>2,Te(n[i+o]));return i},n:(e,t)=>{var r=0;return Le().forEach(((n,o)=>{var i=t+r;b(e+4*o>>2,i),((e,t)=>{for(var r=0;r<e.length;++r)y(0|t++,e.charCodeAt(r));y(0|t,0)})(n,i),r+=n.length+1})),0},o:(e,t)=>{var r=Le();b(e>>2,r.length);var n=0;return r.forEach((e=>n+=e.length+1)),b(t>>2,n),0},m:(e,t)=>{N()||(Ke(),ne(F),we.quit(),de.shutdown()),Ne(e)},f:function(e){try{var t=ye.getStreamFromFD(e);return we.close(t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},G:function(e,t){try{var r=ye.getStreamFromFD(e);return y(0|t,r.tty?2:we.isDir(r.mode)?3:we.isLink(r.mode)?7:4),_(t+2>>1,0),E(t+8>>2,(q=[0,($=0,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(t+12>>2,q[1]),E(t+16>>2,(q=[0,($=0,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(t+20>>2,q[1]),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},j:function(e,t,r,n){try{var o=((e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=w(t>>2),s=w(t+4>>2);t+=8;var u=we.read(e,k,a,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(ye.getStreamFromFD(e),t,r);return b(n>>2,o),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,t,r,n,o){var i=xe(t,r);try{if(isNaN(i))return 61;var a=ye.getStreamFromFD(e);return we.llseek(a,i,n),E(o>>2,(q=[a.position>>>0,($=a.position,+Math.abs($)>=1?$>0?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)])[0]),E(o+4>>2,q[1]),a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},d:function(e,t,r,n){try{var o=((e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=w(t>>2),s=w(t+4>>2);t+=8;var u=we.write(e,k,a,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(ye.getStreamFromFD(e),t,r);return b(n>>2,o),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},q:Ne},He=function(){var e,t,r,i,a={a:qe};function s(e,t){var r,n=e.exports;return p=(He=n).Q,o.wasmMemory=p,D(),He.W,r=He.R,U.unshift(r),K(),n}if(V(),o.instantiateWasm)try{return o.instantiateWasm(a,s)}catch(e){d(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return(e=f,t=I,r=a,i=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||"function"!=typeof fetch?Q(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>{var n=WebAssembly.instantiateStreaming(e,r),o=e.clone().arrayBuffer();return n.then((function(e){o.then((t=>{z=new G(new Uint8Array(t),e.module),i(e)}),(e=>d(`failed to initialize offset-converter: ${e}`)))}),(function(e){return d(`wasm streaming compile failed: ${e}`),d("falling back to ArrayBuffer instantiation"),Q(t,r,i)}))}))).catch(n),{}}(),Ye=(o._extract_archive=(e,t,r)=>(o._extract_archive=He.S)(e,t,r),o._malloc=e=>(Ye=o._malloc=He.T)(e)),We=o._free=e=>(We=o._free=He.U)(e),Ve=(o._free_extracted_archive=e=>(o._free_extracted_archive=He.V)(e),()=>(Ve=He.X)()),Ke=()=>(Ke=He.Y)(),Ze=e=>(Ze=He.Z)(e),Je=(e,t)=>(Je=He._)(e,t),Xe=e=>(Xe=He.$)(e),Ge=(e,t)=>(Ge=He.aa)(e,t),Qe=e=>(Qe=He.ba)(e),et=()=>(et=He.ca)(),tt=e=>(tt=He.da)(e),rt=e=>(rt=He.ea)(e),nt=(o.__ZN6__asan9FakeStack17AddrIsInFakeStackEm=(e,t)=>(o.__ZN6__asan9FakeStack17AddrIsInFakeStackEm=He.fa)(e,t),o.__ZN6__asan9FakeStack8AllocateEmmm=(e,t,r,n)=>(o.__ZN6__asan9FakeStack8AllocateEmmm=He.ga)(e,t,r,n),e=>(nt=He.ha)(e)),ot=e=>(ot=He.ia)(e),it=e=>(it=He.ja)(e),at=e=>(at=He.ka)(e),st=e=>(st=He.la)(e),ut=e=>(ut=He.ma)(e),lt=(e,t)=>(lt=He.na)(e,t),ct=(e,t)=>(ct=He.oa)(e,t),ft=(e,t)=>(ft=He.pa)(e,t),ht=(e,t)=>(ht=He.qa)(e,t);function dt(){function e(){$e||($e=!0,o.calledRun=!0,M||(L=!0,o.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,de.init(),_e.root=we.mount(_e,{},null),ne(U),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),j.unshift(e);var e;ne(j)}()))}H>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),C.unshift(e);var e;ne(C)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.wasmMemory=p,o.ccall=Be,o.cwrap=(e,t,r,n)=>{var o=!r||r.every((e=>"number"===e||"boolean"===e));return"string"!==t&&o&&!n?Ie(e):function(){return Be(e,t,r,arguments)}},o.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return function(e){return L?nt(e):k[e]}(0|e);case"i16":return g(e>>1);case"i32":return v(e>>2);case"i64":Z("to do getValue(i64) use WASM_BIGINT");case"float":return function(e){return L?st(e):R[e]}(e>>2);case"double":return function(e){return L?ut(e):T[e]}(e>>3);case"*":return w(e>>2);default:Z(`invalid type for getValue: ${t}`)}},o.UTF8ToString=oe,W=function e(){$e||dt(),$e||(W=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return dt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&__webpack_require__.amdO&&define([],(()=>n))}},function(){return gt||(0,mt[te(mt)[0]])((gt={exports:{}}).exports,gt),gt.exports});Se(),wt(),Se(),wt(),Se(),wt();var _t=((e,t,r)=>(r=null!=e?G(re(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of te(t))ne.call(e,r)||undefined===r||Q(e,r,{get:()=>t[r],enumerable:!(n=ee(t,r))||n.enumerable});return e})(e&&e.__esModule?r:Q(r,"default",{value:e,enumerable:!0}),e)))(yt());Se(),wt();var Et=async()=>{const e=await(async()=>await(0,_t.default)({locateFile:e=>e.endsWith(".wasm")?"./unpack-UWASHBVL.wasm":e}))(),t=async(t,r=!1)=>{let n=e._malloc(t.length);e.HEAPU8.set(t,n);let o=e._extract_archive(n,t.length,r);const i={};let a=e.getValue(o+8,"i32"),s=o+12;if(1!==a){const t=e.UTF8ToString(s);throw console.error("Extraction failed with status:",a,"Error:",t),e._free(n),e._free_extracted_archive(o),n=null,o=null,s=null,new Error(t)}const u=e.getValue(o,"i32"),l=e.getValue(o+4,"i32");for(let t=0;t<l;t++){const r=u+12*t,n=e.getValue(r,"i32"),o=e.getValue(r+8,"i32"),a=e.getValue(r+4,"i32"),s=e.UTF8ToString(n),l=new Uint8Array(e.HEAPU8.buffer,a,o).slice(0);i[s]=l}return e._free(n),e._free_extracted_archive(o),n=null,o=null,s=null,i};return{extract:async e=>{let r=(e=>{let t=!1;return[".conda","tar.bz2","tar.gz"].forEach((r=>{e.toLowerCase().endsWith(r)&&(t=!0)})),t})(e);const n=await(async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.arrayBuffer();return new Uint8Array(r)})(e);return t(n,!r)},extractData:t}};function bt(e,t,r){try{Object.keys(t).forEach((n=>{const o=(i=n).substring(0,i.lastIndexOf("/"));var i;e.analyzePath(o).exists||e.mkdirTree(o),e.writeFile(`${r}/${n}`,t[n])}))}catch(e){throw new Error(e?.message)}}function kt(e,t,r,n){let o=new Uint8Array,i=function(e){let t=!1;return Object.keys(e).forEach((e=>{e.match("conda-meta")&&(t=!0)})),t}(e);if(i){let o=new Uint8Array,i="";Object.keys(e).forEach((t=>{t.match("conda-meta")&&(o=e[t],i=t)}));let a=`${t}/conda-meta`;r.analyzePath(`${a}`).exists||r.mkdirTree(`${a}`),n&&console.log(`Saving conda-meta file ${i}`);const s=JSON.stringify(o),u=(new TextEncoder).encode(s);r.writeFile(`${t}/${i}`,u)}else if(n&&console.log("Creating and saving conda-meta json"),Object.keys(e).map((t=>{t.match("index.json")&&(o=e[t])})),0!==o.byteLength){let e=new TextDecoder("utf-8").decode(o);try{let o=JSON.parse(e);const i=`${t}/conda-meta`,a=`${i}/${o.name}-${o.version}-${o.build}.json`,s={name:o.name,version:o.version,build:o.build,build_number:o.build_number};r.analyzePath(`${i}`).exists||r.mkdirTree(`${i}`),n&&console.log(`Creating conda-meta file for ${o.name}-${o.version}-${o.build} package`),r.writeFile(a,JSON.stringify(s))}catch(e){throw new Error(e?.message)}}else n&&console.log("There is no info folder, imposibly to create a conda meta json file")}function Pt(e,t){if(t.startsWith("/")){const r=t.substring(0,t.lastIndexOf("/"));return"/"==e?"/lib"==r:r==`${e}/lib`}return!1}async function St(e,t,r,n){if("/"==e)var o="/lib/python3.11/site-packages";else o=`${e}/lib/python3.11/site-packages`;const i=`${o}/${t}.libs`,a=(e=>{let t={};return(...r)=>{let n=r[0];if(n in t)return t[n];{let r=e(n);return t[n]=r,r}}})(n.FS.readFile);let s=[];const u=function(e,t,r){let n=r.FS.readFile;void 0!==t&&(n=t);const o=new Set;return e.map((e=>{const t=n(e);r.getDylinkMetadata(t).neededDynlibs.forEach((e=>{o.add(e)}))})),o}(r,a,n);s=r.map((t=>({path:t,global:u.has(n.PATH.basename(t))||Pt(e,t)||t.startsWith(i)}))),s.sort(((e,t)=>Number(t.global)-Number(e.global)));for(const{path:t,global:r}of s)try{await xt(e,t,r,[i],a,n)}catch(e){console.error(`Failed to load dynlib ${t}`,e)}}Se(),wt(),Se(),wt();var At=function(){let e=Promise.resolve();return async function(){const t=e;let r=()=>{};return e=new Promise((e=>r=e)),await t,r}}();async function xt(e,t,r,n,o,i){void 0===n&&(n=[]);const a=await At();try{const a=function(e,t,r,n,o){const i=t.substring(0,t.lastIndexOf("/"));let a=r||[];a="/"==e?a.concat([i],["/lib"]):a.concat([i],[`${e}/lib`]);const s=e=>{o.PATH.basename(e),o.PATH.basename(t);for(const t of a){const r=o.PATH.join2(t,e);if(null!==o.FS.findObject(r))return r}return e};let u=e=>o.FS.readFile(s(e));return void 0!==n&&(u=e=>n(s(e))),{findObject:(e,t)=>{let r=o.FS.findObject(s(e),t);return null===r&&console.debug(`Failed to find a library: ${s(e)}`),r},readFile:u}}(e,t,n,o,i),s=i.PATH.basename(t);await i.loadDynamicLibrary(s,{loadAsync:!0,nodelete:!0,allowUndefined:!0,global:r,fs:a});const u=i.LDSO.loadedLibsByName[s],l=i.LDSO.loadedLibsByName[t];u||l||console.execption(`Failed to load ${s} from ${t} LDSO not found`),u||(i.LDSO.loadedLibsByName[s]=l),l||(i.LDSO.loadedLibsByName[t]=u)}catch(e){throw new Error(e?.message)}finally{a()}}async function Rt(e){const t=new Promise((t=>{e.monitorRunDependencies=e=>{0===e&&t()}}));return e.addRunDependency("dummy"),e.removeRunDependency("dummy"),t}let Tt,Mt,Ot,Dt;globalThis.Module={},globalThis.toplevel_promise=null,globalThis.toplevel_promise_py_proxy=null,self.get_stdin=async function(){return new Promise((e=>{Tt=e}))},globalThis.ready=new Promise((e=>{Mt=e}));class Ct{constructor(e={}){this._sendWorkerMessage=()=>{}}async ready(){return await globalThis.ready}async cd(e){e&&globalThis.Module.FS&&globalThis.Module.FS.chdir(e)}async isDir(e){try{const t=globalThis.Module.FS.lookupPath(e);return globalThis.Module.FS.isDir(t.node.mode)}catch(e){return!1}}async processMessage(e){const t=e.msg.header.msg_type;await globalThis.ready,null!==globalThis.toplevel_promise&&null!==globalThis.toplevel_promise_py_proxy&&(await globalThis.toplevel_promise,globalThis.toplevel_promise_py_proxy.delete(),globalThis.toplevel_promise_py_proxy=null,globalThis.toplevel_promise=null),"input_reply"===t?Tt(e.msg):Dt.notify_listener(e.msg)}async initialize(e){const{baseUrl:t,kernelSpec:r,empackEnvMetaLink:n}=e,o=X.URLExt.join(t,r.argv[0]),i=o.replace(".js",".wasm"),a=o.replace(".js",".data"),s=X.URLExt.join(t,"xeus","kernels",r.dir),u=r.metadata&&r.metadata.shared?r.metadata.shared:{};importScripts(o),globalThis.Module=await createXeusModule({locateFile:e=>e in u?X.URLExt.join(s,e):e.endsWith(".wasm")?i:e.endsWith(".data")?a:e});try{if(await Rt(globalThis.Module),void 0!==globalThis.Module.FS&&void 0!==globalThis.Module.loadDynamicLibrary){const e=`${n||s}/empack_env_meta.json`,o=X.URLExt.join(t,"xeus/kernel_packages"),i=await async function(e){const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}(e),a=await(async e=>{const{empackEnvMeta:t,pkgRootUrl:r,Module:n,verbose:o,generateCondaMeta:i}=e;let a;if(e.untarjs)a=e.untarjs;else{const e=Et();a=await e}const s={};return t.packages.length&&(await Promise.all(t.packages.map((async e=>{const u=e?.url??`${r}/${e.filename}`;o&&console.log(`Install ${e.filename} taken from ${u}`),s[e.name]=await async function(e,t,r,n,o=!1,i=!1){if(!t)throw new Error(`There is no file in ${t}`);let a,s=await n.extract(t),u=e;if(0!==Object.keys(s).length)if("/"===e&&(u=""),t.toLowerCase().endsWith(".conda")){let e=new Uint8Array,l=new Uint8Array;if(Object.keys(s).map((t=>{t.startsWith("pkg-")?e=s[t]:t.startsWith("info-")&&(l=s[t])})),e&&0===e.byteLength||l&&0===l.byteLength)throw new Error(`Invalid .conda package ${t}`);const c=await n.extractData(e),f=await n.extractData(l);i&&kt(f,u,r,o),bt(r,{...c,...f},u),a=c}else i&&kt(s,u,r,o),bt(r,s,u),a=s;if(!a)throw new Error(`There is no file in ${t}`);return"/"===e&&(u=""),0!==Object.keys(a).length?function(e,t){let r=[];return Object.keys(e).map((n=>{(n.endsWith(".so")||n.includes(".so."))&&function(e){const t=[0,97,115,109];return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}(e[n])&&r.push(`${t}/${n}`)})),r}(a,u):[]}(t.prefix,u,n.FS,a,!!o,!!i)}))),await Rt(n)),s})({empackEnvMeta:i,pkgRootUrl:o,Module:globalThis.Module,verbose:!1});if("xpython"===r.name){const e=function(e){let t;for(let r=0;r<e.length;r++)if("python"==e[r].name){t=e[r];break}if(t)return t.version.split(".").map((e=>parseInt(e)))}(i.packages);if(!e)throw new Error("Failed to load Python!");await async function(e){await e.Module.init_phase_1(e.prefix,e.pythonVersion,e.verbose),e.Module.init_phase_2(e.prefix,e.pythonVersion,e.verbose)}({prefix:i.prefix,pythonVersion:e,Module:globalThis.Module})}await async function(e){const{sharedLibs:t,prefix:r,Module:n}=e,o=[];for(const e of Object.keys(t)){const i=t[e];i&&o.push(St(r,e,i,n))}return await Promise.all(o)}({sharedLibs:a,prefix:i.prefix,Module:globalThis.Module})}Ot=new globalThis.Module.xkernel,Dt=Ot.get_server(),Dt||console.error("Failed to start kernel!"),Ot.start()}catch(e){if("number"==typeof e){const t=globalThis.Module.get_exception_message(e);throw new Error(t)}throw e}Mt(1)}registerCallback(e){this._sendWorkerMessage=e}}class Ut extends x{createAPI(e){return new A(e.baseUrl,e.driveName,e.mountpoint,e.FS,e.ERRNO_CODES)}}class Ft extends Ct{async mount(e,t,r){const{FS:n,PATH:o,ERRNO_CODES:i}=globalThis.Module;if(!n)return;const a=new Ut({FS:n,PATH:o,ERRNO_CODES:i,baseUrl:r,driveName:e,mountpoint:t});n.mkdir(t),n.mount(a,{},t),n.chdir(t)}}u(new Ft)})(),__webpack_exports__})()));
|
|
3
3
|
//# sourceMappingURL=comlink.worker.js.map
|