@nocobase/plugin-workflow-javascript 2.1.0-beta.33 → 2.1.0-beta.35
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/build.config.ts +52 -0
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/@jitl/quickjs-ffi-types/LICENSE +21 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/README.md +5 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.d.mts +549 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.d.ts +549 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/package.json +36 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/README.md +93 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.cjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.mts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.ts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/README.md +88 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.mjs +5430 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cjs +5485 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.cjs +5424 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/node_modules/{quickjs-emscripten/712.index.js → @jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.mjs} +3 -28
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.mts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.ts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/README.md +89 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.mjs +26 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cjs +25 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.cjs +25 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.d.ts +15 -0
- package/dist/node_modules/{quickjs-emscripten/302.index.js → @jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.mjs} +3 -28
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.mts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.ts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +22 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +21 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +21 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/node_modules/{quickjs-emscripten/161.index.js → @jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs} +3 -28
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/quickjs-emscripten/README.md +928 -0
- package/dist/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.js +2 -1
- package/dist/node_modules/quickjs-emscripten/dist/index.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/package.json +69 -1
- package/dist/node_modules/quickjs-emscripten-core/LICENSE +21 -0
- package/dist/node_modules/quickjs-emscripten-core/README.md +341 -0
- package/dist/node_modules/quickjs-emscripten-core/README.template.md +70 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs +7 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.d.mts +2033 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.d.ts +2033 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.js +7 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/package.json +49 -0
- package/dist/node_modules/winston-transport/package.json +1 -1
- package/dist/server/QuickJs.js +11 -1
- package/package.json +2 -2
- package/dist/node_modules/quickjs-emscripten/017c8a1a1898bfe7b7ae.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/277.index.js +0 -27
- package/dist/node_modules/quickjs-emscripten/45d53437811cf6eec760.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/96b24985ab62871ec2a0.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/9a4b9654a8a7f4d515ba.wasm +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{newQuickJSWASMModuleFromVariant,newQuickJSAsyncWASMModuleFromVariant}from"quickjs-emscripten-core";import DEBUG_SYNC from"@jitl/quickjs-wasmfile-debug-sync";import RELEASE_SYNC from"@jitl/quickjs-wasmfile-release-sync";import DEBUG_ASYNC from"@jitl/quickjs-wasmfile-debug-asyncify";import RELEASE_ASYNC from"@jitl/quickjs-wasmfile-release-asyncify";async function newQuickJSWASMModule(variantOrPromise=RELEASE_SYNC){return newQuickJSWASMModuleFromVariant(variantOrPromise)}async function newQuickJSAsyncWASMModule(variantOrPromise=RELEASE_ASYNC){return newQuickJSAsyncWASMModuleFromVariant(variantOrPromise)}export{DEBUG_SYNC,RELEASE_SYNC,DEBUG_ASYNC,RELEASE_ASYNC,newQuickJSWASMModule,newQuickJSAsyncWASMModule};
|
|
2
|
+
//# sourceMappingURL=chunk-OHAYRCBA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/variants.ts"],"sourcesContent":["import type {\n QuickJSSyncVariant,\n QuickJSAsyncVariant,\n QuickJSWASMModule,\n QuickJSAsyncWASMModule,\n PromisedDefault,\n} from \"quickjs-emscripten-core\"\nimport {\n newQuickJSWASMModuleFromVariant,\n newQuickJSAsyncWASMModuleFromVariant,\n} from \"quickjs-emscripten-core\"\nimport DEBUG_SYNC from \"@jitl/quickjs-wasmfile-debug-sync\"\nimport RELEASE_SYNC from \"@jitl/quickjs-wasmfile-release-sync\"\nimport DEBUG_ASYNC from \"@jitl/quickjs-wasmfile-debug-asyncify\"\nimport RELEASE_ASYNC from \"@jitl/quickjs-wasmfile-release-asyncify\"\n\n/**\n * Create a new, completely isolated WebAssembly module containing the QuickJS library.\n * See the documentation on {@link QuickJSWASMModule}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSWASMModule(\n /**\n * Optionally, pass a {@link QuickJSSyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSSyncVariant> = RELEASE_SYNC,\n): Promise<QuickJSWASMModule> {\n return newQuickJSWASMModuleFromVariant(variantOrPromise)\n}\n\n/**\n * Create a new, completely isolated WebAssembly module containing a version of the QuickJS library\n * compiled with Emscripten's [ASYNCIFY](https://emscripten.org/docs/porting/asyncify.html) transform.\n *\n * This version of the library offers features that enable synchronous code\n * inside the VM to interact with asynchronous code in the host environment.\n * See the documentation on {@link QuickJSAsyncWASMModule}, {@link QuickJSAsyncRuntime},\n * and {@link QuickJSAsyncContext}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSAsyncWASMModule(\n /**\n * Optionally, pass a {@link QuickJSAsyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSAsyncVariant> = RELEASE_ASYNC,\n): Promise<QuickJSAsyncWASMModule> {\n return newQuickJSAsyncWASMModuleFromVariant(variantOrPromise)\n}\n\nexport { DEBUG_SYNC, RELEASE_SYNC, DEBUG_ASYNC, RELEASE_ASYNC }\n"],"mappings":"AAOA,OACE,gCACA,yCACK,0BACP,OAAO,eAAgB,oCACvB,OAAO,iBAAkB,sCACzB,OAAO,gBAAiB,wCACxB,OAAO,kBAAmB,0CAU1B,eAAsB,qBAIpB,iBAAwD,aAC5B,CAC5B,OAAO,gCAAgC,gBAAgB,CACzD,CAeA,eAAsB,0BAIpB,iBAAyD,cACxB,CACjC,OAAO,qCAAqC,gBAAgB,CAC9D","names":[]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={725:e=>{var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},__copyProps=(e,s,u,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of n(s))!i.call(e,a)&&a!==u&&t(e,a,{get:()=>s[a],enumerable:!(o=r(s,a))||o.enumerable});return e};var __toCommonJS=e=>__copyProps(t({},"__esModule",{value:!0}),e);var s={};__export(s,{EvalFlags:()=>u,GetOwnPropertyNamesFlags:()=>l,IntrinsicsFlags:()=>o,IsEqualOp:()=>m,JSPromiseStateEnum:()=>a,assertSync:()=>assertSync});e.exports=__toCommonJS(s);function assertSync(e){return function(...t){let r=e(...t);if(r&&typeof r=="object"&&r instanceof Promise)throw new Error("Function unexpectedly returned a Promise");return r}}var u={JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},o={BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},a={Pending:0,Fulfilled:1,Rejected:2},l={JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},m={IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2};0&&0},765:(e,t,r)=>{var n=Object.create;var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function(){return e&&(t=(0,e[u(e)[0]])(e=0)),t};var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!a.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e};var __toESM=(e,t,r)=>(r=e!=null?n(o(e)):{},__copyProps(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(i({},"__esModule",{value:!0}),e);var l={};__export(l,{QuickJSAsyncFFI:()=>h});var m,h,c=__esm({"src/ffi.ts"(){"use strict";m=r(725),h=class{constructor(e){this.module=e;this.DEBUG=!0;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=(0,m.assertSync)(this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]));this.QTS_GetSymbolDescriptionOrKey_MaybeAsync=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"],{async:!0});this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=(0,m.assertSync)(this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]));this.QTS_ExecutePendingJob_MaybeAsync=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"],{async:!0});this.QTS_GetProp=(0,m.assertSync)(this.module.cwrap("QTS_GetProp","number",["number","number","number"]));this.QTS_GetProp_MaybeAsync=this.module.cwrap("QTS_GetProp","number",["number","number","number"],{async:!0});this.QTS_GetPropNumber=(0,m.assertSync)(this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]));this.QTS_GetPropNumber_MaybeAsync=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"],{async:!0});this.QTS_SetProp=(0,m.assertSync)(this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]));this.QTS_SetProp_MaybeAsync=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"],{async:!0});this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=(0,m.assertSync)(this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]));this.QTS_GetOwnPropertyNames_MaybeAsync=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"],{async:!0});this.QTS_Call=(0,m.assertSync)(this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]));this.QTS_Call_MaybeAsync=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"],{async:!0});this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=(0,m.assertSync)(this.module.cwrap("QTS_Dump","number",["number","number"]));this.QTS_Dump_MaybeAsync=this.module.cwrap("QTS_Dump","number",["number","number"],{async:!0});this.QTS_Eval=(0,m.assertSync)(this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]));this.QTS_Eval_MaybeAsync=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"],{async:!0});this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}}}});var b={};__export(b,{default:()=>p});e.exports=__toCommonJS(b);var d={type:"async",importFFI:()=>Promise.resolve().then((()=>(c(),l))).then((e=>e.QuickJSAsyncFFI)),importModuleLoader:()=>r.e(277).then(r.bind(r,277)).then((e=>e.default))},p=d},93:(e,t,r)=>{var n=Object.create;var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function(){return e&&(t=(0,e[u(e)[0]])(e=0)),t};var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!a.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e};var __toESM=(e,t,r)=>(r=e!=null?n(o(e)):{},__copyProps(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(i({},"__esModule",{value:!0}),e);var l={};__export(l,{QuickJSFFI:()=>m});var m,h=__esm({"src/ffi.ts"(){"use strict";m=class{constructor(e){this.module=e;this.DEBUG=!0;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]);this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]);this.QTS_GetProp=this.module.cwrap("QTS_GetProp","number",["number","number","number"]);this.QTS_GetPropNumber=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]);this.QTS_SetProp=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]);this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]);this.QTS_Call=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]);this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=this.module.cwrap("QTS_Dump","number",["number","number"]);this.QTS_Eval=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]);this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}}}});var c={};__export(c,{default:()=>d});e.exports=__toCommonJS(c);var b={type:"sync",importFFI:()=>Promise.resolve().then((()=>(h(),l))).then((e=>e.QuickJSFFI)),importModuleLoader:()=>r.e(712).then(r.bind(r,712)).then((e=>e.default))},d=b},287:(e,t,r)=>{var n=Object.create;var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function(){return e&&(t=(0,e[u(e)[0]])(e=0)),t};var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!a.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e};var __toESM=(e,t,r)=>(r=e!=null?n(o(e)):{},__copyProps(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(i({},"__esModule",{value:!0}),e);var l={};__export(l,{QuickJSAsyncFFI:()=>h});var m,h,c=__esm({"src/ffi.ts"(){"use strict";m=r(725),h=class{constructor(e){this.module=e;this.DEBUG=!1;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=(0,m.assertSync)(this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]));this.QTS_GetSymbolDescriptionOrKey_MaybeAsync=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]);this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=(0,m.assertSync)(this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]));this.QTS_ExecutePendingJob_MaybeAsync=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]);this.QTS_GetProp=(0,m.assertSync)(this.module.cwrap("QTS_GetProp","number",["number","number","number"]));this.QTS_GetProp_MaybeAsync=this.module.cwrap("QTS_GetProp","number",["number","number","number"]);this.QTS_GetPropNumber=(0,m.assertSync)(this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]));this.QTS_GetPropNumber_MaybeAsync=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]);this.QTS_SetProp=(0,m.assertSync)(this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]));this.QTS_SetProp_MaybeAsync=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]);this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=(0,m.assertSync)(this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]));this.QTS_GetOwnPropertyNames_MaybeAsync=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]);this.QTS_Call=(0,m.assertSync)(this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]));this.QTS_Call_MaybeAsync=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]);this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=(0,m.assertSync)(this.module.cwrap("QTS_Dump","number",["number","number"]));this.QTS_Dump_MaybeAsync=this.module.cwrap("QTS_Dump","number",["number","number"]);this.QTS_Eval=(0,m.assertSync)(this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]));this.QTS_Eval_MaybeAsync=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]);this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}}}});var b={};__export(b,{default:()=>p});e.exports=__toCommonJS(b);var d={type:"async",importFFI:()=>Promise.resolve().then((()=>(c(),l))).then((e=>e.QuickJSAsyncFFI)),importModuleLoader:()=>r.e(302).then(r.bind(r,302)).then((e=>e.default))},p=d},8:(e,t,r)=>{var n=Object.create;var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function(){return e&&(t=(0,e[u(e)[0]])(e=0)),t};var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!a.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e};var __toESM=(e,t,r)=>(r=e!=null?n(o(e)):{},__copyProps(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(i({},"__esModule",{value:!0}),e);var l={};__export(l,{QuickJSFFI:()=>m});var m,h=__esm({"src/ffi.ts"(){"use strict";m=class{constructor(e){this.module=e;this.DEBUG=!1;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]);this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]);this.QTS_GetProp=this.module.cwrap("QTS_GetProp","number",["number","number","number"]);this.QTS_GetPropNumber=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]);this.QTS_SetProp=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]);this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]);this.QTS_Call=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]);this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=this.module.cwrap("QTS_Dump","number",["number","number"]);this.QTS_Eval=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]);this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}}}});var c={};__export(c,{default:()=>d});e.exports=__toCommonJS(c);var b={type:"sync",importFFI:()=>Promise.resolve().then((()=>(h(),l))).then((e=>e.QuickJSFFI)),importModuleLoader:()=>r.e(161).then(r.bind(r,161)).then((e=>e.default))},d=b},33:e=>{e.exports=require("node:module")},792:(e,t,r)=>{var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function(){return e&&(t=(0,e[s(e)[0]])(e=0)),t};var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of s(t))!u.call(e,a)&&a!==r&&n(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e},__reExport=(e,t,r)=>(__copyProps(e,t,"default"),r&&__copyProps(r,t,"default"));var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:!0}),e);function setDebugMode(e=!0){o=e}function debugLog(...e){o&&console.log("quickjs-emscripten:",...e)}var o,a=__esm({"src/debug.ts"(){"use strict";o=!1}});var l={};__export(l,{QuickJSAsyncifyError:()=>d,QuickJSAsyncifySuspended:()=>p,QuickJSEmptyGetOwnPropertyNames:()=>T,QuickJSEmscriptenModuleError:()=>_,QuickJSHostRefInvalid:()=>Q,QuickJSHostRefRangeExceeded:()=>y,QuickJSMemoryLeakDetected:()=>S,QuickJSNotImplemented:()=>b,QuickJSPromisePending:()=>f,QuickJSUnknownIntrinsic:()=>w,QuickJSUnwrapError:()=>m,QuickJSUseAfterFree:()=>c,QuickJSWrongOwner:()=>h});var m,h,c,b,d,p,S,_,w,f,T,y,Q,v=__esm({"src/errors.ts"(){"use strict";m=class extends Error{constructor(e,t){let r=typeof e=="object"&&e&&"message"in e?String(e.message):String(e);super(r);this.cause=e;this.context=t;this.name="QuickJSUnwrapError"}},h=class extends Error{constructor(){super(...arguments);this.name="QuickJSWrongOwner"}},c=class extends Error{constructor(){super(...arguments);this.name="QuickJSUseAfterFree"}},b=class extends Error{constructor(){super(...arguments);this.name="QuickJSNotImplemented"}},d=class extends Error{constructor(){super(...arguments);this.name="QuickJSAsyncifyError"}},p=class extends Error{constructor(){super(...arguments);this.name="QuickJSAsyncifySuspended"}},S=class extends Error{constructor(){super(...arguments);this.name="QuickJSMemoryLeakDetected"}},_=class extends Error{constructor(){super(...arguments);this.name="QuickJSEmscriptenModuleError"}},w=class extends TypeError{constructor(){super(...arguments);this.name="QuickJSUnknownIntrinsic"}},f=class extends Error{constructor(){super(...arguments);this.name="QuickJSPromisePending"}},T=class extends Error{constructor(){super(...arguments);this.name="QuickJSEmptyGetOwnPropertyNames"}},y=class extends Error{constructor(){super(...arguments);this.name="QuickJSHostRefRangeExceeded"}},Q=class extends Error{constructor(){super(...arguments);this.name="QuickJSHostRefInvalid"}}}});function*awaitYield(e){return yield e}function awaitYieldOf(e){return awaitYield(awaitEachYieldedPromise(e))}function maybeAsyncFn(e,t){return(...r)=>{let n=t.call(e,g,...r);return awaitEachYieldedPromise(n)}}function maybeAsync(e,t){let r=t.call(e,g);return awaitEachYieldedPromise(r)}function awaitEachYieldedPromise(e){function handleNextStep(t){return t.done?t.value:t.value instanceof Promise?t.value.then((t=>handleNextStep(e.next(t))),(t=>handleNextStep(e.throw(t)))):handleNextStep(e.next(t.value))}return handleNextStep(e.next())}var g,P=__esm({"src/asyncify-helpers.ts"(){"use strict";g=awaitYield;g.of=awaitYieldOf}});function scopeFinally(e,t){let r;try{e.dispose()}catch(e){r=e}if(t&&r)throw Object.assign(t,{message:`${t.message}\n Then, failed to dispose scope: ${r.message}`,disposeError:r}),t;if(t||r)throw t||r}function createDisposableArray(e){let t=e?Array.from(e):[];function disposeAlive(){return t.forEach((e=>e.alive?e.dispose():void 0))}function someIsAlive(){return t.some((e=>e.alive))}return Object.defineProperty(t,M,{configurable:!0,enumerable:!1,value:disposeAlive}),Object.defineProperty(t,"dispose",{configurable:!0,enumerable:!1,value:disposeAlive}),Object.defineProperty(t,"alive",{configurable:!0,enumerable:!1,get:someIsAlive}),t}function isDisposable(e){return!!(e&&(typeof e=="object"||typeof e=="function")&&"alive"in e&&typeof e.alive=="boolean"&&"dispose"in e&&typeof e.dispose=="function")}var x,M,A,E,R,N,O,G,F,k,L,C=__esm({"src/lifetime.ts"(){"use strict";P();a();v();x=class{[Symbol.dispose](){return this.dispose()}},M=Symbol.dispose??Symbol.for("Symbol.dispose"),A=x.prototype;A[M]||(A[M]=function(){return this.dispose()});E=class _Lifetime extends x{constructor(e,t,r,n){super();this._value=e;this.copier=t;this.disposer=r;this._owner=n;this._alive=!0;this._constructorStack=o?new Error("Lifetime constructed").stack:void 0}get alive(){return this._alive}get value(){return this.assertAlive(),this._value}get owner(){return this._owner}get dupable(){return!!this.copier}dup(){if(this.assertAlive(),!this.copier)throw new Error("Non-dupable lifetime");return new _Lifetime(this.copier(this._value),this.copier,this.disposer,this._owner)}consume(e){this.assertAlive();let t=e(this);return this.dispose(),t}map(e){return this.assertAlive(),e(this)}tap(e){return e(this),this}dispose(){this.assertAlive(),this.disposer&&this.disposer(this._value),this._alive=!1}assertAlive(){if(!this.alive)throw this._constructorStack?new c(`Lifetime not alive\n${this._constructorStack}\nLifetime used`):new c("Lifetime not alive")}},R=class extends E{constructor(e,t){super(e,void 0,void 0,t)}get dupable(){return!0}dup(){return this}dispose(){}},N=class extends E{constructor(e,t,r,n){super(e,t,r,n)}dispose(){this._alive=!1}};O=class _Scope extends x{constructor(){super(...arguments);this._disposables=new E(new Set);this.manage=e=>(this._disposables.value.add(e),e)}static withScope(e){let t=new _Scope,r;try{return e(t)}catch(e){throw r=e,e}finally{scopeFinally(t,r)}}static withScopeMaybeAsync(e,t){return maybeAsync(void 0,(function*(r){let n=new _Scope,i;try{return yield*r.of(t.call(e,r,n))}catch(e){throw i=e,e}finally{scopeFinally(n,i)}}))}static async withScopeAsync(e){let t=new _Scope,r;try{return await e(t)}catch(e){throw r=e,e}finally{scopeFinally(t,r)}}get alive(){return this._disposables.alive}dispose(){let e=Array.from(this._disposables.value.values()).reverse();for(let t of e)t.alive&&t.dispose();this._disposables.dispose()}};G=class _AbstractDisposableResult extends x{static success(e){return new F(e)}static fail(e,t){return new k(e,t)}static is(e){return e instanceof _AbstractDisposableResult}},F=class extends G{constructor(e){super();this.value=e}get alive(){return isDisposable(this.value)?this.value.alive:!0}dispose(){isDisposable(this.value)&&this.value.dispose()}unwrap(){return this.value}unwrapOr(e){return this.value}},k=class extends G{constructor(e,t){super();this.error=e;this.onUnwrap=t}get alive(){return isDisposable(this.error)?this.error.alive:!0}dispose(){isDisposable(this.error)&&this.error.dispose()}unwrap(){throw this.onUnwrap(this),this.error}unwrapOr(e){return e}},L=G}});var I,J=__esm({"src/deferred-promise.ts"(){"use strict";C();I=class extends x{constructor(e){super();this.resolve=e=>{this.resolveHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.resolveHandle,this.context.undefined,e||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())};this.reject=e=>{this.rejectHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.rejectHandle,this.context.undefined,e||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())};this.dispose=()=>{this.handle.alive&&this.handle.dispose(),this.disposeResolvers()};this.context=e.context,this.owner=e.context.runtime,this.handle=e.promiseHandle,this.settled=new Promise((e=>{this.onSettled=e})),this.resolveHandle=e.resolveHandle,this.rejectHandle=e.rejectHandle}get alive(){return this.handle.alive||this.resolveHandle.alive||this.rejectHandle.alive}disposeResolvers(){this.resolveHandle.alive&&this.resolveHandle.dispose(),this.rejectHandle.alive&&this.rejectHandle.dispose()}}}});var D,j=__esm({"src/memory.ts"(){"use strict";C();D=class{constructor(e){this.module=e}toPointerArray(e){let t=new Int32Array(e.map((e=>e.value))),r=t.length*t.BYTES_PER_ELEMENT,n=this.module._malloc(r);return new Uint8Array(this.module.HEAPU8.buffer,n,r).set(new Uint8Array(t.buffer)),new E(n,void 0,(e=>this.module._free(e)))}newTypedArray(e,t){let r=new e(new Array(t).fill(0)),n=r.length*r.BYTES_PER_ELEMENT,i=this.module._malloc(n),s=new e(this.module.HEAPU8.buffer,i,t);return s.set(r),new E({typedArray:s,ptr:i},void 0,(e=>this.module._free(e.ptr)))}newMutablePointerArray(e){return this.newTypedArray(Int32Array,e)}newHeapCharPointer(e){let t=this.module.lengthBytesUTF8(e),r=t+1,n=this.module._malloc(r);return this.module.stringToUTF8(e,n,r),new E({ptr:n,strlen:t},void 0,(e=>this.module._free(e.ptr)))}newHeapBufferPointer(e){let t=e.byteLength,r=this.module._malloc(t);return this.module.HEAPU8.set(e,r),new E({pointer:r,numBytes:t},void 0,(e=>this.module._free(e.pointer)))}consumeHeapCharPointer(e){let t=this.module.UTF8ToString(e);return this.module._free(e),t}}}});function intrinsicsToFlags(e){if(!e)return 0;let t=0;for(let[r,n]of Object.entries(e)){if(!(r in H.IntrinsicsFlags))throw new w(r);n&&(t|=H.IntrinsicsFlags[r])}return t}function evalOptionsToFlags(e){if(typeof e=="number")return e;if(e===void 0)return 0;let{type:t,strict:r,strip:n,compileOnly:i,backtraceBarrier:s}=e,u=0;return t==="global"&&(u|=H.EvalFlags.JS_EVAL_TYPE_GLOBAL),t==="module"&&(u|=H.EvalFlags.JS_EVAL_TYPE_MODULE),r&&(u|=H.EvalFlags.JS_EVAL_FLAG_STRICT),n&&(u|=H.EvalFlags.JS_EVAL_FLAG_STRIP),i&&(u|=H.EvalFlags.JS_EVAL_FLAG_COMPILE_ONLY),s&&(u|=H.EvalFlags.JS_EVAL_FLAG_BACKTRACE_BARRIER),u}function getOwnPropertyNamesOptionsToFlags(e){if(typeof e=="number")return e;if(e===void 0)return 0;let{strings:t,symbols:r,quickjsPrivate:n,onlyEnumerable:i,numbers:s,numbersAsStrings:u}=e,o=0;return t&&(o|=H.GetOwnPropertyNamesFlags.JS_GPN_STRING_MASK),r&&(o|=H.GetOwnPropertyNamesFlags.JS_GPN_SYMBOL_MASK),n&&(o|=H.GetOwnPropertyNamesFlags.JS_GPN_PRIVATE_MASK),i&&(o|=H.GetOwnPropertyNamesFlags.JS_GPN_ENUM_ONLY),s&&(o|=H.GetOwnPropertyNamesFlags.QTS_GPN_NUMBER_MASK),u&&(o|=H.GetOwnPropertyNamesFlags.QTS_STANDARD_COMPLIANT_NUMBER),o}function concat(...e){let t=[];for(let r of e)r!==void 0&&(t=t.concat(r));return t}var H,V,B,U=__esm({"src/types.ts"(){"use strict";H=r(725);v();V=Symbol("Unstable"),B=Object.freeze({BaseObjects:!0,Date:!0,Eval:!0,StringNormalize:!0,RegExp:!0,JSON:!0,Proxy:!0,MapSet:!0,TypedArrays:!0,Promise:!0})}});var q,z=__esm({"src/QuickJSIterator.ts"(){"use strict";C();q=class extends x{constructor(e,t){super();this.handle=e;this.context=t;this._isDone=!1;this.owner=t.runtime}[Symbol.iterator](){return this}next(e){if(!this.alive||this._isDone)return{done:!0,value:void 0};let t=this._next??(this._next=this.context.getProp(this.handle,"next"));return this.callIteratorMethod(t,e)}return(e){if(!this.alive)return{done:!0,value:void 0};let t=this.context.getProp(this.handle,"return");if(t===this.context.undefined&&e===void 0)return this.dispose(),{done:!0,value:void 0};let r=this.callIteratorMethod(t,e);return t.dispose(),this.dispose(),r}throw(e){if(!this.alive)return{done:!0,value:void 0};let t=e instanceof E?e:this.context.newError(e),r=this.context.getProp(this.handle,"throw"),n=this.callIteratorMethod(r,e);return t.alive&&t.dispose(),r.dispose(),this.dispose(),n}get alive(){return this.handle.alive}dispose(){this._isDone=!0,this.handle.dispose(),this._next?.dispose()}callIteratorMethod(e,t){let r=t?this.context.callFunction(e,this.handle,t):this.context.callFunction(e,this.handle);if(r.error)return this.dispose(),{value:r};let n=this.context.getProp(r.value,"done").consume((e=>this.context.dump(e))),i=this.context.getProp(r.value,"value");return r.value.dispose(),n&&this.dispose(),{value:L.success(i),done:n}}}}});function getGroupId(e){return e>>8}var W,$,K,Y,Z,X=__esm({"src/host-ref.ts"(){"use strict";v();C();W=-2147483648,$=2147483647,K=0;Y=class{constructor(){this.nextId=W;this.freelist=[];this.groups=new Map}put(e){let t=this.allocateId(),r=getGroupId(t),n=this.groups.get(r);return n||(n=new Map,this.groups.set(r,n)),n.set(t,e),t}get(e){if(e===K)throw new Q("no host reference id defined");let t=getGroupId(e),r=this.groups.get(t);if(!r)throw new Q(`host reference id ${e} is not defined`);let n=r.get(e);if(!n)throw new Q(`host reference id ${e} is not defined`);return n}delete(e){if(e===K)throw new Q("no host reference id defined");let t=getGroupId(e),r=this.groups.get(t);if(!r)throw new Q(`host reference id ${e} is not defined`);r.delete(e),r.size===0&&this.groups.delete(t),this.freelist.push(e)}allocateId(){if(this.freelist.length>0)return this.freelist.shift();if(this.nextId===K&&this.nextId++,this.nextId>$)throw new y(`HostRefMap: too many host refs created without disposing. Max simultaneous host refs: ${$-W}`);return this.nextId++}},Z=class extends x{constructor(e,t,r){if(r===K)throw new Q("cannot create HostRef with undefined id");super();this.runtime=e;this.handle=t;this.id=r}get alive(){return this.handle.alive}dispose(){this.handle.dispose()}get value(){return this.runtime.hostRefs.get(this.id)}}}});var ee,te,re,ne=__esm({"src/context.ts"(){"use strict";ee=r(725);J();v();C();j();U();z();X();te=class extends D{constructor(e){super(e.module);this.scope=new O;this.copyJSValue=e=>this.ffi.QTS_DupValuePointer(this.ctx.value,e);this.freeJSValue=e=>{this.ffi.QTS_FreeValuePointer(this.ctx.value,e)};e.ownedLifetimes?.forEach((e=>this.scope.manage(e))),this.owner=e.owner,this.module=e.module,this.ffi=e.ffi,this.rt=e.rt,this.ctx=this.scope.manage(e.ctx)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}[Symbol.dispose](){return this.dispose()}manage(e){return this.scope.manage(e)}consumeJSCharPointer(e){let t=this.module.UTF8ToString(e);return this.ffi.QTS_FreeCString(this.ctx.value,e),t}heapValueHandle(e,t){let r=t?e=>{t(),this.freeJSValue(e)}:this.freeJSValue;return new E(e,this.copyJSValue,r,this.owner)}staticHeapValueHandle(e){return this.manage(this.heapValueHandle(e)),new R(e,this.owner)}},re=class extends x{constructor(e){super();this._undefined=void 0;this._null=void 0;this._false=void 0;this._true=void 0;this._global=void 0;this._BigInt=void 0;this._Symbol=void 0;this._SymbolIterator=void 0;this._SymbolAsyncIterator=void 0;this.cToHostCallbacks={callFunction:(e,t,r,n,i)=>{if(e!==this.ctx.value)throw new Error("QuickJSContext instance received C -> JS call with mismatched ctx");let s=this.getFunction(i);return O.withScopeMaybeAsync(this,(function*(e,i){let u=i.manage(new N(t,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime)),o=new Array(r);for(let e=0;e<r;e++){let t=this.ffi.QTS_ArgvGetJSValueConstPointer(n,e);o[e]=i.manage(new N(t,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime))}try{let t=yield*e(s.apply(u,o));if(t){if("error"in t&&t.error)throw this.runtime.debugLog("throw error",t.error),t.error;let e=i.manage(t instanceof E?t:t.value);return this.ffi.QTS_DupValuePointer(this.ctx.value,e.value)}return 0}catch(e){return this.errorToHandle(e).consume((e=>this.ffi.QTS_Throw(this.ctx.value,e.value)))}}))}};this.runtime=e.runtime,this.module=e.module,this.ffi=e.ffi,this.rt=e.rt,this.ctx=e.ctx,this.memory=new te({...e,owner:this.runtime}),e.callbacks.setContextCallbacks(this.ctx.value,this.cToHostCallbacks),this.dump=this.dump.bind(this),this.getString=this.getString.bind(this),this.getNumber=this.getNumber.bind(this),this.resolvePromise=this.resolvePromise.bind(this),this.uint32Out=this.memory.manage(this.memory.newTypedArray(Uint32Array,1))}get alive(){return this.memory.alive}dispose(){this.memory.dispose()}get undefined(){if(this._undefined)return this._undefined;let e=this.ffi.QTS_GetUndefined();return this._undefined=new R(e)}get null(){if(this._null)return this._null;let e=this.ffi.QTS_GetNull();return this._null=new R(e)}get true(){if(this._true)return this._true;let e=this.ffi.QTS_GetTrue();return this._true=new R(e)}get false(){if(this._false)return this._false;let e=this.ffi.QTS_GetFalse();return this._false=new R(e)}get global(){if(this._global)return this._global;let e=this.ffi.QTS_GetGlobalObject(this.ctx.value);return this._global=this.memory.staticHeapValueHandle(e),this._global}newNumber(e){return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value,e))}newString(e){let t=this.memory.newHeapCharPointer(e).consume((e=>this.ffi.QTS_NewString(this.ctx.value,e.value.ptr)));return this.memory.heapValueHandle(t)}newUniqueSymbol(e){let t=(typeof e=="symbol"?e.description:e)??"",r=this.memory.newHeapCharPointer(t).consume((e=>this.ffi.QTS_NewSymbol(this.ctx.value,e.value.ptr,0)));return this.memory.heapValueHandle(r)}newSymbolFor(e){let t=(typeof e=="symbol"?e.description:e)??"",r=this.memory.newHeapCharPointer(t).consume((e=>this.ffi.QTS_NewSymbol(this.ctx.value,e.value.ptr,1)));return this.memory.heapValueHandle(r)}getWellKnownSymbol(e){return this._Symbol??(this._Symbol=this.memory.manage(this.getProp(this.global,"Symbol"))),this.getProp(this._Symbol,e)}newBigInt(e){if(!this._BigInt){let e=this.getProp(this.global,"BigInt");this.memory.manage(e),this._BigInt=new R(e.value,this.runtime)}let t=this._BigInt,r=String(e);return this.newString(r).consume((e=>this.unwrapResult(this.callFunction(t,this.undefined,e))))}newObject(e){e&&this.runtime.assertOwned(e);let t=e?this.ffi.QTS_NewObjectProto(this.ctx.value,e.value):this.ffi.QTS_NewObject(this.ctx.value);return this.memory.heapValueHandle(t)}newArray(){let e=this.ffi.QTS_NewArray(this.ctx.value);return this.memory.heapValueHandle(e)}newArrayBuffer(e){let t=new Uint8Array(e),r=this.memory.newHeapBufferPointer(t),n=this.ffi.QTS_NewArrayBuffer(this.ctx.value,r.value.pointer,t.length);return this.memory.heapValueHandle(n)}newPromise(e){let t=O.withScope((e=>{let t=e.manage(this.memory.newMutablePointerArray(2)),r=this.ffi.QTS_NewPromiseCapability(this.ctx.value,t.value.ptr),n=this.memory.heapValueHandle(r),[i,s]=Array.from(t.value.typedArray).map((e=>this.memory.heapValueHandle(e)));return new I({context:this,promiseHandle:n,resolveHandle:i,rejectHandle:s})}));return e&&typeof e=="function"&&(e=new Promise(e)),e&&Promise.resolve(e).then(t.resolve,(e=>e instanceof E?t.reject(e):this.newError(e).consume(t.reject))),t}newFunction(e,t){let r=typeof e=="function"?e:t;if(!r)throw new TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof e=="string"?e:void 0,length:r.length,isConstructor:!1,fn:r})}newConstructorFunction(e,t){let r=typeof e=="function"?e:t;if(!r)throw new TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof e=="string"?e:void 0,length:r.length,isConstructor:!0,fn:r})}newFunctionWithOptions(e){let{name:t,length:r,isConstructor:n,fn:i}=e,s=this.runtime.hostRefs.put(i);try{return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value,t??"",r,n,s))}catch(e){throw this.runtime.hostRefs.delete(s),e}}newError(e){let t=this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));return e&&typeof e=="object"?(e.name!==void 0&&this.newString(e.name).consume((e=>this.setProp(t,"name",e))),e.message!==void 0&&this.newString(e.message).consume((e=>this.setProp(t,"message",e)))):typeof e=="string"?this.newString(e).consume((e=>this.setProp(t,"message",e))):e!==void 0&&this.newString(String(e)).consume((e=>this.setProp(t,"message",e))),t}newHostRef(e){let t=this.runtime.hostRefs.put(e);try{let e=this.memory.heapValueHandle(this.ffi.QTS_NewHostRef(this.ctx.value,t));return new Z(this.runtime,e,t)}catch(e){throw this.runtime.hostRefs.delete(t),e}}toHostRef(e){let t=this.ffi.QTS_GetHostRefId(e.value);if(t!==0)return this.runtime.hostRefs.get(t),new Z(this.runtime,e.dup(),t)}unwrapHostRef(e){let t=this.ffi.QTS_GetHostRefId(e.value);if(t===0)throw new Q("handle is not a HostRef");return this.runtime.hostRefs.get(t)}typeof(e){return this.runtime.assertOwned(e),this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value,e.value))}getNumber(e){return this.runtime.assertOwned(e),this.ffi.QTS_GetFloat64(this.ctx.value,e.value)}getString(e){return this.runtime.assertOwned(e),this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value,e.value))}getSymbol(e){this.runtime.assertOwned(e);let t=this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value,e.value));return this.ffi.QTS_IsGlobalSymbol(this.ctx.value,e.value)?Symbol.for(t):Symbol(t)}getBigInt(e){this.runtime.assertOwned(e);let t=this.getString(e);return BigInt(t)}getArrayBuffer(e){this.runtime.assertOwned(e);let t=this.ffi.QTS_GetArrayBufferLength(this.ctx.value,e.value),r=this.ffi.QTS_GetArrayBuffer(this.ctx.value,e.value);if(!r)throw new Error("Couldn't allocate memory to get ArrayBuffer");return new E(this.module.HEAPU8.subarray(r,r+t),void 0,(()=>this.module._free(r)))}getPromiseState(e){this.runtime.assertOwned(e);let t=this.ffi.QTS_PromiseState(this.ctx.value,e.value);if(t<0)return{type:"fulfilled",value:e,notAPromise:!0};if(t===ee.JSPromiseStateEnum.Pending)return{type:"pending",get error(){return new f("Cannot unwrap a pending promise")}};let r=this.ffi.QTS_PromiseResult(this.ctx.value,e.value),n=this.memory.heapValueHandle(r);if(t===ee.JSPromiseStateEnum.Fulfilled)return{type:"fulfilled",value:n};if(t===ee.JSPromiseStateEnum.Rejected)return{type:"rejected",error:n};throw n.dispose(),new Error(`Unknown JSPromiseStateEnum: ${t}`)}resolvePromise(e){this.runtime.assertOwned(e);let t=O.withScope((t=>{let r=t.manage(this.getProp(this.global,"Promise")),n=t.manage(this.getProp(r,"resolve"));return this.callFunction(n,r,e)}));return t.error?Promise.resolve(t):new Promise((e=>{O.withScope((r=>{let n=r.manage(this.newFunction("resolve",(t=>{e(this.success(t&&t.dup()))}))),i=r.manage(this.newFunction("reject",(t=>{e(this.fail(t&&t.dup()))}))),s=r.manage(t.value),u=r.manage(this.getProp(s,"then"));this.callFunction(u,s,n,i).unwrap().dispose()}))}))}isEqual(e,t,r=ee.IsEqualOp.IsStrictlyEqual){if(e===t)return!0;this.runtime.assertOwned(e),this.runtime.assertOwned(t);let n=this.ffi.QTS_IsEqual(this.ctx.value,e.value,t.value,r);if(n===-1)throw new b("WASM variant does not expose equality");return!!n}eq(e,t){return this.isEqual(e,t,ee.IsEqualOp.IsStrictlyEqual)}sameValue(e,t){return this.isEqual(e,t,ee.IsEqualOp.IsSameValue)}sameValueZero(e,t){return this.isEqual(e,t,ee.IsEqualOp.IsSameValueZero)}getProp(e,t){this.runtime.assertOwned(e);let r;return typeof t=="number"&&t>=0?r=this.ffi.QTS_GetPropNumber(this.ctx.value,e.value,t):r=this.borrowPropertyKey(t).consume((t=>this.ffi.QTS_GetProp(this.ctx.value,e.value,t.value))),this.memory.heapValueHandle(r)}getLength(e){if(this.runtime.assertOwned(e),!(this.ffi.QTS_GetLength(this.ctx.value,this.uint32Out.value.ptr,e.value)<0))return this.uint32Out.value.typedArray[0]}getOwnPropertyNames(e,t={strings:!0,numbersAsStrings:!0}){this.runtime.assertOwned(e),e.value;let r=getOwnPropertyNamesOptionsToFlags(t);if(r===0)throw new T("No options set, will return an empty array");return O.withScope((t=>{let n=t.manage(this.memory.newMutablePointerArray(1)),i=this.ffi.QTS_GetOwnPropertyNames(this.ctx.value,n.value.ptr,this.uint32Out.value.ptr,e.value,r);if(i)return this.fail(this.memory.heapValueHandle(i));let s=this.uint32Out.value.typedArray[0],u=n.value.typedArray[0],o=new Uint32Array(this.module.HEAP8.buffer,u,s),a=Array.from(o).map((e=>this.memory.heapValueHandle(e)));return this.ffi.QTS_FreeVoidPointer(this.ctx.value,u),this.success(createDisposableArray(a))}))}getIterator(e){let t=this._SymbolIterator??(this._SymbolIterator=this.memory.manage(this.getWellKnownSymbol("iterator")));return O.withScope((r=>{let n=r.manage(this.getProp(e,t)),i=this.callFunction(n,e);return i.error?i:this.success(new q(i.value,this))}))}setProp(e,t,r){this.runtime.assertOwned(e),this.borrowPropertyKey(t).consume((t=>this.ffi.QTS_SetProp(this.ctx.value,e.value,t.value,r.value)))}defineProp(e,t,r){this.runtime.assertOwned(e),O.withScope((n=>{let i=n.manage(this.borrowPropertyKey(t)),s=r.value||this.undefined,u=!!r.configurable,o=!!r.enumerable,a=!!r.value,l=r.get?n.manage(this.newFunction(r.get.name,r.get)):this.undefined,m=r.set?n.manage(this.newFunction(r.set.name,r.set)):this.undefined;this.ffi.QTS_DefineProp(this.ctx.value,e.value,i.value,s.value,l.value,m.value,u,o,a)}))}callFunction(e,t,...r){this.runtime.assertOwned(e);let n,i=r[0];i===void 0||Array.isArray(i)?n=i??[]:n=r;let s=this.memory.toPointerArray(n).consume((r=>this.ffi.QTS_Call(this.ctx.value,e.value,t.value,n.length,r.value))),u=this.ffi.QTS_ResolveException(this.ctx.value,s);return u?(this.ffi.QTS_FreeValuePointer(this.ctx.value,s),this.fail(this.memory.heapValueHandle(u))):this.success(this.memory.heapValueHandle(s))}callMethod(e,t,r=[]){return this.getProp(e,t).consume((t=>this.callFunction(t,e,r)))}evalCode(e,t="eval.js",r){let n=r===void 0?1:0,i=evalOptionsToFlags(r),s=this.memory.newHeapCharPointer(e).consume((e=>this.ffi.QTS_Eval(this.ctx.value,e.value.ptr,e.value.strlen,t,n,i))),u=this.ffi.QTS_ResolveException(this.ctx.value,s);return u?(this.ffi.QTS_FreeValuePointer(this.ctx.value,s),this.fail(this.memory.heapValueHandle(u))):this.success(this.memory.heapValueHandle(s))}throw(e){return this.errorToHandle(e).consume((e=>this.ffi.QTS_Throw(this.ctx.value,e.value)))}borrowPropertyKey(e){return typeof e=="number"?this.newNumber(e):typeof e=="string"?this.newString(e):new R(e.value,this.runtime)}getMemory(e){if(e===this.rt.value)return this.memory;throw new Error("Private API. Cannot get memory from a different runtime")}dump(e){this.runtime.assertOwned(e);let t=this.typeof(e);if(t==="string")return this.getString(e);if(t==="number")return this.getNumber(e);if(t==="bigint")return this.getBigInt(e);if(t==="undefined")return;if(t==="symbol")return this.getSymbol(e);let r=this.getPromiseState(e);if(r.type==="fulfilled"&&!r.notAPromise)return e.dispose(),{type:r.type,value:r.value.consume(this.dump)};if(r.type==="pending")return e.dispose(),{type:r.type};if(r.type==="rejected")return e.dispose(),{type:r.type,error:r.error.consume(this.dump)};let n=this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value,e.value));try{return JSON.parse(n)}catch{return n}}unwrapResult(e){if(e.error){let t="context"in e.error?e.error.context:this,r=e.error.consume((e=>this.dump(e)));if(r&&typeof r=="object"&&typeof r.message=="string"){let{message:e,name:n,stack:i,...s}=r,u=new m(r,t);typeof n=="string"&&(u.name=r.name),u.message=e;let o=u.stack;throw typeof i=="string"&&(u.stack=`${n}: ${e}\n${r.stack}Host: ${o}`),Object.assign(u,s),u}throw new m(r)}return e.value}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { ctx: ${this.ctx.value} rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getFunction(e){let t=this.runtime.hostRefs.get(e);if(typeof t!="function")throw new Error(`Host reference ${e} is not a function`);return t}errorToHandle(e){return e instanceof E?e:this.newError(e)}encodeBinaryJSON(e){let t=this.ffi.QTS_bjson_encode(this.ctx.value,e.value);return this.memory.heapValueHandle(t)}decodeBinaryJSON(e){let t=this.ffi.QTS_bjson_decode(this.ctx.value,e.value);return this.memory.heapValueHandle(t)}success(e){return L.success(e)}fail(e){return L.fail(e,(e=>this.unwrapResult(e)))}}}});var ie,se=__esm({"src/runtime.ts"(){"use strict";P();ne();a();v();C();j();U();X();ie=class extends x{constructor(e){super();this.scope=new O;this.contextMap=new Map;this.hostRefs=new Y;this._debugMode=!1;this.cToHostCallbacks={freeHostRef:(e,t)=>{if(e!==this.rt.value)throw new Error("Runtime pointer mismatch");this.hostRefs.delete(t)},shouldInterrupt:e=>{if(e!==this.rt.value)throw new Error("QuickJSContext instance received C -> JS interrupt with mismatched rt");let t=this.interruptHandler;if(!t)throw new Error("QuickJSContext had no interrupt handler");return t(this)?1:0},loadModuleSource:maybeAsyncFn(this,(function*(e,t,r,n){let i=this.moduleLoader;if(!i)throw new Error("Runtime has no module loader");if(t!==this.rt.value)throw new Error("Runtime pointer mismatch");let s=this.contextMap.get(r)??this.newContext({contextPointer:r});try{let t=yield*e(i(n,s));if(typeof t=="object"&&"error"in t&&t.error)throw this.debugLog("cToHostLoadModule: loader returned error",t.error),t.error;let r=typeof t=="string"?t:"value"in t?t.value:t;return this.memory.newHeapCharPointer(r).value.ptr}catch(e){return this.debugLog("cToHostLoadModule: caught error",e),s.throw(e),0}})),normalizeModule:maybeAsyncFn(this,(function*(e,t,r,n,i){let s=this.moduleNormalizer;if(!s)throw new Error("Runtime has no module normalizer");if(t!==this.rt.value)throw new Error("Runtime pointer mismatch");let u=this.contextMap.get(r)??this.newContext({contextPointer:r});try{let t=yield*e(s(n,i,u));if(typeof t=="object"&&"error"in t&&t.error)throw this.debugLog("cToHostNormalizeModule: normalizer returned error",t.error),t.error;let r=typeof t=="string"?t:t.value;return u.getMemory(this.rt.value).newHeapCharPointer(r).value.ptr}catch(e){return this.debugLog("normalizeModule: caught error",e),u.throw(e),0}}))};e.ownedLifetimes?.forEach((e=>this.scope.manage(e))),this.module=e.module,this.memory=new D(this.module),this.ffi=e.ffi,this.rt=e.rt,this.callbacks=e.callbacks,this.scope.manage(this.rt),this.callbacks.setRuntimeCallbacks(this.rt.value,this.cToHostCallbacks),this.executePendingJobs=this.executePendingJobs.bind(this),o&&this.setDebugMode(!0)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}newContext(e={}){let t=intrinsicsToFlags(e.intrinsics),r=new E(e.contextPointer||this.ffi.QTS_NewContext(this.rt.value,t),void 0,(e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)})),n=new re({module:this.module,ctx:r,ffi:this.ffi,rt:this.rt,ownedLifetimes:e.ownedLifetimes,runtime:this,callbacks:this.callbacks});return this.contextMap.set(r.value,n),n}setModuleLoader(e,t){this.moduleLoader=e,this.moduleNormalizer=t,this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value,this.moduleNormalizer?1:0)}removeModuleLoader(){this.moduleLoader=void 0,this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value)}hasPendingJob(){return!!this.ffi.QTS_IsJobPending(this.rt.value)}setInterruptHandler(e){let t=this.interruptHandler;this.interruptHandler=e,t||this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value)}removeInterruptHandler(){this.interruptHandler&&(this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value),this.interruptHandler=void 0)}executePendingJobs(e=-1){let t=this.memory.newMutablePointerArray(1),r=this.ffi.QTS_ExecutePendingJob(this.rt.value,e??-1,t.value.ptr),n=t.value.typedArray[0];if(t.dispose(),n===0)return this.ffi.QTS_FreeValuePointerRuntime(this.rt.value,r),L.success(0);let i=this.contextMap.get(n)??this.newContext({contextPointer:n}),s=i.getMemory(this.rt.value).heapValueHandle(r);if(i.typeof(s)==="number"){let e=i.getNumber(s);return s.dispose(),L.success(e)}else{let e=Object.assign(s,{context:i});return L.fail(e,(e=>i.unwrapResult(e)))}}setMemoryLimit(e){if(e<0&&e!==-1)throw new Error("Cannot set memory limit to negative number. To unset, pass -1");this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value,e)}computeMemoryUsage(){let e=this.getSystemContext().getMemory(this.rt.value);return e.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value,e.ctx.value))}dumpMemoryUsage(){return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value))}setMaxStackSize(e){if(e<0)throw new Error("Cannot set memory limit to negative number. To unset, pass 0.");this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value,e)}assertOwned(e){if(e.owner&&e.owner.rt!==this.rt)throw new h(`Handle is not owned by this runtime: ${e.owner.rt.value} != ${this.rt.value}`)}setDebugMode(e){this._debugMode=e,this.ffi.DEBUG&&this.rt.alive&&this.ffi.QTS_SetDebugLogEnabled(this.rt.value,e?1:0)}isDebugMode(){return this._debugMode}debugLog(...e){this._debugMode&&console.log("quickjs-emscripten:",...e)}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getSystemContext(){return this.context||(this.context=this.scope.manage(this.newContext())),this.context}}}});var ue={};__export(ue,{QuickJSModuleCallbacks:()=>ae,QuickJSWASMModule:()=>le,applyBaseRuntimeOptions:()=>applyBaseRuntimeOptions,applyModuleEvalRuntimeOptions:()=>applyModuleEvalRuntimeOptions});function applyBaseRuntimeOptions(e,t){t.interruptHandler&&e.setInterruptHandler(t.interruptHandler),t.maxStackSizeBytes!==void 0&&e.setMaxStackSize(t.maxStackSizeBytes),t.memoryLimitBytes!==void 0&&e.setMemoryLimit(t.memoryLimitBytes)}function applyModuleEvalRuntimeOptions(e,t){t.moduleLoader&&e.setModuleLoader(t.moduleLoader),t.shouldInterrupt&&e.setInterruptHandler(t.shouldInterrupt),t.memoryLimitBytes!==void 0&&e.setMemoryLimit(t.memoryLimitBytes),t.maxStackSizeBytes!==void 0&&e.setMaxStackSize(t.maxStackSizeBytes)}var oe,ae,le,me=__esm({"src/module.ts"(){"use strict";a();v();C();se();U();oe=class{constructor(e){this.freeHostRef=e.freeHostRef,this.callFunction=e.callFunction,this.shouldInterrupt=e.shouldInterrupt,this.loadModuleSource=e.loadModuleSource,this.normalizeModule=e.normalizeModule}},ae=class{constructor(e){this.contextCallbacks=new Map;this.runtimeCallbacks=new Map;this.suspendedCount=0;this.cToHostCallbacks=new oe({freeHostRef:(e,t,r)=>{let n=this.runtimeCallbacks.get(t);if(!n)throw new Error(`QuickJSRuntime(rt = ${t}) not found when trying to free HostRef(id = ${r})`);n.freeHostRef(t,r)},callFunction:(e,t,r,n,i,s)=>this.handleAsyncify(e,(()=>{try{let e=this.contextCallbacks.get(t);if(!e)throw new Error(`QuickJSContext(ctx = ${t}) not found for C function call "${s}"`);return e.callFunction(t,r,n,i,s)}catch(e){return console.error("[C to host error: returning null]",e),0}})),shouldInterrupt:(e,t)=>this.handleAsyncify(e,(()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw new Error(`QuickJSRuntime(rt = ${t}) not found for C interrupt`);return e.shouldInterrupt(t)}catch(e){return console.error("[C to host interrupt: returning error]",e),1}})),loadModuleSource:(e,t,r,n)=>this.handleAsyncify(e,(()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw new Error(`QuickJSRuntime(rt = ${t}) not found for C module loader`);let i=e.loadModuleSource;if(!i)throw new Error(`QuickJSRuntime(rt = ${t}) does not support module loading`);return i(t,r,n)}catch(e){return console.error("[C to host module loader error: returning null]",e),0}})),normalizeModule:(e,t,r,n,i)=>this.handleAsyncify(e,(()=>{try{let e=this.runtimeCallbacks.get(t);if(!e)throw new Error(`QuickJSRuntime(rt = ${t}) not found for C module loader`);let s=e.normalizeModule;if(!s)throw new Error(`QuickJSRuntime(rt = ${t}) does not support module loading`);return s(t,r,n,i)}catch(e){return console.error("[C to host module loader error: returning null]",e),0}}))});this.module=e,this.module.callbacks=this.cToHostCallbacks}setRuntimeCallbacks(e,t){this.runtimeCallbacks.set(e,t)}deleteRuntime(e){this.runtimeCallbacks.delete(e)}setContextCallbacks(e,t){this.contextCallbacks.set(e,t)}deleteContext(e){this.contextCallbacks.delete(e)}handleAsyncify(e,t){if(e)return e.handleSleep((e=>{try{let r=t();if(!(r instanceof Promise)){debugLog("asyncify.handleSleep: not suspending:",r),e(r);return}if(this.suspended)throw new d(`Already suspended at: ${this.suspended.stack}\nAttempted to suspend at:`);this.suspended=new p(`(${this.suspendedCount++})`),debugLog("asyncify.handleSleep: suspending:",this.suspended),r.then((t=>{this.suspended=void 0,debugLog("asyncify.handleSleep: resolved:",t),e(t)}),(e=>{debugLog("asyncify.handleSleep: rejected:",e),console.error("QuickJS: cannot handle error in suspended function",e),this.suspended=void 0}))}catch(e){throw debugLog("asyncify.handleSleep: error:",e),this.suspended=void 0,e}}));let r=t();if(r instanceof Promise)throw new Error("Promise return value not supported in non-asyncify context.");return r}};le=class{constructor(e,t){this.module=e,this.ffi=t,this.callbacks=new ae(e)}newRuntime(e={}){let t=new E(this.ffi.QTS_NewRuntime(),void 0,(e=>{this.ffi.QTS_FreeRuntime(e),this.callbacks.deleteRuntime(e)})),r=new ie({module:this.module,callbacks:this.callbacks,ffi:this.ffi,rt:t});return applyBaseRuntimeOptions(r,e),e.moduleLoader&&r.setModuleLoader(e.moduleLoader),r}newContext(e={}){let t=this.newRuntime(),r=t.newContext({...e,ownedLifetimes:concat(t,e.ownedLifetimes)});return t.context=r,r}evalCode(e,t={}){return O.withScope((r=>{let n=r.manage(this.newContext());applyModuleEvalRuntimeOptions(n.runtime,t);let i=n.evalCode(e,"eval.js");if(t.memoryLimitBytes!==void 0&&n.runtime.setMemoryLimit(-1),i.error)throw n.dump(r.manage(i.error));return n.dump(r.manage(i.value))}))}getWasmMemory(){let e=this.module.quickjsEmscriptenInit?.((()=>{}))?.getWasmMemory?.();if(!e)throw new Error("Variant does not support getting WebAssembly.Memory");return e}getFFI(){return this.ffi}}}});var he,ce=__esm({"src/context-asyncify.ts"(){"use strict";ne();U();he=class extends re{async evalCodeAsync(e,t="eval.js",r){let n=r===void 0?1:0,i=evalOptionsToFlags(r),s=0;try{s=await this.memory.newHeapCharPointer(e).consume((e=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,e.value.ptr,e.value.strlen,t,n,i)))}catch(e){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",e),e}let u=this.ffi.QTS_ResolveException(this.ctx.value,s);return u?(this.ffi.QTS_FreeValuePointer(this.ctx.value,s),this.fail(this.memory.heapValueHandle(u))):this.success(this.memory.heapValueHandle(s))}newAsyncifiedFunction(e,t){return this.newFunction(e,t)}}}});var be,de=__esm({"src/runtime-asyncify.ts"(){"use strict";ce();se();U();C();be=class extends ie{constructor(e){super(e)}newContext(e={}){let t=intrinsicsToFlags(e.intrinsics),r=new E(this.ffi.QTS_NewContext(this.rt.value,t),void 0,(e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)})),n=new he({module:this.module,ctx:r,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(r.value,n),n}setModuleLoader(e,t){super.setModuleLoader(e,t)}setMaxStackSize(e){return super.setMaxStackSize(e)}}}});var pe={};__export(pe,{QuickJSAsyncWASMModule:()=>Se});var Se,_e=__esm({"src/module-asyncify.ts"(){"use strict";v();C();me();de();Se=class extends le{constructor(e,t){super(e,t);this.ffi=t,this.module=e}newRuntime(e={}){let t=new E(this.ffi.QTS_NewRuntime(),void 0,(e=>{this.callbacks.deleteRuntime(e),this.ffi.QTS_FreeRuntime(e)})),r=new be({module:this.module,ffi:this.ffi,rt:t,callbacks:this.callbacks});return applyBaseRuntimeOptions(r,e),e.moduleLoader&&r.setModuleLoader(e.moduleLoader),r}newContext(e={}){let t=this.newRuntime(),r=e.ownedLifetimes?e.ownedLifetimes.concat([t]):[t],n=t.newContext({...e,ownedLifetimes:r});return t.context=n,n}evalCode(){throw new b("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(e,t){return O.withScopeAsync((async r=>{let n=r.manage(this.newContext());applyModuleEvalRuntimeOptions(n.runtime,t);let i=await n.evalCodeAsync(e,"eval.js");if(t.memoryLimitBytes!==void 0&&n.runtime.setMemoryLimit(-1),i.error)throw n.dump(r.manage(i.error));return n.dump(r.manage(i.value))}))}}}});var we={};__export(we,{DefaultIntrinsics:()=>B,DisposableFail:()=>k,DisposableResult:()=>L,DisposableSuccess:()=>F,Lifetime:()=>E,QuickJSAsyncContext:()=>he,QuickJSAsyncRuntime:()=>be,QuickJSAsyncWASMModule:()=>Se,QuickJSContext:()=>re,QuickJSDeferredPromise:()=>I,QuickJSRuntime:()=>ie,QuickJSWASMModule:()=>le,Scope:()=>O,StaticLifetime:()=>R,TestQuickJSWASMModule:()=>fe,UsingDisposable:()=>x,WeakLifetime:()=>N,createDisposableArray:()=>createDisposableArray,debugLog:()=>debugLog,errors:()=>l,isFail:()=>isFail,isSuccess:()=>isSuccess,memoizePromiseFactory:()=>memoizePromiseFactory,newQuickJSAsyncWASMModuleFromVariant:()=>newQuickJSAsyncWASMModuleFromVariant,newQuickJSWASMModuleFromVariant:()=>newQuickJSWASMModuleFromVariant,newVariant:()=>newVariant,setDebugMode:()=>setDebugMode,shouldInterruptAfterDeadline:()=>shouldInterruptAfterDeadline});e.exports=__toCommonJS(we);__reExport(we,r(725),e.exports);me();ne();se();_e();de();ce();v();a();async function newQuickJSWASMModuleFromVariant(e){let t=smartUnwrap(await e),[r,n,{QuickJSWASMModule:i}]=await Promise.all([t.importModuleLoader().then(smartUnwrap),t.importFFI(),Promise.resolve().then((()=>(me(),ue))).then(smartUnwrap)]),s=await r();s.type="sync";let u=new n(s);return new i(s,u)}async function newQuickJSAsyncWASMModuleFromVariant(e){let t=smartUnwrap(await e),[r,n,{QuickJSAsyncWASMModule:i}]=await Promise.all([t.importModuleLoader().then(smartUnwrap),t.importFFI(),Promise.resolve().then((()=>(_e(),pe))).then(smartUnwrap)]),s=await r();s.type="async";let u=new n(s);return new i(s,u)}function memoizePromiseFactory(e){let t;return()=>t??(t=e())}function smartUnwrap(e){return e&&"default"in e&&e.default?e.default&&"default"in e.default&&e.default.default?e.default.default:e.default:e}function newVariant(e,t){return{...e,async importModuleLoader(){let r=smartUnwrap(await e.importModuleLoader());return async function(){let e=t.emscriptenModule?{...t.emscriptenModule}:{},n=t.log??((...e)=>debugLog("newVariant moduleLoader:",...e)),tapValue=(e,t)=>(n(...e,t),t),force=e=>typeof e=="function"?e():e;(t.wasmLocation||t.wasmSourceMapLocation||t.locateFile)&&(e.locateFile=(e,r)=>{let n={fileName:e,relativeTo:r};if(e.endsWith(".wasm")&&t.wasmLocation!==void 0)return tapValue(["locateFile .wasm: provide wasmLocation",n],t.wasmLocation);if(e.endsWith(".map")){if(t.wasmSourceMapLocation!==void 0)return tapValue(["locateFile .map: provide wasmSourceMapLocation",n],t.wasmSourceMapLocation);if(t.wasmLocation&&!t.locateFile)return tapValue(["locateFile .map: infer from wasmLocation",n],t.wasmLocation+".map")}return t.locateFile?tapValue(["locateFile: use provided fn",n],t.locateFile(e,r)):tapValue(["locateFile: unhandled, passthrough",n],e)}),t.wasmBinary&&(e.wasmBinary=await force(t.wasmBinary)),t.wasmMemory&&(e.wasmMemory=await force(t.wasmMemory));let i=t.wasmModule,s;i&&(e.instantiateWasm=async(e,t)=>{s??(s=Promise.resolve(force(i)));let r=await s;if(!r)throw new _(`options.wasmModule returned ${String(r)}`);let n=await WebAssembly.instantiate(r,e);return t(n),n.exports}),e.monitorRunDependencies=e=>{n("monitorRunDependencies:",e)},e.quickjsEmscriptenInit=()=>newMockExtensions(n);let u=r(e),o=e.quickjsEmscriptenInit?.(n);if(i&&o?.receiveWasmOffsetConverter&&!o.existingWasmOffsetConverter){let e=await force(t.wasmBinary)??new ArrayBuffer(0);s??(s=Promise.resolve(force(i)));let r=await s;if(!r)throw new _(`options.wasmModule returned ${String(r)}`);o.receiveWasmOffsetConverter(e,r)}if(o?.receiveSourceMapJSON){let e=await force(t.wasmSourceMapData);typeof e=="string"?o.receiveSourceMapJSON(JSON.parse(e)):e?o.receiveSourceMapJSON(e):o.receiveSourceMapJSON({version:3,names:[],sources:[],mappings:""})}return u}}}}function newMockExtensions(e){let t="mock called, emscripten module may not be initialized yet";return{mock:!0,removeRunDependency(r){e(`${t}: removeRunDependency called:`,r)},receiveSourceMapJSON(r){e(`${t}: receiveSourceMapJSON called:`,r)},WasmOffsetConverter:void 0,receiveWasmOffsetConverter(r,n){e(`${t}: receiveWasmOffsetConverter called:`,r,n)}}}function isSuccess(e){return!("error"in e)}function isFail(e){return"error"in e}C();function shouldInterruptAfterDeadline(e){let t=typeof e=="number"?e:e.getTime();return function(){return Date.now()>t}}v();J();v();C();var fe=class{constructor(e){this.parent=e;this.contexts=new Set;this.runtimes=new Set}newRuntime(e){let t=this.parent.newRuntime({...e,ownedLifetimes:[new E(void 0,void 0,(()=>this.runtimes.delete(t))),...e?.ownedLifetimes??[]]});return this.runtimes.add(t),t}newContext(e){let t=this.parent.newContext({...e,ownedLifetimes:[new E(void 0,void 0,(()=>this.contexts.delete(t))),...e?.ownedLifetimes??[]]});return this.contexts.add(t),t}evalCode(e,t){return this.parent.evalCode(e,t)}disposeAll(){let e=[...this.contexts,...this.runtimes];this.runtimes.clear(),this.contexts.clear(),e.forEach((e=>{e.alive&&e.dispose()}))}assertNoMemoryAllocated(){if(this.getFFI().QTS_RecoverableLeakCheck())throw new S("Leak sanitizer detected un-freed memory");if(this.contexts.size>0)throw new S(`${this.contexts.size} contexts leaked`);if(this.runtimes.size>0)throw new S(`${this.runtimes.size} runtimes leaked`)}getWasmMemory(){return this.parent.getWasmMemory()}getFFI(){return this.parent.getFFI()}};U();a();0&&0},927:(e,t,r)=>{var n=Object.create;var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var __export=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!a.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e},__reExport=(e,t,r)=>(__copyProps(e,t,"default"),r&&__copyProps(r,t,"default")),__toESM=(e,t,r)=>(r=e!=null?n(o(e)):{},__copyProps(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(i({},"__esModule",{value:!0}),e);var l={};__export(l,{DEBUG_ASYNC:()=>b.default,DEBUG_SYNC:()=>h.default,RELEASE_ASYNC:()=>d.default,RELEASE_SYNC:()=>c.default,getQuickJS:()=>getQuickJS,getQuickJSSync:()=>getQuickJSSync,newAsyncContext:()=>newAsyncContext,newAsyncRuntime:()=>newAsyncRuntime,newQuickJSAsyncWASMModule:()=>newQuickJSAsyncWASMModule,newQuickJSWASMModule:()=>newQuickJSWASMModule});e.exports=__toCommonJS(l);__reExport(l,r(792),e.exports);var m=r(792),h=__toESM(r(93)),c=__toESM(r(8)),b=__toESM(r(765)),d=__toESM(r(287));async function newQuickJSWASMModule(e=c.default){return(0,m.newQuickJSWASMModuleFromVariant)(e)}async function newQuickJSAsyncWASMModule(e=d.default){return(0,m.newQuickJSAsyncWASMModuleFromVariant)(e)}var p,S;async function getQuickJS(){return S??(S=newQuickJSWASMModule().then((e=>(p=e,e)))),await S}function getQuickJSSync(){if(!p)throw new Error("QuickJS not initialized. Await getQuickJS() at least once.");return p}async function newAsyncRuntime(e){return(await newQuickJSAsyncWASMModule()).newRuntime(e)}async function newAsyncContext(e){return(await newQuickJSAsyncWASMModule()).newContext(e)}0&&0}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}__nccwpck_require__.m=e;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var i=Object.create(null);__nccwpck_require__.r(i);var s={};t=t||[null,e({}),e([]),e(e)];for(var u=n&2&&r;typeof u=="object"&&!~t.indexOf(u);u=e(u)){Object.getOwnPropertyNames(u).forEach((e=>s[e]=()=>r[e]))}s["default"]=()=>r;__nccwpck_require__.d(i,s);return i}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.p=""})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{__nccwpck_require__.b=require("url").pathToFileURL(__filename);var e={179:1};var installChunk=t=>{var r=t.modules,n=t.ids,i=t.runtime;for(var s in r){if(__nccwpck_require__.o(r,s)){__nccwpck_require__.m[s]=r[s]}}if(i)i(__nccwpck_require__);for(var u=0;u<n.length;u++)e[n[u]]=1};__nccwpck_require__.f.require=(t,r)=>{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var r=__nccwpck_require__(927);module.exports=r})();
|
|
1
|
+
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{DEBUG_ASYNC:()=>import_quickjs_wasmfile_debug_asyncify.default,DEBUG_SYNC:()=>import_quickjs_wasmfile_debug_sync.default,RELEASE_ASYNC:()=>import_quickjs_wasmfile_release_asyncify.default,RELEASE_SYNC:()=>import_quickjs_wasmfile_release_sync.default,getQuickJS:()=>getQuickJS,getQuickJSSync:()=>getQuickJSSync,newAsyncContext:()=>newAsyncContext,newAsyncRuntime:()=>newAsyncRuntime,newQuickJSAsyncWASMModule:()=>newQuickJSAsyncWASMModule,newQuickJSWASMModule:()=>newQuickJSWASMModule});module.exports=__toCommonJS(src_exports);__reExport(src_exports,require("quickjs-emscripten-core"),module.exports);var import_quickjs_emscripten_core=require("quickjs-emscripten-core"),import_quickjs_wasmfile_debug_sync=__toESM(require("@jitl/quickjs-wasmfile-debug-sync")),import_quickjs_wasmfile_release_sync=__toESM(require("@jitl/quickjs-wasmfile-release-sync")),import_quickjs_wasmfile_debug_asyncify=__toESM(require("@jitl/quickjs-wasmfile-debug-asyncify")),import_quickjs_wasmfile_release_asyncify=__toESM(require("@jitl/quickjs-wasmfile-release-asyncify"));async function newQuickJSWASMModule(variantOrPromise=import_quickjs_wasmfile_release_sync.default){return(0,import_quickjs_emscripten_core.newQuickJSWASMModuleFromVariant)(variantOrPromise)}async function newQuickJSAsyncWASMModule(variantOrPromise=import_quickjs_wasmfile_release_asyncify.default){return(0,import_quickjs_emscripten_core.newQuickJSAsyncWASMModuleFromVariant)(variantOrPromise)}var singleton,singletonPromise;async function getQuickJS(){return singletonPromise??(singletonPromise=newQuickJSWASMModule().then(instance=>(singleton=instance,instance))),await singletonPromise}function getQuickJSSync(){if(!singleton)throw new Error("QuickJS not initialized. Await getQuickJS() at least once.");return singleton}async function newAsyncRuntime(options){return(await newQuickJSAsyncWASMModule()).newRuntime(options)}async function newAsyncContext(options){return(await newQuickJSAsyncWASMModule()).newContext(options)}0&&(module.exports={DEBUG_ASYNC,DEBUG_SYNC,RELEASE_ASYNC,RELEASE_SYNC,getQuickJS,getQuickJSSync,newAsyncContext,newAsyncRuntime,newQuickJSAsyncWASMModule,newQuickJSWASMModule,...require("quickjs-emscripten-core")});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/variants.ts","../src/mod.ts"],"sourcesContent":["export * from \"quickjs-emscripten-core\"\nexport * from \"#variants\"\nexport * from \"./mod.js\"\n","import type {\n QuickJSSyncVariant,\n QuickJSAsyncVariant,\n QuickJSWASMModule,\n QuickJSAsyncWASMModule,\n PromisedDefault,\n} from \"quickjs-emscripten-core\"\nimport {\n newQuickJSWASMModuleFromVariant,\n newQuickJSAsyncWASMModuleFromVariant,\n} from \"quickjs-emscripten-core\"\nimport DEBUG_SYNC from \"@jitl/quickjs-wasmfile-debug-sync\"\nimport RELEASE_SYNC from \"@jitl/quickjs-wasmfile-release-sync\"\nimport DEBUG_ASYNC from \"@jitl/quickjs-wasmfile-debug-asyncify\"\nimport RELEASE_ASYNC from \"@jitl/quickjs-wasmfile-release-asyncify\"\n\n/**\n * Create a new, completely isolated WebAssembly module containing the QuickJS library.\n * See the documentation on {@link QuickJSWASMModule}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSWASMModule(\n /**\n * Optionally, pass a {@link QuickJSSyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSSyncVariant> = RELEASE_SYNC,\n): Promise<QuickJSWASMModule> {\n return newQuickJSWASMModuleFromVariant(variantOrPromise)\n}\n\n/**\n * Create a new, completely isolated WebAssembly module containing a version of the QuickJS library\n * compiled with Emscripten's [ASYNCIFY](https://emscripten.org/docs/porting/asyncify.html) transform.\n *\n * This version of the library offers features that enable synchronous code\n * inside the VM to interact with asynchronous code in the host environment.\n * See the documentation on {@link QuickJSAsyncWASMModule}, {@link QuickJSAsyncRuntime},\n * and {@link QuickJSAsyncContext}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSAsyncWASMModule(\n /**\n * Optionally, pass a {@link QuickJSAsyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSAsyncVariant> = RELEASE_ASYNC,\n): Promise<QuickJSAsyncWASMModule> {\n return newQuickJSAsyncWASMModuleFromVariant(variantOrPromise)\n}\n\nexport { DEBUG_SYNC, RELEASE_SYNC, DEBUG_ASYNC, RELEASE_ASYNC }\n","import type {\n AsyncRuntimeOptions,\n ContextOptions,\n QuickJSAsyncContext,\n QuickJSAsyncRuntime,\n QuickJSWASMModule,\n} from \"quickjs-emscripten-core\"\nimport { newQuickJSAsyncWASMModule, newQuickJSWASMModule } from \"#variants\"\n\nlet singleton: QuickJSWASMModule | undefined = undefined\nlet singletonPromise: Promise<QuickJSWASMModule> | undefined = undefined\n\n/**\n * Get a shared singleton {@link QuickJSWASMModule}. Use this to evaluate code\n * or create Javascript environments.\n *\n * This is the top-level entrypoint for the quickjs-emscripten library.\n *\n * If you need strictest possible isolation guarantees, you may create a\n * separate {@link QuickJSWASMModule} via {@link newQuickJSWASMModule}.\n *\n * To work with the asyncified version of this library, see these functions:\n *\n * - {@link newAsyncRuntime}.\n * - {@link newAsyncContext}.\n * - {@link newQuickJSAsyncWASMModule}.\n */\nexport async function getQuickJS(): Promise<QuickJSWASMModule> {\n singletonPromise ??= newQuickJSWASMModule().then((instance) => {\n singleton = instance\n return instance\n })\n return await singletonPromise\n}\n\n/**\n * Provides synchronous access to the shared {@link QuickJSWASMModule} instance returned by {@link getQuickJS}, as long as\n * least once.\n * @throws If called before `getQuickJS` resolves.\n */\nexport function getQuickJSSync(): QuickJSWASMModule {\n if (!singleton) {\n throw new Error(\"QuickJS not initialized. Await getQuickJS() at least once.\")\n }\n return singleton\n}\n\n/**\n * Create a new {@link QuickJSAsyncRuntime} in a separate WebAssembly module.\n *\n * Each runtime is isolated in a separate WebAssembly module, so that errors in\n * one runtime cannot contaminate another runtime, and each runtime can execute\n * an asynchronous action without conflicts.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newAsyncRuntime(options?: AsyncRuntimeOptions): Promise<QuickJSAsyncRuntime> {\n const module = await newQuickJSAsyncWASMModule()\n return module.newRuntime(options)\n}\n\n/**\n * Create a new {@link QuickJSAsyncContext} (with an associated runtime) in an\n * separate WebAssembly module.\n *\n * Each context is isolated in a separate WebAssembly module, so that errors in\n * one runtime cannot contaminate another runtime, and each runtime can execute\n * an asynchronous action without conflicts.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newAsyncContext(options?: ContextOptions): Promise<QuickJSAsyncContext> {\n const module = await newQuickJSAsyncWASMModule()\n return module.newContext(options)\n}\n"],"mappings":"qhCAAA,gGAAAA,QAAA,kDAAAC,QAAA,2DAAAC,QAAA,sDAAAC,QAAA,4SAAc,mCAAd,gBCOA,mCAGO,mCACP,mCAAuB,sDACvB,qCAAyB,wDACzB,uCAAwB,0DACxB,yCAA0B,4DAU1B,eAAsB,qBAIpB,iBAAwD,qCAAAC,QAC5B,CAC5B,SAAO,gEAAgC,gBAAgB,CACzD,CAeA,eAAsB,0BAIpB,iBAAyD,yCAAAC,QACxB,CACjC,SAAO,qEAAqC,gBAAgB,CAC9D,CC5CA,IAAI,UACA,iBAiBJ,eAAsB,YAAyC,CAC7D,2CAAqB,qBAAqB,EAAE,KAAM,WAChD,UAAY,SACL,SACR,GACM,MAAM,gBACf,CAOO,SAAS,gBAAoC,CAClD,GAAI,CAAC,UACH,MAAM,IAAI,MAAM,4DAA4D,EAE9E,OAAO,SACT,CAaA,eAAsB,gBAAgB,QAA6D,CAEjG,OADe,MAAM,0BAA0B,GACjC,WAAW,OAAO,CAClC,CAcA,eAAsB,gBAAgB,QAAwD,CAE5F,OADe,MAAM,0BAA0B,GACjC,WAAW,OAAO,CAClC","names":["DEBUG_ASYNC","DEBUG_SYNC","RELEASE_ASYNC","RELEASE_SYNC","RELEASE_SYNC","RELEASE_ASYNC"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DEBUG_ASYNC,DEBUG_SYNC,RELEASE_ASYNC,RELEASE_SYNC,newQuickJSAsyncWASMModule,newQuickJSWASMModule}from"./chunk-OHAYRCBA.mjs";export*from"quickjs-emscripten-core";var singleton,singletonPromise;async function getQuickJS(){return singletonPromise??(singletonPromise=newQuickJSWASMModule().then(instance=>(singleton=instance,instance))),await singletonPromise}function getQuickJSSync(){if(!singleton)throw new Error("QuickJS not initialized. Await getQuickJS() at least once.");return singleton}async function newAsyncRuntime(options){return(await newQuickJSAsyncWASMModule()).newRuntime(options)}async function newAsyncContext(options){return(await newQuickJSAsyncWASMModule()).newContext(options)}export{DEBUG_ASYNC,DEBUG_SYNC,RELEASE_ASYNC,RELEASE_SYNC,getQuickJS,getQuickJSSync,newAsyncContext,newAsyncRuntime,newQuickJSAsyncWASMModule,newQuickJSWASMModule};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/mod.ts"],"sourcesContent":["export * from \"quickjs-emscripten-core\"\nexport * from \"#variants\"\nexport * from \"./mod.js\"\n","import type {\n AsyncRuntimeOptions,\n ContextOptions,\n QuickJSAsyncContext,\n QuickJSAsyncRuntime,\n QuickJSWASMModule,\n} from \"quickjs-emscripten-core\"\nimport { newQuickJSAsyncWASMModule, newQuickJSWASMModule } from \"#variants\"\n\nlet singleton: QuickJSWASMModule | undefined = undefined\nlet singletonPromise: Promise<QuickJSWASMModule> | undefined = undefined\n\n/**\n * Get a shared singleton {@link QuickJSWASMModule}. Use this to evaluate code\n * or create Javascript environments.\n *\n * This is the top-level entrypoint for the quickjs-emscripten library.\n *\n * If you need strictest possible isolation guarantees, you may create a\n * separate {@link QuickJSWASMModule} via {@link newQuickJSWASMModule}.\n *\n * To work with the asyncified version of this library, see these functions:\n *\n * - {@link newAsyncRuntime}.\n * - {@link newAsyncContext}.\n * - {@link newQuickJSAsyncWASMModule}.\n */\nexport async function getQuickJS(): Promise<QuickJSWASMModule> {\n singletonPromise ??= newQuickJSWASMModule().then((instance) => {\n singleton = instance\n return instance\n })\n return await singletonPromise\n}\n\n/**\n * Provides synchronous access to the shared {@link QuickJSWASMModule} instance returned by {@link getQuickJS}, as long as\n * least once.\n * @throws If called before `getQuickJS` resolves.\n */\nexport function getQuickJSSync(): QuickJSWASMModule {\n if (!singleton) {\n throw new Error(\"QuickJS not initialized. Await getQuickJS() at least once.\")\n }\n return singleton\n}\n\n/**\n * Create a new {@link QuickJSAsyncRuntime} in a separate WebAssembly module.\n *\n * Each runtime is isolated in a separate WebAssembly module, so that errors in\n * one runtime cannot contaminate another runtime, and each runtime can execute\n * an asynchronous action without conflicts.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newAsyncRuntime(options?: AsyncRuntimeOptions): Promise<QuickJSAsyncRuntime> {\n const module = await newQuickJSAsyncWASMModule()\n return module.newRuntime(options)\n}\n\n/**\n * Create a new {@link QuickJSAsyncContext} (with an associated runtime) in an\n * separate WebAssembly module.\n *\n * Each context is isolated in a separate WebAssembly module, so that errors in\n * one runtime cannot contaminate another runtime, and each runtime can execute\n * an asynchronous action without conflicts.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newAsyncContext(options?: ContextOptions): Promise<QuickJSAsyncContext> {\n const module = await newQuickJSAsyncWASMModule()\n return module.newContext(options)\n}\n"],"mappings":"mIAAA,WAAc,0BCSd,IAAI,UACA,iBAiBJ,eAAsB,YAAyC,CAC7D,2CAAqB,qBAAqB,EAAE,KAAM,WAChD,UAAY,SACL,SACR,GACM,MAAM,gBACf,CAOO,SAAS,gBAAoC,CAClD,GAAI,CAAC,UACH,MAAM,IAAI,MAAM,4DAA4D,EAE9E,OAAO,SACT,CAaA,eAAsB,gBAAgB,QAA6D,CAEjG,OADe,MAAM,0BAA0B,GACjC,WAAW,OAAO,CAClC,CAcA,eAAsB,gBAAgB,QAAwD,CAE5F,OADe,MAAM,0BAA0B,GACjC,WAAW,OAAO,CAClC","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/variants.ts"],"sourcesContent":["import type {\n QuickJSSyncVariant,\n QuickJSAsyncVariant,\n QuickJSWASMModule,\n QuickJSAsyncWASMModule,\n PromisedDefault,\n} from \"quickjs-emscripten-core\"\nimport {\n newQuickJSWASMModuleFromVariant,\n newQuickJSAsyncWASMModuleFromVariant,\n} from \"quickjs-emscripten-core\"\nimport DEBUG_SYNC from \"@jitl/quickjs-wasmfile-debug-sync\"\nimport RELEASE_SYNC from \"@jitl/quickjs-wasmfile-release-sync\"\nimport DEBUG_ASYNC from \"@jitl/quickjs-wasmfile-debug-asyncify\"\nimport RELEASE_ASYNC from \"@jitl/quickjs-wasmfile-release-asyncify\"\n\n/**\n * Create a new, completely isolated WebAssembly module containing the QuickJS library.\n * See the documentation on {@link QuickJSWASMModule}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSWASMModule(\n /**\n * Optionally, pass a {@link QuickJSSyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSSyncVariant> = RELEASE_SYNC,\n): Promise<QuickJSWASMModule> {\n return newQuickJSWASMModuleFromVariant(variantOrPromise)\n}\n\n/**\n * Create a new, completely isolated WebAssembly module containing a version of the QuickJS library\n * compiled with Emscripten's [ASYNCIFY](https://emscripten.org/docs/porting/asyncify.html) transform.\n *\n * This version of the library offers features that enable synchronous code\n * inside the VM to interact with asynchronous code in the host environment.\n * See the documentation on {@link QuickJSAsyncWASMModule}, {@link QuickJSAsyncRuntime},\n * and {@link QuickJSAsyncContext}.\n *\n * Note that there is a hard limit on the number of WebAssembly modules in older\n * versions of v8:\n * https://bugs.chromium.org/p/v8/issues/detail?id=12076\n */\nexport async function newQuickJSAsyncWASMModule(\n /**\n * Optionally, pass a {@link QuickJSAsyncVariant} to construct a different WebAssembly module.\n */\n variantOrPromise: PromisedDefault<QuickJSAsyncVariant> = RELEASE_ASYNC,\n): Promise<QuickJSAsyncWASMModule> {\n return newQuickJSAsyncWASMModuleFromVariant(variantOrPromise)\n}\n\nexport { DEBUG_SYNC, RELEASE_SYNC, DEBUG_ASYNC, RELEASE_ASYNC }\n"],"mappings":"y5BAAA,0GAAAA,QAAA,kDAAAC,QAAA,2DAAAC,QAAA,sDAAAC,QAAA,sJAOA,mCAGO,mCACP,mCAAuB,sDACvB,qCAAyB,wDACzB,uCAAwB,0DACxB,yCAA0B,4DAU1B,eAAsB,qBAIpB,iBAAwD,qCAAAA,QAC5B,CAC5B,SAAO,gEAAgC,gBAAgB,CACzD,CAeA,eAAsB,0BAIpB,iBAAyD,yCAAAD,QACxB,CACjC,SAAO,qEAAqC,gBAAgB,CAC9D","names":["DEBUG_ASYNC","DEBUG_SYNC","RELEASE_ASYNC","RELEASE_SYNC"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +1,69 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "quickjs-emscripten",
|
|
3
|
+
"version": "0.32.0",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"eval",
|
|
9
|
+
"quickjs",
|
|
10
|
+
"vm",
|
|
11
|
+
"interpreter",
|
|
12
|
+
"runtime",
|
|
13
|
+
"safe",
|
|
14
|
+
"emscripten",
|
|
15
|
+
"wasm"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/justjake/quickjs-emscripten"
|
|
20
|
+
},
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Jake Teton-Landis",
|
|
23
|
+
"url": "https://jake.tl"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"dist/**/*",
|
|
28
|
+
"!dist/*.test.js",
|
|
29
|
+
"!dist/*.tsbuildinfo"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "npx tsup",
|
|
33
|
+
"clean": "git clean -fx dist .output",
|
|
34
|
+
"tsc": "npx tsc -p . --noEmit",
|
|
35
|
+
"test:vi": "VITEST=1 npx vitest run",
|
|
36
|
+
"test:node": "npx tsc -p tsconfig.build.json && ./makeTestPackageJson.ts && node --experimental-import-meta-resolve -r source-map-support/register --test ./.output/*node-test*.*js",
|
|
37
|
+
"test": "npm run test:vi && npm run test:node"
|
|
38
|
+
},
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"main": "./dist/index.js",
|
|
41
|
+
"module": "./dist/index.mjs",
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"import": "./dist/index.mjs",
|
|
46
|
+
"require": "./dist/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./variants": {
|
|
49
|
+
"types": "./dist/variants.d.ts",
|
|
50
|
+
"import": "./dist/variants.mjs",
|
|
51
|
+
"require": "./dist/variants.js"
|
|
52
|
+
},
|
|
53
|
+
"./package.json": "./package.json"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@jitl/quickjs-wasmfile-debug-asyncify": "0.32.0",
|
|
57
|
+
"@jitl/quickjs-wasmfile-debug-sync": "0.32.0",
|
|
58
|
+
"@jitl/quickjs-wasmfile-release-asyncify": "0.32.0",
|
|
59
|
+
"@jitl/quickjs-wasmfile-release-sync": "0.32.0",
|
|
60
|
+
"quickjs-emscripten-core": "0.32.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
|
|
64
|
+
"@jitl/quickjs-singlefile-cjs-release-sync": "0.32.0"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=16.0.0"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|