const fs=require("fs"),path=require("path"),{pathToFileURL}=require("url");const d=path.resolve(process.argv[2]||"build-web/configure/bin");(async()=>{globalThis.__dirname=`${d}${path.sep}`;globalThis.require=require;const m=await import(pathToFileURL(path.join(d,"FreeCADWebSurfaceRuntimeProbe.js"))),p=await m.default({wasmBinary:fs.readFileSync(path.join(d,"FreeCADWebSurfaceRuntimeProbe.wasm"))}),c=(n,t="number")=>p.ccall(n,t);const r={first:c("fc_web_surface_initialize"),second:c("fc_web_surface_initialize"),calls:c("fc_web_surface_initialization_calls"),runs:c("fc_web_surface_initialization_runs"),available:c("fc_web_surface_module_available"),types:c("fc_web_surface_type_count"),resources:c("fc_web_surface_resources_released"),error:c("fc_web_surface_error","string"),action:c("fc_web_surface_create_cut_recompute"),objectType:c("fc_web_surface_action_object_type","string"),objectCount:c("fc_web_surface_action_object_count"),recomputeCount:c("fc_web_surface_action_recompute_count"),actionResources:c("fc_web_surface_action_resources_released")};if(!(r.first===1&&r.second===1&&r.calls===2&&r.runs===1&&r.available===1&&r.types===7&&r.resources===1&&r.error===""&&r.action===1&&r.objectType==="Surface::Cut"&&r.objectCount===3&&r.recomputeCount===3&&r.actionResources===1))throw Error(JSON.stringify(r));console.log(JSON.stringify(r))})().catch(e=>{console.error(e);process.exitCode=1});