From 8bfa36fab6022e4afb4fe30cef28ce939af95dbe Mon Sep 17 00:00:00 2001 From: "ALI Mohammadiyeh (Max Base)" Date: Wed, 8 Jan 2025 08:55:43 +0100 Subject: [PATCH] run pre-commit --- config/docs.md | 149 +- config/json/block.json | 2 +- .../layout/attribute/style/global_value.json | 2 +- config/json/layout/attribute/style/state.json | 2 +- config/json/layout/attribute/style/type.json | 2 +- config/json/layout/attribute/style/value.json | 2 +- config/json/layout/attribute/type.json | 2 +- config/json/layout/type.json | 2 +- config/json/type.json | 2 +- salam-online.html | 17 +- src/ast_layout.c | 2 +- src/generated-config/ast_block_type.h | 44 - .../ast_layout_attribute_style_global.h | 44 +- .../ast_layout_attribute_style_state_type.h | 180 +- .../ast_layout_attribute_style_type.h | 2616 ++++++++++++---- .../ast_layout_attribute_style_value.h | 2237 +++++++------- .../ast_layout_attribute_style_value_extern.h | 512 +-- .../ast_layout_attribute_type.h | 285 +- .../ast_layout_attribute_value.h | 77 +- .../ast_layout_attribute_value_extern.h | 33 - src/generated-config/ast_layout_type.h | 176 +- .../ast_layout_type_attributes.h | 88 +- .../ast_layout_type_attributes_all.h | 153 +- .../ast_layout_type_attributes_values.h | 214 +- ...ast_layout_type_attributes_values_extern.h | 14 - src/generated-config/ast_type.h | 44 - src/generator.c | 17 +- src/generator_layout.c | 48 +- src/generator_layout.h | 12 +- src/main.h | 2 - src/test.html | 2747 ++++++++++------- src/test.js | 1419 +++++---- src/validator.c | 20 +- src/validator_style.c | 32 +- 34 files changed, 6665 insertions(+), 4533 deletions(-) diff --git a/config/docs.md b/config/docs.md index 7179f6a3..f4a31625 100644 --- a/config/docs.md +++ b/config/docs.md @@ -8,10 +8,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `منبع` | | `src` | -| `تکرار` | | `repeat` | +| نام ویژگی | توضیح | تولید | +| --------- | ----- | -------- | +| `منبع` | | `src` | +| `تکرار` | | `repeat` |

دستور خطا

@@ -23,19 +23,19 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | -| `عنوان` | | `title` | -| `زبان` | | `lang` | -| `جهت` | | `dir` | -| `نویسنده` | | `author` | -| `توضیح` | | `description` | -| `کلمات` | | `keywords` | -| `نمایه` | | `icon` | -| `فرمت متنی` | | `charset` | -| `بروزرسانی` | | `refresh` | -| `محدوده نمایش` | | `viewport` | +| نام ویژگی | توضیح | تولید | +| -------------- | --------------------------------------- | ------------- | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| `عنوان` | | `title` | +| `زبان` | | `lang` | +| `جهت` | | `dir` | +| `نویسنده` | | `author` | +| `توضیح` | | `description` | +| `کلمات` | | `keywords` | +| `نمایه` | | `icon` | +| `فرمت متنی` | | `charset` | +| `بروزرسانی` | | `refresh` | +| `محدوده نمایش` | | `viewport` |

دستور جعبه

@@ -45,10 +45,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `تکرار` | | `repeat` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `تکرار` | | `repeat` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` |

دستور پاراگراف

@@ -58,10 +58,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `تکرار` | | `repeat` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `تکرار` | | `repeat` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` |

دستور دکمه

@@ -71,11 +71,11 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `تکرار` | | `repeat` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | -| `نام` | | `name` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `تکرار` | | `repeat` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| `نام` | | `name` |

دستور ویرایشگرمتن

@@ -85,12 +85,12 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `نام` | | `name` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | -| `تکرار` | | `repeat` | -| `راهنما` | | `placeholder` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | ------------- | +| `نام` | | `name` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| `تکرار` | | `repeat` | +| `راهنما` | | `placeholder` |

دستور برچسب

@@ -106,10 +106,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `نام` | | `name` | -| `تکرار` | | `repeat` | +| نام ویژگی | توضیح | تولید | +| --------- | ----- | -------- | +| `نام` | | `name` | +| `تکرار` | | `repeat` |

دستور گروه‌بندی

@@ -131,13 +131,13 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `منبع` | | `src` | -| `نوع` | | `type` | -| `روش` | | `target` | -| `تکرار` | | `repeat` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `منبع` | | `src` | +| `نوع` | | `type` | +| `روش` | | `target` | +| `تکرار` | | `repeat` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` |

دستور گروه انتخاب

@@ -159,10 +159,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `تکرار` | | `repeat` | -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `تکرار` | | `repeat` | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` |

دستور ضخیم مهم

@@ -304,9 +304,9 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `منبع` | | `href` | +| نام ویژگی | توضیح | تولید | +| --------- | ----- | ------ | +| `منبع` | | `href` |

دستور فهرست مرتب

@@ -322,10 +322,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | -| `تکرار` | | `repeat` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| `تکرار` | | `repeat` |

دستور مورد

@@ -335,10 +335,10 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | -| `تکرار` | | `repeat` | +| نام ویژگی | توضیح | تولید | +| --------- | --------------------------------------- | --------- | +| `محتوا` | جهت تنظیم یک محتوا به یک دستور می‌باشد. | `content` | +| `تکرار` | | `repeat` |

دستور جدول

@@ -408,11 +408,11 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `مقدار` | | `value` | -| `نام` | | `name` | -| `راهنما` | | `placeholder` | +| نام ویژگی | توضیح | تولید | +| --------- | ----- | ------------- | +| `مقدار` | | `value` | +| `نام` | | `name` | +| `راهنما` | | `placeholder` |

دستور تصویر

@@ -428,13 +428,13 @@ این دستور دارای ویژگی‌های زیر می‌باشد: -| نام ویژگی | توضیح | تولید | -|-----------|------------|-------| -| `نام` | | `font-family` | -| `منبع` | | `src` | -| `محدود یونیکد` | | `unicode-range` | -| `سبک` | | `font-style` | -| `وزن` | | `font-weight` | +| نام ویژگی | توضیح | تولید | +| -------------- | ----- | --------------- | +| `نام` | | `font-family` | +| `منبع` | | `src` | +| `محدود یونیکد` | | `unicode-range` | +| `سبک` | | `font-style` | +| `وزن` | | `font-weight` |

دستور واکنش گرا

@@ -442,5 +442,4 @@ نام این دستور معادل دستور `@media` می‌باشد. - diff --git a/config/json/block.json b/config/json/block.json index f090a111..bae639ca 100644 --- a/config/json/block.json +++ b/config/json/block.json @@ -16,4 +16,4 @@ "id": "AST_BLOCK_TYPE_ERROR" } ] -} \ No newline at end of file +} diff --git a/config/json/layout/attribute/style/global_value.json b/config/json/layout/attribute/style/global_value.json index 27b31007..0fd0bbbc 100644 --- a/config/json/layout/attribute/style/global_value.json +++ b/config/json/layout/attribute/style/global_value.json @@ -56,4 +56,4 @@ } } ] -} \ No newline at end of file +} diff --git a/config/json/layout/attribute/style/state.json b/config/json/layout/attribute/style/state.json index 11f618b8..18a73594 100644 --- a/config/json/layout/attribute/style/state.json +++ b/config/json/layout/attribute/style/state.json @@ -413,4 +413,4 @@ } } ] -} \ No newline at end of file +} diff --git a/config/json/layout/attribute/style/type.json b/config/json/layout/attribute/style/type.json index 92f800d8..72567820 100644 --- a/config/json/layout/attribute/style/type.json +++ b/config/json/layout/attribute/style/type.json @@ -3669,4 +3669,4 @@ "type": "AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY" } ] -} \ No newline at end of file +} diff --git a/config/json/layout/attribute/style/value.json b/config/json/layout/attribute/style/value.json index 597ce586..ffbab856 100644 --- a/config/json/layout/attribute/style/value.json +++ b/config/json/layout/attribute/style/value.json @@ -8115,4 +8115,4 @@ "id": "ast_layout_allowed_style_list_zoom" } ] -} \ No newline at end of file +} diff --git a/config/json/layout/attribute/type.json b/config/json/layout/attribute/type.json index fdb38d5f..71a344d9 100644 --- a/config/json/layout/attribute/type.json +++ b/config/json/layout/attribute/type.json @@ -487,4 +487,4 @@ } } ] -} \ No newline at end of file +} diff --git a/config/json/layout/type.json b/config/json/layout/type.json index 427569c6..24342b16 100644 --- a/config/json/layout/type.json +++ b/config/json/layout/type.json @@ -922,4 +922,4 @@ } } ] -} \ No newline at end of file +} diff --git a/config/json/type.json b/config/json/type.json index 505d26ee..c1466c7e 100644 --- a/config/json/type.json +++ b/config/json/type.json @@ -84,4 +84,4 @@ "id": "AST_TYPE_ERROR" } ] -} \ No newline at end of file +} diff --git a/salam-online.html b/salam-online.html index 56c632be..57a4f479 100644 --- a/salam-online.html +++ b/salam-online.html @@ -12,7 +12,8 @@ id="code" rows="20" cols="40" - >صفحه: + > +صفحه: رنگ پس زمینه = «زرد» رنگ = «سیاه» محتوا = «سلام دنیا» @@ -62,7 +63,8 @@ محتوا = "پایان" تمام تمام - +
-

+    

     

     
   
 
-
-
diff --git a/src/test.js b/src/test.js
index c572fa4b..6c7e552f 100644
--- a/src/test.js
+++ b/src/test.js
@@ -1,5 +1,3 @@
-
-
 // The Module object: Our interface to the outside world. We import
 // and export values on it. There are various ways Module can be used:
 // 1. Not defined. We create it here
@@ -42,11 +40,17 @@ var ENVIRONMENT_IS_WEB = typeof window == 'object';
 var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
 // N.b. Electron.js environment is simultaneously a NODE-environment, but
 // also a web environment.
-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 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;
 
 if (Module['ENVIRONMENT']) {
-  throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)');
+  throw new Error(
+    'Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)',
+  );
 }
 
 // `/` should be present at the end if `scriptDirectory` is not empty
@@ -59,10 +63,7 @@ function locateFile(path) {
 }
 
 // Hooks that are implemented differently in different runtime environments.
-var read_,
-    readAsync,
-    readBinary,
-    setWindowTitle;
+var read_, readAsync, readBinary, setWindowTitle;
 
 // Normally we don't log exceptions but instead let them bubble out the top
 // level where the embedding environment (e.g. the browser) can handle
