diff --git a/_framework/BlazorWebAssembly.pdb.gz b/_framework/BlazorWebAssembly.pdb.gz index 04ea003..975d233 100644 Binary files a/_framework/BlazorWebAssembly.pdb.gz and b/_framework/BlazorWebAssembly.pdb.gz differ diff --git a/_framework/BlazorWebAssembly.wasm b/_framework/BlazorWebAssembly.wasm index 35bf205..61e258b 100644 Binary files a/_framework/BlazorWebAssembly.wasm and b/_framework/BlazorWebAssembly.wasm differ diff --git a/_framework/BlazorWebAssembly.wasm.br b/_framework/BlazorWebAssembly.wasm.br index 8656ea0..c018264 100644 Binary files a/_framework/BlazorWebAssembly.wasm.br and b/_framework/BlazorWebAssembly.wasm.br differ diff --git a/_framework/BlazorWebAssembly.wasm.gz b/_framework/BlazorWebAssembly.wasm.gz index 10ae96d..428f1a1 100644 Binary files a/_framework/BlazorWebAssembly.wasm.gz and b/_framework/BlazorWebAssembly.wasm.gz differ diff --git a/_framework/Blazored.Toast.pdb.gz b/_framework/Blazored.Toast.pdb.gz index 088dc08..f8dd396 100644 Binary files a/_framework/Blazored.Toast.pdb.gz and b/_framework/Blazored.Toast.pdb.gz differ diff --git a/_framework/Blazored.Toast.wasm b/_framework/Blazored.Toast.wasm index 7bcbdf7..3a82866 100644 Binary files a/_framework/Blazored.Toast.wasm and b/_framework/Blazored.Toast.wasm differ diff --git a/_framework/Blazored.Toast.wasm.br b/_framework/Blazored.Toast.wasm.br index 9140ad6..273c9bf 100644 Binary files a/_framework/Blazored.Toast.wasm.br and b/_framework/Blazored.Toast.wasm.br differ diff --git a/_framework/Blazored.Toast.wasm.gz b/_framework/Blazored.Toast.wasm.gz index 5044319..8a7bc7b 100644 Binary files a/_framework/Blazored.Toast.wasm.gz and b/_framework/Blazored.Toast.wasm.gz differ diff --git a/_framework/System.Collections.Concurrent.wasm b/_framework/System.Collections.Concurrent.wasm index b28e32b..16fc224 100644 Binary files a/_framework/System.Collections.Concurrent.wasm and b/_framework/System.Collections.Concurrent.wasm differ diff --git a/_framework/System.Collections.Concurrent.wasm.br b/_framework/System.Collections.Concurrent.wasm.br index 3e10f38..24cfd36 100644 Binary files a/_framework/System.Collections.Concurrent.wasm.br and b/_framework/System.Collections.Concurrent.wasm.br differ diff --git a/_framework/System.Collections.Concurrent.wasm.gz b/_framework/System.Collections.Concurrent.wasm.gz index af4e3a7..45c903d 100644 Binary files a/_framework/System.Collections.Concurrent.wasm.gz and b/_framework/System.Collections.Concurrent.wasm.gz differ diff --git a/_framework/System.Collections.wasm b/_framework/System.Collections.wasm index fa8063f..4161890 100644 Binary files a/_framework/System.Collections.wasm and b/_framework/System.Collections.wasm differ diff --git a/_framework/System.Collections.wasm.br b/_framework/System.Collections.wasm.br index 3d9598d..140bd8e 100644 Binary files a/_framework/System.Collections.wasm.br and b/_framework/System.Collections.wasm.br differ diff --git a/_framework/System.Collections.wasm.gz b/_framework/System.Collections.wasm.gz index aef6189..0c77ccf 100644 Binary files a/_framework/System.Collections.wasm.gz and b/_framework/System.Collections.wasm.gz differ diff --git a/_framework/System.ComponentModel.wasm b/_framework/System.ComponentModel.wasm index 8edb442..ce49bc5 100644 Binary files a/_framework/System.ComponentModel.wasm and b/_framework/System.ComponentModel.wasm differ diff --git a/_framework/System.ComponentModel.wasm.br b/_framework/System.ComponentModel.wasm.br index 7203564..14369f6 100644 Binary files a/_framework/System.ComponentModel.wasm.br and b/_framework/System.ComponentModel.wasm.br differ diff --git a/_framework/System.ComponentModel.wasm.gz b/_framework/System.ComponentModel.wasm.gz index fa7b211..8fa7a9e 100644 Binary files a/_framework/System.ComponentModel.wasm.gz and b/_framework/System.ComponentModel.wasm.gz differ diff --git a/_framework/System.Console.wasm b/_framework/System.Console.wasm index a295efb..14dfef8 100644 Binary files a/_framework/System.Console.wasm and b/_framework/System.Console.wasm differ diff --git a/_framework/System.Console.wasm.br b/_framework/System.Console.wasm.br index c0f4f28..4bcd171 100644 Binary files a/_framework/System.Console.wasm.br and b/_framework/System.Console.wasm.br differ diff --git a/_framework/System.Console.wasm.gz b/_framework/System.Console.wasm.gz index 85fcd77..856c39a 100644 Binary files a/_framework/System.Console.wasm.gz and b/_framework/System.Console.wasm.gz differ diff --git a/_framework/System.Linq.wasm b/_framework/System.Linq.wasm index 96644f3..2515542 100644 Binary files a/_framework/System.Linq.wasm and b/_framework/System.Linq.wasm differ diff --git a/_framework/System.Linq.wasm.br b/_framework/System.Linq.wasm.br index 3dd0ce3..0fcd1d1 100644 Binary files a/_framework/System.Linq.wasm.br and b/_framework/System.Linq.wasm.br differ diff --git a/_framework/System.Linq.wasm.gz b/_framework/System.Linq.wasm.gz index 03cd7c2..4465c86 100644 Binary files a/_framework/System.Linq.wasm.gz and b/_framework/System.Linq.wasm.gz differ diff --git a/_framework/System.Memory.wasm b/_framework/System.Memory.wasm index 809f119..7ec191b 100644 Binary files a/_framework/System.Memory.wasm and b/_framework/System.Memory.wasm differ diff --git a/_framework/System.Memory.wasm.br b/_framework/System.Memory.wasm.br index 0085189..381210c 100644 Binary files a/_framework/System.Memory.wasm.br and b/_framework/System.Memory.wasm.br differ diff --git a/_framework/System.Memory.wasm.gz b/_framework/System.Memory.wasm.gz index f0f6685..d925504 100644 Binary files a/_framework/System.Memory.wasm.gz and b/_framework/System.Memory.wasm.gz differ diff --git a/_framework/System.Net.Http.wasm b/_framework/System.Net.Http.wasm index e06afd1..19f7d5e 100644 Binary files a/_framework/System.Net.Http.wasm and b/_framework/System.Net.Http.wasm differ diff --git a/_framework/System.Net.Http.wasm.br b/_framework/System.Net.Http.wasm.br index e6de8bb..5b9f834 100644 Binary files a/_framework/System.Net.Http.wasm.br and b/_framework/System.Net.Http.wasm.br differ diff --git a/_framework/System.Net.Http.wasm.gz b/_framework/System.Net.Http.wasm.gz index 38ad0bc..c206bfb 100644 Binary files a/_framework/System.Net.Http.wasm.gz and b/_framework/System.Net.Http.wasm.gz differ diff --git a/_framework/System.Net.Primitives.wasm b/_framework/System.Net.Primitives.wasm index 6251baf..1cdc48c 100644 Binary files a/_framework/System.Net.Primitives.wasm and b/_framework/System.Net.Primitives.wasm differ diff --git a/_framework/System.Net.Primitives.wasm.br b/_framework/System.Net.Primitives.wasm.br index 4888508..51f3d37 100644 Binary files a/_framework/System.Net.Primitives.wasm.br and b/_framework/System.Net.Primitives.wasm.br differ diff --git a/_framework/System.Net.Primitives.wasm.gz b/_framework/System.Net.Primitives.wasm.gz index ebaacd8..d9ec3b9 100644 Binary files a/_framework/System.Net.Primitives.wasm.gz and b/_framework/System.Net.Primitives.wasm.gz differ diff --git a/_framework/System.Private.CoreLib.wasm b/_framework/System.Private.CoreLib.wasm index 01d8f55..f401fdd 100644 Binary files a/_framework/System.Private.CoreLib.wasm and b/_framework/System.Private.CoreLib.wasm differ diff --git a/_framework/System.Private.CoreLib.wasm.br b/_framework/System.Private.CoreLib.wasm.br index dfc855d..ae180d8 100644 Binary files a/_framework/System.Private.CoreLib.wasm.br and b/_framework/System.Private.CoreLib.wasm.br differ diff --git a/_framework/System.Private.CoreLib.wasm.gz b/_framework/System.Private.CoreLib.wasm.gz index be7a548..1a1d6bf 100644 Binary files a/_framework/System.Private.CoreLib.wasm.gz and b/_framework/System.Private.CoreLib.wasm.gz differ diff --git a/_framework/System.Private.Uri.wasm b/_framework/System.Private.Uri.wasm index 3a3c061..81558e6 100644 Binary files a/_framework/System.Private.Uri.wasm and b/_framework/System.Private.Uri.wasm differ diff --git a/_framework/System.Private.Uri.wasm.br b/_framework/System.Private.Uri.wasm.br index ec1633b..35f3fc3 100644 Binary files a/_framework/System.Private.Uri.wasm.br and b/_framework/System.Private.Uri.wasm.br differ diff --git a/_framework/System.Private.Uri.wasm.gz b/_framework/System.Private.Uri.wasm.gz index 50e9270..cc63f5a 100644 Binary files a/_framework/System.Private.Uri.wasm.gz and b/_framework/System.Private.Uri.wasm.gz differ diff --git a/_framework/System.Runtime.InteropServices.JavaScript.wasm b/_framework/System.Runtime.InteropServices.JavaScript.wasm index 55f89b7..0e13092 100644 Binary files a/_framework/System.Runtime.InteropServices.JavaScript.wasm and b/_framework/System.Runtime.InteropServices.JavaScript.wasm differ diff --git a/_framework/System.Runtime.InteropServices.JavaScript.wasm.br b/_framework/System.Runtime.InteropServices.JavaScript.wasm.br index 37abd76..38b586f 100644 Binary files a/_framework/System.Runtime.InteropServices.JavaScript.wasm.br and b/_framework/System.Runtime.InteropServices.JavaScript.wasm.br differ diff --git a/_framework/System.Runtime.InteropServices.JavaScript.wasm.gz b/_framework/System.Runtime.InteropServices.JavaScript.wasm.gz index f926982..e47be86 100644 Binary files a/_framework/System.Runtime.InteropServices.JavaScript.wasm.gz and b/_framework/System.Runtime.InteropServices.JavaScript.wasm.gz differ diff --git a/_framework/System.Runtime.wasm b/_framework/System.Runtime.wasm index 3694b10..e6802ba 100644 Binary files a/_framework/System.Runtime.wasm and b/_framework/System.Runtime.wasm differ diff --git a/_framework/System.Runtime.wasm.br b/_framework/System.Runtime.wasm.br index f1721db..78e7433 100644 Binary files a/_framework/System.Runtime.wasm.br and b/_framework/System.Runtime.wasm.br differ diff --git a/_framework/System.Runtime.wasm.gz b/_framework/System.Runtime.wasm.gz index 63ba763..4cd5df7 100644 Binary files a/_framework/System.Runtime.wasm.gz and b/_framework/System.Runtime.wasm.gz differ diff --git a/_framework/System.Text.Encodings.Web.wasm b/_framework/System.Text.Encodings.Web.wasm index 8076169..832d798 100644 Binary files a/_framework/System.Text.Encodings.Web.wasm and b/_framework/System.Text.Encodings.Web.wasm differ diff --git a/_framework/System.Text.Encodings.Web.wasm.br b/_framework/System.Text.Encodings.Web.wasm.br index 52c2545..7198a4f 100644 Binary files a/_framework/System.Text.Encodings.Web.wasm.br and b/_framework/System.Text.Encodings.Web.wasm.br differ diff --git a/_framework/System.Text.Encodings.Web.wasm.gz b/_framework/System.Text.Encodings.Web.wasm.gz index feb5d35..5466a8b 100644 Binary files a/_framework/System.Text.Encodings.Web.wasm.gz and b/_framework/System.Text.Encodings.Web.wasm.gz differ diff --git a/_framework/System.Text.Json.wasm b/_framework/System.Text.Json.wasm index 2d47bb0..f5a1dd2 100644 Binary files a/_framework/System.Text.Json.wasm and b/_framework/System.Text.Json.wasm differ diff --git a/_framework/System.Text.Json.wasm.br b/_framework/System.Text.Json.wasm.br index 16997b8..0b2fdad 100644 Binary files a/_framework/System.Text.Json.wasm.br and b/_framework/System.Text.Json.wasm.br differ diff --git a/_framework/System.Text.Json.wasm.gz b/_framework/System.Text.Json.wasm.gz index a581022..444b058 100644 Binary files a/_framework/System.Text.Json.wasm.gz and b/_framework/System.Text.Json.wasm.gz differ diff --git a/_framework/System.Text.RegularExpressions.wasm b/_framework/System.Text.RegularExpressions.wasm index 4c407fe..d1b7254 100644 Binary files a/_framework/System.Text.RegularExpressions.wasm and b/_framework/System.Text.RegularExpressions.wasm differ diff --git a/_framework/System.Text.RegularExpressions.wasm.br b/_framework/System.Text.RegularExpressions.wasm.br index f44f9d0..e6f46b6 100644 Binary files a/_framework/System.Text.RegularExpressions.wasm.br and b/_framework/System.Text.RegularExpressions.wasm.br differ diff --git a/_framework/System.Text.RegularExpressions.wasm.gz b/_framework/System.Text.RegularExpressions.wasm.gz index ac5eba1..65d0817 100644 Binary files a/_framework/System.Text.RegularExpressions.wasm.gz and b/_framework/System.Text.RegularExpressions.wasm.gz differ diff --git a/_framework/System.Threading.wasm b/_framework/System.Threading.wasm index 0809875..4a1305f 100644 Binary files a/_framework/System.Threading.wasm and b/_framework/System.Threading.wasm differ diff --git a/_framework/System.Threading.wasm.br b/_framework/System.Threading.wasm.br index 81eee4c..2503980 100644 Binary files a/_framework/System.Threading.wasm.br and b/_framework/System.Threading.wasm.br differ diff --git a/_framework/System.Threading.wasm.gz b/_framework/System.Threading.wasm.gz index 3d3fd37..1b3af08 100644 Binary files a/_framework/System.Threading.wasm.gz and b/_framework/System.Threading.wasm.gz differ diff --git a/_framework/blazor.boot.json b/_framework/blazor.boot.json index c50c6e8..6d31d75 100644 --- a/_framework/blazor.boot.json +++ b/_framework/blazor.boot.json @@ -1,15 +1,15 @@ { "mainAssemblyName": "BlazorWebAssembly", "resources": { - "hash": "sha256-2xnvKMWdMymw9WrJT7UUKJc6FMJ93jU6RvQw3MXzz3g=", + "hash": "sha256-oyhLGkS1jeo3VovDVueScg4IcuuH5e8jz3PFWvyRleE=", "jsModuleNative": { - "dotnet.native.8.0.2.jgt5nhn140.js": "sha256-gPMK16QWoJSTxorlZJqcVtbBRTniIQWlLsJN2O4cJHg=" + "dotnet.native.8.0.3.wzxwl5s97r.js": "sha256-D4sYBYmDfH/YekgYRgX959/2RG6k28sJSHmcsn+iikk=" }, "jsModuleRuntime": { - "dotnet.runtime.8.0.2.8djt6nqnbz.js": "sha256-54KSaoOArNfygQbV+r4B5y3ys53v2tnvFIyZcZiUmi0=" + "dotnet.runtime.8.0.3.r8ybjfe7e4.js": "sha256-eQgtmRxLcbxYmADDa49CHs/GuJ7nM6d/UFWo4EVhuIw=" }, "wasmNative": { - "dotnet.native.wasm": "sha256-C2P+OTYZAJlmqo6rc4heqwvIVVsXIF8MAxC6WRe96Eg=" + "dotnet.native.wasm": "sha256-eVeGwMx+BfzNeU727VmCADSEBzGFWGkvJAX0XZdSVkQ=" }, "icu": { "icudt_CJK.dat": "sha256-SZLtQnRc0JkwqHab0VUVP7T3uBPSeYzxzDnpxPpUnHk=", @@ -17,8 +17,8 @@ "icudt_no_CJK.dat": "sha256-L7sV7NEYP37/Qr2FPCePo5cJqRgTXRwGHuwF5Q+0Nfs=" }, "assembly": { - "Blazored.Toast.wasm": "sha256-LRWdw7zAhRzRSgiRYmOZcRyLZXaFT9Zr7U9KhosRNRw=", - "BlazorWebAssembly.wasm": "sha256-O48WM4IvJo1FtckjI18uhHd8VaHGUaV3J9M5QpQEoWE=", + "Blazored.Toast.wasm": "sha256-tCNYnYuB69ZO7+n7obUv//+KkNP809fARvATEkvPug4=", + "BlazorWebAssembly.wasm": "sha256-6L5lFeIISQiTC5j+RyqrCzqRmaGje3l+Qy5Z7ha8u1M=", "Microsoft.AspNetCore.Components.wasm": "sha256-/0mJfOUlepYCXcdFwbo2iC7nRQYwXy5HN1RBWMR45O0=", "Microsoft.AspNetCore.Components.Web.wasm": "sha256-7KkqwwQtcN+NHevIKYhJ2gLZJa3f0aShCl2ldtegyXw=", "Microsoft.AspNetCore.Components.WebAssembly.wasm": "sha256-d6tN87QrJstiTMcLaUtZ6TWiNHa8A74Suuzx95thRrE=", @@ -33,22 +33,22 @@ "Microsoft.Extensions.Primitives.wasm": "sha256-6187ynEahDlSLMBvD4vAmiLpZ3clRb5xu6rM7O8AxNo=", "Microsoft.JSInterop.wasm": "sha256-1vXTFGB8f1xknhrY0hxfr04x1/JK+bA0IxTp2CBzmhY=", "Microsoft.JSInterop.WebAssembly.wasm": "sha256-aCgxiIU+arbpOkgLngl1hBQLocrFL2/t1zUJV8HXOzI=", - "System.Collections.Concurrent.wasm": "sha256-DEZ59fGbj2NqpZbDf9KV0hzXZkN0+vJaLNPPONQTjLo=", - "System.Collections.wasm": "sha256-ummuW/IFNAoco748fr6AINFc8aWjaKs/Ge2ssIGVU+8=", - "System.ComponentModel.wasm": "sha256-qwurUoDSjnjNxAivtUxZqGvkOgARzX9ETuhBPrMx5Xo=", - "System.Console.wasm": "sha256-hcaSe3dddvUYzyPNpqoGVuiON/PLZocvLhbJ0wtpre8=", - "System.Linq.wasm": "sha256-6TBIFGbhoTTmXAJF4Jvuuqr+mkHvL0aAcfCBOMs6kf8=", - "System.Memory.wasm": "sha256-is0fLYQZE9huTBti4rGQQebqsfCdCmdu0IQTpRGE5VQ=", - "System.Net.Http.wasm": "sha256-6m19mkuheow7Jv1+bmjfwJffNfxGHJrDu+eWAmXGKas=", - "System.Net.Primitives.wasm": "sha256-sm6hDRoze7+24GQmGGL6eyXuz9nBcj3qAI8bOqlSVnc=", - "System.Private.CoreLib.wasm": "sha256-oH+1qvYUAm9QKu6LbVjHXsxezz5SXg2E3uEufAY6YRI=", - "System.Private.Uri.wasm": "sha256-OV+QIxwhJgwMSWxb+jmaL2jKmv3BRPf9MABpFXErZak=", - "System.Runtime.InteropServices.JavaScript.wasm": "sha256-V1xvZgzz6Gy7iYFPviaHRPOvygBTDwW/AT5/QUajEOM=", - "System.Runtime.wasm": "sha256-bOkQhinKb/4tw8QbUaoMv4ZHLQhLNPw1SrNkvmkCNGA=", - "System.Text.Encodings.Web.wasm": "sha256-NnePSWCgIId8nOPCgziTKhDyG6uCBs+3W6fazrWLoUA=", - "System.Text.Json.wasm": "sha256-GR3D89PGASVanrViLBaCIgEJEFS4z7o+W7m7kECsfC0=", - "System.Text.RegularExpressions.wasm": "sha256-W20q/uEUAv0A+F6irUkY0pCZJo76wNuWpz3XgcLFB2M=", - "System.Threading.wasm": "sha256-4TmhC4Lm0NRFX9yCf3kXn0aHg8XyCL+hM29B5fk4ixU=" + "System.Collections.Concurrent.wasm": "sha256-QOF1o4vRQdumGwM88oPKqGWsJYJ0DSo/OktbhGVddxs=", + "System.Collections.wasm": "sha256-WUqwsSclNK7R054nWswGnNLVHHyO3IPgmaK7fLMjzbM=", + "System.ComponentModel.wasm": "sha256-eVbSVXRcRx2YTri/KL0Qzmj3ebRDio4egDZIIdTic00=", + "System.Console.wasm": "sha256-vHzlWiHUJPBtgGCTxuxz9N9UVmccX41lEpesE3lHZmI=", + "System.Linq.wasm": "sha256-Lm8i2Mdi2U266gYaqDkEpccjArjR7IxXItcdu0cnl6U=", + "System.Memory.wasm": "sha256-fOh7PADVKUSGmjVkzJqGZye10M03t0vjvnFhVjlN2hs=", + "System.Net.Http.wasm": "sha256-EpdIB2yFVI0NCJTGOX3DWzv1Wg+kjYNY/F+Rgb3utwM=", + "System.Net.Primitives.wasm": "sha256-4PpTJWBTc5oXaBJvy5Z9YIBaQTY4ELyxrk7lRITIIto=", + "System.Private.CoreLib.wasm": "sha256-E1VvUJGNZc9zZmbDDA+d6AkosLhkaWC+TbkLaWb1k0g=", + "System.Private.Uri.wasm": "sha256-dEJm/bnYu2UqX4AyhjZRNIZ2shuqgasLc2i1Kc9wzUc=", + "System.Runtime.InteropServices.JavaScript.wasm": "sha256-ExFHd9/2pYiIIO4cL7QNqqpcTbATdAZ0Cl1ceE8RVcw=", + "System.Runtime.wasm": "sha256-khInNyV9F3hoIjyVn+jD3wlBT0GEh74kwcLel965Fog=", + "System.Text.Encodings.Web.wasm": "sha256-6Y6/Faa3h5Vm0B7AAY9NZHdFTUWBX7c8paNgUxSC7wo=", + "System.Text.Json.wasm": "sha256-UldQYyLU/Ynfy00LeY9cACCq3i5boN5iKSD9jJiqFxY=", + "System.Text.RegularExpressions.wasm": "sha256-6T86HiT8YsAKIA+RMZDNdVuNvepswzsJj5lTx3DHqQY=", + "System.Threading.wasm": "sha256-dZ4rNiMJl9O5TBZ2LNvOABrZP+XBNvXoiovooUITgSg=" } }, "cacheBootResources": true, diff --git a/_framework/blazor.boot.json.br b/_framework/blazor.boot.json.br index c0d823f..cbd9666 100644 Binary files a/_framework/blazor.boot.json.br and b/_framework/blazor.boot.json.br differ diff --git a/_framework/blazor.boot.json.gz b/_framework/blazor.boot.json.gz index 80a398c..9cc6a1e 100644 Binary files a/_framework/blazor.boot.json.gz and b/_framework/blazor.boot.json.gz differ diff --git a/_framework/dotnet.js b/_framework/dotnet.js index 56c8b05..ecaa2b1 100755 --- a/_framework/dotnet.js +++ b/_framework/dotnet.js @@ -1,4 +1,4 @@ //! Licensed to the .NET Foundation under one or more agreements. //! The .NET Foundation licenses this file to you under the MIT license. -const e=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),o=Symbol.for("wasm promise_control");function n(e,t){let n=null;const r=new Promise((function(o,r){n={isDone:!1,promise:null,resolve:t=>{n.isDone||(n.isDone=!0,o(t),e&&e())},reject:e=>{n.isDone||(n.isDone=!0,r(e),t&&t())}}}));n.promise=r;const s=r;return s[o]=n,{promise:s,promise_control:n}}function r(e){return e[o]}function s(e){(function(e){return void 0!==e[o]})(e)||De(!1,"Promise is not controllable")}const i="MONO_WASM: ";function a(e,...t){Re.diagnosticTracing&&console.debug(i+e,...t)}function l(e,...t){console.info(e,...t)}function c(e,...t){console.warn(i+e,...t)}function u(e,...t){t&&t.length>0&&t[0]&&"object"==typeof t[0]&&t[0].silent||console.error(i+e,...t)}let d;function f(e,t,o){const n={log:t.log,error:t.error},r=t;function s(t,o,r){return function(...s){try{let n=s[0];if(void 0===n)n="undefined";else if(null===n)n="null";else if("function"==typeof n)n=n.toString();else if("string"!=typeof n)try{n=JSON.stringify(n)}catch(e){n=n.toString()}if("string"==typeof n)if("["==n[0]){const t=(new Date).toISOString();n="main"!==e?`[${e}][${t}] ${n}`:`[${t}] ${n}`}else"main"!==e&&(n=`[${e}] ${n}`);o(r?JSON.stringify({method:t,payload:n,arguments:s}):[t+n,...s.slice(1)])}catch(e){n.error(`proxyConsole failed: ${e}`)}}}const i=["debug","trace","warn","info","error"];for(const e of i)"function"!=typeof r[e]&&(r[e]=s(`console.${e}: `,t.log,!1));const a=`${o}/console`.replace("https://","wss://").replace("http://","ws://");d=new WebSocket(a),d.addEventListener("open",(()=>{n.log(`browser: [${e}] Console websocket connected.`)})),d.addEventListener("error",(t=>{n.error(`[${e}] websocket error: ${t}`,t)})),d.addEventListener("close",(t=>{n.error(`[${e}] websocket closed: ${t}`,t)}));const l=e=>{d.readyState===WebSocket.OPEN?d.send(e):n.log(e)};for(const e of["log",...i])r[e]=s(`console.${e}`,l,!0)}const m={},h={},g={};let p,b,w;function y(){const e=Object.values(g),t=Object.values(h),o=E(e),n=E(t),r=o+n;if(0===r)return;const s=ve?"%c":"",i=ve?["background: purple; color: white; padding: 1px 3px; border-radius: 3px;","font-weight: bold;","font-weight: normal;"]:[],a=Re.config.linkerEnabled?"":"\nThis application was built with linking (tree shaking) disabled. \nPublished applications will be significantly smaller if you install wasm-tools workload. \nSee also https://aka.ms/dotnet-wasm-features";console.groupCollapsed(`${s}dotnet${s} Loaded ${R(r)} resources${s}${a}`,...i),e.length&&(console.groupCollapsed(`Loaded ${R(o)} resources from cache`),console.table(g),console.groupEnd()),t.length&&(console.groupCollapsed(`Loaded ${R(n)} resources from network`),console.table(h),console.groupEnd()),console.groupEnd()}async function v(){const e=p;if(e){const t=(await e.keys()).map((async t=>{t.url in m||await e.delete(t)}));await Promise.all(t)}}function _(e){return`${e.resolvedUrl}.${e.hash}`}function E(e){return e.reduce(((e,t)=>e+(t.responseBytes||0)),0)}function R(e){return`${(e/1048576).toFixed(2)} MB`}function j(e){var t;if((null===(t=e.resources)||void 0===t?void 0:t.icu)&&"invariant"!=e.globalizationMode){const t=e.applicationCulture||(ve?navigator.languages&&navigator.languages[0]:Intl.DateTimeFormat().resolvedOptions().locale),o=Object.keys(e.resources.icu);let n=null;if("custom"===e.globalizationMode?1===o.length&&(n=o[0]):"hybrid"===e.globalizationMode?n="icudt_hybrid.dat":t&&"all"!==e.globalizationMode?"sharded"===e.globalizationMode&&(n=function(e){const t=e.split("-")[0];return"en"===t||["fr","fr-FR","it","it-IT","de","de-DE","es","es-ES"].includes(e)?"icudt_EFIGS.dat":["zh","ko","ja"].includes(t)?"icudt_CJK.dat":"icudt_no_CJK.dat"}(t)):n="icudt.dat",n&&o.includes(n))return n}return e.globalizationMode="invariant",null}const x=class{constructor(e){this.url=e}toString(){return this.url}};async function S(e,t){try{const o="function"==typeof globalThis.fetch;if(we){const n=e.startsWith("file://");if(!n&&o)return globalThis.fetch(e,t||{credentials:"same-origin"});b||(w=xe.require("url"),b=xe.require("fs")),n&&(e=w.fileURLToPath(e));const r=await b.promises.readFile(e);return{ok:!0,headers:{length:0,get:()=>null},url:e,arrayBuffer:()=>r,json:()=>JSON.parse(r),text:()=>{throw new Error("NotImplementedException")}}}if(o)return globalThis.fetch(e,t||{credentials:"same-origin"});if("function"==typeof read)return{ok:!0,url:e,headers:{length:0,get:()=>null},arrayBuffer:()=>new Uint8Array(read(e,"binary")),json:()=>JSON.parse(read(e,"utf8")),text:()=>read(e,"utf8")}}catch(t){return{ok:!1,url:e,status:500,headers:{length:0,get:()=>null},statusText:"ERR28: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t},text:()=>{throw t}}}throw new Error("No fetch implementation available")}function A(e){return"string"!=typeof e&&De(!1,"url must be a string"),!T(e)&&0!==e.indexOf("./")&&0!==e.indexOf("../")&&globalThis.URL&&globalThis.document&&globalThis.document.baseURI&&(e=new URL(e,globalThis.document.baseURI).toString()),e}const D=/^[a-zA-Z][a-zA-Z\d+\-.]*?:\/\//,C=/[a-zA-Z]:[\\/]/;function T(e){return we||_e?e.startsWith("/")||e.startsWith("\\")||-1!==e.indexOf("///")||C.test(e):D.test(e)}let O,k=0;const M=[],$=[],L=new Map,I={"js-module-threads":!0,"js-module-runtime":!0,"js-module-dotnet":!0,"js-module-native":!0},U={...I,"js-module-library-initializer":!0},N={...I,dotnetwasm:!0,heap:!0,manifest:!0},P={...U,manifest:!0},z={...U,dotnetwasm:!0},F={dotnetwasm:!0,symbols:!0},W={resource:!0,assembly:!0,pdb:!0,heap:!0,icu:!0},B={...U,dotnetwasm:!0,symbols:!0};function V(e){return!("icu"==e.behavior&&e.name!=Re.preferredIcuAsset)}function q(e,t,o){const n=Object.keys(t||{});De(1==n.length,`Expect to have one ${o} asset in resources`);const r=n[0],s={name:r,hash:t[r],behavior:o};return J(s),e.push(s),s}function J(e){N[e.behavior]&&L.set(e.behavior,e)}function H(e){const t=function(e){De(N[e],`Unknown single asset behavior ${e}`);const t=L.get(e);return De(t,`Single asset for ${e} not found`),t}(e);if(t.resolvedUrl=Re.locateFile(t.name),I[t.behavior]){const e=re(t);e?("string"!=typeof e&&De(!1,"loadBootResource response for 'dotnetjs' type should be a URL string"),t.resolvedUrl=e):t.resolvedUrl=X(t.resolvedUrl,t.behavior)}else if("dotnetwasm"!==t.behavior)throw new Error(`Unknown single asset behavior ${e}`);return t}async function Q(){a("mono_download_assets");try{const e=[],t=t=>{!B[t.behavior]&&V(t)&&Re.expected_instantiated_assets_count++,!z[t.behavior]&&V(t)&&(Re.expected_downloaded_assets_count++,e.push(G(t)))};for(const e of $)t(e);await Re.memorySnapshotSkippedOrDone.promise;for(const e of M)if(Ee.loadedMemorySnapshotSize){if(se(e),"resource"==e.behavior||"assembly"==e.behavior||"pdb"==e.behavior){const t=K(e,""),o="string"==typeof e.virtualPath?e.virtualPath:e.name;Re._loaded_files.push({url:t,file:o})}}else t(e);Re.allDownloadsQueued.promise_control.resolve(),await Re.runtimeModuleLoaded.promise;const o=[];for(const t of e)o.push((async()=>{const e=await t;if(e.buffer){if(!B[e.behavior]){e.buffer&&"object"==typeof e.buffer||De(!1,"asset buffer must be array-like or buffer-like or promise of these"),"string"!=typeof e.resolvedUrl&&De(!1,"resolvedUrl must be string");const t=e.resolvedUrl,o=await e.buffer,n=new Uint8Array(o);se(e),await Ee.beforeOnRuntimeInitialized.promise,Ee.instantiate_asset(e,t,n)}}else F[e.behavior]?("symbols"===e.behavior&&(await Ee.instantiate_symbols_asset(e),se(e)),F[e.behavior]&&++Re.actual_downloaded_assets_count):(e.isOptional||De(!1,"Expected asset to have the downloaded buffer"),!z[e.behavior]&&V(e)&&Re.expected_downloaded_assets_count--,!B[e.behavior]&&V(e)&&Re.expected_instantiated_assets_count--)})());Promise.all(o).then((()=>{Ee.allAssetsInMemory.promise_control.resolve()})).catch((e=>{throw Re.err("Error in mono_download_assets: "+e),ke(1,e),e}))}catch(e){throw Re.err("Error in mono_download_assets: "+e),e}}async function Z(e){const t=await G(e);return await t.pendingDownloadInternal.response,t.buffer}async function G(e){try{return await Y(e)}catch(t){if(!Re.enableDownloadRetry)throw t;if(_e||we)throw t;if(e.pendingDownload&&e.pendingDownloadInternal==e.pendingDownload)throw t;if(e.resolvedUrl&&-1!=e.resolvedUrl.indexOf("file://"))throw t;if(t&&404==t.status)throw t;e.pendingDownloadInternal=void 0,await Re.allDownloadsQueued.promise;try{return a(`Retrying download '${e.name}'`),await Y(e)}catch(t){return e.pendingDownloadInternal=void 0,await(100,new Promise((e=>globalThis.setTimeout(e,100)))),a(`Retrying download (2) '${e.name}' after delay`),await Y(e)}}}async function Y(e){for(;O;)await O.promise;try{++k,k==Re.maxParallelDownloads&&(a("Throttling further parallel downloads"),O=n());const t=await async function(e){if(e.pendingDownload&&(e.pendingDownloadInternal=e.pendingDownload),e.pendingDownloadInternal&&e.pendingDownloadInternal.response)return e.pendingDownloadInternal.response;if(e.buffer){const t=await e.buffer;return e.resolvedUrl||(e.resolvedUrl="undefined://"+e.name),e.pendingDownloadInternal={url:e.resolvedUrl,name:e.name,response:Promise.resolve({ok:!0,arrayBuffer:()=>t,json:()=>JSON.parse(new TextDecoder("utf-8").decode(t)),text:()=>{throw new Error("NotImplementedException")},headers:{get:()=>{}}})},e.pendingDownloadInternal.response}const t=e.loadRemote&&Re.config.remoteSources?Re.config.remoteSources:[""];let o;for(let n of t){n=n.trim(),"./"===n&&(n="");const t=K(e,n);e.name===t?a(`Attempting to download '${t}'`):a(`Attempting to download '${t}' for ${e.name}`);try{e.resolvedUrl=t;const n=oe(e);if(e.pendingDownloadInternal=n,o=await n.response,!o||!o.ok)continue;return o}catch(e){o||(o={ok:!1,url:t,status:0,statusText:""+e});continue}}const n=e.isOptional||e.name.match(/\.pdb$/)&&Re.config.ignorePdbLoadErrors;if(o||De(!1,`Response undefined ${e.name}`),!n){const t=new Error(`download '${o.url}' for ${e.name} failed ${o.status} ${o.statusText}`);throw t.status=o.status,t}Re.out(`optional download '${o.url}' for ${e.name} failed ${o.status} ${o.statusText}`)}(e);return t?(F[e.behavior]||(e.buffer=await t.arrayBuffer(),++Re.actual_downloaded_assets_count),e):e}finally{if(--k,O&&k==Re.maxParallelDownloads-1){a("Resuming more parallel downloads");const e=O;O=void 0,e.promise_control.resolve()}}}function K(e,t){let o;return null==t&&De(!1,`sourcePrefix must be provided for ${e.name}`),e.resolvedUrl?o=e.resolvedUrl:(o=""===t?"assembly"===e.behavior||"pdb"===e.behavior?e.name:"resource"===e.behavior&&e.culture&&""!==e.culture?`${e.culture}/${e.name}`:e.name:t+e.name,o=X(Re.locateFile(o),e.behavior)),o&&"string"==typeof o||De(!1,"attemptUrl need to be path or url string"),o}function X(e,t){return Re.modulesUniqueQuery&&P[t]&&(e+=Re.modulesUniqueQuery),e}let ee=0;const te=new Set;function oe(e){try{e.resolvedUrl||De(!1,"Request's resolvedUrl must be set");const t=async function(e){let t=await async function(e){const t=p;if(!t||e.noCache||!e.hash||0===e.hash.length)return;const o=_(e);let n;m[o]=!0;try{n=await t.match(o)}catch(e){}if(!n)return;const r=parseInt(n.headers.get("content-length")||"0");return g[e.name]={responseBytes:r},n}(e);return t||(t=await function(e){let t=e.resolvedUrl;if(Re.loadBootResource){const o=re(e);if(o instanceof Promise)return o;"string"==typeof o&&(t=o)}const o={};return Re.config.disableNoCacheFetch||(o.cache="no-cache"),e.useCredentials?o.credentials="include":!Re.config.disableIntegrityCheck&&e.hash&&(o.integrity=e.hash),Re.fetch_like(t,o)}(e),function(e,t){const o=p;if(!o||e.noCache||!e.hash||0===e.hash.length)return;const n=t.clone();setTimeout((()=>{const t=_(e);!async function(e,t,o,n){const r=await n.arrayBuffer(),s=function(e){if("undefined"!=typeof performance)return performance.getEntriesByName(e)[0]}(n.url),i=s&&s.encodedBodySize||void 0;h[t]={responseBytes:i};const a=new Response(r,{headers:{"content-type":n.headers.get("content-type")||"","content-length":(i||n.headers.get("content-length")||"").toString()}});try{await e.put(o,a)}catch(e){}}(o,e.name,t,n)}),0)}(e,t)),t}(e),o={name:e.name,url:e.resolvedUrl,response:t};return te.add(e.name),o.response.then((()=>{"assembly"==e.behavior&&Re.loadedAssemblies.push(e.resolvedUrl),ee++,Re.onDownloadResourceProgress&&Re.onDownloadResourceProgress(ee,te.size)})),o}catch(t){const o={ok:!1,url:e.resolvedUrl,status:500,statusText:"ERR29: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t}};return{name:e.name,url:e.resolvedUrl,response:Promise.resolve(o)}}}const ne={resource:"assembly",assembly:"assembly",pdb:"pdb",icu:"globalization",vfs:"configuration",manifest:"manifest",dotnetwasm:"dotnetwasm","js-module-dotnet":"dotnetjs","js-module-native":"dotnetjs","js-module-runtime":"dotnetjs","js-module-threads":"dotnetjs"};function re(e){var t;if(Re.loadBootResource){const o=null!==(t=e.hash)&&void 0!==t?t:"",n=e.resolvedUrl,r=ne[e.behavior];if(r){const t=Re.loadBootResource(r,e.name,n,o,e.behavior);return"string"==typeof t?A(t):t}}}function se(e){e.pendingDownloadInternal=null,e.pendingDownload=null,e.buffer=null,e.moduleExports=null}function ie(e){let t=e.lastIndexOf("/");return t>=0&&t++,e.substring(t)}async function ae(e){if(!e)return;const t=Object.keys(e);await Promise.all(t.map((e=>async function(e){try{const t=X(Re.locateFile(e),"js-module-library-initializer");a(`Attempting to import '${t}' for ${e}`);const o=await import(t);Re.libraryInitializers.push({scriptName:e,exports:o})}catch(t){c(`Failed to import library initializer '${e}': ${t}`)}}(e))))}async function le(e,t){if(!Re.libraryInitializers)return;const o=[];for(let n=0;nr.exports[e](...t))))}await Promise.all(o)}async function ce(e,t,o){try{await o()}catch(o){throw c(`Failed to invoke '${t}' on library initializer '${e}': ${o}`),ke(1,o),o}}var ue="Release";function de(e,t){if(e===t)return e;const o={...t};return void 0!==o.assets&&o.assets!==e.assets&&(o.assets=[...e.assets||[],...o.assets||[]]),void 0!==o.resources&&(o.resources=me(e.resources||{assembly:{},jsModuleNative:{},jsModuleRuntime:{},wasmNative:{}},o.resources)),void 0!==o.environmentVariables&&(o.environmentVariables={...e.environmentVariables||{},...o.environmentVariables||{}}),void 0!==o.runtimeOptions&&o.runtimeOptions!==e.runtimeOptions&&(o.runtimeOptions=[...e.runtimeOptions||[],...o.runtimeOptions||[]]),Object.assign(e,o)}function fe(e,t){if(e===t)return e;const o={...t};return o.config&&(e.config||(e.config={}),o.config=de(e.config,o.config)),Object.assign(e,o)}function me(e,t){if(e===t)return e;const o={...t};return void 0!==o.assembly&&(o.assembly={...e.assembly||{},...o.assembly||{}}),void 0!==o.lazyAssembly&&(o.lazyAssembly={...e.lazyAssembly||{},...o.lazyAssembly||{}}),void 0!==o.pdb&&(o.pdb={...e.pdb||{},...o.pdb||{}}),void 0!==o.jsModuleWorker&&(o.jsModuleWorker={...e.jsModuleWorker||{},...o.jsModuleWorker||{}}),void 0!==o.jsModuleNative&&(o.jsModuleNative={...e.jsModuleNative||{},...o.jsModuleNative||{}}),void 0!==o.jsModuleRuntime&&(o.jsModuleRuntime={...e.jsModuleRuntime||{},...o.jsModuleRuntime||{}}),void 0!==o.wasmSymbols&&(o.wasmSymbols={...e.wasmSymbols||{},...o.wasmSymbols||{}}),void 0!==o.wasmNative&&(o.wasmNative={...e.wasmNative||{},...o.wasmNative||{}}),void 0!==o.icu&&(o.icu={...e.icu||{},...o.icu||{}}),void 0!==o.satelliteResources&&(o.satelliteResources=he(e.satelliteResources||{},o.satelliteResources||{})),void 0!==o.modulesAfterConfigLoaded&&(o.modulesAfterConfigLoaded={...e.modulesAfterConfigLoaded||{},...o.modulesAfterConfigLoaded||{}}),void 0!==o.modulesAfterRuntimeReady&&(o.modulesAfterRuntimeReady={...e.modulesAfterRuntimeReady||{},...o.modulesAfterRuntimeReady||{}}),void 0!==o.extensions&&(o.extensions={...e.extensions||{},...o.extensions||{}}),void 0!==o.vfs&&(o.vfs=he(e.vfs||{},o.vfs||{})),Object.assign(e,o)}function he(e,t){if(e===t)return e;for(const o in t)e[o]={...e[o],...t[o]};return e}function ge(){const e=Re.config;if(e.environmentVariables=e.environmentVariables||{},e.runtimeOptions=e.runtimeOptions||[],e.resources=e.resources||{assembly:{},jsModuleNative:{},jsModuleWorker:{},jsModuleRuntime:{},wasmNative:{},vfs:{},satelliteResources:{}},e.assets){a("config.assets is deprecated, use config.resources instead");for(const t of e.assets){const o={};o[t.name]=t.hash||"";const n={};switch(t.behavior){case"assembly":n.assembly=o;break;case"pdb":n.pdb=o;break;case"resource":n.satelliteResources={},n.satelliteResources[t.culture]=o;break;case"icu":n.icu=o;break;case"symbols":n.wasmSymbols=o;break;case"vfs":n.vfs={},n.vfs[t.virtualPath]=o;break;case"dotnetwasm":n.wasmNative=o;break;case"js-module-threads":n.jsModuleWorker=o;break;case"js-module-runtime":n.jsModuleRuntime=o;break;case"js-module-native":n.jsModuleNative=o;break;case"js-module-dotnet":break;default:throw new Error(`Unexpected behavior ${t.behavior} of asset ${t.name}`)}me(e.resources,n)}}Re.assertAfterExit=e.assertAfterExit=e.assertAfterExit||!ve,void 0===e.debugLevel&&"Debug"===ue&&(e.debugLevel=-1),void 0===e.cachedResourcesPurgeDelay&&(e.cachedResourcesPurgeDelay=1e4),e.debugLevel=be(e)?e.debugLevel:0,void 0===e.diagnosticTracing&&"Debug"===ue&&(e.diagnosticTracing=!0),e.applicationCulture&&(e.environmentVariables.LANG=`${e.applicationCulture}.UTF-8`),Ee.diagnosticTracing=Re.diagnosticTracing=!!e.diagnosticTracing,Ee.waitForDebugger=e.waitForDebugger,e.startupMemoryCache=!!e.startupMemoryCache,e.startupMemoryCache&&Ee.waitForDebugger&&(a("Disabling startupMemoryCache because waitForDebugger is set"),e.startupMemoryCache=!1),Ee.enablePerfMeasure=!!e.browserProfilerOptions&&globalThis.performance&&"function"==typeof globalThis.performance.measure,Re.maxParallelDownloads=e.maxParallelDownloads||Re.maxParallelDownloads,Re.enableDownloadRetry=void 0!==e.enableDownloadRetry?e.enableDownloadRetry:Re.enableDownloadRetry}let pe=!1;function be(e){return!!globalThis.navigator&&((!!e.resources.pdb||0!=e.debugLevel)&&(Re.isChromium||Re.isFirefox))}const we="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ye="function"==typeof importScripts,ve="object"==typeof window||ye&&!we,_e=!ve&&!we&&!ye;let Ee={},Re={},je={},xe={},Se=!1;const Ae={mono:{},binding:{},internal:xe,module:{},loaderHelpers:Re,runtimeHelpers:Ee,api:je};function De(e,t){if(e)return;const o="Assert failed: "+("function"==typeof t?t():t),n=new Error(o);Ee.abort(n)}function Ce(){return void 0!==Re.exitCode}function Te(){return Ee.runtimeReady&&!Ce()}function Oe(){Ee.runtimeReady||De(!1,"mono runtime didn't start yet"),Re.assertAfterExit&&Ce()&&De(!1,`mono runtime already exited with ${Re.exitCode}`)}function ke(e,t){var o;const n=t&&"object"==typeof t;e=n&&"number"==typeof t.status?t.status:e;const r=n&&"string"==typeof t.message?t.message:""+t;if((t=n?t:Ee.ExitStatus?new Ee.ExitStatus(e):new Error("Exit with code "+e+" "+r)).status=e,t.message||(t.message=r),t.stack||(t.stack=(new Error).stack||""),t.silent=!0,!Ce()){try{Ee.runtimeReady||(a("abort_startup, reason: "+t),function(e){Re.allDownloadsQueued.promise_control.reject(e),Re.afterConfigLoaded.promise_control.reject(e),Re.wasmDownloadPromise.promise_control.reject(e),Re.runtimeModuleLoaded.promise_control.reject(e),Re.memorySnapshotSkippedOrDone.promise_control.reject(e),Ee.dotnetReady&&(Ee.dotnetReady.promise_control.reject(e),Ee.afterInstantiateWasm.promise_control.reject(e),Ee.beforePreInit.promise_control.reject(e),Ee.afterPreInit.promise_control.reject(e),Ee.afterPreRun.promise_control.reject(e),Ee.beforeOnRuntimeInitialized.promise_control.reject(e),Ee.afterOnRuntimeInitialized.promise_control.reject(e),Ee.afterPostRun.promise_control.reject(e))}(t)),function(e,t){if(0!==e&&t){const e=Ee.ExitStatus&&t instanceof Ee.ExitStatus?a:u;"string"==typeof t?e(t):t.stack&&t.message?Ee.stringify_as_error_with_stack?e(Ee.stringify_as_error_with_stack(t)):e(t.message+"\n"+t.stack):e(JSON.stringify(t))}if(Re.config&&Re.config.logExitCode)if(d){const t=()=>{0==d.bufferedAmount?l("WASM EXIT "+e):globalThis.setTimeout(t,100)};t()}else l("WASM EXIT "+e)}(e,t),function(e){if(ve&&Re.config&&Re.config.appendElementOnExit){const t=document.createElement("label");t.id="tests_done",e&&(t.style.background="red"),t.innerHTML=e.toString(),document.body.appendChild(t)}}(e),Ee.jiterpreter_dump_stats&&Ee.jiterpreter_dump_stats(!1),0===e&&(null===(o=Re.config)||void 0===o?void 0:o.interopCleanupOnExit)&&Ee.forceDisposeProxies(!0,!0)}catch(e){c("mono_exit failed",e)}Re.exitCode=e}if(Re.config&&Re.config.asyncFlushOnExit&&0===e)throw(async()=>{try{await async function(){try{const e=await import("process"),t=e=>new Promise(((t,o)=>{e.on("error",(e=>o(e))),e.write("",(function(){t()}))})),o=t(e.stderr),n=t(e.stdout);await Promise.all([n,o])}catch(e){u(`flushing std* streams failed: ${e}`)}}()}finally{Me(e,t)}})(),t;Me(e,t)}function Me(e,t){if(Te()&&Ee.mono_wasm_exit&&Ee.mono_wasm_exit(e),0!==e||!ve)throw we&&xe.process?xe.process.exit(e):Ee.quit&&Ee.quit(e,t),t}!function(o){if(Se)throw new Error("Loader module already loaded");Se=!0,Ee=o.runtimeHelpers,Re=o.loaderHelpers,je=o.api,xe=o.internal,Object.assign(je,{INTERNAL:xe,invokeLibraryInitializers:le}),Object.assign(o.module,{disableDotnet6Compatibility:!0,config:{environmentVariables:{}}}),Object.assign(Ee,{mono_wasm_bindings_is_ready:!1,javaScriptExports:{},config:o.module.config,diagnosticTracing:!1,abort:e=>{throw e}}),Object.assign(Re,{gitHash:"1381d5ebd2ab1f292848d5b19b80cf71ac332508",config:o.module.config,diagnosticTracing:!1,maxParallelDownloads:16,enableDownloadRetry:!0,assertAfterExit:!ve,_loaded_files:[],loadedFiles:[],loadedAssemblies:[],libraryInitializers:[],actual_downloaded_assets_count:0,actual_instantiated_assets_count:0,expected_downloaded_assets_count:0,expected_instantiated_assets_count:0,afterConfigLoaded:n(),allDownloadsQueued:n(),wasmDownloadPromise:n(),runtimeModuleLoaded:n(),memorySnapshotSkippedOrDone:n(),is_exited:Ce,is_runtime_running:Te,assert_runtime_running:Oe,mono_exit:ke,createPromiseController:n,getPromiseController:r,assertIsControllablePromise:s,mono_download_assets:Q,resolve_single_asset_path:H,setup_proxy_console:f,logDownloadStatsToConsole:y,purgeUnusedCacheEntriesAsync:v,hasDebuggingEnabled:be,retrieve_asset_download:Z,invokeLibraryInitializers:le,exceptions:e,simd:t})}(Ae);const $e="__mono_message_please_dont_collide__";let Le=!1;const Ie=Ae.module,Ue=Ie.config;async function Ne(e){if("function"==typeof e){const t=e(Ae.api);if(t.ready)throw new Error("Module.ready couldn't be redefined.");Object.assign(Ie,t),fe(Ie,t)}else{if("object"!=typeof e)throw new Error("Can't use moduleFactory callback of createDotnetRuntime function.");fe(Ie,e)}return await async function(e){if(we){const e=await import("process"),t=14;if(e.versions.node.split(".")[0]0&&(Re.modulesUniqueQuery=t.substring(o)),Re.scriptUrl=t.replace(/\\/g,"/").replace(/[?#].*/,""),Re.scriptDirectory=(n=Re.scriptUrl).slice(0,n.lastIndexOf("/"))+"/",Re.locateFile=e=>"URL"in globalThis&&globalThis.URL!==x?new URL(e,Re.scriptDirectory).toString():T(e)?e:Re.scriptDirectory+e,Re.fetch_like=S,Re.out=console.log,Re.err=console.error,Re.onDownloadResourceProgress=e.onDownloadResourceProgress,ve&&globalThis.navigator){const e=globalThis.navigator,t=e.userAgentData&&e.userAgentData.brands;t&&t.length>0?Re.isChromium=t.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):e.userAgent&&(Re.isChromium=e.userAgent.includes("Chrome"),Re.isFirefox=e.userAgent.includes("Firefox"))}xe.require=we?await import("module").then((e=>e.createRequire(import.meta.url))):Promise.resolve((()=>{throw new Error("require not supported")})),void 0===globalThis.URL&&(globalThis.URL=x)}(Ie),Ie.ENVIRONMENT_IS_PTHREAD?async function(){(function(){const e=new MessageChannel,t=e.port1,o=e.port2;t.addEventListener("message",(e=>{var n;n=JSON.parse(e.data.config),Le?a("mono config already received"):(de(Re.config,n),ge(),a("mono config received"),Le=!0,Re.afterConfigLoaded.promise_control.resolve(Re.config),ve&&n.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&Re.setup_proxy_console("pthread-worker",console,self.location.href)),t.close(),o.close()}),{once:!0}),t.start(),self.postMessage({[$e]:{monoCmd:"preload",port:o}},[o])})(),await Re.afterConfigLoaded.promise,function(){const e=Re.config;e.assets||De(!1,"config.assets must be defined");for(const t of e.assets)J(t)}();const e=Pe(),t=await Promise.all(e);return await ze(t),Ie}():async function(){var e;Ie.configSrc||Re.config&&0!==Object.keys(Re.config).length&&(Re.config.assets||Re.config.resources)||(Ie.configSrc="./blazor.boot.json"),await async function(e){var t;const o=e.configSrc;if(pe)await Re.afterConfigLoaded.promise;else try{if(pe=!0,o&&(a("mono_wasm_load_config"),await async function(e){const t=Re.locateFile(e.configSrc),o=void 0!==Re.loadBootResource?Re.loadBootResource("manifest","blazor.boot.json",t,"","manifest"):s(t);let n;n=o?"string"==typeof o?await s(A(o)):await o:await s(X(t,"manifest"));const r=await async function(e){const t=Re.config,o=await e.json();t.applicationEnvironment||(o.applicationEnvironment=e.headers.get("Blazor-Environment")||e.headers.get("DotNet-Environment")||"Production"),o.environmentVariables||(o.environmentVariables={});const n=e.headers.get("DOTNET-MODIFIABLE-ASSEMBLIES");n&&(o.environmentVariables.DOTNET_MODIFIABLE_ASSEMBLIES=n);const r=e.headers.get("ASPNETCORE-BROWSER-TOOLS");return r&&(o.environmentVariables.__ASPNETCORE_BROWSER_TOOLS=r),o}(n);function s(e){return Re.fetch_like(e,{method:"GET",credentials:"include",cache:"no-cache"})}de(Re.config,r)}(e)),ge(),await ae(null===(t=Re.config.resources)||void 0===t?void 0:t.modulesAfterConfigLoaded),await le("onRuntimeConfigLoaded",[Re.config]),e.onConfigLoaded)try{await e.onConfigLoaded(Re.config,je),ge()}catch(e){throw u("onConfigLoaded() failed",e),e}ge(),Re.config.startupMemoryCache&&e.instantiateWasm&&De(!1,"startupMemoryCache is not supported with Module.instantiateWasm"),Re.afterConfigLoaded.promise_control.resolve(Re.config),Re.config.startupMemoryCache||Re.memorySnapshotSkippedOrDone.promise_control.resolve()}catch(t){const n=`Failed to load config file ${o} ${t} ${null==t?void 0:t.stack}`;throw Re.config=e.config=Object.assign(Re.config,{message:n,error:t,isError:!0}),ke(1,new Error(n)),t}}(Ie),function(){const e=Re.config,t=[];if(e.assets)for(const t of e.assets)"object"!=typeof t&&De(!1,`asset must be object, it was ${typeof t} : ${t}`),"string"!=typeof t.behavior&&De(!1,"asset behavior must be known string"),"string"!=typeof t.name&&De(!1,"asset name must be string"),t.resolvedUrl&&"string"!=typeof t.resolvedUrl&&De(!1,"asset resolvedUrl could be string"),t.hash&&"string"!=typeof t.hash&&De(!1,"asset resolvedUrl could be string"),t.pendingDownload&&"object"!=typeof t.pendingDownload&&De(!1,"asset pendingDownload could be object"),W[t.behavior]?M.push(t):$.push(t),J(t);else if(e.resources){const o=e.resources;if(o.wasmNative||De(!1,"resources.wasmNative must be defined"),o.jsModuleNative||De(!1,"resources.jsModuleNative must be defined"),o.jsModuleRuntime||De(!1,"resources.jsModuleRuntime must be defined"),q($,o.wasmNative,"dotnetwasm"),q(t,o.jsModuleNative,"js-module-native"),q(t,o.jsModuleRuntime,"js-module-runtime"),o.assembly)for(const e in o.assembly)M.push({name:e,hash:o.assembly[e],behavior:"assembly"});if(0!=e.debugLevel&&o.pdb)for(const e in o.pdb)M.push({name:e,hash:o.pdb[e],behavior:"pdb"});if(e.loadAllSatelliteResources&&o.satelliteResources)for(const e in o.satelliteResources)for(const t in o.satelliteResources[e])M.push({name:t,hash:o.satelliteResources[e][t],behavior:"resource",culture:e});if(o.vfs)for(const e in o.vfs)for(const t in o.vfs[e])$.push({name:t,hash:o.vfs[e][t],behavior:"vfs",virtualPath:e});const n=j(e);if(n&&o.icu)for(const e in o.icu)e===n&&M.push({name:e,hash:o.icu[e],behavior:"icu",loadRemote:!0});if(o.wasmSymbols)for(const e in o.wasmSymbols)$.push({name:e,hash:o.wasmSymbols[e],behavior:"symbols"})}if(e.appsettings)for(let t=0;t{Re.wasmDownloadPromise.promise_control.resolve(e)})).catch((e=>{ke(1,e)})),setTimeout((()=>{(function(){if(Re.preferredIcuAsset=j(Re.config),Re.invariantMode="invariant"==Re.config.globalizationMode,!Re.invariantMode)if(Re.preferredIcuAsset)a("ICU data archive(s) available, disabling invariant mode");else{if("custom"===Re.config.globalizationMode||"all"===Re.config.globalizationMode||"sharded"===Re.config.globalizationMode){const e="invariant globalization mode is inactive and no ICU data archives are available";throw Re.err(`ERROR: ${e}`),new Error(e)}a("ICU data archive(s) not available, using invariant globalization mode"),Re.invariantMode=!0,Re.preferredIcuAsset=null}const e="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT",t="DOTNET_SYSTEM_GLOBALIZATION_HYBRID",o=Re.config.environmentVariables;if(void 0===o[t]&&"hybrid"===Re.config.globalizationMode?o[t]="1":void 0===o[e]&&Re.invariantMode&&(o[e]="1"),void 0===o.TZ)try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone||null;e&&(o.TZ=e)}catch(e){!function(e,...t){console.info(i+e,...t)}("failed to detect timezone, will fallback to UTC")}})(),Q()}),0);const o=await Promise.all(t);return await ze(o),await Ee.dotnetReady.promise,await ae(null===(e=Re.config.resources)||void 0===e?void 0:e.modulesAfterRuntimeReady),await le("onRuntimeReady",[Ae.api]),je}()}function Pe(){const e=H("js-module-runtime"),t=H("js-module-native");let o,n;return"object"==typeof e.moduleExports?o=e.moduleExports:(a(`Attempting to import '${e.resolvedUrl}' for ${e.name}`),o=import(e.resolvedUrl)),"object"==typeof t.moduleExports?n=t.moduleExports:(a(`Attempting to import '${t.resolvedUrl}' for ${t.name}`),n=import(t.resolvedUrl)),[o,n]}async function ze(e){const{initializeExports:t,initializeReplacements:o,configureRuntimeStartup:n,configureEmscriptenStartup:r,configureWorkerStartup:s,setRuntimeGlobals:i,passEmscriptenInternals:a}=e[0],{default:l}=e[1];i(Ae),t(Ae),await n(),Re.runtimeModuleLoaded.promise_control.resolve(),l((e=>(Object.assign(Ie,{ready:e.ready,__dotnet_runtime:{initializeReplacements:o,configureEmscriptenStartup:r,configureWorkerStartup:s,passEmscriptenInternals:a}}),Ie)))}const Fe=new class{withModuleConfig(e){try{return fe(Ie,e),this}catch(e){throw ke(1,e),e}}withOnConfigLoaded(e){try{return fe(Ie,{onConfigLoaded:e}),this}catch(e){throw ke(1,e),e}}withConsoleForwarding(){try{return de(Ue,{forwardConsoleLogsToWS:!0}),this}catch(e){throw ke(1,e),e}}withExitOnUnhandledError(){const e=function(e,t){e.preventDefault();try{t&&t.silent||ke(1,t)}catch(e){}};try{return ve&&(window.addEventListener("unhandledrejection",(t=>e(t,t.reason))),window.addEventListener("error",(t=>e(t,t.error)))),this}catch(e){throw ke(1,e),e}}withAsyncFlushOnExit(){try{return de(Ue,{asyncFlushOnExit:!0}),this}catch(e){throw ke(1,e),e}}withExitCodeLogging(){try{return de(Ue,{logExitCode:!0}),this}catch(e){throw ke(1,e),e}}withElementOnExit(){try{return de(Ue,{appendElementOnExit:!0}),this}catch(e){throw ke(1,e),e}}withInteropCleanupOnExit(){try{return de(Ue,{interopCleanupOnExit:!0}),this}catch(e){throw ke(1,e),e}}withAssertAfterExit(){try{return de(Ue,{assertAfterExit:!0}),this}catch(e){throw ke(1,e),e}}withWaitingForDebugger(e){try{return de(Ue,{waitForDebugger:e}),this}catch(e){throw ke(1,e),e}}withStartupMemoryCache(e){try{return de(Ue,{startupMemoryCache:e}),this}catch(e){throw ke(1,e),e}}withConfig(e){try{return de(Ue,e),this}catch(e){throw ke(1,e),e}}withConfigSrc(e){try{return e&&"string"==typeof e||De(!1,"must be file path or URL"),fe(Ie,{configSrc:e}),this}catch(e){throw ke(1,e),e}}withVirtualWorkingDirectory(e){try{return e&&"string"==typeof e||De(!1,"must be directory path"),this.virtualWorkingDirectory=e,this}catch(e){throw ke(1,e),e}}withEnvironmentVariable(e,t){try{const o={};return o[e]=t,de(Ue,{environmentVariables:o}),this}catch(e){throw ke(1,e),e}}withEnvironmentVariables(e){try{return e&&"object"==typeof e||De(!1,"must be dictionary object"),de(Ue,{environmentVariables:e}),this}catch(e){throw ke(1,e),e}}withDiagnosticTracing(e){try{return"boolean"!=typeof e&&De(!1,"must be boolean"),de(Ue,{diagnosticTracing:e}),this}catch(e){throw ke(1,e),e}}withDebugging(e){try{return e&&"number"==typeof e||De(!1,"must be number"),de(Ue,{debugLevel:e}),this}catch(e){throw ke(1,e),e}}withApplicationArguments(...e){try{return e&&Array.isArray(e)||De(!1,"must be array of strings"),this.applicationArguments=e,this}catch(e){throw ke(1,e),e}}withRuntimeOptions(e){try{return e&&Array.isArray(e)||De(!1,"must be array of strings"),de(Ue,{runtimeOptions:e}),this}catch(e){throw ke(1,e),e}}withMainAssembly(e){try{return de(Ue,{mainAssemblyName:e}),this}catch(e){throw ke(1,e),e}}withApplicationArgumentsFromQuery(){try{if(!globalThis.window)throw new Error("Missing window to the query parameters from");if(void 0===globalThis.URLSearchParams)throw new Error("URLSearchParams is supported");const e=new URLSearchParams(window.location.search).getAll("arg");return this.withApplicationArguments(...e)}catch(e){throw ke(1,e),e}}withApplicationEnvironment(e){try{return de(Ue,{applicationEnvironment:e}),this}catch(e){throw ke(1,e),e}}withApplicationCulture(e){try{return de(Ue,{applicationCulture:e}),this}catch(e){throw ke(1,e),e}}withResourceLoader(e){try{return Re.loadBootResource=e,this}catch(e){throw ke(1,e),e}}async create(){try{if(this.instance||(ve&&Ie.config.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&f("main",globalThis.console,globalThis.location.origin),Ie||De(!1,"Null moduleConfig"),Ie.config||De(!1,"Null moduleConfig.config"),await Ne(Ie),this.instance=Ae.api),this.virtualWorkingDirectory){const e=this.instance.Module.FS,t=e.stat(this.virtualWorkingDirectory);t&&e.isDir(t.mode)||De(!1,`Could not find working directory ${this.virtualWorkingDirectory}`),e.chdir(this.virtualWorkingDirectory)}return this.instance}catch(e){throw ke(1,e),e}}async run(){try{if(Ie.config||De(!1,"Null moduleConfig.config"),this.instance||await this.create(),Ie.config.mainAssemblyName||De(!1,"Null moduleConfig.config.mainAssemblyName"),!this.applicationArguments)if(we){const e=await import("process");this.applicationArguments=e.argv.slice(2)}else this.applicationArguments=[];return this.instance.runMainAndExit(Ie.config.mainAssemblyName,this.applicationArguments)}catch(e){throw ke(1,e),e}}},We=ke,Be=Ne;_e||"function"==typeof globalThis.URL||De(!1,"This browser/engine doesn't support URL API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features"),"function"!=typeof globalThis.BigInt64Array&&De(!1,"This browser/engine doesn't support BigInt64Array API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features");export{Be as default,Fe as dotnet,We as exit}; +const e=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),o=Symbol.for("wasm promise_control");function n(e,t){let n=null;const r=new Promise((function(o,r){n={isDone:!1,promise:null,resolve:t=>{n.isDone||(n.isDone=!0,o(t),e&&e())},reject:e=>{n.isDone||(n.isDone=!0,r(e),t&&t())}}}));n.promise=r;const s=r;return s[o]=n,{promise:s,promise_control:n}}function r(e){return e[o]}function s(e){(function(e){return void 0!==e[o]})(e)||De(!1,"Promise is not controllable")}const i="MONO_WASM: ";function a(e,...t){Re.diagnosticTracing&&console.debug(i+e,...t)}function l(e,...t){console.info(e,...t)}function c(e,...t){console.warn(i+e,...t)}function u(e,...t){t&&t.length>0&&t[0]&&"object"==typeof t[0]&&t[0].silent||console.error(i+e,...t)}let d;function f(e,t,o){const n={log:t.log,error:t.error},r=t;function s(t,o,r){return function(...s){try{let n=s[0];if(void 0===n)n="undefined";else if(null===n)n="null";else if("function"==typeof n)n=n.toString();else if("string"!=typeof n)try{n=JSON.stringify(n)}catch(e){n=n.toString()}if("string"==typeof n)if("["==n[0]){const t=(new Date).toISOString();n="main"!==e?`[${e}][${t}] ${n}`:`[${t}] ${n}`}else"main"!==e&&(n=`[${e}] ${n}`);o(r?JSON.stringify({method:t,payload:n,arguments:s}):[t+n,...s.slice(1)])}catch(e){n.error(`proxyConsole failed: ${e}`)}}}const i=["debug","trace","warn","info","error"];for(const e of i)"function"!=typeof r[e]&&(r[e]=s(`console.${e}: `,t.log,!1));const a=`${o}/console`.replace("https://","wss://").replace("http://","ws://");d=new WebSocket(a),d.addEventListener("open",(()=>{n.log(`browser: [${e}] Console websocket connected.`)})),d.addEventListener("error",(t=>{n.error(`[${e}] websocket error: ${t}`,t)})),d.addEventListener("close",(t=>{n.error(`[${e}] websocket closed: ${t}`,t)}));const l=e=>{d.readyState===WebSocket.OPEN?d.send(e):n.log(e)};for(const e of["log",...i])r[e]=s(`console.${e}`,l,!0)}const m={},h={},g={};let p,b,w;function y(){const e=Object.values(g),t=Object.values(h),o=E(e),n=E(t),r=o+n;if(0===r)return;const s=ve?"%c":"",i=ve?["background: purple; color: white; padding: 1px 3px; border-radius: 3px;","font-weight: bold;","font-weight: normal;"]:[],a=Re.config.linkerEnabled?"":"\nThis application was built with linking (tree shaking) disabled. \nPublished applications will be significantly smaller if you install wasm-tools workload. \nSee also https://aka.ms/dotnet-wasm-features";console.groupCollapsed(`${s}dotnet${s} Loaded ${R(r)} resources${s}${a}`,...i),e.length&&(console.groupCollapsed(`Loaded ${R(o)} resources from cache`),console.table(g),console.groupEnd()),t.length&&(console.groupCollapsed(`Loaded ${R(n)} resources from network`),console.table(h),console.groupEnd()),console.groupEnd()}async function v(){const e=p;if(e){const t=(await e.keys()).map((async t=>{t.url in m||await e.delete(t)}));await Promise.all(t)}}function _(e){return`${e.resolvedUrl}.${e.hash}`}function E(e){return e.reduce(((e,t)=>e+(t.responseBytes||0)),0)}function R(e){return`${(e/1048576).toFixed(2)} MB`}function j(e){var t;if((null===(t=e.resources)||void 0===t?void 0:t.icu)&&"invariant"!=e.globalizationMode){const t=e.applicationCulture||(ve?navigator.languages&&navigator.languages[0]:Intl.DateTimeFormat().resolvedOptions().locale),o=Object.keys(e.resources.icu);let n=null;if("custom"===e.globalizationMode?1===o.length&&(n=o[0]):"hybrid"===e.globalizationMode?n="icudt_hybrid.dat":t&&"all"!==e.globalizationMode?"sharded"===e.globalizationMode&&(n=function(e){const t=e.split("-")[0];return"en"===t||["fr","fr-FR","it","it-IT","de","de-DE","es","es-ES"].includes(e)?"icudt_EFIGS.dat":["zh","ko","ja"].includes(t)?"icudt_CJK.dat":"icudt_no_CJK.dat"}(t)):n="icudt.dat",n&&o.includes(n))return n}return e.globalizationMode="invariant",null}const x=class{constructor(e){this.url=e}toString(){return this.url}};async function S(e,t){try{const o="function"==typeof globalThis.fetch;if(we){const n=e.startsWith("file://");if(!n&&o)return globalThis.fetch(e,t||{credentials:"same-origin"});b||(w=xe.require("url"),b=xe.require("fs")),n&&(e=w.fileURLToPath(e));const r=await b.promises.readFile(e);return{ok:!0,headers:{length:0,get:()=>null},url:e,arrayBuffer:()=>r,json:()=>JSON.parse(r),text:()=>{throw new Error("NotImplementedException")}}}if(o)return globalThis.fetch(e,t||{credentials:"same-origin"});if("function"==typeof read)return{ok:!0,url:e,headers:{length:0,get:()=>null},arrayBuffer:()=>new Uint8Array(read(e,"binary")),json:()=>JSON.parse(read(e,"utf8")),text:()=>read(e,"utf8")}}catch(t){return{ok:!1,url:e,status:500,headers:{length:0,get:()=>null},statusText:"ERR28: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t},text:()=>{throw t}}}throw new Error("No fetch implementation available")}function A(e){return"string"!=typeof e&&De(!1,"url must be a string"),!T(e)&&0!==e.indexOf("./")&&0!==e.indexOf("../")&&globalThis.URL&&globalThis.document&&globalThis.document.baseURI&&(e=new URL(e,globalThis.document.baseURI).toString()),e}const D=/^[a-zA-Z][a-zA-Z\d+\-.]*?:\/\//,C=/[a-zA-Z]:[\\/]/;function T(e){return we||_e?e.startsWith("/")||e.startsWith("\\")||-1!==e.indexOf("///")||C.test(e):D.test(e)}let O,k=0;const M=[],$=[],L=new Map,I={"js-module-threads":!0,"js-module-runtime":!0,"js-module-dotnet":!0,"js-module-native":!0},U={...I,"js-module-library-initializer":!0},N={...I,dotnetwasm:!0,heap:!0,manifest:!0},P={...U,manifest:!0},z={...U,dotnetwasm:!0},F={dotnetwasm:!0,symbols:!0},W={resource:!0,assembly:!0,pdb:!0,heap:!0,icu:!0},B={...U,dotnetwasm:!0,symbols:!0};function V(e){return!("icu"==e.behavior&&e.name!=Re.preferredIcuAsset)}function q(e,t,o){const n=Object.keys(t||{});De(1==n.length,`Expect to have one ${o} asset in resources`);const r=n[0],s={name:r,hash:t[r],behavior:o};return J(s),e.push(s),s}function J(e){N[e.behavior]&&L.set(e.behavior,e)}function H(e){const t=function(e){De(N[e],`Unknown single asset behavior ${e}`);const t=L.get(e);return De(t,`Single asset for ${e} not found`),t}(e);if(t.resolvedUrl=Re.locateFile(t.name),I[t.behavior]){const e=re(t);e?("string"!=typeof e&&De(!1,"loadBootResource response for 'dotnetjs' type should be a URL string"),t.resolvedUrl=e):t.resolvedUrl=X(t.resolvedUrl,t.behavior)}else if("dotnetwasm"!==t.behavior)throw new Error(`Unknown single asset behavior ${e}`);return t}async function Q(){a("mono_download_assets");try{const e=[],t=t=>{!B[t.behavior]&&V(t)&&Re.expected_instantiated_assets_count++,!z[t.behavior]&&V(t)&&(Re.expected_downloaded_assets_count++,e.push(G(t)))};for(const e of $)t(e);await Re.memorySnapshotSkippedOrDone.promise;for(const e of M)if(Ee.loadedMemorySnapshotSize){if(se(e),"resource"==e.behavior||"assembly"==e.behavior||"pdb"==e.behavior){const t=K(e,""),o="string"==typeof e.virtualPath?e.virtualPath:e.name;Re._loaded_files.push({url:t,file:o})}}else t(e);Re.allDownloadsQueued.promise_control.resolve(),await Re.runtimeModuleLoaded.promise;const o=[];for(const t of e)o.push((async()=>{const e=await t;if(e.buffer){if(!B[e.behavior]){e.buffer&&"object"==typeof e.buffer||De(!1,"asset buffer must be array-like or buffer-like or promise of these"),"string"!=typeof e.resolvedUrl&&De(!1,"resolvedUrl must be string");const t=e.resolvedUrl,o=await e.buffer,n=new Uint8Array(o);se(e),await Ee.beforeOnRuntimeInitialized.promise,Ee.instantiate_asset(e,t,n)}}else F[e.behavior]?("symbols"===e.behavior&&(await Ee.instantiate_symbols_asset(e),se(e)),F[e.behavior]&&++Re.actual_downloaded_assets_count):(e.isOptional||De(!1,"Expected asset to have the downloaded buffer"),!z[e.behavior]&&V(e)&&Re.expected_downloaded_assets_count--,!B[e.behavior]&&V(e)&&Re.expected_instantiated_assets_count--)})());Promise.all(o).then((()=>{Ee.allAssetsInMemory.promise_control.resolve()})).catch((e=>{throw Re.err("Error in mono_download_assets: "+e),ke(1,e),e}))}catch(e){throw Re.err("Error in mono_download_assets: "+e),e}}async function Z(e){const t=await G(e);return await t.pendingDownloadInternal.response,t.buffer}async function G(e){try{return await Y(e)}catch(t){if(!Re.enableDownloadRetry)throw t;if(_e||we)throw t;if(e.pendingDownload&&e.pendingDownloadInternal==e.pendingDownload)throw t;if(e.resolvedUrl&&-1!=e.resolvedUrl.indexOf("file://"))throw t;if(t&&404==t.status)throw t;e.pendingDownloadInternal=void 0,await Re.allDownloadsQueued.promise;try{return a(`Retrying download '${e.name}'`),await Y(e)}catch(t){return e.pendingDownloadInternal=void 0,await(100,new Promise((e=>globalThis.setTimeout(e,100)))),a(`Retrying download (2) '${e.name}' after delay`),await Y(e)}}}async function Y(e){for(;O;)await O.promise;try{++k,k==Re.maxParallelDownloads&&(a("Throttling further parallel downloads"),O=n());const t=await async function(e){if(e.pendingDownload&&(e.pendingDownloadInternal=e.pendingDownload),e.pendingDownloadInternal&&e.pendingDownloadInternal.response)return e.pendingDownloadInternal.response;if(e.buffer){const t=await e.buffer;return e.resolvedUrl||(e.resolvedUrl="undefined://"+e.name),e.pendingDownloadInternal={url:e.resolvedUrl,name:e.name,response:Promise.resolve({ok:!0,arrayBuffer:()=>t,json:()=>JSON.parse(new TextDecoder("utf-8").decode(t)),text:()=>{throw new Error("NotImplementedException")},headers:{get:()=>{}}})},e.pendingDownloadInternal.response}const t=e.loadRemote&&Re.config.remoteSources?Re.config.remoteSources:[""];let o;for(let n of t){n=n.trim(),"./"===n&&(n="");const t=K(e,n);e.name===t?a(`Attempting to download '${t}'`):a(`Attempting to download '${t}' for ${e.name}`);try{e.resolvedUrl=t;const n=oe(e);if(e.pendingDownloadInternal=n,o=await n.response,!o||!o.ok)continue;return o}catch(e){o||(o={ok:!1,url:t,status:0,statusText:""+e});continue}}const n=e.isOptional||e.name.match(/\.pdb$/)&&Re.config.ignorePdbLoadErrors;if(o||De(!1,`Response undefined ${e.name}`),!n){const t=new Error(`download '${o.url}' for ${e.name} failed ${o.status} ${o.statusText}`);throw t.status=o.status,t}Re.out(`optional download '${o.url}' for ${e.name} failed ${o.status} ${o.statusText}`)}(e);return t?(F[e.behavior]||(e.buffer=await t.arrayBuffer(),++Re.actual_downloaded_assets_count),e):e}finally{if(--k,O&&k==Re.maxParallelDownloads-1){a("Resuming more parallel downloads");const e=O;O=void 0,e.promise_control.resolve()}}}function K(e,t){let o;return null==t&&De(!1,`sourcePrefix must be provided for ${e.name}`),e.resolvedUrl?o=e.resolvedUrl:(o=""===t?"assembly"===e.behavior||"pdb"===e.behavior?e.name:"resource"===e.behavior&&e.culture&&""!==e.culture?`${e.culture}/${e.name}`:e.name:t+e.name,o=X(Re.locateFile(o),e.behavior)),o&&"string"==typeof o||De(!1,"attemptUrl need to be path or url string"),o}function X(e,t){return Re.modulesUniqueQuery&&P[t]&&(e+=Re.modulesUniqueQuery),e}let ee=0;const te=new Set;function oe(e){try{e.resolvedUrl||De(!1,"Request's resolvedUrl must be set");const t=async function(e){let t=await async function(e){const t=p;if(!t||e.noCache||!e.hash||0===e.hash.length)return;const o=_(e);let n;m[o]=!0;try{n=await t.match(o)}catch(e){}if(!n)return;const r=parseInt(n.headers.get("content-length")||"0");return g[e.name]={responseBytes:r},n}(e);return t||(t=await function(e){let t=e.resolvedUrl;if(Re.loadBootResource){const o=re(e);if(o instanceof Promise)return o;"string"==typeof o&&(t=o)}const o={};return Re.config.disableNoCacheFetch||(o.cache="no-cache"),e.useCredentials?o.credentials="include":!Re.config.disableIntegrityCheck&&e.hash&&(o.integrity=e.hash),Re.fetch_like(t,o)}(e),function(e,t){const o=p;if(!o||e.noCache||!e.hash||0===e.hash.length)return;const n=t.clone();setTimeout((()=>{const t=_(e);!async function(e,t,o,n){const r=await n.arrayBuffer(),s=function(e){if("undefined"!=typeof performance)return performance.getEntriesByName(e)[0]}(n.url),i=s&&s.encodedBodySize||void 0;h[t]={responseBytes:i};const a=new Response(r,{headers:{"content-type":n.headers.get("content-type")||"","content-length":(i||n.headers.get("content-length")||"").toString()}});try{await e.put(o,a)}catch(e){}}(o,e.name,t,n)}),0)}(e,t)),t}(e),o={name:e.name,url:e.resolvedUrl,response:t};return te.add(e.name),o.response.then((()=>{"assembly"==e.behavior&&Re.loadedAssemblies.push(e.name),ee++,Re.onDownloadResourceProgress&&Re.onDownloadResourceProgress(ee,te.size)})),o}catch(t){const o={ok:!1,url:e.resolvedUrl,status:500,statusText:"ERR29: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t}};return{name:e.name,url:e.resolvedUrl,response:Promise.resolve(o)}}}const ne={resource:"assembly",assembly:"assembly",pdb:"pdb",icu:"globalization",vfs:"configuration",manifest:"manifest",dotnetwasm:"dotnetwasm","js-module-dotnet":"dotnetjs","js-module-native":"dotnetjs","js-module-runtime":"dotnetjs","js-module-threads":"dotnetjs"};function re(e){var t;if(Re.loadBootResource){const o=null!==(t=e.hash)&&void 0!==t?t:"",n=e.resolvedUrl,r=ne[e.behavior];if(r){const t=Re.loadBootResource(r,e.name,n,o,e.behavior);return"string"==typeof t?A(t):t}}}function se(e){e.pendingDownloadInternal=null,e.pendingDownload=null,e.buffer=null,e.moduleExports=null}function ie(e){let t=e.lastIndexOf("/");return t>=0&&t++,e.substring(t)}async function ae(e){if(!e)return;const t=Object.keys(e);await Promise.all(t.map((e=>async function(e){try{const t=X(Re.locateFile(e),"js-module-library-initializer");a(`Attempting to import '${t}' for ${e}`);const o=await import(t);Re.libraryInitializers.push({scriptName:e,exports:o})}catch(t){c(`Failed to import library initializer '${e}': ${t}`)}}(e))))}async function le(e,t){if(!Re.libraryInitializers)return;const o=[];for(let n=0;nr.exports[e](...t))))}await Promise.all(o)}async function ce(e,t,o){try{await o()}catch(o){throw c(`Failed to invoke '${t}' on library initializer '${e}': ${o}`),ke(1,o),o}}var ue="Release";function de(e,t){if(e===t)return e;const o={...t};return void 0!==o.assets&&o.assets!==e.assets&&(o.assets=[...e.assets||[],...o.assets||[]]),void 0!==o.resources&&(o.resources=me(e.resources||{assembly:{},jsModuleNative:{},jsModuleRuntime:{},wasmNative:{}},o.resources)),void 0!==o.environmentVariables&&(o.environmentVariables={...e.environmentVariables||{},...o.environmentVariables||{}}),void 0!==o.runtimeOptions&&o.runtimeOptions!==e.runtimeOptions&&(o.runtimeOptions=[...e.runtimeOptions||[],...o.runtimeOptions||[]]),Object.assign(e,o)}function fe(e,t){if(e===t)return e;const o={...t};return o.config&&(e.config||(e.config={}),o.config=de(e.config,o.config)),Object.assign(e,o)}function me(e,t){if(e===t)return e;const o={...t};return void 0!==o.assembly&&(o.assembly={...e.assembly||{},...o.assembly||{}}),void 0!==o.lazyAssembly&&(o.lazyAssembly={...e.lazyAssembly||{},...o.lazyAssembly||{}}),void 0!==o.pdb&&(o.pdb={...e.pdb||{},...o.pdb||{}}),void 0!==o.jsModuleWorker&&(o.jsModuleWorker={...e.jsModuleWorker||{},...o.jsModuleWorker||{}}),void 0!==o.jsModuleNative&&(o.jsModuleNative={...e.jsModuleNative||{},...o.jsModuleNative||{}}),void 0!==o.jsModuleRuntime&&(o.jsModuleRuntime={...e.jsModuleRuntime||{},...o.jsModuleRuntime||{}}),void 0!==o.wasmSymbols&&(o.wasmSymbols={...e.wasmSymbols||{},...o.wasmSymbols||{}}),void 0!==o.wasmNative&&(o.wasmNative={...e.wasmNative||{},...o.wasmNative||{}}),void 0!==o.icu&&(o.icu={...e.icu||{},...o.icu||{}}),void 0!==o.satelliteResources&&(o.satelliteResources=he(e.satelliteResources||{},o.satelliteResources||{})),void 0!==o.modulesAfterConfigLoaded&&(o.modulesAfterConfigLoaded={...e.modulesAfterConfigLoaded||{},...o.modulesAfterConfigLoaded||{}}),void 0!==o.modulesAfterRuntimeReady&&(o.modulesAfterRuntimeReady={...e.modulesAfterRuntimeReady||{},...o.modulesAfterRuntimeReady||{}}),void 0!==o.extensions&&(o.extensions={...e.extensions||{},...o.extensions||{}}),void 0!==o.vfs&&(o.vfs=he(e.vfs||{},o.vfs||{})),Object.assign(e,o)}function he(e,t){if(e===t)return e;for(const o in t)e[o]={...e[o],...t[o]};return e}function ge(){const e=Re.config;if(e.environmentVariables=e.environmentVariables||{},e.runtimeOptions=e.runtimeOptions||[],e.resources=e.resources||{assembly:{},jsModuleNative:{},jsModuleWorker:{},jsModuleRuntime:{},wasmNative:{},vfs:{},satelliteResources:{}},e.assets){a("config.assets is deprecated, use config.resources instead");for(const t of e.assets){const o={};o[t.name]=t.hash||"";const n={};switch(t.behavior){case"assembly":n.assembly=o;break;case"pdb":n.pdb=o;break;case"resource":n.satelliteResources={},n.satelliteResources[t.culture]=o;break;case"icu":n.icu=o;break;case"symbols":n.wasmSymbols=o;break;case"vfs":n.vfs={},n.vfs[t.virtualPath]=o;break;case"dotnetwasm":n.wasmNative=o;break;case"js-module-threads":n.jsModuleWorker=o;break;case"js-module-runtime":n.jsModuleRuntime=o;break;case"js-module-native":n.jsModuleNative=o;break;case"js-module-dotnet":break;default:throw new Error(`Unexpected behavior ${t.behavior} of asset ${t.name}`)}me(e.resources,n)}}Re.assertAfterExit=e.assertAfterExit=e.assertAfterExit||!ve,void 0===e.debugLevel&&"Debug"===ue&&(e.debugLevel=-1),void 0===e.cachedResourcesPurgeDelay&&(e.cachedResourcesPurgeDelay=1e4),e.debugLevel=be(e)?e.debugLevel:0,void 0===e.diagnosticTracing&&"Debug"===ue&&(e.diagnosticTracing=!0),e.applicationCulture&&(e.environmentVariables.LANG=`${e.applicationCulture}.UTF-8`),Ee.diagnosticTracing=Re.diagnosticTracing=!!e.diagnosticTracing,Ee.waitForDebugger=e.waitForDebugger,e.startupMemoryCache=!!e.startupMemoryCache,e.startupMemoryCache&&Ee.waitForDebugger&&(a("Disabling startupMemoryCache because waitForDebugger is set"),e.startupMemoryCache=!1),Ee.enablePerfMeasure=!!e.browserProfilerOptions&&globalThis.performance&&"function"==typeof globalThis.performance.measure,Re.maxParallelDownloads=e.maxParallelDownloads||Re.maxParallelDownloads,Re.enableDownloadRetry=void 0!==e.enableDownloadRetry?e.enableDownloadRetry:Re.enableDownloadRetry}let pe=!1;function be(e){return!!globalThis.navigator&&((!!e.resources.pdb||0!=e.debugLevel)&&(Re.isChromium||Re.isFirefox))}const we="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ye="function"==typeof importScripts,ve="object"==typeof window||ye&&!we,_e=!ve&&!we&&!ye;let Ee={},Re={},je={},xe={},Se=!1;const Ae={mono:{},binding:{},internal:xe,module:{},loaderHelpers:Re,runtimeHelpers:Ee,api:je};function De(e,t){if(e)return;const o="Assert failed: "+("function"==typeof t?t():t),n=new Error(o);Ee.abort(n)}function Ce(){return void 0!==Re.exitCode}function Te(){return Ee.runtimeReady&&!Ce()}function Oe(){Ee.runtimeReady||De(!1,"mono runtime didn't start yet"),Re.assertAfterExit&&Ce()&&De(!1,`mono runtime already exited with ${Re.exitCode}`)}function ke(e,t){var o;const n=t&&"object"==typeof t;e=n&&"number"==typeof t.status?t.status:e;const r=n&&"string"==typeof t.message?t.message:""+t;if((t=n?t:Ee.ExitStatus?new Ee.ExitStatus(e):new Error("Exit with code "+e+" "+r)).status=e,t.message||(t.message=r),t.stack||(t.stack=(new Error).stack||""),t.silent=!0,!Ce()){try{Ee.runtimeReady||(a("abort_startup, reason: "+t),function(e){Re.allDownloadsQueued.promise_control.reject(e),Re.afterConfigLoaded.promise_control.reject(e),Re.wasmDownloadPromise.promise_control.reject(e),Re.runtimeModuleLoaded.promise_control.reject(e),Re.memorySnapshotSkippedOrDone.promise_control.reject(e),Ee.dotnetReady&&(Ee.dotnetReady.promise_control.reject(e),Ee.afterInstantiateWasm.promise_control.reject(e),Ee.beforePreInit.promise_control.reject(e),Ee.afterPreInit.promise_control.reject(e),Ee.afterPreRun.promise_control.reject(e),Ee.beforeOnRuntimeInitialized.promise_control.reject(e),Ee.afterOnRuntimeInitialized.promise_control.reject(e),Ee.afterPostRun.promise_control.reject(e))}(t)),function(e,t){if(0!==e&&t){const e=Ee.ExitStatus&&t instanceof Ee.ExitStatus?a:u;"string"==typeof t?e(t):t.stack&&t.message?Ee.stringify_as_error_with_stack?e(Ee.stringify_as_error_with_stack(t)):e(t.message+"\n"+t.stack):e(JSON.stringify(t))}if(Re.config&&Re.config.logExitCode)if(d){const t=()=>{0==d.bufferedAmount?l("WASM EXIT "+e):globalThis.setTimeout(t,100)};t()}else l("WASM EXIT "+e)}(e,t),function(e){if(ve&&Re.config&&Re.config.appendElementOnExit){const t=document.createElement("label");t.id="tests_done",e&&(t.style.background="red"),t.innerHTML=e.toString(),document.body.appendChild(t)}}(e),Ee.jiterpreter_dump_stats&&Ee.jiterpreter_dump_stats(!1),0===e&&(null===(o=Re.config)||void 0===o?void 0:o.interopCleanupOnExit)&&Ee.forceDisposeProxies(!0,!0)}catch(e){c("mono_exit failed",e)}Re.exitCode=e}if(Re.config&&Re.config.asyncFlushOnExit&&0===e)throw(async()=>{try{await async function(){try{const e=await import("process"),t=e=>new Promise(((t,o)=>{e.on("error",(e=>o(e))),e.write("",(function(){t()}))})),o=t(e.stderr),n=t(e.stdout);await Promise.all([n,o])}catch(e){u(`flushing std* streams failed: ${e}`)}}()}finally{Me(e,t)}})(),t;Me(e,t)}function Me(e,t){if(Te()&&Ee.mono_wasm_exit&&Ee.mono_wasm_exit(e),0!==e||!ve)throw we&&xe.process?xe.process.exit(e):Ee.quit&&Ee.quit(e,t),t}!function(o){if(Se)throw new Error("Loader module already loaded");Se=!0,Ee=o.runtimeHelpers,Re=o.loaderHelpers,je=o.api,xe=o.internal,Object.assign(je,{INTERNAL:xe,invokeLibraryInitializers:le}),Object.assign(o.module,{disableDotnet6Compatibility:!0,config:{environmentVariables:{}}}),Object.assign(Ee,{mono_wasm_bindings_is_ready:!1,javaScriptExports:{},config:o.module.config,diagnosticTracing:!1,abort:e=>{throw e}}),Object.assign(Re,{gitHash:"9f4b1f5d664afdfc80e1508ab7ed099dff210fbd",config:o.module.config,diagnosticTracing:!1,maxParallelDownloads:16,enableDownloadRetry:!0,assertAfterExit:!ve,_loaded_files:[],loadedFiles:[],loadedAssemblies:[],libraryInitializers:[],actual_downloaded_assets_count:0,actual_instantiated_assets_count:0,expected_downloaded_assets_count:0,expected_instantiated_assets_count:0,afterConfigLoaded:n(),allDownloadsQueued:n(),wasmDownloadPromise:n(),runtimeModuleLoaded:n(),memorySnapshotSkippedOrDone:n(),is_exited:Ce,is_runtime_running:Te,assert_runtime_running:Oe,mono_exit:ke,createPromiseController:n,getPromiseController:r,assertIsControllablePromise:s,mono_download_assets:Q,resolve_single_asset_path:H,setup_proxy_console:f,logDownloadStatsToConsole:y,purgeUnusedCacheEntriesAsync:v,hasDebuggingEnabled:be,retrieve_asset_download:Z,invokeLibraryInitializers:le,exceptions:e,simd:t})}(Ae);const $e="__mono_message_please_dont_collide__";let Le=!1;const Ie=Ae.module,Ue=Ie.config;async function Ne(e){if("function"==typeof e){const t=e(Ae.api);if(t.ready)throw new Error("Module.ready couldn't be redefined.");Object.assign(Ie,t),fe(Ie,t)}else{if("object"!=typeof e)throw new Error("Can't use moduleFactory callback of createDotnetRuntime function.");fe(Ie,e)}return await async function(e){if(we){const e=await import("process"),t=14;if(e.versions.node.split(".")[0]0&&(Re.modulesUniqueQuery=t.substring(o)),Re.scriptUrl=t.replace(/\\/g,"/").replace(/[?#].*/,""),Re.scriptDirectory=(n=Re.scriptUrl).slice(0,n.lastIndexOf("/"))+"/",Re.locateFile=e=>"URL"in globalThis&&globalThis.URL!==x?new URL(e,Re.scriptDirectory).toString():T(e)?e:Re.scriptDirectory+e,Re.fetch_like=S,Re.out=console.log,Re.err=console.error,Re.onDownloadResourceProgress=e.onDownloadResourceProgress,ve&&globalThis.navigator){const e=globalThis.navigator,t=e.userAgentData&&e.userAgentData.brands;t&&t.length>0?Re.isChromium=t.some((e=>"Google Chrome"===e.brand||"Microsoft Edge"===e.brand||"Chromium"===e.brand)):e.userAgent&&(Re.isChromium=e.userAgent.includes("Chrome"),Re.isFirefox=e.userAgent.includes("Firefox"))}xe.require=we?await import("module").then((e=>e.createRequire(import.meta.url))):Promise.resolve((()=>{throw new Error("require not supported")})),void 0===globalThis.URL&&(globalThis.URL=x)}(Ie),Ie.ENVIRONMENT_IS_PTHREAD?async function(){(function(){const e=new MessageChannel,t=e.port1,o=e.port2;t.addEventListener("message",(e=>{var n;n=JSON.parse(e.data.config),Le?a("mono config already received"):(de(Re.config,n),ge(),a("mono config received"),Le=!0,Re.afterConfigLoaded.promise_control.resolve(Re.config),ve&&n.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&Re.setup_proxy_console("pthread-worker",console,self.location.href)),t.close(),o.close()}),{once:!0}),t.start(),self.postMessage({[$e]:{monoCmd:"preload",port:o}},[o])})(),await Re.afterConfigLoaded.promise,function(){const e=Re.config;e.assets||De(!1,"config.assets must be defined");for(const t of e.assets)J(t)}();const e=Pe(),t=await Promise.all(e);return await ze(t),Ie}():async function(){var e;Ie.configSrc||Re.config&&0!==Object.keys(Re.config).length&&(Re.config.assets||Re.config.resources)||(Ie.configSrc="./blazor.boot.json"),await async function(e){var t;const o=e.configSrc;if(pe)await Re.afterConfigLoaded.promise;else try{if(pe=!0,o&&(a("mono_wasm_load_config"),await async function(e){const t=Re.locateFile(e.configSrc),o=void 0!==Re.loadBootResource?Re.loadBootResource("manifest","blazor.boot.json",t,"","manifest"):s(t);let n;n=o?"string"==typeof o?await s(A(o)):await o:await s(X(t,"manifest"));const r=await async function(e){const t=Re.config,o=await e.json();t.applicationEnvironment||(o.applicationEnvironment=e.headers.get("Blazor-Environment")||e.headers.get("DotNet-Environment")||"Production"),o.environmentVariables||(o.environmentVariables={});const n=e.headers.get("DOTNET-MODIFIABLE-ASSEMBLIES");n&&(o.environmentVariables.DOTNET_MODIFIABLE_ASSEMBLIES=n);const r=e.headers.get("ASPNETCORE-BROWSER-TOOLS");return r&&(o.environmentVariables.__ASPNETCORE_BROWSER_TOOLS=r),o}(n);function s(e){return Re.fetch_like(e,{method:"GET",credentials:"include",cache:"no-cache"})}de(Re.config,r)}(e)),ge(),await ae(null===(t=Re.config.resources)||void 0===t?void 0:t.modulesAfterConfigLoaded),await le("onRuntimeConfigLoaded",[Re.config]),e.onConfigLoaded)try{await e.onConfigLoaded(Re.config,je),ge()}catch(e){throw u("onConfigLoaded() failed",e),e}ge(),Re.config.startupMemoryCache&&e.instantiateWasm&&De(!1,"startupMemoryCache is not supported with Module.instantiateWasm"),Re.afterConfigLoaded.promise_control.resolve(Re.config),Re.config.startupMemoryCache||Re.memorySnapshotSkippedOrDone.promise_control.resolve()}catch(t){const n=`Failed to load config file ${o} ${t} ${null==t?void 0:t.stack}`;throw Re.config=e.config=Object.assign(Re.config,{message:n,error:t,isError:!0}),ke(1,new Error(n)),t}}(Ie),function(){const e=Re.config,t=[];if(e.assets)for(const t of e.assets)"object"!=typeof t&&De(!1,`asset must be object, it was ${typeof t} : ${t}`),"string"!=typeof t.behavior&&De(!1,"asset behavior must be known string"),"string"!=typeof t.name&&De(!1,"asset name must be string"),t.resolvedUrl&&"string"!=typeof t.resolvedUrl&&De(!1,"asset resolvedUrl could be string"),t.hash&&"string"!=typeof t.hash&&De(!1,"asset resolvedUrl could be string"),t.pendingDownload&&"object"!=typeof t.pendingDownload&&De(!1,"asset pendingDownload could be object"),W[t.behavior]?M.push(t):$.push(t),J(t);else if(e.resources){const o=e.resources;if(o.wasmNative||De(!1,"resources.wasmNative must be defined"),o.jsModuleNative||De(!1,"resources.jsModuleNative must be defined"),o.jsModuleRuntime||De(!1,"resources.jsModuleRuntime must be defined"),q($,o.wasmNative,"dotnetwasm"),q(t,o.jsModuleNative,"js-module-native"),q(t,o.jsModuleRuntime,"js-module-runtime"),o.assembly)for(const e in o.assembly)M.push({name:e,hash:o.assembly[e],behavior:"assembly"});if(0!=e.debugLevel&&o.pdb)for(const e in o.pdb)M.push({name:e,hash:o.pdb[e],behavior:"pdb"});if(e.loadAllSatelliteResources&&o.satelliteResources)for(const e in o.satelliteResources)for(const t in o.satelliteResources[e])M.push({name:t,hash:o.satelliteResources[e][t],behavior:"resource",culture:e});if(o.vfs)for(const e in o.vfs)for(const t in o.vfs[e])$.push({name:t,hash:o.vfs[e][t],behavior:"vfs",virtualPath:e});const n=j(e);if(n&&o.icu)for(const e in o.icu)e===n&&M.push({name:e,hash:o.icu[e],behavior:"icu",loadRemote:!0});if(o.wasmSymbols)for(const e in o.wasmSymbols)$.push({name:e,hash:o.wasmSymbols[e],behavior:"symbols"})}if(e.appsettings)for(let t=0;t{Re.wasmDownloadPromise.promise_control.resolve(e)})).catch((e=>{ke(1,e)})),setTimeout((()=>{(function(){if(Re.preferredIcuAsset=j(Re.config),Re.invariantMode="invariant"==Re.config.globalizationMode,!Re.invariantMode)if(Re.preferredIcuAsset)a("ICU data archive(s) available, disabling invariant mode");else{if("custom"===Re.config.globalizationMode||"all"===Re.config.globalizationMode||"sharded"===Re.config.globalizationMode){const e="invariant globalization mode is inactive and no ICU data archives are available";throw Re.err(`ERROR: ${e}`),new Error(e)}a("ICU data archive(s) not available, using invariant globalization mode"),Re.invariantMode=!0,Re.preferredIcuAsset=null}const e="DOTNET_SYSTEM_GLOBALIZATION_INVARIANT",t="DOTNET_SYSTEM_GLOBALIZATION_HYBRID",o=Re.config.environmentVariables;if(void 0===o[t]&&"hybrid"===Re.config.globalizationMode?o[t]="1":void 0===o[e]&&Re.invariantMode&&(o[e]="1"),void 0===o.TZ)try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone||null;e&&(o.TZ=e)}catch(e){!function(e,...t){console.info(i+e,...t)}("failed to detect timezone, will fallback to UTC")}})(),Q()}),0);const o=await Promise.all(t);return await ze(o),await Ee.dotnetReady.promise,await ae(null===(e=Re.config.resources)||void 0===e?void 0:e.modulesAfterRuntimeReady),await le("onRuntimeReady",[Ae.api]),je}()}function Pe(){const e=H("js-module-runtime"),t=H("js-module-native");let o,n;return"object"==typeof e.moduleExports?o=e.moduleExports:(a(`Attempting to import '${e.resolvedUrl}' for ${e.name}`),o=import(e.resolvedUrl)),"object"==typeof t.moduleExports?n=t.moduleExports:(a(`Attempting to import '${t.resolvedUrl}' for ${t.name}`),n=import(t.resolvedUrl)),[o,n]}async function ze(e){const{initializeExports:t,initializeReplacements:o,configureRuntimeStartup:n,configureEmscriptenStartup:r,configureWorkerStartup:s,setRuntimeGlobals:i,passEmscriptenInternals:a}=e[0],{default:l}=e[1];i(Ae),t(Ae),await n(),Re.runtimeModuleLoaded.promise_control.resolve(),l((e=>(Object.assign(Ie,{ready:e.ready,__dotnet_runtime:{initializeReplacements:o,configureEmscriptenStartup:r,configureWorkerStartup:s,passEmscriptenInternals:a}}),Ie)))}const Fe=new class{withModuleConfig(e){try{return fe(Ie,e),this}catch(e){throw ke(1,e),e}}withOnConfigLoaded(e){try{return fe(Ie,{onConfigLoaded:e}),this}catch(e){throw ke(1,e),e}}withConsoleForwarding(){try{return de(Ue,{forwardConsoleLogsToWS:!0}),this}catch(e){throw ke(1,e),e}}withExitOnUnhandledError(){const e=function(e,t){e.preventDefault();try{t&&t.silent||ke(1,t)}catch(e){}};try{return ve&&(window.addEventListener("unhandledrejection",(t=>e(t,t.reason))),window.addEventListener("error",(t=>e(t,t.error)))),this}catch(e){throw ke(1,e),e}}withAsyncFlushOnExit(){try{return de(Ue,{asyncFlushOnExit:!0}),this}catch(e){throw ke(1,e),e}}withExitCodeLogging(){try{return de(Ue,{logExitCode:!0}),this}catch(e){throw ke(1,e),e}}withElementOnExit(){try{return de(Ue,{appendElementOnExit:!0}),this}catch(e){throw ke(1,e),e}}withInteropCleanupOnExit(){try{return de(Ue,{interopCleanupOnExit:!0}),this}catch(e){throw ke(1,e),e}}withAssertAfterExit(){try{return de(Ue,{assertAfterExit:!0}),this}catch(e){throw ke(1,e),e}}withWaitingForDebugger(e){try{return de(Ue,{waitForDebugger:e}),this}catch(e){throw ke(1,e),e}}withStartupMemoryCache(e){try{return de(Ue,{startupMemoryCache:e}),this}catch(e){throw ke(1,e),e}}withConfig(e){try{return de(Ue,e),this}catch(e){throw ke(1,e),e}}withConfigSrc(e){try{return e&&"string"==typeof e||De(!1,"must be file path or URL"),fe(Ie,{configSrc:e}),this}catch(e){throw ke(1,e),e}}withVirtualWorkingDirectory(e){try{return e&&"string"==typeof e||De(!1,"must be directory path"),this.virtualWorkingDirectory=e,this}catch(e){throw ke(1,e),e}}withEnvironmentVariable(e,t){try{const o={};return o[e]=t,de(Ue,{environmentVariables:o}),this}catch(e){throw ke(1,e),e}}withEnvironmentVariables(e){try{return e&&"object"==typeof e||De(!1,"must be dictionary object"),de(Ue,{environmentVariables:e}),this}catch(e){throw ke(1,e),e}}withDiagnosticTracing(e){try{return"boolean"!=typeof e&&De(!1,"must be boolean"),de(Ue,{diagnosticTracing:e}),this}catch(e){throw ke(1,e),e}}withDebugging(e){try{return e&&"number"==typeof e||De(!1,"must be number"),de(Ue,{debugLevel:e}),this}catch(e){throw ke(1,e),e}}withApplicationArguments(...e){try{return e&&Array.isArray(e)||De(!1,"must be array of strings"),this.applicationArguments=e,this}catch(e){throw ke(1,e),e}}withRuntimeOptions(e){try{return e&&Array.isArray(e)||De(!1,"must be array of strings"),de(Ue,{runtimeOptions:e}),this}catch(e){throw ke(1,e),e}}withMainAssembly(e){try{return de(Ue,{mainAssemblyName:e}),this}catch(e){throw ke(1,e),e}}withApplicationArgumentsFromQuery(){try{if(!globalThis.window)throw new Error("Missing window to the query parameters from");if(void 0===globalThis.URLSearchParams)throw new Error("URLSearchParams is supported");const e=new URLSearchParams(window.location.search).getAll("arg");return this.withApplicationArguments(...e)}catch(e){throw ke(1,e),e}}withApplicationEnvironment(e){try{return de(Ue,{applicationEnvironment:e}),this}catch(e){throw ke(1,e),e}}withApplicationCulture(e){try{return de(Ue,{applicationCulture:e}),this}catch(e){throw ke(1,e),e}}withResourceLoader(e){try{return Re.loadBootResource=e,this}catch(e){throw ke(1,e),e}}async create(){try{if(this.instance||(ve&&Ie.config.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&f("main",globalThis.console,globalThis.location.origin),Ie||De(!1,"Null moduleConfig"),Ie.config||De(!1,"Null moduleConfig.config"),await Ne(Ie),this.instance=Ae.api),this.virtualWorkingDirectory){const e=this.instance.Module.FS,t=e.stat(this.virtualWorkingDirectory);t&&e.isDir(t.mode)||De(!1,`Could not find working directory ${this.virtualWorkingDirectory}`),e.chdir(this.virtualWorkingDirectory)}return this.instance}catch(e){throw ke(1,e),e}}async run(){try{if(Ie.config||De(!1,"Null moduleConfig.config"),this.instance||await this.create(),Ie.config.mainAssemblyName||De(!1,"Null moduleConfig.config.mainAssemblyName"),!this.applicationArguments)if(we){const e=await import("process");this.applicationArguments=e.argv.slice(2)}else this.applicationArguments=[];return this.instance.runMainAndExit(Ie.config.mainAssemblyName,this.applicationArguments)}catch(e){throw ke(1,e),e}}},We=ke,Be=Ne;_e||"function"==typeof globalThis.URL||De(!1,"This browser/engine doesn't support URL API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features"),"function"!=typeof globalThis.BigInt64Array&&De(!1,"This browser/engine doesn't support BigInt64Array API. Please use a modern version. See also https://aka.ms/dotnet-wasm-features");export{Be as default,Fe as dotnet,We as exit}; //# sourceMappingURL=dotnet.js.map diff --git a/_framework/dotnet.js.br b/_framework/dotnet.js.br index d49be54..e9df016 100644 Binary files a/_framework/dotnet.js.br and b/_framework/dotnet.js.br differ diff --git a/_framework/dotnet.js.gz b/_framework/dotnet.js.gz index 03ab56d..9fddb41 100644 Binary files a/_framework/dotnet.js.gz and b/_framework/dotnet.js.gz differ diff --git a/_framework/dotnet.native.8.0.2.jgt5nhn140.js.br b/_framework/dotnet.native.8.0.2.jgt5nhn140.js.br deleted file mode 100644 index 2c6d622..0000000 Binary files a/_framework/dotnet.native.8.0.2.jgt5nhn140.js.br and /dev/null differ diff --git a/_framework/dotnet.native.8.0.2.jgt5nhn140.js.gz b/_framework/dotnet.native.8.0.2.jgt5nhn140.js.gz deleted file mode 100644 index 51f6303..0000000 Binary files a/_framework/dotnet.native.8.0.2.jgt5nhn140.js.gz and /dev/null differ diff --git a/_framework/dotnet.native.8.0.2.jgt5nhn140.js b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js similarity index 63% rename from _framework/dotnet.native.8.0.2.jgt5nhn140.js rename to _framework/dotnet.native.8.0.3.wzxwl5s97r.js index 7a9ac80..5e241c1 100755 --- a/_framework/dotnet.native.8.0.2.jgt5nhn140.js +++ b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js @@ -5,7 +5,7 @@ var createDotnetRuntime = (() => { return ( async function(createDotnetRuntime = {}) { -var Module=typeof createDotnetRuntime!="undefined"?createDotnetRuntime:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(_nativeModuleLoaded)throw new Error("Native module already loaded");_nativeModuleLoaded=true;createDotnetRuntime=Module=createDotnetRuntime(Module);Module["getWasmIndirectFunctionTable"]=function(){return wasmTable};Module["getMemory"]=function(){return wasmMemory};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){let data;if(typeof readbuffer=="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data=="object");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(()=>onload(readBinary(f)),0)};if(typeof clearTimeout=="undefined"){globalThis.clearTimeout=id=>{}}if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit=="function"){quit_=(status,toThrow)=>{setTimeout(()=>{if(!(toThrow instanceof ExitStatus)){let toLog=toThrow;if(toThrow&&typeof toThrow=="object"&&toThrow.stack){toLog=[toThrow,toThrow.stack]}err("exiting due to exception: "+toLog)}quit(status)});throw toThrow}}if(typeof print!="undefined"){if(typeof console=="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAP64,HEAPU64,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);Module["HEAP64"]=HEAP64=new BigInt64Array(b);Module["HEAPU64"]=HEAPU64=new BigUint64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="dotnet.native.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("dotnet.native.wasm",import.meta.url).href}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(binaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(binaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(binaryFile)})}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(function(binary){return WebAssembly.instantiate(binary,imports)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}else{return instantiateArrayBuffer(binaryFile,imports,callback)}}function createWasm(){var info={"env":wasmImports,"wasi_snapshot_preview1":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["memory"];updateMemoryViews();wasmTable=Module["asm"]["__indirect_function_table"];addOnInit(Module["asm"]["__wasm_call_ctors"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP64[ptr>>3];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort("invalid type for getValue: "+type)}}function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort("invalid type for setValue: "+type)}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);exception_addRef(info);return info.get_exception_ptr()}var exceptionLast=0;var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){getWasmTableEntry(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);var info=exceptionCaught.pop();exception_decRef(info);exceptionLast=0}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}function ___resumeException(ptr){if(!exceptionLast){exceptionLast=ptr}throw ptr}function ___cxa_find_matching_catch(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var i=0;ipath.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return()=>{crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return()=>crypto_module["randomBytes"](1)[0]}catch(e){}}return()=>abort("randomDevice")}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size);return address}function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;return zeroMemory(ptr,size)}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_chdir(path){try{path=SYSCALLS.getStr(path);FS.chdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_chmod(path,mode){try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>2]=value;return value}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_statfs64(path,size,buf){try{path=SYSCALLS.getStr(path);HEAP32[buf+4>>2]=4096;HEAP32[buf+40>>2]=4096;HEAP32[buf+8>>2]=1e6;HEAP32[buf+12>>2]=5e5;HEAP32[buf+16>>2]=5e5;HEAP32[buf+20>>2]=FS.nextInode;HEAP32[buf+24>>2]=1e6;HEAP32[buf+28>>2]=42;HEAP32[buf+44>>2]=2;HEAP32[buf+36>>2]=255;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstatfs64(fd,size,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return ___syscall_statfs64(0,size,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var MAX_INT53=9007199254740992;var MIN_INT53=-9007199254740992;function bigintToI53Checked(num){return numMAX_INT53?NaN:Number(num)}function ___syscall_ftruncate64(fd,length){try{length=bigintToI53Checked(length);if(isNaN(length))return-61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getcwd(buf,size){try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_readlinkat(dirfd,path,buf,bufsize){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function writeSockaddr(sa,family,addr,port,addrlen){switch(family){case 2:addr=inetPton4(addr);zeroMemory(sa,16);if(addrlen){HEAP32[addrlen>>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);break;default:return 5}return 0}function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_sendto(fd,message,length,flags,addr,addr_len){try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_symlink(target,linkpath){try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function ___syscall_utimensat(dirfd,path,times,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path,true);if(!times){var atime=Date.now();var mtime=atime}else{var seconds=readI53FromI64(times);var nanoseconds=HEAP32[times+8>>2];atime=seconds*1e3+nanoseconds/(1e3*1e3);times+=16;seconds=readI53FromI64(times);nanoseconds=HEAP32[times+8>>2];mtime=seconds*1e3+nanoseconds/(1e3*1e3)}FS.utime(path,atime,mtime);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var nowIsMonotonic=true;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var __MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var __MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function __yday_from_date(date){var isLeapYear=__isLeapYear(date.getFullYear());var monthDaysCumulative=isLeapYear?__MONTH_DAYS_LEAP_CUMULATIVE:__MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __mmap_js(len,prot,flags,fd,off,allocated,addr){try{var stream=SYSCALLS.getStreamFromFD(fd);var res=FS.mmap(stream,len,off,prot,flags);var ptr=res.ptr;HEAP32[allocated>>2]=res.allocated;HEAPU32[addr>>2]=ptr;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function __msync_js(addr,len,prot,flags,fd,offset){try{SYSCALLS.doMsync(addr,SYSCALLS.getStreamFromFD(fd),len,flags,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function __munmap_js(addr,len,prot,flags,fd,offset){try{var stream=SYSCALLS.getStreamFromFD(fd);if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}FS.munmap(stream)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function _dlopen(handle){abort(dlopenMissingError)}var DOTNETENTROPY={getBatchedRandomValues:function(buffer,bufferLength){const batchedQuotaMax=65536;const needTempBuf=typeof SharedArrayBuffer!=="undefined"&&Module.HEAPU8.buffer instanceof SharedArrayBuffer;const buf=needTempBuf?new ArrayBuffer(bufferLength):Module.HEAPU8.buffer;const offset=needTempBuf?0:buffer;for(let i=0;i{var t=process.hrtime();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!="undefined"){_emscripten_get_now=dateNow}else _emscripten_get_now=()=>performance.now();function _emscripten_get_now_res(){if(ENVIRONMENT_IS_NODE){return 1}else if(typeof dateNow!="undefined"){return 1e3}else return 1e3}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)}var _exit=exitJS;function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4;HEAP8[pbuf>>0]=type;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_pwrite(fd,iov,iovcnt,offset,pnum){try{offset=bigintToI53Checked(offset);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt,offset);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset,whence,newOffset){try{offset=bigintToI53Checked(offset);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_sync(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);if(stream.stream_ops&&stream.stream_ops.fsync){return stream.stream_ops.fsync(stream)}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _llvm_eh_typeid_for(type){return type}var DOTNET={setup:function setup(linkerSetup){const pthreadReplacements={};const dotnet_replacements={fetch:globalThis.fetch,require:require,updateMemoryViews:updateMemoryViews,pthreadReplacements:pthreadReplacements,scriptDirectory:scriptDirectory,noExitRuntime:noExitRuntime};const ENVIRONMENT_IS_PTHREAD=false;Module.__dotnet_runtime.passEmscriptenInternals({isPThread:ENVIRONMENT_IS_PTHREAD,quit_:quit_,ExitStatus:ExitStatus,...linkerSetup});Module.__dotnet_runtime.initializeReplacements(dotnet_replacements);Module.__dotnet_runtime.configureEmscriptenStartup(Module);updateMemoryViews=dotnet_replacements.updateMemoryViews;noExitRuntime=dotnet_replacements.noExitRuntime;fetch=dotnet_replacements.fetch;require=dotnet_replacements.require;_scriptDir=__dirname=scriptDirectory=dotnet_replacements.scriptDirectory}};function _mono_interp_flush_jitcall_queue(){return{runtime_idx:12}}function _mono_interp_invoke_wasm_jit_call_trampoline(){return{runtime_idx:11}}function _mono_interp_jit_wasm_entry_trampoline(){return{runtime_idx:9}}function _mono_interp_jit_wasm_jit_call_trampoline(){return{runtime_idx:10}}function _mono_interp_record_interp_entry(){return{runtime_idx:8}}function _mono_interp_tier_prepare_jiterpreter(){return{runtime_idx:7}}function _mono_jiterp_do_jit_call_indirect(){return{runtime_idx:13}}function _mono_wasm_add_dbg_command_received(){return{runtime_idx:3}}function _mono_wasm_asm_loaded(){return{runtime_idx:1}}function _mono_wasm_bind_cs_function(){return{runtime_idx:23}}function _mono_wasm_bind_js_function(){return{runtime_idx:20}}function _mono_wasm_change_case(){return{runtime_idx:26}}function _mono_wasm_change_case_invariant(){return{runtime_idx:25}}function _mono_wasm_compare_string(){return{runtime_idx:27}}function _mono_wasm_create_cs_owned_object_ref(){return{runtime_idx:41}}function _mono_wasm_debugger_log(){return{runtime_idx:2}}function _mono_wasm_ends_with(){return{runtime_idx:29}}function _mono_wasm_fire_debugger_agent_message_with_data(){return{runtime_idx:4}}function _mono_wasm_get_by_index_ref(){return{runtime_idx:38}}function _mono_wasm_get_calendar_info(){return{runtime_idx:31}}function _mono_wasm_get_culture_info(){return{runtime_idx:32}}function _mono_wasm_get_first_day_of_week(){return{runtime_idx:33}}function _mono_wasm_get_first_week_of_year(){return{runtime_idx:34}}function _mono_wasm_get_global_object_ref(){return{runtime_idx:40}}function _mono_wasm_get_object_property_ref(){return{runtime_idx:36}}function _mono_wasm_index_of(){return{runtime_idx:30}}function _mono_wasm_invoke_bound_function(){return{runtime_idx:21}}function _mono_wasm_invoke_import(){return{runtime_idx:22}}function _mono_wasm_invoke_js_blazor(){return{runtime_idx:44}}function _mono_wasm_invoke_js_with_args_ref(){return{runtime_idx:35}}function _mono_wasm_marshal_promise(){return{runtime_idx:24}}function _mono_wasm_profiler_enter(){return{runtime_idx:14}}function _mono_wasm_profiler_leave(){return{runtime_idx:15}}function _mono_wasm_release_cs_owned_object(){return{runtime_idx:19}}function _mono_wasm_schedule_timer(){return{runtime_idx:0}}function _mono_wasm_set_by_index_ref(){return{runtime_idx:39}}function _mono_wasm_set_entrypoint_breakpoint(){return{runtime_idx:17}}function _mono_wasm_set_object_property_ref(){return{runtime_idx:37}}function _mono_wasm_starts_with(){return{runtime_idx:28}}function _mono_wasm_trace_logger(){return{runtime_idx:16}}function _mono_wasm_typed_array_from_ref(){return{runtime_idx:43}}function _mono_wasm_typed_array_to_array_ref(){return{runtime_idx:42}}function _schedule_background_exec(){return{runtime_idx:6}}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function getCFunc(ident){var func=Module["_"+ident];return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;itype==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}function uleb128Encode(n,target){if(n<128){target.push(n)}else{target.push(n%128|128,n>>7)}}function sigToWasmTypes(sig){var typeNames={"i":"i32","j":"i32","f":"f32","d":"f64","p":"i32"};var type={parameters:[],results:sig[0]=="v"?[]:[typeNames[sig[0]]]};for(var i=1;i>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); +var Module=typeof createDotnetRuntime!="undefined"?createDotnetRuntime:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(_nativeModuleLoaded)throw new Error("Native module already loaded");_nativeModuleLoaded=true;createDotnetRuntime=Module=createDotnetRuntime(Module);Module["getWasmIndirectFunctionTable"]=function(){return wasmTable};Module["getMemory"]=function(){return wasmMemory};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){let data;if(typeof readbuffer=="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data=="object");return data};readAsync=function readAsync(f,onload,onerror){setTimeout(()=>onload(readBinary(f)),0)};if(typeof clearTimeout=="undefined"){globalThis.clearTimeout=id=>{}}if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit=="function"){quit_=(status,toThrow)=>{setTimeout(()=>{if(!(toThrow instanceof ExitStatus)){let toLog=toThrow;if(toThrow&&typeof toThrow=="object"&&toThrow.stack){toLog=[toThrow,toThrow.stack]}err("exiting due to exception: "+toLog)}quit(status)});throw toThrow}}if(typeof print!="undefined"){if(typeof console=="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAP64,HEAPU64,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);Module["HEAP64"]=HEAP64=new BigInt64Array(b);Module["HEAPU64"]=HEAPU64=new BigUint64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="dotnet.native.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("dotnet.native.wasm",import.meta.url).href}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(binaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(binaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(binaryFile)})}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(function(binary){return WebAssembly.instantiate(binary,imports)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}else{return instantiateArrayBuffer(binaryFile,imports,callback)}}function createWasm(){var info={"env":wasmImports,"wasi_snapshot_preview1":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["memory"];updateMemoryViews();wasmTable=Module["asm"]["__indirect_function_table"];addOnInit(Module["asm"]["__wasm_call_ctors"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP64[ptr>>3];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort("invalid type for getValue: "+type)}}function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort("invalid type for setValue: "+type)}}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);exception_addRef(info);return info.get_exception_ptr()}var exceptionLast=0;var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){getWasmTableEntry(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ___cxa_end_catch(){_setThrew(0);var info=exceptionCaught.pop();exception_decRef(info);exceptionLast=0}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}function ___resumeException(ptr){if(!exceptionLast){exceptionLast=ptr}throw ptr}function ___cxa_find_matching_catch(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var i=0;ipath.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return()=>{crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return()=>crypto_module["randomBytes"](1)[0]}catch(e){}}return()=>abort("randomDevice")}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size);return address}function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;return zeroMemory(ptr,size)}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_chdir(path){try{path=SYSCALLS.getStr(path);FS.chdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_chmod(path,mode){try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>2]=value;return value}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_statfs64(path,size,buf){try{path=SYSCALLS.getStr(path);HEAP32[buf+4>>2]=4096;HEAP32[buf+40>>2]=4096;HEAP32[buf+8>>2]=1e6;HEAP32[buf+12>>2]=5e5;HEAP32[buf+16>>2]=5e5;HEAP32[buf+20>>2]=FS.nextInode;HEAP32[buf+24>>2]=1e6;HEAP32[buf+28>>2]=42;HEAP32[buf+44>>2]=2;HEAP32[buf+36>>2]=255;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstatfs64(fd,size,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return ___syscall_statfs64(0,size,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var MAX_INT53=9007199254740992;var MIN_INT53=-9007199254740992;function bigintToI53Checked(num){return numMAX_INT53?NaN:Number(num)}function ___syscall_ftruncate64(fd,length){try{length=bigintToI53Checked(length);if(isNaN(length))return-61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getcwd(buf,size){try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_readlinkat(dirfd,path,buf,bufsize){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function writeSockaddr(sa,family,addr,port,addrlen){switch(family){case 2:addr=inetPton4(addr);zeroMemory(sa,16);if(addrlen){HEAP32[addrlen>>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);break;default:return 5}return 0}function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_sendto(fd,message,length,flags,addr,addr_len){try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_symlink(target,linkpath){try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function ___syscall_utimensat(dirfd,path,times,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path,true);if(!times){var atime=Date.now();var mtime=atime}else{var seconds=readI53FromI64(times);var nanoseconds=HEAP32[times+8>>2];atime=seconds*1e3+nanoseconds/(1e3*1e3);times+=16;seconds=readI53FromI64(times);nanoseconds=HEAP32[times+8>>2];mtime=seconds*1e3+nanoseconds/(1e3*1e3)}FS.utime(path,atime,mtime);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var nowIsMonotonic=true;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var __MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var __MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function __yday_from_date(date){var isLeapYear=__isLeapYear(date.getFullYear());var monthDaysCumulative=isLeapYear?__MONTH_DAYS_LEAP_CUMULATIVE:__MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __mmap_js(len,prot,flags,fd,off,allocated,addr){try{var stream=SYSCALLS.getStreamFromFD(fd);var res=FS.mmap(stream,len,off,prot,flags);var ptr=res.ptr;HEAP32[allocated>>2]=res.allocated;HEAPU32[addr>>2]=ptr;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function __msync_js(addr,len,prot,flags,fd,offset){try{SYSCALLS.doMsync(addr,SYSCALLS.getStreamFromFD(fd),len,flags,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function __munmap_js(addr,len,prot,flags,fd,offset){try{var stream=SYSCALLS.getStreamFromFD(fd);if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}FS.munmap(stream)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function _dlopen(handle){abort(dlopenMissingError)}var DOTNETENTROPY={getBatchedRandomValues:function(buffer,bufferLength){const batchedQuotaMax=65536;const needTempBuf=typeof SharedArrayBuffer!=="undefined"&&Module.HEAPU8.buffer instanceof SharedArrayBuffer;const buf=needTempBuf?new ArrayBuffer(bufferLength):Module.HEAPU8.buffer;const offset=needTempBuf?0:buffer;for(let i=0;i{var t=process.hrtime();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!="undefined"){_emscripten_get_now=dateNow}else _emscripten_get_now=()=>performance.now();function _emscripten_get_now_res(){if(ENVIRONMENT_IS_NODE){return 1}else if(typeof dateNow!="undefined"){return 1e3}else return 1e3}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)}var _exit=exitJS;function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4;HEAP8[pbuf>>0]=type;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_pwrite(fd,iov,iovcnt,offset,pnum){try{offset=bigintToI53Checked(offset);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt,offset);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset,whence,newOffset){try{offset=bigintToI53Checked(offset);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_sync(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);if(stream.stream_ops&&stream.stream_ops.fsync){return stream.stream_ops.fsync(stream)}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _llvm_eh_typeid_for(type){return type}var DOTNET={setup:function setup(linkerSetup){const pthreadReplacements={};const dotnet_replacements={fetch:globalThis.fetch,require:require,updateMemoryViews:updateMemoryViews,pthreadReplacements:pthreadReplacements,scriptDirectory:scriptDirectory,noExitRuntime:noExitRuntime};const ENVIRONMENT_IS_PTHREAD=false;Module.__dotnet_runtime.passEmscriptenInternals({isPThread:ENVIRONMENT_IS_PTHREAD,quit_:quit_,ExitStatus:ExitStatus,...linkerSetup});Module.__dotnet_runtime.initializeReplacements(dotnet_replacements);Module.__dotnet_runtime.configureEmscriptenStartup(Module);updateMemoryViews=dotnet_replacements.updateMemoryViews;noExitRuntime=dotnet_replacements.noExitRuntime;fetch=dotnet_replacements.fetch;require=dotnet_replacements.require;_scriptDir=__dirname=scriptDirectory=dotnet_replacements.scriptDirectory}};function _mono_interp_flush_jitcall_queue(){return{runtime_idx:12}}function _mono_interp_invoke_wasm_jit_call_trampoline(){return{runtime_idx:11}}function _mono_interp_jit_wasm_entry_trampoline(){return{runtime_idx:9}}function _mono_interp_jit_wasm_jit_call_trampoline(){return{runtime_idx:10}}function _mono_interp_record_interp_entry(){return{runtime_idx:8}}function _mono_interp_tier_prepare_jiterpreter(){return{runtime_idx:7}}function _mono_wasm_add_dbg_command_received(){return{runtime_idx:3}}function _mono_wasm_asm_loaded(){return{runtime_idx:1}}function _mono_wasm_bind_cs_function(){return{runtime_idx:23}}function _mono_wasm_bind_js_function(){return{runtime_idx:20}}function _mono_wasm_change_case(){return{runtime_idx:26}}function _mono_wasm_change_case_invariant(){return{runtime_idx:25}}function _mono_wasm_compare_string(){return{runtime_idx:27}}function _mono_wasm_create_cs_owned_object_ref(){return{runtime_idx:41}}function _mono_wasm_debugger_log(){return{runtime_idx:2}}function _mono_wasm_ends_with(){return{runtime_idx:29}}function _mono_wasm_fire_debugger_agent_message_with_data(){return{runtime_idx:4}}function _mono_wasm_get_by_index_ref(){return{runtime_idx:38}}function _mono_wasm_get_calendar_info(){return{runtime_idx:31}}function _mono_wasm_get_culture_info(){return{runtime_idx:32}}function _mono_wasm_get_first_day_of_week(){return{runtime_idx:33}}function _mono_wasm_get_first_week_of_year(){return{runtime_idx:34}}function _mono_wasm_get_global_object_ref(){return{runtime_idx:40}}function _mono_wasm_get_object_property_ref(){return{runtime_idx:36}}function _mono_wasm_index_of(){return{runtime_idx:30}}function _mono_wasm_invoke_bound_function(){return{runtime_idx:21}}function _mono_wasm_invoke_import(){return{runtime_idx:22}}function _mono_wasm_invoke_js_blazor(){return{runtime_idx:44}}function _mono_wasm_invoke_js_with_args_ref(){return{runtime_idx:35}}function _mono_wasm_marshal_promise(){return{runtime_idx:24}}function _mono_wasm_profiler_enter(){return{runtime_idx:14}}function _mono_wasm_profiler_leave(){return{runtime_idx:15}}function _mono_wasm_release_cs_owned_object(){return{runtime_idx:19}}function _mono_wasm_schedule_timer(){return{runtime_idx:0}}function _mono_wasm_set_by_index_ref(){return{runtime_idx:39}}function _mono_wasm_set_entrypoint_breakpoint(){return{runtime_idx:17}}function _mono_wasm_set_object_property_ref(){return{runtime_idx:37}}function _mono_wasm_starts_with(){return{runtime_idx:28}}function _mono_wasm_trace_logger(){return{runtime_idx:16}}function _mono_wasm_typed_array_from_ref(){return{runtime_idx:43}}function _mono_wasm_typed_array_to_array_ref(){return{runtime_idx:42}}function _schedule_background_exec(){return{runtime_idx:6}}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function getCFunc(ident){var func=Module["_"+ident];return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;itype==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}function uleb128Encode(n,target){if(n<128){target.push(n)}else{target.push(n%128|128,n>>7)}}function sigToWasmTypes(sig){var typeNames={"i":"i32","j":"i32","f":"f32","d":"f64","p":"i32"};var type={parameters:[],results:sig[0]=="v"?[]:[typeNames[sig[0]]]};for(var i=1;i>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); return createDotnetRuntime.ready diff --git a/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.br b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.br new file mode 100644 index 0000000..2699c1a Binary files /dev/null and b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.br differ diff --git a/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.gz b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.gz new file mode 100644 index 0000000..3a61b3f Binary files /dev/null and b/_framework/dotnet.native.8.0.3.wzxwl5s97r.js.gz differ diff --git a/_framework/dotnet.native.wasm b/_framework/dotnet.native.wasm index 308fc5e..b9be3e2 100755 Binary files a/_framework/dotnet.native.wasm and b/_framework/dotnet.native.wasm differ diff --git a/_framework/dotnet.native.wasm.br b/_framework/dotnet.native.wasm.br index 97f2c06..b0b9648 100644 Binary files a/_framework/dotnet.native.wasm.br and b/_framework/dotnet.native.wasm.br differ diff --git a/_framework/dotnet.native.wasm.gz b/_framework/dotnet.native.wasm.gz index 83fd0ac..b1c5258 100644 Binary files a/_framework/dotnet.native.wasm.gz and b/_framework/dotnet.native.wasm.gz differ diff --git a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js b/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js deleted file mode 100755 index 68b6c94..0000000 --- a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js +++ /dev/null @@ -1,4 +0,0 @@ -//! Licensed to the .NET Foundation under one or more agreements. -//! The .NET Foundation licenses this file to you under the MIT license. -var e="8.0.2";let t,n;const r="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,o="function"==typeof importScripts,a="object"==typeof window||o&&!r,s=!a&&!r&&!o;let i,c=null,l=null,u=null,p=!1,d=!0,_=!0,f=!1,m=!1,h=!1;function b(e){i=e.isPThread,p=e.linkerDisableLegacyJsInterop,d=e.linkerWasmEnableSIMD,_=e.linkerWasmEnableEH,f=e.linkerEnableAotProfiler,m=e.linkerEnableBrowserProfiler,l.quit=e.quit_,l.ExitStatus=e.ExitStatus,l.moduleGitHash=e.gitHash}function g(e){if(h)throw new Error("Runtime module already loaded");h=!0,t=e.module,n=e.internal,l=e.runtimeHelpers,u=e.loaderHelpers,c=e.api,Object.assign(l,{gitHash:"1381d5ebd2ab1f292848d5b19b80cf71ac332508",allAssetsInMemory:y(),dotnetReady:y(),afterInstantiateWasm:y(),beforePreInit:y(),afterPreInit:y(),afterPreRun:y(),beforeOnRuntimeInitialized:y(),afterOnRuntimeInitialized:y(),afterPostRun:y(),mono_wasm_exit:()=>{throw new Error("Mono shutdown")},abort:e=>{throw e}}),Object.assign(e.module.config,{}),Object.assign(e.api,{Module:e.module,...e.module}),Object.assign(e.api,{INTERNAL:e.internal})}function y(e,t){return u.createPromiseController(e,t)}function w(e,t){if(e)return;const n="Assert failed: "+("function"==typeof t?t():t),r=new Error(n);l.abort(r)}const S=0,k=0,v=0,E=0,U=0,I=-1,T=0,x=0,A=0;function j(e){return null==e}var R;!function(e){e[e.None=0]="None",e[e.Void=1]="Void",e[e.Discard=2]="Discard",e[e.Boolean=3]="Boolean",e[e.Byte=4]="Byte",e[e.Char=5]="Char",e[e.Int16=6]="Int16",e[e.Int32=7]="Int32",e[e.Int52=8]="Int52",e[e.BigInt64=9]="BigInt64",e[e.Double=10]="Double",e[e.Single=11]="Single",e[e.IntPtr=12]="IntPtr",e[e.JSObject=13]="JSObject",e[e.Object=14]="Object",e[e.String=15]="String",e[e.Exception=16]="Exception",e[e.DateTime=17]="DateTime",e[e.DateTimeOffset=18]="DateTimeOffset",e[e.Nullable=19]="Nullable",e[e.Task=20]="Task",e[e.Array=21]="Array",e[e.ArraySegment=22]="ArraySegment",e[e.Span=23]="Span",e[e.Action=24]="Action",e[e.Function=25]="Function",e[e.JSException=26]="JSException"}(R||(R={}));var L=!1;const C=[],$=32768;let N,D;const B=BigInt("9223372036854775807"),O=BigInt("-9223372036854775808");function M(){N||(N=t._malloc($),D=N),C.push(D)}function F(e,t,n){if(!Number.isSafeInteger(e))throw new Error(`Assert failed: Value is not an integer: ${e} (${typeof e})`);if(!(e>=t&&e<=n))throw new Error(`Assert failed: Overflow: value ${e} is out of ${t} ${n} range`)}function P(e,t){Ee().fill(0,e,e+t)}function z(e,n){const r=!!n;"number"==typeof n&&F(n,0,1),t.HEAP32[e>>>2]=r?1:0}function V(e,n){F(n,0,255),t.HEAPU8[e]=n}function W(e,n){F(n,0,65535),t.HEAPU16[e>>>1]=n}function H(e,t,n){F(n,0,65535),e[t>>>1]=n}function G(e,n){t.HEAPU32[e>>>2]=n}function q(e,n){F(n,0,4294967295),t.HEAPU32[e>>>2]=n}function J(e,n){F(n,-128,127),t.HEAP8[e]=n}function Y(e,n){F(n,-32768,32767),t.HEAP16[e>>>1]=n}function X(e,n){t.HEAP32[e>>>2]=n}function Z(e,n){F(n,-2147483648,2147483647),t.HEAP32[e>>>2]=n}function K(e){if(0!==e)switch(e){case 1:throw new Error("value was not an integer");case 2:throw new Error("value out of range");default:throw new Error("unknown internal error")}}function Q(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);K(St.mono_wasm_f64_to_i52(e,t))}function ee(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);if(!(t>=0))throw new Error("Assert failed: Can't convert negative Number into UInt64");K(St.mono_wasm_f64_to_u52(e,t))}function te(e,n){if("bigint"!=typeof n)throw new Error(`Assert failed: Value is not an bigint: ${n} (${typeof n})`);if(!(n>=O&&n<=B))throw new Error(`Assert failed: Overflow: value ${n} is out of ${O} ${B} range`);t.HEAP64[e>>>3]=n}function ne(e,n){if("number"!=typeof n)throw new Error(`Assert failed: Value is not a Number: ${n} (${typeof n})`);t.HEAPF32[e>>>2]=n}function re(e,n){if("number"!=typeof n)throw new Error(`Assert failed: Value is not a Number: ${n} (${typeof n})`);t.HEAPF64[e>>>3]=n}function oe(e){return!!t.HEAP32[e>>>2]}function ae(e){return t.HEAPU8[e]}function se(e){return t.HEAPU16[e>>>1]}function ie(e){return t.HEAPU32[e>>>2]}function ce(e,t){return e[t>>>2]}function le(e){return St.mono_wasm_get_i32_unaligned(e)}function ue(e){return St.mono_wasm_get_i32_unaligned(e)>>>0}function pe(e){return t.HEAP8[e]}function de(e){return t.HEAP16[e>>>1]}function _e(e){return t.HEAP32[e>>>2]}function fe(e){const t=St.mono_wasm_i52_to_f64(e,l._i52_error_scratch_buffer);return K(_e(l._i52_error_scratch_buffer)),t}function me(e){const t=St.mono_wasm_u52_to_f64(e,l._i52_error_scratch_buffer);return K(_e(l._i52_error_scratch_buffer)),t}function he(e){return t.HEAP64[e>>>3]}function be(e){return t.HEAPF32[e>>>2]}function ge(e){return t.HEAPF64[e>>>3]}function ye(e){const n=t._malloc(e.length);return new Uint8Array(Ee().buffer,n,e.length).set(e),n}function we(){return t.HEAP8}function Se(){return t.HEAP16}function ke(){return t.HEAP32}function ve(){return t.HEAP64}function Ee(){return t.HEAPU8}function Ue(){return t.HEAPU16}function Ie(){return t.HEAPU32}function Te(){return t.HEAPF32}function xe(){return t.HEAPF64}const Ae=8192;let je=null,Re=null,Le=0;const Ce=[],$e=[];function Ne(e,n){if(e<=0)throw new Error("capacity >= 1");const r=4*(e|=0),o=t._malloc(r);if(o%4!=0)throw new Error("Malloc returned an unaligned offset");return P(o,r),new WasmRootBufferImpl(o,e,!0,n)}function De(e){let t;if(!e)throw new Error("address must be a location in the native heap");return $e.length>0?(t=$e.pop(),t._set_address(e)):t=new Fe(e),t}function Be(e=void 0){let t;if(Ce.length>0)t=Ce.pop();else{const e=function(){if(j(je)||!Re){je=Ne(Ae,"js roots"),Re=new Int32Array(Ae),Le=Ae;for(let e=0;e>>2,this.__count=t,this.length=t,this.__handle=St.mono_wasm_register_root(e,o,r||"noname"),this.__ownsAllocation=n}_throw_index_out_of_range(){throw new Error("index out of range")}_check_in_range(e){(e>=this.__count||e<0)&&this._throw_index_out_of_range()}get_address(e){return this._check_in_range(e),this.__offset+4*e}get_address_32(e){return this._check_in_range(e),this.__offset32+e}get(e){this._check_in_range(e);const t=this.get_address_32(e);return Ie()[t]}set(e,t){const n=this.get_address(e);return St.mono_wasm_write_managed_pointer_unsafe(n,t),t}copy_value_from_address(e,t){const n=this.get_address(e);St.mono_wasm_copy_managed_pointer(n,t)}_unsafe_get(e){return Ie()[this.__offset32+e]}_unsafe_set(e,t){const n=this.__offset+e;St.mono_wasm_write_managed_pointer_unsafe(n,t)}clear(){this.__offset&&P(this.__offset,4*this.__count)}release(){this.__offset&&this.__ownsAllocation&&(St.mono_wasm_deregister_root(this.__offset),P(this.__offset,4*this.__count),t._free(this.__offset)),this.__handle=this.__offset=this.__count=this.__offset32=0}toString(){return`[root buffer @${this.get_address(0)}, size ${this.__count} ]`}}class Me{constructor(e,t){this.__buffer=e,this.__index=t}get_address(){return this.__buffer.get_address(this.__index)}get_address_32(){return this.__buffer.get_address_32(this.__index)}get address(){return this.__buffer.get_address(this.__index)}get(){return this.__buffer._unsafe_get(this.__index)}set(e){const t=this.__buffer.get_address(this.__index);return St.mono_wasm_write_managed_pointer_unsafe(t,e),e}copy_from(e){const t=e.address,n=this.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_to(e){const t=this.address,n=e.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_from_address(e){const t=this.address;St.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.address;St.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){const e=this.__buffer.get_address_32(this.__index);Ie()[e]=0}release(){if(!this.__buffer)throw new Error("No buffer");var e;Ce.length>128?(void 0!==(e=this.__index)&&(je.set(e,0),Re[Le]=e,Le++),this.__buffer=null,this.__index=0):(this.set(0),Ce.push(this))}toString(){return`[root @${this.address}]`}}class Fe{constructor(e){this.__external_address=U,this.__external_address_32=0,this._set_address(e)}_set_address(e){this.__external_address=e,this.__external_address_32=e>>>2}get address(){return this.__external_address}get_address(){return this.__external_address}get_address_32(){return this.__external_address_32}get(){return Ie()[this.__external_address_32]}set(e){return St.mono_wasm_write_managed_pointer_unsafe(this.__external_address,e),e}copy_from(e){const t=e.address,n=this.__external_address;St.mono_wasm_copy_managed_pointer(n,t)}copy_to(e){const t=this.__external_address,n=e.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_from_address(e){const t=this.__external_address;St.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.__external_address;St.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){Ie()[this.__external_address>>>2]=0}release(){$e.length<128&&$e.push(this)}toString(){return`[external root @${this.address}]`}}const Pe=new Map,ze="";let Ve;const We=new Map;let He,Ge,qe,Je,Ye=0,Xe=null,Ze=0;function Ke(e){if(void 0===Je){const n=new Uint8Array(2*e.length);return t.stringToUTF8Array(e,n,0,2*e.length),n}return Je.encode(e)}function Qe(e){const n=Ee();return function(e,n,r){const o=n+r;let a=n;for(;e[a]&&!(a>=o);)++a;if(a-n<=16)return t.UTF8ArrayToString(e,n,r);if(void 0===qe)return t.UTF8ArrayToString(e,n,r);const s=it(e,n,a);return qe.decode(s)}(n,e,n.length-e)}function et(e,t){if(He){const n=it(Ee(),e,t);return He.decode(n)}return tt(e,t)}function tt(e,t){let n="";const r=Ue();for(let o=e;o>>1];n+=String.fromCharCode(e)}return n}function nt(e,t,n){const r=Ue(),o=n.length;for(let a=0;a=t));a++);}function rt(e){if(e.value===E)return null;const t=Ve+0,n=Ve+4,r=Ve+8;let o;St.mono_wasm_string_get_data_ref(e.address,t,n,r);const a=Ie(),s=ce(a,n),i=ce(a,t),c=ce(a,r);if(c&&(o=We.get(e.value)),void 0===o&&(s&&i?(o=et(i,i+s),c&&We.set(e.value,o)):o=ze),void 0===o)throw new Error(`internal error when decoding string at location ${e.value}`);return o}function ot(e,t){if(t.clear(),null!==e)if("symbol"==typeof e)at(e,t);else{if("string"!=typeof e)throw new Error("Expected string argument, got "+typeof e);if(0===e.length)at(e,t);else{if(e.length<=256){const n=Pe.get(e);if(n)return void t.set(n)}st(e,t)}}}function at(e,t){let n;if("symbol"==typeof e?(n=e.description,"string"!=typeof n&&(n=Symbol.keyFor(e)),"string"!=typeof n&&(n="")):"string"==typeof e&&(n=e),"string"!=typeof n)throw new Error(`Argument to stringToInternedMonoStringRoot must be a string but was ${e}`);if(0===n.length&&Ye)return void t.set(Ye);const r=Pe.get(n);r?t.set(r):(st(n,t),function(e,t,n){if(!t.value)throw new Error("null pointer passed to _store_string_in_intern_table");Ze>=8192&&(Xe=null),Xe||(Xe=Ne(8192,"interned strings"),Ze=0);const r=Xe,o=Ze++;if(St.mono_wasm_intern_string_ref(t.address),!t.value)throw new Error("mono_wasm_intern_string_ref produced a null pointer");Pe.set(e,t.value),We.set(t.value,e),0!==e.length||Ye||(Ye=t.value),r.copy_value_from_address(o,t.address)}(n,t))}function st(e,n){const r=2*(e.length+1),o=t._malloc(r);nt(o,o+r,e),St.mono_wasm_string_from_utf16_ref(o,e.length,n.address),t._free(o)}function it(e,t,n){return e.buffer,e.subarray(t,n)}let ct="MONO_WASM: ";function lt(e,...t){l.diagnosticTracing&&console.debug(ct+e,...t)}function ut(e,...t){console.info(ct+e,...t)}function pt(e,...t){console.warn(ct+e,...t)}function dt(e,...t){t&&t.length>0&&t[0]&&"object"==typeof t[0]&&t[0].silent||console.error(ct+e,...t)}const _t=new Map,ft=[];function mt(e){try{if(0==_t.size)return e;const t=e;for(let n=0;n{const n=t.find((e=>"object"==typeof e&&void 0!==e.replaceSection));if(void 0===n)return e;const r=n.funcNum,o=n.replaceSection,a=_t.get(Number(r));return void 0===a?e:e.replace(o,`${a} (${o})`)}));if(r!==t)return r}return t}catch(t){return console.debug(`failed to symbolicate: ${t}`),e}}function ht(e){let t=e;return t&&t.stack||(t=new Error(t?""+t:"Unknown error")),mt(t.stack)}function bt(){return[..._t.values()]}ft.push(/at (?[^:()]+:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/),ft.push(/(?:WASM \[[\da-zA-Z]+\], (?function #(?[\d]+) \(''\)))/),ft.push(/(?[a-z]+:\/\/[^ )]*:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)/),ft.push(/(?<[^ >]+>[.:]wasm-function\[(?[0-9]+)\])/);const gt=[[!0,"mono_wasm_array_get_ref","void",["number","number","number"]],[!0,"mono_wasm_obj_array_new_ref","void",["number","number"]],[!0,"mono_wasm_obj_array_set_ref","void",["number","number","number"]],[!0,"mono_wasm_try_unbox_primitive_and_get_type_ref","number",["number","number","number"]],[!0,"mono_wasm_box_primitive_ref","void",["number","number","number","number"]],[!0,"mono_wasm_string_array_new_ref","void",["number","number"]],[!0,"mono_wasm_typed_array_new_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_get_delegate_invoke_ref","number",["number"]],[!0,"mono_wasm_get_type_name","string",["number"]],[!0,"mono_wasm_get_type_aqn","string",["number"]],[!0,"mono_wasm_obj_array_new","number",["number"]],[!0,"mono_wasm_obj_array_set","void",["number","number","number"]],[!0,"mono_wasm_array_length_ref","number",["number"]]],yt=[[!0,"mono_wasm_register_root","number",["number","number","string"]],[!0,"mono_wasm_deregister_root",null,["number"]],[!0,"mono_wasm_string_get_data_ref",null,["number","number","number","number"]],[!0,"mono_wasm_set_is_debugger_attached","void",["bool"]],[!0,"mono_wasm_send_dbg_command","bool",["number","number","number","number","number"]],[!0,"mono_wasm_send_dbg_command_with_parms","bool",["number","number","number","number","number","number","string"]],[!0,"mono_wasm_setenv",null,["string","string"]],[!0,"mono_wasm_parse_runtime_options",null,["number","number"]],[!0,"mono_wasm_strdup","number",["string"]],[!0,"mono_background_exec",null,[]],[!0,"mono_wasm_execute_timer",null,[]],[!0,"mono_wasm_load_icu_data","number",["number"]],[!1,"mono_wasm_add_assembly","number",["string","number","number"]],[!0,"mono_wasm_add_satellite_assembly","void",["string","string","number","number"]],[!1,"mono_wasm_load_runtime",null,["string","number"]],[!0,"mono_wasm_change_debugger_log_level","void",["number"]],[!0,"mono_wasm_get_corlib","number",[]],[!0,"mono_wasm_assembly_load","number",["string"]],[!0,"mono_wasm_assembly_find_class","number",["number","string","string"]],[!0,"mono_wasm_runtime_run_module_cctor","void",["number"]],[!0,"mono_wasm_assembly_find_method","number",["number","string","number"]],[!1,"mono_wasm_invoke_method_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_string_from_utf16_ref","void",["number","number","number"]],[!0,"mono_wasm_intern_string_ref","void",["number"]],[!0,"mono_wasm_assembly_get_entry_point","number",["number","number"]],[!0,"mono_wasm_class_get_type","number",["number"]],[!1,"mono_wasm_exit","void",["number"]],[!1,"mono_wasm_abort","void",[]],[!0,"mono_wasm_getenv","number",["string"]],[!0,"mono_wasm_set_main_args","void",["number","number"]],[!1,"mono_wasm_enable_on_demand_gc","void",["number"]],[()=>!f,"mono_wasm_profiler_init_aot","void",["string"]],[()=>!m,"mono_wasm_profiler_init_aot","void",["string"]],[!0,"mono_wasm_profiler_init_browser","void",["number"]],[!1,"mono_wasm_exec_regression","number",["number","string"]],[!1,"mono_wasm_invoke_method_bound","number",["number","number","number"]],[!0,"mono_wasm_write_managed_pointer_unsafe","void",["number","number"]],[!0,"mono_wasm_copy_managed_pointer","void",["number","number"]],[!0,"mono_wasm_i52_to_f64","number",["number","number"]],[!0,"mono_wasm_u52_to_f64","number",["number","number"]],[!0,"mono_wasm_f64_to_i52","number",["number","number"]],[!0,"mono_wasm_f64_to_u52","number",["number","number"]],[!0,"mono_wasm_method_get_name","number",["number"]],[!0,"mono_wasm_method_get_full_name","number",["number"]],[!0,"mono_wasm_gc_lock","void",[]],[!0,"mono_wasm_gc_unlock","void",[]],[!0,"mono_wasm_get_i32_unaligned","number",["number"]],[!0,"mono_wasm_get_f32_unaligned","number",["number"]],[!0,"mono_wasm_get_f64_unaligned","number",["number"]],[!0,"mono_jiterp_trace_bailout","void",["number"]],[!0,"mono_jiterp_get_trace_bailout_count","number",["number"]],[!0,"mono_jiterp_value_copy","void",["number","number","number"]],[!0,"mono_jiterp_get_member_offset","number",["number"]],[!0,"mono_jiterp_encode_leb52","number",["number","number","number"]],[!0,"mono_jiterp_encode_leb64_ref","number",["number","number","number"]],[!0,"mono_jiterp_encode_leb_signed_boundary","number",["number","number","number"]],[!0,"mono_jiterp_write_number_unaligned","void",["number","number","number"]],[!0,"mono_jiterp_type_is_byref","number",["number"]],[!0,"mono_jiterp_get_size_of_stackval","number",[]],[!0,"mono_jiterp_parse_option","number",["string"]],[!0,"mono_jiterp_get_options_as_json","number",[]],[!0,"mono_jiterp_get_options_version","number",[]],[!0,"mono_jiterp_adjust_abort_count","number",["number","number"]],[!0,"mono_jiterp_register_jit_call_thunk","void",["number","number"]],[!0,"mono_jiterp_type_get_raw_value_size","number",["number"]],[!0,"mono_jiterp_update_jit_call_dispatcher","void",["number"]],[!0,"mono_jiterp_get_signature_has_this","number",["number"]],[!0,"mono_jiterp_get_signature_return_type","number",["number"]],[!0,"mono_jiterp_get_signature_param_count","number",["number"]],[!0,"mono_jiterp_get_signature_params","number",["number"]],[!0,"mono_jiterp_type_to_ldind","number",["number"]],[!0,"mono_jiterp_type_to_stind","number",["number"]],[!0,"mono_jiterp_imethod_to_ftnptr","number",["number"]],[!0,"mono_jiterp_debug_count","number",[]],[!0,"mono_jiterp_get_trace_hit_count","number",["number"]],[!0,"mono_jiterp_get_polling_required_address","number",[]],[!0,"mono_jiterp_get_rejected_trace_count","number",[]],[!0,"mono_jiterp_boost_back_branch_target","void",["number"]],[!0,"mono_jiterp_is_imethod_var_address_taken","number",["number","number"]],[!0,"mono_jiterp_get_opcode_value_table_entry","number",["number"]],[!0,"mono_jiterp_get_simd_intrinsic","number",["number","number"]],[!0,"mono_jiterp_get_simd_opcode","number",["number","number"]],[!0,"mono_jiterp_get_arg_offset","number",["number","number","number"]],[!0,"mono_jiterp_get_opcode_info","number",["number","number"]],[!0,"mono_wasm_is_zero_page_reserved","number",[]],[!0,"mono_jiterp_is_special_interface","number",["number"]],...gt],wt={};var St=wt;const kt=wt,vt=wt,Et=["void","number",null];function Ut(e,n,r,o){let a=void 0===o&&Et.indexOf(n)>=0&&(!r||r.every((e=>Et.indexOf(e)>=0)))&&t.asm?t.asm[e]:void 0;if(a&&r&&a.length!==r.length&&(dt(`argument count mismatch for cwrap ${e}`),a=void 0),"function"!=typeof a&&(a=t.cwrap(e,n,r,o)),"function"!=typeof a)throw new Error(`cwrap ${e} not found or not a function`);return a}function It(e,t,n){const r=function(e,t,n){let r,o="number"==typeof t?t:0;r="number"==typeof n?o+n:e.length-o;const a={read:function(){if(o>=r)return null;const t=e[o];return o+=1,t}};return Object.defineProperty(a,"eof",{get:function(){return o>=r},configurable:!0,enumerable:!0}),a}(e,t,n);let o="",a=0,s=0,i=0,c=0,l=0,u=0;for(;a=r.read(),s=r.read(),i=r.read(),null!==a;)null===s&&(s=0,l+=1),null===i&&(i=0,l+=1),u=a<<16|s<<8|i<<0,c=(16777215&u)>>18,o+=Tt[c],c=(262143&u)>>12,o+=Tt[c],l<2&&(c=(4095&u)>>6,o+=Tt[c]),2===l?o+="==":1===l?o+="=":(c=(63&u)>>0,o+=Tt[c]);return o}const Tt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],xt=new Map;xt.remove=function(e){const t=this.get(e);return this.delete(e),t};let At,jt,Rt,Lt={},Ct=0,$t=-1;function mono_wasm_runtime_ready(){if(n.mono_wasm_runtime_is_ready=l.mono_wasm_runtime_is_ready=!0,Ct=0,Lt={},$t=-1,globalThis.dotnetDebugger)debugger}function mono_wasm_fire_debugger_agent_message_with_data_to_pause(e){console.assert(!0,`mono_wasm_fire_debugger_agent_message_with_data ${e}`);debugger}function Nt(e){e.length>$t&&(At&&t._free(At),$t=Math.max(e.length,$t,256),At=t._malloc($t));const n=atob(e),r=Ee();for(let e=0;ee.value)),e;if(void 0===t.dimensionsDetails||1===t.dimensionsDetails.length)return e=t.items.map((e=>e.value)),e}const n={};return Object.keys(t).forEach((e=>{const r=t[e];void 0!==r.get?Object.defineProperty(n,r.name,{get:()=>Bt(r.get.id,r.get.commandSet,r.get.command,r.get.buffer),set:function(e){return Dt(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}}):void 0!==r.set?Object.defineProperty(n,r.name,{get:()=>r.value,set:function(e){return Dt(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}}):n[r.name]=r.value})),n}(t,n);const o=null!=e.arguments?e.arguments.map((e=>JSON.stringify(e.value))):[],a=`const fn = ${e.functionDeclaration}; return fn.apply(proxy, [${o}]);`,s=new Function("proxy",a)(r);if(void 0===s)return{type:"undefined"};if(Object(s)!==s)return"object"==typeof s&&null==s?{type:typeof s,subtype:`${s}`,value:null}:{type:typeof s,description:`${s}`,value:`${s}`};if(e.returnByValue&&null==s.subtype)return{type:"object",value:s};if(Object.getPrototypeOf(s)==Array.prototype){const e=Gt(s);return{type:"object",subtype:"array",className:"Array",description:`Array(${s.length})`,objectId:e}}return void 0!==s.value||void 0!==s.subtype?s:s==r?{type:"object",className:"Object",description:"Object",objectId:t}:{type:"object",className:"Object",description:"Object",objectId:Gt(s)}}function Ht(e,t={}){return function(e,t){if(!(e in Lt))throw new Error(`Could not find any object with id ${e}`);const n=Lt[e],r=Object.getOwnPropertyDescriptors(n);t.accessorPropertiesOnly&&Object.keys(r).forEach((e=>{void 0===r[e].get&&Reflect.deleteProperty(r,e)}));const o=[];return Object.keys(r).forEach((e=>{let t;const n=r[e];t="object"==typeof n.value?Object.assign({name:e},n):void 0!==n.value?{name:e,value:Object.assign({type:typeof n.value,description:""+n.value},n)}:void 0!==n.get?{name:e,get:{className:"Function",description:`get ${e} () {}`,type:"function"}}:{name:e,value:{type:"symbol",value:"",description:""}},o.push(t)})),{__value_as_json_string__:JSON.stringify(o)}}(`dotnet:cfo_res:${e}`,t)}function Gt(e){const t="dotnet:cfo_res:"+Ct++;return Lt[t]=e,t}function qt(e){e in Lt&&delete Lt[e]}function Jt(){if(l.enablePerfMeasure)return globalThis.performance.now()}function Yt(e,t,n){if(l.enablePerfMeasure&&e){const r=a?{start:e}:{startTime:e},o=n?`${t}${n} `:t;globalThis.performance.measure(o,r)}}const Xt=[],Zt=new Map,Kt=new Map,Qt=new Map,en=Symbol.for("wasm bound_cs_function"),tn=Symbol.for("wasm bound_js_function"),nn=Symbol.for("wasm imported_js_function"),rn=16;function on(e){const n=t.stackAlloc(rn*e);return n&&n%8==0||w(!1,"Arg alignment"),hn(an(n,0),R.None),hn(an(n,1),R.None),n}function an(e,t){return e||w(!1,"Null args"),e+t*rn}function sn(e,t){return e||w(!1,"Null signatures"),e+32*t+8}function cn(e){return e||w(!1,"Null sig"),ie(e)}function ln(e){return e||w(!1,"Null sig"),ie(e+16)}function un(e){return e||w(!1,"Null sig"),ie(e+20)}function pn(e){return e||w(!1,"Null sig"),ie(e+24)}function dn(e){return e||w(!1,"Null sig"),ie(e+28)}function _n(e){return e||w(!1,"Null signatures"),_e(e+4)}function fn(e){return e||w(!1,"Null signatures"),_e(e)}function mn(e){return e||w(!1,"Null arg"),ie(e+12)}function hn(e,t){e||w(!1,"Null arg"),q(e+12,t)}function bn(e){return e||w(!1,"Null arg"),ie(e)}function gn(e,t){if(e||w(!1,"Null arg"),"boolean"!=typeof t)throw new Error(`Assert failed: Value is not a Boolean: ${t} (${typeof t})`);V(e,t?1:0)}function yn(e,t){e||w(!1,"Null arg"),q(e,t)}function wn(e,t){e||w(!1,"Null arg"),re(e,t.getTime())}function Sn(e,t){e||w(!1,"Null arg"),re(e,t)}function kn(e){return e||w(!1,"Null arg"),ie(e+4)}function vn(e,t){e||w(!1,"Null arg"),q(e+4,t)}function En(e){return e||w(!1,"Null arg"),ie(e+4)}function Un(e,t){e||w(!1,"Null arg"),q(e+4,t)}function In(e){return e||w(!1,"Null arg"),De(e)}function Tn(e){return e||w(!1,"Null arg"),_e(e+8)}function xn(e,t){e||w(!1,"Null arg"),Z(e+8,t)}class ManagedObject{dispose(){Mr(this,x)}get isDisposed(){return this[Lr]===x}toString(){return`CsObject(gc_handle: ${this[Lr]})`}}class ManagedError extends Error{constructor(e){super(e),this.superStack=Object.getOwnPropertyDescriptor(this,"stack"),Object.defineProperty(this,"stack",{get:this.getManageStack})}getSuperStack(){if(this.superStack){if(void 0!==this.superStack.value)return this.superStack.value;if(void 0!==this.superStack.get)return this.superStack.get.call(this)}return super.stack}getManageStack(){if(this.managed_stack)return this.managed_stack;if(u.is_runtime_running()&&!L){const e=this[Lr];if(e!==x){const t=l.javaScriptExports.get_managed_stack_trace(e);if(t)return this.managed_stack=t+"\n"+this.getSuperStack(),this.managed_stack}}return this.getSuperStack()}dispose(){Mr(this,x)}get isDisposed(){return this[Lr]===x}}function An(e){return e==R.Byte?1:e==R.Int32?4:e==R.Int52||e==R.Double?8:e==R.String||e==R.Object||e==R.JSObject?rn:-1}class jn{constructor(e,t,n){this._pointer=e,this._length=t,this._viewType=n}_unsafe_create_view(){const e=0==this._viewType?new Uint8Array(Ee().buffer,this._pointer,this._length):1==this._viewType?new Int32Array(ke().buffer,this._pointer,this._length):2==this._viewType?new Float64Array(xe().buffer,this._pointer,this._length):null;if(!e)throw new Error("NotImplementedException");return e}set(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw new Error(`Assert failed: Expected ${n.constructor}`);n.set(e,t)}copyTo(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw new Error(`Assert failed: Expected ${n.constructor}`);const r=n.subarray(t);e.set(r)}slice(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._unsafe_create_view().slice(e,t)}get length(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._length}get byteLength(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return 0==this._viewType?this._length:1==this._viewType?this._length<<2:2==this._viewType?this._length<<3:0}}class Span extends jn{constructor(e,t,n){super(e,t,n),this.is_disposed=!1}dispose(){this.is_disposed=!0}get isDisposed(){return this.is_disposed}}class ArraySegment extends jn{constructor(e,t,n){super(e,t,n)}dispose(){Mr(this,x)}get isDisposed(){return this[Lr]===x}}function Rn(e,t,n){if(t===R.None||t===R.Void)return;let r,o,a,s;o=Xr(un(e)),a=Xr(pn(e)),s=Xr(dn(e));const i=ln(e);r=Ln(i),t===R.Nullable&&(t=i);const c=Ln(t),l=un(e),u=n*rn;return e=>c(e+u,l,r,o,a,s)}function Ln(e){if(e===R.None||e===R.Void)return;const t=Kt.get(e);return t&&"function"==typeof t||w(!1,`ERR41: Unknown converter for type ${e}. ${Jr}`),t}function Cn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),!!ae(e)}(e)}function $n(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ae(e)}(e)}function Nn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),se(e)}(e)}function Dn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),de(e)}(e)}function Bn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),_e(e)}(e)}function On(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ge(e)}(e)}function Mn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),he(e)}(e)}function Fn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),be(e)}(e)}function Pn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ge(e)}(e)}function zn(e){return mn(e)==R.None?null:bn(e)}function Vn(){return null}function Wn(e){return mn(e)===R.None?null:function(e){e||w(!1,"Null arg");const t=ge(e);return new Date(t)}(e)}function Hn(e,t,n,r,o,a){if(mn(e)===R.None)return null;const s=En(e);let i=zr(s);return null==i&&(i=(e,t,i)=>l.javaScriptExports.call_delegate(s,e,t,i,n,r,o,a),i.dispose=()=>{i.isDisposed||(i.isDisposed=!0,Mr(i,s))},i.isDisposed=!1,Or(i,s)),i}function Gn(e,t,n){const r=mn(e);if(r===R.None)return null;if(r!==R.Task){n||(n=Kt.get(r)),n||w(!1,`Unknown sub_converter for type ${R[r]}. ${Jr}`);const t=n(e);return new Promise((e=>e(t)))}const o=kn(e);if(o==T)return new Promise((e=>e(void 0)));const a=Nr(o);a||w(!1,`ERR28: promise not found for js_handle: ${o} `),u.assertIsControllablePromise(a);const s=u.getPromiseController(a),i=s.resolve;return s.resolve=e=>{const t=mn(e);if(t===R.None)return void i(null);n||(n=Kt.get(t)),n||w(!1,`Unknown sub_converter for type ${R[t]}. ${Jr}`);const r=n(e);i(r)},a}function qn(e){if(mn(e)==R.None)return null;const t=In(e);try{return rt(t)}finally{t.release()}}function Jn(e){const t=mn(e);if(t==R.None)return null;if(t==R.JSException)return Nr(kn(e));const n=En(e);let r=zr(n);if(null==r){const t=qn(e);r=new ManagedError(t),Or(r,n)}return r}function Yn(e){return mn(e)==R.None?null:Nr(kn(e))}function Xn(e){const t=mn(e);if(t==R.None)return null;if(t==R.JSObject)return Nr(kn(e));if(t==R.Array){const t=function(e){return e||w(!1,"Null arg"),ie(e+4)}(e);return Kn(e,t)}if(t==R.Object){const t=En(e);if(t===x)return null;let n=zr(t);return n||(n=new ManagedObject,Or(n,t)),n}const n=Kt.get(t);return n||w(!1,`Unknown converter for type ${R[t]}. ${Jr}`),n(e)}function Zn(e,t){return t||w(!1,"Expected valid element_type parameter"),Kn(e,t)}function Kn(e,n){if(mn(e)==R.None)return null;-1==An(n)&&w(!1,`Element type ${R[n]} not supported`);const r=bn(e),o=Tn(e);let a=null;if(n==R.String){a=new Array(o);for(let e=0;e>2,(r>>2)+o).slice();else{if(n!=R.Double)throw new Error(`NotImplementedException ${R[n]}. ${Jr}`);a=xe().subarray(r>>3,(r>>3)+o).slice()}return t._free(r),a}function Qn(e,t){t||w(!1,"Expected valid element_type parameter");const n=bn(e),r=Tn(e);let o=null;if(t==R.Byte)o=new Span(n,r,0);else if(t==R.Int32)o=new Span(n,r,1);else{if(t!=R.Double)throw new Error(`NotImplementedException ${R[t]}. ${Jr}`);o=new Span(n,r,2)}return o}function er(e,t){t||w(!1,"Expected valid element_type parameter");const n=bn(e),r=Tn(e);let o=null;if(t==R.Byte)o=new ArraySegment(n,r,0);else if(t==R.Int32)o=new ArraySegment(n,r,1);else{if(t!=R.Double)throw new Error(`NotImplementedException ${R[t]}. ${Jr}`);o=new ArraySegment(n,r,2)}return Or(o,En(e)),o}let tr;const nr=[null];function rr(e,t){ur.set(e,t),lt(`added module imports '${e}'`)}function or(e,t,n){if(!e)throw new Error("Assert failed: Null reference");e[t]=n}function ar(e,t){if(!e)throw new Error("Assert failed: Null reference");return e[t]}function sr(e,t){if(!e)throw new Error("Assert failed: Null reference");return t in e}function ir(e,t){if(!e)throw new Error("Assert failed: Null reference");return typeof e[t]}function cr(){return globalThis}const lr=new Map,ur=new Map;function pr(e,t){e&&"string"==typeof e||w(!1,"module_name must be string"),t&&"string"==typeof t||w(!1,"module_url must be string");let n=lr.get(e);const r=!n;return r&&(lt(`importing ES6 module '${e}' from '${t}'`),n=import(t),lr.set(e,n)),Gr((async()=>{const o=await n;return r&&(ur.set(e,o),lt(`imported ES6 module '${e}' from '${t}'`)),o}))}function dr(e,t,n){const r=function(e,t){let n="unknown exception";if(t){n=t.toString();const e=t.stack;e&&(e.startsWith(n)?n=e:n+="\n"+e),n=mt(n)}return e&&X(e,1),n}(e,t);ot(r,n)}function _r(e,t){e&&X(e,0),t&&t.clear()}function fr(){u.assert_runtime_running(),l.mono_wasm_bindings_is_ready||w(!1,"The runtime must be initialized.")}const mr="function"==typeof globalThis.WeakRef;function hr(e){return mr?new WeakRef(e):{deref:()=>e,dispose:()=>{e=null}}}const br=new Map,gr=new Map;let yr=0;function wr(e){if(br.has(e))return br.get(e);const t=St.mono_wasm_assembly_load(e);return br.set(e,t),t}function Sr(e,t){yr||(yr=St.mono_wasm_get_corlib());let n=function(e,t,n){let r=gr.get(e);r||gr.set(e,r=new Map);let o=r.get(t);return o||(o=new Map,r.set(t,o)),o.get(n)}(yr,e,t);if(void 0!==n)return n;if(n=St.mono_wasm_assembly_find_class(yr,e,t),!n)throw new Error(`Failed to find corlib class ${e}.${t}`);return function(e,t,n,r){const o=gr.get(e);if(!o)throw new Error("internal error");const a=o.get(t);if(!a)throw new Error("internal error");a.set(n,r)}(yr,e,t,n),n}function kr(e,t){fr();const n=Be();try{if(St.mono_wasm_invoke_method_bound(e,t,n.address))throw new Error("ERR24: Unexpected error: "+rt(n));if(function(e){return e||w(!1,"Null args"),mn(e)!==R.None}(t))throw Jn(an(t,0))}finally{n.release()}}const vr=new Map;async function Er(e){if(fr(),!vr.get(e)){const t=Jt(),n=wr(e);if(!n)throw new Error("Could not find assembly: "+e);const r=St.mono_wasm_assembly_find_class(n,l.runtime_interop_namespace,"__GeneratedInitializer");if(r){const e=St.mono_wasm_assembly_find_method(r,"__Register_",-1);if(e){const t=Be(),n=Be();try{if(St.mono_wasm_invoke_method_ref(e,U,A,t.address,n.address),t.value!==S){const e=rt(n);throw new Error(e)}}finally{t.release(),n.release()}}}else St.mono_wasm_runtime_run_module_cctor(n);Yt(t,"mono.getAssemblyExports:",e)}return vr.get(e)||{}}function Ur(e){const t=e.substring(e.indexOf("[")+1,e.indexOf("]")).trim(),n=(e=e.substring(e.indexOf("]")+1).trim()).substring(e.indexOf(":")+1);let r="",o=e=e.substring(0,e.indexOf(":")).trim();if(-1!=e.indexOf(".")){const t=e.lastIndexOf(".");r=e.substring(0,t),o=e.substring(t+1)}if(!t.trim())throw new Error("No assembly name specified "+e);if(!o.trim())throw new Error("No class name specified "+e);if(!n.trim())throw new Error("No method name specified "+e);return{assembly:t,namespace:r,classname:o,methodname:n}}const Ir="function"==typeof globalThis.FinalizationRegistry;let Tr;const xr=[null],Ar=[];let jr=1;const Rr=new Map;Ir&&(Tr=new globalThis.FinalizationRegistry(Pr));const Lr=Symbol.for("wasm js_owned_gc_handle"),Cr=Symbol.for("wasm cs_owned_js_handle"),$r=Symbol.for("wasm do_not_force_dispose");function Nr(e){return e!==T&&e!==I?xr[e]:null}function Dr(e){if(e[Cr])return e[Cr];const t=Ar.length?Ar.pop():jr++;return xr[t]=e,Object.isExtensible(e)&&(e[Cr]=t),t}function Br(e){const t=xr[e];null!=t&&(void 0!==t[Cr]&&(t[Cr]=void 0),xr[e]=void 0,Ar.push(e))}function Or(e,t){e[Lr]=t,Ir&&Tr.register(e,t,e);const n=hr(e);Rr.set(t,n)}function Mr(e,t){e&&(t=e[Lr],e[Lr]=x,Ir&&Tr.unregister(e)),t!==x&&Rr.delete(t)&&l.javaScriptExports.release_js_owned_object_by_gc_handle(t)}function Fr(e){const t=e[Lr];if(t==x)throw new Error("Assert failed: ObjectDisposedException");return t}function Pr(e){u.is_exited()||Mr(null,e)}function zr(e){if(!e)return null;const t=Rr.get(e);return t?t.deref():null}function Vr(e,t){let n=!1,r=!1,o=0,a=0,s=0,i=0;const c=[...Rr.keys()];for(const e of c){const r=Rr.get(e),o=r.deref();if(Ir&&o&&Tr.unregister(o),o){const a="boolean"==typeof o[$r]&&o[$r];if(t&&pt(`Proxy of C# ${typeof o} with GCHandle ${e} was still alive. ${a?"keeping":"disposing"}.`),a)n=!0;else{const t=u.getPromiseController(o);t&&t.reject(new Error("WebWorker which is origin of the Task is being terminated.")),"function"==typeof o.dispose&&o.dispose(),o[Lr]===e&&(o[Lr]=x),!mr&&r&&r.dispose(),s++}}}n||(Rr.clear(),Ir&&(Tr=new globalThis.FinalizationRegistry(Pr)));for(let e=0;en.resolve(e))).catch((e=>n.reject(e))),t}function qr(e){const t=zr(e);if(!t)return;const n=t.promise;n||w(!1,`Expected Promise for GCHandle ${e}`),u.assertIsControllablePromise(n),u.getPromiseController(n).reject(new Error("OperationCanceledException"))}const Jr="For more information see https://aka.ms/dotnet-wasm-jsinterop";function Yr(e,t,n){if(t===R.None||t===R.Void)return;let r,o,a,s;o=Ln(un(e)),a=Ln(pn(e)),s=Ln(dn(e));const i=ln(e);r=Xr(i),t===R.Nullable&&(t=i);const c=Xr(t),l=un(e),u=n*rn;return(e,t)=>{c(e+u,t,l,r,o,a,s)}}function Xr(e){if(e===R.None||e===R.Void)return;const t=Qt.get(e);return t&&"function"==typeof t||w(!1,`ERR30: Unknown converter for type ${e}`),t}function Zr(e,t){null==t?hn(e,R.None):(hn(e,R.Boolean),gn(e,t))}function Kr(e,t){null==t?hn(e,R.None):(hn(e,R.Byte),function(e,t){e||w(!1,"Null arg"),V(e,t)}(e,t))}function Qr(e,t){null==t?hn(e,R.None):(hn(e,R.Char),function(e,t){e||w(!1,"Null arg"),W(e,t)}(e,t))}function eo(e,t){null==t?hn(e,R.None):(hn(e,R.Int16),function(e,t){e||w(!1,"Null arg"),Y(e,t)}(e,t))}function to(e,t){null==t?hn(e,R.None):(hn(e,R.Int32),function(e,t){e||w(!1,"Null arg"),Z(e,t)}(e,t))}function no(e,t){null==t?hn(e,R.None):(hn(e,R.Int52),function(e,t){if(e||w(!1,"Null arg"),!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not an integer: ${t} (${typeof t})`);re(e,t)}(e,t))}function ro(e,t){null==t?hn(e,R.None):(hn(e,R.BigInt64),function(e,t){e||w(!1,"Null arg"),te(e,t)}(e,t))}function oo(e,t){null==t?hn(e,R.None):(hn(e,R.Double),Sn(e,t))}function ao(e,t){null==t?hn(e,R.None):(hn(e,R.Single),function(e,t){e||w(!1,"Null arg"),ne(e,t)}(e,t))}function so(e,t){null==t?hn(e,R.None):(hn(e,R.IntPtr),yn(e,t))}function io(e,t){if(null==t)hn(e,R.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");hn(e,R.DateTime),wn(e,t)}}function co(e,t){if(null==t)hn(e,R.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");hn(e,R.DateTimeOffset),wn(e,t)}}function lo(e,t){if(null==t)hn(e,R.None);else{if(hn(e,R.String),"string"!=typeof t)throw new Error("Assert failed: Value is not a String");uo(e,t)}}function uo(e,t){const n=In(e);try{ot(t,n)}finally{n.release()}}function po(e){hn(e,R.None)}function _o(e,t,n,r,o,a,s){if(null==t)return void hn(e,R.None);if(!(t&&t instanceof Function))throw new Error("Assert failed: Value is not a Function");const i=e=>{const n=an(e,0),c=an(e,1),l=an(e,2),u=an(e,3),p=an(e,4);try{let e,n,d;L&&i.isDisposed,o&&(e=o(l)),a&&(n=a(u)),s&&(d=s(p));const _=t(e,n,d);r&&r(c,_)}catch(e){ho(n,e)}};i[tn]=!0,i.isDisposed=!1,i.dispose=()=>{i.isDisposed=!0},vn(e,Dr(i)),hn(e,R.Function)}class fo{constructor(e){this.promise=e}dispose(){Mr(this,x)}get isDisposed(){return this[Lr]===x}}function mo(e,t,n,r){if(null==t)return void hn(e,R.None);if(!Hr(t))throw new Error("Assert failed: Value is not a Promise");const o=l.javaScriptExports.create_task_callback();Un(e,o),hn(e,R.Task);const a=new fo(t);Or(a,o),t.then((e=>{try{u.assert_runtime_running(),a.isDisposed&&w(!1,"This promise can't be propagated to managed code, because the Task was already freed."),l.javaScriptExports.complete_task(o,null,e,r||go),Mr(a,o)}catch(e){pt("Exception marshalling result of JS promise to CS: ",e)}})).catch((e=>{try{u.assert_runtime_running(),a.isDisposed&&w(!1,"This promise can't be propagated to managed code, because the Task was already freed."),l.javaScriptExports.complete_task(o,e,null,void 0),Mr(a,o)}catch(e){u.is_exited()||pt("Exception marshalling error of JS promise to CS: ",e)}}))}function ho(e,t){if(null==t)hn(e,R.None);else if(t instanceof ManagedError)hn(e,R.Exception),Un(e,Fr(t));else{if("object"!=typeof t&&"string"!=typeof t)throw new Error("Assert failed: Value is not an Error "+typeof t);hn(e,R.JSException),uo(e,t.toString());const n=t[Cr];vn(e,n||Dr(t))}}function bo(e,t){if(null==t)hn(e,R.None);else{if(void 0!==t[Lr])throw new Error(`Assert failed: JSObject proxy of ManagedObject proxy is not supported. ${Jr}`);if("function"!=typeof t&&"object"!=typeof t)throw new Error(`Assert failed: JSObject proxy of ${typeof t} is not supported`);hn(e,R.JSObject),vn(e,Dr(t))}}function go(e,t){if(null==t)hn(e,R.None);else{const n=t[Lr],r=typeof t;if(void 0===n)if("string"===r||"symbol"===r)hn(e,R.String),uo(e,t);else if("number"===r)hn(e,R.Double),Sn(e,t);else{if("bigint"===r)throw new Error("NotImplementedException: bigint");if("boolean"===r)hn(e,R.Boolean),gn(e,t);else if(t instanceof Date)hn(e,R.DateTime),wn(e,t);else if(t instanceof Error)ho(e,t);else if(t instanceof Uint8Array)wo(e,t,R.Byte);else if(t instanceof Float64Array)wo(e,t,R.Double);else if(t instanceof Int32Array)wo(e,t,R.Int32);else if(Array.isArray(t))wo(e,t,R.Object);else{if(t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array)throw new Error("NotImplementedException: TypedArray");if(Hr(t))mo(e,t);else{if(t instanceof Span)throw new Error("NotImplementedException: Span");if("object"!=r)throw new Error(`JSObject proxy is not supported for ${r} ${t}`);{const n=Dr(t);hn(e,R.JSObject),vn(e,n)}}}}else{if(Fr(t),t instanceof ArraySegment)throw new Error("NotImplementedException: ArraySegment. "+Jr);if(t instanceof ManagedError)hn(e,R.Exception),Un(e,n);else{if(!(t instanceof ManagedObject))throw new Error("NotImplementedException "+r+". "+Jr);hn(e,R.Object),Un(e,n)}}}}function yo(e,t,n){n||w(!1,"Expected valid element_type parameter"),wo(e,t,n)}function wo(e,n,r){if(null==n)hn(e,R.None);else{const o=An(r);-1==o&&w(!1,`Element type ${R[r]} not supported`);const a=n.length,s=o*a,i=t._malloc(s);if(r==R.String){if(!Array.isArray(n))throw new Error("Assert failed: Value is not an Array");P(i,s),St.mono_wasm_register_root(i,s,"marshal_array_to_cs");for(let e=0;e>2,(i>>2)+a).set(n)}else{if(r!=R.Double)throw new Error("not implemented");if(!(Array.isArray(n)||n instanceof Float64Array))throw new Error("Assert failed: Value is not an Array or Float64Array");xe().subarray(i>>3,(i>>3)+a).set(n)}yn(e,i),hn(e,R.Array),function(e,t){e||w(!1,"Null arg"),q(e+4,t)}(e,r),xn(e,n.length)}}function So(e,t,n){if(n||w(!1,"Expected valid element_type parameter"),t.isDisposed)throw new Error("Assert failed: ObjectDisposedException");vo(n,t._viewType),hn(e,R.Span),yn(e,t._pointer),xn(e,t.length)}function ko(e,t,n){n||w(!1,"Expected valid element_type parameter");const r=Fr(t);r||w(!1,"Only roundtrip of ArraySegment instance created by C#"),vo(n,t._viewType),hn(e,R.ArraySegment),yn(e,t._pointer),xn(e,t.length),Un(e,r)}function vo(e,t){if(e==R.Byte){if(0!=t)throw new Error("Assert failed: Expected MemoryViewType.Byte")}else if(e==R.Int32){if(1!=t)throw new Error("Assert failed: Expected MemoryViewType.Int32")}else{if(e!=R.Double)throw new Error(`NotImplementedException ${R[e]} `);if(2!=t)throw new Error("Assert failed: Expected MemoryViewType.Double")}}const Eo={now:function(){return Date.now()}};function Uo(e){void 0===globalThis.performance&&(globalThis.performance=Eo),e.require=n.require,e.scriptDirectory=u.scriptDirectory,t.locateFile===t.__locateFile&&(t.locateFile=u.locateFile),e.fetch=u.fetch_like,e.noExitRuntime=a&&!i;const r=e.updateMemoryViews;l.updateMemoryViews=e.updateMemoryViews=()=>{r()}}async function Io(){var e;if(r){if(globalThis.performance===Eo){const{performance:e}=n.require("perf_hooks");globalThis.performance=e}if(n.process=await import("process"),globalThis.crypto||(globalThis.crypto={}),!globalThis.crypto.getRandomValues){let e;try{e=n.require("node:crypto")}catch(e){}e?e.webcrypto?globalThis.crypto=e.webcrypto:e.randomBytes&&(globalThis.crypto.getRandomValues=t=>{t&&t.set(e.randomBytes(t.length))}):globalThis.crypto.getRandomValues=()=>{throw new Error("Using node without crypto support. To enable current operation, either provide polyfill for 'globalThis.crypto.getRandomValues' or enable 'node:crypto' module.")}}}l.subtle=null===(e=globalThis.crypto)||void 0===e?void 0:e.subtle}function To(e){const t=St.mono_wasm_assembly_find_method(l.runtime_interop_exports_class,e,-1);if(!t)throw"Can't find method "+l.runtime_interop_namespace+"."+l.runtime_interop_exports_classname+"."+e;return t}function xo(){if("function"!=typeof globalThis.fetch||"function"!=typeof globalThis.AbortController)throw new Error(r?"Please install `node-fetch` and `node-abort-controller` npm packages to enable HTTP client support. See also https://aka.ms/dotnet-wasm-features":"This browser doesn't support fetch API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features")}function Ao(){return"undefined"!=typeof Response&&"body"in Response.prototype&&"function"==typeof ReadableStream}function jo(){return xo(),new AbortController}function Ro(e){e.abort()}function Lo(e){e.__abort_controller.abort(),e.__reader&&e.__reader.cancel().catch((e=>{e&&"AbortError"!==e.name&&t.err("Error in http_wasm_abort_response: "+e)}))}function Co(e,t,n,r,o,a,s,i){return $o(e,t,n,r,o,a,new Span(s,i,0).slice())}function $o(e,t,n,r,o,a,s){xo(),e&&"string"==typeof e||w(!1,"expected url string"),t&&n&&Array.isArray(t)&&Array.isArray(n)&&t.length===n.length||w(!1,"expected headerNames and headerValues arrays"),r&&o&&Array.isArray(r)&&Array.isArray(o)&&r.length===o.length||w(!1,"expected headerNames and headerValues arrays");const i=new Headers;for(let e=0;e{const t=await u.fetch_like(e,c);return t.__abort_controller=a,t}))}function No(e){if(!e.__headerNames&&(e.__headerNames=[],e.__headerValues=[],e.headers&&e.headers.entries)){const t=e.headers.entries();for(const n of t)e.__headerNames.push(n[0]),e.__headerValues.push(n[1])}}function Do(e){return No(e),e.__headerNames}function Bo(e){return No(e),e.__headerValues}function Oo(e){return Gr((async()=>{const t=await e.arrayBuffer();return e.__buffer=t,e.__source_offset=0,t.byteLength}))}function Mo(e,t){if(e.__buffer||w(!1,"expected resoved arrayBuffer"),e.__source_offset==e.__buffer.byteLength)return 0;const n=new Uint8Array(e.__buffer,e.__source_offset);t.set(n,0);const r=Math.min(t.byteLength,n.byteLength);return e.__source_offset+=r,r}function Fo(e,t,n){const r=new Span(t,n,0);return Gr((async()=>{if(e.__reader||(e.__reader=e.body.getReader()),e.__chunk||(e.__chunk=await e.__reader.read(),e.__source_offset=0),e.__chunk.done)return 0;const t=e.__chunk.value.byteLength-e.__source_offset;t>0||w(!1,"expected remaining_source to be greater than 0");const n=Math.min(t,r.byteLength),o=e.__chunk.value.subarray(e.__source_offset,e.__source_offset+n);return r.set(o,0),e.__source_offset+=n,t==n&&(e.__chunk=void 0),n}))}let Po,zo=0,Vo=0;function Wo(){if(!u.isChromium)return;const e=(new Date).valueOf(),t=e+36e4;for(let n=Math.max(e+1e3,zo);n0;)--Vo,St.mono_background_exec()}function mono_wasm_schedule_timer_tick(){t.maybeExit(),u.is_runtime_running()&&(Po=void 0,St.mono_wasm_execute_timer())}class qo{constructor(){this.queue=[],this.offset=0}getLength(){return this.queue.length-this.offset}isEmpty(){return 0==this.queue.length}enqueue(e){this.queue.push(e)}dequeue(){if(0===this.queue.length)return;const e=this.queue[this.offset];return this.queue[this.offset]=null,2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),e}peek(){return this.queue.length>0?this.queue[this.offset]:void 0}drain(e){for(;this.getLength();)e(this.dequeue())}}const Jo=Symbol.for("wasm ws_pending_send_buffer"),Yo=Symbol.for("wasm ws_pending_send_buffer_offset"),Xo=Symbol.for("wasm ws_pending_send_buffer_type"),Zo=Symbol.for("wasm ws_pending_receive_event_queue"),Ko=Symbol.for("wasm ws_pending_receive_promise_queue"),Qo=Symbol.for("wasm ws_pending_open_promise"),ea=Symbol.for("wasm ws_pending_close_promises"),ta=Symbol.for("wasm ws_pending_send_promises"),na=Symbol.for("wasm ws_is_aborted"),ra=Symbol.for("wasm ws_on_closed"),oa=Symbol.for("wasm ws_receive_status_ptr");let aa=!1;const sa=65536,ia=new Uint8Array;function ca(e,t,n,o){!function(){if(s)throw new Error("WebSockets are not supported in shell JS engine.");if("function"!=typeof globalThis.WebSocket)throw new Error(r?"Please install `ws` npm package to enable networking support. See also https://aka.ms/dotnet-wasm-features":"This browser doesn't support WebSocket API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features")}(),e&&"string"==typeof e||w(!1,"ERR12: Invalid uri "+typeof e),"function"!=typeof o&&w(!1,"ERR12: Invalid onClosed "+typeof o);const a=new globalThis.WebSocket(e,t||void 0),{promise_control:i}=y();a[Zo]=new qo,a[Ko]=new qo,a[Qo]=i,a[ta]=[],a[ea]=[],a[oa]=n,a[ra]=o,a.binaryType="arraybuffer";const c=()=>{a[na]||(i.resolve(a),Wo())},l=e=>{a[na]||(function(e,t){const n=e[Zo],r=e[Ko];if("string"==typeof t.data)n.enqueue({type:0,data:Ke(t.data),offset:0});else{if("ArrayBuffer"!==t.data.constructor.name)throw new Error("ERR19: WebSocket receive expected ArrayBuffer");n.enqueue({type:1,data:new Uint8Array(t.data),offset:0})}if(r.getLength()&&n.getLength()>1)throw new Error("ERR21: Invalid WS state");for(;r.getLength()&&n.getLength();){const t=r.dequeue();ma(e,n,t.buffer_ptr,t.buffer_length),t.resolve()}Wo()}(a,e),Wo())},u=e=>{if(a.removeEventListener("message",l),!a[na]){o(e.code,e.reason),i.reject(new Error(e.reason));for(const e of a[ea])e.resolve();a[Ko].drain((e=>{Z(n,0),Z(n+4,2),Z(n+8,1),e.resolve()})),a[ra].dispose()}},p=e=>{if(a[na])return;a.removeEventListener("message",l);const t=new Error(e.message||"WebSocket error");pt("WebSocket error",t),fa(a,t)};return a.addEventListener("message",l),a.addEventListener("open",c,{once:!0}),a.addEventListener("close",u,{once:!0}),a.addEventListener("error",p,{once:!0}),a.dispose=()=>{a.removeEventListener("message",l),a.removeEventListener("open",c),a.removeEventListener("close",u),a.removeEventListener("error",p),_a(a)},a}function la(e){return e||w(!1,"ERR17: expected ws instance"),e[Qo].promise}function ua(e,n,r,o,a){e||w(!1,"ERR17: expected ws instance");const s=function(e,n,r,o){let a=e[Jo],s=0;const i=n.byteLength;if(a){if(s=e[Yo],r=e[Xo],0!==i){if(s+i>a.length){const t=new Uint8Array(1.5*(s+i+50));t.set(a,0),t.subarray(s).set(n),e[Jo]=a=t}else a.subarray(s).set(n);s+=i,e[Yo]=s}}else o?0!==i&&(a=n,s=i):(0!==i&&(a=n.slice(),s=i,e[Yo]=s,e[Jo]=a),e[Xo]=r);return o?0==s||null==a?ia:0===r?function(e){return void 0===Ge?t.UTF8ArrayToString(e,0,e.byteLength):Ge.decode(e)}(it(a,0,s)):a.subarray(0,s):null}(e,new Uint8Array(Ee().buffer,n,r),o,a);return a&&s?function(e,t){if(e.send(t),e[Jo]=null,e.bufferedAmount{if(0===e.bufferedAmount)r.resolve();else{const t=e.readyState;if(t!=WebSocket.OPEN&&t!=WebSocket.CLOSING)r.reject(new Error(`InvalidState: ${t} The WebSocket is not connected.`));else if(!r.isDone)return globalThis.setTimeout(s,a),void(a=Math.min(1.5*a,1e3))}const t=o.indexOf(r);t>-1&&o.splice(t,1)};return globalThis.setTimeout(s,0),n}(e,s):null}function pa(e,t,n){e||w(!1,"ERR18: expected ws instance");const r=e[Zo],o=e[Ko],a=e.readyState;if(a!=WebSocket.OPEN&&a!=WebSocket.CLOSING)throw new Error(`InvalidState: ${a} The WebSocket is not connected.`);if(r.getLength())return 0!=o.getLength()&&w(!1,"ERR20: Invalid WS state"),ma(e,r,t,n),null;const{promise:s,promise_control:i}=y(),c=i;return c.buffer_ptr=t,c.buffer_length=n,o.enqueue(c),s}function da(e,t,n,r){if(e||w(!1,"ERR19: expected ws instance"),e.readyState==WebSocket.CLOSED)return null;if(r){const{promise:r,promise_control:o}=y();return e[ea].push(o),"string"==typeof n?e.close(t,n):e.close(t),r}return aa||(aa=!0,pt("WARNING: Web browsers do not support closing the output side of a WebSocket. CloseOutputAsync has closed the socket and discarded any incoming messages.")),"string"==typeof n?e.close(t,n):e.close(t),null}function _a(e){var t;e||w(!1,"ERR18: expected ws instance"),e[na]=!0,fa(e,new Error("OperationCanceledException")),null===(t=e[ra])||void 0===t||t.dispose();try{e.close(1e3,"Connection was aborted.")}catch(e){pt("WebSocket error while aborting",e)}}function fa(e,t){const n=e[Qo];n&&n.reject(t);for(const n of e[ea])n.reject(t);for(const n of e[ta])n.reject(t);e[Ko].drain((e=>{e.reject(t)}))}function ma(e,t,n,r){const o=t.peek(),a=Math.min(r,o.data.length-o.offset);if(a>0){const e=o.data.subarray(o.offset,o.offset+a);new Uint8Array(Ee().buffer,n,r).set(e,0),o.offset+=a}const s=o.data.length===o.offset?1:0;s&&t.dequeue();const i=e[oa];Z(i,a),Z(i+4,o.type),Z(i+8,s)}function ha(e){return 1===St.mono_wasm_load_icu_data(e)}function ba(e,n,r){lt(`Loaded:${e.name} as ${e.behavior} size ${r.length} from ${n}`);const o=Jt(),a="string"==typeof e.virtualPath?e.virtualPath:e.name;let s=null;switch(e.behavior){case"dotnetwasm":case"js-module-threads":case"symbols":break;case"resource":case"assembly":case"pdb":u._loaded_files.push({url:n,file:a});case"heap":case"icu":s=ye(r);break;case"vfs":{const e=a.lastIndexOf("/");let n=e>0?a.substr(0,e):null,o=e>0?a.substr(e+1):a;o.startsWith("/")&&(o=o.substr(1)),n?(lt(`Creating directory '${n}'`),t.FS_createPath("/",n,!0,!0)):n="/",lt(`Creating file '${o}' in directory '${n}'`),t.FS_createDataFile(n,o,r,!0,!0,!0);break}default:throw new Error(`Unrecognized asset behavior:${e.behavior}, for asset ${e.name}`)}if("assembly"===e.behavior){if(!St.mono_wasm_add_assembly(a,s,r.length)){const e=u._loaded_files.findIndex((e=>e.file==a));u._loaded_files.splice(e,1)}}else"pdb"===e.behavior?St.mono_wasm_add_assembly(a,s,r.length):"icu"===e.behavior?ha(s)||t.err(`Error loading ICU asset ${e.name}`):"resource"===e.behavior&&St.mono_wasm_add_satellite_assembly(a,e.culture||"",s,r.length);Yt(o,"mono.instantiateAsset:",e.name),++u.actual_instantiated_assets_count}async function ga(e){try{const t=await e.pendingDownloadInternal.response;(await t.text()).split(/[\r\n]/).forEach((e=>{const t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(":"),_t.set(Number(t[0]),t[1]))})),lt(`Loaded ${_t.size} symbols`)}catch(t){ut(`Error loading symbol file ${e.name}: ${JSON.stringify(t)}`)}}function ya(){return u.loadedFiles}const wa={};function Sa(e){let t=wa[e];if("string"!=typeof t){const n=St.mono_jiterp_get_opcode_info(e,0);wa[e]=t=Qe(n)}return t}const ka=2,va=64,Ea=64,Ua=["Unknown","InterpreterTiering","NullCheck","VtableNotInitialized","Branch","BackwardBranch","ConditionalBranch","ConditionalBackwardBranch","ComplexBranch","ArrayLoadFailed","ArrayStoreFailed","StringOperationFailed","DivideByZero","Overflow","Return","Call","Throw","AllocFailed","SpanOperationFailed","CastFailed","SafepointBranchTaken","UnboxFailed","CallDelegate","Debugging","Icall","UnexpectedRetIp","LeaveCheck"],Ia={};class Ta{constructor(e){this.locals=new Map,this.permanentFunctionTypeCount=0,this.permanentFunctionTypes={},this.permanentFunctionTypesByShape={},this.permanentFunctionTypesByIndex={},this.functionTypesByIndex={},this.permanentImportedFunctionCount=0,this.permanentImportedFunctions={},this.nextImportIndex=0,this.functions=[],this.estimatedExportBytes=0,this.frame=0,this.traceBuf=[],this.branchTargets=new Set,this.constantSlots=[],this.backBranchOffsets=[],this.callHandlerReturnAddresses=[],this.nextConstantSlot=0,this.compressImportNames=!1,this.lockImports=!1,this._assignParameterIndices=e=>{let t=0;for(const n in e)this.locals.set(n,t),t++;return t},this.stack=[new xa],this.clear(e),this.cfg=new Aa(this)}clear(e){this.options=os(),this.stackSize=1,this.inSection=!1,this.inFunction=!1,this.lockImports=!1,this.locals.clear(),this.functionTypeCount=this.permanentFunctionTypeCount,this.functionTypes=Object.create(this.permanentFunctionTypes),this.functionTypesByShape=Object.create(this.permanentFunctionTypesByShape),this.functionTypesByIndex=Object.create(this.permanentFunctionTypesByIndex),this.nextImportIndex=0,this.importedFunctionCount=0,this.importedFunctions=Object.create(this.permanentImportedFunctions);for(const e in this.importedFunctions)this.importedFunctions[e].index=void 0;this.functions.length=0,this.estimatedExportBytes=0,this.argumentCount=0,this.current.clear(),this.traceBuf.length=0,this.branchTargets.clear(),this.activeBlocks=0,this.nextConstantSlot=0,this.constantSlots.length=this.options.useConstants?e:0;for(let e=0;e=this.stack.length&&this.stack.push(new xa),this.current.clear()}_pop(e){if(this.stackSize<=1)throw new Error("Stack empty");const t=this.current;return this.stackSize--,e?(this.appendULeb(t.size),t.copyTo(this.current),null):t.getArrayView(!1).slice(0,t.size)}getWasmImports(){const e=t.getMemory();e instanceof WebAssembly.Memory||w(!1,`expected heap import to be WebAssembly.Memory but was ${e}`);const n={c:this.getConstants(),m:{h:e}},r=this.getImportsToEmit();for(let e=0;e>>0||e>255)throw new Error(`Byte out of range: ${e}`);return this.current.appendU8(e)}appendSimd(e,t){return this.current.appendU8(253),0!=(0|e)||0===e&&!0===t||w(!1,"Expected non-v128_load simd opcode or allowLoad==true"),this.current.appendULeb(e)}appendU32(e){return this.current.appendU32(e)}appendF32(e){return this.current.appendF32(e)}appendF64(e){return this.current.appendF64(e)}appendBoundaryValue(e,t){return this.current.appendBoundaryValue(e,t)}appendULeb(e){return this.current.appendULeb(e)}appendLeb(e){return this.current.appendLeb(e)}appendLebRef(e,t){return this.current.appendLebRef(e,t)}appendBytes(e){return this.current.appendBytes(e)}appendName(e){return this.current.appendName(e)}ret(e){this.ip_const(e),this.appendU8(15)}i32_const(e){this.appendU8(65),this.appendLeb(e)}ptr_const(e){let t=this.options.useConstants?this.constantSlots.indexOf(e):-1;this.options.useConstants&&t<0&&this.nextConstantSlot=0?(this.appendU8(35),this.appendLeb(t)):this.i32_const(e)}ip_const(e){this.appendU8(65),this.appendLeb(e-this.base)}i52_const(e){this.appendU8(66),this.appendLeb(e)}v128_const(e){if(0===e)this.local("v128_zero");else{if("object"!=typeof e)throw new Error("Expected v128_const arg to be 0 or a Uint8Array");{16!==e.byteLength&&w(!1,"Expected v128_const arg to be 16 bytes in size");let t=!0;for(let n=0;n<16;n++)0!==e[n]&&(t=!1);t?this.local("v128_zero"):(this.appendSimd(12),this.appendBytes(e))}}}defineType(e,t,n,r){if(this.functionTypes[e])throw new Error(`Function type ${e} already defined`);if(r&&this.functionTypeCount>this.permanentFunctionTypeCount)throw new Error("New permanent function types cannot be defined after non-permanent ones");let o="";for(const e in t)o+=t[e]+",";o+=n;let a=this.functionTypesByShape[o];"number"!=typeof a&&(a=this.functionTypeCount++,r?(this.permanentFunctionTypeCount++,this.permanentFunctionTypesByShape[o]=a,this.permanentFunctionTypesByIndex[a]=[t,Object.values(t).length,n]):(this.functionTypesByShape[o]=a,this.functionTypesByIndex[a]=[t,Object.values(t).length,n]));const s=[a,t,n,`(${JSON.stringify(t)}) -> ${n}`,r];return r?this.permanentFunctionTypes[e]=s:this.functionTypes[e]=s,a}generateTypeSection(){this.beginSection(1),this.appendULeb(this.functionTypeCount);for(let e=0;ee.index-t.index)),e}_generateImportSection(e){const t=this.getImportsToEmit();if(this.lockImports=!0,!1!==e)throw new Error("function table imports are disabled");this.beginSection(2),this.appendULeb(1+t.length+this.constantSlots.length+(!1!==e?1:0));for(let e=0;e0)throw new Error("New permanent imports cannot be defined after any indexes have been assigned");const a=this.functionTypes[n];if(!a)throw new Error("No function type named "+n);if(r&&!a[4])throw new Error("A permanent import must have a permanent function type");const s=a[0],i=r?this.permanentImportedFunctions:this.importedFunctions;if("number"==typeof o&&(o=Ma().get(o)),"function"!=typeof o&&void 0!==o)throw new Error(`Value passed for imported function ${t} was not a function or valid function pointer or undefined`);return i[t]={index:void 0,typeIndex:s,module:e,name:t,func:o}}markImportAsUsed(e){const t=this.importedFunctions[e];if(!t)throw new Error("No imported function named "+e);"number"!=typeof t.index&&(t.index=this.importedFunctionCount++)}defineFunction(e,t){const n={index:this.functions.length,name:e.name,typeName:e.type,typeIndex:this.functionTypes[e.type][0],export:e.export,locals:e.locals,generator:t,error:null,blob:null};return this.functions.push(n),n.export&&(this.estimatedExportBytes+=n.name.length+8),n}emitImportsAndFunctions(e){let t=0;for(let e=0;e0)throw new Error(`${this.activeBlocks} unclosed block(s) at end of function`);const t=this._pop(e);return this.inFunction=!1,t}block(e,t){const n=this.appendU8(t||2);return e?this.appendU8(e):this.appendU8(64),this.activeBlocks++,n}endBlock(){if(this.activeBlocks<=0)throw new Error("No blocks active");this.activeBlocks--,this.appendU8(11)}arg(e,t){const n="string"==typeof e?this.locals.has(e)?this.locals.get(e):void 0:e;if("number"!=typeof n)throw new Error("No local named "+e);t&&this.appendU8(t),this.appendULeb(n)}local(e,t){const n="string"==typeof e?this.locals.has(e)?this.locals.get(e):void 0:e+this.argumentCount;if("number"!=typeof n)throw new Error("No local named "+e);t?this.appendU8(t):this.appendU8(32),this.appendULeb(n)}appendMemarg(e,t){this.appendULeb(t),this.appendULeb(e)}lea(e,t){"string"==typeof e?this.local(e):this.i32_const(e),this.i32_const(t),this.appendU8(106)}getArrayView(e){if(this.stackSize>1)throw new Error("Jiterpreter block stack not empty");return this.stack[0].getArrayView(e)}getConstants(){const e={};for(let t=0;t=this.capacity)throw new Error("Buffer full");const t=this.size;return Ee()[this.buffer+this.size++]=e,t}appendU32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,0),this.size+=4,t}appendI32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,1),this.size+=4,t}appendF32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,2),this.size+=4,t}appendF64(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,3),this.size+=8,t}appendBoundaryValue(e,t){if(this.size+8>=this.capacity)throw new Error("Buffer full");const n=St.mono_jiterp_encode_leb_signed_boundary(this.buffer+this.size,e,t);if(n<1)throw new Error(`Failed to encode ${e} bit boundary value with sign ${t}`);return this.size+=n,n}appendULeb(e){if("number"!=typeof e&&w(!1,`appendULeb expected number but got ${e}`),e>=0||w(!1,"cannot pass negative value to appendULeb"),e<127){if(this.size+1>=this.capacity)throw new Error("Buffer full");return this.appendU8(e),1}if(this.size+8>=this.capacity)throw new Error("Buffer full");const t=St.mono_jiterp_encode_leb52(this.buffer+this.size,e,0);if(t<1)throw new Error(`Failed to encode value '${e}' as unsigned leb`);return this.size+=t,t}appendLeb(e){if("number"!=typeof e&&w(!1,`appendLeb expected number but got ${e}`),this.size+8>=this.capacity)throw new Error("Buffer full");const t=St.mono_jiterp_encode_leb52(this.buffer+this.size,e,1);if(t<1)throw new Error(`Failed to encode value '${e}' as signed leb`);return this.size+=t,t}appendLebRef(e,t){if(this.size+8>=this.capacity)throw new Error("Buffer full");const n=St.mono_jiterp_encode_leb64_ref(this.buffer+this.size,e,t?1:0);if(n<1)throw new Error("Failed to encode value as leb");return this.size+=n,n}copyTo(e,t){"number"!=typeof t&&(t=this.size),Ee().copyWithin(e.buffer+e.size,this.buffer,this.buffer+t),e.size+=t}appendBytes(e,t){const n=this.size,r=Ee();return e.buffer===r.buffer?("number"!=typeof t&&(t=e.length),r.copyWithin(this.buffer+n,e.byteOffset,e.byteOffset+t),this.size+=t):("number"==typeof t&&(e=new Uint8Array(e.buffer,e.byteOffset,t)),this.getArrayView(!0).set(e,this.size),this.size+=e.length),n}appendName(e){let t=e.length,n=1===e.length?e.charCodeAt(0):-1;if(n>127&&(n=-1),t&&n<0)if(this.encoder)t=this.encoder.encodeInto(e,this.textBuf).written||0;else for(let n=0;n127)throw new Error("Out of range character and no TextEncoder available");this.textBuf[n]=t}this.appendULeb(t),n>=0?this.appendU8(n):t>1&&this.appendBytes(this.textBuf,t)}getArrayView(e){return new Uint8Array(Ee().buffer,this.buffer,e?this.capacity:this.size)}}class Aa{constructor(e){this.segments=[],this.backBranchTargets=null,this.lastSegmentEnd=0,this.overheadBytes=0,this.blockStack=[],this.backDispatchOffsets=[],this.dispatchTable=new Map,this.observedBranchTargets=new Set,this.trace=0,this.builder=e}initialize(e,t,n){this.segments.length=0,this.blockStack.length=0,this.startOfBody=e,this.backBranchTargets=t,this.base=this.builder.base,this.ip=this.lastSegmentStartIp=this.builder.base,this.lastSegmentEnd=0,this.overheadBytes=10,this.dispatchTable.clear(),this.observedBranchTargets.clear(),this.trace=n,this.backDispatchOffsets.length=0}entry(e){this.entryIp=e,this.appendBlob(),1!==this.segments.length&&w(!1,"expected 1 segment"),"blob"!==this.segments[0].type&&w(!1,"expected blob"),this.entryBlob=this.segments[0],this.segments.length=0,this.overheadBytes+=9,this.backBranchTargets&&(this.overheadBytes+=20,this.overheadBytes+=this.backBranchTargets.length)}appendBlob(){this.builder.current.size!==this.lastSegmentEnd&&(this.segments.push({type:"blob",ip:this.lastSegmentStartIp,start:this.lastSegmentEnd,length:this.builder.current.size-this.lastSegmentEnd}),this.lastSegmentStartIp=this.ip,this.lastSegmentEnd=this.builder.current.size,this.overheadBytes+=2)}startBranchBlock(e,t){this.appendBlob(),this.segments.push({type:"branch-block-header",ip:e,isBackBranchTarget:t}),this.overheadBytes+=1}branch(e,t,n){this.observedBranchTargets.add(e),this.appendBlob(),this.segments.push({type:"branch",from:this.ip,target:e,isBackward:t,branchType:n}),this.overheadBytes+=4,t&&(this.overheadBytes+=11),3!==n&&2!==n||(this.overheadBytes+=17)}emitBlob(e,t){const n=t.subarray(e.start,e.start+e.length);this.builder.appendBytes(n)}generate(){this.appendBlob();const e=this.builder.endFunction(!1);this.builder._push(),this.builder.base=this.base,this.emitBlob(this.entryBlob,e),this.backBranchTargets&&(this.builder.i32_const(0),this.builder.local("disp",33),this.builder.block(64,3));for(let e=0;ee-t));for(let e=0;e0&&ut("No back branch targets were reachable after filtering");else if(1===this.backDispatchOffsets.length)this.trace>0&&(this.backDispatchOffsets[0]===this.entryIp?ut(`Exactly one back dispatch offset and it was the entry point 0x${this.entryIp.toString(16)}`):ut(`Exactly one back dispatch offset and it was 0x${this.backDispatchOffsets[0].toString(16)}`)),this.builder.local("disp"),this.builder.appendU8(13),this.builder.appendULeb(this.blockStack.indexOf(this.backDispatchOffsets[0]));else{this.builder.block(64),this.builder.block(64),this.builder.local("disp"),this.builder.appendU8(14),this.builder.appendULeb(this.backDispatchOffsets.length+1),this.builder.appendULeb(1);for(let e=0;e0&&this.blockStack.push(0)}this.trace>1&&ut(`blockStack=${this.blockStack}`);for(let t=0;t1&&ut(`backward br from ${n.from.toString(16)} to ${n.target.toString(16)}: disp=${e}`),this.builder.i32_const(1),this.builder.local("backbranched",33),this.builder.i32_const(e),this.builder.local("disp",33),r=!0}else this.trace>0&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed: back branch target not in dispatch table`),t=-1;if(t>=0||r){let e=0;switch(n.branchType){case 2:Da(this.builder,n.from),this.builder.appendU8(12);break;case 3:this.builder.block(64,4),Da(this.builder,n.from),this.builder.appendU8(12),e=1;break;case 0:this.builder.appendU8(12);break;case 1:this.builder.appendU8(13);break;default:throw new Error("Unimplemented branch type")}this.builder.appendULeb(e+t),e&&this.builder.endBlock(),this.trace>1&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} breaking out ${e+t+1} level(s)`)}else{if(this.trace>0){const e=this.base;n.target>=e&&n.target1&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed (outside of trace 0x${e.toString(16)} - 0x${this.exitIp.toString(16)})`)}const e=1===n.branchType||3===n.branchType;e&&this.builder.block(64,4),Ba(this.builder,n.target,4),e&&this.builder.endBlock()}break}default:throw new Error("unreachable")}}return this.backBranchTargets&&(this.blockStack.length<=1||w(!1,"expected one or zero entries in the block stack at the end"),this.blockStack.length&&this.blockStack.shift(),this.builder.endBlock()),0!==this.blockStack.length&&w(!1,`expected block stack to be empty at end of function but it was ${this.blockStack}`),this.builder.ip_const(this.exitIp),this.builder.appendU8(15),this.builder.appendU8(11),this.builder._pop(!1)}}let ja,Ra=-1,La=0;const Ca={generation:0,compilation:0},$a={traceCandidates:0,tracesCompiled:0,entryWrappersCompiled:0,jitCallsCompiled:0,directJitCallsCompiled:0,failures:0,bytesGenerated:0,nullChecksEliminated:0,nullChecksFused:0,backBranchesEmitted:0,backBranchesNotEmitted:0,simdFallback:{}},Na=globalThis.performance&&globalThis.performance.now?globalThis.performance.now.bind(globalThis.performance):Date.now;function Da(e,t){e.ptr_const(St.mono_jiterp_get_polling_required_address()),e.appendU8(40),e.appendMemarg(0,2),e.block(64,4),e.local("frame"),e.i32_const(t),e.callImport("safepoint"),e.endBlock()}function Ba(e,t,n){e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.base),e.i32_const(n),e.callImport("bailout")),e.appendU8(15)}function Oa(e,t,n,r){n<=e.options.monitoringLongDistance+2&&(e.local("cinfo"),e.i32_const(n),e.appendU8(54),e.appendMemarg(4,0),e.local("cinfo"),e.local("backbranched"),e.appendU8(54),e.appendMemarg(0,0)),e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.base),e.i32_const(r),e.callImport("bailout")),e.appendU8(15)}function Ma(){if(ja||(ja=t.getWasmIndirectFunctionTable()),!ja)throw new Error("Module did not export the indirect function table");return ja}function Fa(e){e||w(!1,"Attempting to set null function into table"),l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const t=Ma();La<=0&&(Ra=t.length,La=512,t.grow(La));const n=Ra;return Ra++,La--,t.set(n,e),n}function Pa(e,t,n,r,o){if(r<=0)return o&&e.appendU8(26),!0;if(r>=va)return!1;if(0!==n)return!1;const a=o?"memop_dest":"pLocals";o&&e.local(a,33);let s=o?0:t;if(e.options.enableSimd){const t=16;for(;r>=t;)e.local(a),e.v128_const(0),e.appendSimd(11),e.appendMemarg(s,0),s+=t,r-=t}for(;r>=8;)e.local(a),e.i52_const(0),e.appendU8(55),e.appendMemarg(s,0),s+=8,r-=8;for(;r>=1;){e.local(a),e.i32_const(0);let t=r%4;switch(t){case 0:t=4,e.appendU8(54);break;case 1:e.appendU8(58);break;case 3:case 2:t=2,e.appendU8(59)}e.appendMemarg(s,0),s+=t,r-=t}return!0}function za(e,t,n){Pa(e,0,t,n,!0)||(e.i32_const(t),e.i32_const(n),e.appendU8(252),e.appendU8(11),e.appendU8(0))}function Va(e,t,n,r,o,a,s){if(r<=0)return o&&(e.appendU8(26),e.appendU8(26)),!0;if(r>=Ea)return!1;o?(a=a||"memop_dest",s=s||"memop_src",e.local(s,33),e.local(a,33)):a&&s||(a=s="pLocals");let i=o?0:t,c=o?0:n;if(e.options.enableSimd){const t=16;for(;r>=t;)e.local(a),e.local(s),e.appendSimd(0,!0),e.appendMemarg(c,0),e.appendSimd(11),e.appendMemarg(i,0),i+=t,c+=t,r-=t}for(;r>=8;)e.local(a),e.local(s),e.appendU8(41),e.appendMemarg(c,0),e.appendU8(55),e.appendMemarg(i,0),i+=8,c+=8,r-=8;for(;r>=1;){let t,n,o=r%4;switch(o){case 0:o=4,t=40,n=54;break;default:case 1:o=1,t=44,n=58;break;case 3:case 2:o=2,t=46,n=59}e.local(a),e.local(s),e.appendU8(t),e.appendMemarg(c,0),e.appendU8(n),e.appendMemarg(i,0),c+=o,i+=o,r-=o}return!0}function Wa(e,t){return Va(e,0,0,t,!0)||(e.i32_const(t),e.appendU8(252),e.appendU8(10),e.appendU8(0),e.appendU8(0)),!0}function Ha(){$a.failures++,$a.failures>=ka&&(ut(`Disabling jiterpreter after ${$a.failures} failures`),rs({enableTraces:!1,enableInterpEntry:!1,enableJitCall:!1}))}const Ga={};function qa(e){const t=Ga[e];return void 0===t?Ga[e]=St.mono_jiterp_get_member_offset(e):t}function Ja(e){const n=t.asm[e];if("function"!=typeof n)throw new Error(`raw cwrap ${e} not found`);return n}const Ya={};function Xa(e){let t=Ya[e];return"number"!=typeof t&&(t=Ya[e]=St.mono_jiterp_get_opcode_value_table_entry(e)),t}function Za(e,t){return[e,e,t]}let Ka;function Qa(){if(!St.mono_wasm_is_zero_page_reserved())return!1;if(!0===Ka)return!1;const e=Ie();for(let t=0;t<8;t++)if(0!==e[t])return!1===Ka&&dt(`Zero page optimizations are enabled but garbage appeared in memory at address ${4*t}: ${e[t]}`),Ka=!0,!1;return Ka=!1,!0}const es={enableTraces:"jiterpreter-traces-enabled",enableInterpEntry:"jiterpreter-interp-entry-enabled",enableJitCall:"jiterpreter-jit-call-enabled",enableBackwardBranches:"jiterpreter-backward-branch-entries-enabled",enableCallResume:"jiterpreter-call-resume-enabled",enableWasmEh:"jiterpreter-wasm-eh-enabled",enableSimd:"jiterpreter-simd-enabled",zeroPageOptimization:"jiterpreter-zero-page-optimization",enableStats:"jiterpreter-stats-enabled",disableHeuristic:"jiterpreter-disable-heuristic",estimateHeat:"jiterpreter-estimate-heat",countBailouts:"jiterpreter-count-bailouts",dumpTraces:"jiterpreter-dump-traces",useConstants:"jiterpreter-use-constants",eliminateNullChecks:"jiterpreter-eliminate-null-checks",noExitBackwardBranches:"jiterpreter-backward-branches-enabled",directJitCalls:"jiterpreter-direct-jit-calls",minimumTraceValue:"jiterpreter-minimum-trace-value",minimumTraceHitCount:"jiterpreter-minimum-trace-hit-count",monitoringPeriod:"jiterpreter-trace-monitoring-period",monitoringShortDistance:"jiterpreter-trace-monitoring-short-distance",monitoringLongDistance:"jiterpreter-trace-monitoring-long-distance",monitoringMaxAveragePenalty:"jiterpreter-trace-monitoring-max-average-penalty",backBranchBoost:"jiterpreter-back-branch-boost",jitCallHitCount:"jiterpreter-jit-call-hit-count",jitCallFlushThreshold:"jiterpreter-jit-call-queue-flush-threshold",interpEntryHitCount:"jiterpreter-interp-entry-hit-count",interpEntryFlushThreshold:"jiterpreter-interp-entry-queue-flush-threshold",wasmBytesLimit:"jiterpreter-wasm-bytes-limit"};let ts=-1,ns={};function rs(e){for(const t in e){const n=es[t];if(!n){dt(`Unrecognized jiterpreter option: ${t}`);continue}const r=e[t];"boolean"==typeof r?St.mono_jiterp_parse_option((r?"--":"--no-")+n):"number"==typeof r?St.mono_jiterp_parse_option(`--${n}=${r}`):dt(`Jiterpreter option must be a boolean or a number but was ${typeof r} '${r}'`)}}function os(){const e=St.mono_jiterp_get_options_version();return e!==ts&&(function(){const e=St.mono_jiterp_get_options_as_json(),n=Qe(e);t._free(e);const r=JSON.parse(n);ns={};for(const e in es){const t=es[e];ns[e]=r[t]}}(),ts=e),ns}const as={2:["V128_I1_NEGATION","V128_I2_NEGATION","V128_I4_NEGATION","V128_ONES_COMPLEMENT","V128_U2_WIDEN_LOWER","V128_U2_WIDEN_UPPER","V128_I1_CREATE_SCALAR","V128_I2_CREATE_SCALAR","V128_I4_CREATE_SCALAR","V128_I8_CREATE_SCALAR","V128_I1_EXTRACT_MSB","V128_I2_EXTRACT_MSB","V128_I4_EXTRACT_MSB","V128_I8_EXTRACT_MSB","V128_I1_CREATE","V128_I2_CREATE","V128_I4_CREATE","V128_I8_CREATE","SplatX1","SplatX2","SplatX4","SplatX8","NegateD1","NegateD2","NegateD4","NegateD8","NegateR4","NegateR8","SqrtR4","SqrtR8","CeilingR4","CeilingR8","FloorR4","FloorR8","TruncateR4","TruncateR8","RoundToNearestR4","RoundToNearestR8","NotANY","AnyTrueANY","AllTrueD1","AllTrueD2","AllTrueD4","AllTrueD8","PopCountU1","BitmaskD1","BitmaskD2","BitmaskD4","BitmaskD8","AddPairwiseWideningI1","AddPairwiseWideningU1","AddPairwiseWideningI2","AddPairwiseWideningU2","AbsI1","AbsI2","AbsI4","AbsI8","AbsR4","AbsR8","ConvertToSingleI4","ConvertToSingleU4","ConvertToSingleR8","ConvertToDoubleLowerI4","ConvertToDoubleLowerU4","ConvertToDoubleLowerR8","ConvertToInt32SaturateR4","ConvertToUInt32SaturateR4","ConvertToInt32SaturateR8","ConvertToUInt32SaturateR8","SignExtendWideningLowerD1","SignExtendWideningLowerD2","SignExtendWideningLowerD4","SignExtendWideningUpperD1","SignExtendWideningUpperD2","SignExtendWideningUpperD4","ZeroExtendWideningLowerD1","ZeroExtendWideningLowerD2","ZeroExtendWideningLowerD4","ZeroExtendWideningUpperD1","ZeroExtendWideningUpperD2","ZeroExtendWideningUpperD4","LoadVector128ANY","LoadScalarVector128X4","LoadScalarVector128X8","LoadScalarAndSplatVector128X1","LoadScalarAndSplatVector128X2","LoadScalarAndSplatVector128X4","LoadScalarAndSplatVector128X8","LoadWideningVector128I1","LoadWideningVector128U1","LoadWideningVector128I2","LoadWideningVector128U2","LoadWideningVector128I4","LoadWideningVector128U4"],3:["V128_I1_ADD","V128_I2_ADD","V128_I4_ADD","V128_R4_ADD","V128_I1_SUB","V128_I2_SUB","V128_I4_SUB","V128_R4_SUB","V128_BITWISE_AND","V128_BITWISE_OR","V128_BITWISE_EQUALITY","V128_BITWISE_INEQUALITY","V128_R4_FLOAT_EQUALITY","V128_R8_FLOAT_EQUALITY","V128_EXCLUSIVE_OR","V128_I1_MULTIPLY","V128_I2_MULTIPLY","V128_I4_MULTIPLY","V128_R4_MULTIPLY","V128_R4_DIVISION","V128_I1_LEFT_SHIFT","V128_I2_LEFT_SHIFT","V128_I4_LEFT_SHIFT","V128_I8_LEFT_SHIFT","V128_I1_RIGHT_SHIFT","V128_I2_RIGHT_SHIFT","V128_I4_RIGHT_SHIFT","V128_I1_URIGHT_SHIFT","V128_I2_URIGHT_SHIFT","V128_I4_URIGHT_SHIFT","V128_I8_URIGHT_SHIFT","V128_U1_NARROW","V128_U1_GREATER_THAN","V128_I1_LESS_THAN","V128_U1_LESS_THAN","V128_I2_LESS_THAN","V128_I1_EQUALS","V128_I2_EQUALS","V128_I4_EQUALS","V128_R4_EQUALS","V128_I8_EQUALS","V128_AND_NOT","V128_U2_LESS_THAN_EQUAL","V128_I1_SHUFFLE","V128_I2_SHUFFLE","V128_I4_SHUFFLE","V128_I8_SHUFFLE","ExtractScalarI1","ExtractScalarU1","ExtractScalarI2","ExtractScalarU2","ExtractScalarD4","ExtractScalarD8","ExtractScalarR4","ExtractScalarR8","SwizzleD1","AddD1","AddD2","AddD4","AddD8","AddR4","AddR8","SubtractD1","SubtractD2","SubtractD4","SubtractD8","SubtractR4","SubtractR8","MultiplyD2","MultiplyD4","MultiplyD8","MultiplyR4","MultiplyR8","DivideR4","DivideR8","DotI2","ShiftLeftD1","ShiftLeftD2","ShiftLeftD4","ShiftLeftD8","ShiftRightArithmeticD1","ShiftRightArithmeticD2","ShiftRightArithmeticD4","ShiftRightArithmeticD8","ShiftRightLogicalD1","ShiftRightLogicalD2","ShiftRightLogicalD4","ShiftRightLogicalD8","AndANY","AndNotANY","OrANY","XorANY","CompareEqualD1","CompareEqualD2","CompareEqualD4","CompareEqualD8","CompareEqualR4","CompareEqualR8","CompareNotEqualD1","CompareNotEqualD2","CompareNotEqualD4","CompareNotEqualD8","CompareNotEqualR4","CompareNotEqualR8","CompareLessThanI1","CompareLessThanU1","CompareLessThanI2","CompareLessThanU2","CompareLessThanI4","CompareLessThanU4","CompareLessThanI8","CompareLessThanR4","CompareLessThanR8","CompareLessThanOrEqualI1","CompareLessThanOrEqualU1","CompareLessThanOrEqualI2","CompareLessThanOrEqualU2","CompareLessThanOrEqualI4","CompareLessThanOrEqualU4","CompareLessThanOrEqualI8","CompareLessThanOrEqualR4","CompareLessThanOrEqualR8","CompareGreaterThanI1","CompareGreaterThanU1","CompareGreaterThanI2","CompareGreaterThanU2","CompareGreaterThanI4","CompareGreaterThanU4","CompareGreaterThanI8","CompareGreaterThanR4","CompareGreaterThanR8","CompareGreaterThanOrEqualI1","CompareGreaterThanOrEqualU1","CompareGreaterThanOrEqualI2","CompareGreaterThanOrEqualU2","CompareGreaterThanOrEqualI4","CompareGreaterThanOrEqualU4","CompareGreaterThanOrEqualI8","CompareGreaterThanOrEqualR4","CompareGreaterThanOrEqualR8","ConvertNarrowingSaturateSignedI2","ConvertNarrowingSaturateSignedI4","ConvertNarrowingSaturateUnsignedI2","ConvertNarrowingSaturateUnsignedI4","MultiplyWideningLowerI1","MultiplyWideningLowerI2","MultiplyWideningLowerI4","MultiplyWideningLowerU1","MultiplyWideningLowerU2","MultiplyWideningLowerU4","MultiplyWideningUpperI1","MultiplyWideningUpperI2","MultiplyWideningUpperI4","MultiplyWideningUpperU1","MultiplyWideningUpperU2","MultiplyWideningUpperU4","AddSaturateI1","AddSaturateU1","AddSaturateI2","AddSaturateU2","SubtractSaturateI1","SubtractSaturateU1","SubtractSaturateI2","SubtractSaturateU2","MultiplyRoundedSaturateQ15I2","MinI1","MinI2","MinI4","MinU1","MinU2","MinU4","MaxI1","MaxI2","MaxI4","MaxU1","MaxU2","MaxU4","AverageRoundedU1","AverageRoundedU2","MinR4","MinR8","MaxR4","MaxR8","PseudoMinR4","PseudoMinR8","PseudoMaxR4","PseudoMaxR8","StoreANY"],4:["V128_CONDITIONAL_SELECT","ReplaceScalarD1","ReplaceScalarD2","ReplaceScalarD4","ReplaceScalarD8","ReplaceScalarR4","ReplaceScalarR8","ShuffleD1","BitwiseSelectANY","LoadScalarAndInsertX1","LoadScalarAndInsertX2","LoadScalarAndInsertX4","LoadScalarAndInsertX8","StoreSelectedScalarX1","StoreSelectedScalarX2","StoreSelectedScalarX4","StoreSelectedScalarX8"]},ss={13:[65,-1],14:[65,0],15:[65,1],16:[65,2],17:[65,3],18:[65,4],19:[65,5],20:[65,6],21:[65,7],22:[65,8]},is={463:168,469:174,464:170,470:176},cs={515:[69,40,54],435:[106,40,54],437:[107,40,54],439:[107,40,54],443:[115,40,54],436:[124,41,55],438:[125,41,55],440:[125,41,55],444:[133,41,55],518:[106,40,54],522:[108,40,54],519:[124,41,55],523:[126,41,55],441:[140,42,56],442:[154,43,57],471:[178,40,56],474:[183,40,57],445:[184,40,57],472:[180,41,56],475:[185,41,57],446:[186,41,57],476:[187,42,57],473:[182,43,56],467:[1,52,55],468:[1,53,55],451:[113,40,54],459:[113,40,54],447:[117,40,54],455:[117,40,54],452:[113,41,54],460:[113,41,54],448:[117,41,54],456:[117,41,54],526:[116,40,54],527:[134,41,55],528:[117,40,54],529:[135,41,55],524:[118,40,54],525:[136,41,55],628:[119,40,54],629:[137,41,55],630:[120,40,54],631:[138,41,55],632:[103,40,54],634:[104,40,54],636:[105,40,54],633:[121,41,55],635:[122,41,55],637:[123,41,55]},ls={401:187,402:1,405:187,406:1,409:187,410:1,413:187,414:1,419:187,420:1,423:187,424:1,433:187,434:1,427:187,428:1,65536:187,65537:187,65535:187,65539:1,65540:1,65538:1},us={351:[106,40,54],369:[106,40,54],371:[106,40,54],355:[107,40,54],359:[108,40,54],373:[108,40,54],375:[108,40,54],363:[109,40,54],367:[110,40,54],387:[111,40,54],391:[112,40,54],381:[113,40,54],383:[114,40,54],385:[115,40,54],395:[116,40,54],397:[117,40,54],393:[118,40,54],352:[124,41,55],356:[125,41,55],360:[126,41,55],364:[127,41,55],388:[129,41,55],368:[128,41,55],392:[130,41,55],382:[131,41,55],384:[132,41,55],386:[133,41,55],396:[134,41,55],398:[135,41,55],394:[136,41,55],353:[146,42,56],357:[147,42,56],361:[148,42,56],365:[149,42,56],354:[160,43,57],358:[161,43,57],362:[162,43,57],366:[163,43,57],399:[70,40,54],403:[71,40,54],421:[72,40,54],407:[74,40,54],425:[76,40,54],411:[78,40,54],431:[73,40,54],417:[75,40,54],429:[77,40,54],415:[79,40,54],400:[81,41,54],404:[82,41,54],422:[83,41,54],408:[85,41,54],426:[87,41,54],412:[89,41,54],432:[84,41,54],418:[86,41,54],430:[88,41,54],416:[90,41,54]},ps={195:399,215:403,203:407,223:417,207:421,231:431,199:411,219:415,211:425,227:429,239:[399,!1,!0],249:[403,!1,!0],243:[407,!1,!0],253:[417,!1,!0],245:[421,!1,!0],257:[431,!1,!0],241:[411,!1,!0],251:[415,!1,!0],247:[425,!1,!0],255:[429,!1,!0],259:[399,65,!0],269:[403,65,!0],263:[407,65,!0],273:[417,65,!0],265:[421,65,!0],277:[431,65,!0],261:[411,65,!0],271:[415,65,!0],267:[425,65,!0],275:[429,65,!0],196:400,216:404,204:408,224:418,208:422,232:432,200:412,220:416,212:426,228:430,260:[400,66,!0],264:[408,66,!0],274:[418,66,!0],266:[422,66,!0],278:[432,66,!0],262:[412,66,!0],272:[416,66,!0],268:[426,66,!0],276:[430,66,!0],197:401,217:65535,205:409,225:419,209:423,233:433,201:413,221:65536,213:427,229:65537,198:402,218:65538,206:410,226:420,210:424,234:434,202:414,222:65539,214:428,230:65540},ds={588:[!0,!1,159],615:[!0,!0,145],575:[!0,!1,155],602:[!0,!0,141],581:[!0,!1,156],608:[!0,!0,142],592:[!0,!1,153],619:[!0,!0,139],570:[!0,!1,"acos"],597:[!0,!0,"acosf"],571:[!0,!1,"acosh"],598:[!0,!0,"acoshf"],576:[!0,!1,"cos"],603:[!0,!0,"cosf"],568:[!0,!1,"asin"],595:[!0,!0,"asinf"],569:[!0,!1,"asinh"],596:[!0,!0,"asinhf"],587:[!0,!1,"sin"],614:[!0,!0,"sinf"],572:[!0,!1,"atan"],599:[!0,!0,"atanf"],573:[!0,!1,"atanh"],600:[!0,!0,"atanhf"],590:[!0,!1,"tan"],617:[!0,!0,"tanf"],577:[!0,!1,"cbrt"],604:[!0,!0,"cbrtf"],579:[!0,!1,"exp"],606:[!0,!0,"expf"],582:[!0,!1,"log"],609:[!0,!0,"logf"],583:[!0,!1,"log2"],610:[!0,!0,"log2f"],584:[!0,!1,"log10"],611:[!0,!0,"log10f"],593:[!1,!1,164],620:[!1,!0,150],594:[!1,!1,165],621:[!1,!0,151],574:[!1,!1,"atan2"],601:[!1,!0,"atan2f"],585:[!1,!1,"pow"],612:[!1,!0,"powf"],390:[!1,!1,"fmod"],389:[!1,!0,"fmodf"]},_s={641:1,642:2,643:4,644:8},fs={641:44,642:46,643:40,644:41},ms={641:58,642:59,643:54,644:55},hs=new Set([20,21,22,23,24,25,26,27,28,29,30]),bs={47:[16,54],48:[16,54],49:[8,54],50:[8,54],51:[4,54],53:[4,56],52:[2,55],54:[2,57]},gs={1:[16,40],2:[8,40],3:[4,40],5:[4,42],4:[2,41],6:[2,43]},ys=new Set([81,84,85,86,87,82,83,88,89,90,91,92,93]),ws={13:[16],14:[8],15:[4],16:[2]},Ss={10:100,11:132,12:164,13:196},ks={6:[44,23],7:[46,26],8:[40,28],9:[41,30]};function vs(e,t){return se(e+2*t)}function Es(e,t){return de(e+2*t)}function Us(e,t){return le(e+2*t)}function Is(e,t){return ue(e+2*t)}function Ts(e){return ue(e+qa(4))}function xs(e,t){const n=ue(Ts(e)+qa(5));return ue(n+t*Ei)}function As(e,t){const n=ue(Ts(e)+qa(12));return ue(n+t*Ei)}function js(e,t,n){if(!n)return!1;for(let r=0;r=40||w(!1,`Expected load opcode but got ${n}`),e.appendU8(n),void 0!==r)e.appendULeb(r);else if(253===n)throw new Error("PREFIX_simd ldloc without a simdOpcode");const o=Fs(t,n,r);e.appendMemarg(t,o)}function zs(e,t,n,r){n>=54||w(!1,`Expected store opcode but got ${n}`),e.appendU8(n),void 0!==r&&e.appendULeb(r);const o=Fs(t,n,r);e.appendMemarg(t,o),Bs(t),void 0!==r&&Bs(t+8)}function Vs(e,t,n){"number"!=typeof n&&(n=512),n>0&&Os(t,n),e.lea("pLocals",t)}function Ws(e,t,n,r){Os(t,r),Pa(e,t,n,r,!1)||(Vs(e,t,r),za(e,n,r))}function Hs(e,t,n,r){if(Os(t,r),Va(e,t,n,r,!1))return!0;Vs(e,t,r),Vs(e,n,0),Wa(e,r)}function Gs(e,t){return 0!==St.mono_jiterp_is_imethod_var_address_taken(Ts(e.frame),t)}function qs(e,t,n,r){if(e.allowNullCheckOptimization&&Cs.has(t)&&!Gs(e,t))return $a.nullChecksEliminated++,void(Ns===t?r&&e.local("cknull_ptr"):(Ps(e,t,40),e.local("cknull_ptr",r?34:33),Ns=t));Ps(e,t,40),e.local("cknull_ptr",34),e.appendU8(69),e.block(64,4),Ba(e,n,2),e.endBlock(),r&&e.local("cknull_ptr"),e.allowNullCheckOptimization&&!Gs(e,t)?(Cs.set(t,n),Ns=t):Ns=-1}function Js(e,t,n){let r,o=54;const a=ss[n];if(a)e.local("pLocals"),e.appendU8(a[0]),r=a[1],e.appendLeb(r);else switch(n){case 23:e.local("pLocals"),r=Es(t,2),e.i32_const(r);break;case 24:e.local("pLocals"),r=Us(t,2),e.i32_const(r);break;case 25:e.local("pLocals"),e.i52_const(0),o=55;break;case 27:e.local("pLocals"),e.appendU8(66),e.appendLebRef(t+4,!0),o=55;break;case 26:e.local("pLocals"),e.i52_const(Es(t,2)),o=55;break;case 28:e.local("pLocals"),e.appendU8(67),e.appendF32(function(e,t){return n=e+2*t,St.mono_wasm_get_f32_unaligned(n);var n}(t,2)),o=56;break;case 29:e.local("pLocals"),e.appendU8(68),e.appendF64(function(e,t){return n=e+2*t,St.mono_wasm_get_f64_unaligned(n);var n}(t,2)),o=57;break;default:return!1}e.appendU8(o);const s=vs(t,1);return e.appendMemarg(s,2),Bs(s),"number"==typeof r?Rs.set(s,r):Rs.delete(s),!0}function Ys(e,t,n){let r=40,o=54;switch(n){case 82:r=44;break;case 83:r=45;break;case 84:r=46;break;case 85:r=47;break;case 86:r=45,o=58;break;case 87:r=47,o=59;break;case 88:break;case 89:r=41,o=55;break;case 90:{const n=vs(t,3);return Hs(e,vs(t,1),vs(t,2),n),!0}case 91:return Hs(e,vs(t,1),vs(t,2),8),Hs(e,vs(t,3),vs(t,4),8),!0;case 92:return Hs(e,vs(t,1),vs(t,2),8),Hs(e,vs(t,3),vs(t,4),8),Hs(e,vs(t,5),vs(t,6),8),!0;case 93:return Hs(e,vs(t,1),vs(t,2),8),Hs(e,vs(t,3),vs(t,4),8),Hs(e,vs(t,5),vs(t,6),8),Hs(e,vs(t,7),vs(t,8),8),!0;default:return!1}return e.local("pLocals"),Ps(e,vs(t,2),r),zs(e,vs(t,1),o),!0}function Xs(e,t,n,r){const o=r>=31&&r<=44||r>=58&&r<=68,a=vs(n,o?2:1),s=vs(n,3),i=vs(n,o?1:2),c=e.allowNullCheckOptimization&&Cs.has(a)&&!Gs(e,a);44!==r&&53!==r&&qs(e,a,n,!1);let l=54,u=40;switch(r){case 31:u=44;break;case 32:u=45;break;case 33:u=46;break;case 34:u=47;break;case 39:case 49:case 35:break;case 51:case 37:u=42,l=56;break;case 52:case 38:u=43,l=57;break;case 45:case 46:l=58;break;case 47:case 48:l=59;break;case 36:case 50:u=41,l=55;break;case 53:return c||e.block(),e.local("pLocals"),e.i32_const(s),e.i32_const(a),e.i32_const(i),e.callImport("stfld_o"),c?(e.appendU8(26),$a.nullChecksEliminated++):(e.appendU8(13),e.appendULeb(0),Ba(e,n,2),e.endBlock()),!0;case 40:{const t=vs(n,4);return Vs(e,i,t),e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Wa(e,t),!0}case 54:{const r=xs(t,vs(n,4));return e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Vs(e,i,0),e.ptr_const(r),e.callImport("value_copy"),!0}case 55:{const t=vs(n,4);return e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Vs(e,i,0),Wa(e,t),!0}case 44:case 43:return e.local("pLocals"),Ps(e,a,40),0!==s&&(e.i32_const(s),e.appendU8(106)),zs(e,i,l),!0;default:return!1}return o&&e.local("pLocals"),e.local("cknull_ptr"),o?(e.appendU8(u),e.appendMemarg(s,0),zs(e,i,l),!0):(Ps(e,i,u),e.appendU8(l),e.appendMemarg(s,0),!0)}function Zs(e,t,n,r){const o=r>=31&&r<=44||r>=58&&r<=68,a=vs(n,1),s=xs(t,vs(n,2)),i=xs(t,vs(n,3));!function(e,t,n){e.block(),e.ptr_const(t),e.appendU8(45),e.appendMemarg(qa(0),0),e.appendU8(13),e.appendULeb(0),Ba(e,n,3),e.endBlock()}(e,s,n);let c=54,l=40;switch(r){case 58:l=44;break;case 59:l=45;break;case 60:l=46;break;case 61:l=47;break;case 66:case 73:case 62:break;case 75:case 64:l=42,c=56;break;case 76:case 65:l=43,c=57;break;case 69:case 70:c=58;break;case 71:case 72:c=59;break;case 63:case 74:l=41,c=55;break;case 77:return e.ptr_const(i),Vs(e,a,0),e.callImport("copy_ptr"),!0;case 67:{const t=vs(n,4);return Vs(e,a,t),e.ptr_const(i),Wa(e,t),!0}case 80:return e.local("pLocals"),e.ptr_const(i),zs(e,a,c),!0;default:return!1}return o?(e.local("pLocals"),e.ptr_const(i),e.appendU8(l),e.appendMemarg(0,0),zs(e,a,c),!0):(e.ptr_const(i),Ps(e,a,l),e.appendU8(c),e.appendMemarg(0,0),!0)}function Ks(e,t,n){let r,o,a,s,i="math_lhs32",c="math_rhs32",l=!1;const u=ls[n];if(u){e.local("pLocals");const r=1==u;return Ps(e,vs(t,2),r?43:42),r||e.appendU8(u),Ps(e,vs(t,3),r?43:42),r||e.appendU8(u),e.i32_const(n),e.callImport("relop_fp"),zs(e,vs(t,1),54),!0}switch(n){case 389:case 390:return ri(e,t,n);default:if(s=us[n],!s)return!1;s.length>3?(r=s[1],o=s[2],a=s[3]):(r=o=s[1],a=s[2])}switch(n){case 363:case 364:case 367:case 368:case 387:case 388:case 391:case 392:{const a=368===n||392===n||364===n||388===n;i=a?"math_lhs64":"math_lhs32",c=a?"math_rhs64":"math_rhs32",e.block(),Ps(e,vs(t,2),r),e.local(i,33),Ps(e,vs(t,3),o),e.local(c,34),l=!0,a&&(e.appendU8(80),e.appendU8(69)),e.appendU8(13),e.appendULeb(0),Ba(e,t,12),e.endBlock(),363!==n&&387!==n&&364!==n&&388!==n||(e.block(),e.local(c),a?e.i52_const(-1):e.i32_const(-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),e.local(i),e.appendU8(a?66:65),e.appendBoundaryValue(a?64:32,-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),Ba(e,t,13),e.endBlock());break}case 369:case 371:case 373:case 375:Ps(e,vs(t,2),r),e.local(i,34),Ps(e,vs(t,3),o),e.local(c,34),e.i32_const(n),e.callImport(371===n||375===n?"ckovr_u4":"ckovr_i4"),e.block(64,4),Ba(e,t,13),e.endBlock(),l=!0}return e.local("pLocals"),l?(e.local(i),e.local(c)):(Ps(e,vs(t,2),r),Ps(e,vs(t,3),o)),e.appendU8(s[0]),zs(e,vs(t,1),a),!0}function Qs(e,t,n){const r=cs[n];if(!r)return!1;const o=r[1],a=r[2];switch((n<479||n>514)&&e.local("pLocals"),n){case 435:case 437:Ps(e,vs(t,2),o),e.i32_const(1);break;case 439:e.i32_const(0),Ps(e,vs(t,2),o);break;case 443:Ps(e,vs(t,2),o),e.i32_const(-1);break;case 451:case 452:Ps(e,vs(t,2),o),41===o&&e.appendU8(167),e.i32_const(255);break;case 459:case 460:Ps(e,vs(t,2),o),41===o&&e.appendU8(167),e.i32_const(65535);break;case 447:case 448:Ps(e,vs(t,2),o),41===o&&e.appendU8(167),e.i32_const(24),e.appendU8(116),e.i32_const(24);break;case 455:case 456:Ps(e,vs(t,2),o),41===o&&e.appendU8(167),e.i32_const(16),e.appendU8(116),e.i32_const(16);break;case 436:case 438:Ps(e,vs(t,2),o),e.i52_const(1);break;case 440:e.i52_const(0),Ps(e,vs(t,2),o);break;case 444:Ps(e,vs(t,2),o),e.i52_const(-1);break;case 518:case 522:case 526:case 528:case 524:case 628:case 630:Ps(e,vs(t,2),o),e.i32_const(Es(t,3));break;case 519:case 523:case 527:case 529:case 525:case 629:case 631:Ps(e,vs(t,2),o),e.i52_const(Es(t,3));break;default:Ps(e,vs(t,2),o)}return 1!==r[0]&&e.appendU8(r[0]),zs(e,vs(t,1),a),!0}function ei(e,t,n,r){const o=141===r?t+6:t+8,a=As(n,se(o-2));e.local("pLocals"),e.ptr_const(o),e.appendU8(54),e.appendMemarg(a,0),e.callHandlerReturnAddresses.push(o)}function ti(e,t,n,r,o){const a=r>=235&&r<=278;switch(r){case 140:case 141:case 136:case 137:{const a=140===r||141===r,s=t+2*(o=136===r||140===r?Us(t,1):Es(t,1));return o<=0?e.backBranchOffsets.indexOf(s)>=0?(a&&ei(e,t,n,r),e.cfg.branch(s,!0,0),$a.backBranchesEmitted++,!0):(s1&&ut(`${Sa(r)} target 0x${s.toString(16)} before start of trace`):e.cfg.trace>0&&ut(`0x${t.toString(16)} ${Sa(r)} target 0x${s.toString(16)} not found in list `+e.backBranchOffsets.map((e=>"0x"+e.toString(16))).join(", ")),St.mono_jiterp_boost_back_branch_target(s),Ba(e,s,5),$a.backBranchesNotEmitted++,!0):(e.branchTargets.add(s),a&&ei(e,t,n,r),e.cfg.branch(s,!1,0),!0)}case 153:case 151:case 237:case 235:case 154:case 152:{const n=154===r||152===r;o=Es(t,2),Ps(e,vs(t,1),n?41:40),151===r||235===r?e.appendU8(69):152===r?e.appendU8(80):154===r&&(e.appendU8(80),e.appendU8(69));break}default:if(void 0===ps[r])throw new Error(`Unsupported relop branch opcode: ${Sa(r)}`);if(4!==St.mono_jiterp_get_opcode_info(r,1))throw new Error(`Unsupported long branch opcode: ${Sa(r)}`)}if(!o)throw new Error("Branch had no displacement");const s=t+2*o;return o<0?e.backBranchOffsets.indexOf(s)>=0?(e.cfg.branch(s,!0,a?3:1),$a.backBranchesEmitted++):(s1&&ut(`${Sa(r)} target 0x${s.toString(16)} before start of trace`):e.cfg.trace>0&&ut(`0x${t.toString(16)} ${Sa(r)} target 0x${s.toString(16)} not found in list `+e.backBranchOffsets.map((e=>"0x"+e.toString(16))).join(", ")),St.mono_jiterp_boost_back_branch_target(s),e.block(64,4),Ba(e,s,5),e.endBlock(),$a.backBranchesNotEmitted++):(e.branchTargets.add(s),e.cfg.branch(s,!1,a?3:1)),!0}function ni(e,t,n,r){const o=ps[r];if(!o)return!1;const a=Array.isArray(o)?o[0]:o,s=us[a],i=ls[a];if(!s&&!i)return!1;const c=Es(t,3),l=s?s[1]:1===i?43:42;return Ps(e,vs(t,1),l),s||1===i||e.appendU8(i),Array.isArray(o)&&o[1]?(e.appendU8(o[1]),e.appendLeb(Es(t,2))):Ps(e,vs(t,2),l),s||1==i||e.appendU8(i),s?e.appendU8(s[0]):(e.i32_const(a),e.callImport("relop_fp")),ti(e,t,n,r,c)}function ri(e,t,n){let r,o,a,s;const i=vs(t,1),c=vs(t,2),l=vs(t,3),u=ds[n];if(!u)return!1;if(r=u[0],o=u[1],"string"==typeof u[2]?a=u[2]:s=u[2],e.local("pLocals"),r){if(Ps(e,c,o?42:43),s)e.appendU8(s);else{if(!a)throw new Error("internal error");e.callImport(a)}return zs(e,i,o?56:57),!0}if(Ps(e,c,o?42:43),Ps(e,l,o?42:43),s)e.appendU8(s);else{if(!a)throw new Error("internal error");e.callImport(a)}return zs(e,i,o?56:57),!0}function oi(e,t,n){const r=n>=95&&n<=120,o=n>=115&&n<=120,a=n>=103&&n<=114||n>=128&&n<=135||o,s=n>=109&&n<=114||n>=132&&n<=135||o;let i,c,l=-1,u=0,p=1;o?(i=vs(t,1),c=vs(t,2),l=vs(t,3),u=Es(t,4),p=Es(t,5)):a?s?r?(i=vs(t,1),c=vs(t,2),u=Es(t,3)):(i=vs(t,2),c=vs(t,1),u=Es(t,3)):r?(i=vs(t,1),c=vs(t,2),l=vs(t,3)):(i=vs(t,3),c=vs(t,1),l=vs(t,2)):r?(c=vs(t,2),i=vs(t,1)):(c=vs(t,1),i=vs(t,2));let d,_=54;switch(n){case 95:case 103:case 109:case 115:d=44;break;case 96:case 104:case 110:case 116:d=45;break;case 97:case 105:case 111:case 117:d=46;break;case 98:case 106:case 112:case 118:d=47;break;case 121:case 128:case 132:d=40,_=58;break;case 122:case 129:case 133:d=40,_=59;break;case 99:case 107:case 113:case 119:case 123:case 130:case 134:case 127:d=40;break;case 101:case 125:d=42,_=56;break;case 102:case 126:d=43,_=57;break;case 100:case 108:case 114:case 120:case 124:case 131:case 135:d=41,_=55;break;default:return!1}return qs(e,c,t,!1),r?(e.local("pLocals"),e.local("cknull_ptr"),o?(Ps(e,l,40),0!==u&&(e.i32_const(u),e.appendU8(106),u=0),1!==p&&(e.i32_const(p),e.appendU8(108)),e.appendU8(106)):a&&l>=0?(Ps(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),e.appendU8(d),e.appendMemarg(u,0),zs(e,i,_)):127===n?(e.local("cknull_ptr"),Vs(e,i,0),e.callImport("copy_ptr")):(e.local("cknull_ptr"),a&&l>=0?(Ps(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),Ps(e,i,d),e.appendU8(_),e.appendMemarg(u,0)),!0}function ai(e,t,n,r,o){e.block(),Ps(e,r,40),e.local("index",34);let a="cknull_ptr";e.options.zeroPageOptimization&&Qa()?($a.nullChecksFused++,Ps(e,n,40),a="src_ptr",e.local(a,34)):qs(e,n,t,!0),e.appendU8(40),e.appendMemarg(qa(9),2),e.appendU8(73),e.appendU8(13),e.appendULeb(0),Ba(e,t,9),e.endBlock(),e.local(a),e.i32_const(qa(1)),e.appendU8(106),e.local("index"),1!=o&&(e.i32_const(o),e.appendU8(108)),e.appendU8(106)}function si(e,t,n,r){const o=r<=336&&r>=323||348===r,a=vs(n,o?2:1),s=vs(n,o?1:3),i=vs(n,o?3:2);let c,l,u=54;switch(r){case 348:return e.local("pLocals"),qs(e,a,n,!0),e.appendU8(40),e.appendMemarg(qa(9),2),zs(e,s,54),!0;case 334:return e.local("pLocals"),l=vs(n,4),ai(e,n,a,i,l),zs(e,s,54),!0;case 345:return e.block(),Ps(e,vs(n,1),40),Ps(e,vs(n,2),40),Ps(e,vs(n,3),40),e.callImport("stelem_ref"),e.appendU8(13),e.appendULeb(0),Ba(e,n,10),e.endBlock(),!0;case 332:case 328:case 327:case 341:l=4,c=40;break;case 323:l=1,c=44;break;case 324:l=1,c=45;break;case 338:case 337:l=1,c=40,u=58;break;case 325:l=2,c=46;break;case 326:l=2,c=47;break;case 340:case 339:l=2,c=40,u=59;break;case 330:case 343:l=4,c=42,u=56;break;case 329:case 342:l=8,c=41,u=55;break;case 331:case 344:l=8,c=43,u=57;break;case 333:{const t=vs(n,4);return e.local("pLocals"),e.i32_const(vs(n,1)),e.appendU8(106),ai(e,n,a,i,t),Wa(e,t),Os(vs(n,1),t),!0}case 346:{const r=vs(n,5),o=xs(t,vs(n,4));return ai(e,n,a,i,r),Vs(e,s,0),e.ptr_const(o),e.callImport("value_copy"),!0}case 347:{const t=vs(n,5);return ai(e,n,a,i,t),Vs(e,s,0),Wa(e,t),!0}default:return!1}return o?(e.local("pLocals"),ai(e,n,a,i,l),e.appendU8(c),e.appendMemarg(0,0),zs(e,s,u)):(ai(e,n,a,i,l),Ps(e,s,c),e.appendU8(u),e.appendMemarg(0,0)),!0}function ii(){if(void 0!==$s)return $s;try{const e=function(){const e=new Ta(0);e.defineType("test",{},64,!0),e.defineFunction({type:"test",name:"test",export:!0,locals:{}},(()=>{e.i32_const(0),e.appendSimd(17),e.appendU8(26),e.appendU8(11)})),e.appendU32(1836278016),e.appendU32(1),e.generateTypeSection(),e.emitImportsAndFunctions(!1);const t=e.getArrayView();return new WebAssembly.Module(t)}();$s=!!e}catch(e){ut("Disabling WASM SIMD support due to JIT failure",e),$s=!1}return $s}function ci(e,t,n){const r=`${t}_${n.toString(16)}`;return"object"!=typeof e.importedFunctions[r]&&e.defineImportedFunction("s",r,t,!1,n),r}function li(e,t,n,r,o,a){if(e.options.enableSimd&&ii())switch(o){case 2:if(function(e,t,n){const r=St.mono_jiterp_get_simd_opcode(1,n);if(r>=0)return ys.has(n)?(e.local("pLocals"),Ps(e,vs(t,2),40),e.appendSimd(r,!0),e.appendMemarg(0,0),ui(e,t)):(pi(e,t),e.appendSimd(r),ui(e,t)),!0;const o=Ss[n];if(o)return pi(e,t),e.appendSimd(o),zs(e,vs(t,1),54),!0;switch(n){case 6:case 7:case 8:case 9:{const r=ks[n];return e.local("pLocals"),e.v128_const(0),Ps(e,vs(t,2),r[0]),e.appendSimd(r[1]),e.appendU8(0),zs(e,vs(t,1),253,11),!0}case 14:return pi(e,t,7),ui(e,t),!0;case 15:return pi(e,t,8),ui(e,t),!0;case 16:return pi(e,t,9),ui(e,t),!0;case 17:return pi(e,t,10),ui(e,t),!0;default:return!1}}(e,t,a))return!0;break;case 3:if(function(e,t,n){const r=St.mono_jiterp_get_simd_opcode(2,n);if(r>=0){const o=hs.has(n),a=bs[n];if(o)e.local("pLocals"),Ps(e,vs(t,2),253,0),Ps(e,vs(t,3),40),e.appendSimd(r),ui(e,t);else if(Array.isArray(a)){const n=Ls(e,vs(t,3)),o=a[0];if("number"!=typeof n)return dt(`${e.functions[0].name}: Non-constant lane index passed to ExtractScalar`),!1;if(n>=o||n<0)return dt(`${e.functions[0].name}: ExtractScalar index ${n} out of range (0 - ${o-1})`),!1;e.local("pLocals"),Ps(e,vs(t,2),253,0),e.appendSimd(r),e.appendU8(n),zs(e,vs(t,1),a[1])}else di(e,t),e.appendSimd(r),ui(e,t);return!0}switch(n){case 187:return Ps(e,vs(t,2),40),Ps(e,vs(t,3),253,0),e.appendSimd(11),e.appendMemarg(0,0),!0;case 10:case 11:return di(e,t),e.appendSimd(214),e.appendSimd(195),11===n&&e.appendU8(69),zs(e,vs(t,1),54),!0;case 12:case 13:{const r=13===n,o=r?71:65;return e.local("pLocals"),Ps(e,vs(t,2),253,0),e.local("math_lhs128",34),Ps(e,vs(t,3),253,0),e.local("math_rhs128",34),e.appendSimd(o),e.local("math_lhs128"),e.local("math_lhs128"),e.appendSimd(o),e.local("math_rhs128"),e.local("math_rhs128"),e.appendSimd(o),e.appendSimd(80),e.appendSimd(77),e.appendSimd(80),e.appendSimd(r?195:163),zs(e,vs(t,1),54),!0}case 43:{const n=vs(t,3),r=Ls(e,n);return e.local("pLocals"),Ps(e,vs(t,2),253,0),"object"==typeof r?(e.appendSimd(12),e.appendBytes(r)):Ps(e,n,253,0),e.appendSimd(14),ui(e,t),!0}case 44:case 45:return function(e,t,n){const r=16/n,o=vs(t,3),a=Ls(e,o);if(2!==r&&4!==r&&w(!1,"Unsupported shuffle element size"),e.local("pLocals"),Ps(e,vs(t,2),253,0),"object"==typeof a){const t=new Uint8Array(Ui),o=2===r?new Uint16Array(a.buffer,a.byteOffset,n):new Uint32Array(a.buffer,a.byteOffset,n);for(let e=0,a=0;e=0){const o=gs[n],a=ws[n];if(Array.isArray(o)){const n=o[0],a=Ls(e,vs(t,3));if("number"!=typeof a)return dt(`${e.functions[0].name}: Non-constant lane index passed to ReplaceScalar`),!1;if(a>=n||a<0)return dt(`${e.functions[0].name}: ReplaceScalar index ${a} out of range (0 - ${n-1})`),!1;e.local("pLocals"),Ps(e,vs(t,2),253,0),Ps(e,vs(t,4),o[1]),e.appendSimd(r),e.appendU8(a),ui(e,t)}else if(Array.isArray(a)){const n=a[0],o=Ls(e,vs(t,4));if("number"!=typeof o)return dt(`${e.functions[0].name}: Non-constant lane index passed to store method`),!1;if(o>=n||o<0)return dt(`${e.functions[0].name}: Store lane ${o} out of range (0 - ${n-1})`),!1;Ps(e,vs(t,2),40),Ps(e,vs(t,3),253,0),e.appendSimd(r),e.appendMemarg(0,0),e.appendU8(o)}else!function(e,t){e.local("pLocals"),Ps(e,vs(t,2),253,0),Ps(e,vs(t,3),253,0),Ps(e,vs(t,4),253,0)}(e,t),e.appendSimd(r),ui(e,t);return!0}switch(n){case 0:return e.local("pLocals"),Ps(e,vs(t,3),253,0),Ps(e,vs(t,4),253,0),Ps(e,vs(t,2),253,0),e.appendSimd(82),ui(e,t),!0;case 7:{const n=Ls(e,vs(t,4));if("object"!=typeof n)return dt(`${e.functions[0].name}: Non-constant indices passed to PackedSimd.Shuffle`),!1;for(let t=0;t<32;t++){const r=n[t];if(r<0||r>31)return dt(`${e.functions[0].name}: Shuffle lane index #${t} (${r}) out of range (0 - 31)`),!1}return e.local("pLocals"),Ps(e,vs(t,2),253,0),Ps(e,vs(t,3),253,0),e.appendSimd(13),e.appendBytes(n),ui(e,t),!0}default:return!1}}(e,t,a))return!0}switch(n){case 640:if(e.options.enableSimd&&ii()){e.local("pLocals");const n=Ee().slice(t+4,t+4+Ui);e.v128_const(n),ui(e,t),Rs.set(vs(t,1),n)}else Vs(e,vs(t,1),Ui),e.ptr_const(t+4),Wa(e,Ui);return!0;case 641:case 642:case 643:case 644:{const r=_s[n],o=Ui/r,a=vs(t,1),s=vs(t,2),i=fs[n],c=ms[n];for(let t=0;t0&&(xi.push(["trace_eip","trace_eip",Ni]),xi.push(["trace_args","trace_eip",Di]));const e=(e,t)=>{for(let n=0;n>>0,fi.operand2=t>>>0}function Bi(e,t,n,r){if("number"==typeof r)St.mono_jiterp_adjust_abort_count(r,1),r=Sa(r);else{let e=ki[r];"number"!=typeof e?e=1:e++,ki[r]=e}vi[e].abortReason=r}function Oi(e,t){if(!l.runtimeReady)return;if(mi&&void 0===e||(mi=os()),!mi.enableStats&&void 0!==e)return;const n=$a.backBranchesEmitted/($a.backBranchesEmitted+$a.backBranchesNotEmitted)*100,r=St.mono_jiterp_get_rejected_trace_count(),o=mi.eliminateNullChecks?$a.nullChecksEliminated.toString():"off",a=mi.zeroPageOptimization?$a.nullChecksFused.toString()+(Qa()?"":" (disabled)"):"off",s=mi.enableBackwardBranches?`emitted: ${$a.backBranchesEmitted}, failed: ${$a.backBranchesNotEmitted} (${n.toFixed(1)}%)`:": off",i=$a.jitCallsCompiled?mi.directJitCalls?`direct jit calls: ${$a.directJitCallsCompiled} (${($a.directJitCallsCompiled/$a.jitCallsCompiled*100).toFixed(1)}%)`:"direct jit calls: off":"";if(ut(`// jitted ${$a.bytesGenerated} bytes; ${$a.tracesCompiled} traces (${($a.tracesCompiled/$a.traceCandidates*100).toFixed(1)}%) (${r} rejected); ${$a.jitCallsCompiled} jit_calls; ${$a.entryWrappersCompiled} interp_entries`),ut(`// cknulls eliminated: ${o}, fused: ${a}; back-branches ${s}; ${i}`),ut(`// time: ${0|Ca.generation}ms generating, ${0|Ca.compilation}ms compiling wasm.`),!t){if(mi.countBailouts){const e=Object.values(vi);e.sort(((e,t)=>(t.bailoutCount||0)-(e.bailoutCount||0)));for(let e=0;et.hitCount-e.hitCount)),ut("// hottest failed traces:");for(let e=0,n=0;e=0)){if(t[e].abortReason){if(t[e].abortReason.startsWith("mono_icall_")||t[e].abortReason.startsWith("ret."))continue;switch(t[e].abortReason){case"trace-too-small":case"trace-too-big":case"call":case"callvirt.fast":case"calli.nat.fast":case"calli.nat":case"call.delegate":case"newobj":case"newobj_vt":case"newobj_slow":case"switch":case"rethrow":case"end-of-body":case"ret":case"intrins_marvin_block":case"intrins_ascii_chars_to_uppercase":continue}}n++,ut(`${t[e].name} @${t[e].ip} (${t[e].hitCount} hits) ${t[e].abortReason}`)}const n=[];for(const t in e)n.push([t,e[t]]);n.sort(((e,t)=>t[1]-e[1])),ut("// heat:");for(let e=0;e0?ki[t]=n:delete ki[t]}const e=Object.keys(ki);e.sort(((e,t)=>ki[t]-ki[e]));for(let t=0;tOi(e)),15e3)}}let Mi=!1;function Fi(){if(Mi)throw new Error("GC is already locked");Mi=!0}function Pi(){if(!Mi)throw new Error("GC is not locked");Mi=!1}async function zi(e){const t=u.config.resources.lazyAssembly;if(!t)throw new Error("No assemblies have been marked as lazy-loadable. Use the 'BlazorWebAssemblyLazyLoad' item group in your project file to enable lazy loading an assembly.");if(!t[e])throw new Error(`${e} must be marked with 'BlazorWebAssemblyLazyLoad' item group in your project file to allow lazy-loading.`);const n={name:e,hash:t[e],behavior:"assembly"};if(u.loadedAssemblies.some((t=>t.includes(e))))return!1;const r=function(e,t){const n=e.lastIndexOf(".");if(n<0)throw new Error(`No extension to replace in '${e}'`);return e.substring(0,n)+".pdb"}(n.name),o=u.hasDebuggingEnabled(u.config)&&Object.prototype.hasOwnProperty.call(t,r),a=u.retrieve_asset_download(n);let s=null,i=null;if(o){const e=t[r]?u.retrieve_asset_download({name:r,hash:t[r],behavior:"pdb"}):Promise.resolve(null),[n,o]=await Promise.all([a,e]);s=new Uint8Array(n),i=o?new Uint8Array(o):null}else{const e=await a;s=new Uint8Array(e),i=null}return l.javaScriptExports.load_lazy_assembly(s,i),!0}async function Vi(e){const t=u.config.resources.satelliteResources;t&&await Promise.all(e.filter((e=>Object.prototype.hasOwnProperty.call(t,e))).map((e=>{const n=[];for(const r in t[e]){const o={name:r,hash:t[e][r],behavior:"resource",culture:e};n.push(u.retrieve_asset_download(o))}return n})).reduce(((e,t)=>e.concat(t)),new Array).map((async e=>{const t=await e;l.javaScriptExports.load_satellite_assembly(new Uint8Array(t))})))}const Wi=64;let Hi,Gi,qi,Ji=0;const Yi=[],Xi={};function Zi(){return Gi||(Gi=[Za("interp_entry_prologue",Ja("mono_jiterp_interp_entry_prologue")),Za("interp_entry",Ja("mono_jiterp_interp_entry")),Za("unbox",Ja("mono_jiterp_object_unbox")),Za("stackval_from_data",Ja("mono_jiterp_stackval_from_data"))],Gi)}let Ki;function Qi(){if(Yi.length<=0)return;const e=4*Yi.length+1;let t=Hi;if(t?t.clear(e):(Hi=t=new Ta(e),t.defineType("unbox",{pMonoObject:127},127,!0),t.defineType("interp_entry_prologue",{pData:127,this_arg:127},127,!0),t.defineType("interp_entry",{pData:127,res:127},64,!0),t.defineType("stackval_from_data",{type:127,result:127,value:127},64,!0)),t.options.wasmBytesLimit<=$a.bytesGenerated)return void(Yi.length=0);const n=Na();let r=0,o=!0,a=!1;try{t.appendU32(1836278016),t.appendU32(1);for(let e=0;ehc[St.mono_jiterp_type_to_ldind(e)])),this.enableDirect=os().directJitCalls&&!this.noWrapper&&this.wasmNativeReturnType&&(0===this.wasmNativeSignature.length||this.wasmNativeSignature.every((e=>e))),this.enableDirect&&(this.target=this.addr);let i=this.target.toString(16);const c=ic++;this.name=`${this.enableDirect?"jcp":"jcw"}_${i}_${c.toString(16)}`}}function dc(e){let t=cc[e];return t||(e>=cc.length&&(cc.length=e+1),ac||(ac=Ma()),cc[e]=t=ac.get(e)),t}let _c;function fc(){if(void 0!==sc)return sc;try{_c=function(){const e=new Ta(0);e.defineType("jit_call_cb",{cb_data:127},64,!0),e.defineType("do_jit_call",{unused:127,cb_data:127,thrown:127},64,!0),e.defineImportedFunction("i","jit_call_cb","jit_call_cb",!0),e.defineFunction({type:"do_jit_call",name:"do_jit_call_indirect",export:!0,locals:{}},(()=>{e.block(64,6),e.local("cb_data"),e.callImport("jit_call_cb"),e.appendU8(25),e.local("thrown"),e.i32_const(1),e.appendU8(54),e.appendMemarg(0,0),e.endBlock(),e.appendU8(11)})),e.appendU32(1836278016),e.appendU32(1),e.generateTypeSection(),e.emitImportsAndFunctions(!1);const t=e.getArrayView();return new WebAssembly.Module(t)}(),sc=!0}catch(e){ut("Disabling WASM EH support due to JIT failure",e),sc=!1}return sc}function mc(){if(0===uc.length)return;let e=oc;if(e?e.clear(0):(oc=e=new Ta(0),e.defineType("trampoline",{ret_sp:127,sp:127,ftndesc:127,thrown:127},64,!0)),e.options.wasmBytesLimit<=$a.bytesGenerated)return void(uc.length=0);e.options.enableWasmEh&&(fc()||(rs({enableWasmEh:!1}),e.options.enableWasmEh=!1));const t=Na();let n=0,r=!0,o=!1;const a=[];try{ac||(ac=Ma()),e.appendU32(1836278016),e.appendU32(1);for(let t=0;t0?t[0]:void 0}catch(t){throw new Error(`Get culture info failed for culture = ${e} with error: ${t}`)}}const jc="MMMM",Rc="yyyy",Lc="d";function Cc(e,t,n,r){let o=n;const a=t.indexOf(n);if(-1==a||-1!=a&&t.length>a+n.length&&" "!=t[a+n.length]&&","!=t[a+n.length]&&"،"!=t[a+n.length]){const a=r.format(e).toLowerCase();o=t.split(/,| /).filter((e=>!a.split(/,| /).includes(e)&&e[0]==n[0]))[0]}return o}async function $c(e,t){try{const n=await Nc(e,t);return u.mono_exit(n),n}catch(e){try{u.mono_exit(1,e)}catch(e){}return e&&"number"==typeof e.status?e.status:1}}async function Nc(e,n){!function(e,n){const r=n.length+1,o=t._malloc(4*r);let a=0;t.setValue(o+4*a,St.mono_wasm_strdup(e),"i32"),a+=1;for(let e=0;e{const t=setInterval((()=>{1==l.waitForDebugger&&(clearInterval(t),e())}),100)})));const r=Dc(e);return l.javaScriptExports.call_entry_point(r,n)}function Dc(e){u.assert_runtime_running(),fr();const t=wr(e);if(!t)throw new Error("Could not find assembly: "+e);let n=0;1==l.waitForDebugger&&(n=1);const r=St.mono_wasm_assembly_get_entry_point(t,n);if(!r)throw new Error("Could not find entry point for assembly: "+e);return r}let Bc,Oc;const Mc={},Fc=Symbol.for("wasm type");function Pc(e){return"undefined"!=typeof SharedArrayBuffer?e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer:e.buffer instanceof ArrayBuffer}function zc(e,t,n){switch(!0){case null===t:case void 0===t:return void n.clear();case"symbol"==typeof t:case"string"==typeof t:return void sl._create_uri_ref(t,n.address);default:return void Hc(e,t,n)}}function Vc(e){ol();const t=Be();try{return Wc(e,t,!1),t.value}finally{t.release()}}function Wc(e,t,n){if(ol(),j(t))throw new Error("Expected (value, WasmRoot, boolean)");switch(!0){case null===e:case void 0===e:return void t.clear();case"number"==typeof e:{let n;return(0|e)===e?(X(Mc._box_buffer,e),n=Mc._class_int32):e>>>0===e?(G(Mc._box_buffer,e),n=Mc._class_uint32):(re(Mc._box_buffer,e),n=Mc._class_double),void kt.mono_wasm_box_primitive_ref(n,Mc._box_buffer,8,t.address)}case"string"==typeof e:return void ot(e,t);case"symbol"==typeof e:return void at(e,t);case"boolean"==typeof e:return z(Mc._box_buffer,e),void kt.mono_wasm_box_primitive_ref(Mc._class_boolean,Mc._box_buffer,4,t.address);case!0===Hr(e):return void function(e,t){if(!e)return t.clear(),null;const n=Dr(e),r=sl._create_tcs(),o={tcs_gc_handle:r};Or(o,r),e.then((e=>{sl._set_tcs_result_ref(r,e)}),(e=>{sl._set_tcs_failure(r,e?e.toString():"")})).finally((()=>{Br(n),Mr(o,r)})),sl._get_tcs_task_ref(r,t.address)}(e,t);case"Date"===e.constructor.name:return void sl._create_date_time_ref(e.getTime(),t.address);default:return void Hc(n,e,t)}}function Hc(e,t,n){if(n.clear(),null!=t)if(void 0===t[Lr]){if(t[Cr]&&(function(e,t,n){e!==T&&e!==I?sl._get_cs_owned_object_by_js_handle_ref(e,t?1:0,n):X(n,0)}(t[Cr],e,n.address),n.value||delete t[Cr]),!n.value){const r=t[Fc],o=void 0===r?0:r,a=Dr(t);sl._create_cs_owned_proxy_ref(a,o,e?1:0,n.address)}}else bl(Fr(t),n.address)}function Gc(e,n){if(!Pc(e)||!e.BYTES_PER_ELEMENT)throw new Error("Object '"+e+"' is not a typed array");{const r=e[Fc],o=function(e){ol();const n=e.length*e.BYTES_PER_ELEMENT,r=t._malloc(n),o=Ee(),a=new Uint8Array(o.buffer,r,n);return a.set(new Uint8Array(e.buffer,e.byteOffset,n)),a}(e);kt.mono_wasm_typed_array_new_ref(o.byteOffset,e.length,e.BYTES_PER_ELEMENT,r,n.address),t._free(o.byteOffset)}}function qc(e){const t=Be();try{return Gc(e,t),t.value}finally{t.release()}}function Jc(e){if("number"!=typeof e)throw new Error(`Expected numeric value for enum argument, got '${e}'`);return 0|e}const Yc=/[^A-Za-z0-9_$]/g,Xc=new Map,Zc=new Map,Kc=new Map;function Qc(e,t,n,r){let o=null,a=null,s=null;if(r){s=Object.keys(r),a=new Array(s.length);for(let e=0,t=s.length;e=512)throw new Error(`Got marshaling error ${t} when attempting to unbox object at address ${e.value} (root located at ${e.address})`);let r=v;if((4===t||7==t)&&(r=ie(n),r<1024))throw new Error(`Got invalid MonoType ${r} for object at address ${e.value} (root located at ${e.address})`);return function(e,t,n,r){switch(t){case 0:return null;case 26:case 27:throw new Error("int64 not available");case 3:case 29:return rt(e);case 4:throw new Error("no idea on how to unbox value types");case 5:return function(e){return e.value===S?null:function(e){let t=zr(e);if(t)Fr(t);else{t=function(...e){return Fr(t),(0,t[pl])(...e)};const n=Be();bl(e,n.address);try{if(void 0===t[pl]){const r=kt.mono_wasm_get_delegate_invoke_ref(n.address),o=el(r,rl(r,n),!0);if(t[pl]=o.bind({this_arg_gc_handle:e}),!t[pl])throw new Error("System.Delegate Invoke method can not be resolved.")}}finally{n.release()}Or(t,e)}return t}(sl._get_js_owned_object_gc_handle_ref(e.address))}(e);case 6:return function(e){if(e.value===S)return null;if(!Wr)throw new Error("Promises are not supported thus 'System.Threading.Tasks.Task' can not work in this context.");const t=sl._get_js_owned_object_gc_handle_ref(e.address);let n=zr(t);if(!n){const r=()=>Mr(n,t),{promise:o,promise_control:a}=y(r,r);n=o,sl._setup_js_cont_ref(e.address,a),Or(n,t)}return n}(e);case 7:return function(e){if(e.value===S)return null;const t=sl._try_get_cs_owned_object_js_handle_ref(e.address,0);if(t){if(t===I)throw new Error("Cannot access a disposed JSObject at "+e.value);return Nr(t)}const n=sl._get_js_owned_object_gc_handle_ref(e.address);let r=zr(n);return j(r)&&(r=new ManagedObject,Or(r,n)),r}(e);case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:throw new Error("Marshaling of primitive arrays are not supported.");case 20:return new Date(sl._get_date_value_ref(e.address));case 21:case 22:return sl._object_to_string_ref(e.address);case 23:return function(e){return Nr(sl._get_cs_owned_object_js_handle_ref(e.address,0))}(e);case 30:return;default:throw new Error(`no idea on how to unbox object of MarshalType ${t} at offset ${e.value} (root address is ${e.address})`)}}(e,t)}function fl(e){if(0===e.value)return;const t=Mc._unbox_buffer,n=kt.mono_wasm_try_unbox_primitive_and_get_type_ref(e.address,t,Mc._unbox_buffer_size);switch(n){case 1:return _e(t);case 25:case 32:return ie(t);case 24:return be(t);case 2:return ge(t);case 8:return 0!==_e(t);case 28:return String.fromCharCode(_e(t));case 0:return null;default:return _l(e,n,t)}}function ml(e){if(ol(),e===k)return null;const t=Be(e);try{return hl(t)}finally{t.release()}}function hl(e){if(e.value===k)return null;const t=e.address,n=Be(),r=n.address;try{const e=kt.mono_wasm_array_length_ref(t),a=new Array(e);for(let s=0;s0&&Array.isArray(e[0])&&(e[0]=function(e,t,n){const r=Be();kt.mono_wasm_string_array_new_ref(e.length,r.address);const o=Be(S),a=r.address,s=o.address;try{for(let t=0;tnew RegExp("^((?![0-9]).)*$").test(e)));return e&&0!=e.length?e.join(" "):""}return o}function El(e){try{return new Intl.Locale(e).weekInfo}catch(t){try{return new Intl.Locale(e).getWeekInfo()}catch(e){return}}}const Ul=[function(e){Po&&(globalThis.clearTimeout(Po),Po=void 0),Po=t.safeSetTimeout(mono_wasm_schedule_timer_tick,e)},function(e,t,n,r,o){if(!0!==l.mono_wasm_runtime_is_ready)return;const a=Ee(),s=0!==e?Qe(e).concat(".dll"):"",i=It(new Uint8Array(a.buffer,t,n));let c;r&&(c=It(new Uint8Array(a.buffer,r,o))),zt({eventName:"AssemblyLoaded",assembly_name:s,assembly_b64:i,pdb_b64:c})},function(e,t){const r=Qe(t);n.logging&&"function"==typeof n.logging.debugger&&n.logging.debugger(e,r)},function(e,t,n,r){const o={res_ok:e,res:{id:t,value:It(new Uint8Array(Ee().buffer,n,r))}};xt.has(t)&&pt(`Adding an id (${t}) that already exists in commands_received`),xt.set(t,o)},function mono_wasm_fire_debugger_agent_message_with_data(e,t){mono_wasm_fire_debugger_agent_message_with_data_to_pause(It(new Uint8Array(Ee().buffer,e,t)))},mono_wasm_fire_debugger_agent_message_with_data_to_pause,function(){++Vo,t.safeSetTimeout(Go,0)},function(e,n,r,o,a,s,i){if(r||w(!1,"expected instruction pointer"),mi||(mi=os()),!mi.enableTraces)return 1;if(mi.wasmBytesLimit<=$a.bytesGenerated)return 1;let c,u=vi[r];if(u||(vi[r]=u=new yi(r,o,i)),$a.traceCandidates++,mi.estimateHeat||bi.length>0||u.isVerbose){const e=St.mono_wasm_method_get_full_name(n);c=Qe(e),t._free(e)}const p=Qe(St.mono_wasm_method_get_name(n));u.name=c||p;const d=ue(qa(4)+e),_=ue(qa(11)+d),f=ue(qa(10)+d);let m=_?new Uint16Array(Ee().buffer,f,_):null;if(m&&r!==a){const e=(r-a)/2;let t=!1;for(let n=0;ne){t=!0;break}t||(m=null)}const h=function(e,t,n,r,o,a,s){let i=Ti;i?i.clear(8):(Ti=i=new Ta(8),function(e){e.defineType("trace",{frame:127,pLocals:127,cinfo:127},127,!0),e.defineType("bailout",{retval:127,base:127,reason:127},127,!0),e.defineType("copy_ptr",{dest:127,src:127},64,!0),e.defineType("value_copy",{dest:127,src:127,klass:127},64,!0),e.defineType("entry",{imethod:127},127,!0),e.defineType("strlen",{ppString:127,pResult:127},127,!0),e.defineType("getchr",{ppString:127,pIndex:127,pResult:127},127,!0),e.defineType("getspan",{destination:127,span:127,index:127,element_size:127},127,!0),e.defineType("overflow_check_i4",{lhs:127,rhs:127,opcode:127},127,!0),e.defineType("mathop_d_d",{value:124},124,!0),e.defineType("mathop_dd_d",{lhs:124,rhs:124},124,!0),e.defineType("mathop_f_f",{value:125},125,!0),e.defineType("mathop_ff_f",{lhs:125,rhs:125},125,!0),e.defineType("fmaf",{x:125,y:125,z:125},125,!0),e.defineType("fma",{x:124,y:124,z:124},124,!0),e.defineType("trace_eip",{traceId:127,eip:127},64,!0),e.defineType("newobj_i",{ppDestination:127,vtable:127},127,!0),e.defineType("newstr",{ppDestination:127,length:127},127,!0),e.defineType("localloc",{destination:127,len:127,frame:127},64,!0),e.defineType("ld_del_ptr",{ppDestination:127,ppSource:127},64,!0),e.defineType("ldtsflda",{ppDestination:127,offset:127},64,!0),e.defineType("gettype",{destination:127,source:127},127,!0),e.defineType("castv2",{destination:127,source:127,klass:127,opcode:127},127,!0),e.defineType("hasparent",{klass:127,parent:127},127,!0),e.defineType("imp_iface",{vtable:127,klass:127},127,!0),e.defineType("imp_iface_s",{obj:127,vtable:127,klass:127},127,!0),e.defineType("box",{vtable:127,destination:127,source:127,vt:127},64,!0),e.defineType("conv",{destination:127,source:127,opcode:127},127,!0),e.defineType("relop_fp",{lhs:124,rhs:124,opcode:127},127,!0),e.defineType("safepoint",{frame:127,ip:127},64,!0),e.defineType("hashcode",{ppObj:127},127,!0),e.defineType("try_hash",{ppObj:127},127,!0),e.defineType("hascsize",{ppObj:127},127,!0),e.defineType("hasflag",{klass:127,dest:127,sp1:127,sp2:127},64,!0),e.defineType("array_rank",{destination:127,source:127},127,!0),e.defineType("stfld_o",{locals:127,fieldOffsetBytes:127,targetLocalOffsetBytes:127,sourceLocalOffsetBytes:127},127,!0),e.defineType("notnull",{ptr:127,expected:127,traceIp:127,ip:127},64,!0),e.defineType("cmpxchg_i32",{dest:127,newVal:127,expected:127},127,!0),e.defineType("cmpxchg_i64",{dest:127,newVal:127,expected:127,oldVal:127},64,!0),e.defineType("transfer",{displacement:127,trace:127,frame:127,locals:127,cinfo:127},127,!0),e.defineType("stelem_ref",{o:127,aindex:127,ref:127},127,!0),e.defineType("simd_p_p",{arg0:127,arg1:127},64,!0),e.defineType("simd_p_pp",{arg0:127,arg1:127,arg2:127},64,!0),e.defineType("simd_p_ppp",{arg0:127,arg1:127,arg2:127,arg3:127},64,!0);const t=$i();for(let n=0;na.indexOf(e)>=0))>=0;h&&!a&&w(!1,"Expected methodFullName if trace is instrumented");const b=h?Si++:0;h&&(ut(`instrumenting: ${a}`),wi[b]=new gi(a)),i.compressImportNames=!h;try{i.appendU32(1836278016),i.appendU32(1),i.generateTypeSection();const t={disp:127,cknull_ptr:127,dest_ptr:127,src_ptr:127,memop_dest:127,memop_src:127,index:127,count:127,math_lhs32:127,math_rhs32:127,math_lhs64:126,math_rhs64:126,temp_f32:125,temp_f64:124,backbranched:127};i.options.enableSimd&&(t.v128_zero=123,t.math_lhs128=123,t.math_rhs128=123);let o=!0,a=0;if(i.defineFunction({type:"trace",name:u,export:!0,locals:t},(()=>{if(i.base=n,i.frame=e,662!==se(n))throw new Error(`Expected *ip to be MINT_TIER_PREPARE_JITERPRETER but was ${se(n)}`);return i.cfg.initialize(r,s,h?1:0),a=function(e,t,n,r,o,a,s,i){let c=!0,l=!1,u=!0,p=!1,d=!1,_=!1,f=0,m=0,h=0;const b=n;Ds();let g=n+=2*St.mono_jiterp_get_opcode_info(664,1);for(a.cfg.entry(n);n&&n;){if(a.cfg.ip=n,n>=o){Bi(b,0,0,"end-of-body"),s&&ut(`instrumented trace ${t} exited at end of body @${n.toString(16)}`);break}const y=3840-a.bytesGeneratedSoFar-a.cfg.overheadBytes;if(a.size>=y){Bi(b,0,0,"trace-too-big"),s&&ut(`instrumented trace ${t} exited because of size limit at @${n.toString(16)} (spaceLeft=${y}b)`);break}let S=se(n);const k=St.mono_jiterp_get_opcode_info(S,2),v=St.mono_jiterp_get_opcode_info(S,3),E=St.mono_jiterp_get_opcode_info(S,1),U=S>=645&&S<=647,I=U?S-645+2:0,T=U?vs(n,1+I):0;S>=0&&S<673||w(!1,`invalid opcode ${S}`);const x=U?as[I][T]:Sa(S),A=n,j=a.options.noExitBackwardBranches&&js(n,r,i),R=a.branchTargets.has(n),L=j||R||c&&i,C=h+m+a.branchTargets.size;let $=!1,N=Xa(S);switch(j&&a.backBranchOffsets.push(n),L&&(d=!1,_=!1,Ms(a,n,j),l=!0,u=!0,Ds(),h=0),N<-1&&l&&(N=-2===N?2:0),c=!1,279===S||(hi.indexOf(S)>=0?(Ba(a,n,23),S=666):d&&(S=666)),S){case 666:d&&(_||a.appendU8(0),_=!0);break;case 321:case 322:Ws(a,vs(n,1),0,vs(n,2));break;case 320:Vs(a,vs(n,1)),Ps(a,vs(n,2),40),a.local("frame"),a.callImport("localloc");break;case 294:Ps(a,vs(n,1),40),za(a,0,vs(n,2));break;case 318:{const e=vs(n,3),t=vs(n,2),r=vs(n,1),o=Ls(a,e);0!==o&&("number"!=typeof o?(Ps(a,e,40),a.local("count",34),a.block(64,4)):(a.i32_const(o),a.local("count",33)),Ps(a,r,40),a.local("dest_ptr",34),a.appendU8(69),Ps(a,t,40),a.local("src_ptr",34),a.appendU8(69),a.appendU8(114),a.block(64,4),Ba(a,n,2),a.endBlock(),"number"==typeof o&&Va(a,0,0,o,!1,"dest_ptr","src_ptr")||(a.local("dest_ptr"),a.local("src_ptr"),a.local("count"),a.appendU8(252),a.appendU8(10),a.appendU8(0),a.appendU8(0)),"number"!=typeof o&&a.endBlock());break}case 319:{const e=vs(n,3),t=vs(n,2);qs(a,vs(n,1),n,!0),Ps(a,t,40),Ps(a,e,40),a.appendU8(252),a.appendU8(11),a.appendU8(0);break}case 151:case 153:case 235:case 237:case 152:case 154:case 137:case 140:case 141:ti(a,n,e,S)?l=!0:n=0;break;case 537:{const e=vs(n,2),t=vs(n,1);e!==t?(a.local("pLocals"),qs(a,e,n,!0),zs(a,t,54)):qs(a,e,n,!1),a.allowNullCheckOptimization&&Cs.set(t,n),$=!0;break}case 626:case 627:{const t=ue(e+qa(4));a.ptr_const(t),a.callImport("entry"),a.block(64,4),Ba(a,n,1),a.endBlock();break}case 664:if(N=0,f>=a.options.minimumTraceValue&&!a.options.noExitBackwardBranches&&(!l||u)){const e=Is(n,1);a.ip_const(n),a.i32_const(e),a.local("frame"),a.local("pLocals"),a.local("cinfo"),a.callImport("transfer"),a.appendU8(15),n=0}break;case 146:Da(a,n);break;case 94:{a.local("pLocals");const e=vs(n,2);Gs(a,e)||dt(`${t}: Expected local ${e} to have address taken flag`),Vs(a,e),zs(a,vs(n,1),54);break}case 280:case 308:case 309:case 555:{a.local("pLocals");let t=xs(e,vs(n,2));308===S&&(t=St.mono_jiterp_imethod_to_ftnptr(t)),a.ptr_const(t),zs(a,vs(n,1),54);break}case 313:{const t=xs(e,vs(n,3));Ps(a,vs(n,1),40),Ps(a,vs(n,2),40),a.ptr_const(t),a.callImport("value_copy");break}case 314:{const e=vs(n,3);Ps(a,vs(n,1),40),Ps(a,vs(n,2),40),Wa(a,e);break}case 315:{const e=vs(n,3);Vs(a,vs(n,1),e),qs(a,vs(n,2),n,!0),Wa(a,e);break}case 316:{const t=xs(e,vs(n,3));Ps(a,vs(n,1),40),Vs(a,vs(n,2),0),a.ptr_const(t),a.callImport("value_copy");break}case 317:{const e=vs(n,3);Ps(a,vs(n,1),40),Vs(a,vs(n,2),0),Wa(a,e);break}case 539:a.local("pLocals"),qs(a,vs(n,2),n,!0),a.appendU8(40),a.appendMemarg(qa(2),2),zs(a,vs(n,1),54);break;case 538:{a.block(),Ps(a,vs(n,3),40),a.local("index",34);let e="cknull_ptr";a.options.zeroPageOptimization&&Qa()?($a.nullChecksFused++,Ps(a,vs(n,2),40),e="src_ptr",a.local(e,34)):qs(a,vs(n,2),n,!0),a.appendU8(40),a.appendMemarg(qa(2),2),a.appendU8(72),a.local("index"),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),Ba(a,n,11),a.endBlock(),a.local("pLocals"),a.local("index"),a.i32_const(2),a.appendU8(108),a.local(e),a.appendU8(106),a.appendU8(47),a.appendMemarg(qa(3),1),zs(a,vs(n,1),54);break}case 349:case 350:{const e=Es(n,4);a.block(),Ps(a,vs(n,3),40),a.local("index",34);let t="cknull_ptr";349===S?qs(a,vs(n,2),n,!0):(Vs(a,vs(n,2),0),t="src_ptr",a.local(t,34)),a.appendU8(40),a.appendMemarg(qa(7),2),a.appendU8(73),a.local("index"),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),Ba(a,n,18),a.endBlock(),a.local("pLocals"),a.local(t),a.appendU8(40),a.appendMemarg(qa(8),2),a.local("index"),a.i32_const(e),a.appendU8(108),a.appendU8(106),zs(a,vs(n,1),54);break}case 652:a.block(),Ps(a,vs(n,3),40),a.local("count",34),a.i32_const(0),a.appendU8(78),a.appendU8(13),a.appendULeb(0),Ba(a,n,18),a.endBlock(),Vs(a,vs(n,1),16),a.local("dest_ptr",34),Ps(a,vs(n,2),40),a.appendU8(54),a.appendMemarg(0,0),a.local("dest_ptr"),a.local("count"),a.appendU8(54),a.appendMemarg(4,0);break;case 567:Vs(a,vs(n,1),8),Vs(a,vs(n,2),8),a.callImport("ld_del_ptr");break;case 81:Vs(a,vs(n,1),4),a.ptr_const(Us(n,2)),a.callImport("ldtsflda");break;case 651:a.block(),Vs(a,vs(n,1),4),Vs(a,vs(n,2),0),a.callImport("gettype"),a.appendU8(13),a.appendULeb(0),Ba(a,n,2),a.endBlock();break;case 648:{const t=xs(e,vs(n,4));a.ptr_const(t),Vs(a,vs(n,1),4),Vs(a,vs(n,2),0),Vs(a,vs(n,3),0),a.callImport("hasflag");break}case 657:{const e=qa(1);a.local("pLocals"),qs(a,vs(n,2),n,!0),a.i32_const(e),a.appendU8(106),zs(a,vs(n,1),54);break}case 649:a.local("pLocals"),Vs(a,vs(n,2),0),a.callImport("hashcode"),zs(a,vs(n,1),54);break;case 650:a.local("pLocals"),Vs(a,vs(n,2),0),a.callImport("try_hash"),zs(a,vs(n,1),54);break;case 653:a.local("pLocals"),Vs(a,vs(n,2),0),a.callImport("hascsize"),zs(a,vs(n,1),54);break;case 658:a.local("pLocals"),Ps(a,vs(n,2),40),a.local("math_lhs32",34),Ps(a,vs(n,3),40),a.appendU8(115),a.i32_const(2),a.appendU8(116),a.local("math_rhs32",33),a.local("math_lhs32"),a.i32_const(327685),a.appendU8(106),a.i32_const(10485920),a.appendU8(114),a.i32_const(1703962),a.appendU8(106),a.i32_const(-8388737),a.appendU8(114),a.local("math_rhs32"),a.appendU8(113),a.appendU8(69),zs(a,vs(n,1),54);break;case 540:case 541:a.block(),Vs(a,vs(n,1),4),Vs(a,vs(n,2),0),a.callImport(540===S?"array_rank":"a_elesize"),a.appendU8(13),a.appendULeb(0),Ba(a,n,2),a.endBlock();break;case 297:case 298:{const t=xs(e,vs(n,3)),r=St.mono_jiterp_is_special_interface(t),o=297===S,s=vs(n,1);if(!t){Bi(b,0,0,"null-klass"),n=0;continue}a.block(),a.options.zeroPageOptimization&&Qa()?(Ps(a,vs(n,2),40),a.local("dest_ptr",34),$a.nullChecksFused++):(a.block(),Ps(a,vs(n,2),40),a.local("dest_ptr",34),a.appendU8(13),a.appendULeb(0),a.local("pLocals"),a.i32_const(0),zs(a,s,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local("dest_ptr")),r&&a.local("dest_ptr"),a.appendU8(40),a.appendMemarg(qa(14),0),a.ptr_const(t),a.callImport(r?"imp_iface_s":"imp_iface"),o&&(a.local("dest_ptr"),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),zs(a,s,54),a.appendU8(5),o?Ba(a,n,19):(a.local("pLocals"),a.i32_const(0),zs(a,s,54)),a.endBlock(),a.endBlock();break}case 299:case 300:case 295:case 296:{const t=xs(e,vs(n,3)),r=299===S||300===S,o=295===S||299===S,s=vs(n,1);if(!t){Bi(b,0,0,"null-klass"),n=0;continue}a.block(),a.options.zeroPageOptimization&&Qa()?(Ps(a,vs(n,2),40),a.local("dest_ptr",34),$a.nullChecksFused++):(a.block(),Ps(a,vs(n,2),40),a.local("dest_ptr",34),a.appendU8(13),a.appendULeb(0),a.local("pLocals"),a.i32_const(0),zs(a,s,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local("dest_ptr")),a.appendU8(40),a.appendMemarg(qa(14),0),a.appendU8(40),a.appendMemarg(qa(15),0),r&&a.local("src_ptr",34),a.i32_const(t),a.appendU8(70),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),zs(a,s,54),a.appendU8(5),r?(a.local("src_ptr"),a.ptr_const(t),a.callImport("hasparent"),o&&(a.local("dest_ptr"),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),zs(a,s,54),a.appendU8(5),o?Ba(a,n,19):(a.local("pLocals"),a.i32_const(0),zs(a,s,54)),a.endBlock()):(Vs(a,vs(n,1),4),a.local("dest_ptr"),a.ptr_const(t),a.i32_const(S),a.callImport("castv2"),a.appendU8(69),a.block(64,4),Ba(a,n,19),a.endBlock()),a.endBlock(),a.endBlock();break}case 303:case 304:a.ptr_const(xs(e,vs(n,3))),Vs(a,vs(n,1),4),Vs(a,vs(n,2),0),a.i32_const(304===S?1:0),a.callImport("box");break;case 307:{const t=xs(e,vs(n,3)),r=qa(17),o=vs(n,1),s=ue(t+r);if(!t||!s){Bi(b,0,0,"null-klass"),n=0;continue}a.options.zeroPageOptimization&&Qa()?(Ps(a,vs(n,2),40),a.local("dest_ptr",34),$a.nullChecksFused++):(qs(a,vs(n,2),n,!0),a.local("dest_ptr",34)),a.appendU8(40),a.appendMemarg(qa(14),0),a.appendU8(40),a.appendMemarg(qa(15),0),a.local("src_ptr",34),a.appendU8(40),a.appendMemarg(r,0),a.i32_const(s),a.appendU8(70),a.local("src_ptr"),a.appendU8(45),a.appendMemarg(qa(16),0),a.appendU8(69),a.appendU8(113),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),a.i32_const(qa(18)),a.appendU8(106),zs(a,o,54),a.appendU8(5),Ba(a,n,21),a.endBlock();break}case 302:a.block(),Vs(a,vs(n,1),4),Ps(a,vs(n,2),40),a.callImport("newstr"),a.appendU8(13),a.appendULeb(0),Ba(a,n,17),a.endBlock();break;case 291:a.block(),Vs(a,vs(n,1),4),a.ptr_const(xs(e,vs(n,2))),a.callImport("newobj_i"),a.appendU8(13),a.appendULeb(0),Ba(a,n,17),a.endBlock();break;case 293:{const e=vs(n,3);Vs(a,vs(n,2),e),za(a,0,e),a.local("pLocals"),Vs(a,vs(n,2),e),zs(a,vs(n,1),54);break}case 290:case 292:case 543:case 542:l?(Oa(a,n,C,15),d=!0,N=0):n=0;break;case 545:case 546:case 547:case 548:case 544:l?(Oa(a,n,C,544==S?22:15),d=!0):n=0;break;case 145:case 142:Ba(a,n,16),d=!0;break;case 138:case 139:Ba(a,n,26),d=!0;break;case 144:if(a.callHandlerReturnAddresses.length>0&&a.callHandlerReturnAddresses.length<=3){const t=As(e,vs(n,1));a.local("pLocals"),a.appendU8(40),a.appendMemarg(t,0),a.local("index",33);for(let e=0;e=3&&S<=12||S>=516&&S<=517?l||a.options.countBailouts?(Ba(a,n,14),d=!0):n=0:S>=13&&S<=29?Js(a,n,S)?$=!0:n=0:S>=82&&S<=93?Ys(a,n,S)||(n=0):S>=351&&S<=434?Ks(a,n,S)||(n=0):cs[S]?Qs(a,n,S)||(n=0):ps[S]?ni(a,n,e,S)?l=!0:n=0:S>=31&&S<=57?Xs(a,e,n,S)||(n=0):S>=58&&S<=81?Zs(a,e,n,S)||(n=0):S>=95&&S<=135?oi(a,n,S)||(n=0):S>=568&&S<=621?ri(a,n,S)||(n=0):S>=323&&S<=348?si(a,e,n,S)||(n=0):S>=235&&S<=278?a.branchTargets.size>0?(Oa(a,n,C,8),d=!0):n=0:S>=640&&S<=647?li(a,n,S,x,I,T)?(p=!0,$=!0):n=0:0===N||(n=0)}if(n){if(!$){const e=n+2;for(let t=0;t0&&(e+=" -> ");for(let n=0;n0&&(l?h++:m++,f+=N),(n+=2*E)<=o&&(g=n)}else s&&ut(`instrumented trace ${t} aborted for opcode ${x} @${A.toString(16)}`),Bi(b,0,0,S)}for(;a.activeBlocks>0;)a.endBlock();return a.cfg.exitIp=g,p&&(f+=10240),f}(e,u,n,r,c,i,b,s),o=a>=mi.minimumTraceValue,i.cfg.generate()})),i.emitImportsAndFunctions(!1),!o)return m&&"end-of-body"===m.abortReason&&(m.abortReason="trace-too-small"),0;d=Na();const p=i.getArrayView();if($a.bytesGenerated+=p.length,p.length>=4080)return pt(`Jiterpreter generated too much code (${p.length} bytes) for trace ${u}. Please report this issue.`),0;const f=new WebAssembly.Module(p),g=i.getWasmImports(),y=new WebAssembly.Instance(f,g).exports[u];_=!1,l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const S=Fa(y);if(!S)throw new Error("add_function_pointer returned a 0 index");return i.options.enableStats&&$a.tracesCompiled&&$a.tracesCompiled%500==0&&Oi(!1,!0),S}catch(e){return f=!0,_=!1,dt(`${a||u} code generation failed: ${e} ${e.stack}`),Ha(),0}finally{const e=Na();if(d?(Ca.generation+=d-p,Ca.compilation+=e-d):Ca.generation+=e-p,f||!_&&mi.dumpTraces||h){if(f||mi.dumpTraces||h)for(let e=0;e0;)i.endBlock();i.inSection&&i.endSection()}catch(e){}const n=i.getArrayView();for(let r=0;r=4?Qi():Ji>0||"function"==typeof globalThis.setTimeout&&(Ji=globalThis.setTimeout((()=>{Ji=0,Qi()}),10))}},function(e,t,n,r,o,a,s,i,c){if(n>16)return 0;const l=new class{constructor(e,t,n,r,o,a,s,i,c){this.imethod=e,this.method=t,this.argumentCount=n,this.unbox=o,this.hasThisReference=a,this.hasReturnValue=s,this.name=i,this.paramTypes=new Array(n);for(let e=0;ee&&(l=l.substring(l.length-e,l.length)),l=`${this.imethod.toString(16)}_${l}`}else l=`${this.imethod.toString(16)}_${this.hasThisReference?"i":"s"}${this.hasReturnValue?"_r":""}_${this.argumentCount}`;this.traceName=l,this.hitCount=0}}(e,t,n,r,o,a,s,Qe(i),c);qi||(qi=Ma());const u=qi.get(c);return l.result=Fa(u),Xi[e]=l,l.result},function(e,t,n,r,o){const a=ue(n+0),s=lc[a];if(s)return void(s.result>0?St.mono_jiterp_register_jit_call_thunk(n,s.result):(s.queue.push(n),s.queue.length>12&&mc()));const i=new pc(e,t,n,r,0!==o);lc[a]=i,uc.push(i),uc.length>=6&&mc()},function(e,t,n,r,o){const a=dc(e);try{a(t,n,r,o)}catch(e){G(o,1)}},mc,function(e,n,r){l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const o=Ma().get(e),a=function(e,t,n){try{o(t)}catch(e){G(n,1)}};let s=!fc();if(!s)try{const e=new WebAssembly.Instance(_c,{i:{jit_call_cb:o},m:{h:t.getMemory()}}).exports.do_jit_call_indirect;if("function"!=typeof e)throw new Error("Did not find exported do_jit_call handler");const n=Fa(e);St.mono_jiterp_update_jit_call_dispatcher(n),s=!1}catch(e){dt("failed to compile do_jit_call handler",e),s=!0}if(s)try{const e=t.addFunction(a,"viii");St.mono_jiterp_update_jit_call_dispatcher(e)}catch(e){St.mono_jiterp_update_jit_call_dispatcher(0)}a(0,n,r)},function(){l.enablePerfMeasure&&Xt.push(globalThis.performance.now())},function(e){if(l.enablePerfMeasure){const t=Xt.pop(),n=a?{start:t}:{startTime:t};let r=Zt.get(e);r||(r=Qe(vt.mono_wasm_method_get_name(e)),Zt.set(e,r)),globalThis.performance.measure(r,n)}},function(e,t,r,o,a){const s=Qe(r),i=!!o,c=Qe(e),l=a,u=Qe(t),p=`[MONO] ${s}`;if(n.logging&&"function"==typeof n.logging.trace)n.logging.trace(c,u,p,i,l);else switch(u){case"critical":case"error":console.error(ht(p));break;case"warning":console.warn(p);break;case"message":default:console.log(p);break;case"info":console.info(p);break;case"debug":console.debug(p)}},function(e,t){jt=Qe(e).concat(".dll"),Rt=t,console.assert(!0,`Adding an entrypoint breakpoint ${jt} at method token ${Rt}`);debugger},function(){},Br,function(e,r,o,a,s,i){fr();const c=De(e),l=De(r),u=De(i);try{const e=fn(o);1!==e&&w(!1,`Signature version ${e} mismatch.`);const t=rt(c),r=Jt(),i=rt(l);lt(`Binding [JSImport] ${t} from ${i} module`);const p=function(e,t){e&&"string"==typeof e||w(!1,"function_name must be string");let r={};const o=e.split(".");t?(r=ur.get(t),r||w(!1,`ES6 module ${t} was not imported yet, please call JSHost.ImportAsync() first.`)):"INTERNAL"===o[0]?(r=n,o.shift()):"globalThis"===o[0]&&(r=globalThis,o.shift());for(let t=0;t{e&&e.dispose()},m=!0):R.Task}const h=sn(o,1),b=cn(h);R.Task;const g=Yr(h,b,1),y={fn:p,fqn:i+":"+t,args_count:d,arg_marshalers:_,res_converter:g,has_cleanup:m,arg_cleanup:f,isDisposed:!1};let S;S=0!=d||g?1!=d||m||g?1==d&&!m&&g?function(e){const t=e.fn,n=e.arg_marshalers[0],r=e.res_converter,o=e.fqn;return e=null,function(a){const s=Jt();try{L&&e.isDisposed;const o=n(a),s=t(o);r(a,s)}catch(e){ho(a,e)}finally{Yt(s,"mono.callCsFunction:",o)}}}(y):2==d&&!m&&g?function(e){const t=e.fn,n=e.arg_marshalers[0],r=e.arg_marshalers[1],o=e.res_converter,a=e.fqn;return e=null,function(s){const i=Jt();try{L&&e.isDisposed;const a=n(s),i=r(s),c=t(a,i);o(s,c)}catch(e){ho(s,e)}finally{Yt(i,"mono.callCsFunction:",a)}}}(y):function(e){const t=e.args_count,n=e.arg_marshalers,r=e.res_converter,o=e.arg_cleanup,a=e.has_cleanup,s=e.fn,i=e.fqn;return e=null,function(c){const l=Jt();try{L&&e.isDisposed;const i=new Array(t);for(let e=0;e2?t:r,e)}else{u=1;const t=s[e].toUpperCase();H(l,n+2*e,(t.length>1?s[e]:t).charCodeAt(0))}else for(let e=0;e2?t:r,e)}else{u=1;const t=s[e].toLowerCase();H(l,n+2*e,(t.length>1?s[e]:t).charCodeAt(0))}}catch(e){dr(a,e,i)}finally{i.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c);if(!e)throw new Error("Cannot change case, the culture name is null.");const i=tt(t,t+2*n),u=a?i.toLocaleUpperCase(e):i.toLocaleLowerCase(e);if(u.length<=i.length)return nt(r,r+2*o,u),void _r(s,l);const p=Ue();let d=1;if(a)for(let t=0;t2?n:o,t)}else{d=1;const n=i[t].toLocaleUpperCase(e);H(p,r+2*t,(n.length>1?i[t]:n).charCodeAt(0))}else for(let t=0;t2?n:o,t)}else{d=1;const n=i[t].toLocaleLowerCase(e);H(p,r+2*t,(n.length>1?i[t]:n).charCodeAt(0))}_r(s,l)}catch(e){dr(s,e,l)}finally{c.release(),l.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c),i=et(t,t+2*n),u=et(r,r+2*o),p=31&a,d=e||void 0;return _r(s,l),Uc(i,u,d,p)}catch(e){return dr(s,e,l),-2}finally{c.release(),l.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c),i=Ic(r,o);if(0==i.length)return 1;const u=Ic(t,n);if(u.lengthe.segment));let h=0,b=!1,g=-1,y=0,w=0,S=0;for(;!b;){const e=f.segment(c.slice(h,c.length))[Symbol.iterator]();let t=e.next();if(t.done)break;let n=p(t.value.segment,m[0],d,_);if(w=S,t=e.next(),t.done){g=n?w:g;break}if(y=t.value.index,S=w+y,n){for(let r=1;r1&&e<15||22==e||23==e}(n))return{eraNames:"",abbreviatedEraNames:""};const r=e.toLocaleDateString(t,{year:"numeric"}),o=e.toLocaleDateString(t,{day:"numeric"}),a=e.toLocaleDateString(t,{era:"short"}),s=e.toLocaleDateString(t,{era:"narrow"}),i=a.includes(r)?l(r):l(e.getFullYear().toString());return{eraNames:c(i.eraDateParts,i.ignoredPart),abbreviatedEraNames:c(i.abbrEraDateParts,i.ignoredPart)};function c(e,n){const r=new RegExp(`^((?!${n}|[0-9]).)*$`),o=e.filter((e=>r.test(e)));if(0==o.length)throw new Error(`Internal error, era for locale ${t} was in non-standard format.`);return o[0].trim()}function l(e){return a.startsWith(e)||a.endsWith(e)?{eraDateParts:a.split(o),abbrEraDateParts:s.split(o),ignoredPart:e}:{eraDateParts:a.split(e),abbrEraDateParts:s.split(e),ignoredPart:o}}}(c,e,t);a.EraNames=p.eraNames,a.AbbreviatedEraNames=p.abbreviatedEraNames;const d=Object.values(a).join("##");if(d.length>r)throw new Error(`Calendar info exceeds length of ${r}.`);return nt(n,n+2*d.length,d),_r(o,i),d.length}catch(e){return dr(o,e,i),-1}finally{s.release(),i.release()}},function(e,t,n,r,o){const a=De(e),s=De(o);try{const e=rt(a),o={AmDesignator:"",PmDesignator:"",LongTimePattern:"",ShortTimePattern:""},i=Ac(e),c=function(e){const t=new Date("August 19, 1975 12:15:30"),n=new Date("August 19, 1975 11:15:30"),r=vl(t,e);return{am:vl(n,e),pm:r}}(i);o.AmDesignator=c.am,o.PmDesignator=c.pm,o.LongTimePattern=function(e,t){const n=18..toLocaleString(e),r=6..toLocaleString(e),o=new Date("August 19, 1975 18:15:30"),a=new Intl.DateTimeFormat(e,{timeStyle:"medium"}),s=a.format(o),i=o.toLocaleTimeString(e,{minute:"numeric"}),c=o.toLocaleTimeString(e,{second:"numeric"});let l=s.replace(t.pm,"tt").replace(i,"mm").replace(c,"ss");const u=l.includes(n),p=`${(0).toLocaleString(e)}${r}`,d=new Date("August 19, 1975 6:15:30"),_=a.format(d);let f;if(u)f=_.includes(p)?"HH":"H",l=l.replace(n,f);else{const e=_.includes(p);f=e?"hh":"h",l=l.replace(e?p:r,f)}return l}(i,c),o.ShortTimePattern=function(e){const t=e.indexOf("ss");if(t>0){const n=`${e[t-1]}ss`,r=e.replace(n,"");e=r.length>t&&"t"!=r[r.length-1]?e.split(n)[0]:r}return e}(o.LongTimePattern);const l=Object.values(o).join("##");if(l.length>n)throw new Error(`Culture info exceeds length of ${n}.`);return nt(t,t+2*l.length,l),_r(r,s),l.length}catch(e){return dr(r,e,s),-1}finally{a.release(),s.release()}},function(e,t,n){const r=De(e),o=De(n);try{return function(e){const t=El(e);if(t)return 7==t.firstDay?0:t.firstDay;if(["en-AE","en-SD","fa-IR"].includes(e))return 6;const n=e.split("-")[0];return["zh","th","pt","mr","ml","ko","kn","ja","id","hi","he","gu","fil","bn","am","ar"].includes(n)||["ta-SG","ta-IN","sw-KE","ms-SG","fr-CA","es-MX","en-US","en-ZW","en-ZA","en-WS","en-VI","en-UM","en-TT","en-SG","en-PR","en-PK","en-PH","en-MT","en-MO","en-MH","en-KE","en-JM","en-IN","en-IL","en-HK","en-GU","en-DM","en-CA","en-BZ","en-BW","en-BS","en-AU","en-AS","en-AG"].includes(e)?0:1}(Ac(rt(r)))}catch(e){return dr(t,e,o),-1}finally{r.release(),o.release()}},function(e,t,n){const r=De(e),o=De(n);try{return function(e){const t=El(e);if(t)return 7==t.minimalDays?1:t.minimalDays<4?0:2;const n=e.split("-")[0];return["pt-PT","fr-CH","fr-FR","fr-BE","es-ES","en-SE","en-NL","en-JE","en-IM","en-IE","en-GI","en-GG","en-GB","en-FJ","en-FI","en-DK","en-DE","en-CH","en-BE","en-AT","el-GR"].includes(e)||["sv","sk","ru","pl","nl","no","lt","it","hu","fi","et","de","da","cs","ca","bg"].includes(n)?2:0}(Ac(rt(r)))}catch(e){return dr(t,e,o),-1}finally{r.release(),o.release()}}],Il=[...Ul,function(e,t,n,r,o){ol();const a=De(n),s=De(t),i=De(o);try{const t=rt(s);if(!t||"string"!=typeof t)return void dr(r,"ERR12: Invalid method name object @"+s.value,i);const n=function(e){return e!==T&&e!==I?Nr(e):null}(e);if(j(n))return void dr(r,"ERR13: Invalid JS object handle '"+e+"' while invoking '"+t+"'",i);const o=hl(a);try{const e=n[t];if(void 0===e)throw new Error("Method: '"+t+"' not found for: '"+Object.prototype.toString.call(n)+"'");Wc(e.apply(n,o),i,!0),_r(r)}catch(e){dr(r,e,i)}}finally{a.release(),s.release(),i.release()}},function(e,t,n,r){ol();const o=De(t),a=De(r);try{const t=rt(o);if(!t)return void dr(n,"Invalid property name object '"+o.value+"'",a);const r=Nr(e);if(j(r))return void dr(n,"ERR01: Invalid JS object handle '"+e+"' while geting '"+t+"'",a);Wc(r[t],a,!0),_r(n)}catch(e){dr(n,e,a)}finally{a.release(),o.release()}},function(e,t,n,r,o,a,s){ol();const i=De(n),c=De(t),l=De(s);try{const n=rt(c);if(!n)return void dr(a,"Invalid property name object '"+t+"'",l);const s=Nr(e);if(j(s))return void dr(a,"ERR02: Invalid JS object handle '"+e+"' while setting '"+n+"'",l);const u=fl(i);if(r)s[n]=u;else{if(!r&&!Object.prototype.hasOwnProperty.call(s,n))return;!0===o?Object.prototype.hasOwnProperty.call(s,n)&&(s[n]=u):s[n]=u}_r(a,l)}catch(e){dr(a,e,l)}finally{l.release(),c.release(),i.release()}},function(e,t,n,r){ol();const o=De(r);try{const r=Nr(e);if(j(r))return void dr(n,"ERR03: Invalid JS object handle '"+e+"' while getting ["+t+"]",o);Wc(r[t],o,!0),_r(n)}catch(e){dr(n,e,o)}finally{o.release()}},function(e,t,n,r,o){ol();const a=De(n),s=De(o);try{const n=Nr(e);if(j(n))return void dr(r,"ERR04: Invalid JS object handle '"+e+"' while setting ["+t+"]",s);const o=fl(a);n[t]=o,_r(r,s)}catch(e){dr(r,e,s)}finally{s.release(),a.release()}},function(e,r,o){ol();const a=De(e),s=De(o);try{const e=rt(a);let o;if(o=e?"Module"==e?t:"INTERNAL"==e?n:globalThis[e]:globalThis,null===o||void 0===typeof o)return void dr(r,"Global object '"+e+"' not found.",s);Wc(o,s,!0),_r(r)}catch(e){dr(r,e,s)}finally{s.release(),a.release()}},function(e,t,n,r){const o=De(t),a=De(e),s=De(r);try{const e=rt(a);if(!e)return void dr(n,"Invalid name @"+a.value,s);const t=globalThis[e];if(null==t)return void dr(n,"JavaScript host object '"+e+"' not found.",s);try{const e=hl(o),r=function(e,t){let n=[];return n[0]=e,t&&(n=n.concat(t)),new(e.bind.apply(e,n))};Wc(Dr(r(t,e)),s,!1),_r(n)}catch(e){return void dr(n,e,s)}}finally{s.release(),o.release(),a.release()}},function(e,t,n){const r=De(n);try{const n=Nr(e);if(j(n))return void dr(t,"ERR06: Invalid JS object handle '"+e+"'",r);Gc(n,r),_r(t)}catch(e){dr(t,String(e),r)}finally{r.release()}},function(e,t,n,r,o,a,s){const i=De(s);try{const s=function(e,t,n,r,o){let a=null;switch(o){case 5:a=new Int8Array(n-t);break;case 6:a=new Uint8Array(n-t);break;case 7:a=new Int16Array(n-t);break;case 8:a=new Uint16Array(n-t);break;case 9:a=new Int32Array(n-t);break;case 10:a=new Uint32Array(n-t);break;case 13:a=new Float32Array(n-t);break;case 14:a=new Float64Array(n-t);break;case 15:a=new Uint8ClampedArray(n-t);break;default:throw new Error("Unknown array type "+o)}return function(e,t,n,r,o){if(Pc(e)&&e.BYTES_PER_ELEMENT){if(o!==e.BYTES_PER_ELEMENT)throw new Error("Inconsistent element sizes: TypedArray.BYTES_PER_ELEMENT '"+e.BYTES_PER_ELEMENT+"' sizeof managed element: '"+o+"'");let a=(r-n)*o;const s=e.length*e.BYTES_PER_ELEMENT;a>s&&(a=s);const i=n*o;return new Uint8Array(e.buffer,0,a).set(Ee().subarray(t+i,t+i+a)),a}throw new Error("Object '"+e+"' is not a typed array")}(a,e,t,n,r),a}(e,t,n,r,o);Wc(s,i,!0),_r(a)}catch(e){dr(a,String(e),i)}finally{i.release()}},function(e,t,n,r,o){try{ol();const e=globalThis.Blazor;if(!e)throw new Error("The blazor.webassembly.js library is not loaded.");return e._internal.invokeJSFromDotNet(t,n,r,o)}catch(t){const n=t.message+"\n"+t.stack,r=Be();return ot(n,r),r.copy_to_address(e),r.release(),0}}];function Tl(e){const t=e.env||e.a;if(!t)return void pt("WARNING: Neither imports.env or imports.a were present when instantiating the wasm module. This likely indicates an emscripten configuration issue.");const n=new Array(Il.length);for(const e in t){const r=t[e];if("function"==typeof r&&-1!==r.toString().indexOf("runtime_idx"))try{const{runtime_idx:t}=r();if(void 0!==n[t])throw new Error(`Duplicate runtime_idx ${t}`);n[t]=e}catch(e){}}for(const[e,r]of Il.entries()){const o=n[e];if(void 0!==o){const e=t[o];if("function"!=typeof e)throw new Error(`Expected ${o} to be a function`);t[o]=r,lt(`Replaced WASM import ${o} stub ${e.name} with ${r.name||"minified implementation"}`)}}}const xl="https://dotnet.generated.invalid/wasm-memory";async function Al(){if(void 0===globalThis.caches)return null;if(a&&!1===globalThis.window.isSecureContext)return null;const e=`dotnet-resources${document.baseURI.substring(document.location.origin.length)}`;try{return await globalThis.caches.open(e)||null}catch(e){return pt("Failed to open cache"),null}}async function jl(){if(l.memorySnapshotCacheKey)return l.memorySnapshotCacheKey;if(!l.subtle)return null;const t=Object.assign({},l.config);t.resourcesHash=t.resources.hash,delete t.assets,delete t.resources,t.preferredIcuAsset=u.preferredIcuAsset,delete t.forwardConsoleLogsToWS,delete t.diagnosticTracing,delete t.appendElementOnExit,delete t.assertAfterExit,delete t.interopCleanupOnExit,delete t.logExitCode,delete t.pthreadPoolSize,delete t.asyncFlushOnExit,delete t.remoteSources,delete t.ignorePdbLoadErrors,delete t.maxParallelDownloads,delete t.enableDownloadRetry,delete t.exitAfterSnapshot,delete t.extensions,t.GitHash=u.gitHash,t.ProductVersion=e;const n=JSON.stringify(t),r=await l.subtle.digest("SHA-256",(new TextEncoder).encode(n)),o=new Uint8Array(r),a=Array.from(o).map((e=>e.toString(16).padStart(2,"0"))).join("");return l.memorySnapshotCacheKey=`${xl}-${a}`,l.memorySnapshotCacheKey}async function Rl(){await Io(),await async function(){try{if(!l.config.startupMemoryCache)return;const e=await jl();if(!e)return;const t=await Al();if(!t)return;const n=await t.match(e),r=null==n?void 0:n.headers.get("content-length"),o=r?parseInt(r):void 0;l.loadedMemorySnapshotSize=o,l.storeMemorySnapshotPending=!o}catch(e){pt("Failed find memory snapshot in the cache",e)}finally{l.loadedMemorySnapshotSize||u.memorySnapshotSkippedOrDone.promise_control.resolve()}}()}function Ll(e){const n=Jt();e.locateFile||(e.locateFile=e.__locateFile=e=>u.scriptDirectory+e),e.out||(e.out=console.log.bind(console)),e.err||(e.err=console.error.bind(console)),u.out=e.out,u.err=e.err,e.mainScriptUrlOrBlob=u.scriptUrl;const h=e.instantiateWasm,b=e.preInit?"function"==typeof e.preInit?[e.preInit]:e.preInit:[],g=e.preRun?"function"==typeof e.preRun?[e.preRun]:e.preRun:[],y=e.postRun?"function"==typeof e.postRun?[e.postRun]:e.postRun:[],S=e.onRuntimeInitialized?e.onRuntimeInitialized:()=>{};e.instantiateWasm=(e,n)=>function(e,n,r){const o=Jt();if(r){const t=r(e,((e,t)=>{Yt(o,"mono.instantiateWasm"),l.afterInstantiateWasm.promise_control.resolve(),n(e,t)}));return t}return async function(e,n){var r;try{await u.afterConfigLoaded,lt("instantiate_wasm_module"),await l.beforePreInit.promise,t.addRunDependency("instantiate_wasm_module");const o=async function(){d&&(await u.simd()||w(!1,"This browser/engine doesn't support WASM SIMD. Please use a modern version. See also https://aka.ms/dotnet-wasm-features")),_&&(await u.exceptions()||w(!1,"This browser/engine doesn't support WASM exception handling. Please use a modern version. See also https://aka.ms/dotnet-wasm-features"))}();Tl(e);const i=await u.wasmDownloadPromise.promise;if(await o,await async function(e,t,n){e&&e.pendingDownloadInternal&&e.pendingDownloadInternal.response||w(!1,"Can't load dotnet.native.wasm");const r=await e.pendingDownloadInternal.response,o=r.headers&&r.headers.get?r.headers.get("Content-Type"):void 0;let i,c;if("function"==typeof WebAssembly.instantiateStreaming&&"application/wasm"===o){lt("instantiate_wasm_module streaming");const e=await WebAssembly.instantiateStreaming(r,t);i=e.instance,c=e.module}else{a&&"application/wasm"!==o&&pt('WebAssembly resource does not have the expected content type "application/wasm", so falling back to slower ArrayBuffer instantiation.');const e=await r.arrayBuffer();if(lt("instantiate_wasm_module buffered"),s)c=new WebAssembly.Module(e),i=new WebAssembly.Instance(c,t);else{const n=await WebAssembly.instantiate(e,t);i=n.instance,c=n.module}}n(i,c)}(i,e,n),i.pendingDownloadInternal=null,i.pendingDownload=null,i.buffer=null,i.moduleExports=null,lt("instantiate_wasm_module done"),l.loadedMemorySnapshotSize){try{const e=(null===(r=t.asm)||void 0===r?void 0:r.memory)||t.wasmMemory;e.grow(l.loadedMemorySnapshotSize-e.buffer.byteLength+65535>>>16),l.updateMemoryViews()}catch(e){pt("failed to resize memory for the snapshot",e),l.loadedMemorySnapshotSize=void 0}u.memorySnapshotSkippedOrDone.promise_control.resolve()}l.afterInstantiateWasm.promise_control.resolve()}catch(e){throw dt("instantiate_wasm_module() failed",e),u.mono_exit(1,e),e}t.removeRunDependency("instantiate_wasm_module")}(e,n),[]}(e,n,h),e.preInit=[()=>function(e){t.addRunDependency("mono_pre_init");const n=Jt();try{$l(!1),lt("preInit"),l.beforePreInit.promise_control.resolve(),e.forEach((e=>e()))}catch(e){throw dt("user preInint() failed",e),u.mono_exit(1,e),e}(async()=>{try{await async function(){lt("mono_wasm_pre_init_essential_async"),t.addRunDependency("mono_wasm_pre_init_essential_async"),t.removeRunDependency("mono_wasm_pre_init_essential_async")}(),Yt(n,"mono.preInit")}catch(e){throw u.mono_exit(1,e),e}l.afterPreInit.promise_control.resolve(),t.removeRunDependency("mono_pre_init")})()}(b)],e.preRun=[()=>async function(e){t.addRunDependency("mono_pre_run_async");try{await l.afterInstantiateWasm.promise,await l.afterPreInit.promise,lt("preRunAsync");const t=Jt();e.map((e=>e())),Yt(t,"mono.preRun")}catch(e){throw dt("user callback preRun() failed",e),u.mono_exit(1,e),e}l.afterPreRun.promise_control.resolve(),t.removeRunDependency("mono_pre_run_async")}(g)],e.onRuntimeInitialized=()=>async function(e){try{await l.afterPreRun.promise,lt("onRuntimeInitialized"),l.mono_wasm_exit=St.mono_wasm_exit,l.abort=e=>{throw u.is_exited()||St.mono_wasm_abort(),e};const n=Jt();if(l.beforeOnRuntimeInitialized.promise_control.resolve(),await async function(){await l.allAssetsInMemory.promise,l.config.assets&&(u.actual_downloaded_assets_count!=u.expected_downloaded_assets_count&&w(!1,`Expected ${u.expected_downloaded_assets_count} assets to be downloaded, but only finished ${u.actual_downloaded_assets_count}`),u.actual_instantiated_assets_count!=u.expected_instantiated_assets_count&&w(!1,`Expected ${u.expected_instantiated_assets_count} assets to be in memory, but only instantiated ${u.actual_instantiated_assets_count}`),u._loaded_files.forEach((e=>u.loadedFiles.push(e.url))),lt("all assets are loaded in wasm memory"))}(),L&&l.config.startupMemoryCache,await async function(){const e=Jt();if(l.loadedMemorySnapshotSize){const e=await async function(){try{const e=await jl();if(!e)return;const t=await Al();if(!t)return;const n=await t.match(e);if(!n)return;return n.arrayBuffer()}catch(e){return void pt("Failed load memory snapshot from the cache",e)}}(),t=Ee();return e.byteLength!==t.byteLength&&w(!1,"Loaded memory is not the expected size"),t.set(new Uint8Array(e),0),void lt("Loaded WASM linear memory from browser cache")}for(const e in l.config.environmentVariables){const t=l.config.environmentVariables[e];if("string"!=typeof t)throw new Error(`Expected environment variable '${e}' to be a string but it was ${typeof t}: '${t}'`);Nl(e,t)}l.config.startupMemoryCache&&St.mono_jiterp_update_jit_call_dispatcher(0),l.config.runtimeOptions&&function(e){if(!Array.isArray(e))throw new Error("Expected runtimeOptions to be an array of strings");const n=t._malloc(4*e.length);let r=0;for(let o=0;oaot; in your project file."),null==e&&(e={}),"writeAt"in e||(e.writeAt="System.Runtime.InteropServices.JavaScript.JavaScriptExports::StopProfile"),"sendTo"in e||(e.sendTo="Interop/Runtime::DumpAotProfileData");const t="aot:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;vt.mono_wasm_profiler_init_aot(t)}(l.config.aotProfilerOptions),l.config.browserProfilerOptions&&(l.config.browserProfilerOptions,m||w(!1,"Browser profiler is not enabled, please use browser; in your project file."),vt.mono_wasm_profiler_init_browser("browser:")),Dl("unused",l.config.debugLevel),l.config.startupMemoryCache&&(St.mono_jiterp_update_jit_call_dispatcher(-1),await async function(e){try{const t=await jl();if(!t)return;const n=await Al();if(!n)return;const r=L?new Uint8Array(e).slice(0):e,o=new Response(r,{headers:{"content-type":"wasm-memory","content-length":e.byteLength.toString()}});await n.put(t,o),async function(e){try{const t=await Al();if(!t)return;const n=await t.keys();for(const r of n)r.url&&r.url!==e&&r.url.startsWith(xl)&&await t.delete(r)}catch(e){return}}(t)}catch(e){return void pt("Failed to store memory snapshot in the cache",e)}}(Ee().buffer),l.storeMemorySnapshotPending=!1),Yt(e,"mono.memorySnapshot")}(),l.config.exitAfterSnapshot){const e=l.ExitStatus?new l.ExitStatus(0):new Error("Snapshot taken, exiting because exitAfterSnapshot was set.");return e.silent=!0,void u.mono_exit(0,e)}L&&l.config.startupMemoryCache,function(){if(!l.mono_wasm_bindings_is_ready){lt("bindings_init"),l.mono_wasm_bindings_is_ready=!0;try{const e=Jt();Ve||("undefined"!=typeof TextDecoder&&(He=new TextDecoder("utf-16le"),Ge=new TextDecoder("utf-8",{fatal:!1}),qe=new TextDecoder("utf-8"),Je=new TextEncoder),Ve=t._malloc(12)),function(){const e="System.Runtime.InteropServices.JavaScript";if(l.runtime_interop_module=St.mono_wasm_assembly_load(e),!l.runtime_interop_module)throw"Can't find bindings module assembly: "+e;if(l.runtime_interop_namespace="System.Runtime.InteropServices.JavaScript",l.runtime_interop_exports_classname="JavaScriptExports",l.runtime_interop_exports_class=St.mono_wasm_assembly_find_class(l.runtime_interop_module,l.runtime_interop_namespace,l.runtime_interop_exports_classname),!l.runtime_interop_exports_class)throw"Can't find "+l.runtime_interop_namespace+"."+l.runtime_interop_exports_classname+" class";const n=To("CallEntrypoint");n||w(!1,"Can't find CallEntrypoint method");const r=To("ReleaseJSOwnedObjectByGCHandle");r||w(!1,"Can't find ReleaseJSOwnedObjectByGCHandle method");const o=To("CreateTaskCallback");o||w(!1,"Can't find CreateTaskCallback method");const a=To("CompleteTask");a||w(!1,"Can't find CompleteTask method");const s=To("CallDelegate");s||w(!1,"Can't find CallDelegate method");const i=To("GetManagedStackTrace");i||w(!1,"Can't find GetManagedStackTrace method");const c=To("LoadSatelliteAssembly");c||w(!1,"Can't find LoadSatelliteAssembly method");const p=To("LoadLazyAssembly");p||w(!1,"Can't find LoadLazyAssembly method"),l.javaScriptExports.call_entry_point=async(e,r)=>{u.assert_runtime_running();const o=t.stackSave();try{t.runtimeKeepalivePush();const o=on(4),a=an(o,1),s=an(o,2),i=an(o,3);so(s,e),r&&0==r.length&&(r=void 0),wo(i,r,R.String),kr(n,o);let c=Gn(a,0,Bn);return null==c&&(c=Promise.resolve(0)),c[$r]=!0,await c}finally{t.runtimeKeepalivePop(),t.stackRestore(o)}},l.javaScriptExports.load_satellite_assembly=e=>{const n=t.stackSave();try{const t=on(3),n=an(t,2);hn(n,R.Array),yo(n,e,R.Byte),kr(c,t)}finally{t.stackRestore(n)}},l.javaScriptExports.load_lazy_assembly=(e,n)=>{const r=t.stackSave();try{const t=on(4),r=an(t,2),o=an(t,3);hn(r,R.Array),hn(o,R.Array),yo(r,e,R.Byte),yo(o,n,R.Byte),kr(p,t)}finally{t.stackRestore(r)}},l.javaScriptExports.release_js_owned_object_by_gc_handle=e=>{e||w(!1,"Must be valid gc_handle"),u.assert_runtime_running();const n=t.stackSave();try{const t=on(3),n=an(t,2);hn(n,R.Object),Un(n,e),kr(r,t)}finally{t.stackRestore(n)}},l.javaScriptExports.create_task_callback=()=>{const e=t.stackSave();u.assert_runtime_running();try{const e=on(2);return kr(o,e),En(an(e,1))}finally{t.stackRestore(e)}},l.javaScriptExports.complete_task=(e,n,r,o)=>{u.assert_runtime_running();const s=t.stackSave();try{const t=on(5),s=an(t,2);hn(s,R.Object),Un(s,e);const i=an(t,3);if(n)ho(i,n);else{hn(i,R.None);const e=an(t,4);o||w(!1,"res_converter missing"),o(e,r)}kr(a,t)}finally{t.stackRestore(s)}},l.javaScriptExports.call_delegate=(e,n,r,o,a,i,c,l)=>{u.assert_runtime_running();const p=t.stackSave();try{const t=on(6),u=an(t,2);if(hn(u,R.Object),Un(u,e),i&&i(an(t,3),n),c&&c(an(t,4),r),l&&l(an(t,5),o),kr(s,t),a)return a(an(t,1))}finally{t.stackRestore(p)}},l.javaScriptExports.get_managed_stack_trace=e=>{u.assert_runtime_running();const n=t.stackSave();try{const t=on(3),n=an(t,2);return hn(n,R.Exception),Un(n,e),kr(i,t),qn(an(t,1))}finally{t.stackRestore(n)}}}(),p||i||function(){if(Object.prototype[Fc]=0,Array.prototype[Fc]=1,ArrayBuffer.prototype[Fc]=2,DataView.prototype[Fc]=3,Function.prototype[Fc]=4,Uint8Array.prototype[Fc]=11,Mc._unbox_buffer_size=65536,Mc._box_buffer=t._malloc(65536),Mc._unbox_buffer=t._malloc(Mc._unbox_buffer_size),Mc._class_int32=Sr("System","Int32"),Mc._class_uint32=Sr("System","UInt32"),Mc._class_double=Sr("System","Double"),Mc._class_boolean=Sr("System","Boolean"),Mc._null_root=Be(),function(){const e=Xc;e.set("m",{steps:[{}],size:0}),e.set("s",{steps:[{convert_root:ot.bind(t)}],size:0,needs_root:!0}),e.set("S",{steps:[{convert_root:at.bind(t)}],size:0,needs_root:!0}),e.set("o",{steps:[{convert_root:Wc.bind(t)}],size:0,needs_root:!0}),e.set("u",{steps:[{convert_root:zc.bind(t,!1)}],size:0,needs_root:!0}),e.set("R",{steps:[{convert_root:Wc.bind(t),byref:!0}],size:0,needs_root:!0}),e.set("j",{steps:[{convert:Jc.bind(t),indirect:"i32"}],size:8}),e.set("b",{steps:[{indirect:"bool"}],size:8}),e.set("i",{steps:[{indirect:"i32"}],size:8}),e.set("I",{steps:[{indirect:"u32"}],size:8}),e.set("l",{steps:[{indirect:"i52"}],size:8}),e.set("L",{steps:[{indirect:"u52"}],size:8}),e.set("f",{steps:[{indirect:"float"}],size:8}),e.set("d",{steps:[{indirect:"double"}],size:8})}(),Mc.runtime_legacy_exports_classname="LegacyExports",Mc.runtime_legacy_exports_class=St.mono_wasm_assembly_find_class(l.runtime_interop_module,l.runtime_interop_namespace,Mc.runtime_legacy_exports_classname),!Mc.runtime_legacy_exports_class)throw"Can't find "+l.runtime_interop_namespace+"."+Mc.runtime_legacy_exports_classname+" class";for(const e of al){const t=sl,[n,r,o,a]=e;if(n)t[r]=function(...e){const n=il(o,a);return t[r]=n,n(...e)};else{const e=il(o,a);t[r]=e}}}(),0==Kt.size&&(Kt.set(R.Array,Zn),Kt.set(R.Span,Qn),Kt.set(R.ArraySegment,er),Kt.set(R.Boolean,Cn),Kt.set(R.Byte,$n),Kt.set(R.Char,Nn),Kt.set(R.Int16,Dn),Kt.set(R.Int32,Bn),Kt.set(R.Int52,On),Kt.set(R.BigInt64,Mn),Kt.set(R.Single,Fn),Kt.set(R.IntPtr,zn),Kt.set(R.Double,Pn),Kt.set(R.String,qn),Kt.set(R.Exception,Jn),Kt.set(R.JSException,Jn),Kt.set(R.JSObject,Yn),Kt.set(R.Object,Xn),Kt.set(R.DateTime,Wn),Kt.set(R.DateTimeOffset,Wn),Kt.set(R.Task,Gn),Kt.set(R.Action,Hn),Kt.set(R.Function,Hn),Kt.set(R.None,Vn),Kt.set(R.Void,Vn),Kt.set(R.Discard,Vn)),0==Qt.size&&(Qt.set(R.Array,yo),Qt.set(R.Span,So),Qt.set(R.ArraySegment,ko),Qt.set(R.Boolean,Zr),Qt.set(R.Byte,Kr),Qt.set(R.Char,Qr),Qt.set(R.Int16,eo),Qt.set(R.Int32,to),Qt.set(R.Int52,no),Qt.set(R.BigInt64,ro),Qt.set(R.Double,oo),Qt.set(R.Single,ao),Qt.set(R.IntPtr,so),Qt.set(R.DateTime,io),Qt.set(R.DateTimeOffset,co),Qt.set(R.String,lo),Qt.set(R.Exception,ho),Qt.set(R.JSException,ho),Qt.set(R.JSObject,bo),Qt.set(R.Object,go),Qt.set(R.Task,mo),Qt.set(R.Action,_o),Qt.set(R.Function,_o),Qt.set(R.None,po),Qt.set(R.Discard,po),Qt.set(R.Void,po)),l._i52_error_scratch_buffer=t._malloc(4),Yt(e,"mono.bindingsInit")}catch(e){throw dt("Error in bindings_init",e),e}}}(),l.runtimeReady=!0,r&&!o&&t.runtimeKeepalivePush(),l.mono_wasm_runtime_is_ready||mono_wasm_runtime_ready(),0!==u.config.debugLevel&&u.config.cacheBootResources&&u.logDownloadStatsToConsole(),setTimeout((()=>{u.purgeUnusedCacheEntriesAsync()}),u.config.cachedResourcesPurgeDelay);try{e()}catch(e){throw dt("user callback onRuntimeInitialized() failed",e),e}await async function(){lt("mono_wasm_after_user_runtime_initialized");try{if(!t.disableDotnet6Compatibility&&t.exports){const e=globalThis;for(let n=0;nasync function(e){try{await l.afterOnRuntimeInitialized.promise,lt("postRunAsync");const n=Jt();t.FS_createPath("/","usr",!0,!0),t.FS_createPath("/","usr/share",!0,!0),e.map((e=>e())),Yt(n,"mono.postRun")}catch(e){throw dt("user callback posRun() failed",e),u.mono_exit(1,e),e}l.afterPostRun.promise_control.resolve()}(y)],e.ready.then((async()=>{await l.afterPostRun.promise,Yt(n,"mono.emscriptenStartup"),l.dotnetReady.promise_control.resolve(c)})).catch((e=>{l.dotnetReady.promise_control.reject(e)})),e.ready=l.dotnetReady.promise,e.onAbort||(e.onAbort=e=>{u.mono_exit(1,e)}),e.onExit||(e.onExit=e=>{u.mono_exit(e,null)})}async function Cl(e,n){await u.afterConfigLoaded.promise,Tl(e),n(new WebAssembly.Instance(t.wasmModule,e),void 0),t.wasmModule=null}function $l(e){var r,o,a;e||t.addRunDependency("mono_wasm_pre_init_essential"),lt("mono_wasm_pre_init_essential"),u.gitHash!==l.gitHash&&pt("The version of dotnet.runtime.js is different from the version of dotnet.js!"),u.gitHash!==l.moduleGitHash&&pt("The version of dotnet.native.js is different from the version of dotnet.js!"),function(){const e=[...yt,...p?[]:gt];for(const t of e){const e=wt,[n,r,o,a,s]=t,i="function"==typeof n;if(!0===n||i)e[r]=function(...t){!i||!n()||w(!1,`cwrap ${r} should not be called when binding was skipped`);const c=Ut(r,o,a,s);return e[r]=c,c(...t)};else{const t=Ut(r,o,a,s);e[r]=t}}}(),r=n,Object.assign(r,{mono_wasm_exit:St.mono_wasm_exit,mono_wasm_enable_on_demand_gc:St.mono_wasm_enable_on_demand_gc,mono_wasm_profiler_init_aot:vt.mono_wasm_profiler_init_aot,mono_wasm_profiler_init_browser:vt.mono_wasm_profiler_init_browser,mono_wasm_exec_regression:St.mono_wasm_exec_regression}),p||(a=Bc,Object.assign(a,{mono_wasm_add_assembly:kt.mono_wasm_add_assembly}),o=Oc,Object.assign(o,{mono_obj_array_new:kt.mono_wasm_obj_array_new,mono_obj_array_set:kt.mono_wasm_obj_array_set,mono_obj_array_new_ref:kt.mono_wasm_obj_array_new_ref,mono_obj_array_set_ref:kt.mono_wasm_obj_array_set_ref})),e||t.removeRunDependency("mono_wasm_pre_init_essential")}function Nl(e,t){St.mono_wasm_setenv(e,t)}function Dl(e,t){lt("mono_wasm_load_runtime");try{const n=Jt();null==t&&(t=0,l.config.debugLevel&&(t=0+t)),St.mono_wasm_load_runtime(e||"unused",t),Yt(n,"mono.loadRuntime")}catch(e){throw dt("mono_wasm_load_runtime () failed",e),u.mono_exit(1,e),e}}async function Bl(e){tr=null,null.addEventListener("dotnet:pthread:created",(e=>{lt("pthread created 0x"+e.pthread_self.pthreadId.toString(16))})),e.preInit=[()=>async function(){lt("worker initializing essential C exports and APIs");const e=Jt();try{lt("preInitWorker"),l.beforePreInit.promise_control.resolve(),$l(!0),await Io(),l.afterPreInit.promise_control.resolve(),Yt(e,"mono.preInitWorker")}catch(e){throw dt("user preInitWorker() failed",e),u.mono_exit(1,e),e}}()],e.instantiateWasm=Cl,await l.afterPreInit.promise}function Ol(n){const r=t,o=n,a=globalThis;p||function(e){Bc=e.mono,Oc=e.binding}(o),p||(Object.assign(o.mono,{mono_wasm_setenv:Nl,mono_wasm_load_bytes_into_heap:ye,mono_wasm_load_icu_data:ha,mono_wasm_runtime_ready:mono_wasm_runtime_ready,mono_wasm_new_root_buffer:Ne,mono_wasm_new_root:Be,mono_wasm_new_external_root:De,mono_wasm_release_roots:Oe,mono_run_main:Nc,mono_run_main_and_exit:$c,mono_wasm_add_assembly:null,mono_wasm_load_runtime:Dl,config:l.config,loaded_files:[],setB32:z,setI8:J,setI16:Y,setI32:Z,setI52:Q,setU52:ee,setI64Big:te,setU8:V,setU16:W,setU32:q,setF32:ne,setF64:re,getB32:oe,getI8:pe,getI16:de,getI32:_e,getI52:fe,getU52:me,getI64Big:he,getU8:ae,getU16:se,getU32:ie,getF32:be,getF64:ge}),Object.assign(o.binding,{bind_static_method:Sl,call_assembly_entry_point:kl,mono_obj_array_new:null,mono_obj_array_set:null,js_string_to_mono_string:ll,js_typed_array_to_array:qc,mono_array_to_js_array:ml,js_to_mono_obj:Vc,conv_string:gl,unbox_mono_obj:dl,mono_obj_array_new_ref:null,mono_obj_array_set_ref:null,js_string_to_mono_string_root:ot,js_typed_array_to_array_root:Gc,js_to_mono_obj_root:Wc,conv_string_root:rt,unbox_mono_obj_root:fl,mono_array_root_to_js_array:hl}),Object.assign(o.internal,{stringToMonoStringIntern:ul,mono_method_resolve:nl})),Object.assign(o.internal,{mono_wasm_exit:e=>{t.err("early exit "+e)},forceDisposeProxies:Vr,logging:void 0,mono_wasm_stringify_as_error_with_stack:ht,mono_wasm_get_loaded_files:ya,mono_wasm_send_dbg_command_with_parms:Dt,mono_wasm_send_dbg_command:Bt,mono_wasm_get_dbg_command_info:Ot,mono_wasm_get_details:Ht,mono_wasm_release_object:qt,mono_wasm_call_function_on:Wt,mono_wasm_debugger_resume:Mt,mono_wasm_detach_debugger:Ft,mono_wasm_raise_debug_event:zt,mono_wasm_change_debugger_log_level:Pt,mono_wasm_debugger_attached:Vt,mono_wasm_runtime_is_ready:l.mono_wasm_runtime_is_ready,mono_wasm_get_func_id_to_name_mappings:bt,get_property:ar,set_property:or,has_property:sr,get_typeof_property:ir,get_global_this:cr,get_dotnet_instance:()=>c,dynamic_import:pr,mono_wasm_cancel_promise:qr,ws_wasm_create:ca,ws_wasm_open:la,ws_wasm_send:ua,ws_wasm_receive:pa,ws_wasm_close:da,ws_wasm_abort:_a,http_wasm_supports_streaming_response:Ao,http_wasm_create_abort_controler:jo,http_wasm_abort_request:Ro,http_wasm_abort_response:Lo,http_wasm_fetch:$o,http_wasm_fetch_bytes:Co,http_wasm_get_response_header_names:Do,http_wasm_get_response_header_values:Bo,http_wasm_get_response_bytes:Mo,http_wasm_get_response_length:Oo,http_wasm_get_streamed_response_bytes:Fo,jiterpreter_dump_stats:Oi,jiterpreter_apply_options:rs,jiterpreter_get_options:os,mono_wasm_gc_lock:Fi,mono_wasm_gc_unlock:Pi,loadLazyAssembly:zi,loadSatelliteAssemblies:Vi}),Object.assign(l,{stringify_as_error_with_stack:ht,instantiate_symbols_asset:ga,instantiate_asset:ba,jiterpreter_dump_stats:Oi,forceDisposeProxies:Vr});const s={runMain:Nc,runMainAndExit:$c,setEnvironmentVariable:Nl,getAssemblyExports:Er,setModuleImports:rr,getConfig:()=>l.config,invokeLibraryInitializers:u.invokeLibraryInitializers,setHeapB32:z,setHeapU8:V,setHeapU16:W,setHeapU32:q,setHeapI8:J,setHeapI16:Y,setHeapI32:Z,setHeapI52:Q,setHeapU52:ee,setHeapI64Big:te,setHeapF32:ne,setHeapF64:re,getHeapB32:oe,getHeapU8:ae,getHeapU16:se,getHeapU32:ie,getHeapI8:pe,getHeapI16:de,getHeapI32:_e,getHeapI52:fe,getHeapU52:me,getHeapI64Big:he,getHeapF32:be,getHeapF64:ge,localHeapViewU8:Ee,localHeapViewU16:Ue,localHeapViewU32:Ie,localHeapViewI8:we,localHeapViewI16:Se,localHeapViewI32:ke,localHeapViewI64Big:ve,localHeapViewF32:Te,localHeapViewF64:xe};if(Object.assign(c,{INTERNAL:o.internal,Module:r,runtimeBuildInfo:{productVersion:e,gitHash:l.gitHash,buildConfiguration:"Release"},...s}),p||Object.assign(c,{MONO:o.mono,BINDING:o.binding}),void 0===r.disableDotnet6Compatibility&&(r.disableDotnet6Compatibility=!0),!r.disableDotnet6Compatibility){Object.assign(r,c),p||(r.mono_bind_static_method=(e,t)=>(pt("Module.mono_bind_static_method is obsolete, please use [JSExportAttribute] interop instead"),Sl(e,t)));const e=(e,t)=>{if(void 0!==a[e])return;let n;Object.defineProperty(globalThis,e,{get:()=>{if(j(n)){const r=(new Error).stack,o=r?r.substr(r.indexOf("\n",8)+1):"";pt(`global ${e} is obsolete, please use Module.${e} instead ${o}`),n=t()}return n}})};a.MONO=o.mono,a.BINDING=o.binding,a.INTERNAL=o.internal,a.Module=r,e("cwrap",(()=>r.cwrap)),e("addRunDependency",(()=>r.addRunDependency)),e("removeRunDependency",(()=>r.removeRunDependency))}let i;return a.getDotnetRuntime?i=a.getDotnetRuntime.__list:(a.getDotnetRuntime=e=>a.getDotnetRuntime.__list.getRuntime(e),a.getDotnetRuntime.__list=i=new Ml),i.registerRuntime(c),c}class Ml{constructor(){this.list={}}registerRuntime(e){return e.runtimeId=Object.keys(this.list).length,this.list[e.runtimeId]=hr(e),e.runtimeId}getRuntime(e){const t=this.list[e];return t?t.deref():void 0}}export{Ll as configureEmscriptenStartup,Rl as configureRuntimeStartup,Bl as configureWorkerStartup,Ol as initializeExports,Uo as initializeReplacements,b as passEmscriptenInternals,g as setRuntimeGlobals}; -//# sourceMappingURL=dotnet.runtime.js.map diff --git a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.br b/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.br deleted file mode 100644 index 970437a..0000000 Binary files a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.br and /dev/null differ diff --git a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.gz b/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.gz deleted file mode 100644 index 2ae4906..0000000 Binary files a/_framework/dotnet.runtime.8.0.2.8djt6nqnbz.js.gz and /dev/null differ diff --git a/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js new file mode 100755 index 0000000..4794130 --- /dev/null +++ b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js @@ -0,0 +1,4 @@ +//! Licensed to the .NET Foundation under one or more agreements. +//! The .NET Foundation licenses this file to you under the MIT license. +var e="8.0.3";let t,n;const r="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,o="function"==typeof importScripts,a="object"==typeof window||o&&!r,s=!a&&!r&&!o;let i,c=null,l=null,u=null,p=!1,d=!0,_=!0,f=!1,m=!1,h=!1;function b(e){i=e.isPThread,p=e.linkerDisableLegacyJsInterop,d=e.linkerWasmEnableSIMD,_=e.linkerWasmEnableEH,f=e.linkerEnableAotProfiler,m=e.linkerEnableBrowserProfiler,l.quit=e.quit_,l.ExitStatus=e.ExitStatus,l.moduleGitHash=e.gitHash}function g(e){if(h)throw new Error("Runtime module already loaded");h=!0,t=e.module,n=e.internal,l=e.runtimeHelpers,u=e.loaderHelpers,c=e.api,Object.assign(l,{gitHash:"9f4b1f5d664afdfc80e1508ab7ed099dff210fbd",allAssetsInMemory:y(),dotnetReady:y(),afterInstantiateWasm:y(),beforePreInit:y(),afterPreInit:y(),afterPreRun:y(),beforeOnRuntimeInitialized:y(),afterOnRuntimeInitialized:y(),afterPostRun:y(),mono_wasm_exit:()=>{throw new Error("Mono shutdown")},abort:e=>{throw e}}),Object.assign(e.module.config,{}),Object.assign(e.api,{Module:e.module,...e.module}),Object.assign(e.api,{INTERNAL:e.internal})}function y(e,t){return u.createPromiseController(e,t)}function w(e,t){if(e)return;const n="Assert failed: "+("function"==typeof t?t():t),r=new Error(n);l.abort(r)}const S=0,k=0,v=0,E=0,U=0,I=-1,x=0,T=0,j=0;function A(e){return null==e}var R;!function(e){e[e.None=0]="None",e[e.Void=1]="Void",e[e.Discard=2]="Discard",e[e.Boolean=3]="Boolean",e[e.Byte=4]="Byte",e[e.Char=5]="Char",e[e.Int16=6]="Int16",e[e.Int32=7]="Int32",e[e.Int52=8]="Int52",e[e.BigInt64=9]="BigInt64",e[e.Double=10]="Double",e[e.Single=11]="Single",e[e.IntPtr=12]="IntPtr",e[e.JSObject=13]="JSObject",e[e.Object=14]="Object",e[e.String=15]="String",e[e.Exception=16]="Exception",e[e.DateTime=17]="DateTime",e[e.DateTimeOffset=18]="DateTimeOffset",e[e.Nullable=19]="Nullable",e[e.Task=20]="Task",e[e.Array=21]="Array",e[e.ArraySegment=22]="ArraySegment",e[e.Span=23]="Span",e[e.Action=24]="Action",e[e.Function=25]="Function",e[e.JSException=26]="JSException"}(R||(R={}));var L=!1;const C=[],$=32768;let N,D;const B=BigInt("9223372036854775807"),O=BigInt("-9223372036854775808");function M(){N||(N=t._malloc($),D=N),C.push(D)}function F(e,t,n){if(!Number.isSafeInteger(e))throw new Error(`Assert failed: Value is not an integer: ${e} (${typeof e})`);if(!(e>=t&&e<=n))throw new Error(`Assert failed: Overflow: value ${e} is out of ${t} ${n} range`)}function P(e,t){Ee().fill(0,e,e+t)}function z(e,n){const r=!!n;"number"==typeof n&&F(n,0,1),t.HEAP32[e>>>2]=r?1:0}function V(e,n){F(n,0,255),t.HEAPU8[e]=n}function H(e,n){F(n,0,65535),t.HEAPU16[e>>>1]=n}function W(e,t,n){F(n,0,65535),e[t>>>1]=n}function G(e,n){t.HEAPU32[e>>>2]=n}function q(e,n){F(n,0,4294967295),t.HEAPU32[e>>>2]=n}function J(e,n){F(n,-128,127),t.HEAP8[e]=n}function Y(e,n){F(n,-32768,32767),t.HEAP16[e>>>1]=n}function X(e,n){t.HEAP32[e>>>2]=n}function Z(e,n){F(n,-2147483648,2147483647),t.HEAP32[e>>>2]=n}function K(e){if(0!==e)switch(e){case 1:throw new Error("value was not an integer");case 2:throw new Error("value out of range");default:throw new Error("unknown internal error")}}function Q(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);K(St.mono_wasm_f64_to_i52(e,t))}function ee(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);if(!(t>=0))throw new Error("Assert failed: Can't convert negative Number into UInt64");K(St.mono_wasm_f64_to_u52(e,t))}function te(e,n){if("bigint"!=typeof n)throw new Error(`Assert failed: Value is not an bigint: ${n} (${typeof n})`);if(!(n>=O&&n<=B))throw new Error(`Assert failed: Overflow: value ${n} is out of ${O} ${B} range`);t.HEAP64[e>>>3]=n}function ne(e,n){if("number"!=typeof n)throw new Error(`Assert failed: Value is not a Number: ${n} (${typeof n})`);t.HEAPF32[e>>>2]=n}function re(e,n){if("number"!=typeof n)throw new Error(`Assert failed: Value is not a Number: ${n} (${typeof n})`);t.HEAPF64[e>>>3]=n}function oe(e){return!!t.HEAP32[e>>>2]}function ae(e){return t.HEAPU8[e]}function se(e){return t.HEAPU16[e>>>1]}function ie(e){return t.HEAPU32[e>>>2]}function ce(e,t){return e[t>>>2]}function le(e){return St.mono_wasm_get_i32_unaligned(e)}function ue(e){return St.mono_wasm_get_i32_unaligned(e)>>>0}function pe(e){return t.HEAP8[e]}function de(e){return t.HEAP16[e>>>1]}function _e(e){return t.HEAP32[e>>>2]}function fe(e){const t=St.mono_wasm_i52_to_f64(e,l._i52_error_scratch_buffer);return K(_e(l._i52_error_scratch_buffer)),t}function me(e){const t=St.mono_wasm_u52_to_f64(e,l._i52_error_scratch_buffer);return K(_e(l._i52_error_scratch_buffer)),t}function he(e){return t.HEAP64[e>>>3]}function be(e){return t.HEAPF32[e>>>2]}function ge(e){return t.HEAPF64[e>>>3]}function ye(e){const n=t._malloc(e.length);return new Uint8Array(Ee().buffer,n,e.length).set(e),n}function we(){return t.HEAP8}function Se(){return t.HEAP16}function ke(){return t.HEAP32}function ve(){return t.HEAP64}function Ee(){return t.HEAPU8}function Ue(){return t.HEAPU16}function Ie(){return t.HEAPU32}function xe(){return t.HEAPF32}function Te(){return t.HEAPF64}const je=8192;let Ae=null,Re=null,Le=0;const Ce=[],$e=[];function Ne(e,n){if(e<=0)throw new Error("capacity >= 1");const r=4*(e|=0),o=t._malloc(r);if(o%4!=0)throw new Error("Malloc returned an unaligned offset");return P(o,r),new WasmRootBufferImpl(o,e,!0,n)}function De(e){let t;if(!e)throw new Error("address must be a location in the native heap");return $e.length>0?(t=$e.pop(),t._set_address(e)):t=new Fe(e),t}function Be(e=void 0){let t;if(Ce.length>0)t=Ce.pop();else{const e=function(){if(A(Ae)||!Re){Ae=Ne(je,"js roots"),Re=new Int32Array(je),Le=je;for(let e=0;e>>2,this.__count=t,this.length=t,this.__handle=St.mono_wasm_register_root(e,o,r||"noname"),this.__ownsAllocation=n}_throw_index_out_of_range(){throw new Error("index out of range")}_check_in_range(e){(e>=this.__count||e<0)&&this._throw_index_out_of_range()}get_address(e){return this._check_in_range(e),this.__offset+4*e}get_address_32(e){return this._check_in_range(e),this.__offset32+e}get(e){this._check_in_range(e);const t=this.get_address_32(e);return Ie()[t]}set(e,t){const n=this.get_address(e);return St.mono_wasm_write_managed_pointer_unsafe(n,t),t}copy_value_from_address(e,t){const n=this.get_address(e);St.mono_wasm_copy_managed_pointer(n,t)}_unsafe_get(e){return Ie()[this.__offset32+e]}_unsafe_set(e,t){const n=this.__offset+e;St.mono_wasm_write_managed_pointer_unsafe(n,t)}clear(){this.__offset&&P(this.__offset,4*this.__count)}release(){this.__offset&&this.__ownsAllocation&&(St.mono_wasm_deregister_root(this.__offset),P(this.__offset,4*this.__count),t._free(this.__offset)),this.__handle=this.__offset=this.__count=this.__offset32=0}toString(){return`[root buffer @${this.get_address(0)}, size ${this.__count} ]`}}class Me{constructor(e,t){this.__buffer=e,this.__index=t}get_address(){return this.__buffer.get_address(this.__index)}get_address_32(){return this.__buffer.get_address_32(this.__index)}get address(){return this.__buffer.get_address(this.__index)}get(){return this.__buffer._unsafe_get(this.__index)}set(e){const t=this.__buffer.get_address(this.__index);return St.mono_wasm_write_managed_pointer_unsafe(t,e),e}copy_from(e){const t=e.address,n=this.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_to(e){const t=this.address,n=e.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_from_address(e){const t=this.address;St.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.address;St.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){const e=this.__buffer.get_address_32(this.__index);Ie()[e]=0}release(){if(!this.__buffer)throw new Error("No buffer");var e;Ce.length>128?(void 0!==(e=this.__index)&&(Ae.set(e,0),Re[Le]=e,Le++),this.__buffer=null,this.__index=0):(this.set(0),Ce.push(this))}toString(){return`[root @${this.address}]`}}class Fe{constructor(e){this.__external_address=U,this.__external_address_32=0,this._set_address(e)}_set_address(e){this.__external_address=e,this.__external_address_32=e>>>2}get address(){return this.__external_address}get_address(){return this.__external_address}get_address_32(){return this.__external_address_32}get(){return Ie()[this.__external_address_32]}set(e){return St.mono_wasm_write_managed_pointer_unsafe(this.__external_address,e),e}copy_from(e){const t=e.address,n=this.__external_address;St.mono_wasm_copy_managed_pointer(n,t)}copy_to(e){const t=this.__external_address,n=e.address;St.mono_wasm_copy_managed_pointer(n,t)}copy_from_address(e){const t=this.__external_address;St.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.__external_address;St.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){Ie()[this.__external_address>>>2]=0}release(){$e.length<128&&$e.push(this)}toString(){return`[external root @${this.address}]`}}const Pe=new Map,ze="";let Ve;const He=new Map;let We,Ge,qe,Je,Ye=0,Xe=null,Ze=0;function Ke(e){if(void 0===Je){const n=new Uint8Array(2*e.length);return t.stringToUTF8Array(e,n,0,2*e.length),n}return Je.encode(e)}function Qe(e){const n=Ee();return function(e,n,r){const o=n+r;let a=n;for(;e[a]&&!(a>=o);)++a;if(a-n<=16)return t.UTF8ArrayToString(e,n,r);if(void 0===qe)return t.UTF8ArrayToString(e,n,r);const s=it(e,n,a);return qe.decode(s)}(n,e,n.length-e)}function et(e,t){if(We){const n=it(Ee(),e,t);return We.decode(n)}return tt(e,t)}function tt(e,t){let n="";const r=Ue();for(let o=e;o>>1];n+=String.fromCharCode(e)}return n}function nt(e,t,n){const r=Ue(),o=n.length;for(let a=0;a=t));a++);}function rt(e){if(e.value===E)return null;const t=Ve+0,n=Ve+4,r=Ve+8;let o;St.mono_wasm_string_get_data_ref(e.address,t,n,r);const a=Ie(),s=ce(a,n),i=ce(a,t),c=ce(a,r);if(c&&(o=He.get(e.value)),void 0===o&&(s&&i?(o=et(i,i+s),c&&He.set(e.value,o)):o=ze),void 0===o)throw new Error(`internal error when decoding string at location ${e.value}`);return o}function ot(e,t){if(t.clear(),null!==e)if("symbol"==typeof e)at(e,t);else{if("string"!=typeof e)throw new Error("Expected string argument, got "+typeof e);if(0===e.length)at(e,t);else{if(e.length<=256){const n=Pe.get(e);if(n)return void t.set(n)}st(e,t)}}}function at(e,t){let n;if("symbol"==typeof e?(n=e.description,"string"!=typeof n&&(n=Symbol.keyFor(e)),"string"!=typeof n&&(n="")):"string"==typeof e&&(n=e),"string"!=typeof n)throw new Error(`Argument to stringToInternedMonoStringRoot must be a string but was ${e}`);if(0===n.length&&Ye)return void t.set(Ye);const r=Pe.get(n);r?t.set(r):(st(n,t),function(e,t,n){if(!t.value)throw new Error("null pointer passed to _store_string_in_intern_table");Ze>=8192&&(Xe=null),Xe||(Xe=Ne(8192,"interned strings"),Ze=0);const r=Xe,o=Ze++;if(St.mono_wasm_intern_string_ref(t.address),!t.value)throw new Error("mono_wasm_intern_string_ref produced a null pointer");Pe.set(e,t.value),He.set(t.value,e),0!==e.length||Ye||(Ye=t.value),r.copy_value_from_address(o,t.address)}(n,t))}function st(e,n){const r=2*(e.length+1),o=t._malloc(r);nt(o,o+r,e),St.mono_wasm_string_from_utf16_ref(o,e.length,n.address),t._free(o)}function it(e,t,n){return e.buffer,e.subarray(t,n)}let ct="MONO_WASM: ";function lt(e,...t){l.diagnosticTracing&&console.debug(ct+e,...t)}function ut(e,...t){console.info(ct+e,...t)}function pt(e,...t){console.warn(ct+e,...t)}function dt(e,...t){t&&t.length>0&&t[0]&&"object"==typeof t[0]&&t[0].silent||console.error(ct+e,...t)}const _t=new Map,ft=[];function mt(e){try{if(0==_t.size)return e;const t=e;for(let n=0;n{const n=t.find((e=>"object"==typeof e&&void 0!==e.replaceSection));if(void 0===n)return e;const r=n.funcNum,o=n.replaceSection,a=_t.get(Number(r));return void 0===a?e:e.replace(o,`${a} (${o})`)}));if(r!==t)return r}return t}catch(t){return console.debug(`failed to symbolicate: ${t}`),e}}function ht(e){let t=e;return t&&t.stack||(t=new Error(t?""+t:"Unknown error")),mt(t.stack)}function bt(){return[..._t.values()]}ft.push(/at (?[^:()]+:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/),ft.push(/(?:WASM \[[\da-zA-Z]+\], (?function #(?[\d]+) \(''\)))/),ft.push(/(?[a-z]+:\/\/[^ )]*:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)/),ft.push(/(?<[^ >]+>[.:]wasm-function\[(?[0-9]+)\])/);const gt=[[!0,"mono_wasm_array_get_ref","void",["number","number","number"]],[!0,"mono_wasm_obj_array_new_ref","void",["number","number"]],[!0,"mono_wasm_obj_array_set_ref","void",["number","number","number"]],[!0,"mono_wasm_try_unbox_primitive_and_get_type_ref","number",["number","number","number"]],[!0,"mono_wasm_box_primitive_ref","void",["number","number","number","number"]],[!0,"mono_wasm_string_array_new_ref","void",["number","number"]],[!0,"mono_wasm_typed_array_new_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_get_delegate_invoke_ref","number",["number"]],[!0,"mono_wasm_get_type_name","string",["number"]],[!0,"mono_wasm_get_type_aqn","string",["number"]],[!0,"mono_wasm_obj_array_new","number",["number"]],[!0,"mono_wasm_obj_array_set","void",["number","number","number"]],[!0,"mono_wasm_array_length_ref","number",["number"]]],yt=[[!0,"mono_wasm_register_root","number",["number","number","string"]],[!0,"mono_wasm_deregister_root",null,["number"]],[!0,"mono_wasm_string_get_data_ref",null,["number","number","number","number"]],[!0,"mono_wasm_set_is_debugger_attached","void",["bool"]],[!0,"mono_wasm_send_dbg_command","bool",["number","number","number","number","number"]],[!0,"mono_wasm_send_dbg_command_with_parms","bool",["number","number","number","number","number","number","string"]],[!0,"mono_wasm_setenv",null,["string","string"]],[!0,"mono_wasm_parse_runtime_options",null,["number","number"]],[!0,"mono_wasm_strdup","number",["string"]],[!0,"mono_background_exec",null,[]],[!0,"mono_wasm_execute_timer",null,[]],[!0,"mono_wasm_load_icu_data","number",["number"]],[!1,"mono_wasm_add_assembly","number",["string","number","number"]],[!0,"mono_wasm_add_satellite_assembly","void",["string","string","number","number"]],[!1,"mono_wasm_load_runtime",null,["string","number"]],[!0,"mono_wasm_change_debugger_log_level","void",["number"]],[!0,"mono_wasm_get_corlib","number",[]],[!0,"mono_wasm_assembly_load","number",["string"]],[!0,"mono_wasm_assembly_find_class","number",["number","string","string"]],[!0,"mono_wasm_runtime_run_module_cctor","void",["number"]],[!0,"mono_wasm_assembly_find_method","number",["number","string","number"]],[!1,"mono_wasm_invoke_method_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_string_from_utf16_ref","void",["number","number","number"]],[!0,"mono_wasm_intern_string_ref","void",["number"]],[!0,"mono_wasm_assembly_get_entry_point","number",["number","number"]],[!0,"mono_wasm_class_get_type","number",["number"]],[!1,"mono_wasm_exit","void",["number"]],[!1,"mono_wasm_abort","void",[]],[!0,"mono_wasm_getenv","number",["string"]],[!0,"mono_wasm_set_main_args","void",["number","number"]],[!1,"mono_wasm_enable_on_demand_gc","void",["number"]],[()=>!f,"mono_wasm_profiler_init_aot","void",["string"]],[()=>!m,"mono_wasm_profiler_init_aot","void",["string"]],[!0,"mono_wasm_profiler_init_browser","void",["number"]],[!1,"mono_wasm_exec_regression","number",["number","string"]],[!1,"mono_wasm_invoke_method_bound","number",["number","number","number"]],[!0,"mono_wasm_write_managed_pointer_unsafe","void",["number","number"]],[!0,"mono_wasm_copy_managed_pointer","void",["number","number"]],[!0,"mono_wasm_i52_to_f64","number",["number","number"]],[!0,"mono_wasm_u52_to_f64","number",["number","number"]],[!0,"mono_wasm_f64_to_i52","number",["number","number"]],[!0,"mono_wasm_f64_to_u52","number",["number","number"]],[!0,"mono_wasm_method_get_name","number",["number"]],[!0,"mono_wasm_method_get_full_name","number",["number"]],[!0,"mono_wasm_gc_lock","void",[]],[!0,"mono_wasm_gc_unlock","void",[]],[!0,"mono_wasm_get_i32_unaligned","number",["number"]],[!0,"mono_wasm_get_f32_unaligned","number",["number"]],[!0,"mono_wasm_get_f64_unaligned","number",["number"]],[!0,"mono_jiterp_trace_bailout","void",["number"]],[!0,"mono_jiterp_get_trace_bailout_count","number",["number"]],[!0,"mono_jiterp_value_copy","void",["number","number","number"]],[!0,"mono_jiterp_get_member_offset","number",["number"]],[!0,"mono_jiterp_encode_leb52","number",["number","number","number"]],[!0,"mono_jiterp_encode_leb64_ref","number",["number","number","number"]],[!0,"mono_jiterp_encode_leb_signed_boundary","number",["number","number","number"]],[!0,"mono_jiterp_write_number_unaligned","void",["number","number","number"]],[!0,"mono_jiterp_type_is_byref","number",["number"]],[!0,"mono_jiterp_get_size_of_stackval","number",[]],[!0,"mono_jiterp_parse_option","number",["string"]],[!0,"mono_jiterp_get_options_as_json","number",[]],[!0,"mono_jiterp_get_options_version","number",[]],[!0,"mono_jiterp_adjust_abort_count","number",["number","number"]],[!0,"mono_jiterp_register_jit_call_thunk","void",["number","number"]],[!0,"mono_jiterp_type_get_raw_value_size","number",["number"]],[!0,"mono_jiterp_update_jit_call_dispatcher","void",["number"]],[!0,"mono_jiterp_get_signature_has_this","number",["number"]],[!0,"mono_jiterp_get_signature_return_type","number",["number"]],[!0,"mono_jiterp_get_signature_param_count","number",["number"]],[!0,"mono_jiterp_get_signature_params","number",["number"]],[!0,"mono_jiterp_type_to_ldind","number",["number"]],[!0,"mono_jiterp_type_to_stind","number",["number"]],[!0,"mono_jiterp_imethod_to_ftnptr","number",["number"]],[!0,"mono_jiterp_debug_count","number",[]],[!0,"mono_jiterp_get_trace_hit_count","number",["number"]],[!0,"mono_jiterp_get_polling_required_address","number",[]],[!0,"mono_jiterp_get_rejected_trace_count","number",[]],[!0,"mono_jiterp_boost_back_branch_target","void",["number"]],[!0,"mono_jiterp_is_imethod_var_address_taken","number",["number","number"]],[!0,"mono_jiterp_get_opcode_value_table_entry","number",["number"]],[!0,"mono_jiterp_get_simd_intrinsic","number",["number","number"]],[!0,"mono_jiterp_get_simd_opcode","number",["number","number"]],[!0,"mono_jiterp_get_arg_offset","number",["number","number","number"]],[!0,"mono_jiterp_get_opcode_info","number",["number","number"]],[!0,"mono_wasm_is_zero_page_reserved","number",[]],[!0,"mono_jiterp_is_special_interface","number",["number"]],...gt],wt={};var St=wt;const kt=wt,vt=wt,Et=["void","number",null];function Ut(e,n,r,o){let a=void 0===o&&Et.indexOf(n)>=0&&(!r||r.every((e=>Et.indexOf(e)>=0)))&&t.asm?t.asm[e]:void 0;if(a&&r&&a.length!==r.length&&(dt(`argument count mismatch for cwrap ${e}`),a=void 0),"function"!=typeof a&&(a=t.cwrap(e,n,r,o)),"function"!=typeof a)throw new Error(`cwrap ${e} not found or not a function`);return a}function It(e,t,n){const r=function(e,t,n){let r,o="number"==typeof t?t:0;r="number"==typeof n?o+n:e.length-o;const a={read:function(){if(o>=r)return null;const t=e[o];return o+=1,t}};return Object.defineProperty(a,"eof",{get:function(){return o>=r},configurable:!0,enumerable:!0}),a}(e,t,n);let o="",a=0,s=0,i=0,c=0,l=0,u=0;for(;a=r.read(),s=r.read(),i=r.read(),null!==a;)null===s&&(s=0,l+=1),null===i&&(i=0,l+=1),u=a<<16|s<<8|i<<0,c=(16777215&u)>>18,o+=xt[c],c=(262143&u)>>12,o+=xt[c],l<2&&(c=(4095&u)>>6,o+=xt[c]),2===l?o+="==":1===l?o+="=":(c=(63&u)>>0,o+=xt[c]);return o}const xt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],Tt=new Map;Tt.remove=function(e){const t=this.get(e);return this.delete(e),t};let jt,At,Rt,Lt={},Ct=0,$t=-1;function mono_wasm_runtime_ready(){if(n.mono_wasm_runtime_is_ready=l.mono_wasm_runtime_is_ready=!0,Ct=0,Lt={},$t=-1,globalThis.dotnetDebugger)debugger}function mono_wasm_fire_debugger_agent_message_with_data_to_pause(e){console.assert(!0,`mono_wasm_fire_debugger_agent_message_with_data ${e}`);debugger}function Nt(e){e.length>$t&&(jt&&t._free(jt),$t=Math.max(e.length,$t,256),jt=t._malloc($t));const n=atob(e),r=Ee();for(let e=0;ee.value)),e;if(void 0===t.dimensionsDetails||1===t.dimensionsDetails.length)return e=t.items.map((e=>e.value)),e}const n={};return Object.keys(t).forEach((e=>{const r=t[e];void 0!==r.get?Object.defineProperty(n,r.name,{get:()=>Bt(r.get.id,r.get.commandSet,r.get.command,r.get.buffer),set:function(e){return Dt(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}}):void 0!==r.set?Object.defineProperty(n,r.name,{get:()=>r.value,set:function(e){return Dt(r.set.id,r.set.commandSet,r.set.command,r.set.buffer,r.set.length,r.set.valtype,e),!0}}):n[r.name]=r.value})),n}(t,n);const o=null!=e.arguments?e.arguments.map((e=>JSON.stringify(e.value))):[],a=`const fn = ${e.functionDeclaration}; return fn.apply(proxy, [${o}]);`,s=new Function("proxy",a)(r);if(void 0===s)return{type:"undefined"};if(Object(s)!==s)return"object"==typeof s&&null==s?{type:typeof s,subtype:`${s}`,value:null}:{type:typeof s,description:`${s}`,value:`${s}`};if(e.returnByValue&&null==s.subtype)return{type:"object",value:s};if(Object.getPrototypeOf(s)==Array.prototype){const e=Gt(s);return{type:"object",subtype:"array",className:"Array",description:`Array(${s.length})`,objectId:e}}return void 0!==s.value||void 0!==s.subtype?s:s==r?{type:"object",className:"Object",description:"Object",objectId:t}:{type:"object",className:"Object",description:"Object",objectId:Gt(s)}}function Wt(e,t={}){return function(e,t){if(!(e in Lt))throw new Error(`Could not find any object with id ${e}`);const n=Lt[e],r=Object.getOwnPropertyDescriptors(n);t.accessorPropertiesOnly&&Object.keys(r).forEach((e=>{void 0===r[e].get&&Reflect.deleteProperty(r,e)}));const o=[];return Object.keys(r).forEach((e=>{let t;const n=r[e];t="object"==typeof n.value?Object.assign({name:e},n):void 0!==n.value?{name:e,value:Object.assign({type:typeof n.value,description:""+n.value},n)}:void 0!==n.get?{name:e,get:{className:"Function",description:`get ${e} () {}`,type:"function"}}:{name:e,value:{type:"symbol",value:"",description:""}},o.push(t)})),{__value_as_json_string__:JSON.stringify(o)}}(`dotnet:cfo_res:${e}`,t)}function Gt(e){const t="dotnet:cfo_res:"+Ct++;return Lt[t]=e,t}function qt(e){e in Lt&&delete Lt[e]}function Jt(){if(l.enablePerfMeasure)return globalThis.performance.now()}function Yt(e,t,n){if(l.enablePerfMeasure&&e){const r=a?{start:e}:{startTime:e},o=n?`${t}${n} `:t;globalThis.performance.measure(o,r)}}const Xt=[],Zt=new Map,Kt=new Map,Qt=new Map,en=Symbol.for("wasm bound_cs_function"),tn=Symbol.for("wasm bound_js_function"),nn=Symbol.for("wasm imported_js_function"),rn=16;function on(e){const n=t.stackAlloc(rn*e);return n&&n%8==0||w(!1,"Arg alignment"),hn(an(n,0),R.None),hn(an(n,1),R.None),n}function an(e,t){return e||w(!1,"Null args"),e+t*rn}function sn(e,t){return e||w(!1,"Null signatures"),e+32*t+8}function cn(e){return e||w(!1,"Null sig"),ie(e)}function ln(e){return e||w(!1,"Null sig"),ie(e+16)}function un(e){return e||w(!1,"Null sig"),ie(e+20)}function pn(e){return e||w(!1,"Null sig"),ie(e+24)}function dn(e){return e||w(!1,"Null sig"),ie(e+28)}function _n(e){return e||w(!1,"Null signatures"),_e(e+4)}function fn(e){return e||w(!1,"Null signatures"),_e(e)}function mn(e){return e||w(!1,"Null arg"),ie(e+12)}function hn(e,t){e||w(!1,"Null arg"),q(e+12,t)}function bn(e){return e||w(!1,"Null arg"),ie(e)}function gn(e,t){if(e||w(!1,"Null arg"),"boolean"!=typeof t)throw new Error(`Assert failed: Value is not a Boolean: ${t} (${typeof t})`);V(e,t?1:0)}function yn(e,t){e||w(!1,"Null arg"),q(e,t)}function wn(e,t){e||w(!1,"Null arg"),re(e,t.getTime())}function Sn(e,t){e||w(!1,"Null arg"),re(e,t)}function kn(e){return e||w(!1,"Null arg"),ie(e+4)}function vn(e,t){e||w(!1,"Null arg"),q(e+4,t)}function En(e){return e||w(!1,"Null arg"),ie(e+4)}function Un(e,t){e||w(!1,"Null arg"),q(e+4,t)}function In(e){return e||w(!1,"Null arg"),De(e)}function xn(e){return e||w(!1,"Null arg"),_e(e+8)}function Tn(e,t){e||w(!1,"Null arg"),Z(e+8,t)}class ManagedObject{dispose(){Mr(this,T)}get isDisposed(){return this[Lr]===T}toString(){return`CsObject(gc_handle: ${this[Lr]})`}}class ManagedError extends Error{constructor(e){super(e),this.superStack=Object.getOwnPropertyDescriptor(this,"stack"),Object.defineProperty(this,"stack",{get:this.getManageStack})}getSuperStack(){if(this.superStack){if(void 0!==this.superStack.value)return this.superStack.value;if(void 0!==this.superStack.get)return this.superStack.get.call(this)}return super.stack}getManageStack(){if(this.managed_stack)return this.managed_stack;if(u.is_runtime_running()&&!L){const e=this[Lr];if(e!==T){const t=l.javaScriptExports.get_managed_stack_trace(e);if(t)return this.managed_stack=t+"\n"+this.getSuperStack(),this.managed_stack}}return this.getSuperStack()}dispose(){Mr(this,T)}get isDisposed(){return this[Lr]===T}}function jn(e){return e==R.Byte?1:e==R.Int32?4:e==R.Int52||e==R.Double?8:e==R.String||e==R.Object||e==R.JSObject?rn:-1}class An{constructor(e,t,n){this._pointer=e,this._length=t,this._viewType=n}_unsafe_create_view(){const e=0==this._viewType?new Uint8Array(Ee().buffer,this._pointer,this._length):1==this._viewType?new Int32Array(ke().buffer,this._pointer,this._length):2==this._viewType?new Float64Array(Te().buffer,this._pointer,this._length):null;if(!e)throw new Error("NotImplementedException");return e}set(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw new Error(`Assert failed: Expected ${n.constructor}`);n.set(e,t)}copyTo(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const n=this._unsafe_create_view();if(!e||!n||e.constructor!==n.constructor)throw new Error(`Assert failed: Expected ${n.constructor}`);const r=n.subarray(t);e.set(r)}slice(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._unsafe_create_view().slice(e,t)}get length(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._length}get byteLength(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return 0==this._viewType?this._length:1==this._viewType?this._length<<2:2==this._viewType?this._length<<3:0}}class Span extends An{constructor(e,t,n){super(e,t,n),this.is_disposed=!1}dispose(){this.is_disposed=!0}get isDisposed(){return this.is_disposed}}class ArraySegment extends An{constructor(e,t,n){super(e,t,n)}dispose(){Mr(this,T)}get isDisposed(){return this[Lr]===T}}function Rn(e,t,n){if(t===R.None||t===R.Void)return;let r,o,a,s;o=Xr(un(e)),a=Xr(pn(e)),s=Xr(dn(e));const i=ln(e);r=Ln(i),t===R.Nullable&&(t=i);const c=Ln(t),l=un(e),u=n*rn;return e=>c(e+u,l,r,o,a,s)}function Ln(e){if(e===R.None||e===R.Void)return;const t=Kt.get(e);return t&&"function"==typeof t||w(!1,`ERR41: Unknown converter for type ${e}. ${Jr}`),t}function Cn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),!!ae(e)}(e)}function $n(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ae(e)}(e)}function Nn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),se(e)}(e)}function Dn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),de(e)}(e)}function Bn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),_e(e)}(e)}function On(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ge(e)}(e)}function Mn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),he(e)}(e)}function Fn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),be(e)}(e)}function Pn(e){return mn(e)==R.None?null:function(e){return e||w(!1,"Null arg"),ge(e)}(e)}function zn(e){return mn(e)==R.None?null:bn(e)}function Vn(){return null}function Hn(e){return mn(e)===R.None?null:function(e){e||w(!1,"Null arg");const t=ge(e);return new Date(t)}(e)}function Wn(e,t,n,r,o,a){if(mn(e)===R.None)return null;const s=En(e);let i=zr(s);return null==i&&(i=(e,t,i)=>l.javaScriptExports.call_delegate(s,e,t,i,n,r,o,a),i.dispose=()=>{i.isDisposed||(i.isDisposed=!0,Mr(i,s))},i.isDisposed=!1,Or(i,s)),i}function Gn(e,t,n){const r=mn(e);if(r===R.None)return null;if(r!==R.Task){n||(n=Kt.get(r)),n||w(!1,`Unknown sub_converter for type ${R[r]}. ${Jr}`);const t=n(e);return new Promise((e=>e(t)))}const o=kn(e);if(o==x)return new Promise((e=>e(void 0)));const a=Nr(o);a||w(!1,`ERR28: promise not found for js_handle: ${o} `),u.assertIsControllablePromise(a);const s=u.getPromiseController(a),i=s.resolve;return s.resolve=e=>{const t=mn(e);if(t===R.None)return void i(null);n||(n=Kt.get(t)),n||w(!1,`Unknown sub_converter for type ${R[t]}. ${Jr}`);const r=n(e);i(r)},a}function qn(e){if(mn(e)==R.None)return null;const t=In(e);try{return rt(t)}finally{t.release()}}function Jn(e){const t=mn(e);if(t==R.None)return null;if(t==R.JSException)return Nr(kn(e));const n=En(e);let r=zr(n);if(null==r){const t=qn(e);r=new ManagedError(t),Or(r,n)}return r}function Yn(e){return mn(e)==R.None?null:Nr(kn(e))}function Xn(e){const t=mn(e);if(t==R.None)return null;if(t==R.JSObject)return Nr(kn(e));if(t==R.Array){const t=function(e){return e||w(!1,"Null arg"),ie(e+4)}(e);return Kn(e,t)}if(t==R.Object){const t=En(e);if(t===T)return null;let n=zr(t);return n||(n=new ManagedObject,Or(n,t)),n}const n=Kt.get(t);return n||w(!1,`Unknown converter for type ${R[t]}. ${Jr}`),n(e)}function Zn(e,t){return t||w(!1,"Expected valid element_type parameter"),Kn(e,t)}function Kn(e,n){if(mn(e)==R.None)return null;-1==jn(n)&&w(!1,`Element type ${R[n]} not supported`);const r=bn(e),o=xn(e);let a=null;if(n==R.String){a=new Array(o);for(let e=0;e>2,(r>>2)+o).slice();else{if(n!=R.Double)throw new Error(`NotImplementedException ${R[n]}. ${Jr}`);a=Te().subarray(r>>3,(r>>3)+o).slice()}return t._free(r),a}function Qn(e,t){t||w(!1,"Expected valid element_type parameter");const n=bn(e),r=xn(e);let o=null;if(t==R.Byte)o=new Span(n,r,0);else if(t==R.Int32)o=new Span(n,r,1);else{if(t!=R.Double)throw new Error(`NotImplementedException ${R[t]}. ${Jr}`);o=new Span(n,r,2)}return o}function er(e,t){t||w(!1,"Expected valid element_type parameter");const n=bn(e),r=xn(e);let o=null;if(t==R.Byte)o=new ArraySegment(n,r,0);else if(t==R.Int32)o=new ArraySegment(n,r,1);else{if(t!=R.Double)throw new Error(`NotImplementedException ${R[t]}. ${Jr}`);o=new ArraySegment(n,r,2)}return Or(o,En(e)),o}let tr;const nr=[null];function rr(e,t){ur.set(e,t),lt(`added module imports '${e}'`)}function or(e,t,n){if(!e)throw new Error("Assert failed: Null reference");e[t]=n}function ar(e,t){if(!e)throw new Error("Assert failed: Null reference");return e[t]}function sr(e,t){if(!e)throw new Error("Assert failed: Null reference");return t in e}function ir(e,t){if(!e)throw new Error("Assert failed: Null reference");return typeof e[t]}function cr(){return globalThis}const lr=new Map,ur=new Map;function pr(e,t){e&&"string"==typeof e||w(!1,"module_name must be string"),t&&"string"==typeof t||w(!1,"module_url must be string");let n=lr.get(e);const r=!n;return r&&(lt(`importing ES6 module '${e}' from '${t}'`),n=import(t),lr.set(e,n)),Gr((async()=>{const o=await n;return r&&(ur.set(e,o),lt(`imported ES6 module '${e}' from '${t}'`)),o}))}function dr(e,t,n){const r=function(e,t){let n="unknown exception";if(t){n=t.toString();const e=t.stack;e&&(e.startsWith(n)?n=e:n+="\n"+e),n=mt(n)}return e&&X(e,1),n}(e,t);ot(r,n)}function _r(e,t){e&&X(e,0),t&&t.clear()}function fr(){u.assert_runtime_running(),l.mono_wasm_bindings_is_ready||w(!1,"The runtime must be initialized.")}const mr="function"==typeof globalThis.WeakRef;function hr(e){return mr?new WeakRef(e):{deref:()=>e,dispose:()=>{e=null}}}const br=new Map,gr=new Map;let yr=0;function wr(e){if(br.has(e))return br.get(e);const t=St.mono_wasm_assembly_load(e);return br.set(e,t),t}function Sr(e,t){yr||(yr=St.mono_wasm_get_corlib());let n=function(e,t,n){let r=gr.get(e);r||gr.set(e,r=new Map);let o=r.get(t);return o||(o=new Map,r.set(t,o)),o.get(n)}(yr,e,t);if(void 0!==n)return n;if(n=St.mono_wasm_assembly_find_class(yr,e,t),!n)throw new Error(`Failed to find corlib class ${e}.${t}`);return function(e,t,n,r){const o=gr.get(e);if(!o)throw new Error("internal error");const a=o.get(t);if(!a)throw new Error("internal error");a.set(n,r)}(yr,e,t,n),n}function kr(e,t){fr();const n=Be();try{if(St.mono_wasm_invoke_method_bound(e,t,n.address))throw new Error("ERR24: Unexpected error: "+rt(n));if(function(e){return e||w(!1,"Null args"),mn(e)!==R.None}(t))throw Jn(an(t,0))}finally{n.release()}}const vr=new Map;async function Er(e){if(fr(),!vr.get(e)){const t=Jt(),n=wr(e);if(!n)throw new Error("Could not find assembly: "+e);const r=St.mono_wasm_assembly_find_class(n,l.runtime_interop_namespace,"__GeneratedInitializer");if(r){const e=St.mono_wasm_assembly_find_method(r,"__Register_",-1);if(e){const t=Be(),n=Be();try{if(St.mono_wasm_invoke_method_ref(e,U,j,t.address,n.address),t.value!==S){const e=rt(n);throw new Error(e)}}finally{t.release(),n.release()}}}else St.mono_wasm_runtime_run_module_cctor(n);Yt(t,"mono.getAssemblyExports:",e)}return vr.get(e)||{}}function Ur(e){const t=e.substring(e.indexOf("[")+1,e.indexOf("]")).trim(),n=(e=e.substring(e.indexOf("]")+1).trim()).substring(e.indexOf(":")+1);let r="",o=e=e.substring(0,e.indexOf(":")).trim();if(-1!=e.indexOf(".")){const t=e.lastIndexOf(".");r=e.substring(0,t),o=e.substring(t+1)}if(!t.trim())throw new Error("No assembly name specified "+e);if(!o.trim())throw new Error("No class name specified "+e);if(!n.trim())throw new Error("No method name specified "+e);return{assembly:t,namespace:r,classname:o,methodname:n}}const Ir="function"==typeof globalThis.FinalizationRegistry;let xr;const Tr=[null],jr=[];let Ar=1;const Rr=new Map;Ir&&(xr=new globalThis.FinalizationRegistry(Pr));const Lr=Symbol.for("wasm js_owned_gc_handle"),Cr=Symbol.for("wasm cs_owned_js_handle"),$r=Symbol.for("wasm do_not_force_dispose");function Nr(e){return e!==x&&e!==I?Tr[e]:null}function Dr(e){if(e[Cr])return e[Cr];const t=jr.length?jr.pop():Ar++;return Tr[t]=e,Object.isExtensible(e)&&(e[Cr]=t),t}function Br(e){const t=Tr[e];null!=t&&(void 0!==t[Cr]&&(t[Cr]=void 0),Tr[e]=void 0,jr.push(e))}function Or(e,t){e[Lr]=t,Ir&&xr.register(e,t,e);const n=hr(e);Rr.set(t,n)}function Mr(e,t){e&&(t=e[Lr],e[Lr]=T,Ir&&xr.unregister(e)),t!==T&&Rr.delete(t)&&l.javaScriptExports.release_js_owned_object_by_gc_handle(t)}function Fr(e){const t=e[Lr];if(t==T)throw new Error("Assert failed: ObjectDisposedException");return t}function Pr(e){u.is_exited()||Mr(null,e)}function zr(e){if(!e)return null;const t=Rr.get(e);return t?t.deref():null}function Vr(e,t){let n=!1,r=!1,o=0,a=0,s=0,i=0;const c=[...Rr.keys()];for(const e of c){const r=Rr.get(e),o=r.deref();if(Ir&&o&&xr.unregister(o),o){const a="boolean"==typeof o[$r]&&o[$r];if(t&&pt(`Proxy of C# ${typeof o} with GCHandle ${e} was still alive. ${a?"keeping":"disposing"}.`),a)n=!0;else{const t=u.getPromiseController(o);t&&t.reject(new Error("WebWorker which is origin of the Task is being terminated.")),"function"==typeof o.dispose&&o.dispose(),o[Lr]===e&&(o[Lr]=T),!mr&&r&&r.dispose(),s++}}}n||(Rr.clear(),Ir&&(xr=new globalThis.FinalizationRegistry(Pr)));for(let e=0;en.resolve(e))).catch((e=>n.reject(e))),t}function qr(e){const t=zr(e);if(!t)return;const n=t.promise;n||w(!1,`Expected Promise for GCHandle ${e}`),u.assertIsControllablePromise(n),u.getPromiseController(n).reject(new Error("OperationCanceledException"))}const Jr="For more information see https://aka.ms/dotnet-wasm-jsinterop";function Yr(e,t,n){if(t===R.None||t===R.Void)return;let r,o,a,s;o=Ln(un(e)),a=Ln(pn(e)),s=Ln(dn(e));const i=ln(e);r=Xr(i),t===R.Nullable&&(t=i);const c=Xr(t),l=un(e),u=n*rn;return(e,t)=>{c(e+u,t,l,r,o,a,s)}}function Xr(e){if(e===R.None||e===R.Void)return;const t=Qt.get(e);return t&&"function"==typeof t||w(!1,`ERR30: Unknown converter for type ${e}`),t}function Zr(e,t){null==t?hn(e,R.None):(hn(e,R.Boolean),gn(e,t))}function Kr(e,t){null==t?hn(e,R.None):(hn(e,R.Byte),function(e,t){e||w(!1,"Null arg"),V(e,t)}(e,t))}function Qr(e,t){null==t?hn(e,R.None):(hn(e,R.Char),function(e,t){e||w(!1,"Null arg"),H(e,t)}(e,t))}function eo(e,t){null==t?hn(e,R.None):(hn(e,R.Int16),function(e,t){e||w(!1,"Null arg"),Y(e,t)}(e,t))}function to(e,t){null==t?hn(e,R.None):(hn(e,R.Int32),function(e,t){e||w(!1,"Null arg"),Z(e,t)}(e,t))}function no(e,t){null==t?hn(e,R.None):(hn(e,R.Int52),function(e,t){if(e||w(!1,"Null arg"),!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not an integer: ${t} (${typeof t})`);re(e,t)}(e,t))}function ro(e,t){null==t?hn(e,R.None):(hn(e,R.BigInt64),function(e,t){e||w(!1,"Null arg"),te(e,t)}(e,t))}function oo(e,t){null==t?hn(e,R.None):(hn(e,R.Double),Sn(e,t))}function ao(e,t){null==t?hn(e,R.None):(hn(e,R.Single),function(e,t){e||w(!1,"Null arg"),ne(e,t)}(e,t))}function so(e,t){null==t?hn(e,R.None):(hn(e,R.IntPtr),yn(e,t))}function io(e,t){if(null==t)hn(e,R.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");hn(e,R.DateTime),wn(e,t)}}function co(e,t){if(null==t)hn(e,R.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");hn(e,R.DateTimeOffset),wn(e,t)}}function lo(e,t){if(null==t)hn(e,R.None);else{if(hn(e,R.String),"string"!=typeof t)throw new Error("Assert failed: Value is not a String");uo(e,t)}}function uo(e,t){const n=In(e);try{ot(t,n)}finally{n.release()}}function po(e){hn(e,R.None)}function _o(e,t,n,r,o,a,s){if(null==t)return void hn(e,R.None);if(!(t&&t instanceof Function))throw new Error("Assert failed: Value is not a Function");const i=e=>{const n=an(e,0),c=an(e,1),l=an(e,2),u=an(e,3),p=an(e,4);try{let e,n,d;L&&i.isDisposed,o&&(e=o(l)),a&&(n=a(u)),s&&(d=s(p));const _=t(e,n,d);r&&r(c,_)}catch(e){ho(n,e)}};i[tn]=!0,i.isDisposed=!1,i.dispose=()=>{i.isDisposed=!0},vn(e,Dr(i)),hn(e,R.Function)}class fo{constructor(e){this.promise=e}dispose(){Mr(this,T)}get isDisposed(){return this[Lr]===T}}function mo(e,t,n,r){if(null==t)return void hn(e,R.None);if(!Wr(t))throw new Error("Assert failed: Value is not a Promise");const o=l.javaScriptExports.create_task_callback();Un(e,o),hn(e,R.Task);const a=new fo(t);Or(a,o),t.then((e=>{try{u.assert_runtime_running(),a.isDisposed&&w(!1,"This promise can't be propagated to managed code, because the Task was already freed."),l.javaScriptExports.complete_task(o,null,e,r||go),Mr(a,o)}catch(e){pt("Exception marshalling result of JS promise to CS: ",e)}})).catch((e=>{try{u.assert_runtime_running(),a.isDisposed&&w(!1,"This promise can't be propagated to managed code, because the Task was already freed."),l.javaScriptExports.complete_task(o,e,null,void 0),Mr(a,o)}catch(e){u.is_exited()||pt("Exception marshalling error of JS promise to CS: ",e)}}))}function ho(e,t){if(null==t)hn(e,R.None);else if(t instanceof ManagedError)hn(e,R.Exception),Un(e,Fr(t));else{if("object"!=typeof t&&"string"!=typeof t)throw new Error("Assert failed: Value is not an Error "+typeof t);hn(e,R.JSException),uo(e,t.toString());const n=t[Cr];vn(e,n||Dr(t))}}function bo(e,t){if(null==t)hn(e,R.None);else{if(void 0!==t[Lr])throw new Error(`Assert failed: JSObject proxy of ManagedObject proxy is not supported. ${Jr}`);if("function"!=typeof t&&"object"!=typeof t)throw new Error(`Assert failed: JSObject proxy of ${typeof t} is not supported`);hn(e,R.JSObject),vn(e,Dr(t))}}function go(e,t){if(null==t)hn(e,R.None);else{const n=t[Lr],r=typeof t;if(void 0===n)if("string"===r||"symbol"===r)hn(e,R.String),uo(e,t);else if("number"===r)hn(e,R.Double),Sn(e,t);else{if("bigint"===r)throw new Error("NotImplementedException: bigint");if("boolean"===r)hn(e,R.Boolean),gn(e,t);else if(t instanceof Date)hn(e,R.DateTime),wn(e,t);else if(t instanceof Error)ho(e,t);else if(t instanceof Uint8Array)wo(e,t,R.Byte);else if(t instanceof Float64Array)wo(e,t,R.Double);else if(t instanceof Int32Array)wo(e,t,R.Int32);else if(Array.isArray(t))wo(e,t,R.Object);else{if(t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array)throw new Error("NotImplementedException: TypedArray");if(Wr(t))mo(e,t);else{if(t instanceof Span)throw new Error("NotImplementedException: Span");if("object"!=r)throw new Error(`JSObject proxy is not supported for ${r} ${t}`);{const n=Dr(t);hn(e,R.JSObject),vn(e,n)}}}}else{if(Fr(t),t instanceof ArraySegment)throw new Error("NotImplementedException: ArraySegment. "+Jr);if(t instanceof ManagedError)hn(e,R.Exception),Un(e,n);else{if(!(t instanceof ManagedObject))throw new Error("NotImplementedException "+r+". "+Jr);hn(e,R.Object),Un(e,n)}}}}function yo(e,t,n){n||w(!1,"Expected valid element_type parameter"),wo(e,t,n)}function wo(e,n,r){if(null==n)hn(e,R.None);else{const o=jn(r);-1==o&&w(!1,`Element type ${R[r]} not supported`);const a=n.length,s=o*a,i=t._malloc(s);if(r==R.String){if(!Array.isArray(n))throw new Error("Assert failed: Value is not an Array");P(i,s),St.mono_wasm_register_root(i,s,"marshal_array_to_cs");for(let e=0;e>2,(i>>2)+a).set(n)}else{if(r!=R.Double)throw new Error("not implemented");if(!(Array.isArray(n)||n instanceof Float64Array))throw new Error("Assert failed: Value is not an Array or Float64Array");Te().subarray(i>>3,(i>>3)+a).set(n)}yn(e,i),hn(e,R.Array),function(e,t){e||w(!1,"Null arg"),q(e+4,t)}(e,r),Tn(e,n.length)}}function So(e,t,n){if(n||w(!1,"Expected valid element_type parameter"),t.isDisposed)throw new Error("Assert failed: ObjectDisposedException");vo(n,t._viewType),hn(e,R.Span),yn(e,t._pointer),Tn(e,t.length)}function ko(e,t,n){n||w(!1,"Expected valid element_type parameter");const r=Fr(t);r||w(!1,"Only roundtrip of ArraySegment instance created by C#"),vo(n,t._viewType),hn(e,R.ArraySegment),yn(e,t._pointer),Tn(e,t.length),Un(e,r)}function vo(e,t){if(e==R.Byte){if(0!=t)throw new Error("Assert failed: Expected MemoryViewType.Byte")}else if(e==R.Int32){if(1!=t)throw new Error("Assert failed: Expected MemoryViewType.Int32")}else{if(e!=R.Double)throw new Error(`NotImplementedException ${R[e]} `);if(2!=t)throw new Error("Assert failed: Expected MemoryViewType.Double")}}const Eo={now:function(){return Date.now()}};function Uo(e){void 0===globalThis.performance&&(globalThis.performance=Eo),e.require=n.require,e.scriptDirectory=u.scriptDirectory,t.locateFile===t.__locateFile&&(t.locateFile=u.locateFile),e.fetch=u.fetch_like,e.noExitRuntime=a&&!i;const r=e.updateMemoryViews;l.updateMemoryViews=e.updateMemoryViews=()=>{r()}}async function Io(){var e;if(r){if(globalThis.performance===Eo){const{performance:e}=n.require("perf_hooks");globalThis.performance=e}if(n.process=await import("process"),globalThis.crypto||(globalThis.crypto={}),!globalThis.crypto.getRandomValues){let e;try{e=n.require("node:crypto")}catch(e){}e?e.webcrypto?globalThis.crypto=e.webcrypto:e.randomBytes&&(globalThis.crypto.getRandomValues=t=>{t&&t.set(e.randomBytes(t.length))}):globalThis.crypto.getRandomValues=()=>{throw new Error("Using node without crypto support. To enable current operation, either provide polyfill for 'globalThis.crypto.getRandomValues' or enable 'node:crypto' module.")}}}l.subtle=null===(e=globalThis.crypto)||void 0===e?void 0:e.subtle}function xo(e){const t=St.mono_wasm_assembly_find_method(l.runtime_interop_exports_class,e,-1);if(!t)throw"Can't find method "+l.runtime_interop_namespace+"."+l.runtime_interop_exports_classname+"."+e;return t}function To(){if("function"!=typeof globalThis.fetch||"function"!=typeof globalThis.AbortController)throw new Error(r?"Please install `node-fetch` and `node-abort-controller` npm packages to enable HTTP client support. See also https://aka.ms/dotnet-wasm-features":"This browser doesn't support fetch API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features")}function jo(){return"undefined"!=typeof Response&&"body"in Response.prototype&&"function"==typeof ReadableStream}function Ao(){return To(),new AbortController}function Ro(e){e.abort()}function Lo(e){e.__abort_controller.abort(),e.__reader&&e.__reader.cancel().catch((e=>{e&&"AbortError"!==e.name&&t.err("Error in http_wasm_abort_response: "+e)}))}function Co(e,t,n,r,o,a,s,i){return $o(e,t,n,r,o,a,new Span(s,i,0).slice())}function $o(e,t,n,r,o,a,s){To(),e&&"string"==typeof e||w(!1,"expected url string"),t&&n&&Array.isArray(t)&&Array.isArray(n)&&t.length===n.length||w(!1,"expected headerNames and headerValues arrays"),r&&o&&Array.isArray(r)&&Array.isArray(o)&&r.length===o.length||w(!1,"expected headerNames and headerValues arrays");const i=new Headers;for(let e=0;e{const t=await u.fetch_like(e,c);return t.__abort_controller=a,t}))}function No(e){if(!e.__headerNames&&(e.__headerNames=[],e.__headerValues=[],e.headers&&e.headers.entries)){const t=e.headers.entries();for(const n of t)e.__headerNames.push(n[0]),e.__headerValues.push(n[1])}}function Do(e){return No(e),e.__headerNames}function Bo(e){return No(e),e.__headerValues}function Oo(e){return Gr((async()=>{const t=await e.arrayBuffer();return e.__buffer=t,e.__source_offset=0,t.byteLength}))}function Mo(e,t){if(e.__buffer||w(!1,"expected resoved arrayBuffer"),e.__source_offset==e.__buffer.byteLength)return 0;const n=new Uint8Array(e.__buffer,e.__source_offset);t.set(n,0);const r=Math.min(t.byteLength,n.byteLength);return e.__source_offset+=r,r}function Fo(e,t,n){const r=new Span(t,n,0);return Gr((async()=>{if(e.__reader||(e.__reader=e.body.getReader()),e.__chunk||(e.__chunk=await e.__reader.read(),e.__source_offset=0),e.__chunk.done)return 0;const t=e.__chunk.value.byteLength-e.__source_offset;t>0||w(!1,"expected remaining_source to be greater than 0");const n=Math.min(t,r.byteLength),o=e.__chunk.value.subarray(e.__source_offset,e.__source_offset+n);return r.set(o,0),e.__source_offset+=n,t==n&&(e.__chunk=void 0),n}))}let Po,zo=0,Vo=0;function Ho(){if(!u.isChromium)return;const e=(new Date).valueOf(),t=e+36e4;for(let n=Math.max(e+1e3,zo);n0;)--Vo,St.mono_background_exec()}function mono_wasm_schedule_timer_tick(){t.maybeExit(),u.is_runtime_running()&&(Po=void 0,St.mono_wasm_execute_timer())}class qo{constructor(){this.queue=[],this.offset=0}getLength(){return this.queue.length-this.offset}isEmpty(){return 0==this.queue.length}enqueue(e){this.queue.push(e)}dequeue(){if(0===this.queue.length)return;const e=this.queue[this.offset];return this.queue[this.offset]=null,2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),e}peek(){return this.queue.length>0?this.queue[this.offset]:void 0}drain(e){for(;this.getLength();)e(this.dequeue())}}const Jo=Symbol.for("wasm ws_pending_send_buffer"),Yo=Symbol.for("wasm ws_pending_send_buffer_offset"),Xo=Symbol.for("wasm ws_pending_send_buffer_type"),Zo=Symbol.for("wasm ws_pending_receive_event_queue"),Ko=Symbol.for("wasm ws_pending_receive_promise_queue"),Qo=Symbol.for("wasm ws_pending_open_promise"),ea=Symbol.for("wasm wasm_ws_pending_open_promise_used"),ta=Symbol.for("wasm ws_pending_close_promises"),na=Symbol.for("wasm ws_pending_send_promises"),ra=Symbol.for("wasm ws_is_aborted"),oa=Symbol.for("wasm ws_on_closed"),aa=Symbol.for("wasm wasm_ws_close_sent"),sa=Symbol.for("wasm wasm_ws_close_received"),ia=Symbol.for("wasm ws_receive_status_ptr"),ca=65536,la=new Uint8Array;function ua(e,t,n,o){!function(){if(s)throw new Error("WebSockets are not supported in shell JS engine.");if("function"!=typeof globalThis.WebSocket)throw new Error(r?"Please install `ws` npm package to enable networking support. See also https://aka.ms/dotnet-wasm-features":"This browser doesn't support WebSocket API. Please use a modern browser. See also https://aka.ms/dotnet-wasm-features")}(),e&&"string"==typeof e||w(!1,"ERR12: Invalid uri "+typeof e),"function"!=typeof o&&w(!1,"ERR12: Invalid onClosed "+typeof o);const a=new globalThis.WebSocket(e,t||void 0),{promise_control:i}=y();a[Zo]=new qo,a[Ko]=new qo,a[Qo]=i,a[na]=[],a[ta]=[],a[ia]=n,a[oa]=o,a.binaryType="arraybuffer";const c=()=>{a[ra]||u.is_exited()||(i.resolve(a),Ho())},l=e=>{a[ra]||u.is_exited()||(function(e,t){const n=e[Zo],r=e[Ko];if("string"==typeof t.data)n.enqueue({type:0,data:Ke(t.data),offset:0});else{if("ArrayBuffer"!==t.data.constructor.name)throw new Error("ERR19: WebSocket receive expected ArrayBuffer");n.enqueue({type:1,data:new Uint8Array(t.data),offset:0})}if(r.getLength()&&n.getLength()>1)throw new Error("ERR21: Invalid WS state");for(;r.getLength()&&n.getLength();){const t=r.dequeue();ba(e,n,t.buffer_ptr,t.buffer_length),t.resolve()}Ho()}(a,e),Ho())},p=e=>{if(!(a.removeEventListener("message",l),a[ra]||u.is_exited())){a[sa]=!0,o(e.code,e.reason),i.reject(new Error(e.reason));for(const e of a[ta])e.resolve();a[Ko].drain((e=>{Z(n,0),Z(n+4,2),Z(n+8,1),e.resolve()})),a[oa].dispose()}},d=e=>{if(a[ra])return;if(u.is_exited())return;a.removeEventListener("message",l);const t=new Error(e.message||"WebSocket error");pt("WebSocket error",t),ha(a,t)};return a.addEventListener("message",l),a.addEventListener("open",c,{once:!0}),a.addEventListener("close",p,{once:!0}),a.addEventListener("error",d,{once:!0}),a.dispose=()=>{a.removeEventListener("message",l),a.removeEventListener("open",c),a.removeEventListener("close",p),a.removeEventListener("error",d),ma(a)},a}function pa(e){e||w(!1,"ERR17: expected ws instance");const t=e[Qo];return e[ea]=!0,t.promise}function da(e,n,r,o,a){if(e||w(!1,"ERR17: expected ws instance"),e[ra]||e[aa])return Promise.reject(new Error("InvalidState: The WebSocket is not connected."));if(e.readyState===WebSocket.CLOSED)return null;const s=function(e,n,r,o){let a=e[Jo],s=0;const i=n.byteLength;if(a){if(s=e[Yo],r=e[Xo],0!==i){if(s+i>a.length){const t=new Uint8Array(1.5*(s+i+50));t.set(a,0),t.subarray(s).set(n),e[Jo]=a=t}else a.subarray(s).set(n);s+=i,e[Yo]=s}}else o?0!==i&&(a=n,s=i):(0!==i&&(a=n.slice(),s=i,e[Yo]=s,e[Jo]=a),e[Xo]=r);return o?0==s||null==a?la:0===r?function(e){return void 0===Ge?t.UTF8ArrayToString(e,0,e.byteLength):Ge.decode(e)}(it(a,0,s)):a.subarray(0,s):null}(e,new Uint8Array(Ee().buffer,n,r),o,a);return a&&s?function(e,t){if(e.send(t),e[Jo]=null,e.bufferedAmount{if(0===e.bufferedAmount)r.resolve();else{const t=e.readyState;if(t!=WebSocket.OPEN&&t!=WebSocket.CLOSING)r.reject(new Error(`InvalidState: ${t} The WebSocket is not connected.`));else if(!r.isDone)return globalThis.setTimeout(s,a),void(a=Math.min(1.5*a,1e3))}const t=o.indexOf(r);t>-1&&o.splice(t,1)};return globalThis.setTimeout(s,0),n}(e,s):null}function _a(e,t,n){if(e||w(!1,"ERR18: expected ws instance"),e[ra]){const t=e[ia];return Z(t,0),Z(t+4,2),Z(t+8,1),null}const r=e[Zo],o=e[Ko];if(r.getLength())return 0!=o.getLength()&&w(!1,"ERR20: Invalid WS state"),ba(e,r,t,n),null;if(e.readyState==WebSocket.CLOSED){const t=e[ia];return Z(t,0),Z(t+4,2),Z(t+8,1),null}const{promise:a,promise_control:s}=y(),i=s;return i.buffer_ptr=t,i.buffer_length=n,o.enqueue(i),a}function fa(e,t,n,r){if(e||w(!1,"ERR19: expected ws instance"),e[ra]||e[aa]||e.readyState==WebSocket.CLOSED)return null;if(e[aa]=!0,r){const{promise:r,promise_control:o}=y();return e[ta].push(o),"string"==typeof n?e.close(t,n):e.close(t),r}return"string"==typeof n?e.close(t,n):e.close(t),null}function ma(e){var t;if(e||w(!1,"ERR18: expected ws instance"),!e[ra]&&!e[aa]){e[ra]=!0,ha(e,new Error("OperationCanceledException")),null===(t=e[oa])||void 0===t||t.dispose();try{e.close(1e3,"Connection was aborted.")}catch(e){pt("WebSocket error while aborting",e)}}}function ha(e,t){const n=e[Qo],r=e[ea];n&&r&&n.reject(t);for(const n of e[ta])n.reject(t);for(const n of e[na])n.reject(t);e[Ko].drain((e=>{e.reject(t)}))}function ba(e,t,n,r){const o=t.peek(),a=Math.min(r,o.data.length-o.offset);if(a>0){const e=o.data.subarray(o.offset,o.offset+a);new Uint8Array(Ee().buffer,n,r).set(e,0),o.offset+=a}const s=o.data.length===o.offset?1:0;s&&t.dequeue();const i=e[ia];Z(i,a),Z(i+4,o.type),Z(i+8,s)}function ga(e){return 1===St.mono_wasm_load_icu_data(e)}function ya(e,n,r){lt(`Loaded:${e.name} as ${e.behavior} size ${r.length} from ${n}`);const o=Jt(),a="string"==typeof e.virtualPath?e.virtualPath:e.name;let s=null;switch(e.behavior){case"dotnetwasm":case"js-module-threads":case"symbols":break;case"resource":case"assembly":case"pdb":u._loaded_files.push({url:n,file:a});case"heap":case"icu":s=ye(r);break;case"vfs":{const e=a.lastIndexOf("/");let n=e>0?a.substr(0,e):null,o=e>0?a.substr(e+1):a;o.startsWith("/")&&(o=o.substr(1)),n?(lt(`Creating directory '${n}'`),t.FS_createPath("/",n,!0,!0)):n="/",lt(`Creating file '${o}' in directory '${n}'`),t.FS_createDataFile(n,o,r,!0,!0,!0);break}default:throw new Error(`Unrecognized asset behavior:${e.behavior}, for asset ${e.name}`)}if("assembly"===e.behavior){if(!St.mono_wasm_add_assembly(a,s,r.length)){const e=u._loaded_files.findIndex((e=>e.file==a));u._loaded_files.splice(e,1)}}else"pdb"===e.behavior?St.mono_wasm_add_assembly(a,s,r.length):"icu"===e.behavior?ga(s)||t.err(`Error loading ICU asset ${e.name}`):"resource"===e.behavior&&St.mono_wasm_add_satellite_assembly(a,e.culture||"",s,r.length);Yt(o,"mono.instantiateAsset:",e.name),++u.actual_instantiated_assets_count}async function wa(e){try{const t=await e.pendingDownloadInternal.response;(await t.text()).split(/[\r\n]/).forEach((e=>{const t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(":"),_t.set(Number(t[0]),t[1]))})),lt(`Loaded ${_t.size} symbols`)}catch(t){ut(`Error loading symbol file ${e.name}: ${JSON.stringify(t)}`)}}function Sa(){return u.loadedFiles}const ka={};function va(e){let t=ka[e];if("string"!=typeof t){const n=St.mono_jiterp_get_opcode_info(e,0);ka[e]=t=Qe(n)}return t}const Ea=2,Ua=64,Ia=64,xa=["Unknown","InterpreterTiering","NullCheck","VtableNotInitialized","Branch","BackwardBranch","ConditionalBranch","ConditionalBackwardBranch","ComplexBranch","ArrayLoadFailed","ArrayStoreFailed","StringOperationFailed","DivideByZero","Overflow","Return","Call","Throw","AllocFailed","SpanOperationFailed","CastFailed","SafepointBranchTaken","UnboxFailed","CallDelegate","Debugging","Icall","UnexpectedRetIp","LeaveCheck"],Ta={};class ja{constructor(e){this.locals=new Map,this.permanentFunctionTypeCount=0,this.permanentFunctionTypes={},this.permanentFunctionTypesByShape={},this.permanentFunctionTypesByIndex={},this.functionTypesByIndex={},this.permanentImportedFunctionCount=0,this.permanentImportedFunctions={},this.nextImportIndex=0,this.functions=[],this.estimatedExportBytes=0,this.frame=0,this.traceBuf=[],this.branchTargets=new Set,this.constantSlots=[],this.backBranchOffsets=[],this.callHandlerReturnAddresses=[],this.nextConstantSlot=0,this.compressImportNames=!1,this.lockImports=!1,this._assignParameterIndices=e=>{let t=0;for(const n in e)this.locals.set(n,t),t++;return t},this.stack=[new Aa],this.clear(e),this.cfg=new Ra(this)}clear(e){this.options=ss(),this.stackSize=1,this.inSection=!1,this.inFunction=!1,this.lockImports=!1,this.locals.clear(),this.functionTypeCount=this.permanentFunctionTypeCount,this.functionTypes=Object.create(this.permanentFunctionTypes),this.functionTypesByShape=Object.create(this.permanentFunctionTypesByShape),this.functionTypesByIndex=Object.create(this.permanentFunctionTypesByIndex),this.nextImportIndex=0,this.importedFunctionCount=0,this.importedFunctions=Object.create(this.permanentImportedFunctions);for(const e in this.importedFunctions)this.importedFunctions[e].index=void 0;this.functions.length=0,this.estimatedExportBytes=0,this.argumentCount=0,this.current.clear(),this.traceBuf.length=0,this.branchTargets.clear(),this.activeBlocks=0,this.nextConstantSlot=0,this.constantSlots.length=this.options.useConstants?e:0;for(let e=0;e=this.stack.length&&this.stack.push(new Aa),this.current.clear()}_pop(e){if(this.stackSize<=1)throw new Error("Stack empty");const t=this.current;return this.stackSize--,e?(this.appendULeb(t.size),t.copyTo(this.current),null):t.getArrayView(!1).slice(0,t.size)}getWasmImports(){const e=t.getMemory();e instanceof WebAssembly.Memory||w(!1,`expected heap import to be WebAssembly.Memory but was ${e}`);const n={c:this.getConstants(),m:{h:e}},r=this.getImportsToEmit();for(let e=0;e>>0||e>255)throw new Error(`Byte out of range: ${e}`);return this.current.appendU8(e)}appendSimd(e,t){return this.current.appendU8(253),0!=(0|e)||0===e&&!0===t||w(!1,"Expected non-v128_load simd opcode or allowLoad==true"),this.current.appendULeb(e)}appendU32(e){return this.current.appendU32(e)}appendF32(e){return this.current.appendF32(e)}appendF64(e){return this.current.appendF64(e)}appendBoundaryValue(e,t){return this.current.appendBoundaryValue(e,t)}appendULeb(e){return this.current.appendULeb(e)}appendLeb(e){return this.current.appendLeb(e)}appendLebRef(e,t){return this.current.appendLebRef(e,t)}appendBytes(e){return this.current.appendBytes(e)}appendName(e){return this.current.appendName(e)}ret(e){this.ip_const(e),this.appendU8(15)}i32_const(e){this.appendU8(65),this.appendLeb(e)}ptr_const(e){let t=this.options.useConstants?this.constantSlots.indexOf(e):-1;this.options.useConstants&&t<0&&this.nextConstantSlot=0?(this.appendU8(35),this.appendLeb(t)):this.i32_const(e)}ip_const(e){this.appendU8(65),this.appendLeb(e-this.base)}i52_const(e){this.appendU8(66),this.appendLeb(e)}v128_const(e){if(0===e)this.local("v128_zero");else{if("object"!=typeof e)throw new Error("Expected v128_const arg to be 0 or a Uint8Array");{16!==e.byteLength&&w(!1,"Expected v128_const arg to be 16 bytes in size");let t=!0;for(let n=0;n<16;n++)0!==e[n]&&(t=!1);t?this.local("v128_zero"):(this.appendSimd(12),this.appendBytes(e))}}}defineType(e,t,n,r){if(this.functionTypes[e])throw new Error(`Function type ${e} already defined`);if(r&&this.functionTypeCount>this.permanentFunctionTypeCount)throw new Error("New permanent function types cannot be defined after non-permanent ones");let o="";for(const e in t)o+=t[e]+",";o+=n;let a=this.functionTypesByShape[o];"number"!=typeof a&&(a=this.functionTypeCount++,r?(this.permanentFunctionTypeCount++,this.permanentFunctionTypesByShape[o]=a,this.permanentFunctionTypesByIndex[a]=[t,Object.values(t).length,n]):(this.functionTypesByShape[o]=a,this.functionTypesByIndex[a]=[t,Object.values(t).length,n]));const s=[a,t,n,`(${JSON.stringify(t)}) -> ${n}`,r];return r?this.permanentFunctionTypes[e]=s:this.functionTypes[e]=s,a}generateTypeSection(){this.beginSection(1),this.appendULeb(this.functionTypeCount);for(let e=0;ee.index-t.index)),e}_generateImportSection(e){const t=this.getImportsToEmit();if(this.lockImports=!0,!1!==e)throw new Error("function table imports are disabled");this.beginSection(2),this.appendULeb(1+t.length+this.constantSlots.length+(!1!==e?1:0));for(let e=0;e0)throw new Error("New permanent imports cannot be defined after any indexes have been assigned");const a=this.functionTypes[n];if(!a)throw new Error("No function type named "+n);if(r&&!a[4])throw new Error("A permanent import must have a permanent function type");const s=a[0],i=r?this.permanentImportedFunctions:this.importedFunctions;if("number"==typeof o&&(o=Pa().get(o)),"function"!=typeof o&&void 0!==o)throw new Error(`Value passed for imported function ${t} was not a function or valid function pointer or undefined`);return i[t]={index:void 0,typeIndex:s,module:e,name:t,func:o}}markImportAsUsed(e){const t=this.importedFunctions[e];if(!t)throw new Error("No imported function named "+e);"number"!=typeof t.index&&(t.index=this.importedFunctionCount++)}defineFunction(e,t){const n={index:this.functions.length,name:e.name,typeName:e.type,typeIndex:this.functionTypes[e.type][0],export:e.export,locals:e.locals,generator:t,error:null,blob:null};return this.functions.push(n),n.export&&(this.estimatedExportBytes+=n.name.length+8),n}emitImportsAndFunctions(e){let t=0;for(let e=0;e0)throw new Error(`${this.activeBlocks} unclosed block(s) at end of function`);const t=this._pop(e);return this.inFunction=!1,t}block(e,t){const n=this.appendU8(t||2);return e?this.appendU8(e):this.appendU8(64),this.activeBlocks++,n}endBlock(){if(this.activeBlocks<=0)throw new Error("No blocks active");this.activeBlocks--,this.appendU8(11)}arg(e,t){const n="string"==typeof e?this.locals.has(e)?this.locals.get(e):void 0:e;if("number"!=typeof n)throw new Error("No local named "+e);t&&this.appendU8(t),this.appendULeb(n)}local(e,t){const n="string"==typeof e?this.locals.has(e)?this.locals.get(e):void 0:e+this.argumentCount;if("number"!=typeof n)throw new Error("No local named "+e);t?this.appendU8(t):this.appendU8(32),this.appendULeb(n)}appendMemarg(e,t){this.appendULeb(t),this.appendULeb(e)}lea(e,t){"string"==typeof e?this.local(e):this.i32_const(e),this.i32_const(t),this.appendU8(106)}getArrayView(e){if(this.stackSize>1)throw new Error("Jiterpreter block stack not empty");return this.stack[0].getArrayView(e)}getConstants(){const e={};for(let t=0;t=this.capacity)throw new Error("Buffer full");const t=this.size;return Ee()[this.buffer+this.size++]=e,t}appendU32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,0),this.size+=4,t}appendI32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,1),this.size+=4,t}appendF32(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,2),this.size+=4,t}appendF64(e){const t=this.size;return St.mono_jiterp_write_number_unaligned(this.buffer+this.size,e,3),this.size+=8,t}appendBoundaryValue(e,t){if(this.size+8>=this.capacity)throw new Error("Buffer full");const n=St.mono_jiterp_encode_leb_signed_boundary(this.buffer+this.size,e,t);if(n<1)throw new Error(`Failed to encode ${e} bit boundary value with sign ${t}`);return this.size+=n,n}appendULeb(e){if("number"!=typeof e&&w(!1,`appendULeb expected number but got ${e}`),e>=0||w(!1,"cannot pass negative value to appendULeb"),e<127){if(this.size+1>=this.capacity)throw new Error("Buffer full");return this.appendU8(e),1}if(this.size+8>=this.capacity)throw new Error("Buffer full");const t=St.mono_jiterp_encode_leb52(this.buffer+this.size,e,0);if(t<1)throw new Error(`Failed to encode value '${e}' as unsigned leb`);return this.size+=t,t}appendLeb(e){if("number"!=typeof e&&w(!1,`appendLeb expected number but got ${e}`),this.size+8>=this.capacity)throw new Error("Buffer full");const t=St.mono_jiterp_encode_leb52(this.buffer+this.size,e,1);if(t<1)throw new Error(`Failed to encode value '${e}' as signed leb`);return this.size+=t,t}appendLebRef(e,t){if(this.size+8>=this.capacity)throw new Error("Buffer full");const n=St.mono_jiterp_encode_leb64_ref(this.buffer+this.size,e,t?1:0);if(n<1)throw new Error("Failed to encode value as leb");return this.size+=n,n}copyTo(e,t){"number"!=typeof t&&(t=this.size),Ee().copyWithin(e.buffer+e.size,this.buffer,this.buffer+t),e.size+=t}appendBytes(e,t){const n=this.size,r=Ee();return e.buffer===r.buffer?("number"!=typeof t&&(t=e.length),r.copyWithin(this.buffer+n,e.byteOffset,e.byteOffset+t),this.size+=t):("number"==typeof t&&(e=new Uint8Array(e.buffer,e.byteOffset,t)),this.getArrayView(!0).set(e,this.size),this.size+=e.length),n}appendName(e){let t=e.length,n=1===e.length?e.charCodeAt(0):-1;if(n>127&&(n=-1),t&&n<0)if(this.encoder)t=this.encoder.encodeInto(e,this.textBuf).written||0;else for(let n=0;n127)throw new Error("Out of range character and no TextEncoder available");this.textBuf[n]=t}this.appendULeb(t),n>=0?this.appendU8(n):t>1&&this.appendBytes(this.textBuf,t)}getArrayView(e){return new Uint8Array(Ee().buffer,this.buffer,e?this.capacity:this.size)}}class Ra{constructor(e){this.segments=[],this.backBranchTargets=null,this.lastSegmentEnd=0,this.overheadBytes=0,this.blockStack=[],this.backDispatchOffsets=[],this.dispatchTable=new Map,this.observedBranchTargets=new Set,this.trace=0,this.builder=e}initialize(e,t,n){this.segments.length=0,this.blockStack.length=0,this.startOfBody=e,this.backBranchTargets=t,this.base=this.builder.base,this.ip=this.lastSegmentStartIp=this.builder.base,this.lastSegmentEnd=0,this.overheadBytes=10,this.dispatchTable.clear(),this.observedBranchTargets.clear(),this.trace=n,this.backDispatchOffsets.length=0}entry(e){this.entryIp=e,this.appendBlob(),1!==this.segments.length&&w(!1,"expected 1 segment"),"blob"!==this.segments[0].type&&w(!1,"expected blob"),this.entryBlob=this.segments[0],this.segments.length=0,this.overheadBytes+=9,this.backBranchTargets&&(this.overheadBytes+=20,this.overheadBytes+=this.backBranchTargets.length)}appendBlob(){this.builder.current.size!==this.lastSegmentEnd&&(this.segments.push({type:"blob",ip:this.lastSegmentStartIp,start:this.lastSegmentEnd,length:this.builder.current.size-this.lastSegmentEnd}),this.lastSegmentStartIp=this.ip,this.lastSegmentEnd=this.builder.current.size,this.overheadBytes+=2)}startBranchBlock(e,t){this.appendBlob(),this.segments.push({type:"branch-block-header",ip:e,isBackBranchTarget:t}),this.overheadBytes+=1}branch(e,t,n){this.observedBranchTargets.add(e),this.appendBlob(),this.segments.push({type:"branch",from:this.ip,target:e,isBackward:t,branchType:n}),this.overheadBytes+=4,t&&(this.overheadBytes+=11),3!==n&&2!==n||(this.overheadBytes+=17)}emitBlob(e,t){const n=t.subarray(e.start,e.start+e.length);this.builder.appendBytes(n)}generate(){this.appendBlob();const e=this.builder.endFunction(!1);this.builder._push(),this.builder.base=this.base,this.emitBlob(this.entryBlob,e),this.backBranchTargets&&(this.builder.i32_const(0),this.builder.local("disp",33),this.builder.block(64,3));for(let e=0;ee-t));for(let e=0;e0&&ut("No back branch targets were reachable after filtering");else if(1===this.backDispatchOffsets.length)this.trace>0&&(this.backDispatchOffsets[0]===this.entryIp?ut(`Exactly one back dispatch offset and it was the entry point 0x${this.entryIp.toString(16)}`):ut(`Exactly one back dispatch offset and it was 0x${this.backDispatchOffsets[0].toString(16)}`)),this.builder.local("disp"),this.builder.appendU8(13),this.builder.appendULeb(this.blockStack.indexOf(this.backDispatchOffsets[0]));else{this.builder.block(64),this.builder.block(64),this.builder.local("disp"),this.builder.appendU8(14),this.builder.appendULeb(this.backDispatchOffsets.length+1),this.builder.appendULeb(1);for(let e=0;e0&&this.blockStack.push(0)}this.trace>1&&ut(`blockStack=${this.blockStack}`);for(let t=0;t1&&ut(`backward br from ${n.from.toString(16)} to ${n.target.toString(16)}: disp=${e}`),this.builder.i32_const(1),this.builder.local("backbranched",33),this.builder.i32_const(e),this.builder.local("disp",33),r=!0}else this.trace>0&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed: back branch target not in dispatch table`),t=-1;if(t>=0||r){let e=0;switch(n.branchType){case 2:Oa(this.builder,n.from),this.builder.appendU8(12);break;case 3:this.builder.block(64,4),Oa(this.builder,n.from),this.builder.appendU8(12),e=1;break;case 0:this.builder.appendU8(12);break;case 1:this.builder.appendU8(13);break;default:throw new Error("Unimplemented branch type")}this.builder.appendULeb(e+t),e&&this.builder.endBlock(),this.trace>1&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} breaking out ${e+t+1} level(s)`)}else{if(this.trace>0){const e=this.base;n.target>=e&&n.target1&&ut(`br from ${n.from.toString(16)} to ${n.target.toString(16)} failed (outside of trace 0x${e.toString(16)} - 0x${this.exitIp.toString(16)})`)}const e=1===n.branchType||3===n.branchType;e&&this.builder.block(64,4),Ma(this.builder,n.target,4),e&&this.builder.endBlock()}break}default:throw new Error("unreachable")}}return this.backBranchTargets&&(this.blockStack.length<=1||w(!1,"expected one or zero entries in the block stack at the end"),this.blockStack.length&&this.blockStack.shift(),this.builder.endBlock()),0!==this.blockStack.length&&w(!1,`expected block stack to be empty at end of function but it was ${this.blockStack}`),this.builder.ip_const(this.exitIp),this.builder.appendU8(15),this.builder.appendU8(11),this.builder._pop(!1)}}let La,Ca=-1,$a=0;const Na={generation:0,compilation:0},Da={traceCandidates:0,tracesCompiled:0,entryWrappersCompiled:0,jitCallsCompiled:0,directJitCallsCompiled:0,failures:0,bytesGenerated:0,nullChecksEliminated:0,nullChecksFused:0,backBranchesEmitted:0,backBranchesNotEmitted:0,simdFallback:{}},Ba=globalThis.performance&&globalThis.performance.now?globalThis.performance.now.bind(globalThis.performance):Date.now;function Oa(e,t){e.ptr_const(St.mono_jiterp_get_polling_required_address()),e.appendU8(40),e.appendMemarg(0,2),e.block(64,4),e.local("frame"),e.i32_const(t),e.callImport("safepoint"),e.endBlock()}function Ma(e,t,n){e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.base),e.i32_const(n),e.callImport("bailout")),e.appendU8(15)}function Fa(e,t,n,r){n<=e.options.monitoringLongDistance+2&&(e.local("cinfo"),e.i32_const(n),e.appendU8(54),e.appendMemarg(4,0),e.local("cinfo"),e.local("backbranched"),e.appendU8(54),e.appendMemarg(0,0)),e.ip_const(t),e.options.countBailouts&&(e.i32_const(e.base),e.i32_const(r),e.callImport("bailout")),e.appendU8(15)}function Pa(){if(La||(La=t.getWasmIndirectFunctionTable()),!La)throw new Error("Module did not export the indirect function table");return La}function za(e){e||w(!1,"Attempting to set null function into table"),l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const t=Pa();$a<=0&&(Ca=t.length,$a=512,t.grow($a));const n=Ca;return Ca++,$a--,t.set(n,e),n}function Va(e,t,n,r,o){if(r<=0)return o&&e.appendU8(26),!0;if(r>=Ua)return!1;if(0!==n)return!1;const a=o?"memop_dest":"pLocals";o&&e.local(a,33);let s=o?0:t;if(e.options.enableSimd){const t=16;for(;r>=t;)e.local(a),e.v128_const(0),e.appendSimd(11),e.appendMemarg(s,0),s+=t,r-=t}for(;r>=8;)e.local(a),e.i52_const(0),e.appendU8(55),e.appendMemarg(s,0),s+=8,r-=8;for(;r>=1;){e.local(a),e.i32_const(0);let t=r%4;switch(t){case 0:t=4,e.appendU8(54);break;case 1:e.appendU8(58);break;case 3:case 2:t=2,e.appendU8(59)}e.appendMemarg(s,0),s+=t,r-=t}return!0}function Ha(e,t,n){Va(e,0,t,n,!0)||(e.i32_const(t),e.i32_const(n),e.appendU8(252),e.appendU8(11),e.appendU8(0))}function Wa(e,t,n,r,o,a,s){if(r<=0)return o&&(e.appendU8(26),e.appendU8(26)),!0;if(r>=Ia)return!1;o?(a=a||"memop_dest",s=s||"memop_src",e.local(s,33),e.local(a,33)):a&&s||(a=s="pLocals");let i=o?0:t,c=o?0:n;if(e.options.enableSimd){const t=16;for(;r>=t;)e.local(a),e.local(s),e.appendSimd(0,!0),e.appendMemarg(c,0),e.appendSimd(11),e.appendMemarg(i,0),i+=t,c+=t,r-=t}for(;r>=8;)e.local(a),e.local(s),e.appendU8(41),e.appendMemarg(c,0),e.appendU8(55),e.appendMemarg(i,0),i+=8,c+=8,r-=8;for(;r>=1;){let t,n,o=r%4;switch(o){case 0:o=4,t=40,n=54;break;default:case 1:o=1,t=44,n=58;break;case 3:case 2:o=2,t=46,n=59}e.local(a),e.local(s),e.appendU8(t),e.appendMemarg(c,0),e.appendU8(n),e.appendMemarg(i,0),c+=o,i+=o,r-=o}return!0}function Ga(e,t){return Wa(e,0,0,t,!0)||(e.i32_const(t),e.appendU8(252),e.appendU8(10),e.appendU8(0),e.appendU8(0)),!0}function qa(){Da.failures++,Da.failures>=Ea&&(ut(`Disabling jiterpreter after ${Da.failures} failures`),as({enableTraces:!1,enableInterpEntry:!1,enableJitCall:!1}))}const Ja={};function Ya(e){const t=Ja[e];return void 0===t?Ja[e]=St.mono_jiterp_get_member_offset(e):t}function Xa(e){const n=t.asm[e];if("function"!=typeof n)throw new Error(`raw cwrap ${e} not found`);return n}const Za={};function Ka(e){let t=Za[e];return"number"!=typeof t&&(t=Za[e]=St.mono_jiterp_get_opcode_value_table_entry(e)),t}function Qa(e,t){return[e,e,t]}let es;function ts(){if(!St.mono_wasm_is_zero_page_reserved())return!1;if(!0===es)return!1;const e=Ie();for(let t=0;t<8;t++)if(0!==e[t])return!1===es&&dt(`Zero page optimizations are enabled but garbage appeared in memory at address ${4*t}: ${e[t]}`),es=!0,!1;return es=!1,!0}const ns={enableTraces:"jiterpreter-traces-enabled",enableInterpEntry:"jiterpreter-interp-entry-enabled",enableJitCall:"jiterpreter-jit-call-enabled",enableBackwardBranches:"jiterpreter-backward-branch-entries-enabled",enableCallResume:"jiterpreter-call-resume-enabled",enableWasmEh:"jiterpreter-wasm-eh-enabled",enableSimd:"jiterpreter-simd-enabled",zeroPageOptimization:"jiterpreter-zero-page-optimization",enableStats:"jiterpreter-stats-enabled",disableHeuristic:"jiterpreter-disable-heuristic",estimateHeat:"jiterpreter-estimate-heat",countBailouts:"jiterpreter-count-bailouts",dumpTraces:"jiterpreter-dump-traces",useConstants:"jiterpreter-use-constants",eliminateNullChecks:"jiterpreter-eliminate-null-checks",noExitBackwardBranches:"jiterpreter-backward-branches-enabled",directJitCalls:"jiterpreter-direct-jit-calls",minimumTraceValue:"jiterpreter-minimum-trace-value",minimumTraceHitCount:"jiterpreter-minimum-trace-hit-count",monitoringPeriod:"jiterpreter-trace-monitoring-period",monitoringShortDistance:"jiterpreter-trace-monitoring-short-distance",monitoringLongDistance:"jiterpreter-trace-monitoring-long-distance",monitoringMaxAveragePenalty:"jiterpreter-trace-monitoring-max-average-penalty",backBranchBoost:"jiterpreter-back-branch-boost",jitCallHitCount:"jiterpreter-jit-call-hit-count",jitCallFlushThreshold:"jiterpreter-jit-call-queue-flush-threshold",interpEntryHitCount:"jiterpreter-interp-entry-hit-count",interpEntryFlushThreshold:"jiterpreter-interp-entry-queue-flush-threshold",wasmBytesLimit:"jiterpreter-wasm-bytes-limit"};let rs=-1,os={};function as(e){for(const t in e){const n=ns[t];if(!n){dt(`Unrecognized jiterpreter option: ${t}`);continue}const r=e[t];"boolean"==typeof r?St.mono_jiterp_parse_option((r?"--":"--no-")+n):"number"==typeof r?St.mono_jiterp_parse_option(`--${n}=${r}`):dt(`Jiterpreter option must be a boolean or a number but was ${typeof r} '${r}'`)}}function ss(){const e=St.mono_jiterp_get_options_version();return e!==rs&&(function(){const e=St.mono_jiterp_get_options_as_json(),n=Qe(e);t._free(e);const r=JSON.parse(n);os={};for(const e in ns){const t=ns[e];os[e]=r[t]}}(),rs=e),os}const is={2:["V128_I1_NEGATION","V128_I2_NEGATION","V128_I4_NEGATION","V128_ONES_COMPLEMENT","V128_U2_WIDEN_LOWER","V128_U2_WIDEN_UPPER","V128_I1_CREATE_SCALAR","V128_I2_CREATE_SCALAR","V128_I4_CREATE_SCALAR","V128_I8_CREATE_SCALAR","V128_I1_EXTRACT_MSB","V128_I2_EXTRACT_MSB","V128_I4_EXTRACT_MSB","V128_I8_EXTRACT_MSB","V128_I1_CREATE","V128_I2_CREATE","V128_I4_CREATE","V128_I8_CREATE","SplatX1","SplatX2","SplatX4","SplatX8","NegateD1","NegateD2","NegateD4","NegateD8","NegateR4","NegateR8","SqrtR4","SqrtR8","CeilingR4","CeilingR8","FloorR4","FloorR8","TruncateR4","TruncateR8","RoundToNearestR4","RoundToNearestR8","NotANY","AnyTrueANY","AllTrueD1","AllTrueD2","AllTrueD4","AllTrueD8","PopCountU1","BitmaskD1","BitmaskD2","BitmaskD4","BitmaskD8","AddPairwiseWideningI1","AddPairwiseWideningU1","AddPairwiseWideningI2","AddPairwiseWideningU2","AbsI1","AbsI2","AbsI4","AbsI8","AbsR4","AbsR8","ConvertToSingleI4","ConvertToSingleU4","ConvertToSingleR8","ConvertToDoubleLowerI4","ConvertToDoubleLowerU4","ConvertToDoubleLowerR8","ConvertToInt32SaturateR4","ConvertToUInt32SaturateR4","ConvertToInt32SaturateR8","ConvertToUInt32SaturateR8","SignExtendWideningLowerD1","SignExtendWideningLowerD2","SignExtendWideningLowerD4","SignExtendWideningUpperD1","SignExtendWideningUpperD2","SignExtendWideningUpperD4","ZeroExtendWideningLowerD1","ZeroExtendWideningLowerD2","ZeroExtendWideningLowerD4","ZeroExtendWideningUpperD1","ZeroExtendWideningUpperD2","ZeroExtendWideningUpperD4","LoadVector128ANY","LoadScalarVector128X4","LoadScalarVector128X8","LoadScalarAndSplatVector128X1","LoadScalarAndSplatVector128X2","LoadScalarAndSplatVector128X4","LoadScalarAndSplatVector128X8","LoadWideningVector128I1","LoadWideningVector128U1","LoadWideningVector128I2","LoadWideningVector128U2","LoadWideningVector128I4","LoadWideningVector128U4"],3:["V128_I1_ADD","V128_I2_ADD","V128_I4_ADD","V128_R4_ADD","V128_I1_SUB","V128_I2_SUB","V128_I4_SUB","V128_R4_SUB","V128_BITWISE_AND","V128_BITWISE_OR","V128_BITWISE_EQUALITY","V128_BITWISE_INEQUALITY","V128_R4_FLOAT_EQUALITY","V128_R8_FLOAT_EQUALITY","V128_EXCLUSIVE_OR","V128_I1_MULTIPLY","V128_I2_MULTIPLY","V128_I4_MULTIPLY","V128_R4_MULTIPLY","V128_R4_DIVISION","V128_I1_LEFT_SHIFT","V128_I2_LEFT_SHIFT","V128_I4_LEFT_SHIFT","V128_I8_LEFT_SHIFT","V128_I1_RIGHT_SHIFT","V128_I2_RIGHT_SHIFT","V128_I4_RIGHT_SHIFT","V128_I1_URIGHT_SHIFT","V128_I2_URIGHT_SHIFT","V128_I4_URIGHT_SHIFT","V128_I8_URIGHT_SHIFT","V128_U1_NARROW","V128_U1_GREATER_THAN","V128_I1_LESS_THAN","V128_U1_LESS_THAN","V128_I2_LESS_THAN","V128_I1_EQUALS","V128_I2_EQUALS","V128_I4_EQUALS","V128_R4_EQUALS","V128_I8_EQUALS","V128_AND_NOT","V128_U2_LESS_THAN_EQUAL","V128_I1_SHUFFLE","V128_I2_SHUFFLE","V128_I4_SHUFFLE","V128_I8_SHUFFLE","ExtractScalarI1","ExtractScalarU1","ExtractScalarI2","ExtractScalarU2","ExtractScalarD4","ExtractScalarD8","ExtractScalarR4","ExtractScalarR8","SwizzleD1","AddD1","AddD2","AddD4","AddD8","AddR4","AddR8","SubtractD1","SubtractD2","SubtractD4","SubtractD8","SubtractR4","SubtractR8","MultiplyD2","MultiplyD4","MultiplyD8","MultiplyR4","MultiplyR8","DivideR4","DivideR8","DotI2","ShiftLeftD1","ShiftLeftD2","ShiftLeftD4","ShiftLeftD8","ShiftRightArithmeticD1","ShiftRightArithmeticD2","ShiftRightArithmeticD4","ShiftRightArithmeticD8","ShiftRightLogicalD1","ShiftRightLogicalD2","ShiftRightLogicalD4","ShiftRightLogicalD8","AndANY","AndNotANY","OrANY","XorANY","CompareEqualD1","CompareEqualD2","CompareEqualD4","CompareEqualD8","CompareEqualR4","CompareEqualR8","CompareNotEqualD1","CompareNotEqualD2","CompareNotEqualD4","CompareNotEqualD8","CompareNotEqualR4","CompareNotEqualR8","CompareLessThanI1","CompareLessThanU1","CompareLessThanI2","CompareLessThanU2","CompareLessThanI4","CompareLessThanU4","CompareLessThanI8","CompareLessThanR4","CompareLessThanR8","CompareLessThanOrEqualI1","CompareLessThanOrEqualU1","CompareLessThanOrEqualI2","CompareLessThanOrEqualU2","CompareLessThanOrEqualI4","CompareLessThanOrEqualU4","CompareLessThanOrEqualI8","CompareLessThanOrEqualR4","CompareLessThanOrEqualR8","CompareGreaterThanI1","CompareGreaterThanU1","CompareGreaterThanI2","CompareGreaterThanU2","CompareGreaterThanI4","CompareGreaterThanU4","CompareGreaterThanI8","CompareGreaterThanR4","CompareGreaterThanR8","CompareGreaterThanOrEqualI1","CompareGreaterThanOrEqualU1","CompareGreaterThanOrEqualI2","CompareGreaterThanOrEqualU2","CompareGreaterThanOrEqualI4","CompareGreaterThanOrEqualU4","CompareGreaterThanOrEqualI8","CompareGreaterThanOrEqualR4","CompareGreaterThanOrEqualR8","ConvertNarrowingSaturateSignedI2","ConvertNarrowingSaturateSignedI4","ConvertNarrowingSaturateUnsignedI2","ConvertNarrowingSaturateUnsignedI4","MultiplyWideningLowerI1","MultiplyWideningLowerI2","MultiplyWideningLowerI4","MultiplyWideningLowerU1","MultiplyWideningLowerU2","MultiplyWideningLowerU4","MultiplyWideningUpperI1","MultiplyWideningUpperI2","MultiplyWideningUpperI4","MultiplyWideningUpperU1","MultiplyWideningUpperU2","MultiplyWideningUpperU4","AddSaturateI1","AddSaturateU1","AddSaturateI2","AddSaturateU2","SubtractSaturateI1","SubtractSaturateU1","SubtractSaturateI2","SubtractSaturateU2","MultiplyRoundedSaturateQ15I2","MinI1","MinI2","MinI4","MinU1","MinU2","MinU4","MaxI1","MaxI2","MaxI4","MaxU1","MaxU2","MaxU4","AverageRoundedU1","AverageRoundedU2","MinR4","MinR8","MaxR4","MaxR8","PseudoMinR4","PseudoMinR8","PseudoMaxR4","PseudoMaxR8","StoreANY"],4:["V128_CONDITIONAL_SELECT","ReplaceScalarD1","ReplaceScalarD2","ReplaceScalarD4","ReplaceScalarD8","ReplaceScalarR4","ReplaceScalarR8","ShuffleD1","BitwiseSelectANY","LoadScalarAndInsertX1","LoadScalarAndInsertX2","LoadScalarAndInsertX4","LoadScalarAndInsertX8","StoreSelectedScalarX1","StoreSelectedScalarX2","StoreSelectedScalarX4","StoreSelectedScalarX8"]},cs={13:[65,-1],14:[65,0],15:[65,1],16:[65,2],17:[65,3],18:[65,4],19:[65,5],20:[65,6],21:[65,7],22:[65,8]},ls={463:168,469:174,464:170,470:176},us={515:[69,40,54],435:[106,40,54],437:[107,40,54],439:[107,40,54],443:[115,40,54],436:[124,41,55],438:[125,41,55],440:[125,41,55],444:[133,41,55],518:[106,40,54],522:[108,40,54],519:[124,41,55],523:[126,41,55],441:[140,42,56],442:[154,43,57],471:[178,40,56],474:[183,40,57],445:[184,40,57],472:[180,41,56],475:[185,41,57],446:[186,41,57],476:[187,42,57],473:[182,43,56],467:[1,52,55],468:[1,53,55],451:[113,40,54],459:[113,40,54],447:[117,40,54],455:[117,40,54],452:[113,41,54],460:[113,41,54],448:[117,41,54],456:[117,41,54],526:[116,40,54],527:[134,41,55],528:[117,40,54],529:[135,41,55],524:[118,40,54],525:[136,41,55],628:[119,40,54],629:[137,41,55],630:[120,40,54],631:[138,41,55],632:[103,40,54],634:[104,40,54],636:[105,40,54],633:[121,41,55],635:[122,41,55],637:[123,41,55]},ps={401:187,402:1,405:187,406:1,409:187,410:1,413:187,414:1,419:187,420:1,423:187,424:1,433:187,434:1,427:187,428:1,65536:187,65537:187,65535:187,65539:1,65540:1,65538:1},ds={351:[106,40,54],369:[106,40,54],371:[106,40,54],355:[107,40,54],359:[108,40,54],373:[108,40,54],375:[108,40,54],363:[109,40,54],367:[110,40,54],387:[111,40,54],391:[112,40,54],381:[113,40,54],383:[114,40,54],385:[115,40,54],395:[116,40,54],397:[117,40,54],393:[118,40,54],352:[124,41,55],356:[125,41,55],360:[126,41,55],364:[127,41,55],388:[129,41,55],368:[128,41,55],392:[130,41,55],382:[131,41,55],384:[132,41,55],386:[133,41,55],396:[134,41,55],398:[135,41,55],394:[136,41,55],353:[146,42,56],357:[147,42,56],361:[148,42,56],365:[149,42,56],354:[160,43,57],358:[161,43,57],362:[162,43,57],366:[163,43,57],399:[70,40,54],403:[71,40,54],421:[72,40,54],407:[74,40,54],425:[76,40,54],411:[78,40,54],431:[73,40,54],417:[75,40,54],429:[77,40,54],415:[79,40,54],400:[81,41,54],404:[82,41,54],422:[83,41,54],408:[85,41,54],426:[87,41,54],412:[89,41,54],432:[84,41,54],418:[86,41,54],430:[88,41,54],416:[90,41,54]},_s={195:399,215:403,203:407,223:417,207:421,231:431,199:411,219:415,211:425,227:429,239:[399,!1,!0],249:[403,!1,!0],243:[407,!1,!0],253:[417,!1,!0],245:[421,!1,!0],257:[431,!1,!0],241:[411,!1,!0],251:[415,!1,!0],247:[425,!1,!0],255:[429,!1,!0],259:[399,65,!0],269:[403,65,!0],263:[407,65,!0],273:[417,65,!0],265:[421,65,!0],277:[431,65,!0],261:[411,65,!0],271:[415,65,!0],267:[425,65,!0],275:[429,65,!0],196:400,216:404,204:408,224:418,208:422,232:432,200:412,220:416,212:426,228:430,260:[400,66,!0],264:[408,66,!0],274:[418,66,!0],266:[422,66,!0],278:[432,66,!0],262:[412,66,!0],272:[416,66,!0],268:[426,66,!0],276:[430,66,!0],197:401,217:65535,205:409,225:419,209:423,233:433,201:413,221:65536,213:427,229:65537,198:402,218:65538,206:410,226:420,210:424,234:434,202:414,222:65539,214:428,230:65540},fs={588:[!0,!1,159],615:[!0,!0,145],575:[!0,!1,155],602:[!0,!0,141],581:[!0,!1,156],608:[!0,!0,142],592:[!0,!1,153],619:[!0,!0,139],570:[!0,!1,"acos"],597:[!0,!0,"acosf"],571:[!0,!1,"acosh"],598:[!0,!0,"acoshf"],576:[!0,!1,"cos"],603:[!0,!0,"cosf"],568:[!0,!1,"asin"],595:[!0,!0,"asinf"],569:[!0,!1,"asinh"],596:[!0,!0,"asinhf"],587:[!0,!1,"sin"],614:[!0,!0,"sinf"],572:[!0,!1,"atan"],599:[!0,!0,"atanf"],573:[!0,!1,"atanh"],600:[!0,!0,"atanhf"],590:[!0,!1,"tan"],617:[!0,!0,"tanf"],577:[!0,!1,"cbrt"],604:[!0,!0,"cbrtf"],579:[!0,!1,"exp"],606:[!0,!0,"expf"],582:[!0,!1,"log"],609:[!0,!0,"logf"],583:[!0,!1,"log2"],610:[!0,!0,"log2f"],584:[!0,!1,"log10"],611:[!0,!0,"log10f"],593:[!1,!1,164],620:[!1,!0,150],594:[!1,!1,165],621:[!1,!0,151],574:[!1,!1,"atan2"],601:[!1,!0,"atan2f"],585:[!1,!1,"pow"],612:[!1,!0,"powf"],390:[!1,!1,"fmod"],389:[!1,!0,"fmodf"]},ms={641:1,642:2,643:4,644:8},hs={641:44,642:46,643:40,644:41},bs={641:58,642:59,643:54,644:55},gs=new Set([20,21,22,23,24,25,26,27,28,29,30]),ys={47:[16,54],48:[16,54],49:[8,54],50:[8,54],51:[4,54],53:[4,56],52:[2,55],54:[2,57]},ws={1:[16,40],2:[8,40],3:[4,40],5:[4,42],4:[2,41],6:[2,43]},Ss=new Set([81,84,85,86,87,82,83,88,89,90,91,92,93]),ks={13:[16],14:[8],15:[4],16:[2]},vs={10:100,11:132,12:164,13:196},Es={6:[44,23],7:[46,26],8:[40,28],9:[41,30]};function Us(e,t){return se(e+2*t)}function Is(e,t){return de(e+2*t)}function xs(e,t){return le(e+2*t)}function Ts(e,t){return ue(e+2*t)}function js(e){return ue(e+Ya(4))}function As(e,t){const n=ue(js(e)+Ya(5));return ue(n+t*Ii)}function Rs(e,t){const n=ue(js(e)+Ya(12));return ue(n+t*Ii)}function Ls(e,t,n){if(!n)return!1;for(let r=0;r=40||w(!1,`Expected load opcode but got ${n}`),e.appendU8(n),void 0!==r)e.appendULeb(r);else if(253===n)throw new Error("PREFIX_simd ldloc without a simdOpcode");const o=zs(t,n,r);e.appendMemarg(t,o)}function Hs(e,t,n,r){n>=54||w(!1,`Expected store opcode but got ${n}`),e.appendU8(n),void 0!==r&&e.appendULeb(r);const o=zs(t,n,r);e.appendMemarg(t,o),Ms(t),void 0!==r&&Ms(t+8)}function Ws(e,t,n){"number"!=typeof n&&(n=512),n>0&&Fs(t,n),e.lea("pLocals",t)}function Gs(e,t,n,r){Fs(t,r),Va(e,t,n,r,!1)||(Ws(e,t,r),Ha(e,n,r))}function qs(e,t,n,r){if(Fs(t,r),Wa(e,t,n,r,!1))return!0;Ws(e,t,r),Ws(e,n,0),Ga(e,r)}function Js(e,t){return 0!==St.mono_jiterp_is_imethod_var_address_taken(js(e.frame),t)}function Ys(e,t,n,r){if(e.allowNullCheckOptimization&&Ns.has(t)&&!Js(e,t))return Da.nullChecksEliminated++,void(Bs===t?r&&e.local("cknull_ptr"):(Vs(e,t,40),e.local("cknull_ptr",r?34:33),Bs=t));Vs(e,t,40),e.local("cknull_ptr",34),e.appendU8(69),e.block(64,4),Ma(e,n,2),e.endBlock(),r&&e.local("cknull_ptr"),e.allowNullCheckOptimization&&!Js(e,t)?(Ns.set(t,n),Bs=t):Bs=-1}function Xs(e,t,n){let r,o=54;const a=cs[n];if(a)e.local("pLocals"),e.appendU8(a[0]),r=a[1],e.appendLeb(r);else switch(n){case 23:e.local("pLocals"),r=Is(t,2),e.i32_const(r);break;case 24:e.local("pLocals"),r=xs(t,2),e.i32_const(r);break;case 25:e.local("pLocals"),e.i52_const(0),o=55;break;case 27:e.local("pLocals"),e.appendU8(66),e.appendLebRef(t+4,!0),o=55;break;case 26:e.local("pLocals"),e.i52_const(Is(t,2)),o=55;break;case 28:e.local("pLocals"),e.appendU8(67),e.appendF32(function(e,t){return n=e+2*t,St.mono_wasm_get_f32_unaligned(n);var n}(t,2)),o=56;break;case 29:e.local("pLocals"),e.appendU8(68),e.appendF64(function(e,t){return n=e+2*t,St.mono_wasm_get_f64_unaligned(n);var n}(t,2)),o=57;break;default:return!1}e.appendU8(o);const s=Us(t,1);return e.appendMemarg(s,2),Ms(s),"number"==typeof r?Cs.set(s,r):Cs.delete(s),!0}function Zs(e,t,n){let r=40,o=54;switch(n){case 82:r=44;break;case 83:r=45;break;case 84:r=46;break;case 85:r=47;break;case 86:r=45,o=58;break;case 87:r=47,o=59;break;case 88:break;case 89:r=41,o=55;break;case 90:{const n=Us(t,3);return qs(e,Us(t,1),Us(t,2),n),!0}case 91:return qs(e,Us(t,1),Us(t,2),8),qs(e,Us(t,3),Us(t,4),8),!0;case 92:return qs(e,Us(t,1),Us(t,2),8),qs(e,Us(t,3),Us(t,4),8),qs(e,Us(t,5),Us(t,6),8),!0;case 93:return qs(e,Us(t,1),Us(t,2),8),qs(e,Us(t,3),Us(t,4),8),qs(e,Us(t,5),Us(t,6),8),qs(e,Us(t,7),Us(t,8),8),!0;default:return!1}return e.local("pLocals"),Vs(e,Us(t,2),r),Hs(e,Us(t,1),o),!0}function Ks(e,t,n,r){const o=r>=31&&r<=44||r>=58&&r<=68,a=Us(n,o?2:1),s=Us(n,3),i=Us(n,o?1:2),c=e.allowNullCheckOptimization&&Ns.has(a)&&!Js(e,a);44!==r&&53!==r&&Ys(e,a,n,!1);let l=54,u=40;switch(r){case 31:u=44;break;case 32:u=45;break;case 33:u=46;break;case 34:u=47;break;case 39:case 49:case 35:break;case 51:case 37:u=42,l=56;break;case 52:case 38:u=43,l=57;break;case 45:case 46:l=58;break;case 47:case 48:l=59;break;case 36:case 50:u=41,l=55;break;case 53:return c||e.block(),e.local("pLocals"),e.i32_const(s),e.i32_const(a),e.i32_const(i),e.callImport("stfld_o"),c?(e.appendU8(26),Da.nullChecksEliminated++):(e.appendU8(13),e.appendULeb(0),Ma(e,n,2),e.endBlock()),!0;case 40:{const t=Us(n,4);return Ws(e,i,t),e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Ga(e,t),!0}case 54:{const r=As(t,Us(n,4));return e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Ws(e,i,0),e.ptr_const(r),e.callImport("value_copy"),!0}case 55:{const t=Us(n,4);return e.local("cknull_ptr"),0!==s&&(e.i32_const(s),e.appendU8(106)),Ws(e,i,0),Ga(e,t),!0}case 44:case 43:return e.local("pLocals"),Vs(e,a,40),0!==s&&(e.i32_const(s),e.appendU8(106)),Hs(e,i,l),!0;default:return!1}return o&&e.local("pLocals"),e.local("cknull_ptr"),o?(e.appendU8(u),e.appendMemarg(s,0),Hs(e,i,l),!0):(Vs(e,i,u),e.appendU8(l),e.appendMemarg(s,0),!0)}function Qs(e,t,n,r){const o=r>=31&&r<=44||r>=58&&r<=68,a=Us(n,1),s=As(t,Us(n,2)),i=As(t,Us(n,3));!function(e,t,n){e.block(),e.ptr_const(t),e.appendU8(45),e.appendMemarg(Ya(0),0),e.appendU8(13),e.appendULeb(0),Ma(e,n,3),e.endBlock()}(e,s,n);let c=54,l=40;switch(r){case 58:l=44;break;case 59:l=45;break;case 60:l=46;break;case 61:l=47;break;case 66:case 73:case 62:break;case 75:case 64:l=42,c=56;break;case 76:case 65:l=43,c=57;break;case 69:case 70:c=58;break;case 71:case 72:c=59;break;case 63:case 74:l=41,c=55;break;case 77:return e.ptr_const(i),Ws(e,a,0),e.callImport("copy_ptr"),!0;case 67:{const t=Us(n,4);return Ws(e,a,t),e.ptr_const(i),Ga(e,t),!0}case 80:return e.local("pLocals"),e.ptr_const(i),Hs(e,a,c),!0;default:return!1}return o?(e.local("pLocals"),e.ptr_const(i),e.appendU8(l),e.appendMemarg(0,0),Hs(e,a,c),!0):(e.ptr_const(i),Vs(e,a,l),e.appendU8(c),e.appendMemarg(0,0),!0)}function ei(e,t,n){let r,o,a,s,i="math_lhs32",c="math_rhs32",l=!1;const u=ps[n];if(u){e.local("pLocals");const r=1==u;return Vs(e,Us(t,2),r?43:42),r||e.appendU8(u),Vs(e,Us(t,3),r?43:42),r||e.appendU8(u),e.i32_const(n),e.callImport("relop_fp"),Hs(e,Us(t,1),54),!0}switch(n){case 389:case 390:return ai(e,t,n);default:if(s=ds[n],!s)return!1;s.length>3?(r=s[1],o=s[2],a=s[3]):(r=o=s[1],a=s[2])}switch(n){case 363:case 364:case 367:case 368:case 387:case 388:case 391:case 392:{const a=368===n||392===n||364===n||388===n;i=a?"math_lhs64":"math_lhs32",c=a?"math_rhs64":"math_rhs32",e.block(),Vs(e,Us(t,2),r),e.local(i,33),Vs(e,Us(t,3),o),e.local(c,34),l=!0,a&&(e.appendU8(80),e.appendU8(69)),e.appendU8(13),e.appendULeb(0),Ma(e,t,12),e.endBlock(),363!==n&&387!==n&&364!==n&&388!==n||(e.block(),e.local(c),a?e.i52_const(-1):e.i32_const(-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),e.local(i),e.appendU8(a?66:65),e.appendBoundaryValue(a?64:32,-1),e.appendU8(a?82:71),e.appendU8(13),e.appendULeb(0),Ma(e,t,13),e.endBlock());break}case 369:case 371:case 373:case 375:Vs(e,Us(t,2),r),e.local(i,34),Vs(e,Us(t,3),o),e.local(c,34),e.i32_const(n),e.callImport(371===n||375===n?"ckovr_u4":"ckovr_i4"),e.block(64,4),Ma(e,t,13),e.endBlock(),l=!0}return e.local("pLocals"),l?(e.local(i),e.local(c)):(Vs(e,Us(t,2),r),Vs(e,Us(t,3),o)),e.appendU8(s[0]),Hs(e,Us(t,1),a),!0}function ti(e,t,n){const r=us[n];if(!r)return!1;const o=r[1],a=r[2];switch((n<479||n>514)&&e.local("pLocals"),n){case 435:case 437:Vs(e,Us(t,2),o),e.i32_const(1);break;case 439:e.i32_const(0),Vs(e,Us(t,2),o);break;case 443:Vs(e,Us(t,2),o),e.i32_const(-1);break;case 451:case 452:Vs(e,Us(t,2),o),41===o&&e.appendU8(167),e.i32_const(255);break;case 459:case 460:Vs(e,Us(t,2),o),41===o&&e.appendU8(167),e.i32_const(65535);break;case 447:case 448:Vs(e,Us(t,2),o),41===o&&e.appendU8(167),e.i32_const(24),e.appendU8(116),e.i32_const(24);break;case 455:case 456:Vs(e,Us(t,2),o),41===o&&e.appendU8(167),e.i32_const(16),e.appendU8(116),e.i32_const(16);break;case 436:case 438:Vs(e,Us(t,2),o),e.i52_const(1);break;case 440:e.i52_const(0),Vs(e,Us(t,2),o);break;case 444:Vs(e,Us(t,2),o),e.i52_const(-1);break;case 518:case 522:case 526:case 528:case 524:case 628:case 630:Vs(e,Us(t,2),o),e.i32_const(Is(t,3));break;case 519:case 523:case 527:case 529:case 525:case 629:case 631:Vs(e,Us(t,2),o),e.i52_const(Is(t,3));break;default:Vs(e,Us(t,2),o)}return 1!==r[0]&&e.appendU8(r[0]),Hs(e,Us(t,1),a),!0}function ni(e,t,n,r){const o=141===r?t+6:t+8,a=Rs(n,se(o-2));e.local("pLocals"),e.ptr_const(o),e.appendU8(54),e.appendMemarg(a,0),e.callHandlerReturnAddresses.push(o)}function ri(e,t,n,r,o){const a=r>=235&&r<=278;switch(r){case 140:case 141:case 136:case 137:{const a=140===r||141===r,s=t+2*(o=136===r||140===r?xs(t,1):Is(t,1));return o<=0?e.backBranchOffsets.indexOf(s)>=0?(a&&ni(e,t,n,r),e.cfg.branch(s,!0,0),Da.backBranchesEmitted++,!0):(s1&&ut(`${va(r)} target 0x${s.toString(16)} before start of trace`):e.cfg.trace>0&&ut(`0x${t.toString(16)} ${va(r)} target 0x${s.toString(16)} not found in list `+e.backBranchOffsets.map((e=>"0x"+e.toString(16))).join(", ")),St.mono_jiterp_boost_back_branch_target(s),Ma(e,s,5),Da.backBranchesNotEmitted++,!0):(e.branchTargets.add(s),a&&ni(e,t,n,r),e.cfg.branch(s,!1,0),!0)}case 153:case 151:case 237:case 235:case 154:case 152:{const n=154===r||152===r;o=Is(t,2),Vs(e,Us(t,1),n?41:40),151===r||235===r?e.appendU8(69):152===r?e.appendU8(80):154===r&&(e.appendU8(80),e.appendU8(69));break}default:if(void 0===_s[r])throw new Error(`Unsupported relop branch opcode: ${va(r)}`);if(4!==St.mono_jiterp_get_opcode_info(r,1))throw new Error(`Unsupported long branch opcode: ${va(r)}`)}if(!o)throw new Error("Branch had no displacement");const s=t+2*o;return o<0?e.backBranchOffsets.indexOf(s)>=0?(e.cfg.branch(s,!0,a?3:1),Da.backBranchesEmitted++):(s1&&ut(`${va(r)} target 0x${s.toString(16)} before start of trace`):e.cfg.trace>0&&ut(`0x${t.toString(16)} ${va(r)} target 0x${s.toString(16)} not found in list `+e.backBranchOffsets.map((e=>"0x"+e.toString(16))).join(", ")),St.mono_jiterp_boost_back_branch_target(s),e.block(64,4),Ma(e,s,5),e.endBlock(),Da.backBranchesNotEmitted++):(e.branchTargets.add(s),e.cfg.branch(s,!1,a?3:1)),!0}function oi(e,t,n,r){const o=_s[r];if(!o)return!1;const a=Array.isArray(o)?o[0]:o,s=ds[a],i=ps[a];if(!s&&!i)return!1;const c=Is(t,3),l=s?s[1]:1===i?43:42;return Vs(e,Us(t,1),l),s||1===i||e.appendU8(i),Array.isArray(o)&&o[1]?(e.appendU8(o[1]),e.appendLeb(Is(t,2))):Vs(e,Us(t,2),l),s||1==i||e.appendU8(i),s?e.appendU8(s[0]):(e.i32_const(a),e.callImport("relop_fp")),ri(e,t,n,r,c)}function ai(e,t,n){let r,o,a,s;const i=Us(t,1),c=Us(t,2),l=Us(t,3),u=fs[n];if(!u)return!1;if(r=u[0],o=u[1],"string"==typeof u[2]?a=u[2]:s=u[2],e.local("pLocals"),r){if(Vs(e,c,o?42:43),s)e.appendU8(s);else{if(!a)throw new Error("internal error");e.callImport(a)}return Hs(e,i,o?56:57),!0}if(Vs(e,c,o?42:43),Vs(e,l,o?42:43),s)e.appendU8(s);else{if(!a)throw new Error("internal error");e.callImport(a)}return Hs(e,i,o?56:57),!0}function si(e,t,n){const r=n>=95&&n<=120,o=n>=115&&n<=120,a=n>=103&&n<=114||n>=128&&n<=135||o,s=n>=109&&n<=114||n>=132&&n<=135||o;let i,c,l=-1,u=0,p=1;o?(i=Us(t,1),c=Us(t,2),l=Us(t,3),u=Is(t,4),p=Is(t,5)):a?s?r?(i=Us(t,1),c=Us(t,2),u=Is(t,3)):(i=Us(t,2),c=Us(t,1),u=Is(t,3)):r?(i=Us(t,1),c=Us(t,2),l=Us(t,3)):(i=Us(t,3),c=Us(t,1),l=Us(t,2)):r?(c=Us(t,2),i=Us(t,1)):(c=Us(t,1),i=Us(t,2));let d,_=54;switch(n){case 95:case 103:case 109:case 115:d=44;break;case 96:case 104:case 110:case 116:d=45;break;case 97:case 105:case 111:case 117:d=46;break;case 98:case 106:case 112:case 118:d=47;break;case 121:case 128:case 132:d=40,_=58;break;case 122:case 129:case 133:d=40,_=59;break;case 99:case 107:case 113:case 119:case 123:case 130:case 134:case 127:d=40;break;case 101:case 125:d=42,_=56;break;case 102:case 126:d=43,_=57;break;case 100:case 108:case 114:case 120:case 124:case 131:case 135:d=41,_=55;break;default:return!1}return Ys(e,c,t,!1),r?(e.local("pLocals"),e.local("cknull_ptr"),o?(Vs(e,l,40),0!==u&&(e.i32_const(u),e.appendU8(106),u=0),1!==p&&(e.i32_const(p),e.appendU8(108)),e.appendU8(106)):a&&l>=0?(Vs(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),e.appendU8(d),e.appendMemarg(u,0),Hs(e,i,_)):127===n?(e.local("cknull_ptr"),Ws(e,i,0),e.callImport("copy_ptr")):(e.local("cknull_ptr"),a&&l>=0?(Vs(e,l,40),e.appendU8(106)):u<0&&(e.i32_const(u),e.appendU8(106),u=0),Vs(e,i,d),e.appendU8(_),e.appendMemarg(u,0)),!0}function ii(e,t,n,r,o){e.block(),Vs(e,r,40),e.local("index",34);let a="cknull_ptr";e.options.zeroPageOptimization&&ts()?(Da.nullChecksFused++,Vs(e,n,40),a="src_ptr",e.local(a,34)):Ys(e,n,t,!0),e.appendU8(40),e.appendMemarg(Ya(9),2),e.appendU8(73),e.appendU8(13),e.appendULeb(0),Ma(e,t,9),e.endBlock(),e.local(a),e.i32_const(Ya(1)),e.appendU8(106),e.local("index"),1!=o&&(e.i32_const(o),e.appendU8(108)),e.appendU8(106)}function ci(e,t,n,r){const o=r<=336&&r>=323||348===r,a=Us(n,o?2:1),s=Us(n,o?1:3),i=Us(n,o?3:2);let c,l,u=54;switch(r){case 348:return e.local("pLocals"),Ys(e,a,n,!0),e.appendU8(40),e.appendMemarg(Ya(9),2),Hs(e,s,54),!0;case 334:return e.local("pLocals"),l=Us(n,4),ii(e,n,a,i,l),Hs(e,s,54),!0;case 345:return e.block(),Vs(e,Us(n,1),40),Vs(e,Us(n,2),40),Vs(e,Us(n,3),40),e.callImport("stelem_ref"),e.appendU8(13),e.appendULeb(0),Ma(e,n,10),e.endBlock(),!0;case 332:case 328:case 327:case 341:l=4,c=40;break;case 323:l=1,c=44;break;case 324:l=1,c=45;break;case 338:case 337:l=1,c=40,u=58;break;case 325:l=2,c=46;break;case 326:l=2,c=47;break;case 340:case 339:l=2,c=40,u=59;break;case 330:case 343:l=4,c=42,u=56;break;case 329:case 342:l=8,c=41,u=55;break;case 331:case 344:l=8,c=43,u=57;break;case 333:{const t=Us(n,4);return e.local("pLocals"),e.i32_const(Us(n,1)),e.appendU8(106),ii(e,n,a,i,t),Ga(e,t),Fs(Us(n,1),t),!0}case 346:{const r=Us(n,5),o=As(t,Us(n,4));return ii(e,n,a,i,r),Ws(e,s,0),e.ptr_const(o),e.callImport("value_copy"),!0}case 347:{const t=Us(n,5);return ii(e,n,a,i,t),Ws(e,s,0),Ga(e,t),!0}default:return!1}return o?(e.local("pLocals"),ii(e,n,a,i,l),e.appendU8(c),e.appendMemarg(0,0),Hs(e,s,u)):(ii(e,n,a,i,l),Vs(e,s,c),e.appendU8(u),e.appendMemarg(0,0)),!0}function li(){if(void 0!==Ds)return Ds;try{const e=function(){const e=new ja(0);e.defineType("test",{},64,!0),e.defineFunction({type:"test",name:"test",export:!0,locals:{}},(()=>{e.i32_const(0),e.appendSimd(17),e.appendU8(26),e.appendU8(11)})),e.appendU32(1836278016),e.appendU32(1),e.generateTypeSection(),e.emitImportsAndFunctions(!1);const t=e.getArrayView();return new WebAssembly.Module(t)}();Ds=!!e}catch(e){ut("Disabling WASM SIMD support due to JIT failure",e),Ds=!1}return Ds}function ui(e,t,n){const r=`${t}_${n.toString(16)}`;return"object"!=typeof e.importedFunctions[r]&&e.defineImportedFunction("s",r,t,!1,n),r}function pi(e,t,n,r,o,a){if(e.options.enableSimd&&li())switch(o){case 2:if(function(e,t,n){const r=St.mono_jiterp_get_simd_opcode(1,n);if(r>=0)return Ss.has(n)?(e.local("pLocals"),Vs(e,Us(t,2),40),e.appendSimd(r,!0),e.appendMemarg(0,0),di(e,t)):(_i(e,t),e.appendSimd(r),di(e,t)),!0;const o=vs[n];if(o)return _i(e,t),e.appendSimd(o),Hs(e,Us(t,1),54),!0;switch(n){case 6:case 7:case 8:case 9:{const r=Es[n];return e.local("pLocals"),e.v128_const(0),Vs(e,Us(t,2),r[0]),e.appendSimd(r[1]),e.appendU8(0),Hs(e,Us(t,1),253,11),!0}case 14:return _i(e,t,7),di(e,t),!0;case 15:return _i(e,t,8),di(e,t),!0;case 16:return _i(e,t,9),di(e,t),!0;case 17:return _i(e,t,10),di(e,t),!0;default:return!1}}(e,t,a))return!0;break;case 3:if(function(e,t,n){const r=St.mono_jiterp_get_simd_opcode(2,n);if(r>=0){const o=gs.has(n),a=ys[n];if(o)e.local("pLocals"),Vs(e,Us(t,2),253,0),Vs(e,Us(t,3),40),e.appendSimd(r),di(e,t);else if(Array.isArray(a)){const n=$s(e,Us(t,3)),o=a[0];if("number"!=typeof n)return dt(`${e.functions[0].name}: Non-constant lane index passed to ExtractScalar`),!1;if(n>=o||n<0)return dt(`${e.functions[0].name}: ExtractScalar index ${n} out of range (0 - ${o-1})`),!1;e.local("pLocals"),Vs(e,Us(t,2),253,0),e.appendSimd(r),e.appendU8(n),Hs(e,Us(t,1),a[1])}else fi(e,t),e.appendSimd(r),di(e,t);return!0}switch(n){case 187:return Vs(e,Us(t,2),40),Vs(e,Us(t,3),253,0),e.appendSimd(11),e.appendMemarg(0,0),!0;case 10:case 11:return fi(e,t),e.appendSimd(214),e.appendSimd(195),11===n&&e.appendU8(69),Hs(e,Us(t,1),54),!0;case 12:case 13:{const r=13===n,o=r?71:65;return e.local("pLocals"),Vs(e,Us(t,2),253,0),e.local("math_lhs128",34),Vs(e,Us(t,3),253,0),e.local("math_rhs128",34),e.appendSimd(o),e.local("math_lhs128"),e.local("math_lhs128"),e.appendSimd(o),e.local("math_rhs128"),e.local("math_rhs128"),e.appendSimd(o),e.appendSimd(80),e.appendSimd(77),e.appendSimd(80),e.appendSimd(r?195:163),Hs(e,Us(t,1),54),!0}case 43:{const n=Us(t,3),r=$s(e,n);return e.local("pLocals"),Vs(e,Us(t,2),253,0),"object"==typeof r?(e.appendSimd(12),e.appendBytes(r)):Vs(e,n,253,0),e.appendSimd(14),di(e,t),!0}case 44:case 45:return function(e,t,n){const r=16/n,o=Us(t,3),a=$s(e,o);if(2!==r&&4!==r&&w(!1,"Unsupported shuffle element size"),e.local("pLocals"),Vs(e,Us(t,2),253,0),"object"==typeof a){const t=new Uint8Array(xi),o=2===r?new Uint16Array(a.buffer,a.byteOffset,n):new Uint32Array(a.buffer,a.byteOffset,n);for(let e=0,a=0;e=0){const o=ws[n],a=ks[n];if(Array.isArray(o)){const n=o[0],a=$s(e,Us(t,3));if("number"!=typeof a)return dt(`${e.functions[0].name}: Non-constant lane index passed to ReplaceScalar`),!1;if(a>=n||a<0)return dt(`${e.functions[0].name}: ReplaceScalar index ${a} out of range (0 - ${n-1})`),!1;e.local("pLocals"),Vs(e,Us(t,2),253,0),Vs(e,Us(t,4),o[1]),e.appendSimd(r),e.appendU8(a),di(e,t)}else if(Array.isArray(a)){const n=a[0],o=$s(e,Us(t,4));if("number"!=typeof o)return dt(`${e.functions[0].name}: Non-constant lane index passed to store method`),!1;if(o>=n||o<0)return dt(`${e.functions[0].name}: Store lane ${o} out of range (0 - ${n-1})`),!1;Vs(e,Us(t,2),40),Vs(e,Us(t,3),253,0),e.appendSimd(r),e.appendMemarg(0,0),e.appendU8(o)}else!function(e,t){e.local("pLocals"),Vs(e,Us(t,2),253,0),Vs(e,Us(t,3),253,0),Vs(e,Us(t,4),253,0)}(e,t),e.appendSimd(r),di(e,t);return!0}switch(n){case 0:return e.local("pLocals"),Vs(e,Us(t,3),253,0),Vs(e,Us(t,4),253,0),Vs(e,Us(t,2),253,0),e.appendSimd(82),di(e,t),!0;case 7:{const n=$s(e,Us(t,4));if("object"!=typeof n)return dt(`${e.functions[0].name}: Non-constant indices passed to PackedSimd.Shuffle`),!1;for(let t=0;t<32;t++){const r=n[t];if(r<0||r>31)return dt(`${e.functions[0].name}: Shuffle lane index #${t} (${r}) out of range (0 - 31)`),!1}return e.local("pLocals"),Vs(e,Us(t,2),253,0),Vs(e,Us(t,3),253,0),e.appendSimd(13),e.appendBytes(n),di(e,t),!0}default:return!1}}(e,t,a))return!0}switch(n){case 640:if(e.options.enableSimd&&li()){e.local("pLocals");const n=Ee().slice(t+4,t+4+xi);e.v128_const(n),di(e,t),Cs.set(Us(t,1),n)}else Ws(e,Us(t,1),xi),e.ptr_const(t+4),Ga(e,xi);return!0;case 641:case 642:case 643:case 644:{const r=ms[n],o=xi/r,a=Us(t,1),s=Us(t,2),i=hs[n],c=bs[n];for(let t=0;t0&&(Ai.push(["trace_eip","trace_eip",Bi]),Ai.push(["trace_args","trace_eip",Oi]));const e=(e,t)=>{for(let n=0;n>>0,hi.operand2=t>>>0}function Mi(e,t,n,r){if("number"==typeof r)St.mono_jiterp_adjust_abort_count(r,1),r=va(r);else{let e=Ei[r];"number"!=typeof e?e=1:e++,Ei[r]=e}Ui[e].abortReason=r}function Fi(e,t){if(!l.runtimeReady)return;if(bi&&void 0===e||(bi=ss()),!bi.enableStats&&void 0!==e)return;const n=Da.backBranchesEmitted/(Da.backBranchesEmitted+Da.backBranchesNotEmitted)*100,r=St.mono_jiterp_get_rejected_trace_count(),o=bi.eliminateNullChecks?Da.nullChecksEliminated.toString():"off",a=bi.zeroPageOptimization?Da.nullChecksFused.toString()+(ts()?"":" (disabled)"):"off",s=bi.enableBackwardBranches?`emitted: ${Da.backBranchesEmitted}, failed: ${Da.backBranchesNotEmitted} (${n.toFixed(1)}%)`:": off",i=Da.jitCallsCompiled?bi.directJitCalls?`direct jit calls: ${Da.directJitCallsCompiled} (${(Da.directJitCallsCompiled/Da.jitCallsCompiled*100).toFixed(1)}%)`:"direct jit calls: off":"";if(ut(`// jitted ${Da.bytesGenerated} bytes; ${Da.tracesCompiled} traces (${(Da.tracesCompiled/Da.traceCandidates*100).toFixed(1)}%) (${r} rejected); ${Da.jitCallsCompiled} jit_calls; ${Da.entryWrappersCompiled} interp_entries`),ut(`// cknulls eliminated: ${o}, fused: ${a}; back-branches ${s}; ${i}`),ut(`// time: ${0|Na.generation}ms generating, ${0|Na.compilation}ms compiling wasm.`),!t){if(bi.countBailouts){const e=Object.values(Ui);e.sort(((e,t)=>(t.bailoutCount||0)-(e.bailoutCount||0)));for(let e=0;et.hitCount-e.hitCount)),ut("// hottest failed traces:");for(let e=0,n=0;e=0)){if(t[e].abortReason){if(t[e].abortReason.startsWith("mono_icall_")||t[e].abortReason.startsWith("ret."))continue;switch(t[e].abortReason){case"trace-too-small":case"trace-too-big":case"call":case"callvirt.fast":case"calli.nat.fast":case"calli.nat":case"call.delegate":case"newobj":case"newobj_vt":case"newobj_slow":case"switch":case"rethrow":case"end-of-body":case"ret":case"intrins_marvin_block":case"intrins_ascii_chars_to_uppercase":continue}}n++,ut(`${t[e].name} @${t[e].ip} (${t[e].hitCount} hits) ${t[e].abortReason}`)}const n=[];for(const t in e)n.push([t,e[t]]);n.sort(((e,t)=>t[1]-e[1])),ut("// heat:");for(let e=0;e0?Ei[t]=n:delete Ei[t]}const e=Object.keys(Ei);e.sort(((e,t)=>Ei[t]-Ei[e]));for(let t=0;tFi(e)),15e3)}}let Pi=!1;function zi(){if(Pi)throw new Error("GC is already locked");Pi=!0}function Vi(){if(!Pi)throw new Error("GC is not locked");Pi=!1}async function Hi(e){const t=u.config.resources.lazyAssembly;if(!t)throw new Error("No assemblies have been marked as lazy-loadable. Use the 'BlazorWebAssemblyLazyLoad' item group in your project file to enable lazy loading an assembly.");if(!t[e])throw new Error(`${e} must be marked with 'BlazorWebAssemblyLazyLoad' item group in your project file to allow lazy-loading.`);const n={name:e,hash:t[e],behavior:"assembly"};if(u.loadedAssemblies.includes(e))return!1;const r=function(e,t){const n=e.lastIndexOf(".");if(n<0)throw new Error(`No extension to replace in '${e}'`);return e.substring(0,n)+".pdb"}(n.name),o=u.hasDebuggingEnabled(u.config)&&Object.prototype.hasOwnProperty.call(t,r),a=u.retrieve_asset_download(n);let s=null,i=null;if(o){const e=t[r]?u.retrieve_asset_download({name:r,hash:t[r],behavior:"pdb"}):Promise.resolve(null),[n,o]=await Promise.all([a,e]);s=new Uint8Array(n),i=o?new Uint8Array(o):null}else{const e=await a;s=new Uint8Array(e),i=null}return l.javaScriptExports.load_lazy_assembly(s,i),!0}async function Wi(e){const t=u.config.resources.satelliteResources;t&&await Promise.all(e.filter((e=>Object.prototype.hasOwnProperty.call(t,e))).map((e=>{const n=[];for(const r in t[e]){const o={name:r,hash:t[e][r],behavior:"resource",culture:e};n.push(u.retrieve_asset_download(o))}return n})).reduce(((e,t)=>e.concat(t)),new Array).map((async e=>{const t=await e;l.javaScriptExports.load_satellite_assembly(new Uint8Array(t))})))}const Gi=64;let qi,Ji,Yi,Xi=0;const Zi=[],Ki={};function Qi(){return Ji||(Ji=[Qa("interp_entry_prologue",Xa("mono_jiterp_interp_entry_prologue")),Qa("interp_entry",Xa("mono_jiterp_interp_entry")),Qa("unbox",Xa("mono_jiterp_object_unbox")),Qa("stackval_from_data",Xa("mono_jiterp_stackval_from_data"))],Ji)}let ec;function tc(){if(Zi.length<=0)return;const e=4*Zi.length+1;let t=qi;if(t?t.clear(e):(qi=t=new ja(e),t.defineType("unbox",{pMonoObject:127},127,!0),t.defineType("interp_entry_prologue",{pData:127,this_arg:127},127,!0),t.defineType("interp_entry",{pData:127,res:127},64,!0),t.defineType("stackval_from_data",{type:127,result:127,value:127},64,!0)),t.options.wasmBytesLimit<=Da.bytesGenerated)return void(Zi.length=0);const n=Ba();let r=0,o=!0,a=!1;try{t.appendU32(1836278016),t.appendU32(1);for(let e=0;egc[St.mono_jiterp_type_to_ldind(e)])),this.enableDirect=ss().directJitCalls&&!this.noWrapper&&this.wasmNativeReturnType&&(0===this.wasmNativeSignature.length||this.wasmNativeSignature.every((e=>e))),this.enableDirect&&(this.target=this.addr);let i=this.target.toString(16);const c=lc++;this.name=`${this.enableDirect?"jcp":"jcw"}_${i}_${c.toString(16)}`}}function fc(e){let t=uc[e];return t||(e>=uc.length&&(uc.length=e+1),ic||(ic=Pa()),uc[e]=t=ic.get(e)),t}let mc;function hc(){if(void 0!==cc)return cc;try{mc=function(){const e=new ja(0);e.defineType("jit_call_cb",{cb_data:127},64,!0),e.defineType("do_jit_call",{unused:127,cb_data:127,thrown:127},64,!0),e.defineImportedFunction("i","jit_call_cb","jit_call_cb",!0),e.defineFunction({type:"do_jit_call",name:"do_jit_call_indirect",export:!0,locals:{}},(()=>{e.block(64,6),e.local("cb_data"),e.callImport("jit_call_cb"),e.appendU8(25),e.local("thrown"),e.i32_const(1),e.appendU8(54),e.appendMemarg(0,0),e.endBlock(),e.appendU8(11)})),e.appendU32(1836278016),e.appendU32(1),e.generateTypeSection(),e.emitImportsAndFunctions(!1);const t=e.getArrayView();return new WebAssembly.Module(t)}(),cc=!0}catch(e){ut("Disabling WASM EH support due to JIT failure",e),cc=!1}return cc}function bc(){if(0===dc.length)return;let e=sc;if(e?e.clear(0):(sc=e=new ja(0),e.defineType("trampoline",{ret_sp:127,sp:127,ftndesc:127,thrown:127},64,!0)),e.options.wasmBytesLimit<=Da.bytesGenerated)return void(dc.length=0);e.options.enableWasmEh&&(hc()||(as({enableWasmEh:!1}),e.options.enableWasmEh=!1));const t=Ba();let n=0,r=!0,o=!1;const a=[];try{ic||(ic=Pa()),e.appendU32(1836278016),e.appendU32(1);for(let t=0;t0?t[0]:void 0}catch(t){throw new Error(`Get culture info failed for culture = ${e} with error: ${t}`)}}const Lc="MMMM",Cc="yyyy",$c="d";function Nc(e,t,n,r){let o=n;const a=t.indexOf(n);if(-1==a||-1!=a&&t.length>a+n.length&&" "!=t[a+n.length]&&","!=t[a+n.length]&&"،"!=t[a+n.length]){const a=r.format(e).toLowerCase();o=t.split(/,| /).filter((e=>!a.split(/,| /).includes(e)&&e[0]==n[0]))[0]}return o}async function Dc(e,t){try{const n=await Bc(e,t);return u.mono_exit(n),n}catch(e){try{u.mono_exit(1,e)}catch(e){}return e&&"number"==typeof e.status?e.status:1}}async function Bc(e,n){!function(e,n){const r=n.length+1,o=t._malloc(4*r);let a=0;t.setValue(o+4*a,St.mono_wasm_strdup(e),"i32"),a+=1;for(let e=0;e{const t=setInterval((()=>{1==l.waitForDebugger&&(clearInterval(t),e())}),100)})));const r=Oc(e);return l.javaScriptExports.call_entry_point(r,n)}function Oc(e){u.assert_runtime_running(),fr();const t=wr(e);if(!t)throw new Error("Could not find assembly: "+e);let n=0;1==l.waitForDebugger&&(n=1);const r=St.mono_wasm_assembly_get_entry_point(t,n);if(!r)throw new Error("Could not find entry point for assembly: "+e);return r}let Mc,Fc;const Pc={},zc=Symbol.for("wasm type");function Vc(e){return"undefined"!=typeof SharedArrayBuffer?e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer:e.buffer instanceof ArrayBuffer}function Hc(e,t,n){switch(!0){case null===t:case void 0===t:return void n.clear();case"symbol"==typeof t:case"string"==typeof t:return void cl._create_uri_ref(t,n.address);default:return void qc(e,t,n)}}function Wc(e){sl();const t=Be();try{return Gc(e,t,!1),t.value}finally{t.release()}}function Gc(e,t,n){if(sl(),A(t))throw new Error("Expected (value, WasmRoot, boolean)");switch(!0){case null===e:case void 0===e:return void t.clear();case"number"==typeof e:{let n;return(0|e)===e?(X(Pc._box_buffer,e),n=Pc._class_int32):e>>>0===e?(G(Pc._box_buffer,e),n=Pc._class_uint32):(re(Pc._box_buffer,e),n=Pc._class_double),void kt.mono_wasm_box_primitive_ref(n,Pc._box_buffer,8,t.address)}case"string"==typeof e:return void ot(e,t);case"symbol"==typeof e:return void at(e,t);case"boolean"==typeof e:return z(Pc._box_buffer,e),void kt.mono_wasm_box_primitive_ref(Pc._class_boolean,Pc._box_buffer,4,t.address);case!0===Wr(e):return void function(e,t){if(!e)return t.clear(),null;const n=Dr(e),r=cl._create_tcs(),o={tcs_gc_handle:r};Or(o,r),e.then((e=>{cl._set_tcs_result_ref(r,e)}),(e=>{cl._set_tcs_failure(r,e?e.toString():"")})).finally((()=>{Br(n),Mr(o,r)})),cl._get_tcs_task_ref(r,t.address)}(e,t);case"Date"===e.constructor.name:return void cl._create_date_time_ref(e.getTime(),t.address);default:return void qc(n,e,t)}}function qc(e,t,n){if(n.clear(),null!=t)if(void 0===t[Lr]){if(t[Cr]&&(function(e,t,n){e!==x&&e!==I?cl._get_cs_owned_object_by_js_handle_ref(e,t?1:0,n):X(n,0)}(t[Cr],e,n.address),n.value||delete t[Cr]),!n.value){const r=t[zc],o=void 0===r?0:r,a=Dr(t);cl._create_cs_owned_proxy_ref(a,o,e?1:0,n.address)}}else yl(Fr(t),n.address)}function Jc(e,n){if(!Vc(e)||!e.BYTES_PER_ELEMENT)throw new Error("Object '"+e+"' is not a typed array");{const r=e[zc],o=function(e){sl();const n=e.length*e.BYTES_PER_ELEMENT,r=t._malloc(n),o=Ee(),a=new Uint8Array(o.buffer,r,n);return a.set(new Uint8Array(e.buffer,e.byteOffset,n)),a}(e);kt.mono_wasm_typed_array_new_ref(o.byteOffset,e.length,e.BYTES_PER_ELEMENT,r,n.address),t._free(o.byteOffset)}}function Yc(e){const t=Be();try{return Jc(e,t),t.value}finally{t.release()}}function Xc(e){if("number"!=typeof e)throw new Error(`Expected numeric value for enum argument, got '${e}'`);return 0|e}const Zc=/[^A-Za-z0-9_$]/g,Kc=new Map,Qc=new Map,el=new Map;function tl(e,t,n,r){let o=null,a=null,s=null;if(r){s=Object.keys(r),a=new Array(s.length);for(let e=0,t=s.length;e=512)throw new Error(`Got marshaling error ${t} when attempting to unbox object at address ${e.value} (root located at ${e.address})`);let r=v;if((4===t||7==t)&&(r=ie(n),r<1024))throw new Error(`Got invalid MonoType ${r} for object at address ${e.value} (root located at ${e.address})`);return function(e,t,n,r){switch(t){case 0:return null;case 26:case 27:throw new Error("int64 not available");case 3:case 29:return rt(e);case 4:throw new Error("no idea on how to unbox value types");case 5:return function(e){return e.value===S?null:function(e){let t=zr(e);if(t)Fr(t);else{t=function(...e){return Fr(t),(0,t[_l])(...e)};const n=Be();yl(e,n.address);try{if(void 0===t[_l]){const r=kt.mono_wasm_get_delegate_invoke_ref(n.address),o=nl(r,al(r,n),!0);if(t[_l]=o.bind({this_arg_gc_handle:e}),!t[_l])throw new Error("System.Delegate Invoke method can not be resolved.")}}finally{n.release()}Or(t,e)}return t}(cl._get_js_owned_object_gc_handle_ref(e.address))}(e);case 6:return function(e){if(e.value===S)return null;if(!Hr)throw new Error("Promises are not supported thus 'System.Threading.Tasks.Task' can not work in this context.");const t=cl._get_js_owned_object_gc_handle_ref(e.address);let n=zr(t);if(!n){const r=()=>Mr(n,t),{promise:o,promise_control:a}=y(r,r);n=o,cl._setup_js_cont_ref(e.address,a),Or(n,t)}return n}(e);case 7:return function(e){if(e.value===S)return null;const t=cl._try_get_cs_owned_object_js_handle_ref(e.address,0);if(t){if(t===I)throw new Error("Cannot access a disposed JSObject at "+e.value);return Nr(t)}const n=cl._get_js_owned_object_gc_handle_ref(e.address);let r=zr(n);return A(r)&&(r=new ManagedObject,Or(r,n)),r}(e);case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:throw new Error("Marshaling of primitive arrays are not supported.");case 20:return new Date(cl._get_date_value_ref(e.address));case 21:case 22:return cl._object_to_string_ref(e.address);case 23:return function(e){return Nr(cl._get_cs_owned_object_js_handle_ref(e.address,0))}(e);case 30:return;default:throw new Error(`no idea on how to unbox object of MarshalType ${t} at offset ${e.value} (root address is ${e.address})`)}}(e,t)}function hl(e){if(0===e.value)return;const t=Pc._unbox_buffer,n=kt.mono_wasm_try_unbox_primitive_and_get_type_ref(e.address,t,Pc._unbox_buffer_size);switch(n){case 1:return _e(t);case 25:case 32:return ie(t);case 24:return be(t);case 2:return ge(t);case 8:return 0!==_e(t);case 28:return String.fromCharCode(_e(t));case 0:return null;default:return ml(e,n,t)}}function bl(e){if(sl(),e===k)return null;const t=Be(e);try{return gl(t)}finally{t.release()}}function gl(e){if(e.value===k)return null;const t=e.address,n=Be(),r=n.address;try{const e=kt.mono_wasm_array_length_ref(t),a=new Array(e);for(let s=0;s0&&Array.isArray(e[0])&&(e[0]=function(e,t,n){const r=Be();kt.mono_wasm_string_array_new_ref(e.length,r.address);const o=Be(S),a=r.address,s=o.address;try{for(let t=0;tnew RegExp("^((?![0-9]).)*$").test(e)));return e&&0!=e.length?e.join(" "):""}return o}function Il(e){try{return new Intl.Locale(e).weekInfo}catch(t){try{return new Intl.Locale(e).getWeekInfo()}catch(e){return}}}const xl=[function(e){Po&&(globalThis.clearTimeout(Po),Po=void 0),Po=t.safeSetTimeout(mono_wasm_schedule_timer_tick,e)},function(e,t,n,r,o){if(!0!==l.mono_wasm_runtime_is_ready)return;const a=Ee(),s=0!==e?Qe(e).concat(".dll"):"",i=It(new Uint8Array(a.buffer,t,n));let c;r&&(c=It(new Uint8Array(a.buffer,r,o))),zt({eventName:"AssemblyLoaded",assembly_name:s,assembly_b64:i,pdb_b64:c})},function(e,t){const r=Qe(t);n.logging&&"function"==typeof n.logging.debugger&&n.logging.debugger(e,r)},function(e,t,n,r){const o={res_ok:e,res:{id:t,value:It(new Uint8Array(Ee().buffer,n,r))}};Tt.has(t)&&pt(`Adding an id (${t}) that already exists in commands_received`),Tt.set(t,o)},function mono_wasm_fire_debugger_agent_message_with_data(e,t){mono_wasm_fire_debugger_agent_message_with_data_to_pause(It(new Uint8Array(Ee().buffer,e,t)))},mono_wasm_fire_debugger_agent_message_with_data_to_pause,function(){++Vo,t.safeSetTimeout(Go,0)},function(e,n,r,o,a,s,i){if(r||w(!1,"expected instruction pointer"),bi||(bi=ss()),!bi.enableTraces)return 1;if(bi.wasmBytesLimit<=Da.bytesGenerated)return 1;let c,u=Ui[r];if(u||(Ui[r]=u=new Si(r,o,i)),Da.traceCandidates++,bi.estimateHeat||yi.length>0||u.isVerbose){const e=St.mono_wasm_method_get_full_name(n);c=Qe(e),t._free(e)}const p=Qe(St.mono_wasm_method_get_name(n));u.name=c||p;const d=ue(Ya(4)+e),_=ue(Ya(11)+d),f=ue(Ya(10)+d);let m=_?new Uint16Array(Ee().buffer,f,_):null;if(m&&r!==a){const e=(r-a)/2;let t=!1;for(let n=0;ne){t=!0;break}t||(m=null)}const h=function(e,t,n,r,o,a,s){let i=ji;i?i.clear(8):(ji=i=new ja(8),function(e){e.defineType("trace",{frame:127,pLocals:127,cinfo:127},127,!0),e.defineType("bailout",{retval:127,base:127,reason:127},127,!0),e.defineType("copy_ptr",{dest:127,src:127},64,!0),e.defineType("value_copy",{dest:127,src:127,klass:127},64,!0),e.defineType("entry",{imethod:127},127,!0),e.defineType("strlen",{ppString:127,pResult:127},127,!0),e.defineType("getchr",{ppString:127,pIndex:127,pResult:127},127,!0),e.defineType("getspan",{destination:127,span:127,index:127,element_size:127},127,!0),e.defineType("overflow_check_i4",{lhs:127,rhs:127,opcode:127},127,!0),e.defineType("mathop_d_d",{value:124},124,!0),e.defineType("mathop_dd_d",{lhs:124,rhs:124},124,!0),e.defineType("mathop_f_f",{value:125},125,!0),e.defineType("mathop_ff_f",{lhs:125,rhs:125},125,!0),e.defineType("fmaf",{x:125,y:125,z:125},125,!0),e.defineType("fma",{x:124,y:124,z:124},124,!0),e.defineType("trace_eip",{traceId:127,eip:127},64,!0),e.defineType("newobj_i",{ppDestination:127,vtable:127},127,!0),e.defineType("newstr",{ppDestination:127,length:127},127,!0),e.defineType("localloc",{destination:127,len:127,frame:127},64,!0),e.defineType("ld_del_ptr",{ppDestination:127,ppSource:127},64,!0),e.defineType("ldtsflda",{ppDestination:127,offset:127},64,!0),e.defineType("gettype",{destination:127,source:127},127,!0),e.defineType("castv2",{destination:127,source:127,klass:127,opcode:127},127,!0),e.defineType("hasparent",{klass:127,parent:127},127,!0),e.defineType("imp_iface",{vtable:127,klass:127},127,!0),e.defineType("imp_iface_s",{obj:127,vtable:127,klass:127},127,!0),e.defineType("box",{vtable:127,destination:127,source:127,vt:127},64,!0),e.defineType("conv",{destination:127,source:127,opcode:127},127,!0),e.defineType("relop_fp",{lhs:124,rhs:124,opcode:127},127,!0),e.defineType("safepoint",{frame:127,ip:127},64,!0),e.defineType("hashcode",{ppObj:127},127,!0),e.defineType("try_hash",{ppObj:127},127,!0),e.defineType("hascsize",{ppObj:127},127,!0),e.defineType("hasflag",{klass:127,dest:127,sp1:127,sp2:127},64,!0),e.defineType("array_rank",{destination:127,source:127},127,!0),e.defineType("stfld_o",{locals:127,fieldOffsetBytes:127,targetLocalOffsetBytes:127,sourceLocalOffsetBytes:127},127,!0),e.defineType("notnull",{ptr:127,expected:127,traceIp:127,ip:127},64,!0),e.defineType("cmpxchg_i32",{dest:127,newVal:127,expected:127},127,!0),e.defineType("cmpxchg_i64",{dest:127,newVal:127,expected:127,oldVal:127},64,!0),e.defineType("transfer",{displacement:127,trace:127,frame:127,locals:127,cinfo:127},127,!0),e.defineType("stelem_ref",{o:127,aindex:127,ref:127},127,!0),e.defineType("simd_p_p",{arg0:127,arg1:127},64,!0),e.defineType("simd_p_pp",{arg0:127,arg1:127,arg2:127},64,!0),e.defineType("simd_p_ppp",{arg0:127,arg1:127,arg2:127,arg3:127},64,!0);const t=Di();for(let n=0;na.indexOf(e)>=0))>=0;h&&!a&&w(!1,"Expected methodFullName if trace is instrumented");const b=h?vi++:0;h&&(ut(`instrumenting: ${a}`),ki[b]=new wi(a)),i.compressImportNames=!h;try{i.appendU32(1836278016),i.appendU32(1),i.generateTypeSection();const t={disp:127,cknull_ptr:127,dest_ptr:127,src_ptr:127,memop_dest:127,memop_src:127,index:127,count:127,math_lhs32:127,math_rhs32:127,math_lhs64:126,math_rhs64:126,temp_f32:125,temp_f64:124,backbranched:127};i.options.enableSimd&&(t.v128_zero=123,t.math_lhs128=123,t.math_rhs128=123);let o=!0,a=0;if(i.defineFunction({type:"trace",name:u,export:!0,locals:t},(()=>{if(i.base=n,i.frame=e,662!==se(n))throw new Error(`Expected *ip to be MINT_TIER_PREPARE_JITERPRETER but was ${se(n)}`);return i.cfg.initialize(r,s,h?1:0),a=function(e,t,n,r,o,a,s,i){let c=!0,l=!1,u=!0,p=!1,d=!1,_=!1,f=0,m=0,h=0;const b=n;Os();let g=n+=2*St.mono_jiterp_get_opcode_info(664,1);for(a.cfg.entry(n);n&&n;){if(a.cfg.ip=n,n>=o){Mi(b,0,0,"end-of-body"),s&&ut(`instrumented trace ${t} exited at end of body @${n.toString(16)}`);break}const y=3840-a.bytesGeneratedSoFar-a.cfg.overheadBytes;if(a.size>=y){Mi(b,0,0,"trace-too-big"),s&&ut(`instrumented trace ${t} exited because of size limit at @${n.toString(16)} (spaceLeft=${y}b)`);break}let S=se(n);const k=St.mono_jiterp_get_opcode_info(S,2),v=St.mono_jiterp_get_opcode_info(S,3),E=St.mono_jiterp_get_opcode_info(S,1),U=S>=645&&S<=647,I=U?S-645+2:0,x=U?Us(n,1+I):0;S>=0&&S<673||w(!1,`invalid opcode ${S}`);const T=U?is[I][x]:va(S),j=n,A=a.options.noExitBackwardBranches&&Ls(n,r,i),R=a.branchTargets.has(n),L=A||R||c&&i,C=h+m+a.branchTargets.size;let $=!1,N=Ka(S);switch(A&&a.backBranchOffsets.push(n),L&&(d=!1,_=!1,Ps(a,n,A),l=!0,u=!0,Os(),h=0),N<-1&&l&&(N=-2===N?2:0),c=!1,279===S||(gi.indexOf(S)>=0?(Ma(a,n,23),S=666):d&&(S=666)),S){case 666:d&&(_||a.appendU8(0),_=!0);break;case 321:case 322:Gs(a,Us(n,1),0,Us(n,2));break;case 320:Ws(a,Us(n,1)),Vs(a,Us(n,2),40),a.local("frame"),a.callImport("localloc");break;case 294:Vs(a,Us(n,1),40),Ha(a,0,Us(n,2));break;case 318:{const e=Us(n,3),t=Us(n,2),r=Us(n,1),o=$s(a,e);0!==o&&("number"!=typeof o?(Vs(a,e,40),a.local("count",34),a.block(64,4)):(a.i32_const(o),a.local("count",33)),Vs(a,r,40),a.local("dest_ptr",34),a.appendU8(69),Vs(a,t,40),a.local("src_ptr",34),a.appendU8(69),a.appendU8(114),a.block(64,4),Ma(a,n,2),a.endBlock(),"number"==typeof o&&Wa(a,0,0,o,!1,"dest_ptr","src_ptr")||(a.local("dest_ptr"),a.local("src_ptr"),a.local("count"),a.appendU8(252),a.appendU8(10),a.appendU8(0),a.appendU8(0)),"number"!=typeof o&&a.endBlock());break}case 319:{const e=Us(n,3),t=Us(n,2);Ys(a,Us(n,1),n,!0),Vs(a,t,40),Vs(a,e,40),a.appendU8(252),a.appendU8(11),a.appendU8(0);break}case 151:case 153:case 235:case 237:case 152:case 154:case 137:case 140:case 141:ri(a,n,e,S)?l=!0:n=0;break;case 537:{const e=Us(n,2),t=Us(n,1);e!==t?(a.local("pLocals"),Ys(a,e,n,!0),Hs(a,t,54)):Ys(a,e,n,!1),a.allowNullCheckOptimization&&Ns.set(t,n),$=!0;break}case 626:case 627:{const t=ue(e+Ya(4));a.ptr_const(t),a.callImport("entry"),a.block(64,4),Ma(a,n,1),a.endBlock();break}case 664:if(N=0,f>=a.options.minimumTraceValue&&!a.options.noExitBackwardBranches&&(!l||u)){const e=Ts(n,1);a.ip_const(n),a.i32_const(e),a.local("frame"),a.local("pLocals"),a.local("cinfo"),a.callImport("transfer"),a.appendU8(15),n=0}break;case 146:Oa(a,n);break;case 94:{a.local("pLocals");const e=Us(n,2);Js(a,e)||dt(`${t}: Expected local ${e} to have address taken flag`),Ws(a,e),Hs(a,Us(n,1),54);break}case 280:case 308:case 309:case 555:{a.local("pLocals");let t=As(e,Us(n,2));308===S&&(t=St.mono_jiterp_imethod_to_ftnptr(t)),a.ptr_const(t),Hs(a,Us(n,1),54);break}case 313:{const t=As(e,Us(n,3));Vs(a,Us(n,1),40),Vs(a,Us(n,2),40),a.ptr_const(t),a.callImport("value_copy");break}case 314:{const e=Us(n,3);Vs(a,Us(n,1),40),Vs(a,Us(n,2),40),Ga(a,e);break}case 315:{const e=Us(n,3);Ws(a,Us(n,1),e),Ys(a,Us(n,2),n,!0),Ga(a,e);break}case 316:{const t=As(e,Us(n,3));Vs(a,Us(n,1),40),Ws(a,Us(n,2),0),a.ptr_const(t),a.callImport("value_copy");break}case 317:{const e=Us(n,3);Vs(a,Us(n,1),40),Ws(a,Us(n,2),0),Ga(a,e);break}case 539:a.local("pLocals"),Ys(a,Us(n,2),n,!0),a.appendU8(40),a.appendMemarg(Ya(2),2),Hs(a,Us(n,1),54);break;case 538:{a.block(),Vs(a,Us(n,3),40),a.local("index",34);let e="cknull_ptr";a.options.zeroPageOptimization&&ts()?(Da.nullChecksFused++,Vs(a,Us(n,2),40),e="src_ptr",a.local(e,34)):Ys(a,Us(n,2),n,!0),a.appendU8(40),a.appendMemarg(Ya(2),2),a.appendU8(72),a.local("index"),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),Ma(a,n,11),a.endBlock(),a.local("pLocals"),a.local("index"),a.i32_const(2),a.appendU8(108),a.local(e),a.appendU8(106),a.appendU8(47),a.appendMemarg(Ya(3),1),Hs(a,Us(n,1),54);break}case 349:case 350:{const e=Is(n,4);a.block(),Vs(a,Us(n,3),40),a.local("index",34);let t="cknull_ptr";349===S?Ys(a,Us(n,2),n,!0):(Ws(a,Us(n,2),0),t="src_ptr",a.local(t,34)),a.appendU8(40),a.appendMemarg(Ya(7),2),a.appendU8(73),a.local("index"),a.i32_const(0),a.appendU8(78),a.appendU8(113),a.appendU8(13),a.appendULeb(0),Ma(a,n,18),a.endBlock(),a.local("pLocals"),a.local(t),a.appendU8(40),a.appendMemarg(Ya(8),2),a.local("index"),a.i32_const(e),a.appendU8(108),a.appendU8(106),Hs(a,Us(n,1),54);break}case 652:a.block(),Vs(a,Us(n,3),40),a.local("count",34),a.i32_const(0),a.appendU8(78),a.appendU8(13),a.appendULeb(0),Ma(a,n,18),a.endBlock(),Ws(a,Us(n,1),16),a.local("dest_ptr",34),Vs(a,Us(n,2),40),a.appendU8(54),a.appendMemarg(0,0),a.local("dest_ptr"),a.local("count"),a.appendU8(54),a.appendMemarg(4,0);break;case 567:Ws(a,Us(n,1),8),Ws(a,Us(n,2),8),a.callImport("ld_del_ptr");break;case 81:Ws(a,Us(n,1),4),a.ptr_const(xs(n,2)),a.callImport("ldtsflda");break;case 651:a.block(),Ws(a,Us(n,1),4),Ws(a,Us(n,2),0),a.callImport("gettype"),a.appendU8(13),a.appendULeb(0),Ma(a,n,2),a.endBlock();break;case 648:{const t=As(e,Us(n,4));a.ptr_const(t),Ws(a,Us(n,1),4),Ws(a,Us(n,2),0),Ws(a,Us(n,3),0),a.callImport("hasflag");break}case 657:{const e=Ya(1);a.local("pLocals"),Ys(a,Us(n,2),n,!0),a.i32_const(e),a.appendU8(106),Hs(a,Us(n,1),54);break}case 649:a.local("pLocals"),Ws(a,Us(n,2),0),a.callImport("hashcode"),Hs(a,Us(n,1),54);break;case 650:a.local("pLocals"),Ws(a,Us(n,2),0),a.callImport("try_hash"),Hs(a,Us(n,1),54);break;case 653:a.local("pLocals"),Ws(a,Us(n,2),0),a.callImport("hascsize"),Hs(a,Us(n,1),54);break;case 658:a.local("pLocals"),Vs(a,Us(n,2),40),a.local("math_lhs32",34),Vs(a,Us(n,3),40),a.appendU8(115),a.i32_const(2),a.appendU8(116),a.local("math_rhs32",33),a.local("math_lhs32"),a.i32_const(327685),a.appendU8(106),a.i32_const(10485920),a.appendU8(114),a.i32_const(1703962),a.appendU8(106),a.i32_const(-8388737),a.appendU8(114),a.local("math_rhs32"),a.appendU8(113),a.appendU8(69),Hs(a,Us(n,1),54);break;case 540:case 541:a.block(),Ws(a,Us(n,1),4),Ws(a,Us(n,2),0),a.callImport(540===S?"array_rank":"a_elesize"),a.appendU8(13),a.appendULeb(0),Ma(a,n,2),a.endBlock();break;case 297:case 298:{const t=As(e,Us(n,3)),r=St.mono_jiterp_is_special_interface(t),o=297===S,s=Us(n,1);if(!t){Mi(b,0,0,"null-klass"),n=0;continue}a.block(),a.options.zeroPageOptimization&&ts()?(Vs(a,Us(n,2),40),a.local("dest_ptr",34),Da.nullChecksFused++):(a.block(),Vs(a,Us(n,2),40),a.local("dest_ptr",34),a.appendU8(13),a.appendULeb(0),a.local("pLocals"),a.i32_const(0),Hs(a,s,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local("dest_ptr")),r&&a.local("dest_ptr"),a.appendU8(40),a.appendMemarg(Ya(14),0),a.ptr_const(t),a.callImport(r?"imp_iface_s":"imp_iface"),o&&(a.local("dest_ptr"),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),Hs(a,s,54),a.appendU8(5),o?Ma(a,n,19):(a.local("pLocals"),a.i32_const(0),Hs(a,s,54)),a.endBlock(),a.endBlock();break}case 299:case 300:case 295:case 296:{const t=As(e,Us(n,3)),r=299===S||300===S,o=295===S||299===S,s=Us(n,1);if(!t){Mi(b,0,0,"null-klass"),n=0;continue}a.block(),a.options.zeroPageOptimization&&ts()?(Vs(a,Us(n,2),40),a.local("dest_ptr",34),Da.nullChecksFused++):(a.block(),Vs(a,Us(n,2),40),a.local("dest_ptr",34),a.appendU8(13),a.appendULeb(0),a.local("pLocals"),a.i32_const(0),Hs(a,s,54),a.appendU8(12),a.appendULeb(1),a.endBlock(),a.local("dest_ptr")),a.appendU8(40),a.appendMemarg(Ya(14),0),a.appendU8(40),a.appendMemarg(Ya(15),0),r&&a.local("src_ptr",34),a.i32_const(t),a.appendU8(70),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),Hs(a,s,54),a.appendU8(5),r?(a.local("src_ptr"),a.ptr_const(t),a.callImport("hasparent"),o&&(a.local("dest_ptr"),a.appendU8(69),a.appendU8(114)),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),Hs(a,s,54),a.appendU8(5),o?Ma(a,n,19):(a.local("pLocals"),a.i32_const(0),Hs(a,s,54)),a.endBlock()):(Ws(a,Us(n,1),4),a.local("dest_ptr"),a.ptr_const(t),a.i32_const(S),a.callImport("castv2"),a.appendU8(69),a.block(64,4),Ma(a,n,19),a.endBlock()),a.endBlock(),a.endBlock();break}case 303:case 304:a.ptr_const(As(e,Us(n,3))),Ws(a,Us(n,1),4),Ws(a,Us(n,2),0),a.i32_const(304===S?1:0),a.callImport("box");break;case 307:{const t=As(e,Us(n,3)),r=Ya(17),o=Us(n,1),s=ue(t+r);if(!t||!s){Mi(b,0,0,"null-klass"),n=0;continue}a.options.zeroPageOptimization&&ts()?(Vs(a,Us(n,2),40),a.local("dest_ptr",34),Da.nullChecksFused++):(Ys(a,Us(n,2),n,!0),a.local("dest_ptr",34)),a.appendU8(40),a.appendMemarg(Ya(14),0),a.appendU8(40),a.appendMemarg(Ya(15),0),a.local("src_ptr",34),a.appendU8(40),a.appendMemarg(r,0),a.i32_const(s),a.appendU8(70),a.local("src_ptr"),a.appendU8(45),a.appendMemarg(Ya(16),0),a.appendU8(69),a.appendU8(113),a.block(64,4),a.local("pLocals"),a.local("dest_ptr"),a.i32_const(Ya(18)),a.appendU8(106),Hs(a,o,54),a.appendU8(5),Ma(a,n,21),a.endBlock();break}case 302:a.block(),Ws(a,Us(n,1),4),Vs(a,Us(n,2),40),a.callImport("newstr"),a.appendU8(13),a.appendULeb(0),Ma(a,n,17),a.endBlock();break;case 291:a.block(),Ws(a,Us(n,1),4),a.ptr_const(As(e,Us(n,2))),a.callImport("newobj_i"),a.appendU8(13),a.appendULeb(0),Ma(a,n,17),a.endBlock();break;case 293:{const e=Us(n,3);Ws(a,Us(n,2),e),Ha(a,0,e),a.local("pLocals"),Ws(a,Us(n,2),e),Hs(a,Us(n,1),54);break}case 290:case 292:case 543:case 542:l?(Fa(a,n,C,15),d=!0,N=0):n=0;break;case 545:case 546:case 547:case 548:case 544:l?(Fa(a,n,C,544==S?22:15),d=!0):n=0;break;case 145:case 142:Ma(a,n,16),d=!0;break;case 138:case 139:Ma(a,n,26),d=!0;break;case 144:if(a.callHandlerReturnAddresses.length>0&&a.callHandlerReturnAddresses.length<=3){const t=Rs(e,Us(n,1));a.local("pLocals"),a.appendU8(40),a.appendMemarg(t,0),a.local("index",33);for(let e=0;e=3&&S<=12||S>=516&&S<=517?l||a.options.countBailouts?(Ma(a,n,14),d=!0):n=0:S>=13&&S<=29?Xs(a,n,S)?$=!0:n=0:S>=82&&S<=93?Zs(a,n,S)||(n=0):S>=351&&S<=434?ei(a,n,S)||(n=0):us[S]?ti(a,n,S)||(n=0):_s[S]?oi(a,n,e,S)?l=!0:n=0:S>=31&&S<=57?Ks(a,e,n,S)||(n=0):S>=58&&S<=81?Qs(a,e,n,S)||(n=0):S>=95&&S<=135?si(a,n,S)||(n=0):S>=568&&S<=621?ai(a,n,S)||(n=0):S>=323&&S<=348?ci(a,e,n,S)||(n=0):S>=235&&S<=278?a.branchTargets.size>0?(Fa(a,n,C,8),d=!0):n=0:S>=640&&S<=647?pi(a,n,S,T,I,x)?(p=!0,$=!0):n=0:0===N||(n=0)}if(n){if(!$){const e=n+2;for(let t=0;t0&&(e+=" -> ");for(let n=0;n0&&(l?h++:m++,f+=N),(n+=2*E)<=o&&(g=n)}else s&&ut(`instrumented trace ${t} aborted for opcode ${T} @${j.toString(16)}`),Mi(b,0,0,S)}for(;a.activeBlocks>0;)a.endBlock();return a.cfg.exitIp=g,p&&(f+=10240),f}(e,u,n,r,c,i,b,s),o=a>=bi.minimumTraceValue,i.cfg.generate()})),i.emitImportsAndFunctions(!1),!o)return m&&"end-of-body"===m.abortReason&&(m.abortReason="trace-too-small"),0;d=Ba();const p=i.getArrayView();if(Da.bytesGenerated+=p.length,p.length>=4080)return pt(`Jiterpreter generated too much code (${p.length} bytes) for trace ${u}. Please report this issue.`),0;const f=new WebAssembly.Module(p),g=i.getWasmImports(),y=new WebAssembly.Instance(f,g).exports[u];_=!1,l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const S=za(y);if(!S)throw new Error("add_function_pointer returned a 0 index");return i.options.enableStats&&Da.tracesCompiled&&Da.tracesCompiled%500==0&&Fi(!1,!0),S}catch(e){return f=!0,_=!1,dt(`${a||u} code generation failed: ${e} ${e.stack}`),qa(),0}finally{const e=Ba();if(d?(Na.generation+=d-p,Na.compilation+=e-d):Na.generation+=e-p,f||!_&&bi.dumpTraces||h){if(f||bi.dumpTraces||h)for(let e=0;e0;)i.endBlock();i.inSection&&i.endSection()}catch(e){}const n=i.getArrayView();for(let r=0;r=4?tc():Xi>0||"function"==typeof globalThis.setTimeout&&(Xi=globalThis.setTimeout((()=>{Xi=0,tc()}),10))}},function(e,t,n,r,o,a,s,i,c){if(n>16)return 0;const l=new class{constructor(e,t,n,r,o,a,s,i,c){this.imethod=e,this.method=t,this.argumentCount=n,this.unbox=o,this.hasThisReference=a,this.hasReturnValue=s,this.name=i,this.paramTypes=new Array(n);for(let e=0;ee&&(l=l.substring(l.length-e,l.length)),l=`${this.imethod.toString(16)}_${l}`}else l=`${this.imethod.toString(16)}_${this.hasThisReference?"i":"s"}${this.hasReturnValue?"_r":""}_${this.argumentCount}`;this.traceName=l,this.hitCount=0}}(e,t,n,r,o,a,s,Qe(i),c);Yi||(Yi=Pa());const u=Yi.get(c);return l.result=za(u),Ki[e]=l,l.result},function(e,t,n,r,o){const a=ue(n+0),s=pc[a];if(s)return void(s.result>0?St.mono_jiterp_register_jit_call_thunk(n,s.result):(s.queue.push(n),s.queue.length>12&&bc()));const i=new _c(e,t,n,r,0!==o);pc[a]=i,dc.push(i),dc.length>=6&&bc()},function(e,t,n,r,o){const a=fc(e);try{a(t,n,r,o)}catch(e){G(o,1)}},bc,function(e,n,r){l.storeMemorySnapshotPending&&w(!1,"Attempting to set function into table during creation of memory snapshot");const o=Pa().get(e),a=function(e,t,n){try{o(t)}catch(e){G(n,1)}};let s=!hc();if(!s)try{const e=new WebAssembly.Instance(mc,{i:{jit_call_cb:o},m:{h:t.getMemory()}}).exports.do_jit_call_indirect;if("function"!=typeof e)throw new Error("Did not find exported do_jit_call handler");const n=za(e);St.mono_jiterp_update_jit_call_dispatcher(n),s=!1}catch(e){dt("failed to compile do_jit_call handler",e),s=!0}if(s)try{const e=t.addFunction(a,"viii");St.mono_jiterp_update_jit_call_dispatcher(e)}catch(e){St.mono_jiterp_update_jit_call_dispatcher(0)}a(0,n,r)},function(){l.enablePerfMeasure&&Xt.push(globalThis.performance.now())},function(e){if(l.enablePerfMeasure){const t=Xt.pop(),n=a?{start:t}:{startTime:t};let r=Zt.get(e);r||(r=Qe(vt.mono_wasm_method_get_name(e)),Zt.set(e,r)),globalThis.performance.measure(r,n)}},function(e,t,r,o,a){const s=Qe(r),i=!!o,c=Qe(e),l=a,u=Qe(t),p=`[MONO] ${s}`;if(n.logging&&"function"==typeof n.logging.trace)n.logging.trace(c,u,p,i,l);else switch(u){case"critical":case"error":console.error(ht(p));break;case"warning":console.warn(p);break;case"message":default:console.log(p);break;case"info":console.info(p);break;case"debug":console.debug(p)}},function(e,t){At=Qe(e).concat(".dll"),Rt=t,console.assert(!0,`Adding an entrypoint breakpoint ${At} at method token ${Rt}`);debugger},function(){},Br,function(e,r,o,a,s,i){fr();const c=De(e),l=De(r),u=De(i);try{const e=fn(o);1!==e&&w(!1,`Signature version ${e} mismatch.`);const t=rt(c),r=Jt(),i=rt(l);lt(`Binding [JSImport] ${t} from ${i} module`);const p=function(e,t){e&&"string"==typeof e||w(!1,"function_name must be string");let r={};const o=e.split(".");t?(r=ur.get(t),r||w(!1,`ES6 module ${t} was not imported yet, please call JSHost.ImportAsync() first.`)):"INTERNAL"===o[0]?(r=n,o.shift()):"globalThis"===o[0]&&(r=globalThis,o.shift());for(let t=0;t{e&&e.dispose()},m=!0):R.Task}const h=sn(o,1),b=cn(h);R.Task;const g=Yr(h,b,1),y={fn:p,fqn:i+":"+t,args_count:d,arg_marshalers:_,res_converter:g,has_cleanup:m,arg_cleanup:f,isDisposed:!1};let S;S=0!=d||g?1!=d||m||g?1==d&&!m&&g?function(e){const t=e.fn,n=e.arg_marshalers[0],r=e.res_converter,o=e.fqn;return e=null,function(a){const s=Jt();try{L&&e.isDisposed;const o=n(a),s=t(o);r(a,s)}catch(e){ho(a,e)}finally{Yt(s,"mono.callCsFunction:",o)}}}(y):2==d&&!m&&g?function(e){const t=e.fn,n=e.arg_marshalers[0],r=e.arg_marshalers[1],o=e.res_converter,a=e.fqn;return e=null,function(s){const i=Jt();try{L&&e.isDisposed;const a=n(s),i=r(s),c=t(a,i);o(s,c)}catch(e){ho(s,e)}finally{Yt(i,"mono.callCsFunction:",a)}}}(y):function(e){const t=e.args_count,n=e.arg_marshalers,r=e.res_converter,o=e.arg_cleanup,a=e.has_cleanup,s=e.fn,i=e.fqn;return e=null,function(c){const l=Jt();try{L&&e.isDisposed;const i=new Array(t);for(let e=0;e2?t:r,e)}else{u=1;const t=s[e].toUpperCase();W(l,n+2*e,(t.length>1?s[e]:t).charCodeAt(0))}else for(let e=0;e2?t:r,e)}else{u=1;const t=s[e].toLowerCase();W(l,n+2*e,(t.length>1?s[e]:t).charCodeAt(0))}}catch(e){dr(a,e,i)}finally{i.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c);if(!e)throw new Error("Cannot change case, the culture name is null.");const i=tt(t,t+2*n),u=a?i.toLocaleUpperCase(e):i.toLocaleLowerCase(e);if(u.length<=i.length)return nt(r,r+2*o,u),void _r(s,l);const p=Ue();let d=1;if(a)for(let t=0;t2?n:o,t)}else{d=1;const n=i[t].toLocaleUpperCase(e);W(p,r+2*t,(n.length>1?i[t]:n).charCodeAt(0))}else for(let t=0;t2?n:o,t)}else{d=1;const n=i[t].toLocaleLowerCase(e);W(p,r+2*t,(n.length>1?i[t]:n).charCodeAt(0))}_r(s,l)}catch(e){dr(s,e,l)}finally{c.release(),l.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c),i=et(t,t+2*n),u=et(r,r+2*o),p=31&a,d=e||void 0;return _r(s,l),xc(i,u,d,p)}catch(e){return dr(s,e,l),-2}finally{c.release(),l.release()}},function(e,t,n,r,o,a,s,i){const c=De(e),l=De(i);try{const e=rt(c),i=Tc(r,o);if(0==i.length)return 1;const u=Tc(t,n);if(u.lengthe.segment));let h=0,b=!1,g=-1,y=0,w=0,S=0;for(;!b;){const e=f.segment(c.slice(h,c.length))[Symbol.iterator]();let t=e.next();if(t.done)break;let n=p(t.value.segment,m[0],d,_);if(w=S,t=e.next(),t.done){g=n?w:g;break}if(y=t.value.index,S=w+y,n){for(let r=1;r1&&e<15||22==e||23==e}(n))return{eraNames:"",abbreviatedEraNames:""};const r=e.toLocaleDateString(t,{year:"numeric"}),o=e.toLocaleDateString(t,{day:"numeric"}),a=e.toLocaleDateString(t,{era:"short"}),s=e.toLocaleDateString(t,{era:"narrow"}),i=a.includes(r)?l(r):l(e.getFullYear().toString());return{eraNames:c(i.eraDateParts,i.ignoredPart),abbreviatedEraNames:c(i.abbrEraDateParts,i.ignoredPart)};function c(e,n){const r=new RegExp(`^((?!${n}|[0-9]).)*$`),o=e.filter((e=>r.test(e)));if(0==o.length)throw new Error(`Internal error, era for locale ${t} was in non-standard format.`);return o[0].trim()}function l(e){return a.startsWith(e)||a.endsWith(e)?{eraDateParts:a.split(o),abbrEraDateParts:s.split(o),ignoredPart:e}:{eraDateParts:a.split(e),abbrEraDateParts:s.split(e),ignoredPart:o}}}(c,e,t);a.EraNames=p.eraNames,a.AbbreviatedEraNames=p.abbreviatedEraNames;const d=Object.values(a).join("##");if(d.length>r)throw new Error(`Calendar info exceeds length of ${r}.`);return nt(n,n+2*d.length,d),_r(o,i),d.length}catch(e){return dr(o,e,i),-1}finally{s.release(),i.release()}},function(e,t,n,r,o){const a=De(e),s=De(o);try{const e=rt(a),o={AmDesignator:"",PmDesignator:"",LongTimePattern:"",ShortTimePattern:""},i=Rc(e),c=function(e){const t=new Date("August 19, 1975 12:15:30"),n=new Date("August 19, 1975 11:15:30"),r=Ul(t,e);return{am:Ul(n,e),pm:r}}(i);o.AmDesignator=c.am,o.PmDesignator=c.pm,o.LongTimePattern=function(e,t){const n=18..toLocaleString(e),r=6..toLocaleString(e),o=new Date("August 19, 1975 18:15:30"),a=new Intl.DateTimeFormat(e,{timeStyle:"medium"}),s=a.format(o),i=o.toLocaleTimeString(e,{minute:"numeric"}),c=o.toLocaleTimeString(e,{second:"numeric"});let l=s.replace(t.pm,"tt").replace(i,"mm").replace(c,"ss");const u=l.includes(n),p=`${(0).toLocaleString(e)}${r}`,d=new Date("August 19, 1975 6:15:30"),_=a.format(d);let f;if(u)f=_.includes(p)?"HH":"H",l=l.replace(n,f);else{const e=_.includes(p);f=e?"hh":"h",l=l.replace(e?p:r,f)}return l}(i,c),o.ShortTimePattern=function(e){const t=e.indexOf("ss");if(t>0){const n=`${e[t-1]}ss`,r=e.replace(n,"");e=r.length>t&&"t"!=r[r.length-1]?e.split(n)[0]:r}return e}(o.LongTimePattern);const l=Object.values(o).join("##");if(l.length>n)throw new Error(`Culture info exceeds length of ${n}.`);return nt(t,t+2*l.length,l),_r(r,s),l.length}catch(e){return dr(r,e,s),-1}finally{a.release(),s.release()}},function(e,t,n){const r=De(e),o=De(n);try{return function(e){const t=Il(e);if(t)return 7==t.firstDay?0:t.firstDay;if(["en-AE","en-SD","fa-IR"].includes(e))return 6;const n=e.split("-")[0];return["zh","th","pt","mr","ml","ko","kn","ja","id","hi","he","gu","fil","bn","am","ar"].includes(n)||["ta-SG","ta-IN","sw-KE","ms-SG","fr-CA","es-MX","en-US","en-ZW","en-ZA","en-WS","en-VI","en-UM","en-TT","en-SG","en-PR","en-PK","en-PH","en-MT","en-MO","en-MH","en-KE","en-JM","en-IN","en-IL","en-HK","en-GU","en-DM","en-CA","en-BZ","en-BW","en-BS","en-AU","en-AS","en-AG"].includes(e)?0:1}(Rc(rt(r)))}catch(e){return dr(t,e,o),-1}finally{r.release(),o.release()}},function(e,t,n){const r=De(e),o=De(n);try{return function(e){const t=Il(e);if(t)return 7==t.minimalDays?1:t.minimalDays<4?0:2;const n=e.split("-")[0];return["pt-PT","fr-CH","fr-FR","fr-BE","es-ES","en-SE","en-NL","en-JE","en-IM","en-IE","en-GI","en-GG","en-GB","en-FJ","en-FI","en-DK","en-DE","en-CH","en-BE","en-AT","el-GR"].includes(e)||["sv","sk","ru","pl","nl","no","lt","it","hu","fi","et","de","da","cs","ca","bg"].includes(n)?2:0}(Rc(rt(r)))}catch(e){return dr(t,e,o),-1}finally{r.release(),o.release()}}],Tl=[...xl,function(e,t,n,r,o){sl();const a=De(n),s=De(t),i=De(o);try{const t=rt(s);if(!t||"string"!=typeof t)return void dr(r,"ERR12: Invalid method name object @"+s.value,i);const n=function(e){return e!==x&&e!==I?Nr(e):null}(e);if(A(n))return void dr(r,"ERR13: Invalid JS object handle '"+e+"' while invoking '"+t+"'",i);const o=gl(a);try{const e=n[t];if(void 0===e)throw new Error("Method: '"+t+"' not found for: '"+Object.prototype.toString.call(n)+"'");Gc(e.apply(n,o),i,!0),_r(r)}catch(e){dr(r,e,i)}}finally{a.release(),s.release(),i.release()}},function(e,t,n,r){sl();const o=De(t),a=De(r);try{const t=rt(o);if(!t)return void dr(n,"Invalid property name object '"+o.value+"'",a);const r=Nr(e);if(A(r))return void dr(n,"ERR01: Invalid JS object handle '"+e+"' while geting '"+t+"'",a);Gc(r[t],a,!0),_r(n)}catch(e){dr(n,e,a)}finally{a.release(),o.release()}},function(e,t,n,r,o,a,s){sl();const i=De(n),c=De(t),l=De(s);try{const n=rt(c);if(!n)return void dr(a,"Invalid property name object '"+t+"'",l);const s=Nr(e);if(A(s))return void dr(a,"ERR02: Invalid JS object handle '"+e+"' while setting '"+n+"'",l);const u=hl(i);if(r)s[n]=u;else{if(!r&&!Object.prototype.hasOwnProperty.call(s,n))return;!0===o?Object.prototype.hasOwnProperty.call(s,n)&&(s[n]=u):s[n]=u}_r(a,l)}catch(e){dr(a,e,l)}finally{l.release(),c.release(),i.release()}},function(e,t,n,r){sl();const o=De(r);try{const r=Nr(e);if(A(r))return void dr(n,"ERR03: Invalid JS object handle '"+e+"' while getting ["+t+"]",o);Gc(r[t],o,!0),_r(n)}catch(e){dr(n,e,o)}finally{o.release()}},function(e,t,n,r,o){sl();const a=De(n),s=De(o);try{const n=Nr(e);if(A(n))return void dr(r,"ERR04: Invalid JS object handle '"+e+"' while setting ["+t+"]",s);const o=hl(a);n[t]=o,_r(r,s)}catch(e){dr(r,e,s)}finally{s.release(),a.release()}},function(e,r,o){sl();const a=De(e),s=De(o);try{const e=rt(a);let o;if(o=e?"Module"==e?t:"INTERNAL"==e?n:globalThis[e]:globalThis,null===o||void 0===typeof o)return void dr(r,"Global object '"+e+"' not found.",s);Gc(o,s,!0),_r(r)}catch(e){dr(r,e,s)}finally{s.release(),a.release()}},function(e,t,n,r){const o=De(t),a=De(e),s=De(r);try{const e=rt(a);if(!e)return void dr(n,"Invalid name @"+a.value,s);const t=globalThis[e];if(null==t)return void dr(n,"JavaScript host object '"+e+"' not found.",s);try{const e=gl(o),r=function(e,t){let n=[];return n[0]=e,t&&(n=n.concat(t)),new(e.bind.apply(e,n))};Gc(Dr(r(t,e)),s,!1),_r(n)}catch(e){return void dr(n,e,s)}}finally{s.release(),o.release(),a.release()}},function(e,t,n){const r=De(n);try{const n=Nr(e);if(A(n))return void dr(t,"ERR06: Invalid JS object handle '"+e+"'",r);Jc(n,r),_r(t)}catch(e){dr(t,String(e),r)}finally{r.release()}},function(e,t,n,r,o,a,s){const i=De(s);try{const s=function(e,t,n,r,o){let a=null;switch(o){case 5:a=new Int8Array(n-t);break;case 6:a=new Uint8Array(n-t);break;case 7:a=new Int16Array(n-t);break;case 8:a=new Uint16Array(n-t);break;case 9:a=new Int32Array(n-t);break;case 10:a=new Uint32Array(n-t);break;case 13:a=new Float32Array(n-t);break;case 14:a=new Float64Array(n-t);break;case 15:a=new Uint8ClampedArray(n-t);break;default:throw new Error("Unknown array type "+o)}return function(e,t,n,r,o){if(Vc(e)&&e.BYTES_PER_ELEMENT){if(o!==e.BYTES_PER_ELEMENT)throw new Error("Inconsistent element sizes: TypedArray.BYTES_PER_ELEMENT '"+e.BYTES_PER_ELEMENT+"' sizeof managed element: '"+o+"'");let a=(r-n)*o;const s=e.length*e.BYTES_PER_ELEMENT;a>s&&(a=s);const i=n*o;return new Uint8Array(e.buffer,0,a).set(Ee().subarray(t+i,t+i+a)),a}throw new Error("Object '"+e+"' is not a typed array")}(a,e,t,n,r),a}(e,t,n,r,o);Gc(s,i,!0),_r(a)}catch(e){dr(a,String(e),i)}finally{i.release()}},function(e,t,n,r,o){try{sl();const e=globalThis.Blazor;if(!e)throw new Error("The blazor.webassembly.js library is not loaded.");return e._internal.invokeJSFromDotNet(t,n,r,o)}catch(t){const n=t.message+"\n"+t.stack,r=Be();return ot(n,r),r.copy_to_address(e),r.release(),0}}];function jl(e){const t=e.env||e.a;if(!t)return void pt("WARNING: Neither imports.env or imports.a were present when instantiating the wasm module. This likely indicates an emscripten configuration issue.");const n=new Array(Tl.length);for(const e in t){const r=t[e];if("function"==typeof r&&-1!==r.toString().indexOf("runtime_idx"))try{const{runtime_idx:t}=r();if(void 0!==n[t])throw new Error(`Duplicate runtime_idx ${t}`);n[t]=e}catch(e){}}for(const[e,r]of Tl.entries()){const o=n[e];if(void 0!==o){const e=t[o];if("function"!=typeof e)throw new Error(`Expected ${o} to be a function`);t[o]=r,lt(`Replaced WASM import ${o} stub ${e.name} with ${r.name||"minified implementation"}`)}}}const Al="https://dotnet.generated.invalid/wasm-memory";async function Rl(){if(void 0===globalThis.caches)return null;if(a&&!1===globalThis.window.isSecureContext)return null;const e=`dotnet-resources${document.baseURI.substring(document.location.origin.length)}`;try{return await globalThis.caches.open(e)||null}catch(e){return pt("Failed to open cache"),null}}async function Ll(){if(l.memorySnapshotCacheKey)return l.memorySnapshotCacheKey;if(!l.subtle)return null;const t=Object.assign({},l.config);t.resourcesHash=t.resources.hash,delete t.assets,delete t.resources,t.preferredIcuAsset=u.preferredIcuAsset,delete t.forwardConsoleLogsToWS,delete t.diagnosticTracing,delete t.appendElementOnExit,delete t.assertAfterExit,delete t.interopCleanupOnExit,delete t.logExitCode,delete t.pthreadPoolSize,delete t.asyncFlushOnExit,delete t.remoteSources,delete t.ignorePdbLoadErrors,delete t.maxParallelDownloads,delete t.enableDownloadRetry,delete t.exitAfterSnapshot,delete t.extensions,t.GitHash=u.gitHash,t.ProductVersion=e;const n=JSON.stringify(t),r=await l.subtle.digest("SHA-256",(new TextEncoder).encode(n)),o=new Uint8Array(r),a=Array.from(o).map((e=>e.toString(16).padStart(2,"0"))).join("");return l.memorySnapshotCacheKey=`${Al}-${a}`,l.memorySnapshotCacheKey}async function Cl(){await Io(),await async function(){try{if(!l.config.startupMemoryCache)return;const e=await Ll();if(!e)return;const t=await Rl();if(!t)return;const n=await t.match(e),r=null==n?void 0:n.headers.get("content-length"),o=r?parseInt(r):void 0;l.loadedMemorySnapshotSize=o,l.storeMemorySnapshotPending=!o}catch(e){pt("Failed find memory snapshot in the cache",e)}finally{l.loadedMemorySnapshotSize||u.memorySnapshotSkippedOrDone.promise_control.resolve()}}()}function $l(e){const n=Jt();e.locateFile||(e.locateFile=e.__locateFile=e=>u.scriptDirectory+e),e.out||(e.out=console.log.bind(console)),e.err||(e.err=console.error.bind(console)),u.out=e.out,u.err=e.err,e.mainScriptUrlOrBlob=u.scriptUrl;const h=e.instantiateWasm,b=e.preInit?"function"==typeof e.preInit?[e.preInit]:e.preInit:[],g=e.preRun?"function"==typeof e.preRun?[e.preRun]:e.preRun:[],y=e.postRun?"function"==typeof e.postRun?[e.postRun]:e.postRun:[],S=e.onRuntimeInitialized?e.onRuntimeInitialized:()=>{};e.instantiateWasm=(e,n)=>function(e,n,r){const o=Jt();if(r){const t=r(e,((e,t)=>{Yt(o,"mono.instantiateWasm"),l.afterInstantiateWasm.promise_control.resolve(),n(e,t)}));return t}return async function(e,n){var r;try{await u.afterConfigLoaded,lt("instantiate_wasm_module"),await l.beforePreInit.promise,t.addRunDependency("instantiate_wasm_module");const o=async function(){d&&(await u.simd()||w(!1,"This browser/engine doesn't support WASM SIMD. Please use a modern version. See also https://aka.ms/dotnet-wasm-features")),_&&(await u.exceptions()||w(!1,"This browser/engine doesn't support WASM exception handling. Please use a modern version. See also https://aka.ms/dotnet-wasm-features"))}();jl(e);const i=await u.wasmDownloadPromise.promise;if(await o,await async function(e,t,n){e&&e.pendingDownloadInternal&&e.pendingDownloadInternal.response||w(!1,"Can't load dotnet.native.wasm");const r=await e.pendingDownloadInternal.response,o=r.headers&&r.headers.get?r.headers.get("Content-Type"):void 0;let i,c;if("function"==typeof WebAssembly.instantiateStreaming&&"application/wasm"===o){lt("instantiate_wasm_module streaming");const e=await WebAssembly.instantiateStreaming(r,t);i=e.instance,c=e.module}else{a&&"application/wasm"!==o&&pt('WebAssembly resource does not have the expected content type "application/wasm", so falling back to slower ArrayBuffer instantiation.');const e=await r.arrayBuffer();if(lt("instantiate_wasm_module buffered"),s)c=new WebAssembly.Module(e),i=new WebAssembly.Instance(c,t);else{const n=await WebAssembly.instantiate(e,t);i=n.instance,c=n.module}}n(i,c)}(i,e,n),i.pendingDownloadInternal=null,i.pendingDownload=null,i.buffer=null,i.moduleExports=null,lt("instantiate_wasm_module done"),l.loadedMemorySnapshotSize){try{const e=(null===(r=t.asm)||void 0===r?void 0:r.memory)||t.wasmMemory;e.grow(l.loadedMemorySnapshotSize-e.buffer.byteLength+65535>>>16),l.updateMemoryViews()}catch(e){pt("failed to resize memory for the snapshot",e),l.loadedMemorySnapshotSize=void 0}u.memorySnapshotSkippedOrDone.promise_control.resolve()}l.afterInstantiateWasm.promise_control.resolve()}catch(e){throw dt("instantiate_wasm_module() failed",e),u.mono_exit(1,e),e}t.removeRunDependency("instantiate_wasm_module")}(e,n),[]}(e,n,h),e.preInit=[()=>function(e){t.addRunDependency("mono_pre_init");const n=Jt();try{Dl(!1),lt("preInit"),l.beforePreInit.promise_control.resolve(),e.forEach((e=>e()))}catch(e){throw dt("user preInint() failed",e),u.mono_exit(1,e),e}(async()=>{try{await async function(){lt("mono_wasm_pre_init_essential_async"),t.addRunDependency("mono_wasm_pre_init_essential_async"),t.removeRunDependency("mono_wasm_pre_init_essential_async")}(),Yt(n,"mono.preInit")}catch(e){throw u.mono_exit(1,e),e}l.afterPreInit.promise_control.resolve(),t.removeRunDependency("mono_pre_init")})()}(b)],e.preRun=[()=>async function(e){t.addRunDependency("mono_pre_run_async");try{await l.afterInstantiateWasm.promise,await l.afterPreInit.promise,lt("preRunAsync");const t=Jt();e.map((e=>e())),Yt(t,"mono.preRun")}catch(e){throw dt("user callback preRun() failed",e),u.mono_exit(1,e),e}l.afterPreRun.promise_control.resolve(),t.removeRunDependency("mono_pre_run_async")}(g)],e.onRuntimeInitialized=()=>async function(e){try{await l.afterPreRun.promise,lt("onRuntimeInitialized"),l.mono_wasm_exit=St.mono_wasm_exit,l.abort=e=>{throw u.is_exited()||St.mono_wasm_abort(),e};const n=Jt();if(l.beforeOnRuntimeInitialized.promise_control.resolve(),await async function(){await l.allAssetsInMemory.promise,l.config.assets&&(u.actual_downloaded_assets_count!=u.expected_downloaded_assets_count&&w(!1,`Expected ${u.expected_downloaded_assets_count} assets to be downloaded, but only finished ${u.actual_downloaded_assets_count}`),u.actual_instantiated_assets_count!=u.expected_instantiated_assets_count&&w(!1,`Expected ${u.expected_instantiated_assets_count} assets to be in memory, but only instantiated ${u.actual_instantiated_assets_count}`),u._loaded_files.forEach((e=>u.loadedFiles.push(e.url))),lt("all assets are loaded in wasm memory"))}(),L&&l.config.startupMemoryCache,await async function(){const e=Jt();if(l.loadedMemorySnapshotSize){const e=await async function(){try{const e=await Ll();if(!e)return;const t=await Rl();if(!t)return;const n=await t.match(e);if(!n)return;return n.arrayBuffer()}catch(e){return void pt("Failed load memory snapshot from the cache",e)}}(),t=Ee();return e.byteLength!==t.byteLength&&w(!1,"Loaded memory is not the expected size"),t.set(new Uint8Array(e),0),void lt("Loaded WASM linear memory from browser cache")}for(const e in l.config.environmentVariables){const t=l.config.environmentVariables[e];if("string"!=typeof t)throw new Error(`Expected environment variable '${e}' to be a string but it was ${typeof t}: '${t}'`);Bl(e,t)}l.config.startupMemoryCache&&St.mono_jiterp_update_jit_call_dispatcher(0),l.config.runtimeOptions&&function(e){if(!Array.isArray(e))throw new Error("Expected runtimeOptions to be an array of strings");const n=t._malloc(4*e.length);let r=0;for(let o=0;oaot; in your project file."),null==e&&(e={}),"writeAt"in e||(e.writeAt="System.Runtime.InteropServices.JavaScript.JavaScriptExports::StopProfile"),"sendTo"in e||(e.sendTo="Interop/Runtime::DumpAotProfileData");const t="aot:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;vt.mono_wasm_profiler_init_aot(t)}(l.config.aotProfilerOptions),l.config.browserProfilerOptions&&(l.config.browserProfilerOptions,m||w(!1,"Browser profiler is not enabled, please use browser; in your project file."),vt.mono_wasm_profiler_init_browser("browser:")),Ol("unused",l.config.debugLevel),l.config.startupMemoryCache&&(St.mono_jiterp_update_jit_call_dispatcher(-1),await async function(e){try{const t=await Ll();if(!t)return;const n=await Rl();if(!n)return;const r=L?new Uint8Array(e).slice(0):e,o=new Response(r,{headers:{"content-type":"wasm-memory","content-length":e.byteLength.toString()}});await n.put(t,o),async function(e){try{const t=await Rl();if(!t)return;const n=await t.keys();for(const r of n)r.url&&r.url!==e&&r.url.startsWith(Al)&&await t.delete(r)}catch(e){return}}(t)}catch(e){return void pt("Failed to store memory snapshot in the cache",e)}}(Ee().buffer),l.storeMemorySnapshotPending=!1),Yt(e,"mono.memorySnapshot")}(),l.config.exitAfterSnapshot){const e=l.ExitStatus?new l.ExitStatus(0):new Error("Snapshot taken, exiting because exitAfterSnapshot was set.");return e.silent=!0,void u.mono_exit(0,e)}L&&l.config.startupMemoryCache,function(){if(!l.mono_wasm_bindings_is_ready){lt("bindings_init"),l.mono_wasm_bindings_is_ready=!0;try{const e=Jt();Ve||("undefined"!=typeof TextDecoder&&(We=new TextDecoder("utf-16le"),Ge=new TextDecoder("utf-8",{fatal:!1}),qe=new TextDecoder("utf-8"),Je=new TextEncoder),Ve=t._malloc(12)),function(){const e="System.Runtime.InteropServices.JavaScript";if(l.runtime_interop_module=St.mono_wasm_assembly_load(e),!l.runtime_interop_module)throw"Can't find bindings module assembly: "+e;if(l.runtime_interop_namespace="System.Runtime.InteropServices.JavaScript",l.runtime_interop_exports_classname="JavaScriptExports",l.runtime_interop_exports_class=St.mono_wasm_assembly_find_class(l.runtime_interop_module,l.runtime_interop_namespace,l.runtime_interop_exports_classname),!l.runtime_interop_exports_class)throw"Can't find "+l.runtime_interop_namespace+"."+l.runtime_interop_exports_classname+" class";const n=xo("CallEntrypoint");n||w(!1,"Can't find CallEntrypoint method");const r=xo("ReleaseJSOwnedObjectByGCHandle");r||w(!1,"Can't find ReleaseJSOwnedObjectByGCHandle method");const o=xo("CreateTaskCallback");o||w(!1,"Can't find CreateTaskCallback method");const a=xo("CompleteTask");a||w(!1,"Can't find CompleteTask method");const s=xo("CallDelegate");s||w(!1,"Can't find CallDelegate method");const i=xo("GetManagedStackTrace");i||w(!1,"Can't find GetManagedStackTrace method");const c=xo("LoadSatelliteAssembly");c||w(!1,"Can't find LoadSatelliteAssembly method");const p=xo("LoadLazyAssembly");p||w(!1,"Can't find LoadLazyAssembly method"),l.javaScriptExports.call_entry_point=async(e,r)=>{u.assert_runtime_running();const o=t.stackSave();try{t.runtimeKeepalivePush();const o=on(4),a=an(o,1),s=an(o,2),i=an(o,3);so(s,e),r&&0==r.length&&(r=void 0),wo(i,r,R.String),kr(n,o);let c=Gn(a,0,Bn);return null==c&&(c=Promise.resolve(0)),c[$r]=!0,await c}finally{t.runtimeKeepalivePop(),t.stackRestore(o)}},l.javaScriptExports.load_satellite_assembly=e=>{const n=t.stackSave();try{const t=on(3),n=an(t,2);hn(n,R.Array),yo(n,e,R.Byte),kr(c,t)}finally{t.stackRestore(n)}},l.javaScriptExports.load_lazy_assembly=(e,n)=>{const r=t.stackSave();try{const t=on(4),r=an(t,2),o=an(t,3);hn(r,R.Array),hn(o,R.Array),yo(r,e,R.Byte),yo(o,n,R.Byte),kr(p,t)}finally{t.stackRestore(r)}},l.javaScriptExports.release_js_owned_object_by_gc_handle=e=>{e||w(!1,"Must be valid gc_handle"),u.assert_runtime_running();const n=t.stackSave();try{const t=on(3),n=an(t,2);hn(n,R.Object),Un(n,e),kr(r,t)}finally{t.stackRestore(n)}},l.javaScriptExports.create_task_callback=()=>{const e=t.stackSave();u.assert_runtime_running();try{const e=on(2);return kr(o,e),En(an(e,1))}finally{t.stackRestore(e)}},l.javaScriptExports.complete_task=(e,n,r,o)=>{u.assert_runtime_running();const s=t.stackSave();try{const t=on(5),s=an(t,2);hn(s,R.Object),Un(s,e);const i=an(t,3);if(n)ho(i,n);else{hn(i,R.None);const e=an(t,4);o||w(!1,"res_converter missing"),o(e,r)}kr(a,t)}finally{t.stackRestore(s)}},l.javaScriptExports.call_delegate=(e,n,r,o,a,i,c,l)=>{u.assert_runtime_running();const p=t.stackSave();try{const t=on(6),u=an(t,2);if(hn(u,R.Object),Un(u,e),i&&i(an(t,3),n),c&&c(an(t,4),r),l&&l(an(t,5),o),kr(s,t),a)return a(an(t,1))}finally{t.stackRestore(p)}},l.javaScriptExports.get_managed_stack_trace=e=>{u.assert_runtime_running();const n=t.stackSave();try{const t=on(3),n=an(t,2);return hn(n,R.Exception),Un(n,e),kr(i,t),qn(an(t,1))}finally{t.stackRestore(n)}}}(),p||i||function(){if(Object.prototype[zc]=0,Array.prototype[zc]=1,ArrayBuffer.prototype[zc]=2,DataView.prototype[zc]=3,Function.prototype[zc]=4,Uint8Array.prototype[zc]=11,Pc._unbox_buffer_size=65536,Pc._box_buffer=t._malloc(65536),Pc._unbox_buffer=t._malloc(Pc._unbox_buffer_size),Pc._class_int32=Sr("System","Int32"),Pc._class_uint32=Sr("System","UInt32"),Pc._class_double=Sr("System","Double"),Pc._class_boolean=Sr("System","Boolean"),Pc._null_root=Be(),function(){const e=Kc;e.set("m",{steps:[{}],size:0}),e.set("s",{steps:[{convert_root:ot.bind(t)}],size:0,needs_root:!0}),e.set("S",{steps:[{convert_root:at.bind(t)}],size:0,needs_root:!0}),e.set("o",{steps:[{convert_root:Gc.bind(t)}],size:0,needs_root:!0}),e.set("u",{steps:[{convert_root:Hc.bind(t,!1)}],size:0,needs_root:!0}),e.set("R",{steps:[{convert_root:Gc.bind(t),byref:!0}],size:0,needs_root:!0}),e.set("j",{steps:[{convert:Xc.bind(t),indirect:"i32"}],size:8}),e.set("b",{steps:[{indirect:"bool"}],size:8}),e.set("i",{steps:[{indirect:"i32"}],size:8}),e.set("I",{steps:[{indirect:"u32"}],size:8}),e.set("l",{steps:[{indirect:"i52"}],size:8}),e.set("L",{steps:[{indirect:"u52"}],size:8}),e.set("f",{steps:[{indirect:"float"}],size:8}),e.set("d",{steps:[{indirect:"double"}],size:8})}(),Pc.runtime_legacy_exports_classname="LegacyExports",Pc.runtime_legacy_exports_class=St.mono_wasm_assembly_find_class(l.runtime_interop_module,l.runtime_interop_namespace,Pc.runtime_legacy_exports_classname),!Pc.runtime_legacy_exports_class)throw"Can't find "+l.runtime_interop_namespace+"."+Pc.runtime_legacy_exports_classname+" class";for(const e of il){const t=cl,[n,r,o,a]=e;if(n)t[r]=function(...e){const n=ll(o,a);return t[r]=n,n(...e)};else{const e=ll(o,a);t[r]=e}}}(),0==Kt.size&&(Kt.set(R.Array,Zn),Kt.set(R.Span,Qn),Kt.set(R.ArraySegment,er),Kt.set(R.Boolean,Cn),Kt.set(R.Byte,$n),Kt.set(R.Char,Nn),Kt.set(R.Int16,Dn),Kt.set(R.Int32,Bn),Kt.set(R.Int52,On),Kt.set(R.BigInt64,Mn),Kt.set(R.Single,Fn),Kt.set(R.IntPtr,zn),Kt.set(R.Double,Pn),Kt.set(R.String,qn),Kt.set(R.Exception,Jn),Kt.set(R.JSException,Jn),Kt.set(R.JSObject,Yn),Kt.set(R.Object,Xn),Kt.set(R.DateTime,Hn),Kt.set(R.DateTimeOffset,Hn),Kt.set(R.Task,Gn),Kt.set(R.Action,Wn),Kt.set(R.Function,Wn),Kt.set(R.None,Vn),Kt.set(R.Void,Vn),Kt.set(R.Discard,Vn)),0==Qt.size&&(Qt.set(R.Array,yo),Qt.set(R.Span,So),Qt.set(R.ArraySegment,ko),Qt.set(R.Boolean,Zr),Qt.set(R.Byte,Kr),Qt.set(R.Char,Qr),Qt.set(R.Int16,eo),Qt.set(R.Int32,to),Qt.set(R.Int52,no),Qt.set(R.BigInt64,ro),Qt.set(R.Double,oo),Qt.set(R.Single,ao),Qt.set(R.IntPtr,so),Qt.set(R.DateTime,io),Qt.set(R.DateTimeOffset,co),Qt.set(R.String,lo),Qt.set(R.Exception,ho),Qt.set(R.JSException,ho),Qt.set(R.JSObject,bo),Qt.set(R.Object,go),Qt.set(R.Task,mo),Qt.set(R.Action,_o),Qt.set(R.Function,_o),Qt.set(R.None,po),Qt.set(R.Discard,po),Qt.set(R.Void,po)),l._i52_error_scratch_buffer=t._malloc(4),Yt(e,"mono.bindingsInit")}catch(e){throw dt("Error in bindings_init",e),e}}}(),l.runtimeReady=!0,r&&!o&&t.runtimeKeepalivePush(),l.mono_wasm_runtime_is_ready||mono_wasm_runtime_ready(),0!==u.config.debugLevel&&u.config.cacheBootResources&&u.logDownloadStatsToConsole(),setTimeout((()=>{u.purgeUnusedCacheEntriesAsync()}),u.config.cachedResourcesPurgeDelay);try{e()}catch(e){throw dt("user callback onRuntimeInitialized() failed",e),e}await async function(){lt("mono_wasm_after_user_runtime_initialized");try{if(!t.disableDotnet6Compatibility&&t.exports){const e=globalThis;for(let n=0;nasync function(e){try{await l.afterOnRuntimeInitialized.promise,lt("postRunAsync");const n=Jt();t.FS_createPath("/","usr",!0,!0),t.FS_createPath("/","usr/share",!0,!0),e.map((e=>e())),Yt(n,"mono.postRun")}catch(e){throw dt("user callback posRun() failed",e),u.mono_exit(1,e),e}l.afterPostRun.promise_control.resolve()}(y)],e.ready.then((async()=>{await l.afterPostRun.promise,Yt(n,"mono.emscriptenStartup"),l.dotnetReady.promise_control.resolve(c)})).catch((e=>{l.dotnetReady.promise_control.reject(e)})),e.ready=l.dotnetReady.promise,e.onAbort||(e.onAbort=e=>{u.mono_exit(1,e)}),e.onExit||(e.onExit=e=>{u.mono_exit(e,null)})}async function Nl(e,n){await u.afterConfigLoaded.promise,jl(e),n(new WebAssembly.Instance(t.wasmModule,e),void 0),t.wasmModule=null}function Dl(e){var r,o,a;e||t.addRunDependency("mono_wasm_pre_init_essential"),lt("mono_wasm_pre_init_essential"),u.gitHash!==l.gitHash&&pt("The version of dotnet.runtime.js is different from the version of dotnet.js!"),u.gitHash!==l.moduleGitHash&&pt("The version of dotnet.native.js is different from the version of dotnet.js!"),function(){const e=[...yt,...p?[]:gt];for(const t of e){const e=wt,[n,r,o,a,s]=t,i="function"==typeof n;if(!0===n||i)e[r]=function(...t){!i||!n()||w(!1,`cwrap ${r} should not be called when binding was skipped`);const c=Ut(r,o,a,s);return e[r]=c,c(...t)};else{const t=Ut(r,o,a,s);e[r]=t}}}(),r=n,Object.assign(r,{mono_wasm_exit:St.mono_wasm_exit,mono_wasm_enable_on_demand_gc:St.mono_wasm_enable_on_demand_gc,mono_wasm_profiler_init_aot:vt.mono_wasm_profiler_init_aot,mono_wasm_profiler_init_browser:vt.mono_wasm_profiler_init_browser,mono_wasm_exec_regression:St.mono_wasm_exec_regression}),p||(a=Mc,Object.assign(a,{mono_wasm_add_assembly:kt.mono_wasm_add_assembly}),o=Fc,Object.assign(o,{mono_obj_array_new:kt.mono_wasm_obj_array_new,mono_obj_array_set:kt.mono_wasm_obj_array_set,mono_obj_array_new_ref:kt.mono_wasm_obj_array_new_ref,mono_obj_array_set_ref:kt.mono_wasm_obj_array_set_ref})),e||t.removeRunDependency("mono_wasm_pre_init_essential")}function Bl(e,t){St.mono_wasm_setenv(e,t)}function Ol(e,t){lt("mono_wasm_load_runtime");try{const n=Jt();null==t&&(t=0,l.config.debugLevel&&(t=0+t)),St.mono_wasm_load_runtime(e||"unused",t),Yt(n,"mono.loadRuntime")}catch(e){throw dt("mono_wasm_load_runtime () failed",e),u.mono_exit(1,e),e}}async function Ml(e){tr=null,null.addEventListener("dotnet:pthread:created",(e=>{lt("pthread created 0x"+e.pthread_self.pthreadId.toString(16))})),e.preInit=[()=>async function(){lt("worker initializing essential C exports and APIs");const e=Jt();try{lt("preInitWorker"),l.beforePreInit.promise_control.resolve(),Dl(!0),await Io(),l.afterPreInit.promise_control.resolve(),Yt(e,"mono.preInitWorker")}catch(e){throw dt("user preInitWorker() failed",e),u.mono_exit(1,e),e}}()],e.instantiateWasm=Nl,await l.afterPreInit.promise}function Fl(n){const r=t,o=n,a=globalThis;p||function(e){Mc=e.mono,Fc=e.binding}(o),p||(Object.assign(o.mono,{mono_wasm_setenv:Bl,mono_wasm_load_bytes_into_heap:ye,mono_wasm_load_icu_data:ga,mono_wasm_runtime_ready:mono_wasm_runtime_ready,mono_wasm_new_root_buffer:Ne,mono_wasm_new_root:Be,mono_wasm_new_external_root:De,mono_wasm_release_roots:Oe,mono_run_main:Bc,mono_run_main_and_exit:Dc,mono_wasm_add_assembly:null,mono_wasm_load_runtime:Ol,config:l.config,loaded_files:[],setB32:z,setI8:J,setI16:Y,setI32:Z,setI52:Q,setU52:ee,setI64Big:te,setU8:V,setU16:H,setU32:q,setF32:ne,setF64:re,getB32:oe,getI8:pe,getI16:de,getI32:_e,getI52:fe,getU52:me,getI64Big:he,getU8:ae,getU16:se,getU32:ie,getF32:be,getF64:ge}),Object.assign(o.binding,{bind_static_method:vl,call_assembly_entry_point:El,mono_obj_array_new:null,mono_obj_array_set:null,js_string_to_mono_string:pl,js_typed_array_to_array:Yc,mono_array_to_js_array:bl,js_to_mono_obj:Wc,conv_string:wl,unbox_mono_obj:fl,mono_obj_array_new_ref:null,mono_obj_array_set_ref:null,js_string_to_mono_string_root:ot,js_typed_array_to_array_root:Jc,js_to_mono_obj_root:Gc,conv_string_root:rt,unbox_mono_obj_root:hl,mono_array_root_to_js_array:gl}),Object.assign(o.internal,{stringToMonoStringIntern:dl,mono_method_resolve:ol})),Object.assign(o.internal,{mono_wasm_exit:e=>{t.err("early exit "+e)},forceDisposeProxies:Vr,logging:void 0,mono_wasm_stringify_as_error_with_stack:ht,mono_wasm_get_loaded_files:Sa,mono_wasm_send_dbg_command_with_parms:Dt,mono_wasm_send_dbg_command:Bt,mono_wasm_get_dbg_command_info:Ot,mono_wasm_get_details:Wt,mono_wasm_release_object:qt,mono_wasm_call_function_on:Ht,mono_wasm_debugger_resume:Mt,mono_wasm_detach_debugger:Ft,mono_wasm_raise_debug_event:zt,mono_wasm_change_debugger_log_level:Pt,mono_wasm_debugger_attached:Vt,mono_wasm_runtime_is_ready:l.mono_wasm_runtime_is_ready,mono_wasm_get_func_id_to_name_mappings:bt,get_property:ar,set_property:or,has_property:sr,get_typeof_property:ir,get_global_this:cr,get_dotnet_instance:()=>c,dynamic_import:pr,mono_wasm_cancel_promise:qr,ws_wasm_create:ua,ws_wasm_open:pa,ws_wasm_send:da,ws_wasm_receive:_a,ws_wasm_close:fa,ws_wasm_abort:ma,http_wasm_supports_streaming_response:jo,http_wasm_create_abort_controler:Ao,http_wasm_abort_request:Ro,http_wasm_abort_response:Lo,http_wasm_fetch:$o,http_wasm_fetch_bytes:Co,http_wasm_get_response_header_names:Do,http_wasm_get_response_header_values:Bo,http_wasm_get_response_bytes:Mo,http_wasm_get_response_length:Oo,http_wasm_get_streamed_response_bytes:Fo,jiterpreter_dump_stats:Fi,jiterpreter_apply_options:as,jiterpreter_get_options:ss,mono_wasm_gc_lock:zi,mono_wasm_gc_unlock:Vi,loadLazyAssembly:Hi,loadSatelliteAssemblies:Wi}),Object.assign(l,{stringify_as_error_with_stack:ht,instantiate_symbols_asset:wa,instantiate_asset:ya,jiterpreter_dump_stats:Fi,forceDisposeProxies:Vr});const s={runMain:Bc,runMainAndExit:Dc,setEnvironmentVariable:Bl,getAssemblyExports:Er,setModuleImports:rr,getConfig:()=>l.config,invokeLibraryInitializers:u.invokeLibraryInitializers,setHeapB32:z,setHeapU8:V,setHeapU16:H,setHeapU32:q,setHeapI8:J,setHeapI16:Y,setHeapI32:Z,setHeapI52:Q,setHeapU52:ee,setHeapI64Big:te,setHeapF32:ne,setHeapF64:re,getHeapB32:oe,getHeapU8:ae,getHeapU16:se,getHeapU32:ie,getHeapI8:pe,getHeapI16:de,getHeapI32:_e,getHeapI52:fe,getHeapU52:me,getHeapI64Big:he,getHeapF32:be,getHeapF64:ge,localHeapViewU8:Ee,localHeapViewU16:Ue,localHeapViewU32:Ie,localHeapViewI8:we,localHeapViewI16:Se,localHeapViewI32:ke,localHeapViewI64Big:ve,localHeapViewF32:xe,localHeapViewF64:Te};if(Object.assign(c,{INTERNAL:o.internal,Module:r,runtimeBuildInfo:{productVersion:e,gitHash:l.gitHash,buildConfiguration:"Release"},...s}),p||Object.assign(c,{MONO:o.mono,BINDING:o.binding}),void 0===r.disableDotnet6Compatibility&&(r.disableDotnet6Compatibility=!0),!r.disableDotnet6Compatibility){Object.assign(r,c),p||(r.mono_bind_static_method=(e,t)=>(pt("Module.mono_bind_static_method is obsolete, please use [JSExportAttribute] interop instead"),vl(e,t)));const e=(e,t)=>{if(void 0!==a[e])return;let n;Object.defineProperty(globalThis,e,{get:()=>{if(A(n)){const r=(new Error).stack,o=r?r.substr(r.indexOf("\n",8)+1):"";pt(`global ${e} is obsolete, please use Module.${e} instead ${o}`),n=t()}return n}})};a.MONO=o.mono,a.BINDING=o.binding,a.INTERNAL=o.internal,a.Module=r,e("cwrap",(()=>r.cwrap)),e("addRunDependency",(()=>r.addRunDependency)),e("removeRunDependency",(()=>r.removeRunDependency))}let i;return a.getDotnetRuntime?i=a.getDotnetRuntime.__list:(a.getDotnetRuntime=e=>a.getDotnetRuntime.__list.getRuntime(e),a.getDotnetRuntime.__list=i=new Pl),i.registerRuntime(c),c}class Pl{constructor(){this.list={}}registerRuntime(e){return e.runtimeId=Object.keys(this.list).length,this.list[e.runtimeId]=hr(e),e.runtimeId}getRuntime(e){const t=this.list[e];return t?t.deref():void 0}}export{$l as configureEmscriptenStartup,Cl as configureRuntimeStartup,Ml as configureWorkerStartup,Fl as initializeExports,Uo as initializeReplacements,b as passEmscriptenInternals,g as setRuntimeGlobals}; +//# sourceMappingURL=dotnet.runtime.js.map diff --git a/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.br b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.br new file mode 100644 index 0000000..de458f1 Binary files /dev/null and b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.br differ diff --git a/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.gz b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.gz new file mode 100644 index 0000000..680d808 Binary files /dev/null and b/_framework/dotnet.runtime.8.0.3.r8ybjfe7e4.js.gz differ