// Compiles a dart2wasm-generated main module from `source` which can then // instantiatable via the `instantiate` method. // // `source` needs to be a `Response` object (or promise thereof) e.g. created // via the `fetch()` JS API. export async function compileStreaming(source) { const builtins = {builtins: ['js-string']}; return new CompiledApp( await WebAssembly.compileStreaming(source, builtins), builtins); } // Compiles a dart2wasm-generated wasm modules from `bytes` which is then // instantiatable via the `instantiate` method. export async function compile(bytes) { const builtins = {builtins: ['js-string']}; return new CompiledApp(await WebAssembly.compile(bytes, builtins), builtins); } // DEPRECATED: Please use `compile` or `compileStreaming` to get a compiled app, // use `instantiate` method to get an instantiated app and then call // `invokeMain` to invoke the main function. export async function instantiate(modulePromise, importObjectPromise) { var moduleOrCompiledApp = await modulePromise; if (!(moduleOrCompiledApp instanceof CompiledApp)) { moduleOrCompiledApp = new CompiledApp(moduleOrCompiledApp); } const instantiatedApp = await moduleOrCompiledApp.instantiate(await importObjectPromise); return instantiatedApp.instantiatedModule; } // DEPRECATED: Please use `compile` or `compileStreaming` to get a compiled app, // use `instantiate` method to get an instantiated app and then call // `invokeMain` to invoke the main function. export const invoke = (moduleInstance, ...args) => { moduleInstance.exports.$invokeMain(args); } class CompiledApp { constructor(module, builtins) { this.module = module; this.builtins = builtins; } // The second argument is an options object containing: // `loadDeferredWasm` is a JS function that takes a module name matching a // wasm file produced by the dart2wasm compiler and returns the bytes to // load the module. These bytes can be in either a format supported by // `WebAssembly.compile` or `WebAssembly.compileStreaming`. // `loadDynamicModule` is a JS function that takes two string names matching, // in order, a wasm file produced by the dart2wasm compiler during dynamic // module compilation and a corresponding js file produced by the same // compilation. It should return a JS Array containing 2 elements. The first // should be the bytes for the wasm module in a format supported by // `WebAssembly.compile` or `WebAssembly.compileStreaming`. The second // should be the result of using the JS 'import' API on the js file path. async instantiate(additionalImports, {loadDeferredWasm, loadDynamicModule} = {}) { let dartInstance; // Prints to the console function printToConsole(value) { if (typeof dartPrint == "function") { dartPrint(value); return; } if (typeof console == "object" && typeof console.log != "undefined") { console.log(value); return; } if (typeof print == "function") { print(value); return; } throw "Unable to print message: " + value; } // A special symbol attached to functions that wrap Dart functions. const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction"); function finalizeWrapper(dartFunction, wrapped) { wrapped.dartFunction = dartFunction; wrapped[jsWrappedDartFunctionSymbol] = true; return wrapped; } // Imports const dart2wasm = { _4: (o, c) => o instanceof c, _7: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._7(f,arguments.length,x0) }), _8: f => finalizeWrapper(f, function(x0,x1) { return dartInstance.exports._8(f,arguments.length,x0,x1) }), _37: x0 => new Array(x0), _39: x0 => x0.length, _41: (x0,x1) => x0[x1], _42: (x0,x1,x2) => { x0[x1] = x2 }, _44: x0 => new Promise(x0), _46: (x0,x1,x2) => new DataView(x0,x1,x2), _48: x0 => new Int8Array(x0), _49: (x0,x1,x2) => new Uint8Array(x0,x1,x2), _50: x0 => new Uint8Array(x0), _52: x0 => new Uint8ClampedArray(x0), _54: x0 => new Int16Array(x0), _56: x0 => new Uint16Array(x0), _58: x0 => new Int32Array(x0), _60: x0 => new Uint32Array(x0), _62: x0 => new Float32Array(x0), _64: x0 => new Float64Array(x0), _66: (x0,x1,x2) => x0.call(x1,x2), _71: (decoder, codeUnits) => decoder.decode(codeUnits), _72: () => new TextDecoder("utf-8", {fatal: true}), _73: () => new TextDecoder("utf-8", {fatal: false}), _74: (s) => +s, _75: x0 => new Uint8Array(x0), _76: (x0,x1,x2) => x0.set(x1,x2), _77: (x0,x1) => x0.transferFromImageBitmap(x1), _79: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._79(f,arguments.length,x0) }), _80: x0 => new window.FinalizationRegistry(x0), _81: (x0,x1,x2,x3) => x0.register(x1,x2,x3), _82: (x0,x1) => x0.unregister(x1), _83: (x0,x1,x2) => x0.slice(x1,x2), _84: (x0,x1) => x0.decode(x1), _85: (x0,x1) => x0.segment(x1), _86: () => new TextDecoder(), _88: x0 => x0.buffer, _89: x0 => x0.wasmMemory, _90: () => globalThis.window._flutter_skwasmInstance, _91: x0 => x0.rasterStartMilliseconds, _92: x0 => x0.rasterEndMilliseconds, _93: x0 => x0.imageBitmaps, _197: x0 => x0.stopPropagation(), _198: x0 => x0.preventDefault(), _200: x0 => x0.remove(), _201: (x0,x1) => x0.append(x1), _202: (x0,x1,x2,x3) => x0.addEventListener(x1,x2,x3), _247: x0 => x0.unlock(), _248: x0 => x0.getReader(), _249: (x0,x1,x2) => x0.addEventListener(x1,x2), _250: (x0,x1,x2) => x0.removeEventListener(x1,x2), _251: (x0,x1) => x0.item(x1), _252: x0 => x0.next(), _253: x0 => x0.now(), _254: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._254(f,arguments.length,x0) }), _255: (x0,x1) => x0.addListener(x1), _256: (x0,x1) => x0.removeListener(x1), _257: (x0,x1) => x0.matchMedia(x1), _258: (x0,x1) => x0.revokeObjectURL(x1), _259: x0 => x0.close(), _260: (x0,x1,x2,x3,x4) => ({type: x0,data: x1,premultiplyAlpha: x2,colorSpaceConversion: x3,preferAnimation: x4}), _261: x0 => new window.ImageDecoder(x0), _262: x0 => ({frameIndex: x0}), _263: (x0,x1) => x0.decode(x1), _264: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._264(f,arguments.length,x0) }), _265: (x0,x1) => x0.getModifierState(x1), _266: (x0,x1) => x0.removeProperty(x1), _267: (x0,x1) => x0.prepend(x1), _268: x0 => new Intl.Locale(x0), _269: x0 => x0.disconnect(), _270: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._270(f,arguments.length,x0) }), _271: (x0,x1) => x0.getAttribute(x1), _272: (x0,x1) => x0.contains(x1), _273: (x0,x1) => x0.querySelector(x1), _274: x0 => x0.blur(), _275: x0 => x0.hasFocus(), _276: (x0,x1,x2) => x0.insertBefore(x1,x2), _277: (x0,x1) => x0.hasAttribute(x1), _278: (x0,x1) => x0.getModifierState(x1), _279: (x0,x1) => x0.createTextNode(x1), _280: (x0,x1) => x0.appendChild(x1), _281: (x0,x1) => x0.removeAttribute(x1), _282: x0 => x0.getBoundingClientRect(), _283: (x0,x1) => x0.observe(x1), _284: x0 => x0.disconnect(), _285: (x0,x1) => x0.closest(x1), _708: () => globalThis.window.flutterConfiguration, _710: x0 => x0.assetBase, _715: x0 => x0.canvasKitMaximumSurfaces, _716: x0 => x0.debugShowSemanticsNodes, _717: x0 => x0.hostElement, _718: x0 => x0.multiViewEnabled, _719: x0 => x0.nonce, _721: x0 => x0.fontFallbackBaseUrl, _731: x0 => x0.console, _732: x0 => x0.devicePixelRatio, _733: x0 => x0.document, _734: x0 => x0.history, _735: x0 => x0.innerHeight, _736: x0 => x0.innerWidth, _737: x0 => x0.location, _738: x0 => x0.navigator, _739: x0 => x0.visualViewport, _740: x0 => x0.performance, _742: x0 => x0.URL, _744: (x0,x1) => x0.getComputedStyle(x1), _745: x0 => x0.screen, _746: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._746(f,arguments.length,x0) }), _747: (x0,x1) => x0.requestAnimationFrame(x1), _752: (x0,x1) => x0.warn(x1), _754: (x0,x1) => x0.debug(x1), _755: x0 => globalThis.parseFloat(x0), _756: () => globalThis.window, _757: () => globalThis.Intl, _758: () => globalThis.Symbol, _759: (x0,x1,x2,x3,x4) => globalThis.createImageBitmap(x0,x1,x2,x3,x4), _761: x0 => x0.clipboard, _762: x0 => x0.maxTouchPoints, _763: x0 => x0.vendor, _764: x0 => x0.language, _765: x0 => x0.platform, _766: x0 => x0.userAgent, _767: (x0,x1) => x0.vibrate(x1), _768: x0 => x0.languages, _769: x0 => x0.documentElement, _770: (x0,x1) => x0.querySelector(x1), _773: (x0,x1) => x0.createElement(x1), _776: (x0,x1) => x0.createEvent(x1), _777: x0 => x0.activeElement, _780: x0 => x0.head, _781: x0 => x0.body, _783: (x0,x1) => { x0.title = x1 }, _786: x0 => x0.visibilityState, _787: () => globalThis.document, _788: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._788(f,arguments.length,x0) }), _789: (x0,x1) => x0.dispatchEvent(x1), _797: x0 => x0.target, _799: x0 => x0.timeStamp, _800: x0 => x0.type, _802: (x0,x1,x2,x3) => x0.initEvent(x1,x2,x3), _808: x0 => x0.baseURI, _809: x0 => x0.firstChild, _813: x0 => x0.parentElement, _815: (x0,x1) => { x0.textContent = x1 }, _816: x0 => x0.parentNode, _817: x0 => x0.nextSibling, _818: (x0,x1) => x0.removeChild(x1), _819: x0 => x0.isConnected, _827: x0 => x0.clientHeight, _828: x0 => x0.clientWidth, _829: x0 => x0.offsetHeight, _830: x0 => x0.offsetWidth, _831: x0 => x0.id, _832: (x0,x1) => { x0.id = x1 }, _835: (x0,x1) => { x0.spellcheck = x1 }, _836: x0 => x0.tagName, _837: x0 => x0.style, _839: (x0,x1) => x0.querySelectorAll(x1), _840: (x0,x1,x2) => x0.setAttribute(x1,x2), _841: x0 => x0.tabIndex, _842: (x0,x1) => { x0.tabIndex = x1 }, _843: (x0,x1) => x0.focus(x1), _844: x0 => x0.scrollTop, _845: (x0,x1) => { x0.scrollTop = x1 }, _846: (x0,x1) => { x0.scrollLeft = x1 }, _847: x0 => x0.scrollLeft, _848: x0 => x0.classList, _850: (x0,x1) => { x0.className = x1 }, _852: (x0,x1) => x0.getElementsByClassName(x1), _853: x0 => x0.click(), _854: (x0,x1) => x0.attachShadow(x1), _857: x0 => x0.computedStyleMap(), _858: (x0,x1) => x0.get(x1), _864: (x0,x1) => x0.getPropertyValue(x1), _865: (x0,x1,x2,x3) => x0.setProperty(x1,x2,x3), _866: x0 => x0.offsetLeft, _867: x0 => x0.offsetTop, _868: x0 => x0.offsetParent, _870: (x0,x1) => { x0.name = x1 }, _871: (x0,x1) => { x0.content = x1 }, _872: x0 => x0.content, _876: (x0,x1) => { x0.src = x1 }, _877: x0 => x0.naturalWidth, _878: x0 => x0.naturalHeight, _882: (x0,x1) => { x0.crossOrigin = x1 }, _883: (x0,x1) => { x0.decoding = x1 }, _885: x0 => x0.decode(), _890: (x0,x1) => { x0.nonce = x1 }, _895: (x0,x1) => { x0.width = x1 }, _897: (x0,x1) => { x0.height = x1 }, _900: (x0,x1) => x0.getContext(x1), _961: x0 => x0.width, _962: x0 => x0.height, _964: (x0,x1) => x0.fetch(x1), _965: x0 => x0.status, _967: x0 => x0.body, _968: x0 => x0.arrayBuffer(), _970: x0 => x0.text(), _971: x0 => x0.read(), _972: x0 => x0.value, _973: x0 => x0.done, _980: x0 => x0.name, _981: x0 => x0.x, _982: x0 => x0.y, _985: x0 => x0.top, _986: x0 => x0.right, _987: x0 => x0.bottom, _988: x0 => x0.left, _998: x0 => x0.height, _999: x0 => x0.width, _1000: x0 => x0.scale, _1001: (x0,x1) => { x0.value = x1 }, _1004: (x0,x1) => { x0.placeholder = x1 }, _1006: (x0,x1) => { x0.name = x1 }, _1007: x0 => x0.selectionDirection, _1008: x0 => x0.selectionStart, _1009: x0 => x0.selectionEnd, _1012: x0 => x0.value, _1014: (x0,x1,x2) => x0.setSelectionRange(x1,x2), _1015: x0 => x0.readText(), _1016: (x0,x1) => x0.writeText(x1), _1018: x0 => x0.altKey, _1019: x0 => x0.code, _1020: x0 => x0.ctrlKey, _1021: x0 => x0.key, _1022: x0 => x0.keyCode, _1023: x0 => x0.location, _1024: x0 => x0.metaKey, _1025: x0 => x0.repeat, _1026: x0 => x0.shiftKey, _1027: x0 => x0.isComposing, _1029: x0 => x0.state, _1030: (x0,x1) => x0.go(x1), _1032: (x0,x1,x2,x3) => x0.pushState(x1,x2,x3), _1033: (x0,x1,x2,x3) => x0.replaceState(x1,x2,x3), _1034: x0 => x0.pathname, _1035: x0 => x0.search, _1036: x0 => x0.hash, _1040: x0 => x0.state, _1043: (x0,x1) => x0.createObjectURL(x1), _1045: x0 => new Blob(x0), _1047: x0 => new MutationObserver(x0), _1048: (x0,x1,x2) => x0.observe(x1,x2), _1049: f => finalizeWrapper(f, function(x0,x1) { return dartInstance.exports._1049(f,arguments.length,x0,x1) }), _1052: x0 => x0.attributeName, _1053: x0 => x0.type, _1054: x0 => x0.matches, _1055: x0 => x0.matches, _1059: x0 => x0.relatedTarget, _1061: x0 => x0.clientX, _1062: x0 => x0.clientY, _1063: x0 => x0.offsetX, _1064: x0 => x0.offsetY, _1067: x0 => x0.button, _1068: x0 => x0.buttons, _1069: x0 => x0.ctrlKey, _1073: x0 => x0.pointerId, _1074: x0 => x0.pointerType, _1075: x0 => x0.pressure, _1076: x0 => x0.tiltX, _1077: x0 => x0.tiltY, _1078: x0 => x0.getCoalescedEvents(), _1081: x0 => x0.deltaX, _1082: x0 => x0.deltaY, _1083: x0 => x0.wheelDeltaX, _1084: x0 => x0.wheelDeltaY, _1085: x0 => x0.deltaMode, _1092: x0 => x0.changedTouches, _1095: x0 => x0.clientX, _1096: x0 => x0.clientY, _1099: x0 => x0.data, _1102: (x0,x1) => { x0.disabled = x1 }, _1103: (x0,x1) => { x0.type = x1 }, _1105: (x0,x1) => { x0.max = x1 }, _1106: (x0,x1) => { x0.min = x1 }, _1107: x0 => x0.value, _1108: (x0,x1) => { x0.value = x1 }, _1109: x0 => x0.disabled, _1110: (x0,x1) => { x0.disabled = x1 }, _1112: (x0,x1) => { x0.placeholder = x1 }, _1114: (x0,x1) => { x0.name = x1 }, _1115: (x0,x1) => { x0.autocomplete = x1 }, _1117: x0 => x0.selectionDirection, _1118: x0 => x0.selectionStart, _1120: x0 => x0.selectionEnd, _1123: (x0,x1,x2) => x0.setSelectionRange(x1,x2), _1124: (x0,x1) => x0.add(x1), _1127: (x0,x1) => { x0.noValidate = x1 }, _1128: (x0,x1) => { x0.method = x1 }, _1129: (x0,x1) => { x0.action = x1 }, _1155: x0 => x0.orientation, _1156: x0 => x0.width, _1157: x0 => x0.height, _1158: (x0,x1) => x0.lock(x1), _1177: x0 => new ResizeObserver(x0), _1180: f => finalizeWrapper(f, function(x0,x1) { return dartInstance.exports._1180(f,arguments.length,x0,x1) }), _1188: x0 => x0.length, _1189: x0 => x0.iterator, _1190: x0 => x0.Segmenter, _1191: x0 => x0.v8BreakIterator, _1192: (x0,x1) => new Intl.Segmenter(x0,x1), _1195: x0 => x0.language, _1196: x0 => x0.script, _1197: x0 => x0.region, _1215: x0 => x0.done, _1216: x0 => x0.value, _1217: x0 => x0.index, _1221: (x0,x1) => new Intl.v8BreakIterator(x0,x1), _1222: (x0,x1) => x0.adoptText(x1), _1223: x0 => x0.first(), _1224: x0 => x0.next(), _1225: x0 => x0.current(), _1239: x0 => x0.hostElement, _1240: x0 => x0.viewConstraints, _1243: x0 => x0.maxHeight, _1244: x0 => x0.maxWidth, _1245: x0 => x0.minHeight, _1246: x0 => x0.minWidth, _1247: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1247(f,arguments.length,x0) }), _1248: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1248(f,arguments.length,x0) }), _1249: (x0,x1) => ({addView: x0,removeView: x1}), _1252: x0 => x0.loader, _1253: () => globalThis._flutter, _1254: (x0,x1) => x0.didCreateEngineInitializer(x1), _1255: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1255(f,arguments.length,x0) }), _1256: f => finalizeWrapper(f, function() { return dartInstance.exports._1256(f,arguments.length) }), _1257: (x0,x1) => ({initializeEngine: x0,autoStart: x1}), _1260: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1260(f,arguments.length,x0) }), _1261: x0 => ({runApp: x0}), _1263: f => finalizeWrapper(f, function(x0,x1) { return dartInstance.exports._1263(f,arguments.length,x0,x1) }), _1264: x0 => x0.length, _1265: () => globalThis.window.ImageDecoder, _1266: x0 => x0.tracks, _1268: x0 => x0.completed, _1270: x0 => x0.image, _1276: x0 => x0.displayWidth, _1277: x0 => x0.displayHeight, _1278: x0 => x0.duration, _1281: x0 => x0.ready, _1282: x0 => x0.selectedTrack, _1283: x0 => x0.repetitionCount, _1284: x0 => x0.frameCount, _1327: x0 => x0.requestFullscreen(), _1328: x0 => x0.exitFullscreen(), _1334: (x0,x1) => x0.createElement(x1), _1340: (x0,x1,x2) => x0.addEventListener(x1,x2), _1341: () => new XMLHttpRequest(), _1343: (x0,x1,x2) => x0.setRequestHeader(x1,x2), _1344: (x0,x1) => x0.send(x1), _1345: x0 => x0.abort(), _1346: x0 => x0.getAllResponseHeaders(), _1352: x0 => x0.decode(), _1353: (x0,x1,x2,x3) => x0.open(x1,x2,x3), _1354: (x0,x1,x2) => x0.setRequestHeader(x1,x2), _1355: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1355(f,arguments.length,x0) }), _1356: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1356(f,arguments.length,x0) }), _1357: x0 => x0.send(), _1358: () => new XMLHttpRequest(), _1359: x0 => ({scale: x0}), _1360: (x0,x1) => x0.getViewport(x1), _1361: x0 => ({alpha: x0}), _1362: (x0,x1,x2) => x0.getContext(x1,x2), _1363: (x0,x1) => ({canvasContext: x0,viewport: x1}), _1364: (x0,x1) => x0.render(x1), _1365: x0 => x0.arrayBuffer(), _1366: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1366(f,arguments.length,x0) }), _1367: (x0,x1) => x0.toBlob(x1), _1368: (x0,x1,x2,x3) => ({scale: x0,offsetX: x1,offsetY: x2,dontFlip: x3}), _1369: (x0,x1,x2,x3,x4) => x0.fillRect(x1,x2,x3,x4), _1370: (x0,x1,x2) => ({canvasContext: x0,viewport: x1,enableWebGL: x2}), _1371: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1371(f,arguments.length,x0) }), _1372: x0 => globalThis.Wakelock.toggle(x0), _1374: (x0,x1) => x0.getItem(x1), _1375: (x0,x1) => x0.removeItem(x1), _1376: (x0,x1,x2) => x0.setItem(x1,x2), _1391: Date.now, _1393: s => new Date(s * 1000).getTimezoneOffset() * 60, _1394: s => { if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(s)) { return NaN; } return parseFloat(s); }, _1395: () => { let stackString = new Error().stack.toString(); let frames = stackString.split('\n'); let drop = 2; if (frames[0] === 'Error') { drop += 1; } return frames.slice(drop).join('\n'); }, _1396: () => typeof dartUseDateNowForTicks !== "undefined", _1397: () => 1000 * performance.now(), _1398: () => Date.now(), _1399: () => { // On browsers return `globalThis.location.href` if (globalThis.location != null) { return globalThis.location.href; } return null; }, _1400: () => { return typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32" }, _1401: () => new WeakMap(), _1402: (map, o) => map.get(o), _1403: (map, o, v) => map.set(o, v), _1404: x0 => new WeakRef(x0), _1405: x0 => x0.deref(), _1406: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1406(f,arguments.length,x0) }), _1407: x0 => new FinalizationRegistry(x0), _1409: (x0,x1,x2) => x0.register(x1,x2), _1412: () => globalThis.WeakRef, _1413: () => globalThis.FinalizationRegistry, _1416: s => JSON.stringify(s), _1417: s => printToConsole(s), _1418: (o, p, r) => o.replaceAll(p, () => r), _1419: (o, p, r) => o.replace(p, () => r), _1420: Function.prototype.call.bind(String.prototype.toLowerCase), _1421: s => s.toUpperCase(), _1422: s => s.trim(), _1423: s => s.trimLeft(), _1424: s => s.trimRight(), _1425: (string, times) => string.repeat(times), _1426: Function.prototype.call.bind(String.prototype.indexOf), _1427: (s, p, i) => s.lastIndexOf(p, i), _1428: (string, token) => string.split(token), _1429: Object.is, _1430: o => o instanceof Array, _1431: (a, i) => a.push(i), _1435: a => a.pop(), _1436: (a, i) => a.splice(i, 1), _1437: (a, s) => a.join(s), _1438: (a, s, e) => a.slice(s, e), _1440: (a, b) => a == b ? 0 : (a > b ? 1 : -1), _1441: a => a.length, _1442: (a, l) => a.length = l, _1443: (a, i) => a[i], _1444: (a, i, v) => a[i] = v, _1446: o => { if (o instanceof ArrayBuffer) return 0; if (globalThis.SharedArrayBuffer !== undefined && o instanceof SharedArrayBuffer) { return 1; } return 2; }, _1447: (o, offsetInBytes, lengthInBytes) => { var dst = new ArrayBuffer(lengthInBytes); new Uint8Array(dst).set(new Uint8Array(o, offsetInBytes, lengthInBytes)); return new DataView(dst); }, _1449: o => o instanceof Uint8Array, _1450: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length), _1451: o => o instanceof Int8Array, _1452: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length), _1453: o => o instanceof Uint8ClampedArray, _1454: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length), _1455: o => o instanceof Uint16Array, _1456: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length), _1457: o => o instanceof Int16Array, _1458: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length), _1459: o => o instanceof Uint32Array, _1460: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length), _1461: o => o instanceof Int32Array, _1462: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length), _1464: (o, start, length) => new BigInt64Array(o.buffer, o.byteOffset + start, length), _1465: o => o instanceof Float32Array, _1466: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length), _1467: o => o instanceof Float64Array, _1468: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length), _1469: (t, s) => t.set(s), _1470: l => new DataView(new ArrayBuffer(l)), _1471: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength), _1473: o => o.buffer, _1474: o => o.byteOffset, _1475: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get), _1476: (b, o) => new DataView(b, o), _1477: (b, o, l) => new DataView(b, o, l), _1478: Function.prototype.call.bind(DataView.prototype.getUint8), _1479: Function.prototype.call.bind(DataView.prototype.setUint8), _1480: Function.prototype.call.bind(DataView.prototype.getInt8), _1481: Function.prototype.call.bind(DataView.prototype.setInt8), _1482: Function.prototype.call.bind(DataView.prototype.getUint16), _1483: Function.prototype.call.bind(DataView.prototype.setUint16), _1484: Function.prototype.call.bind(DataView.prototype.getInt16), _1485: Function.prototype.call.bind(DataView.prototype.setInt16), _1486: Function.prototype.call.bind(DataView.prototype.getUint32), _1487: Function.prototype.call.bind(DataView.prototype.setUint32), _1488: Function.prototype.call.bind(DataView.prototype.getInt32), _1489: Function.prototype.call.bind(DataView.prototype.setInt32), _1492: Function.prototype.call.bind(DataView.prototype.getBigInt64), _1493: Function.prototype.call.bind(DataView.prototype.setBigInt64), _1494: Function.prototype.call.bind(DataView.prototype.getFloat32), _1495: Function.prototype.call.bind(DataView.prototype.setFloat32), _1496: Function.prototype.call.bind(DataView.prototype.getFloat64), _1497: Function.prototype.call.bind(DataView.prototype.setFloat64), _1510: (ms, c) => setTimeout(() => dartInstance.exports.$invokeCallback(c),ms), _1511: (handle) => clearTimeout(handle), _1512: (ms, c) => setInterval(() => dartInstance.exports.$invokeCallback(c), ms), _1513: (handle) => clearInterval(handle), _1514: (c) => queueMicrotask(() => dartInstance.exports.$invokeCallback(c)), _1515: () => Date.now(), _1520: o => Object.keys(o), _1521: (x0,x1,x2) => x0.open(x1,x2), _1522: x0 => x0.send(), _1523: (x0,x1,x2,x3,x4,x5) => ({method: x0,headers: x1,body: x2,credentials: x3,redirect: x4,signal: x5}), _1524: (x0,x1) => globalThis.fetch(x0,x1), _1525: (x0,x1) => x0.get(x1), _1526: f => finalizeWrapper(f, function(x0,x1,x2) { return dartInstance.exports._1526(f,arguments.length,x0,x1,x2) }), _1527: (x0,x1) => x0.forEach(x1), _1529: () => new AbortController(), _1530: x0 => x0.getReader(), _1531: x0 => x0.read(), _1532: x0 => x0.cancel(), _1533: (x0,x1) => x0.append(x1), _1534: (x0,x1) => x0.append(x1), _1535: x0 => ({xhrSetup: x0}), _1536: x0 => new Hls(x0), _1537: () => globalThis.Hls.isSupported(), _1539: (x0,x1) => x0.loadSource(x1), _1540: (x0,x1) => x0.attachMedia(x1), _1541: (x0,x1,x2) => x0.setAttribute(x1,x2), _1542: x0 => x0.pause(), _1543: (x0,x1) => x0.end(x1), _1544: x0 => x0.load(), _1545: x0 => x0.remove(), _1546: x0 => x0.play(), _1547: (x0,x1) => x0.item(x1), _1549: (x0,x1) => x0.createElement(x1), _1550: (x0,x1) => x0.appendChild(x1), _1557: (x0,x1) => x0.canPlayType(x1), _1561: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1561(f,arguments.length,x0) }), _1562: f => finalizeWrapper(f, function(x0) { return dartInstance.exports._1562(f,arguments.length,x0) }), _1563: (x0,x1,x2,x3) => x0.addEventListener(x1,x2,x3), _1564: (x0,x1,x2,x3) => x0.removeEventListener(x1,x2,x3), _1570: () => globalThis.pdfjsLib, _1571: () => globalThis.pdfRenderOptions, _1572: (x0,x1) => x0.getDocument(x1), _1573: x0 => x0.promise, _1575: (x0,x1,x2,x3) => ({cMapUrl: x0,cMapPacked: x1,data: x2,password: x3}), _1576: (x0,x1) => ({cMapUrl: x0,cMapPacked: x1}), _1577: x0 => x0.cMapUrl, _1578: x0 => x0.cMapPacked, _1579: (x0,x1) => x0.getPage(x1), _1580: x0 => x0.numPages, _1582: x0 => x0.pageNumber, _1607: x0 => x0.width, _1609: x0 => x0.height, _1632: x0 => x0.promise, _1633: (x0,x1) => x0.key(x1), _1640: (s, m) => { try { return new RegExp(s, m); } catch (e) { return String(e); } }, _1641: (x0,x1) => x0.exec(x1), _1642: (x0,x1) => x0.test(x1), _1643: x0 => x0.pop(), _1645: o => o === undefined, _1647: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true, _1649: o => { const proto = Object.getPrototypeOf(o); return proto === Object.prototype || proto === null; }, _1650: o => o instanceof RegExp, _1651: (l, r) => l === r, _1652: o => o, _1653: o => o, _1654: o => o, _1655: b => !!b, _1656: o => o.length, _1658: (o, i) => o[i], _1659: f => f.dartFunction, _1660: () => ({}), _1661: () => [], _1663: () => globalThis, _1664: (constructor, args) => { const factoryFunction = constructor.bind.apply( constructor, [null, ...args]); return new factoryFunction(); }, _1666: (o, p) => o[p], _1667: (o, p, v) => o[p] = v, _1668: (o, m, a) => o[m].apply(o, a), _1670: o => String(o), _1671: (p, s, f) => p.then(s, (e) => f(e, e === undefined)), _1672: o => { if (o === undefined) return 1; var type = typeof o; if (type === 'boolean') return 2; if (type === 'number') return 3; if (type === 'string') return 4; if (o instanceof Array) return 5; if (ArrayBuffer.isView(o)) { if (o instanceof Int8Array) return 6; if (o instanceof Uint8Array) return 7; if (o instanceof Uint8ClampedArray) return 8; if (o instanceof Int16Array) return 9; if (o instanceof Uint16Array) return 10; if (o instanceof Int32Array) return 11; if (o instanceof Uint32Array) return 12; if (o instanceof Float32Array) return 13; if (o instanceof Float64Array) return 14; if (o instanceof DataView) return 15; } if (o instanceof ArrayBuffer) return 16; // Feature check for `SharedArrayBuffer` before doing a type-check. if (globalThis.SharedArrayBuffer !== undefined && o instanceof SharedArrayBuffer) { return 17; } return 18; }, _1673: o => [o], _1674: (o0, o1) => [o0, o1], _1675: (o0, o1, o2) => [o0, o1, o2], _1676: (o0, o1, o2, o3) => [o0, o1, o2, o3], _1677: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const getValue = dartInstance.exports.$wasmI8ArrayGet; for (let i = 0; i < length; i++) { jsArray[jsArrayOffset + i] = getValue(wasmArray, wasmArrayOffset + i); } }, _1678: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const setValue = dartInstance.exports.$wasmI8ArraySet; for (let i = 0; i < length; i++) { setValue(wasmArray, wasmArrayOffset + i, jsArray[jsArrayOffset + i]); } }, _1681: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const getValue = dartInstance.exports.$wasmI32ArrayGet; for (let i = 0; i < length; i++) { jsArray[jsArrayOffset + i] = getValue(wasmArray, wasmArrayOffset + i); } }, _1682: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const setValue = dartInstance.exports.$wasmI32ArraySet; for (let i = 0; i < length; i++) { setValue(wasmArray, wasmArrayOffset + i, jsArray[jsArrayOffset + i]); } }, _1683: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const getValue = dartInstance.exports.$wasmF32ArrayGet; for (let i = 0; i < length; i++) { jsArray[jsArrayOffset + i] = getValue(wasmArray, wasmArrayOffset + i); } }, _1684: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const setValue = dartInstance.exports.$wasmF32ArraySet; for (let i = 0; i < length; i++) { setValue(wasmArray, wasmArrayOffset + i, jsArray[jsArrayOffset + i]); } }, _1685: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const getValue = dartInstance.exports.$wasmF64ArrayGet; for (let i = 0; i < length; i++) { jsArray[jsArrayOffset + i] = getValue(wasmArray, wasmArrayOffset + i); } }, _1686: (jsArray, jsArrayOffset, wasmArray, wasmArrayOffset, length) => { const setValue = dartInstance.exports.$wasmF64ArraySet; for (let i = 0; i < length; i++) { setValue(wasmArray, wasmArrayOffset + i, jsArray[jsArrayOffset + i]); } }, _1687: x0 => new ArrayBuffer(x0), _1688: s => { if (/[[\]{}()*+?.\\^$|]/.test(s)) { s = s.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); } return s; }, _1690: x0 => x0.index, _1692: x0 => x0.flags, _1693: x0 => x0.multiline, _1694: x0 => x0.ignoreCase, _1695: x0 => x0.unicode, _1696: x0 => x0.dotAll, _1697: (x0,x1) => { x0.lastIndex = x1 }, _1698: (o, p) => p in o, _1699: (o, p) => o[p], _1700: (o, p, v) => o[p] = v, _1701: (o, p) => delete o[p], _1702: x0 => x0.random(), _1703: (x0,x1) => x0.getRandomValues(x1), _1704: () => globalThis.crypto, _1705: () => globalThis.Math, _1706: Function.prototype.call.bind(Number.prototype.toString), _1707: Function.prototype.call.bind(BigInt.prototype.toString), _1708: Function.prototype.call.bind(Number.prototype.toString), _1709: (d, digits) => d.toFixed(digits), _1713: (x0,x1,x2,x3) => ({id: x0,width: x1,height: x2,data: x3}), _1714: x0 => x0.id, _1715: x0 => x0.width, _1716: x0 => x0.height, _1717: x0 => x0.data, _1718: () => globalThis.document, _1724: (x0,x1) => { x0.height = x1 }, _1726: (x0,x1) => { x0.width = x1 }, _1735: x0 => x0.style, _1738: x0 => x0.src, _1739: (x0,x1) => { x0.src = x1 }, _1740: x0 => x0.naturalWidth, _1741: x0 => x0.naturalHeight, _1757: x0 => x0.status, _1758: (x0,x1) => { x0.responseType = x1 }, _1760: x0 => x0.response, _1802: x0 => x0.readyState, _1804: (x0,x1) => { x0.timeout = x1 }, _1806: (x0,x1) => { x0.withCredentials = x1 }, _1807: x0 => x0.upload, _1808: x0 => x0.responseURL, _1809: x0 => x0.status, _1810: x0 => x0.statusText, _1812: (x0,x1) => { x0.responseType = x1 }, _1813: x0 => x0.response, _1825: x0 => x0.loaded, _1826: x0 => x0.total, _1890: x0 => x0.style, _2462: x0 => x0.videoWidth, _2463: x0 => x0.videoHeight, _2492: x0 => x0.error, _2494: (x0,x1) => { x0.src = x1 }, _2503: x0 => x0.buffered, _2506: x0 => x0.currentTime, _2507: (x0,x1) => { x0.currentTime = x1 }, _2508: x0 => x0.duration, _2509: x0 => x0.paused, _2512: x0 => x0.playbackRate, _2513: (x0,x1) => { x0.playbackRate = x1 }, _2524: (x0,x1) => { x0.controls = x1 }, _2525: x0 => x0.volume, _2526: (x0,x1) => { x0.volume = x1 }, _2527: x0 => x0.muted, _2528: (x0,x1) => { x0.muted = x1 }, _2544: x0 => x0.message, _2618: x0 => x0.length, _3121: x0 => x0.src, _3122: (x0,x1) => { x0.src = x1 }, _3124: (x0,x1) => { x0.type = x1 }, _3128: (x0,x1) => { x0.async = x1 }, _3142: (x0,x1) => { x0.charset = x1 }, _3168: (x0,x1) => { x0.width = x1 }, _3170: (x0,x1) => { x0.height = x1 }, _3236: (x0,x1) => { x0.fillStyle = x1 }, _3590: () => globalThis.window, _3653: x0 => x0.navigator, _3917: x0 => x0.localStorage, _4023: x0 => x0.geolocation, _4026: x0 => x0.mediaDevices, _4028: x0 => x0.permissions, _4029: x0 => x0.maxTouchPoints, _4039: x0 => x0.platform, _4042: x0 => x0.userAgent, _4250: x0 => x0.length, _6193: x0 => x0.signal, _6205: x0 => x0.length, _6265: () => globalThis.document, _6324: x0 => x0.documentElement, _6347: x0 => x0.head, _6704: (x0,x1) => { x0.innerHTML = x1 }, _6707: x0 => x0.children, _8026: x0 => x0.value, _8028: x0 => x0.done, _8729: x0 => x0.url, _8731: x0 => x0.status, _8733: x0 => x0.statusText, _8734: x0 => x0.headers, _8735: x0 => x0.body, _10858: (x0,x1) => { x0.border = x1 }, _11300: (x0,x1) => { x0.height = x1 }, _11990: (x0,x1) => { x0.width = x1 }, _12359: x0 => x0.message, }; const baseImports = { dart2wasm: dart2wasm, Math: Math, Date: Date, Object: Object, Array: Array, Reflect: Reflect, S: new Proxy({}, { get(_, prop) { return prop; } }), }; const jsStringPolyfill = { "charCodeAt": (s, i) => s.charCodeAt(i), "compare": (s1, s2) => { if (s1 < s2) return -1; if (s1 > s2) return 1; return 0; }, "concat": (s1, s2) => s1 + s2, "equals": (s1, s2) => s1 === s2, "fromCharCode": (i) => String.fromCharCode(i), "length": (s) => s.length, "substring": (s, a, b) => s.substring(a, b), "fromCharCodeArray": (a, start, end) => { if (end <= start) return ''; const read = dartInstance.exports.$wasmI16ArrayGet; let result = ''; let index = start; const chunkLength = Math.min(end - index, 500); let array = new Array(chunkLength); while (index < end) { const newChunkLength = Math.min(end - index, 500); for (let i = 0; i < newChunkLength; i++) { array[i] = read(a, index++); } if (newChunkLength < chunkLength) { array = array.slice(0, newChunkLength); } result += String.fromCharCode(...array); } return result; }, "intoCharCodeArray": (s, a, start) => { if (s === '') return 0; const write = dartInstance.exports.$wasmI16ArraySet; for (var i = 0; i < s.length; ++i) { write(a, start++, s.charCodeAt(i)); } return s.length; }, "test": (s) => typeof s == "string", }; dartInstance = await WebAssembly.instantiate(this.module, { ...baseImports, ...additionalImports, "wasm:js-string": jsStringPolyfill, }); return new InstantiatedApp(this, dartInstance); } } class InstantiatedApp { constructor(compiledApp, instantiatedModule) { this.compiledApp = compiledApp; this.instantiatedModule = instantiatedModule; } // Call the main function with the given arguments. invokeMain(...args) { this.instantiatedModule.exports.$invokeMain(args); } }