@@ -85,51 +86,53 @@ var nodePath;
 var requireNodeFS;
 
 if (ENVIRONMENT_IS_NODE) {
-  if (!(typeof process == 'object' && typeof require == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
+  if (!(typeof process == 'object' && typeof require == 'function'))
+    throw new Error(
+      'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+    );
   if (ENVIRONMENT_IS_WORKER) {
     scriptDirectory = require('path').dirname(scriptDirectory) + '/';
   } else {
     scriptDirectory = __dirname + '/';
   }
 
-// include: node_shell_read.js
+  // include: node_shell_read.js
 
+  requireNodeFS = () => {
+    // Use nodePath as the indicator for these not being initialized,
+    // since in some environments a global fs may have already been
+    // created.
+    if (!nodePath) {
+      fs = require('fs');
+      nodePath = require('path');
+    }
+  };
 
-requireNodeFS = () => {
-  // Use nodePath as the indicator for these not being initialized,
-  // since in some environments a global fs may have already been
-  // created.
-  if (!nodePath) {
-    fs = require('fs');
-    nodePath = require('path');
-  }
-};
-
-read_ = function shell_read(filename, binary) {
-  requireNodeFS();
-  filename = nodePath['normalize'](filename);
-  return fs.readFileSync(filename, binary ? undefined : 'utf8');
-};
+  read_ = function shell_read(filename, binary) {
+    requireNodeFS();
+    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);
-  }
-  assert(ret.buffer);
-  return ret;
-};
+  readBinary = (filename) => {
+    var ret = read_(filename, true);
+    if (!ret.buffer) {
+      ret = new Uint8Array(ret);
+    }
+    assert(ret.buffer);
+    return ret;
+  };
 
-readAsync = (filename, onload, onerror) => {
-  requireNodeFS();
-  filename = nodePath['normalize'](filename);
-  fs.readFile(filename, function(err, data) {
-    if (err) onerror(err);
-    else onload(data.buffer);
-  });
-};
+  readAsync = (filename, onload, onerror) => {
+    requireNodeFS();
+    filename = nodePath['normalize'](filename);
+    fs.readFile(filename, function (err, data) {
+      if (err) onerror(err);
+      else onload(data.buffer);
+    });
+  };
 
-// end include: node_shell_read.js
+  // end include: node_shell_read.js
   if (process['argv'].length > 1) {
     thisProgram = process['argv'][1].replace(/\\/g, '/');
   }
@@ -140,7 +143,7 @@ readAsync = (filename, onload, onerror) => {
     module['exports'] = Module;
   }
 
-  process['on']('uncaughtException', function(ex) {
+  process['on']('uncaughtException', function (ex) {
     // suppress ExitStatus exceptions from showing an error
     if (!(ex instanceof ExitStatus)) {
       throw ex;
@@ -152,7 +155,9 @@ readAsync = (filename, onload, onerror) => {
   // not be needed with node v15 and about because it is now the default
   // behaviour:
   // See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
-  process['on']('unhandledRejection', function(reason) { throw reason; });
+  process['on']('unhandledRejection', function (reason) {
+    throw reason;
+  });
 
   quit_ = (status, toThrow) => {
     if (keepRuntimeAlive()) {
@@ -163,12 +168,18 @@ readAsync = (filename, onload, onerror) => {
     process['exit'](status);
   };
 
-  Module['inspect'] = function () { return '[Emscripten Module object]'; };
-
-} else
-if (ENVIRONMENT_IS_SHELL) {
-
-  if ((typeof process == 'object' && typeof require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
+  Module['inspect'] = function () {
+    return '[Emscripten Module object]';
+  };
+} else if (ENVIRONMENT_IS_SHELL) {
+  if (
+    (typeof process == 'object' && typeof require === 'function') ||
+    typeof window == 'object' ||
+    typeof importScripts == 'function'
+  )
+    throw new Error(
+      'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+    );
 
   if (typeof read != 'undefined') {
     read_ = function shell_read(f) {
@@ -219,20 +230,26 @@ if (ENVIRONMENT_IS_SHELL) {
 
   if (typeof print != 'undefined') {
     // Prefer to use print/printErr where they exist, as they usually work better.
-    if (typeof console == 'undefined') console = /** @type{!Console} */({});
-    console.log = /** @type{!function(this:Console, ...*): undefined} */ (print);
-    console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print);
+    if (typeof console == 'undefined') console = /** @type{!Console} */ ({});
+    console.log = /** @type{!function(this:Console, ...*): undefined} */ (
+      print
+    );
+    console.warn = console.error =
+      /** @type{!function(this:Console, ...*): undefined} */ (
+        typeof printErr != 'undefined' ? printErr : print
+      );
   }
-
-} else
+}
 
 // Note that this includes Node.js workers when relevant (pthreads is enabled).
 // Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
 // ENVIRONMENT_IS_NODE.
-if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
-  if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
+else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
+  if (ENVIRONMENT_IS_WORKER) {
+    // Check worker, not web, since window could be polyfilled
     scriptDirectory = self.location.href;
-  } else if (typeof document != 'undefined' && document.currentScript) { // web
+  } else if (typeof document != 'undefined' && document.currentScript) {
+    // web
     scriptDirectory = document.currentScript.src;
   }
   // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.
@@ -242,57 +259,62 @@ if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
   // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #),
   // they are removed because they could contain a slash.
   if (scriptDirectory.indexOf('blob:') !== 0) {
-    scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf('/')+1);
+    scriptDirectory = scriptDirectory.substr(
+      0,
+      scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/') + 1,
+    );
   } else {
     scriptDirectory = '';
   }
 
-  if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
+  if (!(typeof window == 'object' || typeof importScripts == 'function'))
+    throw new Error(
+      'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+    );
 
   // Differentiate the Web Worker from the Node Worker case, as reading must
   // be done differently.
   {
-// include: web_or_worker_shell_read.js
-
+    // include: web_or_worker_shell_read.js
 
-  read_ = (url) => {
+    read_ = (url) => {
       var xhr = new XMLHttpRequest();
       xhr.open('GET', url, false);
       xhr.send(null);
       return xhr.responseText;
-  }
+    };
 
-  if (ENVIRONMENT_IS_WORKER) {
-    readBinary = (url) => {
+    if (ENVIRONMENT_IS_WORKER) {
+      readBinary = (url) => {
         var xhr = new XMLHttpRequest();
         xhr.open('GET', url, false);
         xhr.responseType = 'arraybuffer';
         xhr.send(null);
-        return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
-    };
-  }
+        return new Uint8Array(/** @type{!ArrayBuffer} */ (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)) { // file URLs can return 0
-        onload(xhr.response);
-        return;
-      }
-      onerror();
+    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)) {
+          // file URLs can return 0
+          onload(xhr.response);
+          return;
+        }
+        onerror();
+      };
+      xhr.onerror = onerror;
+      xhr.send(null);
     };
-    xhr.onerror = onerror;
-    xhr.send(null);
-  }
 
-// end include: web_or_worker_shell_read.js
+    // end include: web_or_worker_shell_read.js
   }
 
-  setWindowTitle = (title) => document.title = title;
-} else
-{
+  setWindowTitle = (title) => (document.title = title);
+} else {
   throw new Error('environment detection error');
 }
 
@@ -311,55 +333,101 @@ checkIncomingModuleAPI();
 // expected to arrive, and second, by using a local everywhere else that can be
 // minified.
 
-if (Module['arguments']) arguments_ = Module['arguments'];legacyModuleProp('arguments', 'arguments_');
+if (Module['arguments']) arguments_ = Module['arguments'];
+legacyModuleProp('arguments', 'arguments_');
 
-if (Module['thisProgram']) thisProgram = Module['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram');
+if (Module['thisProgram']) thisProgram = Module['thisProgram'];
+legacyModuleProp('thisProgram', 'thisProgram');
 
-if (Module['quit']) quit_ = Module['quit'];legacyModuleProp('quit', 'quit_');
+if (Module['quit']) quit_ = Module['quit'];
+legacyModuleProp('quit', 'quit_');
 
 // perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
 // Assertions on removed incoming Module JS APIs.
-assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead');
-assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead');
-assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead');
-assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead');
-assert(typeof Module['read'] == 'undefined', 'Module.read option was removed (modify read_ in JS)');
-assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)');
-assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)');
-assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)');
-assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY');
+assert(
+  typeof Module['memoryInitializerPrefixURL'] == 'undefined',
+  'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead',
+);
+assert(
+  typeof Module['pthreadMainPrefixURL'] == 'undefined',
+  'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead',
+);
+assert(
+  typeof Module['cdInitializerPrefixURL'] == 'undefined',
+  'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead',
+);
+assert(
+  typeof Module['filePackagePrefixURL'] == 'undefined',
+  'Module.filePackagePrefixURL option was removed, use Module.locateFile instead',
+);
+assert(
+  typeof Module['read'] == 'undefined',
+  'Module.read option was removed (modify read_ in JS)',
+);
+assert(
+  typeof Module['readAsync'] == 'undefined',
+  'Module.readAsync option was removed (modify readAsync in JS)',
+);
+assert(
+  typeof Module['readBinary'] == 'undefined',
+  'Module.readBinary option was removed (modify readBinary in JS)',
+);
+assert(
+  typeof Module['setWindowTitle'] == 'undefined',
+  'Module.setWindowTitle option was removed (modify setWindowTitle in JS)',
+);
+assert(
+  typeof Module['TOTAL_MEMORY'] == 'undefined',
+  'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY',
+);
 legacyModuleProp('read', 'read_');
 legacyModuleProp('readAsync', 'readAsync');
 legacyModuleProp('readBinary', 'readBinary');
 legacyModuleProp('setWindowTitle', 'setWindowTitle');
 var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js';
-var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js';
-var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js';
+var PROXYFS =
+  'PROXYFS is no longer included by default; build with -lproxyfs.js';
+var WORKERFS =
+  'WORKERFS is no longer included by default; build with -lworkerfs.js';
 var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';
-function alignMemory() { abort('`alignMemory` is now a library function and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line'); }
-
-assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.");
-
-
+function alignMemory() {
+  abort(
+    '`alignMemory` is now a library function and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line',
+  );
+}
 
+assert(
+  !ENVIRONMENT_IS_SHELL,
+  "shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable.",
+);
 
 var STACK_ALIGN = 16;
 var POINTER_SIZE = 4;
 
 function getNativeTypeSize(type) {
   switch (type) {
-    case 'i1': case 'i8': return 1;
-    case 'i16': return 2;
-    case 'i32': return 4;
-    case 'i64': return 8;
-    case 'float': return 4;
-    case 'double': return 8;
+    case 'i1':
+    case 'i8':
+      return 1;
+    case 'i16':
+      return 2;
+    case 'i32':
+      return 4;
+    case 'i64':
+      return 8;
+    case 'float':
+      return 4;
+    case 'double':
+      return 8;
     default: {
       if (type[type.length - 1] === '*') {
         return POINTER_SIZE;
       } else if (type[0] === 'i') {
         const bits = Number(type.substr(1));
-        assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type);
+        assert(
+          bits % 8 === 0,
+          'getNativeTypeSize invalid bits ' + bits + ', type ' + type,
+        );
         return bits / 8;
       } else {
         return 0;
@@ -378,24 +446,22 @@ function warnOnce(text) {
 
 // include: runtime_functions.js
 
-
 // Wraps a JS function as a wasm function with a given signature.
 function convertJsFunctionToWasm(func, sig) {
-
   // If the type reflection proposal is available, use the new
   // "WebAssembly.Function" constructor.
   // Otherwise, construct a minimal wasm module importing the JS function and
   // re-exporting it.
-  if (typeof WebAssembly.Function == "function") {
+  if (typeof WebAssembly.Function == 'function') {
     var typeNames = {
-      'i': 'i32',
-      'j': 'i64',
-      'f': 'f32',
-      'd': 'f64'
+      i: 'i32',
+      j: 'i64',
+      f: 'f32',
+      d: 'f64',
     };
     var type = {
       parameters: [],
-      results: sig[0] == 'v' ? [] : [typeNames[sig[0]]]
+      results: sig[0] == 'v' ? [] : [typeNames[sig[0]]],
     };
     for (var i = 1; i < sig.length; ++i) {
       type.parameters.push(typeNames[sig[i]]);
@@ -414,10 +480,10 @@ function convertJsFunctionToWasm(func, sig) {
   var sigRet = sig.slice(0, 1);
   var sigParam = sig.slice(1);
   var typeCodes = {
-    'i': 0x7f, // i32
-    'j': 0x7e, // i64
-    'f': 0x7d, // f32
-    'd': 0x7c, // f64
+    i: 0x7f, // i32
+    j: 0x7e, // i64
+    f: 0x7d, // f32
+    d: 0x7c, // f64
   };
 
   // Parameters, length + signatures
@@ -439,25 +505,45 @@ function convertJsFunctionToWasm(func, sig) {
   typeSection[1] = typeSection.length - 2;
 
   // Rest of the module is static
-  var bytes = new Uint8Array([
-    0x00, 0x61, 0x73, 0x6d, // magic ("\0asm")
-    0x01, 0x00, 0x00, 0x00, // version: 1
-  ].concat(typeSection, [
-    0x02, 0x07, // import section
+  var bytes = new Uint8Array(
+    [
+      0x00,
+      0x61,
+      0x73,
+      0x6d, // magic ("\0asm")
+      0x01,
+      0x00,
+      0x00,
+      0x00, // version: 1
+    ].concat(typeSection, [
+      0x02,
+      0x07, // import section
       // (import "e" "f" (func 0 (type 0)))
-      0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00,
-    0x07, 0x05, // export section
+      0x01,
+      0x01,
+      0x65,
+      0x01,
+      0x66,
+      0x00,
+      0x00,
+      0x07,
+      0x05, // export section
       // (export "f" (func 0 (type 0)))
-      0x01, 0x01, 0x66, 0x00, 0x00,
-  ]));
-
-   // We can compile this wasm module synchronously because it is very small.
+      0x01,
+      0x01,
+      0x66,
+      0x00,
+      0x00,
+    ]),
+  );
+
+  // We can compile this wasm module synchronously because it is very small.
   // This accepts an import (at "e.f"), that it reroutes to an export (at "f")
   var module = new WebAssembly.Module(bytes);
   var instance = new WebAssembly.Instance(module, {
-    'e': {
-      'f': func
-    }
+    e: {
+      f: func,
+    },
   });
   var wrappedFunc = instance.exports['f'];
   return wrappedFunc;
@@ -525,7 +611,10 @@ function addFunction(func, sig) {
     if (!(err instanceof TypeError)) {
       throw err;
     }
-    assert(typeof sig != 'undefined', 'Missing signature argument to addFunction: ' + func);
+    assert(
+      typeof sig != 'undefined',
+      'Missing signature argument to addFunction: ' + func,
+    );
     var wrapped = convertJsFunctionToWasm(func, sig);
     setWasmTableEntry(ret, wrapped);
   }
@@ -543,28 +632,43 @@ function removeFunction(index) {
 // end include: runtime_functions.js
 // include: runtime_debug.js
 
-
 function legacyModuleProp(prop, newName) {
   if (!Object.getOwnPropertyDescriptor(Module, prop)) {
     Object.defineProperty(Module, prop, {
       configurable: true,
-      get: function() {
-        abort('Module.' + prop + ' has been replaced with plain ' + newName + ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)');
-      }
+      get: function () {
+        abort(
+          'Module.' +
+            prop +
+            ' has been replaced with plain ' +
+            newName +
+            ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)',
+        );
+      },
     });
   }
 }
 
 function ignoredModuleProp(prop) {
   if (Object.getOwnPropertyDescriptor(Module, prop)) {
-    abort('`Module.' + prop + '` was supplied but `' + prop + '` not included in INCOMING_MODULE_JS_API');
+    abort(
+      '`Module.' +
+        prop +
+        '` was supplied but `' +
+        prop +
+        '` not included in INCOMING_MODULE_JS_API',
+    );
   }
 }
 
 function unexportedMessage(sym, isFSSybol) {
-  var msg = "'" + sym + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";
+  var msg =
+    "'" +
+    sym +
+    "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";
   if (isFSSybol) {
-    msg += '. Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you';
+    msg +=
+      '. Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you';
   }
   return msg;
 }
@@ -573,9 +677,9 @@ function unexportedRuntimeSymbol(sym, isFSSybol) {
   if (!Object.getOwnPropertyDescriptor(Module, sym)) {
     Object.defineProperty(Module, sym, {
       configurable: true,
-      get: function() {
+      get: function () {
         abort(unexportedMessage(sym, isFSSybol));
-      }
+      },
     });
   }
 }
@@ -588,11 +692,11 @@ function unexportedRuntimeFunction(sym, isFSSybol) {
 
 // end include: runtime_debug.js
 var tempRet0 = 0;
-var setTempRet0 = (value) => { tempRet0 = value; };
+var setTempRet0 = (value) => {
+  tempRet0 = value;
+};
 var getTempRet0 = () => tempRet0;
 
-
-
 // === Preamble library stuff ===
 
 // Documentation for the public APIs defined in this file must be updated in:
@@ -604,8 +708,10 @@ var getTempRet0 = () => tempRet0;
 //    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
 
 var wasmBinary;
-if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
-var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime');
+if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
+legacyModuleProp('wasmBinary', 'wasmBinary');
+var noExitRuntime = Module['noExitRuntime'] || true;
+legacyModuleProp('noExitRuntime', 'noExitRuntime');
 
 if (typeof WebAssembly != 'object') {
   abort('no native wasm support detected');
@@ -613,7 +719,6 @@ if (typeof WebAssembly != 'object') {
 
 // include: runtime_safe_heap.js
 
-
 // In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking.
 // In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties)
 
@@ -622,34 +727,71 @@ if (typeof WebAssembly != 'object') {
     @param {string} type
     @param {number|boolean=} noSafe */
 function setValue(ptr, value, type = 'i8', noSafe) {
-  if (type.charAt(type.length-1) === '*') type = 'i32';
-    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.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>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;
-      default: abort('invalid type for setValue: ' + type);
-    }
+  if (type.charAt(type.length - 1) === '*') type = 'i32';
+  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.0
+          ? tempDouble > 0.0
+            ? (Math.min(+Math.floor(tempDouble / 4294967296.0), 4294967295.0) |
+                0) >>>
+              0
+            : ~~+Math.ceil(
+                (tempDouble - +(~~tempDouble >>> 0)) / 4294967296.0,
+              ) >>> 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;
+    default:
+      abort('invalid type for setValue: ' + type);
+  }
 }
 
 /** @param {number} ptr
     @param {string} type
     @param {number|boolean=} noSafe */
 function getValue(ptr, type = 'i8', noSafe) {
-  if (type.charAt(type.length-1) === '*') type = 'i32';
-    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 HEAP32[((ptr)>>2)];
-      case 'float': return HEAPF32[((ptr)>>2)];
-      case 'double': return Number(HEAPF64[((ptr)>>3)]);
-      default: abort('invalid type for getValue: ' + type);
-    }
+  if (type.charAt(type.length - 1) === '*') type = 'i32';
+  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 HEAP32[ptr >> 2];
+    case 'float':
+      return HEAPF32[ptr >> 2];
+    case 'double':
+      return Number(HEAPF64[ptr >> 3]);
+    default:
+      abort('invalid type for getValue: ' + type);
+  }
   return null;
 }
 
@@ -681,7 +823,10 @@ function assert(condition, text) {
 // Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
 function getCFunc(ident) {
   var func = Module['_' + ident]; // closure exported function
-  assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported');
+  assert(
+    func,
+    'Cannot call unknown function ' + ident + ', make sure it is exported',
+  );
   return func;
 }
 
@@ -693,9 +838,10 @@ function getCFunc(ident) {
 function ccall(ident, returnType, argTypes, args, opts) {
   // For fast lookup of conversion functions
   var toC = {
-    'string': function(str) {
+    string: function (str) {
       var ret = 0;
-      if (str !== null && str !== undefined && str !== 0) { // null string
+      if (str !== null && str !== undefined && str !== 0) {
+        // null string
         // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0'
         var len = (str.length << 2) + 1;
         ret = stackAlloc(len);
@@ -703,11 +849,11 @@ function ccall(ident, returnType, argTypes, args, opts) {
       }
       return ret;
     },
-    'array': function(arr) {
+    array: function (arr) {
       var ret = stackAlloc(arr.length);
       writeArrayToMemory(arr, ret);
       return ret;
-    }
+    },
   };
 
   function convertReturnValue(ret) {
@@ -745,24 +891,27 @@ function ccall(ident, returnType, argTypes, args, opts) {
     @param {Array=} argTypes
     @param {Object=} opts */
 function cwrap(ident, returnType, argTypes, opts) {
-  return function() {
+  return function () {
     return ccall(ident, returnType, argTypes, arguments, opts);
-  }
+  };
 }
 
 // We used to include malloc/free by default in the past. Show a helpful error in
 // builds with assertions.
 function _malloc() {
-  abort("malloc() called but not included in the build - add '_malloc' to EXPORTED_FUNCTIONS");
+  abort(
+    "malloc() called but not included in the build - add '_malloc' to EXPORTED_FUNCTIONS",
+  );
 }
 function _free() {
   // Show a helpful error since we used to include free by default in the past.
-  abort("free() called but not included in the build - add '_free' to EXPORTED_FUNCTIONS");
+  abort(
+    "free() called but not included in the build - add '_free' to EXPORTED_FUNCTIONS",
+  );
 }
 
 // include: runtime_legacy.js
 
-
 var ALLOC_NORMAL = 0; // Tries to use _malloc()
 var ALLOC_STACK = 1; // Lives for the duration of the current function call
 
@@ -777,13 +926,18 @@ var ALLOC_STACK = 1; // Lives for the duration of the current function call
  */
 function allocate(slab, allocator) {
   var ret;
-  assert(typeof allocator == 'number', 'allocate no longer takes a type argument')
-  assert(typeof slab != 'number', 'allocate no longer takes a number as arg0')
+  assert(
+    typeof allocator == 'number',
+    'allocate no longer takes a type argument',
+  );
+  assert(typeof slab != 'number', 'allocate no longer takes a number as arg0');
 
   if (allocator == ALLOC_STACK) {
     ret = stackAlloc(slab.length);
   } else {
-    ret = abort('malloc was not included, but is needed in allocate. Adding "_malloc" to EXPORTED_FUNCTIONS should fix that. This may be a bug in the compiler, please file an issue.');;
+    ret = abort(
+      'malloc was not included, but is needed in allocate. Adding "_malloc" to EXPORTED_FUNCTIONS should fix that. This may be a bug in the compiler, please file an issue.',
+    );
   }
 
   if (!slab.subarray && !slab.slice) {
@@ -796,13 +950,13 @@ function allocate(slab, allocator) {
 // end include: runtime_legacy.js
 // include: runtime_strings.js
 
-
 // runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime.
 
 // Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns
 // a copy of that string as a Javascript String object.
 
-var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
+var UTF8Decoder =
+  typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
 
 /**
  * @param {number} idx
@@ -828,14 +982,25 @@ function UTF8ArrayToString(heap, idx, maxBytesToRead) {
       // https://www.ietf.org/rfc/rfc2279.txt
       // https://tools.ietf.org/html/rfc3629
       var u0 = heap[idx++];
-      if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
+      if (!(u0 & 0x80)) {
+        str += String.fromCharCode(u0);
+        continue;
+      }
       var u1 = heap[idx++] & 63;
-      if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
+      if ((u0 & 0xe0) == 0xc0) {
+        str += String.fromCharCode(((u0 & 31) << 6) | u1);
+        continue;
+      }
       var u2 = heap[idx++] & 63;
-      if ((u0 & 0xF0) == 0xE0) {
+      if ((u0 & 0xf0) == 0xe0) {
         u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
       } else {
-        if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!');
+        if ((u0 & 0xf8) != 0xf0)
+          warnOnce(
+            'Invalid UTF-8 leading byte 0x' +
+              u0.toString(16) +
+              ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!',
+          );
         u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63);
       }
 
@@ -843,7 +1008,7 @@ function UTF8ArrayToString(heap, idx, maxBytesToRead) {
         str += String.fromCharCode(u0);
       } else {
         var ch = u0 - 0x10000;
-        str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
+        str += String.fromCharCode(0xd800 | (ch >> 10), 0xdc00 | (ch & 0x3ff));
       }
     }
   }
@@ -866,7 +1031,6 @@ function UTF8ArrayToString(heap, idx, maxBytesToRead) {
  * @return {string}
  */
 function UTF8ToString(ptr, maxBytesToRead) {
-  ;
   return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
 }
 
@@ -884,7 +1048,8 @@ function UTF8ToString(ptr, maxBytesToRead) {
 // Returns the number of bytes written, EXCLUDING the null terminator.
 
 function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
-  if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
+  if (!(maxBytesToWrite > 0))
+    // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
     return 0;
 
   var startIdx = outIdx;
@@ -894,26 +1059,31 @@ function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
     // See http://unicode.org/faq/utf_bom.html#utf16-3
     // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629
     var u = str.charCodeAt(i); // possibly a lead surrogate
-    if (u >= 0xD800 && u <= 0xDFFF) {
+    if (u >= 0xd800 && u <= 0xdfff) {
       var u1 = str.charCodeAt(++i);
-      u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
+      u = (0x10000 + ((u & 0x3ff) << 10)) | (u1 & 0x3ff);
     }
-    if (u <= 0x7F) {
+    if (u <= 0x7f) {
       if (outIdx >= endIdx) break;
       heap[outIdx++] = u;
-    } else if (u <= 0x7FF) {
+    } else if (u <= 0x7ff) {
       if (outIdx + 1 >= endIdx) break;
-      heap[outIdx++] = 0xC0 | (u >> 6);
+      heap[outIdx++] = 0xc0 | (u >> 6);
       heap[outIdx++] = 0x80 | (u & 63);
-    } else if (u <= 0xFFFF) {
+    } else if (u <= 0xffff) {
       if (outIdx + 2 >= endIdx) break;
-      heap[outIdx++] = 0xE0 | (u >> 12);
+      heap[outIdx++] = 0xe0 | (u >> 12);
       heap[outIdx++] = 0x80 | ((u >> 6) & 63);
       heap[outIdx++] = 0x80 | (u & 63);
     } else {
       if (outIdx + 3 >= endIdx) break;
-      if (u > 0x10FFFF) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).');
-      heap[outIdx++] = 0xF0 | (u >> 18);
+      if (u > 0x10ffff)
+        warnOnce(
+          'Invalid Unicode code point 0x' +
+            u.toString(16) +
+            ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).',
+        );
+      heap[outIdx++] = 0xf0 | (u >> 18);
       heap[outIdx++] = 0x80 | ((u >> 12) & 63);
       heap[outIdx++] = 0x80 | ((u >> 6) & 63);
       heap[outIdx++] = 0x80 | (u & 63);
@@ -930,8 +1100,11 @@ function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
 // Returns the number of bytes written, EXCLUDING the null terminator.
 
 function stringToUTF8(str, outPtr, maxBytesToWrite) {
-  assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
-  return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite);
+  assert(
+    typeof maxBytesToWrite == 'number',
+    'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!',
+  );
+  return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
 }
 
 // Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte.
@@ -941,10 +1114,11 @@ function lengthBytesUTF8(str) {
     // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
     // See http://unicode.org/faq/utf_bom.html#utf16-3
     var u = str.charCodeAt(i); // possibly a lead surrogate
-    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF);
-    if (u <= 0x7F) ++len;
-    else if (u <= 0x7FF) len += 2;
-    else if (u <= 0xFFFF) len += 3;
+    if (u >= 0xd800 && u <= 0xdfff)
+      u = (0x10000 + ((u & 0x3ff) << 10)) | (str.charCodeAt(++i) & 0x3ff);
+    if (u <= 0x7f) ++len;
+    else if (u <= 0x7ff) len += 2;
+    else if (u <= 0xffff) len += 3;
     else len += 4;
   }
   return len;
@@ -953,7 +1127,6 @@ function lengthBytesUTF8(str) {
 // end include: runtime_strings.js
 // include: runtime_strings_extra.js
 
-
 // runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime.
 
 // Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns
@@ -962,7 +1135,7 @@ function lengthBytesUTF8(str) {
 function AsciiToString(ptr) {
   var str = '';
   while (1) {
-    var ch = HEAPU8[((ptr++)>>0)];
+    var ch = HEAPU8[ptr++ >> 0];
     if (!ch) return str;
     str += String.fromCharCode(ch);
   }
@@ -978,10 +1151,14 @@ function stringToAscii(str, outPtr) {
 // Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns
 // a copy of that string as a Javascript String object.
 
-var UTF16Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf-16le') : undefined;
+var UTF16Decoder =
+  typeof TextDecoder != 'undefined' ? new TextDecoder('utf-16le') : undefined;
 
 function UTF16ToString(ptr, maxBytesToRead) {
-  assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!');
+  assert(
+    ptr % 2 == 0,
+    'Pointer passed to UTF16ToString must be aligned to two bytes!',
+  );
   var endPtr = ptr;
   // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.
   // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.
@@ -1000,7 +1177,7 @@ function UTF16ToString(ptr, maxBytesToRead) {
     // If maxBytesToRead is not passed explicitly, it will be undefined, and the for-loop's condition
     // will always evaluate to true. The loop is then terminated on the first null char.
     for (var i = 0; !(i >= maxBytesToRead / 2); ++i) {
-      var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];
+      var codeUnit = HEAP16[(ptr + i * 2) >> 1];
       if (codeUnit == 0) break;
       // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.
       str += String.fromCharCode(codeUnit);
@@ -1022,49 +1199,59 @@ function UTF16ToString(ptr, maxBytesToRead) {
 // Returns the number of bytes written, EXCLUDING the null terminator.
 
 function stringToUTF16(str, outPtr, maxBytesToWrite) {
-  assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!');
-  assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
+  assert(
+    outPtr % 2 == 0,
+    'Pointer passed to stringToUTF16 must be aligned to two bytes!',
+  );
+  assert(
+    typeof maxBytesToWrite == 'number',
+    'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!',
+  );
   // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
   if (maxBytesToWrite === undefined) {
-    maxBytesToWrite = 0x7FFFFFFF;
+    maxBytesToWrite = 0x7fffffff;
   }
   if (maxBytesToWrite < 2) return 0;
   maxBytesToWrite -= 2; // Null terminator.
   var startPtr = outPtr;
-  var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length;
+  var numCharsToWrite =
+    maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
   for (var i = 0; i < numCharsToWrite; ++i) {
     // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.
     var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
-    HEAP16[((outPtr)>>1)] = codeUnit;
+    HEAP16[outPtr >> 1] = codeUnit;
     outPtr += 2;
   }
   // Null-terminate the pointer to the HEAP.
-  HEAP16[((outPtr)>>1)] = 0;
+  HEAP16[outPtr >> 1] = 0;
   return outPtr - startPtr;
 }
 
 // Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.
 
 function lengthBytesUTF16(str) {
-  return str.length*2;
+  return str.length * 2;
 }
 
 function UTF32ToString(ptr, maxBytesToRead) {
-  assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!');
+  assert(
+    ptr % 4 == 0,
+    'Pointer passed to UTF32ToString must be aligned to four bytes!',
+  );
   var i = 0;
 
   var str = '';
   // If maxBytesToRead is not passed explicitly, it will be undefined, and this
   // will always evaluate to true. This saves on code size.
   while (!(i >= maxBytesToRead / 4)) {
-    var utf32 = HEAP32[(((ptr)+(i*4))>>2)];
+    var utf32 = HEAP32[(ptr + i * 4) >> 2];
     if (utf32 == 0) break;
     ++i;
     // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
     // See http://unicode.org/faq/utf_bom.html#utf16-3
     if (utf32 >= 0x10000) {
       var ch = utf32 - 0x10000;
-      str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
+      str += String.fromCharCode(0xd800 | (ch >> 10), 0xdc00 | (ch & 0x3ff));
     } else {
       str += String.fromCharCode(utf32);
     }
@@ -1084,11 +1271,17 @@ function UTF32ToString(ptr, maxBytesToRead) {
 // Returns the number of bytes written, EXCLUDING the null terminator.
 
 function stringToUTF32(str, outPtr, maxBytesToWrite) {
-  assert(outPtr % 4 == 0, 'Pointer passed to stringToUTF32 must be aligned to four bytes!');
-  assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
+  assert(
+    outPtr % 4 == 0,
+    'Pointer passed to stringToUTF32 must be aligned to four bytes!',
+  );
+  assert(
+    typeof maxBytesToWrite == 'number',
+    'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!',
+  );
   // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
   if (maxBytesToWrite === undefined) {
-    maxBytesToWrite = 0x7FFFFFFF;
+    maxBytesToWrite = 0x7fffffff;
   }
   if (maxBytesToWrite < 4) return 0;
   var startPtr = outPtr;
@@ -1097,16 +1290,17 @@ function stringToUTF32(str, outPtr, maxBytesToWrite) {
     // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
     // See http://unicode.org/faq/utf_bom.html#utf16-3
     var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
-    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {
+    if (codeUnit >= 0xd800 && codeUnit <= 0xdfff) {
       var trailSurrogate = str.charCodeAt(++i);
-      codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);
+      codeUnit =
+        (0x10000 + ((codeUnit & 0x3ff) << 10)) | (trailSurrogate & 0x3ff);
     }
-    HEAP32[((outPtr)>>2)] = codeUnit;
+    HEAP32[outPtr >> 2] = codeUnit;
     outPtr += 4;
     if (outPtr + 4 > endPtr) break;
   }
   // Null-terminate the pointer to the HEAP.
-  HEAP32[((outPtr)>>2)] = 0;
+  HEAP32[outPtr >> 2] = 0;
   return outPtr - startPtr;
 }
 
@@ -1118,7 +1312,7 @@ function lengthBytesUTF32(str) {
     // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
     // See http://unicode.org/faq/utf_bom.html#utf16-3
     var codeUnit = str.charCodeAt(i);
-    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate.
+    if (codeUnit >= 0xd800 && codeUnit <= 0xdfff) ++i; // possibly a lead surrogate, so skip over the tail surrogate.
     len += 4;
   }
 
@@ -1129,7 +1323,9 @@ function lengthBytesUTF32(str) {
 // It is the responsibility of the caller to free() that memory.
 function allocateUTF8(str) {
   var size = lengthBytesUTF8(str) + 1;
-  var ret = abort('malloc was not included, but is needed in allocateUTF8. Adding "_malloc" to EXPORTED_FUNCTIONS should fix that. This may be a bug in the compiler, please file an issue.');;
+  var ret = abort(
+    'malloc was not included, but is needed in allocateUTF8. Adding "_malloc" to EXPORTED_FUNCTIONS should fix that. This may be a bug in the compiler, please file an issue.',
+  );
   if (ret) stringToUTF8Array(str, HEAP8, ret, size);
   return ret;
 }
@@ -1149,7 +1345,9 @@ function allocateUTF8OnStack(str) {
 /** @deprecated
     @param {boolean=} dontAddNull */
 function writeStringToMemory(string, buffer, dontAddNull) {
-  warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!');
+  warnOnce(
+    'writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!',
+  );
 
   var /** @type {number} */ lastChar, /** @type {number} */ end;
   if (dontAddNull) {
@@ -1164,7 +1362,10 @@ function writeStringToMemory(string, buffer, dontAddNull) {
 }
 
 function writeArrayToMemory(array, buffer) {
-  assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)')
+  assert(
+    array.length >= 0,
+    'writeArrayToMemory array must have a length (should be an array or typed array)',
+  );
   HEAP8.set(array, buffer);
 }
 
@@ -1172,33 +1373,33 @@ function writeArrayToMemory(array, buffer) {
 function writeAsciiToMemory(str, buffer, dontAddNull) {
   for (var i = 0; i < str.length; ++i) {
     assert(str.charCodeAt(i) === (str.charCodeAt(i) & 0xff));
-    HEAP8[((buffer++)>>0)] = str.charCodeAt(i);
+    HEAP8[buffer++ >> 0] = str.charCodeAt(i);
   }
   // Null-terminate the pointer to the HEAP.
-  if (!dontAddNull) HEAP8[((buffer)>>0)] = 0;
+  if (!dontAddNull) HEAP8[buffer >> 0] = 0;
 }
 
 // end include: runtime_strings_extra.js
 // Memory management
 
 var HEAP,
-/** @type {!ArrayBuffer} */
+  /** @type {!ArrayBuffer} */
   buffer,
-/** @type {!Int8Array} */
+  /** @type {!Int8Array} */
   HEAP8,
-/** @type {!Uint8Array} */
+  /** @type {!Uint8Array} */
   HEAPU8,
-/** @type {!Int16Array} */
+  /** @type {!Int16Array} */
   HEAP16,
-/** @type {!Uint16Array} */
+  /** @type {!Uint16Array} */
   HEAPU16,
-/** @type {!Int32Array} */
+  /** @type {!Int32Array} */
   HEAP32,
-/** @type {!Uint32Array} */
+  /** @type {!Uint32Array} */
   HEAPU32,
-/** @type {!Float32Array} */
+  /** @type {!Float32Array} */
   HEAPF32,
-/** @type {!Float64Array} */
+  /** @type {!Float64Array} */
   HEAPF64;
 
 function updateGlobalBufferAndViews(buf) {
@@ -1214,19 +1415,42 @@ function updateGlobalBufferAndViews(buf) {
 }
 
 var TOTAL_STACK = 5242880;
-if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime')
-
-var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;legacyModuleProp('INITIAL_MEMORY', 'INITIAL_MEMORY');
-
-assert(INITIAL_MEMORY >= TOTAL_STACK, 'INITIAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')');
+if (Module['TOTAL_STACK'])
+  assert(
+    TOTAL_STACK === Module['TOTAL_STACK'],
+    'the stack size can no longer be determined at runtime',
+  );
+
+var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;
+legacyModuleProp('INITIAL_MEMORY', 'INITIAL_MEMORY');
+
+assert(
+  INITIAL_MEMORY >= TOTAL_STACK,
+  'INITIAL_MEMORY should be larger than TOTAL_STACK, was ' +
+    INITIAL_MEMORY +
+    '! (TOTAL_STACK=' +
+    TOTAL_STACK +
+    ')',
+);
 
 // check for full engine support (use string 'subarray' to avoid closure compiler confusion)
-assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined,
-       'JS engine does not provide full typed array support');
+assert(
+  typeof Int32Array != 'undefined' &&
+    typeof Float64Array !== 'undefined' &&
+    Int32Array.prototype.subarray != undefined &&
+    Int32Array.prototype.set != undefined,
+  'JS engine does not provide full typed array support',
+);
 
 // If memory is defined in wasm, the user can't provide it.
-assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally');
-assert(INITIAL_MEMORY == 16777216, 'Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically');
+assert(
+  !Module['wasmMemory'],
+  'Use of `wasmMemory` detected.  Use -s IMPORTED_MEMORY to define wasmMemory externally',
+);
+assert(
+  INITIAL_MEMORY == 16777216,
+  'Detected runtime INITIAL_MEMORY setting.  Use -s IMPORTED_MEMORY to define wasmMemory dynamically',
+);
 
 // include: runtime_init_table.js
 // In regular non-RELOCATABLE mode the table is exported
@@ -1237,14 +1461,13 @@ var wasmTable;
 // end include: runtime_init_table.js
 // include: runtime_stack_check.js
 
-
 // Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.
 function writeStackCookie() {
   var max = _emscripten_stack_get_end();
   assert((max & 3) == 0);
   // The stack grows downwards
-  HEAP32[((max + 4)>>2)] = 0x2135467;
-  HEAP32[((max + 8)>>2)] = 0x89BACDFE;
+  HEAP32[(max + 4) >> 2] = 0x2135467;
+  HEAP32[(max + 8) >> 2] = 0x89bacdfe;
   // Also test the global address 0 for integrity.
   HEAP32[0] = 0x63736d65; /* 'emsc' */
 }
@@ -1252,31 +1475,39 @@ function writeStackCookie() {
 function checkStackCookie() {
   if (ABORT) return;
   var max = _emscripten_stack_get_end();
-  var cookie1 = HEAPU32[((max + 4)>>2)];
-  var cookie2 = HEAPU32[((max + 8)>>2)];
-  if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) {
-    abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x' + cookie2.toString(16) + ' 0x' + cookie1.toString(16));
+  var cookie1 = HEAPU32[(max + 4) >> 2];
+  var cookie2 = HEAPU32[(max + 8) >> 2];
+  if (cookie1 != 0x2135467 || cookie2 != 0x89bacdfe) {
+    abort(
+      'Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x' +
+        cookie2.toString(16) +
+        ' 0x' +
+        cookie1.toString(16),
+    );
   }
   // Also test the global address 0 for integrity.
-  if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!');
+  if (HEAP32[0] !== 0x63736d65 /* 'emsc' */)
+    abort(
+      'Runtime error: The application has corrupted its heap memory area (address zero)!',
+    );
 }
 
 // end include: runtime_stack_check.js
 // include: runtime_assertions.js
 
-
 // Endianness check
-(function() {
+(function () {
   var h16 = new Int16Array(1);
   var h8 = new Int8Array(h16.buffer);
   h16[0] = 0x6373;
-  if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)';
+  if (h8[0] !== 0x73 || h8[1] !== 0x63)
+    throw 'Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)';
 })();
 
 // end include: runtime_assertions.js
-var __ATPRERUN__  = []; // functions called before the runtime is initialized
-var __ATINIT__    = []; // functions called during startup
-var __ATEXIT__    = []; // functions called during shutdown
+var __ATPRERUN__ = []; // functions called before the runtime is initialized
+var __ATINIT__ = []; // functions called during startup
+var __ATEXIT__ = []; // functions called during shutdown
 var __ATPOSTRUN__ = []; // functions called after the main() is called
 
 var runtimeInitialized = false;
@@ -1288,9 +1519,9 @@ function keepRuntimeAlive() {
 }
 
 function preRun() {
-
   if (Module['preRun']) {
-    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
+    if (typeof Module['preRun'] == 'function')
+      Module['preRun'] = [Module['preRun']];
     while (Module['preRun'].length) {
       addOnPreRun(Module['preRun'].shift());
     }
@@ -1304,7 +1535,6 @@ function initRuntime() {
   assert(!runtimeInitialized);
   runtimeInitialized = true;
 
-
   callRuntimeCallbacks(__ATINIT__);
 }
 
@@ -1317,7 +1547,8 @@ function postRun() {
   checkStackCookie();
 
   if (Module['postRun']) {
-    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
+    if (typeof Module['postRun'] == 'function')
+      Module['postRun'] = [Module['postRun']];
     while (Module['postRun'].length) {
       addOnPostRun(Module['postRun'].shift());
     }
@@ -1334,8 +1565,7 @@ function addOnInit(cb) {
   __ATINIT__.unshift(cb);
 }
 
-function addOnExit(cb) {
-}
+function addOnExit(cb) {}
 
 function addOnPostRun(cb) {
   __ATPOSTRUN__.unshift(cb);
@@ -1343,7 +1573,6 @@ function addOnPostRun(cb) {
 
 // include: runtime_math.js
 
-
 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
 
 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround
@@ -1352,10 +1581,22 @@ function addOnPostRun(cb) {
 
 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
 
-assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
+assert(
+  Math.imul,
+  'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+  Math.fround,
+  'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+  Math.clz32,
+  'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+  Math.trunc,
+  'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
 
 // end include: runtime_math.js
 // A counter of dependencies for calling run(). If we need to
@@ -1390,7 +1631,7 @@ function addRunDependency(id) {
     runDependencyTracking[id] = 1;
     if (runDependencyWatcher === null && typeof setInterval != 'undefined') {
       // Check for missing dependencies every few seconds
-      runDependencyWatcher = setInterval(function() {
+      runDependencyWatcher = setInterval(function () {
         if (ABORT) {
           clearInterval(runDependencyWatcher);
           runDependencyWatcher = null;
@@ -1440,8 +1681,8 @@ function removeRunDependency(id) {
   }
 }
 
-Module["preloadedImages"] = {}; // maps url to image data
-Module["preloadedAudios"] = {}; // maps url to audio data
+Module['preloadedImages'] = {}; // maps url to image data
+Module['preloadedAudios'] = {}; // maps url to audio data
 
 /** @param {string|number=} what */
 function abort(what) {
@@ -1481,31 +1722,51 @@ function abort(what) {
 
 // include: memoryprofiler.js
 
-
 // end include: memoryprofiler.js
 // show errors on likely calls to FS when it was not included
 var FS = {
-  error: function() {
-    abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with  -s FORCE_FILESYSTEM=1');
+  error: function () {
+    abort(
+      'Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with  -s FORCE_FILESYSTEM=1',
+    );
+  },
+  init: function () {
+    FS.error();
+  },
+  createDataFile: function () {
+    FS.error();
+  },
+  createPreloadedFile: function () {
+    FS.error();
+  },
+  createLazyFile: function () {
+    FS.error();
+  },
+  open: function () {
+    FS.error();
+  },
+  mkdev: function () {
+    FS.error();
+  },
+  registerDevice: function () {
+    FS.error();
+  },
+  analyzePath: function () {
+    FS.error();
+  },
+  loadFilesFromDB: function () {
+    FS.error();
+  },
+
+  ErrnoError: function ErrnoError() {
+    FS.error();
   },
-  init: function() { FS.error() },
-  createDataFile: function() { FS.error() },
-  createPreloadedFile: function() { FS.error() },
-  createLazyFile: function() { FS.error() },
-  open: function() { FS.error() },
-  mkdev: function() { FS.error() },
-  registerDevice: function() { FS.error() },
-  analyzePath: function() { FS.error() },
-  loadFilesFromDB: function() { FS.error() },
-
-  ErrnoError: function ErrnoError() { FS.error() },
 };
 Module['FS_createDataFile'] = FS.createDataFile;
 Module['FS_createPreloadedFile'] = FS.createPreloadedFile;
 
 // include: URIUtils.js
 
-
 // Prefix of data URIs emitted by SINGLE_FILE and related options.
 var dataURIPrefix = 'data:application/octet-stream;base64,';
 
@@ -1523,26 +1784,39 @@ function isFileURI(filename) {
 // end include: URIUtils.js
 /** @param {boolean=} fixedasm */
 function createExportWrapper(name, fixedasm) {
-  return function() {
+  return function () {
     var displayName = name;
     var asm = fixedasm;
     if (!fixedasm) {
       asm = Module['asm'];
     }
-    assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization');
-    assert(!runtimeExited, 'native function `' + displayName + '` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+    assert(
+      runtimeInitialized,
+      'native function `' +
+        displayName +
+        '` called before runtime initialization',
+    );
+    assert(
+      !runtimeExited,
+      'native function `' +
+        displayName +
+        '` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)',
+    );
     if (!asm[name]) {
-      assert(asm[name], 'exported native function `' + displayName + '` not found');
+      assert(
+        asm[name],
+        'exported native function `' + displayName + '` not found',
+      );
     }
     return asm[name].apply(null, arguments);
   };
 }
 
 var wasmBinaryFile;
-  wasmBinaryFile = 'test.wasm';
-  if (!isDataURI(wasmBinaryFile)) {
-    wasmBinaryFile = locateFile(wasmBinaryFile);
-  }
+wasmBinaryFile = 'test.wasm';
+if (!isDataURI(wasmBinaryFile)) {
+  wasmBinaryFile = locateFile(wasmBinaryFile);
+}
 
 function getBinary(file) {
   try {
@@ -1552,10 +1826,9 @@ function getBinary(file) {
     if (readBinary) {
       return readBinary(file);
     } else {
-      throw "both async and sync fetching of the wasm failed";
+      throw 'both async and sync fetching of the wasm failed';
     }
-  }
-  catch (err) {
+  } catch (err) {
     abort(err);
   }
 }
@@ -1567,30 +1840,37 @@ function getBinaryPromise() {
   // Cordova or Electron apps are typically loaded from a file:// url.
   // So use fetch if it is available and the url is not a file, otherwise fall back to XHR.
   if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
-    if (typeof fetch == 'function'
-      && !isFileURI(wasmBinaryFile)
-    ) {
-      return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) {
-        if (!response['ok']) {
-          throw "failed to load wasm binary file at '" + wasmBinaryFile + "'";
-        }
-        return response['arrayBuffer']();
-      }).catch(function () {
+    if (typeof fetch == 'function' && !isFileURI(wasmBinaryFile)) {
+      return fetch(wasmBinaryFile, {credentials: 'same-origin'})
+        .then(function (response) {
+          if (!response['ok']) {
+            throw "failed to load wasm binary file at '" + wasmBinaryFile + "'";
+          }
+          return response['arrayBuffer']();
+        })
+        .catch(function () {
           return getBinary(wasmBinaryFile);
-      });
-    }
-    else {
+        });
+    } else {
       if (readAsync) {
         // fetch is not available or url is file => try XHR (readAsync uses XHR internally)
-        return new Promise(function(resolve, reject) {
-          readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))) }, reject)
+        return new Promise(function (resolve, reject) {
+          readAsync(
+            wasmBinaryFile,
+            function (response) {
+              resolve(new Uint8Array(/** @type{!ArrayBuffer} */ (response)));
+            },
+            reject,
+          );
         });
       }
     }
   }
 
   // Otherwise, getBinary should be able to get it synchronously
-  return Promise.resolve().then(function() { return getBinary(wasmBinaryFile); });
+  return Promise.resolve().then(function () {
+    return getBinary(wasmBinaryFile);
+  });
 }
 
 // Create the wasm instance.
@@ -1598,8 +1878,8 @@ function getBinaryPromise() {
 function createWasm() {
   // prepare imports
   var info = {
-    'env': asmLibraryArg,
-    'wasi_snapshot_preview1': asmLibraryArg,
+    env: asmLibraryArg,
+    wasi_snapshot_preview1: asmLibraryArg,
   };
   // Load the wasm module and create an instance of using native support in the JS engine.
   // handle a generated wasm instance, receiving its exports and
@@ -1611,7 +1891,7 @@ function createWasm() {
     Module['asm'] = exports;
 
     wasmMemory = Module['asm']['memory'];
-    assert(wasmMemory, "memory not found in wasm exports");
+    assert(wasmMemory, 'memory not found in wasm exports');
     // This assertion doesn't hold when emscripten is run in --post-link
     // mode.
     // TODO(sbc): Read INITIAL_MEMORY out of the wasm file in post-link mode.
@@ -1619,7 +1899,7 @@ function createWasm() {
     updateGlobalBufferAndViews(wasmMemory.buffer);
 
     wasmTable = Module['asm']['__indirect_function_table'];
-    assert(wasmTable, "table not found in wasm exports");
+    assert(wasmTable, 'table not found in wasm exports');
 
     addOnInit(Module['asm']['__wasm_call_ctors']);
 
@@ -1636,7 +1916,10 @@ function createWasm() {
   function receiveInstantiationResult(result) {
     // 'result' is a ResultObject object which has both the module and instance.
     // receiveInstance() will swap in the exports (to Module.asm) so they can be called
-    assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?');
+    assert(
+      Module === trueModule,
+      'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?',
+    );
     trueModule = null;
     // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
     // When the regression is fixed, can restore the above USE_PTHREADS-enabled path.
@@ -1644,46 +1927,55 @@ function createWasm() {
   }
 
   function instantiateArrayBuffer(receiver) {
-    return getBinaryPromise().then(function(binary) {
-      return WebAssembly.instantiate(binary, info);
-    }).then(function (instance) {
-      return instance;
-    }).then(receiver, function(reason) {
-      err('failed to asynchronously prepare wasm: ' + reason);
-
-      // Warn on some common problems.
-      if (isFileURI(wasmBinaryFile)) {
-        err('warning: Loading from a file URI (' + wasmBinaryFile + ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing');
-      }
-      abort(reason);
-    });
+    return getBinaryPromise()
+      .then(function (binary) {
+        return WebAssembly.instantiate(binary, info);
+      })
+      .then(function (instance) {
+        return instance;
+      })
+      .then(receiver, function (reason) {
+        err('failed to asynchronously prepare wasm: ' + reason);
+
+        // Warn on some common problems.
+        if (isFileURI(wasmBinaryFile)) {
+          err(
+            'warning: Loading from a file URI (' +
+              wasmBinaryFile +
+              ') is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing',
+          );
+        }
+        abort(reason);
+      });
   }
 
   function instantiateAsync() {
-    if (!wasmBinary &&
-        typeof WebAssembly.instantiateStreaming == 'function' &&
-        !isDataURI(wasmBinaryFile) &&
-        // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
-        !isFileURI(wasmBinaryFile) &&
-        typeof fetch == 'function') {
-      return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) {
-        // Suppress closure warning here since the upstream definition for
-        // instantiateStreaming only allows Promise rather than
-        // an actual Response.
-        // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed.
-        /** @suppress {checkTypes} */
-        var result = WebAssembly.instantiateStreaming(response, info);
-
-        return result.then(
-          receiveInstantiationResult,
-          function(reason) {
+    if (
+      !wasmBinary &&
+      typeof WebAssembly.instantiateStreaming == 'function' &&
+      !isDataURI(wasmBinaryFile) &&
+      // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
+      !isFileURI(wasmBinaryFile) &&
+      typeof fetch == 'function'
+    ) {
+      return fetch(wasmBinaryFile, {credentials: 'same-origin'}).then(
+        function (response) {
+          // Suppress closure warning here since the upstream definition for
+          // instantiateStreaming only allows Promise rather than
+          // an actual Response.
+          // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed.
+          /** @suppress {checkTypes} */
+          var result = WebAssembly.instantiateStreaming(response, info);
+
+          return result.then(receiveInstantiationResult, function (reason) {
             // We expect the most common failure cause to be a bad MIME type for the binary,
             // in which case falling back to ArrayBuffer instantiation should work.
             err('wasm streaming compile failed: ' + reason);
             err('falling back to ArrayBuffer instantiation');
             return instantiateArrayBuffer(receiveInstantiationResult);
           });
-      });
+        },
+      );
     } else {
       return instantiateArrayBuffer(receiveInstantiationResult);
     }
@@ -1696,7 +1988,7 @@ function createWasm() {
     try {
       var exports = Module['instantiateWasm'](info, receiveInstance);
       return exports;
-    } catch(e) {
+    } catch (e) {
       err('Module.instantiateWasm callback failed with error: ' + e);
       return false;
     }
@@ -1712,164 +2004,164 @@ var tempI64;
 
 // === Body ===
 
-var ASM_CONSTS = {
-
-};
-
-
-
+var ASM_CONSTS = {};
 
-
-
-  function callRuntimeCallbacks(callbacks) {
-      while (callbacks.length > 0) {
-        var callback = callbacks.shift();
-        if (typeof callback == 'function') {
-          callback(Module); // Pass the module as the first argument.
-          continue;
-        }
-        var func = callback.func;
-        if (typeof func == 'number') {
-          if (callback.arg === undefined) {
-            getWasmTableEntry(func)();
-          } else {
-            getWasmTableEntry(func)(callback.arg);
-          }
-        } else {
-          func(callback.arg === undefined ? null : callback.arg);
-        }
+function callRuntimeCallbacks(callbacks) {
+  while (callbacks.length > 0) {
+    var callback = callbacks.shift();
+    if (typeof callback == 'function') {
+      callback(Module); // Pass the module as the first argument.
+      continue;
+    }
+    var func = callback.func;
+    if (typeof func == 'number') {
+      if (callback.arg === undefined) {
+        getWasmTableEntry(func)();
+      } else {
+        getWasmTableEntry(func)(callback.arg);
       }
+    } else {
+      func(callback.arg === undefined ? null : callback.arg);
     }
+  }
+}
 
-  function withStackSave(f) {
-      var stack = stackSave();
-      var ret = f();
-      stackRestore(stack);
-      return ret;
-    }
-  function demangle(func) {
-      warnOnce('warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling');
-      return func;
-    }
+function withStackSave(f) {
+  var stack = stackSave();
+  var ret = f();
+  stackRestore(stack);
+  return ret;
+}
+function demangle(func) {
+  warnOnce(
+    'warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling',
+  );
+  return func;
+}
 
-  function demangleAll(text) {
-      var regex =
-        /\b_Z[\w\d_]+/g;
-      return text.replace(regex,
-        function(x) {
-          var y = demangle(x);
-          return x === y ? x : (y + ' [' + x + ']');
-        });
-    }
+function demangleAll(text) {
+  var regex = /\b_Z[\w\d_]+/g;
+  return text.replace(regex, function (x) {
+    var y = demangle(x);
+    return x === y ? x : y + ' [' + x + ']';
+  });
+}
 
-  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);
-      }
-      assert(wasmTable.get(funcPtr) == func, "JavaScript-side Wasm function table mirror is out of date!");
-      return func;
-    }
+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);
+  }
+  assert(
+    wasmTable.get(funcPtr) == func,
+    'JavaScript-side Wasm function table mirror is out of date!',
+  );
+  return func;
+}
 
-  function handleException(e) {
-      // Certain exception types we do not treat as errors since they are used for
-      // internal control flow.
-      // 1. ExitStatus, which is thrown by exit()
-      // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others
-      //    that wish to return to JS event loop.
-      if (e instanceof ExitStatus || e == 'unwind') {
-        return EXITSTATUS;
-      }
-      quit_(1, e);
-    }
+function handleException(e) {
+  // Certain exception types we do not treat as errors since they are used for
+  // internal control flow.
+  // 1. ExitStatus, which is thrown by exit()
+  // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others
+  //    that wish to return to JS event loop.
+  if (e instanceof ExitStatus || e == 'unwind') {
+    return EXITSTATUS;
+  }
+  quit_(1, e);
+}
 
-  function jsStackTrace() {
-      var error = new Error();
-      if (!error.stack) {
-        // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
-        // so try that as a special-case.
-        try {
-          throw new Error();
-        } catch(e) {
-          error = e;
-        }
-        if (!error.stack) {
-          return '(no stack trace available)';
-        }
-      }
-      return error.stack.toString();
+function jsStackTrace() {
+  var error = new Error();
+  if (!error.stack) {
+    // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
+    // so try that as a special-case.
+    try {
+      throw new Error();
+    } catch (e) {
+      error = e;
     }
-
-  function setWasmTableEntry(idx, func) {
-      wasmTable.set(idx, func);
-      wasmTableMirror[idx] = func;
+    if (!error.stack) {
+      return '(no stack trace available)';
     }
+  }
+  return error.stack.toString();
+}
 
-  function stackTrace() {
-      var js = jsStackTrace();
-      if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace']();
-      return demangleAll(js);
-    }
+function setWasmTableEntry(idx, func) {
+  wasmTable.set(idx, func);
+  wasmTableMirror[idx] = func;
+}
 
-  function flush_NO_FILESYSTEM() {
-      // flush anything remaining in the buffers during shutdown
-      ___stdio_exit();
-      var buffers = SYSCALLS.buffers;
-      if (buffers[1].length) SYSCALLS.printChar(1, 10);
-      if (buffers[2].length) SYSCALLS.printChar(2, 10);
-    }
+function stackTrace() {
+  var js = jsStackTrace();
+  if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace']();
+  return demangleAll(js);
+}
 
-  var SYSCALLS = {buffers:[null,[],[]],printChar:function(stream, curr) {
-        var buffer = SYSCALLS.buffers[stream];
-        assert(buffer);
-        if (curr === 0 || curr === 10) {
-          (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0));
-          buffer.length = 0;
-        } else {
-          buffer.push(curr);
-        }
-      },varargs:undefined,get:function() {
-        assert(SYSCALLS.varargs != undefined);
-        SYSCALLS.varargs += 4;
-        var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)];
-        return ret;
-      },getStr:function(ptr) {
-        var ret = UTF8ToString(ptr);
-        return ret;
-      },get64:function(low, high) {
-        if (low >= 0) assert(high === 0);
-        else assert(high === -1);
-        return low;
-      }};
-  function _fd_write(fd, iov, iovcnt, pnum) {
-      ;
-      // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
-      var num = 0;
-      for (var i = 0; i < iovcnt; i++) {
-        var ptr = HEAP32[((iov)>>2)];
-        var len = HEAP32[(((iov)+(4))>>2)];
-        iov += 8;
-        for (var j = 0; j < len; j++) {
-          SYSCALLS.printChar(fd, HEAPU8[ptr+j]);
-        }
-        num += len;
-      }
-      HEAP32[((pnum)>>2)] = num;
-      return 0;
-    }
+function flush_NO_FILESYSTEM() {
+  // flush anything remaining in the buffers during shutdown
+  ___stdio_exit();
+  var buffers = SYSCALLS.buffers;
+  if (buffers[1].length) SYSCALLS.printChar(1, 10);
+  if (buffers[2].length) SYSCALLS.printChar(2, 10);
+}
 
-  function _setTempRet0(val) {
-      setTempRet0(val);
+var SYSCALLS = {
+  buffers: [null, [], []],
+  printChar: function (stream, curr) {
+    var buffer = SYSCALLS.buffers[stream];
+    assert(buffer);
+    if (curr === 0 || curr === 10) {
+      (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0));
+      buffer.length = 0;
+    } else {
+      buffer.push(curr);
     }
-var ASSERTIONS = true;
-
+  },
+  varargs: undefined,
+  get: function () {
+    assert(SYSCALLS.varargs != undefined);
+    SYSCALLS.varargs += 4;
+    var ret = HEAP32[(SYSCALLS.varargs - 4) >> 2];
+    return ret;
+  },
+  getStr: function (ptr) {
+    var ret = UTF8ToString(ptr);
+    return ret;
+  },
+  get64: function (low, high) {
+    if (low >= 0) assert(high === 0);
+    else assert(high === -1);
+    return low;
+  },
+};
+function _fd_write(fd, iov, iovcnt, pnum) {
+  // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
+  var num = 0;
+  for (var i = 0; i < iovcnt; i++) {
+    var ptr = HEAP32[iov >> 2];
+    var len = HEAP32[(iov + 4) >> 2];
+    iov += 8;
+    for (var j = 0; j < len; j++) {
+      SYSCALLS.printChar(fd, HEAPU8[ptr + j]);
+    }
+    num += len;
+  }
+  HEAP32[pnum >> 2] = num;
+  return 0;
+}
 
+function _setTempRet0(val) {
+  setTempRet0(val);
+}
+var ASSERTIONS = true;
 
 /** @type {function(string, boolean=, number=)} */
 function intArrayFromString(stringy, dontAddNull, length) {
-  var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
+  var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
   var u8array = new Array(len);
   var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
   if (dontAddNull) u8array.length = numBytesWritten;
@@ -1880,70 +2172,86 @@ function intArrayToString(array) {
   var ret = [];
   for (var i = 0; i < array.length; i++) {
     var chr = array[i];
-    if (chr > 0xFF) {
+    if (chr > 0xff) {
       if (ASSERTIONS) {
-        assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ')  at offset ' + i + ' not in 0x00-0xFF.');
+        assert(
+          false,
+          'Character code ' +
+            chr +
+            ' (' +
+            String.fromCharCode(chr) +
+            ')  at offset ' +
+            i +
+            ' not in 0x00-0xFF.',
+        );
       }
-      chr &= 0xFF;
+      chr &= 0xff;
     }
     ret.push(String.fromCharCode(chr));
   }
   return ret.join('');
 }
 
-
 function checkIncomingModuleAPI() {
   ignoredModuleProp('fetchSettings');
 }
 var asmLibraryArg = {
-  "fd_write": _fd_write,
-  "setTempRet0": _setTempRet0
+  fd_write: _fd_write,
+  setTempRet0: _setTempRet0,
 };
 var asm = createWasm();
 /** @type {function(...*):?} */
-var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors");
+var ___wasm_call_ctors = (Module['___wasm_call_ctors'] =
+  createExportWrapper('__wasm_call_ctors'));
 
 /** @type {function(...*):?} */
-var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location");
+var ___errno_location = (Module['___errno_location'] =
+  createExportWrapper('__errno_location'));
 
 /** @type {function(...*):?} */
-var ___stdio_exit = Module["___stdio_exit"] = createExportWrapper("__stdio_exit");
+var ___stdio_exit = (Module['___stdio_exit'] =
+  createExportWrapper('__stdio_exit'));
 
 /** @type {function(...*):?} */
-var _emscripten_stack_init = Module["_emscripten_stack_init"] = function() {
-  return (_emscripten_stack_init = Module["_emscripten_stack_init"] = Module["asm"]["emscripten_stack_init"]).apply(null, arguments);
-};
+var _emscripten_stack_init = (Module['_emscripten_stack_init'] = function () {
+  return (_emscripten_stack_init = Module['_emscripten_stack_init'] =
+    Module['asm']['emscripten_stack_init']).apply(null, arguments);
+});
 
 /** @type {function(...*):?} */
-var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function() {
-  return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments);
-};
+var _emscripten_stack_get_free = (Module['_emscripten_stack_get_free'] =
+  function () {
+    return (_emscripten_stack_get_free = Module['_emscripten_stack_get_free'] =
+      Module['asm']['emscripten_stack_get_free']).apply(null, arguments);
+  });
 
 /** @type {function(...*):?} */
-var _emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = function() {
-  return (_emscripten_stack_get_base = Module["_emscripten_stack_get_base"] = Module["asm"]["emscripten_stack_get_base"]).apply(null, arguments);
-};
+var _emscripten_stack_get_base = (Module['_emscripten_stack_get_base'] =
+  function () {
+    return (_emscripten_stack_get_base = Module['_emscripten_stack_get_base'] =
+      Module['asm']['emscripten_stack_get_base']).apply(null, arguments);
+  });
 
 /** @type {function(...*):?} */
-var _emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = function() {
-  return (_emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = Module["asm"]["emscripten_stack_get_end"]).apply(null, arguments);
-};
+var _emscripten_stack_get_end = (Module['_emscripten_stack_get_end'] =
+  function () {
+    return (_emscripten_stack_get_end = Module['_emscripten_stack_get_end'] =
+      Module['asm']['emscripten_stack_get_end']).apply(null, arguments);
+  });
 
 /** @type {function(...*):?} */
-var stackSave = Module["stackSave"] = createExportWrapper("stackSave");
+var stackSave = (Module['stackSave'] = createExportWrapper('stackSave'));
 
 /** @type {function(...*):?} */
-var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore");
+var stackRestore = (Module['stackRestore'] =
+  createExportWrapper('stackRestore'));
 
 /** @type {function(...*):?} */
-var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc");
+var stackAlloc = (Module['stackAlloc'] = createExportWrapper('stackAlloc'));
 
 /** @type {function(...*):?} */
-var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji");
-
-
-
-
+var dynCall_jiji = (Module['dynCall_jiji'] =
+  createExportWrapper('dynCall_jiji'));
 
 // === Auto-generated postamble setup entry stuff ===
 
@@ -2176,8 +2484,8 @@ unexportedRuntimeFunction('stringToUTF32', false);
 unexportedRuntimeFunction('lengthBytesUTF32', false);
 unexportedRuntimeFunction('allocateUTF8', false);
 unexportedRuntimeFunction('allocateUTF8OnStack', false);
-Module["writeStackCookie"] = writeStackCookie;
-Module["checkStackCookie"] = checkStackCookie;
+Module['writeStackCookie'] = writeStackCookie;
+Module['checkStackCookie'] = checkStackCookie;
 unexportedRuntimeSymbol('ALLOC_NORMAL', false);
 unexportedRuntimeSymbol('ALLOC_STACK', false);
 
@@ -2188,8 +2496,8 @@ var calledRun;
  * @this {ExitStatus}
  */
 function ExitStatus(status) {
-  this.name = "ExitStatus";
-  this.message = "Program terminated with exit(" + status + ")";
+  this.name = 'ExitStatus';
+  this.message = 'Program terminated with exit(' + status + ')';
   this.status = status;
 }
 
@@ -2240,21 +2548,23 @@ function run(args) {
 
     if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
 
-    assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');
+    assert(
+      !Module['_main'],
+      'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]',
+    );
 
     postRun();
   }
 
   if (Module['setStatus']) {
     Module['setStatus']('Running...');
-    setTimeout(function() {
-      setTimeout(function() {
+    setTimeout(function () {
+      setTimeout(function () {
         Module['setStatus']('');
       }, 1);
       doRun();
     }, 1);
-  } else
-  {
+  } else {
     doRun();
   }
   checkStackCookie();
@@ -2278,16 +2588,21 @@ function checkUnflushedContent() {
   var has = false;
   out = err = (x) => {
     has = true;
-  }
-  try { // it doesn't matter if it fails
+  };
+  try {
+    // it doesn't matter if it fails
     var flush = flush_NO_FILESYSTEM;
     if (flush) flush();
-  } catch(e) {}
+  } catch (e) {}
   out = oldOut;
   err = oldErr;
   if (has) {
-    warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.');
-    warnOnce('(this may also be due to not including full filesystem support - try building with -s FORCE_FILESYSTEM=1)');
+    warnOnce(
+      'stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.',
+    );
+    warnOnce(
+      '(this may also be due to not including full filesystem support - try building with -s FORCE_FILESYSTEM=1)',
+    );
   }
 }
 
@@ -2304,7 +2619,10 @@ function exit(status, implicit) {
   if (keepRuntimeAlive()) {
     // if exit() was called, we may warn the user if the runtime isn't actually being shut down
     if (!implicit) {
-      var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
+      var msg =
+        'program exited (with status: ' +
+        status +
+        '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
       err(msg);
     }
   } else {
@@ -2324,7 +2642,8 @@ function procExit(code) {
 }
 
 if (Module['preInit']) {
-  if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
+  if (typeof Module['preInit'] == 'function')
+    Module['preInit'] = [Module['preInit']];
   while (Module['preInit'].length > 0) {
     Module['preInit'].pop()();
   }
diff --git a/src/validator.c b/src/validator.c
index f103eb76..5b0e8c48 100644
--- a/src/validator.c
+++ b/src/validator.c
@@ -175,16 +175,16 @@ bool is_attribute_type_a(ast_layout_attribute_type_t type) {
 #undef ADD_LAYOUT_ATTRIBUTE_TYPE_HIDE
 #undef ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT
 
-#define ADD_LAYOUT_ATTRIBUTE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
-                                        GENERATED_NAME, FILTER,               \
-                                        ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)              \
+#define ADD_LAYOUT_ATTRIBUTE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME,   \
+                                  GENERATED_NAME, FILTER, ALLOWED_VALUES, \
+                                  SUBTAGS, VALUE_HANDLER)                 \
     case TYPE:
 
-#define ADD_LAYOUT_ATTRIBUTE_TYPE_HIDE(TYPE, NAME, NAME_LOWER,       \
-                                             ENDUSER_NAME, GENERATED_NAME, \
-                                             FILTER, ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
+#define ADD_LAYOUT_ATTRIBUTE_TYPE_HIDE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME,   \
+                                       GENERATED_NAME, FILTER, ALLOWED_VALUES, \
+                                       SUBTAGS, VALUE_HANDLER)
 
-#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(                   \
+#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(                         \
     TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
     ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
@@ -444,9 +444,9 @@ bool validate_value(hashmap_t *attributes, hashmap_t *new_attributes,
         }                                                                      \
     }
 
-#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
-                                         GENERATED_NAME, FILTER,               \
-                                         ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
+#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(                         \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
 #define ADD_LAYOUT_ATTRIBUTE_TYPE_HIDE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME,   \
                                        GENERATED_NAME, FILTER, ALLOWED_VALUES, \
diff --git a/src/validator_style.c b/src/validator_style.c
index 1de75dac..9cddd958 100644
--- a/src/validator_style.c
+++ b/src/validator_style.c
@@ -290,14 +290,14 @@ bool is_attribute_style_type_a_style(ast_layout_attribute_type_t type) {
 #undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE
 #undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_REPEAT
 
-#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
-                                        GENERATED_NAME, FILTER,               \
-                                        ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)              \
+#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE(                          \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)                       \
     case TYPE:
 
-#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE(TYPE, NAME, NAME_LOWER,       \
-                                             ENDUSER_NAME, GENERATED_NAME, \
-                                             FILTER, ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
+#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE(                     \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
 #define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_REPEAT(                   \
     TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
@@ -1075,13 +1075,13 @@ bool validate_style_value(hashmap_t *styles, hashmap_t *new_styles,
 
 #define ADD_LAYOUT_ATTRIBUTE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME,   \
                                   GENERATED_NAME, FILTER, ALLOWED_VALUES, \
-                                  SUBTAGS, VALUE_HANDLER)                                \
+                                  SUBTAGS, VALUE_HANDLER)                 \
     case TYPE:                                                            \
         return false;
 
-#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
-                                         GENERATED_NAME, FILTER,               \
-                                         ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
+#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(                         \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
 #include "generated-config/ast_layout_attribute_type.h"
 
@@ -1089,9 +1089,9 @@ bool validate_style_value(hashmap_t *styles, hashmap_t *new_styles,
 #undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE
 #undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_REPEAT
 
-#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME,  \
-                                        GENERATED_NAME, FILTER,                \
-                                        ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)               \
+#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE(                                       \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER,              \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)                                    \
     case TYPE: {                                                               \
         attribute->final_key = string_strdup(GENERATED_NAME);                  \
         const ast_layout_attribute_pair_t *values = ALLOWED_VALUES;            \
@@ -1253,9 +1253,9 @@ bool validate_style_value(hashmap_t *styles, hashmap_t *new_styles,
     TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
     ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
-#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE(TYPE, NAME, NAME_LOWER,       \
-                                             ENDUSER_NAME, GENERATED_NAME, \
-                                             FILTER, ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
+#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE(                     \
+    TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
+    ALLOWED_VALUES, SUBTAGS, VALUE_HANDLER)
 
         default:
             return false;