mulmoclaude 2.14.0 → 2.15.1

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.
Files changed (83) hide show
  1. package/client/assets/{JsonEditor-Cmmt9akA.js → JsonEditor-0HTHbgB_.js} +7 -7
  2. package/client/assets/{abnfDiagram-S7VZAUFO-Cjtt4CHm.js → abnfDiagram-S7VZAUFO-BpUG3mdn.js} +1 -1
  3. package/client/assets/{architectureDiagram-YGSQEFNW--eNIMdaJ.js → architectureDiagram-YGSQEFNW-DnQwrhWz.js} +1 -1
  4. package/client/assets/{blockDiagram-APKKGZFW-BWlUGl3H.js → blockDiagram-APKKGZFW--KBpHf5a.js} +4 -4
  5. package/client/assets/{c4Diagram-KJ2TOQU5-CaVVTJE4.js → c4Diagram-KJ2TOQU5-BGrugweg.js} +1 -1
  6. package/client/assets/{chunk-6MUBBAK2-D40ukFUk.js → chunk-6MUBBAK2-gmUZqQPh.js} +1 -1
  7. package/client/assets/{chunk-AXFCVDMN-C46VVWXE.js → chunk-AXFCVDMN-CMD-njlM.js} +1 -1
  8. package/client/assets/chunk-BG4553SI-jTV6EUg-.js +127 -0
  9. package/client/assets/{chunk-DQASFODM--nQulWPT.js → chunk-DQASFODM-C3FQ1yVg.js} +2 -2
  10. package/client/assets/{chunk-HFQBQIA3-KswI3ss1.js → chunk-HFQBQIA3-DMlwNFST.js} +1 -1
  11. package/client/assets/{chunk-KQLB2F66-BjmkuXh7.js → chunk-KQLB2F66-GcNeuuqO.js} +1 -1
  12. package/client/assets/{chunk-KS47KZWR-C8Teoz7G.js → chunk-KS47KZWR-w9uUZC7v.js} +1 -1
  13. package/client/assets/{chunk-LEVMRMFU-DJd_b2jK.js → chunk-LEVMRMFU-NhqkND8I.js} +1 -1
  14. package/client/assets/{chunk-M57EVK23-Cb8htaSb.js → chunk-M57EVK23-CLOdquhl.js} +1 -1
  15. package/client/assets/{chunk-OY52VR5R-Fue7zxML.js → chunk-OY52VR5R-B7RZoeSF.js} +1 -1
  16. package/client/assets/chunk-QB3YPZ4I-kRIBCNeK.js +213 -0
  17. package/client/assets/{chunk-R3KSYZAL-BSNP9iHD.js → chunk-R3KSYZAL-BDe2ku8h.js} +1 -1
  18. package/client/assets/{chunk-STOXU5M4-CqE7zm3J.js → chunk-STOXU5M4-BAphGPz7.js} +1 -1
  19. package/client/assets/{chunk-TU62E6Q5-A9Z9BOEz.js → chunk-TU62E6Q5-B8W1SbAI.js} +1 -1
  20. package/client/assets/{chunk-X4PVCEUW-1DJv4ogc.js → chunk-X4PVCEUW-eZTA0Ia6.js} +1 -1
  21. package/client/assets/{classDiagram-v2-L25IHNXF-DntO-B37.js → classDiagram-v2-L25IHNXF-sHTdED2m.js} +7 -7
  22. package/client/assets/{cose-bilkent-JH36ORCC-B1hNh5uX.js → cose-bilkent-JH36ORCC-CXWJekCk.js} +1 -1
  23. package/client/assets/{cynefinDiagram-L36ESFBY-D-zPBQ73.js → cynefinDiagram-L36ESFBY-Bjfm6Li8.js} +1 -1
  24. package/client/assets/cytoscape.esm-nTrd5EVq.js +321 -0
  25. package/client/assets/{dagre-SPEB5RXH-B4KVgXJq.js → dagre-SPEB5RXH-B4epCoVA.js} +1 -1
  26. package/client/assets/{diagram-3B7GL73J-CNXB2kFP.js → diagram-3B7GL73J-C5DiaFlQ.js} +8 -8
  27. package/client/assets/{diagram-DNEMPZML-C0FGVt6Z.js → diagram-DNEMPZML-CWt5ukC8.js} +1 -1
  28. package/client/assets/{diagram-L3MUGCDN-DGHsKt_z.js → diagram-L3MUGCDN-D9rZZiiC.js} +1 -1
  29. package/client/assets/{diagram-LA4NIPWU-DAu4qztw.js → diagram-LA4NIPWU-7VNlLS6_.js} +1 -1
  30. package/client/assets/{diagram-MHCOC4E2-CxpbsnIz.js → diagram-MHCOC4E2-C7u-_BnW.js} +1 -1
  31. package/client/assets/{diagram-XPFHEONP-eXon9n2Y.js → diagram-XPFHEONP-DPK3ozAP.js} +1 -1
  32. package/client/assets/{ebnfDiagram-UZSYDL2S-kM0wWFTB.js → ebnfDiagram-UZSYDL2S-DZHo-pTx.js} +1 -1
  33. package/client/assets/{elk-XV6XMXQE-DVC28UnX.js → elk-XV6XMXQE-C-XML0V8.js} +1 -1
  34. package/client/assets/{erDiagram-EYBAPDEH-CtniqH-r.js → erDiagram-EYBAPDEH-wnZEJszR.js} +2 -2
  35. package/client/assets/flowDiagram-MALGAFMO-DTCOGz5G.js +1 -0
  36. package/client/assets/{ganttDiagram-23REXITY-pxMg5eKe.js → ganttDiagram-23REXITY-8BbzZhO2.js} +1 -1
  37. package/client/assets/{gitGraphDiagram-STJD7YCW-CzTCex26.js → gitGraphDiagram-STJD7YCW-Bkn7mdnn.js} +1 -1
  38. package/client/assets/{infoDiagram-KBXO4MBG-C3iQEqIQ.js → infoDiagram-KBXO4MBG-CtFGCD8G.js} +1 -1
  39. package/client/assets/{ishikawaDiagram-M35NCXHK-BIQGwZsl.js → ishikawaDiagram-M35NCXHK-B-9rtIFf.js} +1 -1
  40. package/client/assets/{journeyDiagram-OPLOXDXO-Br8dKiHb.js → journeyDiagram-OPLOXDXO-BqEQZrrS.js} +1 -1
  41. package/client/assets/{kanban-definition-BZKZHSQY-Br1acdWI.js → kanban-definition-BZKZHSQY-Y9kvrvVV.js} +4 -4
  42. package/client/assets/{manifold-BE4c7gO-.wasm → manifold-B_yLhOkb.wasm} +0 -0
  43. package/client/assets/{manifold-DrkMN1Km.js → manifold-Ba9taJOo.js} +1 -1
  44. package/client/assets/{marp-tVv8DIv7.js → marp-8ORtdF5B.js} +9 -9
  45. package/client/assets/material-symbols-outlined-D_27-b_z.woff2 +0 -0
  46. package/client/assets/mermaid.core-D6nsp30r.js +44 -0
  47. package/client/assets/{mindmap-definition-I2QAS2VK-C23tx2h_.js → mindmap-definition-I2QAS2VK-CAJc2Y05.js} +3 -3
  48. package/client/assets/{pegDiagram-FD4XPPHP-Dyw1yQO2.js → pegDiagram-FD4XPPHP-BnUbtRmC.js} +1 -1
  49. package/client/assets/{pieDiagram-J4AKIIQI-_m4STYIe.js → pieDiagram-J4AKIIQI-CnstF7X7.js} +1 -1
  50. package/client/assets/purify.es-D2gWityX.js +3 -0
  51. package/client/assets/{quadrantDiagram-XTYBLID2-Be2HR5Du.js → quadrantDiagram-XTYBLID2-DAJp9CaM.js} +1 -1
  52. package/client/assets/{railroadDiagram-MRQ6NCDL--cJafyIX.js → railroadDiagram-MRQ6NCDL-Bhwo_Zc6.js} +1 -1
  53. package/client/assets/{whisper-extra-args-DMRU1Hxb.js → rel-audit-CUBZzAfs.js} +609 -607
  54. package/client/assets/{whisper-extra-args-B0J0HfhZ.css → rel-audit-DqB6DAtk.css} +1 -1
  55. package/client/assets/{requirementDiagram-Y7LWUY3S-CbHfazx-.js → requirementDiagram-Y7LWUY3S-CMb6AWxU.js} +1 -1
  56. package/client/assets/{runtime-protocol-vue-9C8e1yK-.js → runtime-protocol-vue-RLmuznKQ.js} +1 -1
  57. package/client/assets/{runtime-vue-Dj540T8q.js → runtime-vue-qyDidbeS.js} +1 -1
  58. package/client/assets/{sankeyDiagram-WGJFYUXA-B7W1xfEZ.js → sankeyDiagram-WGJFYUXA-7QLkoJhs.js} +1 -1
  59. package/client/assets/{sequenceDiagram-5NDRBG5M-CDiuVCWt.js → sequenceDiagram-5NDRBG5M-DCUwp8Zb.js} +1 -1
  60. package/client/assets/{stateDiagram-v2-FJ4FJNEA-DvnZvB9u.js → stateDiagram-v2-FJ4FJNEA-D8thMVZ2.js} +7 -7
  61. package/client/assets/{swimlanes-UMQ2AFYF-BUYkhv7j.js → swimlanes-UMQ2AFYF-CRba4dg4.js} +1 -1
  62. package/client/assets/swimlanesDiagram-OMPLPG4O-BHz5pP6-.js +8 -0
  63. package/client/assets/{timeline-definition-SEUHKTQE-D8zi0iyX.js → timeline-definition-SEUHKTQE-nWpL3JLt.js} +3 -3
  64. package/client/assets/{usecaseDiagram-AFA6YXN4-CK9a1gue.js → usecaseDiagram-AFA6YXN4-BOpdn2b2.js} +1 -1
  65. package/client/assets/{vennDiagram-NNMJR3RB-BqnUt_w7.js → vennDiagram-NNMJR3RB-CH4ga7zt.js} +3 -3
  66. package/client/assets/vue-i18n-BKue2Wr0.js +3 -0
  67. package/client/assets/{vue-B7JE_osW.js → vue-r5vr0Xmp.js} +1 -1
  68. package/client/assets/vue.runtime.esm-bundler--9dSVxMW.js +5 -0
  69. package/client/assets/{wardleyDiagram-S7YFUSEH-CtBUhUIE.js → wardleyDiagram-S7YFUSEH-C8xOHjs2.js} +1 -1
  70. package/client/assets/{xychartDiagram-GGNKY7IX-D-Km6eyV.js → xychartDiagram-GGNKY7IX-_Fhzg6X2.js} +1 -1
  71. package/client/index.html +9 -8
  72. package/package.json +15 -15
  73. package/server/build/mcp-server.mjs +693 -666
  74. package/server/utils/claudeBin.ts +15 -3
  75. package/client/assets/chunk-BG4553SI-jKH6vK-i.js +0 -129
  76. package/client/assets/chunk-QB3YPZ4I-B8Az5Nar.js +0 -213
  77. package/client/assets/cytoscape.esm-CVyW_ZDf.js +0 -321
  78. package/client/assets/flowDiagram-MALGAFMO-vOwEEDYR.js +0 -1
  79. package/client/assets/material-symbols-outlined-CP_JrVKe.woff2 +0 -0
  80. package/client/assets/mermaid.core-C8yf_jty.js +0 -44
  81. package/client/assets/swimlanesDiagram-OMPLPG4O-US9pYqYa.js +0 -8
  82. package/client/assets/vue-i18n-Bj_SU12y.js +0 -3
  83. package/client/assets/vue.runtime.esm-bundler-Bbm0D3Ao.js +0 -5
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BwpP9LFt.js","assets/rolldown-runtime-BCiCTKAo.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-BCiCTKAo.js";import{t}from"./preload-helper-7y9sWmk5.js";async function n(n={}){var r,i=n,a=!!globalThis.window,o=!!globalThis.WorkerGlobalScope,s=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;if(s){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-BwpP9LFt.js`).then(t=>e(t.t(),1));return{createRequire:t}},__vite__mapDeps([0,1]));var c=n(import.meta.url)}var l=!1;i.setup=function(){if(l)return;l=!0,i.initTBB();function e(e,t,n=(e=>e)){if(t)for(let r of t)e.push_back(n(r));return e}function t(e,t=(e=>e)){let n=[],r=e.size();for(let i=0;i<r;i++)n.push(t(e.get(i)));return n}function n(e,t=(e=>e)){let n=[],r=e.size();for(let i=0;i<r;i++){let r=e.get(i),a=r.size(),o=[];for(let e=0;e<a;e++)o.push(t(r.get(e)));n.push(o)}return n}function r(t){return t[0].length<3&&(t=[t]),e(new i.Vector2_vec2,t,t=>e(new i.Vector_vec2,t,e=>e instanceof Array?{x:e[0],y:e[1]}:e))}function a(e){for(let t=0;t<e.size();t++)e.get(t).delete();e.delete()}function o(e){return e[0]instanceof Array?{x:e[0][0],y:e[0][1]}:typeof e[0]==`number`?{x:e[0]||0,y:e[1]||0}:e[0]}function s(e){return e[0]instanceof Array?{x:e[0][0],y:e[0][1],z:e[0][2]}:typeof e[0]==`number`?{x:e[0]||0,y:e[1]||0,z:e[2]||0}:e[0]}function c(e){return e==`EvenOdd`?0:e==`NonZero`?1:e==`Negative`?3:2}function u(e){return e==`Round`?1:e==`Miter`?2:0}let d=i.CrossSection;function f(e,t=`Positive`){if(e instanceof d)return e;{let n=r(e),i=new d(n,c(t));return a(n),i}}i.CrossSection.prototype.translate=function(...e){return this._Translate(o(e))},i.CrossSection.prototype.scale=function(e){return typeof e==`number`?this._Scale({x:e,y:e}):this._Scale(o([e]))},i.CrossSection.prototype.mirror=function(e){return this._Mirror(o([e]))},i.CrossSection.prototype.warp=function(e){let t=Y(function(t){let n=[O(t,`double`),O(t+8,`double`)];e(n),k(t,n[0],`double`),k(t+8,n[1],`double`)},`vi`),n=this._Warp(t);return X(t),n},i.CrossSection.prototype.decompose=function(){let e=this._Decompose(),n=t(e);return e.delete(),n},i.CrossSection.prototype.bounds=function(){let e=this._Bounds();return{min:[`x`,`y`].map(t=>e.min[t]),max:[`x`,`y`].map(t=>e.max[t])}},i.CrossSection.prototype.offset=function(e,t=`Round`,n=2,r=0){return this._Offset(e,u(t),n,r)},i.CrossSection.prototype.simplify=function(e=1e-6){return this._Simplify(e)},i.CrossSection.prototype.extrude=function(e,t=0,n=0,r=[1,1],a=!1){r=o([r]);let s=i._Extrude(this._ToPolygons(),e,t,n,r);return a?s.translate([0,0,-e/2]):s},i.CrossSection.prototype.revolve=function(e=0,t=360){return i._Revolve(this._ToPolygons(),e,t)},i.CrossSection.prototype.add=function(e){return this._add(f(e))},i.CrossSection.prototype.subtract=function(e){return this._subtract(f(e))},i.CrossSection.prototype.intersect=function(e){return this._intersect(f(e))},i.CrossSection.prototype.toPolygons=function(){let e=this._ToPolygons(),t=n(e,e=>[e.x,e.y]);return e.delete(),t},i.Manifold.prototype.smoothOut=function(e=52.5,t=0){return this._SmoothOut(e,t)},i.Manifold.prototype.warp=function(e){let t=Y(function(t){let n=[O(t,`double`),O(t+8,`double`),O(t+16,`double`)];e(n),k(t,n[0],`double`),k(t+8,n[1],`double`),k(t+16,n[2],`double`)},`vi`),n=this._Warp(t);X(t);let r=n.status();if(r!==`NoError`)throw new i.ManifoldError(r);return n},i.Manifold.prototype.warpBatch=function(e){let t=Y(function(t,n){let r=i.HEAPF64??E;if(!r)throw Error(`WASM heap is not initialized (HEAPF64 unavailable)`);e(new Float64Array(r.buffer,t,n*3),n)},`vii`),n=this._WarpBatch(t);X(t);let r=n.status();if(r!==`NoError`)throw new i.ManifoldError(r);return n},i.Manifold.prototype.calculateNormals=function(e=0,t=52.5){return this._CalculateNormals(e,t)},i.Manifold.prototype.smoothByNormals=function(e=0){return this._SmoothByNormals(e)},i.Manifold.prototype.setProperties=function(e,t){let n=this.numProp(),r=Y(function(r,i,a){let o=[];for(let t=0;t<e;++t)o[t]=O(r+8*t,`double`);let s=[];for(let e=0;e<3;++e)s[e]=O(i+8*e,`double`);let c=[];for(let e=0;e<n;++e)c[e]=O(a+8*e,`double`);t(o,s,c);for(let t=0;t<e;++t)k(r+8*t,o[t],`double`)},`viii`),i=this._SetProperties(e,r);return X(r),i},i.Manifold.prototype.translate=function(...e){return this._Translate(s(e))},i.Manifold.prototype.rotate=function(e,t,n){return Array.isArray(e)?this._Rotate(...e):this._Rotate(e,t||0,n||0)},i.Manifold.prototype.scale=function(e){return typeof e==`number`?this._Scale({x:e,y:e,z:e}):this._Scale(s([e]))},i.Manifold.prototype.mirror=function(e){return this._Mirror(s([e]))},i.Manifold.prototype.trimByPlane=function(e,t=0){return this._TrimByPlane(s([e]),t)},i.Manifold.prototype.slice=function(e=0){let t=this._Slice(e),n=new d(t,c(`Positive`));return a(t),n},i.Manifold.prototype.project=function(){let e=this._Project(),t=new d(e,c(`Positive`));return a(e),t},i.Manifold.prototype.rayCast=function(e,n){let r=this._RayCast(s([e]),s([n])),i=t(r,e=>({faceID:e.faceID,distance:e.distance,position:[`x`,`y`,`z`].map(t=>e.position[t]),normal:[`x`,`y`,`z`].map(t=>e.normal[t])}));return r.delete(),i},i.Manifold.prototype.split=function(e){let n=this._Split(e),r=t(n);return n.delete(),r},i.Manifold.prototype.splitByPlane=function(e,n=0){let r=this._SplitByPlane(s([e]),n),i=t(r);return r.delete(),i},i.Manifold.prototype.decompose=function(){let e=this._Decompose(),n=t(e);return e.delete(),n},i.Manifold.prototype.boundingBox=function(){let e=this._boundingBox();return{min:[`x`,`y`,`z`].map(t=>e.min[t]),max:[`x`,`y`,`z`].map(t=>e.max[t])}},i.Manifold.prototype.simplify=function(e=0){return this._Simplify(e)};class p{constructor({numProp:e=3,triVerts:t=new Uint32Array,vertProperties:n=new Float32Array,mergeFromVert:r,mergeToVert:i,runIndex:a,runOriginalID:o,faceID:s,halfedgeTangent:c,runTransform:l,runFlags:u,tolerance:d=0}={}){this.numProp=e,this.triVerts=t,this.vertProperties=n,this.mergeFromVert=r,this.mergeToVert=i,this.runIndex=a,this.runOriginalID=o,this.faceID=s,this.halfedgeTangent=c,this.runTransform=l,this.runFlags=u,this.tolerance=d}get numTri(){return this.triVerts.length/3}get numVert(){return this.vertProperties.length/this.numProp}get numRun(){return this.runOriginalID.length}merge(){let{changed:e,mesh:t}=i._Merge(this);return Object.assign(this,{...t}),e}verts(e){return this.triVerts.subarray(3*e,3*(e+1))}position(e){return this.vertProperties.subarray(this.numProp*e,this.numProp*e+3)}extras(e){return this.vertProperties.subarray(this.numProp*e+3,this.numProp*(e+1))}tangent(e){return this.halfedgeTangent.subarray(4*e,4*(e+1))}transform(e){let t=Array(16);for(let n of[0,1,2,3])for(let r of[0,1,2])t[4*n+r]=this.runTransform[12*e+3*n+r];return t[15]=1,t}backside(e){return this.runFlags!=null&&e<this.runFlags.length&&!!(this.runFlags[e]&1)}hasNormals(e){return this.runFlags!=null&&e<this.runFlags.length&&!!(this.runFlags[e]&2)}}i.Mesh=p,i.Manifold.prototype.getMesh=function(e=-1){return new p(this._GetMeshJS(e))},i.ManifoldError=function(e,...t){let n=`Unknown error`;switch(e){case`NonFiniteVertex`:n=`Non-finite vertex`;break;case`NotManifold`:n=`Not manifold`;break;case`VertexOutOfBounds`:n=`Vertex index out of bounds`;break;case`PropertiesWrongLength`:n=`Properties have wrong length`;break;case`MissingPositionProperties`:n=`Less than three properties`;break;case`MergeVectorsDifferentLengths`:n=`Merge vectors have different lengths`;break;case`MergeIndexOutOfBounds`:n=`Merge index out of bounds`;break;case`TransformWrongLength`:n=`Transform vector has wrong length`;break;case`RunIndexWrongLength`:n=`Run index vector has wrong length`;break;case`FaceIDWrongLength`:n=`Face ID vector has wrong length`;break;case`InvalidConstruction`:n=`Manifold constructed with invalid parameters`;break;case`ResultTooLarge`:n=`Result exceeds maximum size`;break;case`InvalidTangents`:n=`Invalid halfedge tangents`}let r=Error.apply(this,[n,...t]);r.name=this.name=`ManifoldError`,this.message=r.message,this.stack=r.stack,this.code=e},i.ManifoldError.prototype=Object.create(Error.prototype,{constructor:{value:i.ManifoldError,writable:!0,configurable:!0}}),i.CrossSection=function(e,t=`Positive`){let n=r(e),i=new d(n,c(t));return a(n),i},i.CrossSection.ofPolygons=function(e,t=`Positive`){return new i.CrossSection(e,t)},i.CrossSection.square=function(...e){let t;t=e.length==0?{x:1,y:1}:typeof e[0]==`number`?{x:e[0],y:e[0]}:o(e);let n=e[1]||!1;return i._Square(t,n)},i.CrossSection.circle=function(e,t=0){return i._Circle(e,t)};function m(e){return function(...t){t.length==1&&(t=t[0]);let n=new i.Vector_crossSection;for(let e of t)n.push_back(f(e));let r=i[`_crossSection`+e](n);return n.delete(),r}}i.CrossSection.compose=m(`Compose`),i.CrossSection.union=m(`UnionN`),i.CrossSection.difference=m(`DifferenceN`),i.CrossSection.intersection=m(`IntersectionN`);function h(t,n){e(t,n,e=>e instanceof Array?{x:e[0],y:e[1]}:e)}i.CrossSection.hull=function(...e){e.length==1&&(e=e[0]);let t=new i.Vector_vec2;for(let n of e)if(n instanceof d)i._crossSectionCollectVertices(t,n);else if(n instanceof Array&&n.length==2&&typeof n[0]==`number`)t.push_back({x:n[0],y:n[1]});else if(n.x)t.push_back(n);else{let e=n[0].length==2&&typeof n[0][0]==`number`||n[0].x?[n]:n;for(let n of e)h(t,n)}let n=i._crossSectionHullPoints(t);return t.delete(),n},i.CrossSection.prototype=Object.create(d.prototype),Object.defineProperty(i.CrossSection,Symbol.hasInstance,{get:()=>e=>e instanceof d});let g=i.Manifold;i.Manifold=function(e){let t=new g(e),n=t.status();if(n!==`NoError`)throw new i.ManifoldError(n);return t},i.Manifold.ofMesh=function(e){return new i.Manifold(e)},i.Manifold.tetrahedron=function(){return i._Tetrahedron()},i.Manifold.cube=function(...e){let t;t=e.length==0?{x:1,y:1,z:1}:typeof e[0]==`number`?{x:e[0],y:e[0],z:e[0]}:s(e);let n=e[1]||!1;return i._Cube(t,n)},i.Manifold.cylinder=function(e,t,n=-1,r=0,a=!1){return i._Cylinder(e,t,n,r,a)},i.Manifold.sphere=function(e,t=0){return i._Sphere(e,t)},i.Manifold.smooth=function(t,n=[]){let r=new i.Vector_smoothness;e(r,n);let a=i._Smooth(t,r);return r.delete(),a},i.Manifold.extrude=function(e,t,n=0,r=0,a=[1,1],o=!1){return(e instanceof d?e:i.CrossSection(e,`Positive`)).extrude(t,n,r,a,o)},i.Manifold.revolve=function(e,t=0,n=360){return(e instanceof d?e:i.CrossSection(e,`Positive`)).revolve(t,n)},i.Manifold.reserveIDs=function(e){return i._ReserveIDs(e)};function _(e){return function(...t){t.length==1&&(t=t[0]);let n=new i.Vector_manifold;for(let e of t)n.push_back(e);let r=i[`_manifold`+e+`N`](n);return n.delete(),r}}i.Manifold.union=_(`Union`),i.Manifold.compose=i.Manifold.union,i.Manifold.difference=_(`Difference`),i.Manifold.intersection=_(`Intersection`),i.Manifold.levelSet=function(e,t,n,r=0,a=-1){let o={min:{x:t.min[0],y:t.min[1],z:t.min[2]},max:{x:t.max[0],y:t.max[1],z:t.max[2]}},s=Y(function(t){return e([O(t,`double`),O(t+8,`double`),O(t+16,`double`)])},`di`),c=i._LevelSet(s,o,n,r,a);return X(s),c},i.ExecutionContext.prototype.fromMesh=function(e){return this._FromMesh(e)},i.ExecutionContext.prototype.smooth=function(t,n=[]){let r=new i.Vector_smoothness;e(r,n);let a=this._Smooth(t,r);return r.delete(),a},i.ExecutionContext.prototype.levelSet=function(e,t,n,r=0,i=-1){let a={min:{x:t.min[0],y:t.min[1],z:t.min[2]},max:{x:t.max[0],y:t.max[1],z:t.max[2]}},o=Y(function(t){return e([O(t,`double`),O(t+8,`double`),O(t+16,`double`)])},`di`),s=this._LevelSet(o,a,n,r,i);return X(o),s};function v(t,n){e(t,n,e=>e instanceof Array?{x:e[0],y:e[1],z:e[2]}:e)}i.Manifold.hull=function(...e){e.length==1&&(e=e[0]);let t=new i.Vector_vec3;for(let n of e)n instanceof g?i._manifoldCollectVertices(t,n):n instanceof Array&&n.length==3&&typeof n[0]==`number`?t.push_back({x:n[0],y:n[1],z:n[2]}):n.x?t.push_back(n):v(t,n);let n=i._manifoldHullPoints(t);return t.delete(),n},i.Manifold.prototype=Object.create(g.prototype),Object.defineProperty(i.Manifold,Symbol.hasInstance,{get:()=>e=>e instanceof g}),i.triangulate=function(e,n=-1,o=!0){let s=r(e),c=t(i._Triangulate(s,n,o),e=>[e[0],e[1],e[2]]);return a(s),c}};var u=import.meta.url,d=``;function f(e){return i.locateFile?i.locateFile(e,d):d+e}var p,m;if(s){var h=c("node:fs");u.startsWith(`file:`)&&(d=c("node:path").dirname(c("node:url").fileURLToPath(u))+`/`),m=e=>(e=y(e)?new URL(e):e,h.readFileSync(e)),p=async(e,t=!0)=>(e=y(e)?new URL(e):e,h.readFileSync(e,t?void 0:`utf8`)),process.argv.length>1&&process.argv[1].replace(/\\/g,`/`),process.argv.slice(2)}else if(a||o){try{d=new URL(`.`,u).href}catch{}o&&(m=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),p=async e=>{if(y(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}console.log.bind(console);var g=console.error.bind(console),_,v=!1,y=e=>e.startsWith(`file://`),ee,te,b,x,S,C,w,T,ne,E,re,ie,ae=!1;function oe(){var e=Vn.buffer;b=new Int8Array(e),S=new Int16Array(e),x=new Uint8Array(e),C=new Uint16Array(e),w=new Int32Array(e),T=new Uint32Array(e),ne=new Float32Array(e),E=new Float64Array(e),re=new BigInt64Array(e),ie=new BigUint64Array(e)}function se(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)Se(i.preRun.shift());ve(xe)}function ce(){ae=!0,$.J()}function le(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)be(i.postRun.shift());ve(ye)}function D(e){i.onAbort?.(e),e=`Aborted(`+e+`)`,g(e),v=!0,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw te?.(t),t}var ue;function de(){return i.locateFile?f(`manifold.wasm`):new URL(`/assets/manifold-BE4c7gO-.wasm`,``+import.meta.url).href}function fe(e){if(e==ue&&_)return new Uint8Array(_);if(m)return m(e);throw`both async and sync fetching of the wasm failed`}async function pe(e){if(!_)try{var t=await p(e);return new Uint8Array(t)}catch{}return fe(e)}async function me(e,t){try{var n=await pe(e);return await WebAssembly.instantiate(n,t)}catch(e){g(`failed to asynchronously prepare wasm: ${e}`),D(e)}}async function he(e,t,n){if(!e&&!y(t)&&!s)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){g(`wasm streaming compile failed: ${e}`),g(`falling back to ArrayBuffer instantiation`)}return me(t,n)}function ge(){return{a:Un}}async function _e(){function e(e,t){return $=e.exports,$=Wn($),Hn($),oe(),$}function t(t){return e(t.instance)}var n=ge();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(ue??=de(),t(await he(_,ue,n)))}var ve=e=>{for(;e.length>0;)e.shift()(i)},ye=[],be=e=>ye.push(e),xe=[],Se=e=>xe.push(e);function O(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return b[e>>>0];case`i8`:return b[e>>>0];case`i16`:return S[e>>>1>>>0];case`i32`:return w[e>>>2>>>0];case`i64`:return re[e>>>3>>>0];case`float`:return ne[e>>>2>>>0];case`double`:return E[e>>>3>>>0];case`*`:return T[e>>>2>>>0];default:D(`invalid type for getValue: ${t}`)}}function k(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:b[e>>>0]=t;break;case`i8`:b[e>>>0]=t;break;case`i16`:S[e>>>1>>>0]=t;break;case`i32`:w[e>>>2>>>0]=t;break;case`i64`:re[e>>>3>>>0]=BigInt(t);break;case`float`:ne[e>>>2>>>0]=t;break;case`double`:E[e>>>3>>>0]=t;break;case`*`:T[e>>>2>>>0]=t;break;default:D(`invalid type for setValue: ${n}`)}}class Ce{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){T[this.ptr+4>>>2>>>0]=e}get_type(){return T[this.ptr+4>>>2>>>0]}set_destructor(e){T[this.ptr+8>>>2>>>0]=e}get_destructor(){return T[this.ptr+8>>>2>>>0]}set_caught(e){e=+!!e,b[this.ptr+12>>>0]=e}get_caught(){return b[this.ptr+12>>>0]!=0}set_rethrown(e){e=+!!e,b[this.ptr+13>>>0]=e}get_rethrown(){return b[this.ptr+13>>>0]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){T[this.ptr+16>>>2>>>0]=e}get_adjusted_ptr(){return T[this.ptr+16>>>2>>>0]}}var we=0,Te=0;function Ee(e,t,n){throw e>>>=0,t>>>=0,n>>>=0,new Ce(e).init(t,n),we=e,Te++,we}var De=()=>D(``),A={},Oe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function j(e){return this.fromWireType(T[e>>>2>>>0])}var M={},N={},P={},ke=class extends Error{constructor(e){super(e),this.name=`InternalError`}},F=e=>{throw new ke(e)},I=(e,t,n)=>{e.forEach(e=>P[e]=t);function r(t){var r=n(t);r.length!==e.length&&F(`Mismatched type converter count`);for(var i=0;i<e.length;++i)B(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())N.hasOwnProperty(n)?i[e]=N[n]:(a.push(n),M.hasOwnProperty(n)||(M[n]=[]),M[n].push(()=>{i[e]=N[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},Ae=function(e){e>>>=0;var t=A[e];delete A[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));I([e],a,e=>{var a={};for(var[o,s]of i.entries()){let t=e[o],n=s.getter,r=s.getterContext,c=e[o+i.length],l=s.setter,u=s.setterContext;a[s.fieldName]={read:e=>t.fromWireType(n(r,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),Oe(n)},optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:j,destructorFunction:r}]})},L=e=>{e>>>=0;for(var t=``;;){var n=x[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},R=class extends Error{constructor(e){super(e),this.name=`BindingError`}},z=e=>{throw new R(e)};function je(e,t,n={}){var r=t.name;if(e||z(`type "${r}" must have a positive integer typeid pointer`),N.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;z(`Cannot register type '${r}' twice`)}if(N[e]=t,delete P[e],M.hasOwnProperty(e)){var i=M[e];delete M[e],i.forEach(e=>e())}}function B(e,t,n={}){return je(e,t,n)}var Me=(e,t,n)=>{switch(t){case 1:return n?e=>b[e>>>0]:e=>x[e>>>0];case 2:return n?e=>S[e>>>1>>>0]:e=>C[e>>>1>>>0];case 4:return n?e=>w[e>>>2>>>0]:e=>T[e>>>2>>>0];case 8:return n?e=>re[e>>>3>>>0]:e=>ie[e>>>3>>>0];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Ne=function(e,t,n,r,i){e>>>=0,t>>>=0,n>>>=0,t=L(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:Me(t,n,!a),destructorFunction:null})};function Pe(e,t,n,r){e>>>=0,t>>>=0,t=L(t),B(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(x[e>>>0])},destructorFunction:null})}var Fe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ie=e=>{function t(e){return e.$$.ptrType.registeredClass.name}z(t(e)+` instance already deleted`)},Le=!1,Re=e=>{},ze=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Be=e=>{--e.count.value,e.count.value===0&&ze(e)},V=e=>globalThis.FinalizationRegistry?(Le=new FinalizationRegistry(e=>{Be(e.$$)}),V=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Le.register(e,n,e)}return e},Re=e=>Le.unregister(e),V(e)):(V=e=>e,e),H=[],Ve=()=>{for(;H.length;){var e=H.pop();e.$$.deleteScheduled=!1,e.delete()}},He,Ue=()=>{let e=U.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof U)||!(e instanceof U))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Ie(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=V(Object.create(Object.getPrototypeOf(this),{$$:{value:Fe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&z(`Object already scheduled for deletion`),Re(this),Be(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&z(`Object already scheduled for deletion`),H.push(this),H.length===1&&He&&He(Ve),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function U(){}var We=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ge={},Ke=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||z(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},W=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&z(`Cannot register public name '${e}' twice`),Ke(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&z(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].overloadTable[n]=t):(i[e]=t,i[e].argCount=n)},qe=48,Je=57,Ye=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=qe&&t<=Je?`_${e}`:e};function Xe(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var Ze=(e,t,n)=>{for(;t!==n;)t.upcast||z(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},Qe=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function $e(e,t){if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),0;t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ze(t.$$.ptr,n,this.registeredClass)}function et(e,t){var n;if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t&&t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&z(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=Ze(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&z(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:z(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,q.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:z(`Unsupported sharing policy`)}return n}function tt(e,t){if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),0;t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&z(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ze(t.$$.ptr,n,this.registeredClass)}var nt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=nt(e,t,n.baseClass);return r===null?null:n.downcast(r)},rt={},it=(e,t)=>{for(t===void 0&&z(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},at=(e,t)=>(t=it(e,t),rt[t]),ot=(e,t)=>(t.ptrType&&t.ptr||F(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&F(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},V(Object.create(e,{$$:{value:t,writable:!0}})));function st(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=at(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=Ge[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=nt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?ot(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):ot(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var ct=()=>{Object.assign(lt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},readValueFromPointer:j,fromWireType:st})};function lt(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=$e,this.destructorFunction=null):(this.toWireType=tt,this.destructorFunction=null):this.toWireType=et}var ut=(e,t,n)=>{i.hasOwnProperty(e)||F(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},dt=e=>Q.get(e),ft=(e,t,n=[],r=!1)=>{var i=dt(t)(...n);function a(t){return e[0]==`p`?t>>>0:t}return a(i)},pt=(e,t,n=!1)=>(...r)=>ft(e,t,r,n),G=(e,t,n=!1)=>{e=L(e);function r(){return e.includes(`p`)?pt(e,t,n):dt(t)}var i=r();return typeof i!=`function`&&z(`unknown function pointer with signature ${e}: ${t}`),i};class mt extends Error{}var ht=e=>{var t=zn(e),n=L(t);return Z(t),n},gt=(e,t)=>{var n=[],r={};function i(e){r[e]||N[e]||(P[e]?P[e].forEach(i):(n.push(e),r[e]=!0))}throw t.forEach(i),new mt(`${e}: `+n.map(ht).join([`, `]))};function _t(e,t,n,r,i,a,o,s,c,l,u,d,f){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0,s>>>=0,c>>>=0,l>>>=0,u>>>=0,d>>>=0,f>>>=0,u=L(u),a=G(i,a),s&&=G(o,s),l&&=G(c,l),f=G(d,f);var p=Ye(u);W(p,function(){gt(`Cannot construct ${u} due to unbound types`,[r])}),I([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=U.prototype;var o=We(u,function(...e){if(Object.getPrototypeOf(this)!==c)throw new R(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new R(`${u} has no accessible constructor`);var t=d.constructor_body[e.length];if(t===void 0)throw new R(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Xe(u,o,c,f,n,a,s,l);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var m=new lt(u,d,!0,!1,!1),h=new lt(u+`*`,d,!1,!1,!1),g=new lt(u+` const*`,d,!1,!0,!1);return Ge[e]={pointerType:h,constPointerType:g},ut(p,o),[m,h,g]})}var vt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(T[t+r*4>>>2>>>0]);return n};function yt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}var bt={ftf:function(e,t,n,r,i,a,o){return function(){return a(n(r))}},tffn:function(e,t,n,r,i,a,o){return function(){n(r,o(null,this))}},ttfn:function(e,t,n,r,i,a,o){return function(){return a(n(r,o(null,this)))}},ttfnn:function(e,t,n,r,i,a,o,s){return function(e){return a(n(r,o(null,this),s(null,e)))}},ttfnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){return a(n(r,o(null,this),s(null,e),c(null,t)))}},ttfnntnnn:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,p,m){var h=o(null,this),g=s(null,e),_=c(null,t),v=n(r,h,g,_,l(null,i),u(null,p),d(null,m));return f(_),a(v)}},tffnt:function(e,t,n,r,i,a,o,s,c){return function(e){var t=o(null,this),i=s(null,e);n(r,t,i),c(i)}},tffnnt:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),a=s(null,e),u=c(null,t);n(r,i,a,u),l(u)}},ttfnnt:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),u=s(null,e),d=c(null,t),f=n(r,i,u,d);return l(d),a(f)}},tffnn:function(e,t,n,r,i,a,o,s){return function(e){n(r,o(null,this),s(null,e))}},tffnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){n(r,o(null,this),s(null,e),c(null,t))}},ftfnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){return a(n(r,s(null,e),c(null,t)))}},ttfnt:function(e,t,n,r,i,a,o,s,c){return function(e){var t=o(null,this),i=s(null,e),l=n(r,t,i);return c(i),a(l)}},ttfnnnnn:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t,i,d){return a(n(r,o(null,this),s(null,e),c(null,t),l(null,i),u(null,d)))}},ftftn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=s(null,e),o=n(r,i,c(null,t));return l(i),a(o)}},ftfn:function(e,t,n,r,i,a,o,s){return function(e){return a(n(r,s(null,e)))}},fffnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){n(r,s(null,e),c(null,t))}},ttfntn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),u=s(null,e),d=n(r,i,u,c(null,t));return l(u),a(d)}},ttfnnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){return a(n(r,o(null,this),s(null,e),c(null,t),l(null,i)))}},ttfntt:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t){var i=o(null,this),d=s(null,e),f=c(null,t),p=n(r,i,d,f);return l(d),u(f),a(p)}},ftfnnnnn:function(e,t,n,r,i,a,o,s,c,l,u,d){return function(e,t,i,o,f){return a(n(r,s(null,e),c(null,t),l(null,i),u(null,o),d(null,f)))}},ftfnnnnt:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,o,p){var m=s(null,e),h=c(null,t),g=l(null,i),_=u(null,o),v=d(null,p),y=n(r,m,h,g,_,v);return f(v),a(y)}},ftfnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){return a(n(r,s(null,e),c(null,t),l(null,i)))}},ftfntnnn:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,o,p){var m=s(null,e),h=c(null,t),g=n(r,m,h,l(null,i),u(null,o),d(null,p));return f(h),a(g)}},fffn:function(e,t,n,r,i,a,o,s){return function(e){n(r,s(null,e))}},fff:function(e,t,n,r,i,a,o){return function(){n(r)}}};function xt(e,t,n,r){let i=[t?`t`:`f`,n?`t`:`f`,r?`t`:`f`];for(let n=t?1:2;n<e.length;++n){let t=e[n],r=``;r=t.destructorFunction===void 0?`u`:t.destructorFunction===null?`n`:`t`,i.push(r)}return i.join(``)}function St(e,t,n,r,i,a){var o=t.length;o<2&&z(`argTypes array size mismatch! Must at least get return value and 'this' types!`);for(var s=t[1]!==null&&n!==null,c=yt(t),l=!t[0].isVoid,u=t[0],d=t[1],f=[e,z,r,i,Oe,u.fromWireType.bind(u),d?.toWireType.bind(d)],p=2;p<o;++p){var m=t[p];f.push(m.toWireType.bind(m))}if(!c)for(var p=s?1:2;p<t.length;++p)t[p].destructorFunction!==null&&f.push(t[p].destructorFunction);return We(e,bt[xt(t,s,l,a)](...f))}var Ct=function(e,t,n,r,i,a){e>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0;var o=vt(t,n);i=G(r,i),I([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new R(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{gt(`Cannot construct ${e.name} due to unbound types`,o)},I([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=St(n,r,null,i,a),[])),[]})},wt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Tt=function(e,t,n,r,i,a,o,s,c,l){e>>>=0,t>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0;var u=vt(n,r);t=L(t),t=wt(t),a=G(i,a,c),I([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){gt(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):(Ke(l,t,r),l[t].overloadTable[n-2]=i),I([],u,i=>{var s=St(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},Et=[],K=[0,1,,1,null,1,!0,1,!1,1];function Dt(e){e>>>=0,e>9&&--K[e+1]===0&&(K[e]=void 0,Et.push(e))}var q={toValue:e=>(e||z(`Cannot use deleted val. handle = ${e}`),K[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=Et.pop()||K.length;return K[t]=e,K[t+1]=1,t}}}},Ot={name:`emscripten::val`,fromWireType:e=>{var t=q.toValue(e);return Dt(e),t},toWireType:(e,t)=>q.toHandle(t),readValueFromPointer:j,destructorFunction:null};function kt(e){return e>>>=0,B(e,Ot)}var At=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(b[e>>>0])}:function(e){return this.fromWireType(x[e>>>0])};case 2:return n?function(e){return this.fromWireType(S[e>>>1>>>0])}:function(e){return this.fromWireType(C[e>>>1>>>0])};case 4:return n?function(e){return this.fromWireType(w[e>>>2>>>0])}:function(e){return this.fromWireType(T[e>>>2>>>0])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}};function jt(e){return e===0?`object`:e===1?`number`:`string`}function Mt(e,t,n,r,a){e>>>=0,t>>>=0,n>>>=0,t=L(t);let o=jt(a);switch(o){case`object`:{function i(){}i.values={},B(e,{name:t,constructor:i,valueType:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,i);break}case`number`:var s={};B(e,{name:t,keysMap:s,valueType:o,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,s),delete i[t].argCount;break;case`string`:var c={},l={},s={};B(e,{name:t,valuesMap:c,reverseMap:l,keysMap:s,valueType:o,fromWireType:function(e){return this.reverseMap[e]},toWireType:function(e,t){return this.valuesMap[t]},readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,s),delete i[t].argCount}}var Nt=(e,t)=>{var n=N[e];return n===void 0&&z(`${t} has unknown type ${ht(e)}`),n};function Pt(e,t,n){e>>>=0,t>>>=0;var r=Nt(e,`enum`);switch(t=L(t),r.valueType){case`object`:var i=r.constructor,a=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:We(`${r.name}_${t}`,function(){})}});i.values[n]=a,i[t]=a;break;case`number`:r.keysMap[t]=n;break;case`string`:r.valuesMap[t]=n,r.reverseMap[n]=t,r.keysMap[t]=t}}var Ft=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(ne[e>>>2>>>0])};case 8:return function(e){return this.fromWireType(E[e>>>3>>>0])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},It=function(e,t,n){e>>>=0,t>>>=0,n>>>=0,t=L(t),B(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ft(t,n),destructorFunction:null})};function Lt(e,t,n,r,i,a,o,s){e>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0;var c=vt(t,n);e=L(e),e=wt(e),i=G(r,i,o),W(e,function(){gt(`Cannot call ${e} due to unbound types`,c)},t-1),I([],c,n=>{var r=[n[0],null].concat(n.slice(1));return ut(e,St(e,r,null,i,a,o),t-1),[]})}var Rt=function(e,t,n,r,i){e>>>=0,t>>>=0,n>>>=0,t=L(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Me(t,n,r!==0),destructorFunction:null})},zt=(e,t,n)=>{let r=(e,t)=>{let n=0;return{next(){if(n>=e)return{done:!0};let r=n;return n++,{value:t(r),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){let e=this[t]();return r(e,e=>this[n](e))})},Bt=function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0,n=L(n),r=L(r),I([],[e,t],e=>{let t=e[0];return zt(t.registeredClass.instancePrototype,n,r),[]})};function Vt(e,t,n){e>>>=0,n>>>=0;var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=T[e>>>2>>>0],n=T[e+4>>>2>>>0];return new r(b.buffer,n,t)}n=L(n),B(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})}var Ht=Object.assign({optional:!0},Ot);function Ut(e,t){e>>>=0,t>>>=0,B(e,Ht)}var Wt=(e,t,n,r)=>{if(n>>>=0,!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=a)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|s&63}else{if(n+3>=a)break;t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|s&63,o++}}return t[n>>>0]=0,n-i},Gt=(e,t,n)=>Wt(e,x,t,n),Kt=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},qt=globalThis.TextDecoder&&new TextDecoder,Jt=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},Yt=(e,t=0,n,r)=>{t>>>=0;var i=Jt(e,t,n,r);if(i-t>16&&e.buffer&&qt)return qt.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128))a+=String.fromCharCode(o);else{var s=e[t++]&63;if((o&224)==192)a+=String.fromCharCode((o&31)<<6|s);else{var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}}}return a},Xt=(e,t,n)=>(e>>>=0,e?Yt(x,e,t,n):``);function Zt(e,t){e>>>=0,t>>>=0,t=L(t);var n=!0;B(e,{name:t,fromWireType(e){var t=T[e>>>2>>>0],r=e+4,i;if(n)i=Xt(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(x[r+a>>>0])}return Z(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||z(`Cannot pass non-string to std::string`),r=n&&i?Kt(t):t.length;var a=Bn(4+r+1),o=a+4;if(T[a>>>2>>>0]=r,i){if(n)Gt(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Z(a),z(`String has UTF-16 code units that do not fit in 8 bits`)),x[o+s>>>0]=c}}else x.set(t,o>>>0);return e!==null&&e.push(Z,a),a},readValueFromPointer:j,destructorFunction(e){Z(e)}})}var Qt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,$t=(e,t,n)=>{var r=e>>>1,i=Jt(C,r,t/2,n);if(i-r>16&&Qt)return Qt.decode(C.subarray(r>>>0,i>>>0));for(var a=``,o=r;o<i;++o){var s=C[o>>>0];a+=String.fromCharCode(s)}return a},en=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);S[t>>>1>>>0]=o,t+=2}return S[t>>>1>>>0]=0,t-r},tn=e=>e.length*2,nn=(e,t,n)=>{for(var r=``,i=e>>>2,a=0;!(a>=t/4);a++){var o=T[i+a>>>0];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},rn=(e,t,n)=>{if(t>>>=0,n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,w[t>>>2>>>0]=o,t+=4,t+4>i)break}return w[t>>>2>>>0]=0,t-r},an=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t};function on(e,t,n){e>>>=0,t>>>=0,n>>>=0,n=L(n);var r,i,a;t===2?(r=$t,i=en,a=tn):(r=nn,i=rn,a=an),B(e,{name:n,fromWireType:e=>{var n=T[e>>>2>>>0],i=r(e+4,n*t,!0);return Z(e),i},toWireType:(e,r)=>{typeof r!=`string`&&z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Bn(4+o+t);return T[s>>>2>>>0]=o/t,i(r,s+4,o+t),e!==null&&e.push(Z,s),s},readValueFromPointer:j,destructorFunction(e){Z(e)}})}function sn(e,t,n,r,i,a){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,A[e]={name:L(t),rawConstructor:G(n,r),rawDestructor:G(i,a),fields:[]}}function cn(e,t,n,r,i,a,o,s,c,l){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0,s>>>=0,c>>>=0,l>>>=0,A[e].fields.push({fieldName:L(t),getterReturnType:n,getter:G(r,i),getterContext:a,setterArgumentType:o,setter:G(s,c),setterContext:l})}var ln=function(e,t){e>>>=0,t>>>=0,t=L(t),B(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})};function un(e,t){e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),e.set(t)}var dn=[],fn=e=>{var t=dn.length;return dn.push(e),t},pn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Nt(T[t+r*4>>>2>>>0],`parameter ${r}`);return n},mn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(T[t>>>2>>>0]=q.toHandle(r)),i},hn={},gn=e=>{var t=hn[e];return t===void 0?L(e):t},_n=function(e,t,n){t>>>=0;var r=8,[i,...a]=pn(e,t),o=i.toWireType.bind(i),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var c=Array(e);return fn(We(`methodCaller<(${a.map(e=>e.name)}) => ${i.name}>`,(t,i,a,l)=>{for(var u=0,d=0;d<e;++d)c[d]=s[d](l+u),u+=r;var f;switch(n){case 0:f=q.toValue(t).apply(null,c);break;case 2:f=Reflect.construct(q.toValue(t),c);break;case 3:f=c[0];break;case 1:f=q.toValue(t)[gn(i)](...c)}return mn(o,a,f)}))};function vn(e,t){return e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),e==t}function yn(e,t){return e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),q.toHandle(e[t])}function bn(e){e>>>=0,e>9&&(K[e+1]+=1)}function xn(e,t,n,r,i){return e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,dn[e](t,n,r,i)}function Sn(e){return e>>>=0,q.toHandle(gn(e))}function Cn(){return q.toHandle({})}function wn(e){e>>>=0,Oe(q.toValue(e)),Dt(e)}function Tn(e,t,n){e>>>=0,t>>>=0,n>>>=0,e=q.toValue(e),t=q.toValue(t),n=q.toValue(n),e[t]=n}var En=()=>4294901760,Dn=(e,t)=>Math.ceil(e/t)*t,On=e=>{var t=(e-Vn.buffer.byteLength+65535)/65536|0;try{return Vn.grow(t),oe(),1}catch{}};function kn(e){e>>>=0;var t=x.length,n=En();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),On(Math.min(n,Dn(Math.max(e,i),65536))))return!0}return!1}var An=(e,t)=>{if(J)for(var n=e;n<e+t;n++){var r=dt(n);r&&J.set(r,n)}},J,jn=e=>(J||(J=new WeakMap,An(0,Q.length)),J.get(e)||0),Mn=[],Nn=()=>Mn.length?Mn.pop():Q.grow(1),Pn=(e,t)=>Q.set(e,t),Fn=e=>{let t=e.length;return[t%128|128,t>>7,...e]},In={i:127,p:127,j:126,f:125,d:124,e:111},Ln=e=>Fn(Array.from(e,e=>In[e])),Rn=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Fn([1,96,...Ln(t.slice(1)),...Ln(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f},Y=(e,t)=>{var n=jn(e);if(n)return n;var r=Nn();try{Pn(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Pn(r,Rn(e,t))}return J.set(e,r),r},X=e=>{J.delete(dt(e)),Pn(e,null),Mn.push(e)};if(Ue(),ct(),i.noExitRuntime&&i.noExitRuntime,i.print&&i.print,i.printErr&&(g=i.printErr),i.wasmBinary&&(_=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.preInit)for(typeof i.preInit==`function`&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()();i.addFunction=Y,i.removeFunction=X;var zn,Bn,Z,Vn,Q;function Hn(e){zn=e.K,Bn=e.M,Z=e.N,Vn=e.I,Q=e.L}var Un={l:Ee,C:De,q:Ae,z:Ne,G:Pe,j:_t,i:Ct,a:Tt,E:kt,x:Mt,d:Pt,y:It,c:Lt,p:Rt,m:Bt,h:Vt,n:Ut,F:Zt,w:on,r:sn,k:cn,H:ln,u:un,g:_n,b:Dt,o:vn,B:yn,t:bn,f:xn,s:Sn,A:Cn,e:wn,v:Tn,D:kn};function Wn(e){e=Object.assign({},e);var t=e=>t=>e(t)>>>0;return e.K=t(e.K),e.M=t(e.M),e._emscripten_stack_alloc=t(e._emscripten_stack_alloc),e.emscripten_stack_get_current=(e=>()=>e()>>>0)(e.emscripten_stack_get_current),e}function Gn(){se();function e(){i.calledRun=!0,v||(ce(),ee?.(i),i.onRuntimeInitialized?.(),le())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var $=await _e();return Gn(),r=ae?i:new Promise((e,t)=>{ee=e,te=t}),r}export{n as default};
2
+ import{o as e}from"./rolldown-runtime-BCiCTKAo.js";import{t}from"./preload-helper-7y9sWmk5.js";async function n(n={}){var r,i=n,a=!!globalThis.window,o=!!globalThis.WorkerGlobalScope,s=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;if(s){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-BwpP9LFt.js`).then(t=>e(t.t(),1));return{createRequire:t}},__vite__mapDeps([0,1]));var c=n(import.meta.url)}var l=!1;i.setup=function(){if(l)return;l=!0,i.initTBB();function e(e,t,n=(e=>e)){if(t)for(let r of t)e.push_back(n(r));return e}function t(e,t=(e=>e)){let n=[],r=e.size();for(let i=0;i<r;i++)n.push(t(e.get(i)));return n}function n(e,t=(e=>e)){let n=[],r=e.size();for(let i=0;i<r;i++){let r=e.get(i),a=r.size(),o=[];for(let e=0;e<a;e++)o.push(t(r.get(e)));n.push(o)}return n}function r(t){return t[0].length<3&&(t=[t]),e(new i.Vector2_vec2,t,t=>e(new i.Vector_vec2,t,e=>e instanceof Array?{x:e[0],y:e[1]}:e))}function a(e){for(let t=0;t<e.size();t++)e.get(t).delete();e.delete()}function o(e){return e[0]instanceof Array?{x:e[0][0],y:e[0][1]}:typeof e[0]==`number`?{x:e[0]||0,y:e[1]||0}:e[0]}function s(e){return e[0]instanceof Array?{x:e[0][0],y:e[0][1],z:e[0][2]}:typeof e[0]==`number`?{x:e[0]||0,y:e[1]||0,z:e[2]||0}:e[0]}function c(e){return e==`EvenOdd`?0:e==`NonZero`?1:e==`Negative`?3:2}function u(e){return e==`Round`?1:e==`Miter`?2:0}let d=i.CrossSection;function f(e,t=`Positive`){if(e instanceof d)return e;{let n=r(e),i=new d(n,c(t));return a(n),i}}i.CrossSection.prototype.translate=function(...e){return this._Translate(o(e))},i.CrossSection.prototype.scale=function(e){return typeof e==`number`?this._Scale({x:e,y:e}):this._Scale(o([e]))},i.CrossSection.prototype.mirror=function(e){return this._Mirror(o([e]))},i.CrossSection.prototype.warp=function(e){let t=Y(function(t){let n=[O(t,`double`),O(t+8,`double`)];e(n),k(t,n[0],`double`),k(t+8,n[1],`double`)},`vi`),n=this._Warp(t);return X(t),n},i.CrossSection.prototype.decompose=function(){let e=this._Decompose(),n=t(e);return e.delete(),n},i.CrossSection.prototype.bounds=function(){let e=this._Bounds();return{min:[`x`,`y`].map(t=>e.min[t]),max:[`x`,`y`].map(t=>e.max[t])}},i.CrossSection.prototype.offset=function(e,t=`Round`,n=2,r=0){return this._Offset(e,u(t),n,r)},i.CrossSection.prototype.simplify=function(e=1e-6){return this._Simplify(e)},i.CrossSection.prototype.extrude=function(e,t=0,n=0,r=[1,1],a=!1){r=o([r]);let s=i._Extrude(this._ToPolygons(),e,t,n,r);return a?s.translate([0,0,-e/2]):s},i.CrossSection.prototype.revolve=function(e=0,t=360){return i._Revolve(this._ToPolygons(),e,t)},i.CrossSection.prototype.add=function(e){return this._add(f(e))},i.CrossSection.prototype.subtract=function(e){return this._subtract(f(e))},i.CrossSection.prototype.intersect=function(e){return this._intersect(f(e))},i.CrossSection.prototype.toPolygons=function(){let e=this._ToPolygons(),t=n(e,e=>[e.x,e.y]);return e.delete(),t},i.Manifold.prototype.smoothOut=function(e=52.5,t=0){return this._SmoothOut(e,t)},i.Manifold.prototype.warp=function(e){let t=Y(function(t){let n=[O(t,`double`),O(t+8,`double`),O(t+16,`double`)];e(n),k(t,n[0],`double`),k(t+8,n[1],`double`),k(t+16,n[2],`double`)},`vi`),n=this._Warp(t);X(t);let r=n.status();if(r!==`NoError`)throw new i.ManifoldError(r);return n},i.Manifold.prototype.warpBatch=function(e){let t=Y(function(t,n){let r=i.HEAPF64??E;if(!r)throw Error(`WASM heap is not initialized (HEAPF64 unavailable)`);e(new Float64Array(r.buffer,t,n*3),n)},`vii`),n=this._WarpBatch(t);X(t);let r=n.status();if(r!==`NoError`)throw new i.ManifoldError(r);return n},i.Manifold.prototype.calculateNormals=function(e=0,t=52.5){return this._CalculateNormals(e,t)},i.Manifold.prototype.smoothByNormals=function(e=0){return this._SmoothByNormals(e)},i.Manifold.prototype.setProperties=function(e,t){let n=this.numProp(),r=Y(function(r,i,a){let o=[];for(let t=0;t<e;++t)o[t]=O(r+8*t,`double`);let s=[];for(let e=0;e<3;++e)s[e]=O(i+8*e,`double`);let c=[];for(let e=0;e<n;++e)c[e]=O(a+8*e,`double`);t(o,s,c);for(let t=0;t<e;++t)k(r+8*t,o[t],`double`)},`viii`),i=this._SetProperties(e,r);return X(r),i},i.Manifold.prototype.translate=function(...e){return this._Translate(s(e))},i.Manifold.prototype.rotate=function(e,t,n){return Array.isArray(e)?this._Rotate(...e):this._Rotate(e,t||0,n||0)},i.Manifold.prototype.scale=function(e){return typeof e==`number`?this._Scale({x:e,y:e,z:e}):this._Scale(s([e]))},i.Manifold.prototype.mirror=function(e){return this._Mirror(s([e]))},i.Manifold.prototype.trimByPlane=function(e,t=0){return this._TrimByPlane(s([e]),t)},i.Manifold.prototype.slice=function(e=0){let t=this._Slice(e),n=new d(t,c(`Positive`));return a(t),n},i.Manifold.prototype.project=function(){let e=this._Project(),t=new d(e,c(`Positive`));return a(e),t},i.Manifold.prototype.rayCast=function(e,n){let r=this._RayCast(s([e]),s([n])),i=t(r,e=>({faceID:e.faceID,distance:e.distance,position:[`x`,`y`,`z`].map(t=>e.position[t]),normal:[`x`,`y`,`z`].map(t=>e.normal[t])}));return r.delete(),i},i.Manifold.prototype.split=function(e){let n=this._Split(e),r=t(n);return n.delete(),r},i.Manifold.prototype.splitByPlane=function(e,n=0){let r=this._SplitByPlane(s([e]),n),i=t(r);return r.delete(),i},i.Manifold.prototype.decompose=function(){let e=this._Decompose(),n=t(e);return e.delete(),n},i.Manifold.prototype.boundingBox=function(){let e=this._boundingBox();return{min:[`x`,`y`,`z`].map(t=>e.min[t]),max:[`x`,`y`,`z`].map(t=>e.max[t])}},i.Manifold.prototype.simplify=function(e=0){return this._Simplify(e)};class p{constructor({numProp:e=3,triVerts:t=new Uint32Array,vertProperties:n=new Float32Array,mergeFromVert:r,mergeToVert:i,runIndex:a,runOriginalID:o,faceID:s,halfedgeTangent:c,runTransform:l,runFlags:u,tolerance:d=0}={}){this.numProp=e,this.triVerts=t,this.vertProperties=n,this.mergeFromVert=r,this.mergeToVert=i,this.runIndex=a,this.runOriginalID=o,this.faceID=s,this.halfedgeTangent=c,this.runTransform=l,this.runFlags=u,this.tolerance=d}get numTri(){return this.triVerts.length/3}get numVert(){return this.vertProperties.length/this.numProp}get numRun(){return this.runOriginalID.length}merge(){let{changed:e,mesh:t}=i._Merge(this);return Object.assign(this,{...t}),e}verts(e){return this.triVerts.subarray(3*e,3*(e+1))}position(e){return this.vertProperties.subarray(this.numProp*e,this.numProp*e+3)}extras(e){return this.vertProperties.subarray(this.numProp*e+3,this.numProp*(e+1))}tangent(e){return this.halfedgeTangent.subarray(4*e,4*(e+1))}transform(e){let t=Array(16);for(let n of[0,1,2,3])for(let r of[0,1,2])t[4*n+r]=this.runTransform[12*e+3*n+r];return t[15]=1,t}backside(e){return this.runFlags!=null&&e<this.runFlags.length&&!!(this.runFlags[e]&1)}hasNormals(e){return this.runFlags!=null&&e<this.runFlags.length&&!!(this.runFlags[e]&2)}}i.Mesh=p,i.Manifold.prototype.getMesh=function(e=-1){return new p(this._GetMeshJS(e))},i.ManifoldError=function(e,...t){let n=`Unknown error`;switch(e){case`NonFiniteVertex`:n=`Non-finite vertex`;break;case`NotManifold`:n=`Not manifold`;break;case`VertexOutOfBounds`:n=`Vertex index out of bounds`;break;case`PropertiesWrongLength`:n=`Properties have wrong length`;break;case`MissingPositionProperties`:n=`Less than three properties`;break;case`MergeVectorsDifferentLengths`:n=`Merge vectors have different lengths`;break;case`MergeIndexOutOfBounds`:n=`Merge index out of bounds`;break;case`TransformWrongLength`:n=`Transform vector has wrong length`;break;case`RunIndexWrongLength`:n=`Run index vector has wrong length`;break;case`FaceIDWrongLength`:n=`Face ID vector has wrong length`;break;case`InvalidConstruction`:n=`Manifold constructed with invalid parameters`;break;case`ResultTooLarge`:n=`Result exceeds maximum size`;break;case`InvalidTangents`:n=`Invalid halfedge tangents`}let r=Error.apply(this,[n,...t]);r.name=this.name=`ManifoldError`,this.message=r.message,this.stack=r.stack,this.code=e},i.ManifoldError.prototype=Object.create(Error.prototype,{constructor:{value:i.ManifoldError,writable:!0,configurable:!0}}),i.CrossSection=function(e,t=`Positive`){let n=r(e),i=new d(n,c(t));return a(n),i},i.CrossSection.ofPolygons=function(e,t=`Positive`){return new i.CrossSection(e,t)},i.CrossSection.square=function(...e){let t;t=e.length==0?{x:1,y:1}:typeof e[0]==`number`?{x:e[0],y:e[0]}:o(e);let n=e[1]||!1;return i._Square(t,n)},i.CrossSection.circle=function(e,t=0){return i._Circle(e,t)};function m(e){return function(...t){t.length==1&&(t=t[0]);let n=new i.Vector_crossSection;for(let e of t)n.push_back(f(e));let r=i[`_crossSection`+e](n);return n.delete(),r}}i.CrossSection.compose=m(`Compose`),i.CrossSection.union=m(`UnionN`),i.CrossSection.difference=m(`DifferenceN`),i.CrossSection.intersection=m(`IntersectionN`);function h(t,n){e(t,n,e=>e instanceof Array?{x:e[0],y:e[1]}:e)}i.CrossSection.hull=function(...e){e.length==1&&(e=e[0]);let t=new i.Vector_vec2;for(let n of e)if(n instanceof d)i._crossSectionCollectVertices(t,n);else if(n instanceof Array&&n.length==2&&typeof n[0]==`number`)t.push_back({x:n[0],y:n[1]});else if(n.x)t.push_back(n);else{let e=n[0].length==2&&typeof n[0][0]==`number`||n[0].x?[n]:n;for(let n of e)h(t,n)}let n=i._crossSectionHullPoints(t);return t.delete(),n},i.CrossSection.prototype=Object.create(d.prototype),Object.defineProperty(i.CrossSection,Symbol.hasInstance,{get:()=>e=>e instanceof d});let g=i.Manifold;i.Manifold=function(e){let t=new g(e),n=t.status();if(n!==`NoError`)throw new i.ManifoldError(n);return t},i.Manifold.ofMesh=function(e){return new i.Manifold(e)},i.Manifold.tetrahedron=function(){return i._Tetrahedron()},i.Manifold.cube=function(...e){let t;t=e.length==0?{x:1,y:1,z:1}:typeof e[0]==`number`?{x:e[0],y:e[0],z:e[0]}:s(e);let n=e[1]||!1;return i._Cube(t,n)},i.Manifold.cylinder=function(e,t,n=-1,r=0,a=!1){return i._Cylinder(e,t,n,r,a)},i.Manifold.sphere=function(e,t=0){return i._Sphere(e,t)},i.Manifold.smooth=function(t,n=[]){let r=new i.Vector_smoothness;e(r,n);let a=i._Smooth(t,r);return r.delete(),a},i.Manifold.extrude=function(e,t,n=0,r=0,a=[1,1],o=!1){return(e instanceof d?e:i.CrossSection(e,`Positive`)).extrude(t,n,r,a,o)},i.Manifold.revolve=function(e,t=0,n=360){return(e instanceof d?e:i.CrossSection(e,`Positive`)).revolve(t,n)},i.Manifold.reserveIDs=function(e){return i._ReserveIDs(e)};function _(e){return function(...t){t.length==1&&(t=t[0]);let n=new i.Vector_manifold;for(let e of t)n.push_back(e);let r=i[`_manifold`+e+`N`](n);return n.delete(),r}}i.Manifold.union=_(`Union`),i.Manifold.compose=i.Manifold.union,i.Manifold.difference=_(`Difference`),i.Manifold.intersection=_(`Intersection`),i.Manifold.levelSet=function(e,t,n,r=0,a=-1){let o={min:{x:t.min[0],y:t.min[1],z:t.min[2]},max:{x:t.max[0],y:t.max[1],z:t.max[2]}},s=Y(function(t){return e([O(t,`double`),O(t+8,`double`),O(t+16,`double`)])},`di`),c=i._LevelSet(s,o,n,r,a);return X(s),c},i.ExecutionContext.prototype.fromMesh=function(e){return this._FromMesh(e)},i.ExecutionContext.prototype.smooth=function(t,n=[]){let r=new i.Vector_smoothness;e(r,n);let a=this._Smooth(t,r);return r.delete(),a},i.ExecutionContext.prototype.levelSet=function(e,t,n,r=0,i=-1){let a={min:{x:t.min[0],y:t.min[1],z:t.min[2]},max:{x:t.max[0],y:t.max[1],z:t.max[2]}},o=Y(function(t){return e([O(t,`double`),O(t+8,`double`),O(t+16,`double`)])},`di`),s=this._LevelSet(o,a,n,r,i);return X(o),s};function v(t,n){e(t,n,e=>e instanceof Array?{x:e[0],y:e[1],z:e[2]}:e)}i.Manifold.hull=function(...e){e.length==1&&(e=e[0]);let t=new i.Vector_vec3;for(let n of e)n instanceof g?i._manifoldCollectVertices(t,n):n instanceof Array&&n.length==3&&typeof n[0]==`number`?t.push_back({x:n[0],y:n[1],z:n[2]}):n.x?t.push_back(n):v(t,n);let n=i._manifoldHullPoints(t);return t.delete(),n},i.Manifold.prototype=Object.create(g.prototype),Object.defineProperty(i.Manifold,Symbol.hasInstance,{get:()=>e=>e instanceof g}),i.triangulate=function(e,n=-1,o=!0){let s=r(e),c=t(i._Triangulate(s,n,o),e=>[e[0],e[1],e[2]]);return a(s),c}};var u=import.meta.url,d=``;function f(e){return i.locateFile?i.locateFile(e,d):d+e}var p,m;if(s){var h=c("node:fs");u.startsWith(`file:`)&&(d=c("node:path").dirname(c("node:url").fileURLToPath(u))+`/`),m=e=>(e=y(e)?new URL(e):e,h.readFileSync(e)),p=async(e,t=!0)=>(e=y(e)?new URL(e):e,h.readFileSync(e,t?void 0:`utf8`)),process.argv.length>1&&process.argv[1].replace(/\\/g,`/`),process.argv.slice(2)}else if(a||o){try{d=new URL(`.`,u).href}catch{}o&&(m=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),p=async e=>{if(y(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}console.log.bind(console);var g=console.error.bind(console),_,v=!1,y=e=>e.startsWith(`file://`),ee,te,b,x,S,C,w,T,ne,E,re,ie,ae=!1;function oe(){var e=Vn.buffer;b=new Int8Array(e),S=new Int16Array(e),x=new Uint8Array(e),C=new Uint16Array(e),w=new Int32Array(e),T=new Uint32Array(e),ne=new Float32Array(e),E=new Float64Array(e),re=new BigInt64Array(e),ie=new BigUint64Array(e)}function se(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)Se(i.preRun.shift());ve(xe)}function ce(){ae=!0,$.J()}function le(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)be(i.postRun.shift());ve(ye)}function D(e){i.onAbort?.(e),e=`Aborted(`+e+`)`,g(e),v=!0,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw te?.(t),t}var ue;function de(){return i.locateFile?f(`manifold.wasm`):new URL(`/assets/manifold-B_yLhOkb.wasm`,``+import.meta.url).href}function fe(e){if(e==ue&&_)return new Uint8Array(_);if(m)return m(e);throw`both async and sync fetching of the wasm failed`}async function pe(e){if(!_)try{var t=await p(e);return new Uint8Array(t)}catch{}return fe(e)}async function me(e,t){try{var n=await pe(e);return await WebAssembly.instantiate(n,t)}catch(e){g(`failed to asynchronously prepare wasm: ${e}`),D(e)}}async function he(e,t,n){if(!e&&!y(t)&&!s)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){g(`wasm streaming compile failed: ${e}`),g(`falling back to ArrayBuffer instantiation`)}return me(t,n)}function ge(){return{a:Un}}async function _e(){function e(e,t){return $=e.exports,$=Wn($),Hn($),oe(),$}function t(t){return e(t.instance)}var n=ge();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(ue??=de(),t(await he(_,ue,n)))}var ve=e=>{for(;e.length>0;)e.shift()(i)},ye=[],be=e=>ye.push(e),xe=[],Se=e=>xe.push(e);function O(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return b[e>>>0];case`i8`:return b[e>>>0];case`i16`:return S[e>>>1>>>0];case`i32`:return w[e>>>2>>>0];case`i64`:return re[e>>>3>>>0];case`float`:return ne[e>>>2>>>0];case`double`:return E[e>>>3>>>0];case`*`:return T[e>>>2>>>0];default:D(`invalid type for getValue: ${t}`)}}function k(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:b[e>>>0]=t;break;case`i8`:b[e>>>0]=t;break;case`i16`:S[e>>>1>>>0]=t;break;case`i32`:w[e>>>2>>>0]=t;break;case`i64`:re[e>>>3>>>0]=BigInt(t);break;case`float`:ne[e>>>2>>>0]=t;break;case`double`:E[e>>>3>>>0]=t;break;case`*`:T[e>>>2>>>0]=t;break;default:D(`invalid type for setValue: ${n}`)}}class Ce{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){T[this.ptr+4>>>2>>>0]=e}get_type(){return T[this.ptr+4>>>2>>>0]}set_destructor(e){T[this.ptr+8>>>2>>>0]=e}get_destructor(){return T[this.ptr+8>>>2>>>0]}set_caught(e){e=+!!e,b[this.ptr+12>>>0]=e}get_caught(){return b[this.ptr+12>>>0]!=0}set_rethrown(e){e=+!!e,b[this.ptr+13>>>0]=e}get_rethrown(){return b[this.ptr+13>>>0]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){T[this.ptr+16>>>2>>>0]=e}get_adjusted_ptr(){return T[this.ptr+16>>>2>>>0]}}var we=0,Te=0;function Ee(e,t,n){throw e>>>=0,t>>>=0,n>>>=0,new Ce(e).init(t,n),we=e,Te++,we}var De=()=>D(``),A={},Oe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function j(e){return this.fromWireType(T[e>>>2>>>0])}var M={},N={},P={},ke=class extends Error{constructor(e){super(e),this.name=`InternalError`}},F=e=>{throw new ke(e)},I=(e,t,n)=>{e.forEach(e=>P[e]=t);function r(t){var r=n(t);r.length!==e.length&&F(`Mismatched type converter count`);for(var i=0;i<e.length;++i)B(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())N.hasOwnProperty(n)?i[e]=N[n]:(a.push(n),M.hasOwnProperty(n)||(M[n]=[]),M[n].push(()=>{i[e]=N[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},Ae=function(e){e>>>=0;var t=A[e];delete A[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));I([e],a,e=>{var a={};for(var[o,s]of i.entries()){let t=e[o],n=s.getter,r=s.getterContext,c=e[o+i.length],l=s.setter,u=s.setterContext;a[s.fieldName]={read:e=>t.fromWireType(n(r,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),Oe(n)},optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:j,destructorFunction:r}]})},L=e=>{e>>>=0;for(var t=``;;){var n=x[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},R=class extends Error{constructor(e){super(e),this.name=`BindingError`}},z=e=>{throw new R(e)};function je(e,t,n={}){var r=t.name;if(e||z(`type "${r}" must have a positive integer typeid pointer`),N.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;z(`Cannot register type '${r}' twice`)}if(N[e]=t,delete P[e],M.hasOwnProperty(e)){var i=M[e];delete M[e],i.forEach(e=>e())}}function B(e,t,n={}){return je(e,t,n)}var Me=(e,t,n)=>{switch(t){case 1:return n?e=>b[e>>>0]:e=>x[e>>>0];case 2:return n?e=>S[e>>>1>>>0]:e=>C[e>>>1>>>0];case 4:return n?e=>w[e>>>2>>>0]:e=>T[e>>>2>>>0];case 8:return n?e=>re[e>>>3>>>0]:e=>ie[e>>>3>>>0];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Ne=function(e,t,n,r,i){e>>>=0,t>>>=0,n>>>=0,t=L(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:Me(t,n,!a),destructorFunction:null})};function Pe(e,t,n,r){e>>>=0,t>>>=0,t=L(t),B(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(x[e>>>0])},destructorFunction:null})}var Fe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ie=e=>{function t(e){return e.$$.ptrType.registeredClass.name}z(t(e)+` instance already deleted`)},Le=!1,Re=e=>{},ze=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Be=e=>{--e.count.value,e.count.value===0&&ze(e)},V=e=>globalThis.FinalizationRegistry?(Le=new FinalizationRegistry(e=>{Be(e.$$)}),V=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Le.register(e,n,e)}return e},Re=e=>Le.unregister(e),V(e)):(V=e=>e,e),H=[],Ve=()=>{for(;H.length;){var e=H.pop();e.$$.deleteScheduled=!1,e.delete()}},He,Ue=()=>{let e=U.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof U)||!(e instanceof U))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Ie(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=V(Object.create(Object.getPrototypeOf(this),{$$:{value:Fe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&z(`Object already scheduled for deletion`),Re(this),Be(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&z(`Object already scheduled for deletion`),H.push(this),H.length===1&&He&&He(Ve),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function U(){}var We=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ge={},Ke=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||z(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},W=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&z(`Cannot register public name '${e}' twice`),Ke(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&z(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].overloadTable[n]=t):(i[e]=t,i[e].argCount=n)},qe=48,Je=57,Ye=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=qe&&t<=Je?`_${e}`:e};function Xe(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var Ze=(e,t,n)=>{for(;t!==n;)t.upcast||z(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},Qe=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function $e(e,t){if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),0;t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ze(t.$$.ptr,n,this.registeredClass)}function et(e,t){var n;if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t&&t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&z(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=Ze(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&z(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:z(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,q.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:z(`Unsupported sharing policy`)}return n}function tt(e,t){if(t===null)return this.isReference&&z(`null is not a valid ${this.name}`),0;t.$$||z(`Cannot pass "${Qe(t)}" as a ${this.name}`),t.$$.ptr||z(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&z(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ze(t.$$.ptr,n,this.registeredClass)}var nt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=nt(e,t,n.baseClass);return r===null?null:n.downcast(r)},rt={},it=(e,t)=>{for(t===void 0&&z(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},at=(e,t)=>(t=it(e,t),rt[t]),ot=(e,t)=>(t.ptrType&&t.ptr||F(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&F(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},V(Object.create(e,{$$:{value:t,writable:!0}})));function st(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=at(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=Ge[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=nt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?ot(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):ot(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var ct=()=>{Object.assign(lt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},readValueFromPointer:j,fromWireType:st})};function lt(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=$e,this.destructorFunction=null):(this.toWireType=tt,this.destructorFunction=null):this.toWireType=et}var ut=(e,t,n)=>{i.hasOwnProperty(e)||F(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},dt=e=>Q.get(e),ft=(e,t,n=[],r=!1)=>{var i=dt(t)(...n);function a(t){return e[0]==`p`?t>>>0:t}return a(i)},pt=(e,t,n=!1)=>(...r)=>ft(e,t,r,n),G=(e,t,n=!1)=>{e=L(e);function r(){return e.includes(`p`)?pt(e,t,n):dt(t)}var i=r();return typeof i!=`function`&&z(`unknown function pointer with signature ${e}: ${t}`),i};class mt extends Error{}var ht=e=>{var t=zn(e),n=L(t);return Z(t),n},gt=(e,t)=>{var n=[],r={};function i(e){r[e]||N[e]||(P[e]?P[e].forEach(i):(n.push(e),r[e]=!0))}throw t.forEach(i),new mt(`${e}: `+n.map(ht).join([`, `]))};function _t(e,t,n,r,i,a,o,s,c,l,u,d,f){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0,s>>>=0,c>>>=0,l>>>=0,u>>>=0,d>>>=0,f>>>=0,u=L(u),a=G(i,a),s&&=G(o,s),l&&=G(c,l),f=G(d,f);var p=Ye(u);W(p,function(){gt(`Cannot construct ${u} due to unbound types`,[r])}),I([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=U.prototype;var o=We(u,function(...e){if(Object.getPrototypeOf(this)!==c)throw new R(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new R(`${u} has no accessible constructor`);var t=d.constructor_body[e.length];if(t===void 0)throw new R(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Xe(u,o,c,f,n,a,s,l);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var m=new lt(u,d,!0,!1,!1),h=new lt(u+`*`,d,!1,!1,!1),g=new lt(u+` const*`,d,!1,!0,!1);return Ge[e]={pointerType:h,constPointerType:g},ut(p,o),[m,h,g]})}var vt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(T[t+r*4>>>2>>>0]);return n};function yt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}var bt={ftf:function(e,t,n,r,i,a,o){return function(){return a(n(r))}},tffn:function(e,t,n,r,i,a,o){return function(){n(r,o(null,this))}},ttfn:function(e,t,n,r,i,a,o){return function(){return a(n(r,o(null,this)))}},ttfnn:function(e,t,n,r,i,a,o,s){return function(e){return a(n(r,o(null,this),s(null,e)))}},ttfnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){return a(n(r,o(null,this),s(null,e),c(null,t)))}},ttfnntnnn:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,p,m){var h=o(null,this),g=s(null,e),_=c(null,t),v=n(r,h,g,_,l(null,i),u(null,p),d(null,m));return f(_),a(v)}},tffnt:function(e,t,n,r,i,a,o,s,c){return function(e){var t=o(null,this),i=s(null,e);n(r,t,i),c(i)}},tffnnt:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),a=s(null,e),u=c(null,t);n(r,i,a,u),l(u)}},ttfnnt:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),u=s(null,e),d=c(null,t),f=n(r,i,u,d);return l(d),a(f)}},tffnn:function(e,t,n,r,i,a,o,s){return function(e){n(r,o(null,this),s(null,e))}},tffnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){n(r,o(null,this),s(null,e),c(null,t))}},ftfnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){return a(n(r,s(null,e),c(null,t)))}},ttfnt:function(e,t,n,r,i,a,o,s,c){return function(e){var t=o(null,this),i=s(null,e),l=n(r,t,i);return c(i),a(l)}},ttfnnnnn:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t,i,d){return a(n(r,o(null,this),s(null,e),c(null,t),l(null,i),u(null,d)))}},ftftn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=s(null,e),o=n(r,i,c(null,t));return l(i),a(o)}},ftfn:function(e,t,n,r,i,a,o,s){return function(e){return a(n(r,s(null,e)))}},fffnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){n(r,s(null,e),c(null,t))}},ttfntn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t){var i=o(null,this),u=s(null,e),d=n(r,i,u,c(null,t));return l(u),a(d)}},ttfnnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){return a(n(r,o(null,this),s(null,e),c(null,t),l(null,i)))}},ttfntt:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t){var i=o(null,this),d=s(null,e),f=c(null,t),p=n(r,i,d,f);return l(d),u(f),a(p)}},ftfnnnnn:function(e,t,n,r,i,a,o,s,c,l,u,d){return function(e,t,i,o,f){return a(n(r,s(null,e),c(null,t),l(null,i),u(null,o),d(null,f)))}},ftfnnnnt:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,o,p){var m=s(null,e),h=c(null,t),g=l(null,i),_=u(null,o),v=d(null,p),y=n(r,m,h,g,_,v);return f(v),a(y)}},ftfnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){return a(n(r,s(null,e),c(null,t),l(null,i)))}},ftfntnnn:function(e,t,n,r,i,a,o,s,c,l,u,d,f){return function(e,t,i,o,p){var m=s(null,e),h=c(null,t),g=n(r,m,h,l(null,i),u(null,o),d(null,p));return f(h),a(g)}},fffn:function(e,t,n,r,i,a,o,s){return function(e){n(r,s(null,e))}},fff:function(e,t,n,r,i,a,o){return function(){n(r)}}};function xt(e,t,n,r){let i=[t?`t`:`f`,n?`t`:`f`,r?`t`:`f`];for(let n=t?1:2;n<e.length;++n){let t=e[n],r=``;r=t.destructorFunction===void 0?`u`:t.destructorFunction===null?`n`:`t`,i.push(r)}return i.join(``)}function St(e,t,n,r,i,a){var o=t.length;o<2&&z(`argTypes array size mismatch! Must at least get return value and 'this' types!`);for(var s=t[1]!==null&&n!==null,c=yt(t),l=!t[0].isVoid,u=t[0],d=t[1],f=[e,z,r,i,Oe,u.fromWireType.bind(u),d?.toWireType.bind(d)],p=2;p<o;++p){var m=t[p];f.push(m.toWireType.bind(m))}if(!c)for(var p=s?1:2;p<t.length;++p)t[p].destructorFunction!==null&&f.push(t[p].destructorFunction);return We(e,bt[xt(t,s,l,a)](...f))}var Ct=function(e,t,n,r,i,a){e>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0;var o=vt(t,n);i=G(r,i),I([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new R(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{gt(`Cannot construct ${e.name} due to unbound types`,o)},I([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=St(n,r,null,i,a),[])),[]})},wt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Tt=function(e,t,n,r,i,a,o,s,c,l){e>>>=0,t>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0;var u=vt(n,r);t=L(t),t=wt(t),a=G(i,a,c),I([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){gt(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):(Ke(l,t,r),l[t].overloadTable[n-2]=i),I([],u,i=>{var s=St(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},Et=[],K=[0,1,,1,null,1,!0,1,!1,1];function Dt(e){e>>>=0,e>9&&--K[e+1]===0&&(K[e]=void 0,Et.push(e))}var q={toValue:e=>(e||z(`Cannot use deleted val. handle = ${e}`),K[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=Et.pop()||K.length;return K[t]=e,K[t+1]=1,t}}}},Ot={name:`emscripten::val`,fromWireType:e=>{var t=q.toValue(e);return Dt(e),t},toWireType:(e,t)=>q.toHandle(t),readValueFromPointer:j,destructorFunction:null};function kt(e){return e>>>=0,B(e,Ot)}var At=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(b[e>>>0])}:function(e){return this.fromWireType(x[e>>>0])};case 2:return n?function(e){return this.fromWireType(S[e>>>1>>>0])}:function(e){return this.fromWireType(C[e>>>1>>>0])};case 4:return n?function(e){return this.fromWireType(w[e>>>2>>>0])}:function(e){return this.fromWireType(T[e>>>2>>>0])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}};function jt(e){return e===0?`object`:e===1?`number`:`string`}function Mt(e,t,n,r,a){e>>>=0,t>>>=0,n>>>=0,t=L(t);let o=jt(a);switch(o){case`object`:{function i(){}i.values={},B(e,{name:t,constructor:i,valueType:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,i);break}case`number`:var s={};B(e,{name:t,keysMap:s,valueType:o,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,s),delete i[t].argCount;break;case`string`:var c={},l={},s={};B(e,{name:t,valuesMap:c,reverseMap:l,keysMap:s,valueType:o,fromWireType:function(e){return this.reverseMap[e]},toWireType:function(e,t){return this.valuesMap[t]},readValueFromPointer:At(t,n,r),destructorFunction:null}),W(t,s),delete i[t].argCount}}var Nt=(e,t)=>{var n=N[e];return n===void 0&&z(`${t} has unknown type ${ht(e)}`),n};function Pt(e,t,n){e>>>=0,t>>>=0;var r=Nt(e,`enum`);switch(t=L(t),r.valueType){case`object`:var i=r.constructor,a=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:We(`${r.name}_${t}`,function(){})}});i.values[n]=a,i[t]=a;break;case`number`:r.keysMap[t]=n;break;case`string`:r.valuesMap[t]=n,r.reverseMap[n]=t,r.keysMap[t]=t}}var Ft=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(ne[e>>>2>>>0])};case 8:return function(e){return this.fromWireType(E[e>>>3>>>0])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},It=function(e,t,n){e>>>=0,t>>>=0,n>>>=0,t=L(t),B(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ft(t,n),destructorFunction:null})};function Lt(e,t,n,r,i,a,o,s){e>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0;var c=vt(t,n);e=L(e),e=wt(e),i=G(r,i,o),W(e,function(){gt(`Cannot call ${e} due to unbound types`,c)},t-1),I([],c,n=>{var r=[n[0],null].concat(n.slice(1));return ut(e,St(e,r,null,i,a,o),t-1),[]})}var Rt=function(e,t,n,r,i){e>>>=0,t>>>=0,n>>>=0,t=L(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Me(t,n,r!==0),destructorFunction:null})},zt=(e,t,n)=>{let r=(e,t)=>{let n=0;return{next(){if(n>=e)return{done:!0};let r=n;return n++,{value:t(r),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){let e=this[t]();return r(e,e=>this[n](e))})},Bt=function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0,n=L(n),r=L(r),I([],[e,t],e=>{let t=e[0];return zt(t.registeredClass.instancePrototype,n,r),[]})};function Vt(e,t,n){e>>>=0,n>>>=0;var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=T[e>>>2>>>0],n=T[e+4>>>2>>>0];return new r(b.buffer,n,t)}n=L(n),B(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})}var Ht=Object.assign({optional:!0},Ot);function Ut(e,t){e>>>=0,t>>>=0,B(e,Ht)}var Wt=(e,t,n,r)=>{if(n>>>=0,!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=a)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|s&63}else{if(n+3>=a)break;t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|s&63,o++}}return t[n>>>0]=0,n-i},Gt=(e,t,n)=>Wt(e,x,t,n),Kt=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},qt=globalThis.TextDecoder&&new TextDecoder,Jt=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},Yt=(e,t=0,n,r)=>{t>>>=0;var i=Jt(e,t,n,r);if(i-t>16&&e.buffer&&qt)return qt.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128))a+=String.fromCharCode(o);else{var s=e[t++]&63;if((o&224)==192)a+=String.fromCharCode((o&31)<<6|s);else{var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}}}return a},Xt=(e,t,n)=>(e>>>=0,e?Yt(x,e,t,n):``);function Zt(e,t){e>>>=0,t>>>=0,t=L(t);var n=!0;B(e,{name:t,fromWireType(e){var t=T[e>>>2>>>0],r=e+4,i;if(n)i=Xt(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(x[r+a>>>0])}return Z(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||z(`Cannot pass non-string to std::string`),r=n&&i?Kt(t):t.length;var a=Bn(4+r+1),o=a+4;if(T[a>>>2>>>0]=r,i){if(n)Gt(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Z(a),z(`String has UTF-16 code units that do not fit in 8 bits`)),x[o+s>>>0]=c}}else x.set(t,o>>>0);return e!==null&&e.push(Z,a),a},readValueFromPointer:j,destructorFunction(e){Z(e)}})}var Qt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,$t=(e,t,n)=>{var r=e>>>1,i=Jt(C,r,t/2,n);if(i-r>16&&Qt)return Qt.decode(C.subarray(r>>>0,i>>>0));for(var a=``,o=r;o<i;++o){var s=C[o>>>0];a+=String.fromCharCode(s)}return a},en=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);S[t>>>1>>>0]=o,t+=2}return S[t>>>1>>>0]=0,t-r},tn=e=>e.length*2,nn=(e,t,n)=>{for(var r=``,i=e>>>2,a=0;!(a>=t/4);a++){var o=T[i+a>>>0];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},rn=(e,t,n)=>{if(t>>>=0,n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,w[t>>>2>>>0]=o,t+=4,t+4>i)break}return w[t>>>2>>>0]=0,t-r},an=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t};function on(e,t,n){e>>>=0,t>>>=0,n>>>=0,n=L(n);var r,i,a;t===2?(r=$t,i=en,a=tn):(r=nn,i=rn,a=an),B(e,{name:n,fromWireType:e=>{var n=T[e>>>2>>>0],i=r(e+4,n*t,!0);return Z(e),i},toWireType:(e,r)=>{typeof r!=`string`&&z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Bn(4+o+t);return T[s>>>2>>>0]=o/t,i(r,s+4,o+t),e!==null&&e.push(Z,s),s},readValueFromPointer:j,destructorFunction(e){Z(e)}})}function sn(e,t,n,r,i,a){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,A[e]={name:L(t),rawConstructor:G(n,r),rawDestructor:G(i,a),fields:[]}}function cn(e,t,n,r,i,a,o,s,c,l){e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,a>>>=0,o>>>=0,s>>>=0,c>>>=0,l>>>=0,A[e].fields.push({fieldName:L(t),getterReturnType:n,getter:G(r,i),getterContext:a,setterArgumentType:o,setter:G(s,c),setterContext:l})}var ln=function(e,t){e>>>=0,t>>>=0,t=L(t),B(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})};function un(e,t){e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),e.set(t)}var dn=[],fn=e=>{var t=dn.length;return dn.push(e),t},pn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Nt(T[t+r*4>>>2>>>0],`parameter ${r}`);return n},mn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(T[t>>>2>>>0]=q.toHandle(r)),i},hn={},gn=e=>{var t=hn[e];return t===void 0?L(e):t},_n=function(e,t,n){t>>>=0;var r=8,[i,...a]=pn(e,t),o=i.toWireType.bind(i),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var c=Array(e);return fn(We(`methodCaller<(${a.map(e=>e.name)}) => ${i.name}>`,(t,i,a,l)=>{for(var u=0,d=0;d<e;++d)c[d]=s[d](l+u),u+=r;var f;switch(n){case 0:f=q.toValue(t).apply(null,c);break;case 2:f=Reflect.construct(q.toValue(t),c);break;case 3:f=c[0];break;case 1:f=q.toValue(t)[gn(i)](...c)}return mn(o,a,f)}))};function vn(e,t){return e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),e==t}function yn(e,t){return e>>>=0,t>>>=0,e=q.toValue(e),t=q.toValue(t),q.toHandle(e[t])}function bn(e){e>>>=0,e>9&&(K[e+1]+=1)}function xn(e,t,n,r,i){return e>>>=0,t>>>=0,n>>>=0,r>>>=0,i>>>=0,dn[e](t,n,r,i)}function Sn(e){return e>>>=0,q.toHandle(gn(e))}function Cn(){return q.toHandle({})}function wn(e){e>>>=0,Oe(q.toValue(e)),Dt(e)}function Tn(e,t,n){e>>>=0,t>>>=0,n>>>=0,e=q.toValue(e),t=q.toValue(t),n=q.toValue(n),e[t]=n}var En=()=>4294901760,Dn=(e,t)=>Math.ceil(e/t)*t,On=e=>{var t=(e-Vn.buffer.byteLength+65535)/65536|0;try{return Vn.grow(t),oe(),1}catch{}};function kn(e){e>>>=0;var t=x.length,n=En();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),On(Math.min(n,Dn(Math.max(e,i),65536))))return!0}return!1}var An=(e,t)=>{if(J)for(var n=e;n<e+t;n++){var r=dt(n);r&&J.set(r,n)}},J,jn=e=>(J||(J=new WeakMap,An(0,Q.length)),J.get(e)||0),Mn=[],Nn=()=>Mn.length?Mn.pop():Q.grow(1),Pn=(e,t)=>Q.set(e,t),Fn=e=>{let t=e.length;return[t%128|128,t>>7,...e]},In={i:127,p:127,j:126,f:125,d:124,e:111},Ln=e=>Fn(Array.from(e,e=>In[e])),Rn=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Fn([1,96,...Ln(t.slice(1)),...Ln(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f},Y=(e,t)=>{var n=jn(e);if(n)return n;var r=Nn();try{Pn(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Pn(r,Rn(e,t))}return J.set(e,r),r},X=e=>{J.delete(dt(e)),Pn(e,null),Mn.push(e)};if(Ue(),ct(),i.noExitRuntime&&i.noExitRuntime,i.print&&i.print,i.printErr&&(g=i.printErr),i.wasmBinary&&(_=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.preInit)for(typeof i.preInit==`function`&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()();i.addFunction=Y,i.removeFunction=X;var zn,Bn,Z,Vn,Q;function Hn(e){zn=e.K,Bn=e.M,Z=e.N,Vn=e.I,Q=e.L}var Un={l:Ee,C:De,q:Ae,z:Ne,G:Pe,j:_t,i:Ct,a:Tt,E:kt,x:Mt,d:Pt,y:It,c:Lt,p:Rt,m:Bt,h:Vt,n:Ut,F:Zt,w:on,r:sn,k:cn,H:ln,u:un,g:_n,b:Dt,o:vn,B:yn,t:bn,f:xn,s:Sn,A:Cn,e:wn,v:Tn,D:kn};function Wn(e){e=Object.assign({},e);var t=e=>t=>e(t)>>>0;return e.K=t(e.K),e.M=t(e.M),e._emscripten_stack_alloc=t(e._emscripten_stack_alloc),e.emscripten_stack_get_current=(e=>()=>e()>>>0)(e.emscripten_stack_get_current),e}function Gn(){se();function e(){i.calledRun=!0,v||(ce(),ee?.(i),i.onRuntimeInitialized?.(),le())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var $=await _e();return Gn(),r=ae?i:new Promise((e,t)=>{ee=e,te=t}),r}export{n as default};