@mediapipe/tasks-vision 0.1.0-alpha-12 → 0.1.0-alpha-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,10 @@
1
- // Build 525233580
1
+ // Build 527689245
2
2
 
3
3
  var ModuleFactory = (() => {
4
4
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
5
5
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
6
6
  return (
7
- function(ModuleFactory) {
8
- ModuleFactory = ModuleFactory || {};
7
+ function(ModuleFactory = {}) {
9
8
 
10
9
  var Module = typeof ModuleFactory != "undefined" ? ModuleFactory : {};
11
10
 
@@ -43,12 +42,6 @@ function locateFile(path) {
43
42
 
44
43
  var read_, readAsync, readBinary, setWindowTitle;
45
44
 
46
- function logExceptionOnExit(e) {
47
- if (e instanceof ExitStatus) return;
48
- let toLog = e;
49
- err("exiting due to exception: " + toLog);
50
- }
51
-
52
45
  if (ENVIRONMENT_IS_NODE) {
53
46
  var fs = require("fs");
54
47
  var nodePath = require("path");
@@ -74,25 +67,13 @@ if (ENVIRONMENT_IS_NODE) {
74
67
  if (err) onerror(err); else onload(data.buffer);
75
68
  });
76
69
  };
77
- if (process["argv"].length > 1) {
78
- thisProgram = process["argv"][1].replace(/\\/g, "/");
70
+ if (!Module["thisProgram"] && process.argv.length > 1) {
71
+ thisProgram = process.argv[1].replace(/\\/g, "/");
79
72
  }
80
- arguments_ = process["argv"].slice(2);
81
- process["on"]("uncaughtException", function(ex) {
82
- if (!(ex instanceof ExitStatus)) {
83
- throw ex;
84
- }
85
- });
86
- process["on"]("unhandledRejection", function(reason) {
87
- throw reason;
88
- });
73
+ arguments_ = process.argv.slice(2);
89
74
  quit_ = (status, toThrow) => {
90
- if (keepRuntimeAlive()) {
91
- process["exitCode"] = status;
92
- throw toThrow;
93
- }
94
- logExceptionOnExit(toThrow);
95
- process["exit"](status);
75
+ process.exitCode = status;
76
+ throw toThrow;
96
77
  };
97
78
  Module["inspect"] = function() {
98
79
  return "[Emscripten Module object]";
@@ -181,119 +162,20 @@ function assert(condition, text) {
181
162
  }
182
163
  }
183
164
 
184
- var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined;
185
-
186
- function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
187
- var endIdx = idx + maxBytesToRead;
188
- var endPtr = idx;
189
- while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
190
- if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
191
- return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
192
- }
193
- var str = "";
194
- while (idx < endPtr) {
195
- var u0 = heapOrArray[idx++];
196
- if (!(u0 & 128)) {
197
- str += String.fromCharCode(u0);
198
- continue;
199
- }
200
- var u1 = heapOrArray[idx++] & 63;
201
- if ((u0 & 224) == 192) {
202
- str += String.fromCharCode((u0 & 31) << 6 | u1);
203
- continue;
204
- }
205
- var u2 = heapOrArray[idx++] & 63;
206
- if ((u0 & 240) == 224) {
207
- u0 = (u0 & 15) << 12 | u1 << 6 | u2;
208
- } else {
209
- u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
210
- }
211
- if (u0 < 65536) {
212
- str += String.fromCharCode(u0);
213
- } else {
214
- var ch = u0 - 65536;
215
- str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
216
- }
217
- }
218
- return str;
219
- }
220
-
221
- function UTF8ToString(ptr, maxBytesToRead) {
222
- return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";
223
- }
224
-
225
- function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
226
- if (!(maxBytesToWrite > 0)) return 0;
227
- var startIdx = outIdx;
228
- var endIdx = outIdx + maxBytesToWrite - 1;
229
- for (var i = 0; i < str.length; ++i) {
230
- var u = str.charCodeAt(i);
231
- if (u >= 55296 && u <= 57343) {
232
- var u1 = str.charCodeAt(++i);
233
- u = 65536 + ((u & 1023) << 10) | u1 & 1023;
234
- }
235
- if (u <= 127) {
236
- if (outIdx >= endIdx) break;
237
- heap[outIdx++] = u;
238
- } else if (u <= 2047) {
239
- if (outIdx + 1 >= endIdx) break;
240
- heap[outIdx++] = 192 | u >> 6;
241
- heap[outIdx++] = 128 | u & 63;
242
- } else if (u <= 65535) {
243
- if (outIdx + 2 >= endIdx) break;
244
- heap[outIdx++] = 224 | u >> 12;
245
- heap[outIdx++] = 128 | u >> 6 & 63;
246
- heap[outIdx++] = 128 | u & 63;
247
- } else {
248
- if (outIdx + 3 >= endIdx) break;
249
- heap[outIdx++] = 240 | u >> 18;
250
- heap[outIdx++] = 128 | u >> 12 & 63;
251
- heap[outIdx++] = 128 | u >> 6 & 63;
252
- heap[outIdx++] = 128 | u & 63;
253
- }
254
- }
255
- heap[outIdx] = 0;
256
- return outIdx - startIdx;
257
- }
258
-
259
- function stringToUTF8(str, outPtr, maxBytesToWrite) {
260
- return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
261
- }
262
-
263
- function lengthBytesUTF8(str) {
264
- var len = 0;
265
- for (var i = 0; i < str.length; ++i) {
266
- var c = str.charCodeAt(i);
267
- if (c <= 127) {
268
- len++;
269
- } else if (c <= 2047) {
270
- len += 2;
271
- } else if (c >= 55296 && c <= 57343) {
272
- len += 4;
273
- ++i;
274
- } else {
275
- len += 3;
276
- }
277
- }
278
- return len;
279
- }
280
-
281
- var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
165
+ var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
282
166
 
283
- function updateGlobalBufferAndViews(buf) {
284
- buffer = buf;
285
- Module["HEAP8"] = HEAP8 = new Int8Array(buf);
286
- Module["HEAP16"] = HEAP16 = new Int16Array(buf);
287
- Module["HEAP32"] = HEAP32 = new Int32Array(buf);
288
- Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf);
289
- Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf);
290
- Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf);
291
- Module["HEAPF32"] = HEAPF32 = new Float32Array(buf);
292
- Module["HEAPF64"] = HEAPF64 = new Float64Array(buf);
167
+ function updateMemoryViews() {
168
+ var b = wasmMemory.buffer;
169
+ Module["HEAP8"] = HEAP8 = new Int8Array(b);
170
+ Module["HEAP16"] = HEAP16 = new Int16Array(b);
171
+ Module["HEAP32"] = HEAP32 = new Int32Array(b);
172
+ Module["HEAPU8"] = HEAPU8 = new Uint8Array(b);
173
+ Module["HEAPU16"] = HEAPU16 = new Uint16Array(b);
174
+ Module["HEAPU32"] = HEAPU32 = new Uint32Array(b);
175
+ Module["HEAPF32"] = HEAPF32 = new Float32Array(b);
176
+ Module["HEAPF64"] = HEAPF64 = new Float64Array(b);
293
177
  }
294
178
 
295
- var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 16777216;
296
-
297
179
  var wasmTable;
298
180
 
299
181
  var __ATPRERUN__ = [];
@@ -306,8 +188,10 @@ var __ATPOSTRUN__ = [];
306
188
 
307
189
  var runtimeInitialized = false;
308
190
 
191
+ var runtimeKeepaliveCounter = 0;
192
+
309
193
  function keepRuntimeAlive() {
310
- return noExitRuntime;
194
+ return noExitRuntime || runtimeKeepaliveCounter > 0;
311
195
  }
312
196
 
313
197
  function preRun() {
@@ -431,23 +315,23 @@ function getBinary(file) {
431
315
  }
432
316
  }
433
317
 
434
- function getBinaryPromise() {
318
+ function getBinaryPromise(binaryFile) {
435
319
  if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
436
- if (typeof fetch == "function" && !isFileURI(wasmBinaryFile)) {
437
- return fetch(wasmBinaryFile, {
320
+ if (typeof fetch == "function" && !isFileURI(binaryFile)) {
321
+ return fetch(binaryFile, {
438
322
  credentials: "same-origin"
439
323
  }).then(function(response) {
440
324
  if (!response["ok"]) {
441
- throw "failed to load wasm binary file at '" + wasmBinaryFile + "'";
325
+ throw "failed to load wasm binary file at '" + binaryFile + "'";
442
326
  }
443
327
  return response["arrayBuffer"]();
444
328
  }).catch(function() {
445
- return getBinary(wasmBinaryFile);
329
+ return getBinary(binaryFile);
446
330
  });
447
331
  } else {
448
332
  if (readAsync) {
449
333
  return new Promise(function(resolve, reject) {
450
- readAsync(wasmBinaryFile, function(response) {
334
+ readAsync(binaryFile, function(response) {
451
335
  resolve(new Uint8Array(response));
452
336
  }, reject);
453
337
  });
@@ -455,63 +339,65 @@ function getBinaryPromise() {
455
339
  }
456
340
  }
457
341
  return Promise.resolve().then(function() {
458
- return getBinary(wasmBinaryFile);
342
+ return getBinary(binaryFile);
343
+ });
344
+ }
345
+
346
+ function instantiateArrayBuffer(binaryFile, imports, receiver) {
347
+ return getBinaryPromise(binaryFile).then(function(binary) {
348
+ return WebAssembly.instantiate(binary, imports);
349
+ }).then(function(instance) {
350
+ return instance;
351
+ }).then(receiver, function(reason) {
352
+ err("failed to asynchronously prepare wasm: " + reason);
353
+ abort(reason);
459
354
  });
460
355
  }
461
356
 
357
+ function instantiateAsync(binary, binaryFile, imports, callback) {
358
+ if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") {
359
+ return fetch(binaryFile, {
360
+ credentials: "same-origin"
361
+ }).then(function(response) {
362
+ var result = WebAssembly.instantiateStreaming(response, imports);
363
+ return result.then(callback, function(reason) {
364
+ err("wasm streaming compile failed: " + reason);
365
+ err("falling back to ArrayBuffer instantiation");
366
+ return instantiateArrayBuffer(binaryFile, imports, callback);
367
+ });
368
+ });
369
+ } else {
370
+ return instantiateArrayBuffer(binaryFile, imports, callback);
371
+ }
372
+ }
373
+
462
374
  function createWasm() {
463
375
  var info = {
464
- "a": asmLibraryArg
376
+ "a": wasmImports
465
377
  };
466
378
  function receiveInstance(instance, module) {
467
379
  var exports = instance.exports;
468
380
  Module["asm"] = exports;
469
- wasmMemory = Module["asm"]["id"];
470
- updateGlobalBufferAndViews(wasmMemory.buffer);
471
- wasmTable = Module["asm"]["kd"];
472
- addOnInit(Module["asm"]["jd"]);
381
+ wasmMemory = Module["asm"]["jd"];
382
+ updateMemoryViews();
383
+ wasmTable = Module["asm"]["ld"];
384
+ addOnInit(Module["asm"]["kd"]);
473
385
  removeRunDependency("wasm-instantiate");
386
+ return exports;
474
387
  }
475
388
  addRunDependency("wasm-instantiate");
476
389
  function receiveInstantiationResult(result) {
477
390
  receiveInstance(result["instance"]);
478
391
  }
479
- function instantiateArrayBuffer(receiver) {
480
- return getBinaryPromise().then(function(binary) {
481
- return WebAssembly.instantiate(binary, info);
482
- }).then(function(instance) {
483
- return instance;
484
- }).then(receiver, function(reason) {
485
- err("failed to asynchronously prepare wasm: " + reason);
486
- abort(reason);
487
- });
488
- }
489
- function instantiateAsync() {
490
- if (!wasmBinary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") {
491
- return fetch(wasmBinaryFile, {
492
- credentials: "same-origin"
493
- }).then(function(response) {
494
- var result = WebAssembly.instantiateStreaming(response, info);
495
- return result.then(receiveInstantiationResult, function(reason) {
496
- err("wasm streaming compile failed: " + reason);
497
- err("falling back to ArrayBuffer instantiation");
498
- return instantiateArrayBuffer(receiveInstantiationResult);
499
- });
500
- });
501
- } else {
502
- return instantiateArrayBuffer(receiveInstantiationResult);
503
- }
504
- }
505
392
  if (Module["instantiateWasm"]) {
506
393
  try {
507
- var exports = Module["instantiateWasm"](info, receiveInstance);
508
- return exports;
394
+ return Module["instantiateWasm"](info, receiveInstance);
509
395
  } catch (e) {
510
396
  err("Module.instantiateWasm callback failed with error: " + e);
511
397
  readyPromiseReject(e);
512
398
  }
513
399
  }
514
- instantiateAsync().catch(readyPromiseReject);
400
+ instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult).catch(readyPromiseReject);
515
401
  return {};
516
402
  }
517
403
 
@@ -520,15 +406,15 @@ var tempDouble;
520
406
  var tempI64;
521
407
 
522
408
  var ASM_CONSTS = {
523
- 986382: $0 => {
409
+ 1030022: $0 => {
524
410
  const canvas = Emval.toValue($0);
525
411
  const context = canvas.getContext("webgpu");
526
412
  return JsValStore.add(context.getCurrentTexture());
527
413
  },
528
- 986517: () => {
414
+ 1030157: () => {
529
415
  return typeof HTMLCanvasElement !== "undefined";
530
416
  },
531
- 986572: ($0, $1, $2, $3, $4) => {
417
+ 1030212: ($0, $1, $2, $3, $4) => {
532
418
  const drawable = Emval.toValue($0);
533
419
  const device = JsValStore.get($1);
534
420
  const texture = JsValStore.get($2);
@@ -540,7 +426,7 @@ var ASM_CONSTS = {
540
426
  texture: texture
541
427
  }, [ width, height ]);
542
428
  },
543
- 986823: ($0, $1, $2, $3) => {
429
+ 1030463: ($0, $1, $2, $3) => {
544
430
  const sourceExtTex = Emval.toValue($0);
545
431
  const device = JsValStore.get($1);
546
432
  const sampler = JsValStore.get($2);
@@ -557,33 +443,33 @@ var ASM_CONSTS = {
557
443
  });
558
444
  return JsValStore.add(bindGroup);
559
445
  },
560
- 987171: ($0, $1) => {
446
+ 1030811: ($0, $1) => {
561
447
  const inputArray = Emval.toValue($0);
562
448
  const output = Emval.toValue($1);
563
449
  const ctx = output.getContext("2d");
564
450
  const image_data = new ImageData(inputArray, output.width, output.height);
565
451
  ctx.putImageData(image_data, 0, 0);
566
452
  },
567
- 987395: ($0, $1) => {
453
+ 1031035: ($0, $1) => {
568
454
  const input = Emval.toValue($0);
569
455
  const outputArray = Emval.toValue($1);
570
456
  const ctx = input.getContext("2d");
571
457
  const data = ctx.getImageData(0, 0, input.width, input.height);
572
458
  outputArray.set(data.data);
573
459
  },
574
- 987599: ($0, $1) => {
460
+ 1031239: ($0, $1) => {
575
461
  const input = Emval.toValue($0);
576
462
  const output = Emval.toValue($1);
577
463
  const ctx = output.getContext("2d");
578
464
  ctx.drawImage(input, 0, 0);
579
465
  },
580
- 987735: () => {
466
+ 1031375: () => {
581
467
  return !!Module["preinitializedWebGPUDevice"];
582
468
  },
583
- 987786: () => {
469
+ 1031426: () => {
584
470
  specialHTMLTargets["#canvas"] = Module.canvas;
585
471
  },
586
- 987837: () => {
472
+ 1031477: () => {
587
473
  return typeof wasmOffsetConverter !== "undefined";
588
474
  }
589
475
  };
@@ -805,11 +691,75 @@ var _emscripten_get_now;
805
691
 
806
692
  if (ENVIRONMENT_IS_NODE) {
807
693
  _emscripten_get_now = () => {
808
- var t = process["hrtime"]();
694
+ var t = process.hrtime();
809
695
  return t[0] * 1e3 + t[1] / 1e6;
810
696
  };
811
697
  } else _emscripten_get_now = () => performance.now();
812
698
 
699
+ function setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) {
700
+ assert(!Browser.mainLoop.func, "emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");
701
+ Browser.mainLoop.func = browserIterationFunc;
702
+ Browser.mainLoop.arg = arg;
703
+ var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop;
704
+ function checkIsRunning() {
705
+ if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) {
706
+ return false;
707
+ }
708
+ return true;
709
+ }
710
+ Browser.mainLoop.running = false;
711
+ Browser.mainLoop.runner = function Browser_mainLoop_runner() {
712
+ if (ABORT) return;
713
+ if (Browser.mainLoop.queue.length > 0) {
714
+ var start = Date.now();
715
+ var blocker = Browser.mainLoop.queue.shift();
716
+ blocker.func(blocker.arg);
717
+ if (Browser.mainLoop.remainingBlockers) {
718
+ var remaining = Browser.mainLoop.remainingBlockers;
719
+ var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining);
720
+ if (blocker.counted) {
721
+ Browser.mainLoop.remainingBlockers = next;
722
+ } else {
723
+ next = next + .5;
724
+ Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9;
725
+ }
726
+ }
727
+ out('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + " ms");
728
+ Browser.mainLoop.updateStatus();
729
+ if (!checkIsRunning()) return;
730
+ setTimeout(Browser.mainLoop.runner, 0);
731
+ return;
732
+ }
733
+ if (!checkIsRunning()) return;
734
+ Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0;
735
+ if (Browser.mainLoop.timingMode == 1 && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) {
736
+ Browser.mainLoop.scheduler();
737
+ return;
738
+ } else if (Browser.mainLoop.timingMode == 0) {
739
+ Browser.mainLoop.tickStartTime = _emscripten_get_now();
740
+ }
741
+ GL.newRenderingFrameStarted();
742
+ Browser.mainLoop.runIter(browserIterationFunc);
743
+ if (!checkIsRunning()) return;
744
+ if (typeof SDL == "object" && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData();
745
+ Browser.mainLoop.scheduler();
746
+ };
747
+ if (!noSetTiming) {
748
+ if (fps && fps > 0) _emscripten_set_main_loop_timing(0, 1e3 / fps); else _emscripten_set_main_loop_timing(1, 1);
749
+ Browser.mainLoop.scheduler();
750
+ }
751
+ if (simulateInfiniteLoop) {
752
+ throw "unwind";
753
+ }
754
+ }
755
+
756
+ function handleException(e) {
757
+ if (e instanceof ExitStatus || e == "unwind") {
758
+ return EXITSTATUS;
759
+ }
760
+ quit_(1, e);
761
+ }
762
+
813
763
  function ExitStatus(status) {
814
764
  this.name = "ExitStatus";
815
765
  this.message = "Program terminated with exit(" + status + ")";
@@ -881,20 +831,25 @@ var PATH = {
881
831
  }
882
832
  };
883
833
 
884
- function getRandomDevice() {
834
+ function initRandomFill() {
885
835
  if (typeof crypto == "object" && typeof crypto["getRandomValues"] == "function") {
886
- var randomBuffer = new Uint8Array(1);
887
- return () => {
888
- crypto.getRandomValues(randomBuffer);
889
- return randomBuffer[0];
890
- };
836
+ return view => crypto.getRandomValues(view);
891
837
  } else if (ENVIRONMENT_IS_NODE) {
892
838
  try {
893
839
  var crypto_module = require("crypto");
894
- return () => crypto_module["randomBytes"](1)[0];
840
+ var randomFillSync = crypto_module["randomFillSync"];
841
+ if (randomFillSync) {
842
+ return view => crypto_module["randomFillSync"](view);
843
+ }
844
+ var randomBytes = crypto_module["randomBytes"];
845
+ return view => (view.set(randomBytes(view.byteLength)), view);
895
846
  } catch (e) {}
896
847
  }
897
- return () => abort("randomDevice");
848
+ abort("initRandomDevice");
849
+ }
850
+
851
+ function randomFill(view) {
852
+ return (randomFill = initRandomFill())(view);
898
853
  }
899
854
 
900
855
  var PATH_FS = {
@@ -947,6 +902,58 @@ var PATH_FS = {
947
902
  }
948
903
  };
949
904
 
905
+ function lengthBytesUTF8(str) {
906
+ var len = 0;
907
+ for (var i = 0; i < str.length; ++i) {
908
+ var c = str.charCodeAt(i);
909
+ if (c <= 127) {
910
+ len++;
911
+ } else if (c <= 2047) {
912
+ len += 2;
913
+ } else if (c >= 55296 && c <= 57343) {
914
+ len += 4;
915
+ ++i;
916
+ } else {
917
+ len += 3;
918
+ }
919
+ }
920
+ return len;
921
+ }
922
+
923
+ function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
924
+ if (!(maxBytesToWrite > 0)) return 0;
925
+ var startIdx = outIdx;
926
+ var endIdx = outIdx + maxBytesToWrite - 1;
927
+ for (var i = 0; i < str.length; ++i) {
928
+ var u = str.charCodeAt(i);
929
+ if (u >= 55296 && u <= 57343) {
930
+ var u1 = str.charCodeAt(++i);
931
+ u = 65536 + ((u & 1023) << 10) | u1 & 1023;
932
+ }
933
+ if (u <= 127) {
934
+ if (outIdx >= endIdx) break;
935
+ heap[outIdx++] = u;
936
+ } else if (u <= 2047) {
937
+ if (outIdx + 1 >= endIdx) break;
938
+ heap[outIdx++] = 192 | u >> 6;
939
+ heap[outIdx++] = 128 | u & 63;
940
+ } else if (u <= 65535) {
941
+ if (outIdx + 2 >= endIdx) break;
942
+ heap[outIdx++] = 224 | u >> 12;
943
+ heap[outIdx++] = 128 | u >> 6 & 63;
944
+ heap[outIdx++] = 128 | u & 63;
945
+ } else {
946
+ if (outIdx + 3 >= endIdx) break;
947
+ heap[outIdx++] = 240 | u >> 18;
948
+ heap[outIdx++] = 128 | u >> 12 & 63;
949
+ heap[outIdx++] = 128 | u >> 6 & 63;
950
+ heap[outIdx++] = 128 | u & 63;
951
+ }
952
+ }
953
+ heap[outIdx] = 0;
954
+ return outIdx - startIdx;
955
+ }
956
+
950
957
  function intArrayFromString(stringy, dontAddNull, length) {
951
958
  var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
952
959
  var u8array = new Array(len);
@@ -1384,7 +1391,7 @@ var MEMFS = {
1384
1391
  var ptr;
1385
1392
  var allocated;
1386
1393
  var contents = stream.node.contents;
1387
- if (!(flags & 2) && contents.buffer === buffer) {
1394
+ if (!(flags & 2) && contents.buffer === HEAP8.buffer) {
1388
1395
  allocated = false;
1389
1396
  ptr = contents.byteOffset;
1390
1397
  } else {
@@ -2457,9 +2464,15 @@ var FS = {
2457
2464
  TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
2458
2465
  FS.mkdev("/dev/tty", FS.makedev(5, 0));
2459
2466
  FS.mkdev("/dev/tty1", FS.makedev(6, 0));
2460
- var random_device = getRandomDevice();
2461
- FS.createDevice("/dev", "random", random_device);
2462
- FS.createDevice("/dev", "urandom", random_device);
2467
+ var randomBuffer = new Uint8Array(1024), randomLeft = 0;
2468
+ var randomByte = () => {
2469
+ if (randomLeft === 0) {
2470
+ randomLeft = randomFill(randomBuffer).byteLength;
2471
+ }
2472
+ return randomBuffer[--randomLeft];
2473
+ };
2474
+ FS.createDevice("/dev", "random", randomByte);
2475
+ FS.createDevice("/dev", "urandom", randomByte);
2463
2476
  FS.mkdir("/dev/shm");
2464
2477
  FS.mkdir("/dev/shm/tmp");
2465
2478
  },
@@ -2515,6 +2528,7 @@ var FS = {
2515
2528
  ensureErrnoError: () => {
2516
2529
  if (FS.ErrnoError) return;
2517
2530
  FS.ErrnoError = function ErrnoError(errno, node) {
2531
+ this.name = "ErrnoError";
2518
2532
  this.node = node;
2519
2533
  this.setErrno = function(errno) {
2520
2534
  this.errno = errno;
@@ -2896,95 +2910,49 @@ var FS = {
2896
2910
  } else {
2897
2911
  processData(url);
2898
2912
  }
2899
- },
2900
- indexedDB: () => {
2901
- return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
2902
- },
2903
- DB_NAME: () => {
2904
- return "EM_FS_" + window.location.pathname;
2905
- },
2906
- DB_VERSION: 20,
2907
- DB_STORE_NAME: "FILE_DATA",
2908
- saveFilesToDB: (paths, onload, onerror) => {
2909
- onload = onload || (() => {});
2910
- onerror = onerror || (() => {});
2911
- var indexedDB = FS.indexedDB();
2912
- try {
2913
- var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
2914
- } catch (e) {
2915
- return onerror(e);
2913
+ }
2914
+ };
2915
+
2916
+ var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined;
2917
+
2918
+ function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
2919
+ var endIdx = idx + maxBytesToRead;
2920
+ var endPtr = idx;
2921
+ while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
2922
+ if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
2923
+ return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
2924
+ }
2925
+ var str = "";
2926
+ while (idx < endPtr) {
2927
+ var u0 = heapOrArray[idx++];
2928
+ if (!(u0 & 128)) {
2929
+ str += String.fromCharCode(u0);
2930
+ continue;
2916
2931
  }
2917
- openRequest.onupgradeneeded = () => {
2918
- out("creating db");
2919
- var db = openRequest.result;
2920
- db.createObjectStore(FS.DB_STORE_NAME);
2921
- };
2922
- openRequest.onsuccess = () => {
2923
- var db = openRequest.result;
2924
- var transaction = db.transaction([ FS.DB_STORE_NAME ], "readwrite");
2925
- var files = transaction.objectStore(FS.DB_STORE_NAME);
2926
- var ok = 0, fail = 0, total = paths.length;
2927
- function finish() {
2928
- if (fail == 0) onload(); else onerror();
2929
- }
2930
- paths.forEach(path => {
2931
- var putRequest = files.put(FS.analyzePath(path).object.contents, path);
2932
- putRequest.onsuccess = () => {
2933
- ok++;
2934
- if (ok + fail == total) finish();
2935
- };
2936
- putRequest.onerror = () => {
2937
- fail++;
2938
- if (ok + fail == total) finish();
2939
- };
2940
- });
2941
- transaction.onerror = onerror;
2942
- };
2943
- openRequest.onerror = onerror;
2944
- },
2945
- loadFilesFromDB: (paths, onload, onerror) => {
2946
- onload = onload || (() => {});
2947
- onerror = onerror || (() => {});
2948
- var indexedDB = FS.indexedDB();
2949
- try {
2950
- var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
2951
- } catch (e) {
2952
- return onerror(e);
2932
+ var u1 = heapOrArray[idx++] & 63;
2933
+ if ((u0 & 224) == 192) {
2934
+ str += String.fromCharCode((u0 & 31) << 6 | u1);
2935
+ continue;
2936
+ }
2937
+ var u2 = heapOrArray[idx++] & 63;
2938
+ if ((u0 & 240) == 224) {
2939
+ u0 = (u0 & 15) << 12 | u1 << 6 | u2;
2940
+ } else {
2941
+ u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
2942
+ }
2943
+ if (u0 < 65536) {
2944
+ str += String.fromCharCode(u0);
2945
+ } else {
2946
+ var ch = u0 - 65536;
2947
+ str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
2953
2948
  }
2954
- openRequest.onupgradeneeded = onerror;
2955
- openRequest.onsuccess = () => {
2956
- var db = openRequest.result;
2957
- try {
2958
- var transaction = db.transaction([ FS.DB_STORE_NAME ], "readonly");
2959
- } catch (e) {
2960
- onerror(e);
2961
- return;
2962
- }
2963
- var files = transaction.objectStore(FS.DB_STORE_NAME);
2964
- var ok = 0, fail = 0, total = paths.length;
2965
- function finish() {
2966
- if (fail == 0) onload(); else onerror();
2967
- }
2968
- paths.forEach(path => {
2969
- var getRequest = files.get(path);
2970
- getRequest.onsuccess = () => {
2971
- if (FS.analyzePath(path).exists) {
2972
- FS.unlink(path);
2973
- }
2974
- FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);
2975
- ok++;
2976
- if (ok + fail == total) finish();
2977
- };
2978
- getRequest.onerror = () => {
2979
- fail++;
2980
- if (ok + fail == total) finish();
2981
- };
2982
- });
2983
- transaction.onerror = onerror;
2984
- };
2985
- openRequest.onerror = onerror;
2986
2949
  }
2987
- };
2950
+ return str;
2951
+ }
2952
+
2953
+ function UTF8ToString(ptr, maxBytesToRead) {
2954
+ return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";
2955
+ }
2988
2956
 
2989
2957
  var SYSCALLS = {
2990
2958
  DEFAULT_POLLMASK: 5,
@@ -3027,18 +2995,21 @@ var SYSCALLS = {
3027
2995
  HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1];
3028
2996
  HEAP32[buf + 48 >> 2] = 4096;
3029
2997
  HEAP32[buf + 52 >> 2] = stat.blocks;
3030
- tempI64 = [ Math.floor(stat.atime.getTime() / 1e3) >>> 0, (tempDouble = Math.floor(stat.atime.getTime() / 1e3),
2998
+ var atime = stat.atime.getTime();
2999
+ var mtime = stat.mtime.getTime();
3000
+ var ctime = stat.ctime.getTime();
3001
+ tempI64 = [ Math.floor(atime / 1e3) >>> 0, (tempDouble = Math.floor(atime / 1e3),
3031
3002
  +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ],
3032
3003
  HEAP32[buf + 56 >> 2] = tempI64[0], HEAP32[buf + 60 >> 2] = tempI64[1];
3033
- HEAPU32[buf + 64 >> 2] = 0;
3034
- tempI64 = [ Math.floor(stat.mtime.getTime() / 1e3) >>> 0, (tempDouble = Math.floor(stat.mtime.getTime() / 1e3),
3004
+ HEAPU32[buf + 64 >> 2] = atime % 1e3 * 1e3;
3005
+ tempI64 = [ Math.floor(mtime / 1e3) >>> 0, (tempDouble = Math.floor(mtime / 1e3),
3035
3006
  +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ],
3036
3007
  HEAP32[buf + 72 >> 2] = tempI64[0], HEAP32[buf + 76 >> 2] = tempI64[1];
3037
- HEAPU32[buf + 80 >> 2] = 0;
3038
- tempI64 = [ Math.floor(stat.ctime.getTime() / 1e3) >>> 0, (tempDouble = Math.floor(stat.ctime.getTime() / 1e3),
3008
+ HEAPU32[buf + 80 >> 2] = mtime % 1e3 * 1e3;
3009
+ tempI64 = [ Math.floor(ctime / 1e3) >>> 0, (tempDouble = Math.floor(ctime / 1e3),
3039
3010
  +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ],
3040
3011
  HEAP32[buf + 88 >> 2] = tempI64[0], HEAP32[buf + 92 >> 2] = tempI64[1];
3041
- HEAPU32[buf + 96 >> 2] = 0;
3012
+ HEAPU32[buf + 96 >> 2] = ctime % 1e3 * 1e3;
3042
3013
  tempI64 = [ stat.ino >>> 0, (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ],
3043
3014
  HEAP32[buf + 104 >> 2] = tempI64[0], HEAP32[buf + 108 >> 2] = tempI64[1];
3044
3015
  return 0;
@@ -3086,70 +3057,13 @@ function exitJS(status, implicit) {
3086
3057
 
3087
3058
  var _exit = exitJS;
3088
3059
 
3089
- function handleException(e) {
3090
- if (e instanceof ExitStatus || e == "unwind") {
3091
- return EXITSTATUS;
3092
- }
3093
- quit_(1, e);
3094
- }
3095
-
3096
- function maybeExit() {}
3097
-
3098
- function setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) {
3099
- assert(!Browser.mainLoop.func, "emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");
3100
- Browser.mainLoop.func = browserIterationFunc;
3101
- Browser.mainLoop.arg = arg;
3102
- var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop;
3103
- function checkIsRunning() {
3104
- if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) {
3105
- maybeExit();
3106
- return false;
3107
- }
3108
- return true;
3109
- }
3110
- Browser.mainLoop.running = false;
3111
- Browser.mainLoop.runner = function Browser_mainLoop_runner() {
3112
- if (ABORT) return;
3113
- if (Browser.mainLoop.queue.length > 0) {
3114
- var start = Date.now();
3115
- var blocker = Browser.mainLoop.queue.shift();
3116
- blocker.func(blocker.arg);
3117
- if (Browser.mainLoop.remainingBlockers) {
3118
- var remaining = Browser.mainLoop.remainingBlockers;
3119
- var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining);
3120
- if (blocker.counted) {
3121
- Browser.mainLoop.remainingBlockers = next;
3122
- } else {
3123
- next = next + .5;
3124
- Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9;
3125
- }
3126
- }
3127
- out('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + " ms");
3128
- Browser.mainLoop.updateStatus();
3129
- if (!checkIsRunning()) return;
3130
- setTimeout(Browser.mainLoop.runner, 0);
3131
- return;
3132
- }
3133
- if (!checkIsRunning()) return;
3134
- Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0;
3135
- if (Browser.mainLoop.timingMode == 1 && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) {
3136
- Browser.mainLoop.scheduler();
3137
- return;
3138
- } else if (Browser.mainLoop.timingMode == 0) {
3139
- Browser.mainLoop.tickStartTime = _emscripten_get_now();
3060
+ function maybeExit() {
3061
+ if (!keepRuntimeAlive()) {
3062
+ try {
3063
+ _exit(EXITSTATUS);
3064
+ } catch (e) {
3065
+ handleException(e);
3140
3066
  }
3141
- GL.newRenderingFrameStarted();
3142
- Browser.mainLoop.runIter(browserIterationFunc);
3143
- if (!checkIsRunning()) return;
3144
- if (typeof SDL == "object" && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData();
3145
- Browser.mainLoop.scheduler();
3146
- };
3147
- if (!noSetTiming) {
3148
- if (fps && fps > 0) _emscripten_set_main_loop_timing(0, 1e3 / fps); else _emscripten_set_main_loop_timing(1, 1);
3149
- Browser.mainLoop.scheduler();
3150
- }
3151
- if (simulateInfiniteLoop) {
3152
- throw "unwind";
3153
3067
  }
3154
3068
  }
3155
3069
 
@@ -3159,6 +3073,7 @@ function callUserCallback(func) {
3159
3073
  }
3160
3074
  try {
3161
3075
  func();
3076
+ maybeExit();
3162
3077
  } catch (e) {
3163
3078
  handleException(e);
3164
3079
  }
@@ -3729,8 +3644,19 @@ function callRuntimeCallbacks(callbacks) {
3729
3644
  }
3730
3645
  }
3731
3646
 
3732
- function ___cxa_allocate_exception(size) {
3733
- return _malloc(size + 24) + 24;
3647
+ var wasmTableMirror = [];
3648
+
3649
+ function getWasmTableEntry(funcPtr) {
3650
+ var func = wasmTableMirror[funcPtr];
3651
+ if (!func) {
3652
+ if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1;
3653
+ wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
3654
+ }
3655
+ return func;
3656
+ }
3657
+
3658
+ function ___call_sighandler(fp, sig) {
3659
+ getWasmTableEntry(fp)(sig);
3734
3660
  }
3735
3661
 
3736
3662
  function ExceptionInfo(excPtr) {
@@ -3808,7 +3734,7 @@ function ___cxa_throw(ptr, type, destructor) {
3808
3734
  info.init(type, destructor);
3809
3735
  exceptionLast = ptr;
3810
3736
  uncaughtExceptionCount++;
3811
- throw ptr;
3737
+ throw exceptionLast;
3812
3738
  }
3813
3739
 
3814
3740
  function setErrNo(value) {
@@ -3872,7 +3798,7 @@ function ___syscall_fcntl64(fd, cmd, varargs) {
3872
3798
  }
3873
3799
  }
3874
3800
  } catch (e) {
3875
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3801
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3876
3802
  return -e.errno;
3877
3803
  }
3878
3804
  }
@@ -3882,7 +3808,7 @@ function ___syscall_fstat64(fd, buf) {
3882
3808
  var stream = SYSCALLS.getStreamFromFD(fd);
3883
3809
  return SYSCALLS.doStat(FS.stat, stream.path, buf);
3884
3810
  } catch (e) {
3885
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3811
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3886
3812
  return -e.errno;
3887
3813
  }
3888
3814
  }
@@ -3946,7 +3872,7 @@ function ___syscall_ioctl(fd, op, varargs) {
3946
3872
  return -28;
3947
3873
  }
3948
3874
  } catch (e) {
3949
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3875
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3950
3876
  return -e.errno;
3951
3877
  }
3952
3878
  }
@@ -3956,7 +3882,7 @@ function ___syscall_lstat64(path, buf) {
3956
3882
  path = SYSCALLS.getStr(path);
3957
3883
  return SYSCALLS.doStat(FS.lstat, path, buf);
3958
3884
  } catch (e) {
3959
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3885
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3960
3886
  return -e.errno;
3961
3887
  }
3962
3888
  }
@@ -3970,7 +3896,7 @@ function ___syscall_newfstatat(dirfd, path, buf, flags) {
3970
3896
  path = SYSCALLS.calculateAt(dirfd, path, allowEmpty);
3971
3897
  return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf);
3972
3898
  } catch (e) {
3973
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3899
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3974
3900
  return -e.errno;
3975
3901
  }
3976
3902
  }
@@ -3983,7 +3909,7 @@ function ___syscall_openat(dirfd, path, flags, varargs) {
3983
3909
  var mode = varargs ? SYSCALLS.get() : 0;
3984
3910
  return FS.open(path, flags, mode).fd;
3985
3911
  } catch (e) {
3986
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3912
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3987
3913
  return -e.errno;
3988
3914
  }
3989
3915
  }
@@ -3993,16 +3919,14 @@ function ___syscall_stat64(path, buf) {
3993
3919
  path = SYSCALLS.getStr(path);
3994
3920
  return SYSCALLS.doStat(FS.stat, path, buf);
3995
3921
  } catch (e) {
3996
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
3922
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
3997
3923
  return -e.errno;
3998
3924
  }
3999
3925
  }
4000
3926
 
4001
- function __dlinit(main_dso_handle) {}
4002
-
4003
3927
  var dlopenMissingError = "To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";
4004
3928
 
4005
- function __dlopen_js(filename, flag) {
3929
+ function __dlopen_js(handle) {
4006
3930
  abort(dlopenMissingError);
4007
3931
  }
4008
3932
 
@@ -4074,10 +3998,11 @@ function makeLegalFunctionName(name) {
4074
3998
 
4075
3999
  function createNamedFunction(name, body) {
4076
4000
  name = makeLegalFunctionName(name);
4077
- return function() {
4078
- "use strict";
4079
- return body.apply(this, arguments);
4080
- };
4001
+ return {
4002
+ [name]: function() {
4003
+ return body.apply(this, arguments);
4004
+ }
4005
+ }[name];
4081
4006
  }
4082
4007
 
4083
4008
  function extendError(baseErrorType, errorName) {
@@ -4162,47 +4087,53 @@ function __embind_register_bool(rawType, name, size, trueValue, falseValue) {
4162
4087
  });
4163
4088
  }
4164
4089
 
4165
- var emval_free_list = [];
4090
+ function HandleAllocator() {
4091
+ this.allocated = [ undefined ];
4092
+ this.freelist = [];
4093
+ this.get = function(id) {
4094
+ return this.allocated[id];
4095
+ };
4096
+ this.allocate = function(handle) {
4097
+ let id = this.freelist.pop() || this.allocated.length;
4098
+ this.allocated[id] = handle;
4099
+ return id;
4100
+ };
4101
+ this.free = function(id) {
4102
+ this.allocated[id] = undefined;
4103
+ this.freelist.push(id);
4104
+ };
4105
+ }
4166
4106
 
4167
- var emval_handle_array = [ {}, {
4168
- value: undefined
4169
- }, {
4170
- value: null
4171
- }, {
4172
- value: true
4173
- }, {
4174
- value: false
4175
- } ];
4107
+ var emval_handles = new HandleAllocator();
4176
4108
 
4177
4109
  function __emval_decref(handle) {
4178
- if (handle > 4 && 0 === --emval_handle_array[handle].refcount) {
4179
- emval_handle_array[handle] = undefined;
4180
- emval_free_list.push(handle);
4110
+ if (handle >= emval_handles.reserved && 0 === --emval_handles.get(handle).refcount) {
4111
+ emval_handles.free(handle);
4181
4112
  }
4182
4113
  }
4183
4114
 
4184
4115
  function count_emval_handles() {
4185
4116
  var count = 0;
4186
- for (var i = 5; i < emval_handle_array.length; ++i) {
4187
- if (emval_handle_array[i] !== undefined) {
4117
+ for (var i = emval_handles.reserved; i < emval_handles.allocated.length; ++i) {
4118
+ if (emval_handles.allocated[i] !== undefined) {
4188
4119
  ++count;
4189
4120
  }
4190
4121
  }
4191
4122
  return count;
4192
4123
  }
4193
4124
 
4194
- function get_first_emval() {
4195
- for (var i = 5; i < emval_handle_array.length; ++i) {
4196
- if (emval_handle_array[i] !== undefined) {
4197
- return emval_handle_array[i];
4198
- }
4199
- }
4200
- return null;
4201
- }
4202
-
4203
4125
  function init_emval() {
4126
+ emval_handles.allocated.push({
4127
+ value: undefined
4128
+ }, {
4129
+ value: null
4130
+ }, {
4131
+ value: true
4132
+ }, {
4133
+ value: false
4134
+ });
4135
+ emval_handles.reserved = emval_handles.allocated.length;
4204
4136
  Module["count_emval_handles"] = count_emval_handles;
4205
- Module["get_first_emval"] = get_first_emval;
4206
4137
  }
4207
4138
 
4208
4139
  var Emval = {
@@ -4210,7 +4141,7 @@ var Emval = {
4210
4141
  if (!handle) {
4211
4142
  throwBindingError("Cannot use deleted val. handle = " + handle);
4212
4143
  }
4213
- return emval_handle_array[handle].value;
4144
+ return emval_handles.get(handle).value;
4214
4145
  },
4215
4146
  toHandle: value => {
4216
4147
  switch (value) {
@@ -4228,12 +4159,10 @@ var Emval = {
4228
4159
 
4229
4160
  default:
4230
4161
  {
4231
- var handle = emval_free_list.length ? emval_free_list.pop() : emval_handle_array.length;
4232
- emval_handle_array[handle] = {
4162
+ return emval_handles.allocate({
4233
4163
  refcount: 1,
4234
4164
  value: value
4235
- };
4236
- return handle;
4165
+ });
4237
4166
  }
4238
4167
  }
4239
4168
  }
@@ -4366,7 +4295,7 @@ function __embind_register_memory_view(rawType, dataTypeIndex, name) {
4366
4295
  var heap = HEAPU32;
4367
4296
  var size = heap[handle];
4368
4297
  var data = heap[handle + 1];
4369
- return new TA(buffer, data, size);
4298
+ return new TA(heap.buffer, data, size);
4370
4299
  }
4371
4300
  name = readLatin1String(name);
4372
4301
  registerType(rawType, {
@@ -4379,6 +4308,10 @@ function __embind_register_memory_view(rawType, dataTypeIndex, name) {
4379
4308
  });
4380
4309
  }
4381
4310
 
4311
+ function stringToUTF8(str, outPtr, maxBytesToWrite) {
4312
+ return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
4313
+ }
4314
+
4382
4315
  function __embind_register_std_string(rawType, name) {
4383
4316
  name = readLatin1String(name);
4384
4317
  var stdStringIsUTF8 = name === "std::string";
@@ -4708,7 +4641,7 @@ function __emval_get_property(handle, key) {
4708
4641
 
4709
4642
  function __emval_incref(handle) {
4710
4643
  if (handle > 4) {
4711
- emval_handle_array[handle].refcount += 1;
4644
+ emval_handles.get(handle).refcount += 1;
4712
4645
  }
4713
4646
  }
4714
4647
 
@@ -4772,17 +4705,17 @@ function __gmtime_js(time, tmPtr) {
4772
4705
  HEAP32[tmPtr + 28 >> 2] = yday;
4773
4706
  }
4774
4707
 
4775
- function __isLeapYear(year) {
4708
+ function isLeapYear(year) {
4776
4709
  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
4777
4710
  }
4778
4711
 
4779
- var __MONTH_DAYS_LEAP_CUMULATIVE = [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 ];
4712
+ var MONTH_DAYS_LEAP_CUMULATIVE = [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 ];
4780
4713
 
4781
- var __MONTH_DAYS_REGULAR_CUMULATIVE = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 ];
4714
+ var MONTH_DAYS_REGULAR_CUMULATIVE = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 ];
4782
4715
 
4783
- function __yday_from_date(date) {
4784
- var isLeapYear = __isLeapYear(date.getFullYear());
4785
- var monthDaysCumulative = isLeapYear ? __MONTH_DAYS_LEAP_CUMULATIVE : __MONTH_DAYS_REGULAR_CUMULATIVE;
4716
+ function ydayFromDate(date) {
4717
+ var leap = isLeapYear(date.getFullYear());
4718
+ var monthDaysCumulative = leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE;
4786
4719
  var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1;
4787
4720
  return yday;
4788
4721
  }
@@ -4796,7 +4729,7 @@ function __localtime_js(time, tmPtr) {
4796
4729
  HEAP32[tmPtr + 16 >> 2] = date.getMonth();
4797
4730
  HEAP32[tmPtr + 20 >> 2] = date.getFullYear() - 1900;
4798
4731
  HEAP32[tmPtr + 24 >> 2] = date.getDay();
4799
- var yday = __yday_from_date(date) | 0;
4732
+ var yday = ydayFromDate(date) | 0;
4800
4733
  HEAP32[tmPtr + 28 >> 2] = yday;
4801
4734
  HEAP32[tmPtr + 36 >> 2] = -(date.getTimezoneOffset() * 60);
4802
4735
  var start = new Date(date.getFullYear(), 0, 1);
@@ -4822,7 +4755,7 @@ function __mktime_js(tmPtr) {
4822
4755
  date.setTime(date.getTime() + (trueOffset - guessedOffset) * 6e4);
4823
4756
  }
4824
4757
  HEAP32[tmPtr + 24 >> 2] = date.getDay();
4825
- var yday = __yday_from_date(date) | 0;
4758
+ var yday = ydayFromDate(date) | 0;
4826
4759
  HEAP32[tmPtr + 28 >> 2] = yday;
4827
4760
  HEAP32[tmPtr >> 2] = date.getSeconds();
4828
4761
  HEAP32[tmPtr + 4 >> 2] = date.getMinutes();
@@ -4842,7 +4775,7 @@ function __mmap_js(len, prot, flags, fd, off, allocated, addr) {
4842
4775
  HEAPU32[addr >> 2] = ptr;
4843
4776
  return 0;
4844
4777
  } catch (e) {
4845
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
4778
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
4846
4779
  return -e.errno;
4847
4780
  }
4848
4781
  }
@@ -4855,15 +4788,34 @@ function __munmap_js(addr, len, prot, flags, fd, offset) {
4855
4788
  }
4856
4789
  FS.munmap(stream);
4857
4790
  } catch (e) {
4858
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
4791
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
4859
4792
  return -e.errno;
4860
4793
  }
4861
4794
  }
4862
4795
 
4863
- function allocateUTF8(str) {
4796
+ var timers = {};
4797
+
4798
+ function __setitimer_js(which, timeout_ms) {
4799
+ if (timers[which]) {
4800
+ clearTimeout(timers[which].id);
4801
+ delete timers[which];
4802
+ }
4803
+ if (!timeout_ms) return 0;
4804
+ var id = setTimeout(() => {
4805
+ delete timers[which];
4806
+ callUserCallback(() => __emscripten_timeout(which, _emscripten_get_now()));
4807
+ }, timeout_ms);
4808
+ timers[which] = {
4809
+ id: id,
4810
+ timeout_ms: timeout_ms
4811
+ };
4812
+ return 0;
4813
+ }
4814
+
4815
+ function stringToNewUTF8(str) {
4864
4816
  var size = lengthBytesUTF8(str) + 1;
4865
4817
  var ret = _malloc(size);
4866
- if (ret) stringToUTF8Array(str, HEAP8, ret, size);
4818
+ if (ret) stringToUTF8(str, ret, size);
4867
4819
  return ret;
4868
4820
  }
4869
4821
 
@@ -4882,8 +4834,8 @@ function __tzset_js(timezone, daylight, tzname) {
4882
4834
  }
4883
4835
  var winterName = extractZone(winter);
4884
4836
  var summerName = extractZone(summer);
4885
- var winterNamePtr = allocateUTF8(winterName);
4886
- var summerNamePtr = allocateUTF8(summerName);
4837
+ var winterNamePtr = stringToNewUTF8(winterName);
4838
+ var summerNamePtr = stringToNewUTF8(summerName);
4887
4839
  if (summerOffset < winterOffset) {
4888
4840
  HEAPU32[tzname >> 2] = winterNamePtr;
4889
4841
  HEAPU32[tzname + 4 >> 2] = summerNamePtr;
@@ -4941,9 +4893,10 @@ function _emscripten_pc_get_function(pc) {
4941
4893
  }
4942
4894
 
4943
4895
  function emscripten_realloc_buffer(size) {
4896
+ var b = wasmMemory.buffer;
4944
4897
  try {
4945
- wasmMemory.grow(size - buffer.byteLength + 65535 >>> 16);
4946
- updateGlobalBufferAndViews(wasmMemory.buffer);
4898
+ wasmMemory.grow(size - b.byteLength + 65535 >>> 16);
4899
+ updateMemoryViews();
4947
4900
  return 1;
4948
4901
  } catch (e) {}
4949
4902
  }
@@ -5031,7 +4984,7 @@ function _emscripten_stack_unwind_buffer(addr, buffer, count) {
5031
4984
  return i;
5032
4985
  }
5033
4986
 
5034
- function __webgl_enable_ANGLE_instanced_arrays(ctx) {
4987
+ function webgl_enable_ANGLE_instanced_arrays(ctx) {
5035
4988
  var ext = ctx.getExtension("ANGLE_instanced_arrays");
5036
4989
  if (ext) {
5037
4990
  ctx["vertexAttribDivisor"] = function(index, divisor) {
@@ -5047,7 +5000,7 @@ function __webgl_enable_ANGLE_instanced_arrays(ctx) {
5047
5000
  }
5048
5001
  }
5049
5002
 
5050
- function __webgl_enable_OES_vertex_array_object(ctx) {
5003
+ function webgl_enable_OES_vertex_array_object(ctx) {
5051
5004
  var ext = ctx.getExtension("OES_vertex_array_object");
5052
5005
  if (ext) {
5053
5006
  ctx["createVertexArray"] = function() {
@@ -5066,7 +5019,7 @@ function __webgl_enable_OES_vertex_array_object(ctx) {
5066
5019
  }
5067
5020
  }
5068
5021
 
5069
- function __webgl_enable_WEBGL_draw_buffers(ctx) {
5022
+ function webgl_enable_WEBGL_draw_buffers(ctx) {
5070
5023
  var ext = ctx.getExtension("WEBGL_draw_buffers");
5071
5024
  if (ext) {
5072
5025
  ctx["drawBuffers"] = function(n, bufs) {
@@ -5076,15 +5029,15 @@ function __webgl_enable_WEBGL_draw_buffers(ctx) {
5076
5029
  }
5077
5030
  }
5078
5031
 
5079
- function __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx) {
5032
+ function webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx) {
5080
5033
  return !!(ctx.dibvbi = ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"));
5081
5034
  }
5082
5035
 
5083
- function __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx) {
5036
+ function webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx) {
5084
5037
  return !!(ctx.mdibvbi = ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"));
5085
5038
  }
5086
5039
 
5087
- function __webgl_enable_WEBGL_multi_draw(ctx) {
5040
+ function webgl_enable_WEBGL_multi_draw(ctx) {
5088
5041
  return !!(ctx.multiDrawWebgl = ctx.getExtension("WEBGL_multi_draw"));
5089
5042
  }
5090
5043
 
@@ -5315,18 +5268,18 @@ var GL = {
5315
5268
  if (context.initExtensionsDone) return;
5316
5269
  context.initExtensionsDone = true;
5317
5270
  var GLctx = context.GLctx;
5318
- __webgl_enable_ANGLE_instanced_arrays(GLctx);
5319
- __webgl_enable_OES_vertex_array_object(GLctx);
5320
- __webgl_enable_WEBGL_draw_buffers(GLctx);
5321
- __webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);
5322
- __webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);
5271
+ webgl_enable_ANGLE_instanced_arrays(GLctx);
5272
+ webgl_enable_OES_vertex_array_object(GLctx);
5273
+ webgl_enable_WEBGL_draw_buffers(GLctx);
5274
+ webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);
5275
+ webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);
5323
5276
  if (context.version >= 2) {
5324
5277
  GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query_webgl2");
5325
5278
  }
5326
5279
  if (context.version < 2 || !GLctx.disjointTimerQueryExt) {
5327
5280
  GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query");
5328
5281
  }
5329
- __webgl_enable_WEBGL_multi_draw(GLctx);
5282
+ webgl_enable_WEBGL_multi_draw(GLctx);
5330
5283
  var exts = GLctx.getSupportedExtensions() || [];
5331
5284
  exts.forEach(function(ext) {
5332
5285
  if (!ext.includes("lose_context") && !ext.includes("debug")) {
@@ -5443,7 +5396,7 @@ var JSEvents = {
5443
5396
  }
5444
5397
  };
5445
5398
 
5446
- var __emscripten_webgl_power_preferences = [ "default", "low-power", "high-performance" ];
5399
+ var emscripten_webgl_power_preferences = [ "default", "low-power", "high-performance" ];
5447
5400
 
5448
5401
  var specialHTMLTargets = [ 0, typeof document != "undefined" ? document : 0, typeof window != "undefined" ? window : 0 ];
5449
5402
 
@@ -5478,7 +5431,7 @@ function _emscripten_webgl_do_create_context(target, attributes) {
5478
5431
  "antialias": !!HEAP32[a + (12 >> 2)],
5479
5432
  "premultipliedAlpha": !!HEAP32[a + (16 >> 2)],
5480
5433
  "preserveDrawingBuffer": !!HEAP32[a + (20 >> 2)],
5481
- "powerPreference": __emscripten_webgl_power_preferences[powerPreference],
5434
+ "powerPreference": emscripten_webgl_power_preferences[powerPreference],
5482
5435
  "failIfMajorPerformanceCaveat": !!HEAP32[a + (28 >> 2)],
5483
5436
  majorVersion: HEAP32[a + (32 >> 2)],
5484
5437
  minorVersion: HEAP32[a + (36 >> 2)],
@@ -5518,7 +5471,7 @@ function _emscripten_webgl_get_context_attributes(c, a) {
5518
5471
  HEAP32[a + 12 >> 2] = t.antialias;
5519
5472
  HEAP32[a + 16 >> 2] = t.premultipliedAlpha;
5520
5473
  HEAP32[a + 20 >> 2] = t.preserveDrawingBuffer;
5521
- var power = t["powerPreference"] && __emscripten_webgl_power_preferences.indexOf(t["powerPreference"]);
5474
+ var power = t["powerPreference"] && emscripten_webgl_power_preferences.indexOf(t["powerPreference"]);
5522
5475
  HEAP32[a + 24 >> 2] = power;
5523
5476
  HEAP32[a + 28 >> 2] = t.failIfMajorPerformanceCaveat;
5524
5477
  HEAP32[a + 32 >> 2] = c.version;
@@ -5552,8 +5505,7 @@ var WebGPU = {
5552
5505
  function Manager() {
5553
5506
  this.objects = {};
5554
5507
  this.nextId = 1;
5555
- this.create = function(object, wrapper) {
5556
- wrapper = wrapper || {};
5508
+ this.create = function(object, wrapper = {}) {
5557
5509
  var id = this.nextId++;
5558
5510
  wrapper.refcount = 1;
5559
5511
  wrapper.object = object;
@@ -5809,11 +5761,11 @@ function getEnvStrings() {
5809
5761
  return getEnvStrings.strings;
5810
5762
  }
5811
5763
 
5812
- function writeAsciiToMemory(str, buffer, dontAddNull) {
5764
+ function stringToAscii(str, buffer) {
5813
5765
  for (var i = 0; i < str.length; ++i) {
5814
5766
  HEAP8[buffer++ >> 0] = str.charCodeAt(i);
5815
5767
  }
5816
- if (!dontAddNull) HEAP8[buffer >> 0] = 0;
5768
+ HEAP8[buffer >> 0] = 0;
5817
5769
  }
5818
5770
 
5819
5771
  function _environ_get(__environ, environ_buf) {
@@ -5821,7 +5773,7 @@ function _environ_get(__environ, environ_buf) {
5821
5773
  getEnvStrings().forEach(function(string, i) {
5822
5774
  var ptr = environ_buf + bufSize;
5823
5775
  HEAPU32[__environ + i * 4 >> 2] = ptr;
5824
- writeAsciiToMemory(string, ptr);
5776
+ stringToAscii(string, ptr);
5825
5777
  bufSize += string.length + 1;
5826
5778
  });
5827
5779
  return 0;
@@ -5844,7 +5796,7 @@ function _fd_close(fd) {
5844
5796
  FS.close(stream);
5845
5797
  return 0;
5846
5798
  } catch (e) {
5847
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
5799
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
5848
5800
  return e.errno;
5849
5801
  }
5850
5802
  }
@@ -5859,6 +5811,9 @@ function doReadv(stream, iov, iovcnt, offset) {
5859
5811
  if (curr < 0) return -1;
5860
5812
  ret += curr;
5861
5813
  if (curr < len) break;
5814
+ if (typeof offset !== "undefined") {
5815
+ offset += curr;
5816
+ }
5862
5817
  }
5863
5818
  return ret;
5864
5819
  }
@@ -5870,7 +5825,7 @@ function _fd_read(fd, iov, iovcnt, pnum) {
5870
5825
  HEAPU32[pnum >> 2] = num;
5871
5826
  return 0;
5872
5827
  } catch (e) {
5873
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
5828
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
5874
5829
  return e.errno;
5875
5830
  }
5876
5831
  }
@@ -5890,7 +5845,7 @@ function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
5890
5845
  if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null;
5891
5846
  return 0;
5892
5847
  } catch (e) {
5893
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
5848
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
5894
5849
  return e.errno;
5895
5850
  }
5896
5851
  }
@@ -5904,6 +5859,9 @@ function doWritev(stream, iov, iovcnt, offset) {
5904
5859
  var curr = FS.write(stream, HEAP8, ptr, len, offset);
5905
5860
  if (curr < 0) return -1;
5906
5861
  ret += curr;
5862
+ if (typeof offset !== "undefined") {
5863
+ offset += curr;
5864
+ }
5907
5865
  }
5908
5866
  return ret;
5909
5867
  }
@@ -5915,18 +5873,13 @@ function _fd_write(fd, iov, iovcnt, pnum) {
5915
5873
  HEAPU32[pnum >> 2] = num;
5916
5874
  return 0;
5917
5875
  } catch (e) {
5918
- if (typeof FS == "undefined" || !(e instanceof FS.ErrnoError)) throw e;
5876
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
5919
5877
  return e.errno;
5920
5878
  }
5921
5879
  }
5922
5880
 
5923
5881
  function _getentropy(buffer, size) {
5924
- if (!_getentropy.randomDevice) {
5925
- _getentropy.randomDevice = getRandomDevice();
5926
- }
5927
- for (var i = 0; i < size; i++) {
5928
- HEAP8[buffer + i >> 0] = _getentropy.randomDevice();
5929
- }
5882
+ randomFill(HEAPU8.subarray(buffer, buffer + size));
5930
5883
  return 0;
5931
5884
  }
5932
5885
 
@@ -6006,8 +5959,9 @@ function convertI32PairToI53(lo, hi) {
6006
5959
  return (lo >>> 0) + hi * 4294967296;
6007
5960
  }
6008
5961
 
6009
- function _glClientWaitSync(sync, flags, timeoutLo, timeoutHi) {
6010
- return GLctx.clientWaitSync(GL.syncs[sync], flags, convertI32PairToI53(timeoutLo, timeoutHi));
5962
+ function _glClientWaitSync(sync, flags, timeout_low, timeout_high) {
5963
+ var timeout = convertI32PairToI53(timeout_low, timeout_high);
5964
+ return GLctx.clientWaitSync(GL.syncs[sync], flags, timeout);
6011
5965
  }
6012
5966
 
6013
5967
  function _glCompileShader(shader) {
@@ -6434,13 +6388,6 @@ function _glGetShaderiv(shader, pname, p) {
6434
6388
  }
6435
6389
  }
6436
6390
 
6437
- function stringToNewUTF8(jsString) {
6438
- var length = lengthBytesUTF8(jsString) + 1;
6439
- var cString = _malloc(length);
6440
- stringToUTF8(jsString, cString, length);
6441
- return cString;
6442
- }
6443
-
6444
6391
  function _glGetString(name_) {
6445
6392
  var ret = GL.stringCache[name_];
6446
6393
  if (!ret) {
@@ -6573,7 +6520,7 @@ function computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) {
6573
6520
  return height * alignedRowSize;
6574
6521
  }
6575
6522
 
6576
- function __colorChannelsInGlTextureFormat(format) {
6523
+ function colorChannelsInGlTextureFormat(format) {
6577
6524
  var colorChannels = {
6578
6525
  5: 3,
6579
6526
  6: 4,
@@ -6607,7 +6554,7 @@ function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, int
6607
6554
  var heap = heapObjectForWebGLType(type);
6608
6555
  var shift = heapAccessShiftForWebGLHeap(heap);
6609
6556
  var byteSize = 1 << shift;
6610
- var sizePerPixel = __colorChannelsInGlTextureFormat(format) * byteSize;
6557
+ var sizePerPixel = colorChannelsInGlTextureFormat(format) * byteSize;
6611
6558
  var bytes = computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment);
6612
6559
  return heap.subarray(pixels >> shift, pixels + bytes >> shift);
6613
6560
  }
@@ -6716,6 +6663,10 @@ function _glUniform1i(location, v0) {
6716
6663
  GLctx.uniform1i(webglGetUniformLocation(location), v0);
6717
6664
  }
6718
6665
 
6666
+ function _glUniform2f(location, v0, v1) {
6667
+ GLctx.uniform2f(webglGetUniformLocation(location), v0, v1);
6668
+ }
6669
+
6719
6670
  var miniTempWebGLFloatBuffers = [];
6720
6671
 
6721
6672
  function _glUniform2fv(location, count, value) {
@@ -6757,7 +6708,7 @@ function _glUniform4fv(location, count, value) {
6757
6708
  GLctx.uniform4fv(webglGetUniformLocation(location), view);
6758
6709
  }
6759
6710
 
6760
- var __miniTempWebGLIntBuffers = [];
6711
+ var miniTempWebGLIntBuffers = [];
6761
6712
 
6762
6713
  function _glUniform4iv(location, count, value) {
6763
6714
  if (GL.currentContext.version >= 2) {
@@ -6765,7 +6716,7 @@ function _glUniform4iv(location, count, value) {
6765
6716
  return;
6766
6717
  }
6767
6718
  if (count <= 72) {
6768
- var view = __miniTempWebGLIntBuffers[4 * count - 1];
6719
+ var view = miniTempWebGLIntBuffers[4 * count - 1];
6769
6720
  for (var i = 0; i < 4 * count; i += 4) {
6770
6721
  view[i] = HEAP32[value + 4 * i >> 2];
6771
6722
  view[i + 1] = HEAP32[value + (4 * i + 4) >> 2];
@@ -6858,22 +6809,22 @@ function _mediapipe_webgl_tex_image_drawable(drawableHandle) {
6858
6809
  GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, drawable);
6859
6810
  }
6860
6811
 
6861
- function __arraySum(array, index) {
6812
+ function arraySum(array, index) {
6862
6813
  var sum = 0;
6863
6814
  for (var i = 0; i <= index; sum += array[i++]) {}
6864
6815
  return sum;
6865
6816
  }
6866
6817
 
6867
- var __MONTH_DAYS_LEAP = [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6818
+ var MONTH_DAYS_LEAP = [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6868
6819
 
6869
- var __MONTH_DAYS_REGULAR = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6820
+ var MONTH_DAYS_REGULAR = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6870
6821
 
6871
- function __addDays(date, days) {
6822
+ function addDays(date, days) {
6872
6823
  var newDate = new Date(date.getTime());
6873
6824
  while (days > 0) {
6874
- var leap = __isLeapYear(newDate.getFullYear());
6825
+ var leap = isLeapYear(newDate.getFullYear());
6875
6826
  var currentMonth = newDate.getMonth();
6876
- var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth];
6827
+ var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth];
6877
6828
  if (days > daysInCurrentMonth - newDate.getDate()) {
6878
6829
  days -= daysInCurrentMonth - newDate.getDate() + 1;
6879
6830
  newDate.setDate(1);
@@ -6993,7 +6944,7 @@ function _strftime(s, maxsize, format, tm) {
6993
6944
  }
6994
6945
  }
6995
6946
  function getWeekBasedYear(date) {
6996
- var thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
6947
+ var thisDate = addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
6997
6948
  var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);
6998
6949
  var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4);
6999
6950
  var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
@@ -7044,7 +6995,7 @@ function _strftime(s, maxsize, format, tm) {
7044
6995
  return leadingNulls(twelveHour, 2);
7045
6996
  },
7046
6997
  "%j": function(date) {
7047
- return leadingNulls(date.tm_mday + __arraySum(__isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
6998
+ return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year + 1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
7048
6999
  },
7049
7000
  "%m": function(date) {
7050
7001
  return leadingNulls(date.tm_mon + 1, 2);
@@ -7082,12 +7033,12 @@ function _strftime(s, maxsize, format, tm) {
7082
7033
  if (!val) {
7083
7034
  val = 52;
7084
7035
  var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7;
7085
- if (dec31 == 4 || dec31 == 5 && __isLeapYear(date.tm_year % 400 - 1)) {
7036
+ if (dec31 == 4 || dec31 == 5 && isLeapYear(date.tm_year % 400 - 1)) {
7086
7037
  val++;
7087
7038
  }
7088
7039
  } else if (val == 53) {
7089
7040
  var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7;
7090
- if (jan1 != 4 && (jan1 != 3 || !__isLeapYear(date.tm_year))) val = 1;
7041
+ if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year))) val = 1;
7091
7042
  }
7092
7043
  return leadingNulls(val, 2);
7093
7044
  },
@@ -7324,11 +7275,7 @@ function _wgpuCommandEncoderRelease(id) {
7324
7275
 
7325
7276
  function _wgpuComputePassEncoderDispatchWorkgroups(passId, x, y, z) {
7326
7277
  var pass = WebGPU.mgrComputePassEncoder.get(passId);
7327
- if (pass["dispatchWorkgroups"]) {
7328
- pass["dispatchWorkgroups"](x, y, z);
7329
- } else {
7330
- pass["dispatch"](x, y, z);
7331
- }
7278
+ pass["dispatchWorkgroups"](x, y, z);
7332
7279
  }
7333
7280
 
7334
7281
  function _wgpuComputePassEncoderEnd(passId) {
@@ -7376,9 +7323,9 @@ function _wgpuDeviceCreateBindGroup(deviceId, descriptor) {
7376
7323
  var textureViewId = HEAPU32[entryPtr + 36 >> 2];
7377
7324
  var binding = HEAPU32[entryPtr + 4 >> 2];
7378
7325
  if (bufferId) {
7379
- var size_low = HEAPU32[entryPtr + 24 >> 2];
7380
- var size_high = HEAPU32[entryPtr + 28 >> 2];
7381
- var size = size_high === -1 && size_low === -1 ? undefined : size_high * 4294967296 + size_low;
7326
+ var size_low = HEAP32[entryPtr + 24 >> 2];
7327
+ var size_high = HEAP32[entryPtr + 28 >> 2];
7328
+ var size = size_high === -1 && size_low === -1 ? undefined : (size_high >>> 0) * 4294967296 + (size_low >>> 0);
7382
7329
  return {
7383
7330
  "binding": binding,
7384
7331
  "resource": {
@@ -7707,7 +7654,7 @@ function _wgpuQueueSubmit(queueId, commandCount, commands) {
7707
7654
  function _wgpuQueueWriteBuffer(queueId, bufferId, bufferOffset_low, bufferOffset_high, data, size) {
7708
7655
  var queue = WebGPU.mgrQueue.get(queueId);
7709
7656
  var buffer = WebGPU.mgrBuffer.get(bufferId);
7710
- var bufferOffset = bufferOffset_high * 4294967296 + bufferOffset_low;
7657
+ var bufferOffset = (bufferOffset_high >>> 0) * 4294967296 + (bufferOffset_low >>> 0);
7711
7658
  var subarray = HEAPU8.subarray(data, data + size);
7712
7659
  queue["writeBuffer"](buffer, bufferOffset, subarray, 0, size);
7713
7660
  }
@@ -7817,14 +7764,19 @@ function getCFunc(ident) {
7817
7764
  return func;
7818
7765
  }
7819
7766
 
7767
+ function stringToUTF8OnStack(str) {
7768
+ var size = lengthBytesUTF8(str) + 1;
7769
+ var ret = stackAlloc(size);
7770
+ stringToUTF8(str, ret, size);
7771
+ return ret;
7772
+ }
7773
+
7820
7774
  function ccall(ident, returnType, argTypes, args, opts) {
7821
7775
  var toC = {
7822
7776
  "string": str => {
7823
7777
  var ret = 0;
7824
7778
  if (str !== null && str !== undefined && str !== 0) {
7825
- var len = (str.length << 2) + 1;
7826
- ret = stackAlloc(len);
7827
- stringToUTF8(str, ret, len);
7779
+ ret = stringToUTF8OnStack(str);
7828
7780
  }
7829
7781
  return ret;
7830
7782
  },
@@ -7980,464 +7932,473 @@ for (var i = 0; i < 288; ++i) {
7980
7932
  miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i + 1);
7981
7933
  }
7982
7934
 
7983
- var __miniTempWebGLIntBuffersStorage = new Int32Array(288);
7935
+ var miniTempWebGLIntBuffersStorage = new Int32Array(288);
7984
7936
 
7985
7937
  for (var i = 0; i < 288; ++i) {
7986
- __miniTempWebGLIntBuffers[i] = __miniTempWebGLIntBuffersStorage.subarray(0, i + 1);
7987
- }
7988
-
7989
- var asmLibraryArg = {
7990
- "hd": HaveOffsetConverter,
7991
- "gd": JsOnEmptyPacketListener,
7992
- "fd": JsOnFloat32ArrayImageListener,
7993
- "ed": JsOnFloat32ArrayImageVectorListener,
7994
- "Ha": JsOnSimpleListenerBinaryArray,
7995
- "dd": JsOnSimpleListenerBool,
7996
- "cd": JsOnSimpleListenerDouble,
7997
- "bd": JsOnSimpleListenerFloat,
7998
- "ad": JsOnSimpleListenerInt,
7999
- "$c": JsOnSimpleListenerString,
8000
- "_c": JsOnUint8ClampedArrayImageListener,
8001
- "Zc": JsOnUint8ClampedArrayImageVectorListener,
8002
- "G": JsOnVectorFinishedListener,
8003
- "Yc": JsOnVectorListenerBool,
8004
- "Xc": JsOnVectorListenerDouble,
8005
- "Wc": JsOnVectorListenerFloat,
8006
- "Vc": JsOnVectorListenerInt,
8007
- "Uc": JsOnVectorListenerProto,
8008
- "Tc": JsOnVectorListenerString,
8009
- "Sc": JsOnWebGLTextureListener,
8010
- "Rc": JsOnWebGLTextureVectorListener,
8011
- "A": JsWrapErrorListener,
8012
- "Ga": JsWrapImageConverter,
8013
- "n": JsWrapSimpleListeners,
8014
- "h": ___cxa_allocate_exception,
8015
- "g": ___cxa_throw,
8016
- "Fa": ___syscall_fcntl64,
7938
+ miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i + 1);
7939
+ }
7940
+
7941
+ var wasmImports = {
7942
+ "id": HaveOffsetConverter,
7943
+ "hd": JsOnEmptyPacketListener,
7944
+ "gd": JsOnFloat32ArrayImageListener,
7945
+ "fd": JsOnFloat32ArrayImageVectorListener,
7946
+ "Ka": JsOnSimpleListenerBinaryArray,
7947
+ "ed": JsOnSimpleListenerBool,
7948
+ "dd": JsOnSimpleListenerDouble,
7949
+ "cd": JsOnSimpleListenerFloat,
7950
+ "bd": JsOnSimpleListenerInt,
7951
+ "ad": JsOnSimpleListenerString,
7952
+ "$c": JsOnUint8ClampedArrayImageListener,
7953
+ "_c": JsOnUint8ClampedArrayImageVectorListener,
7954
+ "J": JsOnVectorFinishedListener,
7955
+ "Zc": JsOnVectorListenerBool,
7956
+ "Yc": JsOnVectorListenerDouble,
7957
+ "Xc": JsOnVectorListenerFloat,
7958
+ "Wc": JsOnVectorListenerInt,
7959
+ "Vc": JsOnVectorListenerProto,
7960
+ "Uc": JsOnVectorListenerString,
7961
+ "Tc": JsOnWebGLTextureListener,
7962
+ "Sc": JsOnWebGLTextureVectorListener,
7963
+ "C": JsWrapErrorListener,
7964
+ "Ja": JsWrapImageConverter,
7965
+ "r": JsWrapSimpleListeners,
7966
+ "Rc": ___call_sighandler,
7967
+ "i": ___cxa_throw,
7968
+ "Ia": ___syscall_fcntl64,
8017
7969
  "Qc": ___syscall_fstat64,
8018
7970
  "Pc": ___syscall_ioctl,
8019
7971
  "Oc": ___syscall_lstat64,
8020
7972
  "Nc": ___syscall_newfstatat,
8021
- "Ea": ___syscall_openat,
7973
+ "Ha": ___syscall_openat,
8022
7974
  "Mc": ___syscall_stat64,
8023
- "Ic": __dlinit,
8024
- "Hc": __dlopen_js,
8025
- "Gc": __dlsym_js,
8026
- "Nb": __embind_register_bigint,
8027
- "Fc": __embind_register_bool,
8028
- "Ec": __embind_register_emval,
8029
- "Ca": __embind_register_float,
8030
- "y": __embind_register_integer,
8031
- "l": __embind_register_memory_view,
8032
- "Ba": __embind_register_std_string,
8033
- "fa": __embind_register_std_wstring,
8034
- "Dc": __embind_register_void,
8035
- "Cc": __emscripten_get_now_is_monotonic,
8036
- "ea": __emval_as,
8037
- "i": __emval_decref,
8038
- "da": __emval_get_global,
8039
- "Aa": __emval_get_property,
8040
- "za": __emval_incref,
8041
- "ca": __emval_instanceof,
8042
- "Y": __emval_new_cstring,
8043
- "ba": __emval_run_destructors,
8044
- "ya": __emval_set_property,
8045
- "X": __emval_take_value,
8046
- "Bc": __emval_typeof,
8047
- "Ac": __gmtime_js,
8048
- "zc": __localtime_js,
8049
- "yc": __mktime_js,
8050
- "xc": __mmap_js,
8051
- "wc": __munmap_js,
8052
- "vc": __tzset_js,
7975
+ "Ic": __dlopen_js,
7976
+ "Hc": __dlsym_js,
7977
+ "Qb": __embind_register_bigint,
7978
+ "Gc": __embind_register_bool,
7979
+ "Fc": __embind_register_emval,
7980
+ "Fa": __embind_register_float,
7981
+ "B": __embind_register_integer,
7982
+ "k": __embind_register_memory_view,
7983
+ "Ea": __embind_register_std_string,
7984
+ "ha": __embind_register_std_wstring,
7985
+ "Ec": __embind_register_void,
7986
+ "Dc": __emscripten_get_now_is_monotonic,
7987
+ "ga": __emval_as,
7988
+ "j": __emval_decref,
7989
+ "fa": __emval_get_global,
7990
+ "Da": __emval_get_property,
7991
+ "Ca": __emval_incref,
7992
+ "ea": __emval_instanceof,
7993
+ "Z": __emval_new_cstring,
7994
+ "da": __emval_run_destructors,
7995
+ "Ba": __emval_set_property,
7996
+ "Y": __emval_take_value,
7997
+ "Cc": __emval_typeof,
7998
+ "Bc": __gmtime_js,
7999
+ "Ac": __localtime_js,
8000
+ "zc": __mktime_js,
8001
+ "yc": __mmap_js,
8002
+ "xc": __munmap_js,
8003
+ "Aa": __setitimer_js,
8004
+ "wc": __tzset_js,
8053
8005
  "a": _abort,
8054
- "x": _emscripten_asm_const_int,
8055
- "uc": _emscripten_date_now,
8056
- "tc": _emscripten_get_heap_max,
8057
- "z": _emscripten_get_now,
8058
- "sc": _emscripten_memcpy_big,
8059
- "rc": _emscripten_pc_get_function,
8060
- "qc": _emscripten_resize_heap,
8061
- "pc": _emscripten_stack_snapshot,
8062
- "oc": _emscripten_stack_unwind_buffer,
8063
- "nc": _emscripten_webgl_create_context,
8064
- "mc": _emscripten_webgl_destroy_context,
8065
- "lc": _emscripten_webgl_get_context_attributes,
8066
- "xa": _emscripten_webgl_get_current_context,
8067
- "kc": _emscripten_webgl_init_context_attributes,
8068
- "jc": _emscripten_webgl_make_context_current,
8069
- "ic": _emscripten_webgpu_export_bind_group_layout,
8070
- "wa": _emscripten_webgpu_export_device,
8071
- "hc": _emscripten_webgpu_export_sampler,
8072
- "gc": _emscripten_webgpu_export_texture,
8073
- "F": _emscripten_webgpu_get_device,
8074
- "fc": _emscripten_webgpu_import_bind_group,
8075
- "ec": _emscripten_webgpu_import_texture,
8076
- "R": _emscripten_webgpu_release_js_handle,
8006
+ "A": _emscripten_asm_const_int,
8007
+ "vc": _emscripten_date_now,
8008
+ "uc": _emscripten_get_heap_max,
8009
+ "q": _emscripten_get_now,
8010
+ "tc": _emscripten_memcpy_big,
8011
+ "sc": _emscripten_pc_get_function,
8012
+ "rc": _emscripten_resize_heap,
8013
+ "qc": _emscripten_stack_snapshot,
8014
+ "pc": _emscripten_stack_unwind_buffer,
8015
+ "oc": _emscripten_webgl_create_context,
8016
+ "nc": _emscripten_webgl_destroy_context,
8017
+ "mc": _emscripten_webgl_get_context_attributes,
8018
+ "za": _emscripten_webgl_get_current_context,
8019
+ "lc": _emscripten_webgl_init_context_attributes,
8020
+ "kc": _emscripten_webgl_make_context_current,
8021
+ "jc": _emscripten_webgpu_export_bind_group_layout,
8022
+ "ya": _emscripten_webgpu_export_device,
8023
+ "ic": _emscripten_webgpu_export_sampler,
8024
+ "hc": _emscripten_webgpu_export_texture,
8025
+ "I": _emscripten_webgpu_get_device,
8026
+ "gc": _emscripten_webgpu_import_bind_group,
8027
+ "fc": _emscripten_webgpu_import_texture,
8028
+ "Q": _emscripten_webgpu_release_js_handle,
8077
8029
  "Lc": _environ_get,
8078
8030
  "Kc": _environ_sizes_get,
8079
- "va": _exit,
8080
- "ha": _fd_close,
8081
- "Da": _fd_read,
8082
- "Ob": _fd_seek,
8083
- "ga": _fd_write,
8084
- "dc": _getentropy,
8031
+ "xa": _exit,
8032
+ "ja": _fd_close,
8033
+ "Ga": _fd_read,
8034
+ "Rb": _fd_seek,
8035
+ "ia": _fd_write,
8036
+ "ec": _getentropy,
8085
8037
  "d": _glActiveTexture,
8086
- "W": _glAttachShader,
8087
- "cc": _glBindAttribLocation,
8088
- "f": _glBindBuffer,
8089
- "bc": _glBindBufferBase,
8090
- "q": _glBindFramebuffer,
8038
+ "X": _glAttachShader,
8039
+ "dc": _glBindAttribLocation,
8040
+ "e": _glBindBuffer,
8041
+ "cc": _glBindBufferBase,
8042
+ "t": _glBindFramebuffer,
8091
8043
  "b": _glBindTexture,
8092
- "J": _glBindVertexArray,
8093
- "ua": _glBlendEquation,
8094
- "ac": _glBlendFunc,
8095
- "w": _glBufferData,
8096
- "t": _glClear,
8097
- "aa": _glClearColor,
8098
- "Mb": _glClientWaitSync,
8099
- "ta": _glCompileShader,
8100
- "sa": _glCreateProgram,
8101
- "ra": _glCreateShader,
8102
- "Q": _glDeleteBuffers,
8103
- "P": _glDeleteFramebuffers,
8104
- "p": _glDeleteProgram,
8105
- "O": _glDeleteShader,
8106
- "N": _glDeleteSync,
8107
- "v": _glDeleteTextures,
8108
- "qa": _glDeleteVertexArrays,
8109
- "I": _glDisable,
8110
- "H": _glDisableVertexAttribArray,
8111
- "o": _glDrawArrays,
8112
- "M": _glDrawBuffers,
8113
- "$b": _glEnable,
8114
- "s": _glEnableVertexAttribArray,
8115
- "pa": _glFenceSync,
8044
+ "y": _glBindVertexArray,
8045
+ "wa": _glBlendEquation,
8046
+ "bc": _glBlendFunc,
8047
+ "s": _glBufferData,
8048
+ "v": _glClear,
8049
+ "ca": _glClearColor,
8050
+ "Pb": _glClientWaitSync,
8051
+ "va": _glCompileShader,
8052
+ "ua": _glCreateProgram,
8053
+ "ta": _glCreateShader,
8054
+ "H": _glDeleteBuffers,
8055
+ "M": _glDeleteFramebuffers,
8056
+ "l": _glDeleteProgram,
8057
+ "P": _glDeleteShader,
8058
+ "O": _glDeleteSync,
8059
+ "x": _glDeleteTextures,
8060
+ "W": _glDeleteVertexArrays,
8061
+ "G": _glDisable,
8062
+ "w": _glDisableVertexAttribArray,
8063
+ "m": _glDrawArrays,
8064
+ "N": _glDrawBuffers,
8065
+ "ac": _glEnable,
8066
+ "p": _glEnableVertexAttribArray,
8067
+ "sa": _glFenceSync,
8116
8068
  "V": _glFinish,
8117
- "_b": _glFlush,
8069
+ "ba": _glFlush,
8118
8070
  "u": _glFramebufferTexture2D,
8119
- "oa": _glFramebufferTextureLayer,
8120
- "E": _glGenBuffers,
8071
+ "ra": _glFramebufferTextureLayer,
8072
+ "z": _glGenBuffers,
8121
8073
  "L": _glGenFramebuffers,
8122
- "D": _glGenTextures,
8123
- "na": _glGenVertexArrays,
8124
- "ma": _glGetAttribLocation,
8125
- "U": _glGetError,
8126
- "m": _glGetIntegerv,
8127
- "Zb": _glGetProgramiv,
8128
- "Yb": _glGetShaderInfoLog,
8129
- "Xb": _glGetShaderiv,
8130
- "C": _glGetString,
8131
- "Wb": _glGetUniformBlockIndex,
8132
- "j": _glGetUniformLocation,
8133
- "la": _glLinkProgram,
8134
- "T": _glPixelStorei,
8135
- "ka": _glReadPixels,
8136
- "ja": _glShaderSource,
8137
- "B": _glTexImage2D,
8138
- "Vb": _glTexParameterfv,
8074
+ "F": _glGenTextures,
8075
+ "U": _glGenVertexArrays,
8076
+ "qa": _glGetAttribLocation,
8077
+ "T": _glGetError,
8078
+ "o": _glGetIntegerv,
8079
+ "$b": _glGetProgramiv,
8080
+ "_b": _glGetShaderInfoLog,
8081
+ "Zb": _glGetShaderiv,
8082
+ "E": _glGetString,
8083
+ "Yb": _glGetUniformBlockIndex,
8084
+ "h": _glGetUniformLocation,
8085
+ "pa": _glLinkProgram,
8086
+ "S": _glPixelStorei,
8087
+ "oa": _glReadPixels,
8088
+ "na": _glShaderSource,
8089
+ "D": _glTexImage2D,
8090
+ "ma": _glTexParameterfv,
8139
8091
  "c": _glTexParameteri,
8140
- "$": _glTexStorage2D,
8141
- "Ub": _glTexStorage3D,
8142
- "_": _glTexSubImage2D,
8143
- "Tb": _glTexSubImage3D,
8144
- "Z": _glUniform1f,
8145
- "e": _glUniform1i,
8146
- "Sb": _glUniform2fv,
8147
- "ia": _glUniform4fv,
8148
- "Rb": _glUniform4iv,
8149
- "Qb": _glUniformBlockBinding,
8150
- "Pb": _glUniformMatrix4fv,
8151
- "k": _glUseProgram,
8152
- "r": _glVertexAttribPointer,
8092
+ "aa": _glTexStorage2D,
8093
+ "Xb": _glTexStorage3D,
8094
+ "$": _glTexSubImage2D,
8095
+ "Wb": _glTexSubImage3D,
8096
+ "_": _glUniform1f,
8097
+ "f": _glUniform1i,
8098
+ "Vb": _glUniform2f,
8099
+ "Ub": _glUniform2fv,
8100
+ "la": _glUniform4fv,
8101
+ "Tb": _glUniform4iv,
8102
+ "Sb": _glUniformBlockBinding,
8103
+ "ka": _glUniformMatrix4fv,
8104
+ "g": _glUseProgram,
8105
+ "n": _glVertexAttribPointer,
8153
8106
  "K": _glViewport,
8154
- "Kb": mediapipe_create_utility_canvas2d,
8155
- "Jb": _mediapipe_find_canvas_event_target,
8156
- "Ib": mediapipe_import_external_texture,
8157
- "Hb": _mediapipe_webgl_tex_image_drawable,
8107
+ "Nb": mediapipe_create_utility_canvas2d,
8108
+ "Mb": _mediapipe_find_canvas_event_target,
8109
+ "Lb": mediapipe_import_external_texture,
8110
+ "Kb": _mediapipe_webgl_tex_image_drawable,
8158
8111
  "Jc": _proc_exit,
8159
- "S": _strftime,
8160
- "Gb": _strftime_l,
8161
- "Fb": _wgpuBindGroupLayoutRelease,
8162
- "Eb": _wgpuBindGroupRelease,
8163
- "Db": _wgpuBufferGetMappedRange,
8164
- "Cb": _wgpuBufferReference,
8165
- "Bb": _wgpuBufferRelease,
8166
- "Ab": _wgpuBufferUnmap,
8167
- "zb": _wgpuCommandBufferRelease,
8168
- "yb": _wgpuCommandEncoderBeginComputePass,
8169
- "xb": _wgpuCommandEncoderBeginRenderPass,
8170
- "wb": _wgpuCommandEncoderCopyBufferToTexture,
8171
- "vb": _wgpuCommandEncoderCopyTextureToTexture,
8172
- "ub": _wgpuCommandEncoderFinish,
8173
- "tb": _wgpuCommandEncoderRelease,
8174
- "sb": _wgpuComputePassEncoderDispatchWorkgroups,
8175
- "rb": _wgpuComputePassEncoderEnd,
8176
- "qb": _wgpuComputePassEncoderRelease,
8177
- "pb": _wgpuComputePassEncoderSetBindGroup,
8178
- "ob": _wgpuComputePassEncoderSetPipeline,
8179
- "nb": _wgpuComputePipelineGetBindGroupLayout,
8180
- "mb": _wgpuComputePipelineRelease,
8181
- "lb": _wgpuDeviceCreateBindGroup,
8182
- "kb": _wgpuDeviceCreateBuffer,
8183
- "jb": _wgpuDeviceCreateCommandEncoder,
8184
- "ib": _wgpuDeviceCreateComputePipeline,
8185
- "hb": _wgpuDeviceCreateRenderPipeline,
8186
- "gb": _wgpuDeviceCreateSampler,
8187
- "fb": _wgpuDeviceCreateShaderModule,
8188
- "eb": _wgpuDeviceCreateTexture,
8189
- "db": _wgpuDeviceGetQueue,
8190
- "cb": _wgpuDeviceReference,
8191
- "bb": _wgpuDeviceRelease,
8192
- "ab": _wgpuPipelineLayoutRelease,
8193
- "$a": _wgpuQuerySetRelease,
8194
- "_a": _wgpuQueueRelease,
8195
- "Za": _wgpuQueueSubmit,
8196
- "Lb": _wgpuQueueWriteBuffer,
8197
- "Ya": _wgpuRenderPassEncoderDraw,
8198
- "Xa": _wgpuRenderPassEncoderEnd,
8199
- "Wa": _wgpuRenderPassEncoderRelease,
8200
- "Va": _wgpuRenderPassEncoderSetBindGroup,
8201
- "Ua": _wgpuRenderPassEncoderSetPipeline,
8202
- "Ta": _wgpuRenderPipelineGetBindGroupLayout,
8203
- "Sa": _wgpuRenderPipelineRelease,
8204
- "Ra": _wgpuSamplerReference,
8205
- "Qa": _wgpuSamplerRelease,
8206
- "Pa": _wgpuShaderModuleReference,
8207
- "Oa": _wgpuShaderModuleRelease,
8208
- "Na": _wgpuTextureCreateView,
8209
- "Ma": _wgpuTextureDestroy,
8210
- "La": _wgpuTextureReference,
8211
- "Ka": _wgpuTextureRelease,
8212
- "Ja": _wgpuTextureViewReference,
8213
- "Ia": _wgpuTextureViewRelease
8112
+ "R": _strftime,
8113
+ "Jb": _strftime_l,
8114
+ "Ib": _wgpuBindGroupLayoutRelease,
8115
+ "Hb": _wgpuBindGroupRelease,
8116
+ "Gb": _wgpuBufferGetMappedRange,
8117
+ "Fb": _wgpuBufferReference,
8118
+ "Eb": _wgpuBufferRelease,
8119
+ "Db": _wgpuBufferUnmap,
8120
+ "Cb": _wgpuCommandBufferRelease,
8121
+ "Bb": _wgpuCommandEncoderBeginComputePass,
8122
+ "Ab": _wgpuCommandEncoderBeginRenderPass,
8123
+ "zb": _wgpuCommandEncoderCopyBufferToTexture,
8124
+ "yb": _wgpuCommandEncoderCopyTextureToTexture,
8125
+ "xb": _wgpuCommandEncoderFinish,
8126
+ "wb": _wgpuCommandEncoderRelease,
8127
+ "vb": _wgpuComputePassEncoderDispatchWorkgroups,
8128
+ "ub": _wgpuComputePassEncoderEnd,
8129
+ "tb": _wgpuComputePassEncoderRelease,
8130
+ "sb": _wgpuComputePassEncoderSetBindGroup,
8131
+ "rb": _wgpuComputePassEncoderSetPipeline,
8132
+ "qb": _wgpuComputePipelineGetBindGroupLayout,
8133
+ "pb": _wgpuComputePipelineRelease,
8134
+ "ob": _wgpuDeviceCreateBindGroup,
8135
+ "nb": _wgpuDeviceCreateBuffer,
8136
+ "mb": _wgpuDeviceCreateCommandEncoder,
8137
+ "lb": _wgpuDeviceCreateComputePipeline,
8138
+ "kb": _wgpuDeviceCreateRenderPipeline,
8139
+ "jb": _wgpuDeviceCreateSampler,
8140
+ "ib": _wgpuDeviceCreateShaderModule,
8141
+ "hb": _wgpuDeviceCreateTexture,
8142
+ "gb": _wgpuDeviceGetQueue,
8143
+ "fb": _wgpuDeviceReference,
8144
+ "eb": _wgpuDeviceRelease,
8145
+ "db": _wgpuPipelineLayoutRelease,
8146
+ "cb": _wgpuQuerySetRelease,
8147
+ "bb": _wgpuQueueRelease,
8148
+ "ab": _wgpuQueueSubmit,
8149
+ "Ob": _wgpuQueueWriteBuffer,
8150
+ "$a": _wgpuRenderPassEncoderDraw,
8151
+ "_a": _wgpuRenderPassEncoderEnd,
8152
+ "Za": _wgpuRenderPassEncoderRelease,
8153
+ "Ya": _wgpuRenderPassEncoderSetBindGroup,
8154
+ "Xa": _wgpuRenderPassEncoderSetPipeline,
8155
+ "Wa": _wgpuRenderPipelineGetBindGroupLayout,
8156
+ "Va": _wgpuRenderPipelineRelease,
8157
+ "Ua": _wgpuSamplerReference,
8158
+ "Ta": _wgpuSamplerRelease,
8159
+ "Sa": _wgpuShaderModuleReference,
8160
+ "Ra": _wgpuShaderModuleRelease,
8161
+ "Qa": _wgpuTextureCreateView,
8162
+ "Pa": _wgpuTextureDestroy,
8163
+ "Oa": _wgpuTextureReference,
8164
+ "Na": _wgpuTextureRelease,
8165
+ "Ma": _wgpuTextureViewReference,
8166
+ "La": _wgpuTextureViewRelease
8214
8167
  };
8215
8168
 
8216
8169
  var asm = createWasm();
8217
8170
 
8218
- var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() {
8219
- return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["jd"]).apply(null, arguments);
8171
+ var ___wasm_call_ctors = function() {
8172
+ return (___wasm_call_ctors = Module["asm"]["kd"]).apply(null, arguments);
8220
8173
  };
8221
8174
 
8222
8175
  var _free = Module["_free"] = function() {
8223
- return (_free = Module["_free"] = Module["asm"]["ld"]).apply(null, arguments);
8176
+ return (_free = Module["_free"] = Module["asm"]["md"]).apply(null, arguments);
8224
8177
  };
8225
8178
 
8226
8179
  var _malloc = Module["_malloc"] = function() {
8227
- return (_malloc = Module["_malloc"] = Module["asm"]["md"]).apply(null, arguments);
8180
+ return (_malloc = Module["_malloc"] = Module["asm"]["nd"]).apply(null, arguments);
8228
8181
  };
8229
8182
 
8230
8183
  var _addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = function() {
8231
- return (_addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = Module["asm"]["nd"]).apply(null, arguments);
8184
+ return (_addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = Module["asm"]["od"]).apply(null, arguments);
8232
8185
  };
8233
8186
 
8234
8187
  var _attachImageListener = Module["_attachImageListener"] = function() {
8235
- return (_attachImageListener = Module["_attachImageListener"] = Module["asm"]["od"]).apply(null, arguments);
8188
+ return (_attachImageListener = Module["_attachImageListener"] = Module["asm"]["pd"]).apply(null, arguments);
8236
8189
  };
8237
8190
 
8238
8191
  var _attachImageVectorListener = Module["_attachImageVectorListener"] = function() {
8239
- return (_attachImageVectorListener = Module["_attachImageVectorListener"] = Module["asm"]["pd"]).apply(null, arguments);
8192
+ return (_attachImageVectorListener = Module["_attachImageVectorListener"] = Module["asm"]["qd"]).apply(null, arguments);
8240
8193
  };
8241
8194
 
8242
8195
  var _registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = function() {
8243
- return (_registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = Module["asm"]["qd"]).apply(null, arguments);
8196
+ return (_registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = Module["asm"]["rd"]).apply(null, arguments);
8244
8197
  };
8245
8198
 
8246
- var ___errno_location = Module["___errno_location"] = function() {
8247
- return (___errno_location = Module["___errno_location"] = Module["asm"]["rd"]).apply(null, arguments);
8199
+ var ___errno_location = function() {
8200
+ return (___errno_location = Module["asm"]["sd"]).apply(null, arguments);
8248
8201
  };
8249
8202
 
8250
8203
  var _bindTextureToStream = Module["_bindTextureToStream"] = function() {
8251
- return (_bindTextureToStream = Module["_bindTextureToStream"] = Module["asm"]["sd"]).apply(null, arguments);
8204
+ return (_bindTextureToStream = Module["_bindTextureToStream"] = Module["asm"]["td"]).apply(null, arguments);
8252
8205
  };
8253
8206
 
8254
8207
  var _addBoundTextureToStream = Module["_addBoundTextureToStream"] = function() {
8255
- return (_addBoundTextureToStream = Module["_addBoundTextureToStream"] = Module["asm"]["td"]).apply(null, arguments);
8208
+ return (_addBoundTextureToStream = Module["_addBoundTextureToStream"] = Module["asm"]["ud"]).apply(null, arguments);
8256
8209
  };
8257
8210
 
8258
8211
  var _addDoubleToInputStream = Module["_addDoubleToInputStream"] = function() {
8259
- return (_addDoubleToInputStream = Module["_addDoubleToInputStream"] = Module["asm"]["ud"]).apply(null, arguments);
8212
+ return (_addDoubleToInputStream = Module["_addDoubleToInputStream"] = Module["asm"]["vd"]).apply(null, arguments);
8260
8213
  };
8261
8214
 
8262
8215
  var _addFloatToInputStream = Module["_addFloatToInputStream"] = function() {
8263
- return (_addFloatToInputStream = Module["_addFloatToInputStream"] = Module["asm"]["vd"]).apply(null, arguments);
8216
+ return (_addFloatToInputStream = Module["_addFloatToInputStream"] = Module["asm"]["wd"]).apply(null, arguments);
8264
8217
  };
8265
8218
 
8266
8219
  var _addBoolToInputStream = Module["_addBoolToInputStream"] = function() {
8267
- return (_addBoolToInputStream = Module["_addBoolToInputStream"] = Module["asm"]["wd"]).apply(null, arguments);
8220
+ return (_addBoolToInputStream = Module["_addBoolToInputStream"] = Module["asm"]["xd"]).apply(null, arguments);
8268
8221
  };
8269
8222
 
8270
8223
  var _addIntToInputStream = Module["_addIntToInputStream"] = function() {
8271
- return (_addIntToInputStream = Module["_addIntToInputStream"] = Module["asm"]["xd"]).apply(null, arguments);
8224
+ return (_addIntToInputStream = Module["_addIntToInputStream"] = Module["asm"]["yd"]).apply(null, arguments);
8272
8225
  };
8273
8226
 
8274
8227
  var _addStringToInputStream = Module["_addStringToInputStream"] = function() {
8275
- return (_addStringToInputStream = Module["_addStringToInputStream"] = Module["asm"]["yd"]).apply(null, arguments);
8228
+ return (_addStringToInputStream = Module["_addStringToInputStream"] = Module["asm"]["zd"]).apply(null, arguments);
8276
8229
  };
8277
8230
 
8278
8231
  var _addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = function() {
8279
- return (_addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = Module["asm"]["zd"]).apply(null, arguments);
8232
+ return (_addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = Module["asm"]["Ad"]).apply(null, arguments);
8280
8233
  };
8281
8234
 
8282
8235
  var _addProtoToInputStream = Module["_addProtoToInputStream"] = function() {
8283
- return (_addProtoToInputStream = Module["_addProtoToInputStream"] = Module["asm"]["Ad"]).apply(null, arguments);
8236
+ return (_addProtoToInputStream = Module["_addProtoToInputStream"] = Module["asm"]["Bd"]).apply(null, arguments);
8284
8237
  };
8285
8238
 
8286
8239
  var _addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = function() {
8287
- return (_addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = Module["asm"]["Bd"]).apply(null, arguments);
8240
+ return (_addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = Module["asm"]["Cd"]).apply(null, arguments);
8288
8241
  };
8289
8242
 
8290
8243
  var _addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = function() {
8291
- return (_addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = Module["asm"]["Cd"]).apply(null, arguments);
8244
+ return (_addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = Module["asm"]["Dd"]).apply(null, arguments);
8292
8245
  };
8293
8246
 
8294
8247
  var _addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = function() {
8295
- return (_addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = Module["asm"]["Dd"]).apply(null, arguments);
8248
+ return (_addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = Module["asm"]["Ed"]).apply(null, arguments);
8296
8249
  };
8297
8250
 
8298
8251
  var _addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = function() {
8299
- return (_addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = Module["asm"]["Ed"]).apply(null, arguments);
8252
+ return (_addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = Module["asm"]["Fd"]).apply(null, arguments);
8300
8253
  };
8301
8254
 
8302
8255
  var _addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = function() {
8303
- return (_addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = Module["asm"]["Fd"]).apply(null, arguments);
8256
+ return (_addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = Module["asm"]["Gd"]).apply(null, arguments);
8304
8257
  };
8305
8258
 
8306
8259
  var _addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = function() {
8307
- return (_addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = Module["asm"]["Gd"]).apply(null, arguments);
8260
+ return (_addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = Module["asm"]["Hd"]).apply(null, arguments);
8308
8261
  };
8309
8262
 
8310
8263
  var _addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = function() {
8311
- return (_addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = Module["asm"]["Hd"]).apply(null, arguments);
8264
+ return (_addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = Module["asm"]["Id"]).apply(null, arguments);
8312
8265
  };
8313
8266
 
8314
8267
  var _attachBoolListener = Module["_attachBoolListener"] = function() {
8315
- return (_attachBoolListener = Module["_attachBoolListener"] = Module["asm"]["Id"]).apply(null, arguments);
8268
+ return (_attachBoolListener = Module["_attachBoolListener"] = Module["asm"]["Jd"]).apply(null, arguments);
8316
8269
  };
8317
8270
 
8318
8271
  var _attachBoolVectorListener = Module["_attachBoolVectorListener"] = function() {
8319
- return (_attachBoolVectorListener = Module["_attachBoolVectorListener"] = Module["asm"]["Jd"]).apply(null, arguments);
8272
+ return (_attachBoolVectorListener = Module["_attachBoolVectorListener"] = Module["asm"]["Kd"]).apply(null, arguments);
8320
8273
  };
8321
8274
 
8322
8275
  var _attachDoubleListener = Module["_attachDoubleListener"] = function() {
8323
- return (_attachDoubleListener = Module["_attachDoubleListener"] = Module["asm"]["Kd"]).apply(null, arguments);
8276
+ return (_attachDoubleListener = Module["_attachDoubleListener"] = Module["asm"]["Ld"]).apply(null, arguments);
8324
8277
  };
8325
8278
 
8326
8279
  var _attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = function() {
8327
- return (_attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = Module["asm"]["Ld"]).apply(null, arguments);
8280
+ return (_attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = Module["asm"]["Md"]).apply(null, arguments);
8328
8281
  };
8329
8282
 
8330
8283
  var _attachFloatListener = Module["_attachFloatListener"] = function() {
8331
- return (_attachFloatListener = Module["_attachFloatListener"] = Module["asm"]["Md"]).apply(null, arguments);
8284
+ return (_attachFloatListener = Module["_attachFloatListener"] = Module["asm"]["Nd"]).apply(null, arguments);
8332
8285
  };
8333
8286
 
8334
8287
  var _attachFloatVectorListener = Module["_attachFloatVectorListener"] = function() {
8335
- return (_attachFloatVectorListener = Module["_attachFloatVectorListener"] = Module["asm"]["Nd"]).apply(null, arguments);
8288
+ return (_attachFloatVectorListener = Module["_attachFloatVectorListener"] = Module["asm"]["Od"]).apply(null, arguments);
8336
8289
  };
8337
8290
 
8338
8291
  var _attachIntListener = Module["_attachIntListener"] = function() {
8339
- return (_attachIntListener = Module["_attachIntListener"] = Module["asm"]["Od"]).apply(null, arguments);
8292
+ return (_attachIntListener = Module["_attachIntListener"] = Module["asm"]["Pd"]).apply(null, arguments);
8340
8293
  };
8341
8294
 
8342
8295
  var _attachIntVectorListener = Module["_attachIntVectorListener"] = function() {
8343
- return (_attachIntVectorListener = Module["_attachIntVectorListener"] = Module["asm"]["Pd"]).apply(null, arguments);
8296
+ return (_attachIntVectorListener = Module["_attachIntVectorListener"] = Module["asm"]["Qd"]).apply(null, arguments);
8344
8297
  };
8345
8298
 
8346
8299
  var _attachStringListener = Module["_attachStringListener"] = function() {
8347
- return (_attachStringListener = Module["_attachStringListener"] = Module["asm"]["Qd"]).apply(null, arguments);
8300
+ return (_attachStringListener = Module["_attachStringListener"] = Module["asm"]["Rd"]).apply(null, arguments);
8348
8301
  };
8349
8302
 
8350
8303
  var _attachStringVectorListener = Module["_attachStringVectorListener"] = function() {
8351
- return (_attachStringVectorListener = Module["_attachStringVectorListener"] = Module["asm"]["Rd"]).apply(null, arguments);
8304
+ return (_attachStringVectorListener = Module["_attachStringVectorListener"] = Module["asm"]["Sd"]).apply(null, arguments);
8352
8305
  };
8353
8306
 
8354
8307
  var _attachProtoListener = Module["_attachProtoListener"] = function() {
8355
- return (_attachProtoListener = Module["_attachProtoListener"] = Module["asm"]["Sd"]).apply(null, arguments);
8308
+ return (_attachProtoListener = Module["_attachProtoListener"] = Module["asm"]["Td"]).apply(null, arguments);
8356
8309
  };
8357
8310
 
8358
8311
  var _attachProtoVectorListener = Module["_attachProtoVectorListener"] = function() {
8359
- return (_attachProtoVectorListener = Module["_attachProtoVectorListener"] = Module["asm"]["Td"]).apply(null, arguments);
8312
+ return (_attachProtoVectorListener = Module["_attachProtoVectorListener"] = Module["asm"]["Ud"]).apply(null, arguments);
8360
8313
  };
8361
8314
 
8362
8315
  var _getGraphConfig = Module["_getGraphConfig"] = function() {
8363
- return (_getGraphConfig = Module["_getGraphConfig"] = Module["asm"]["Ud"]).apply(null, arguments);
8316
+ return (_getGraphConfig = Module["_getGraphConfig"] = Module["asm"]["Vd"]).apply(null, arguments);
8364
8317
  };
8365
8318
 
8366
8319
  var _clearSubgraphs = Module["_clearSubgraphs"] = function() {
8367
- return (_clearSubgraphs = Module["_clearSubgraphs"] = Module["asm"]["Vd"]).apply(null, arguments);
8320
+ return (_clearSubgraphs = Module["_clearSubgraphs"] = Module["asm"]["Wd"]).apply(null, arguments);
8368
8321
  };
8369
8322
 
8370
8323
  var _pushBinarySubgraph = Module["_pushBinarySubgraph"] = function() {
8371
- return (_pushBinarySubgraph = Module["_pushBinarySubgraph"] = Module["asm"]["Wd"]).apply(null, arguments);
8324
+ return (_pushBinarySubgraph = Module["_pushBinarySubgraph"] = Module["asm"]["Xd"]).apply(null, arguments);
8372
8325
  };
8373
8326
 
8374
8327
  var _pushTextSubgraph = Module["_pushTextSubgraph"] = function() {
8375
- return (_pushTextSubgraph = Module["_pushTextSubgraph"] = Module["asm"]["Xd"]).apply(null, arguments);
8328
+ return (_pushTextSubgraph = Module["_pushTextSubgraph"] = Module["asm"]["Yd"]).apply(null, arguments);
8376
8329
  };
8377
8330
 
8378
8331
  var _changeBinaryGraph = Module["_changeBinaryGraph"] = function() {
8379
- return (_changeBinaryGraph = Module["_changeBinaryGraph"] = Module["asm"]["Yd"]).apply(null, arguments);
8332
+ return (_changeBinaryGraph = Module["_changeBinaryGraph"] = Module["asm"]["Zd"]).apply(null, arguments);
8380
8333
  };
8381
8334
 
8382
8335
  var _changeTextGraph = Module["_changeTextGraph"] = function() {
8383
- return (_changeTextGraph = Module["_changeTextGraph"] = Module["asm"]["Zd"]).apply(null, arguments);
8336
+ return (_changeTextGraph = Module["_changeTextGraph"] = Module["asm"]["_d"]).apply(null, arguments);
8384
8337
  };
8385
8338
 
8386
8339
  var _processGl = Module["_processGl"] = function() {
8387
- return (_processGl = Module["_processGl"] = Module["asm"]["_d"]).apply(null, arguments);
8340
+ return (_processGl = Module["_processGl"] = Module["asm"]["$d"]).apply(null, arguments);
8388
8341
  };
8389
8342
 
8390
8343
  var _process = Module["_process"] = function() {
8391
- return (_process = Module["_process"] = Module["asm"]["$d"]).apply(null, arguments);
8344
+ return (_process = Module["_process"] = Module["asm"]["ae"]).apply(null, arguments);
8392
8345
  };
8393
8346
 
8394
8347
  var _bindTextureToCanvas = Module["_bindTextureToCanvas"] = function() {
8395
- return (_bindTextureToCanvas = Module["_bindTextureToCanvas"] = Module["asm"]["ae"]).apply(null, arguments);
8348
+ return (_bindTextureToCanvas = Module["_bindTextureToCanvas"] = Module["asm"]["be"]).apply(null, arguments);
8396
8349
  };
8397
8350
 
8398
8351
  var _requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = function() {
8399
- return (_requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = Module["asm"]["be"]).apply(null, arguments);
8352
+ return (_requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = Module["asm"]["ce"]).apply(null, arguments);
8400
8353
  };
8401
8354
 
8402
8355
  var _waitUntilIdle = Module["_waitUntilIdle"] = function() {
8403
- return (_waitUntilIdle = Module["_waitUntilIdle"] = Module["asm"]["ce"]).apply(null, arguments);
8356
+ return (_waitUntilIdle = Module["_waitUntilIdle"] = Module["asm"]["de"]).apply(null, arguments);
8404
8357
  };
8405
8358
 
8406
8359
  var _setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = function() {
8407
- return (_setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = Module["asm"]["de"]).apply(null, arguments);
8360
+ return (_setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = Module["asm"]["ee"]).apply(null, arguments);
8408
8361
  };
8409
8362
 
8410
8363
  var ___getTypeName = Module["___getTypeName"] = function() {
8411
- return (___getTypeName = Module["___getTypeName"] = Module["asm"]["ee"]).apply(null, arguments);
8364
+ return (___getTypeName = Module["___getTypeName"] = Module["asm"]["fe"]).apply(null, arguments);
8412
8365
  };
8413
8366
 
8414
8367
  var __embind_initialize_bindings = Module["__embind_initialize_bindings"] = function() {
8415
- return (__embind_initialize_bindings = Module["__embind_initialize_bindings"] = Module["asm"]["fe"]).apply(null, arguments);
8368
+ return (__embind_initialize_bindings = Module["__embind_initialize_bindings"] = Module["asm"]["ge"]).apply(null, arguments);
8416
8369
  };
8417
8370
 
8418
- var _emscripten_builtin_memalign = Module["_emscripten_builtin_memalign"] = function() {
8419
- return (_emscripten_builtin_memalign = Module["_emscripten_builtin_memalign"] = Module["asm"]["ge"]).apply(null, arguments);
8371
+ var ___dl_seterr = function() {
8372
+ return (___dl_seterr = Module["asm"]["__dl_seterr"]).apply(null, arguments);
8420
8373
  };
8421
8374
 
8422
- var stackSave = Module["stackSave"] = function() {
8423
- return (stackSave = Module["stackSave"] = Module["asm"]["he"]).apply(null, arguments);
8375
+ var __emscripten_timeout = function() {
8376
+ return (__emscripten_timeout = Module["asm"]["he"]).apply(null, arguments);
8424
8377
  };
8425
8378
 
8426
- var stackRestore = Module["stackRestore"] = function() {
8427
- return (stackRestore = Module["stackRestore"] = Module["asm"]["ie"]).apply(null, arguments);
8379
+ var _emscripten_builtin_memalign = function() {
8380
+ return (_emscripten_builtin_memalign = Module["asm"]["ie"]).apply(null, arguments);
8428
8381
  };
8429
8382
 
8430
- var stackAlloc = Module["stackAlloc"] = function() {
8431
- return (stackAlloc = Module["stackAlloc"] = Module["asm"]["je"]).apply(null, arguments);
8383
+ var stackSave = function() {
8384
+ return (stackSave = Module["asm"]["je"]).apply(null, arguments);
8432
8385
  };
8433
8386
 
8434
- var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = function() {
8435
- return (___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = Module["asm"]["ke"]).apply(null, arguments);
8387
+ var stackRestore = function() {
8388
+ return (stackRestore = Module["asm"]["ke"]).apply(null, arguments);
8436
8389
  };
8437
8390
 
8438
- var ___start_em_js = Module["___start_em_js"] = 979820;
8391
+ var stackAlloc = function() {
8392
+ return (stackAlloc = Module["asm"]["le"]).apply(null, arguments);
8393
+ };
8394
+
8395
+ var ___cxa_is_pointer_type = function() {
8396
+ return (___cxa_is_pointer_type = Module["asm"]["me"]).apply(null, arguments);
8397
+ };
8439
8398
 
8440
- var ___stop_em_js = Module["___stop_em_js"] = 986382;
8399
+ var ___start_em_js = Module["___start_em_js"] = 1023460;
8400
+
8401
+ var ___stop_em_js = Module["___stop_em_js"] = 1030022;
8441
8402
 
8442
8403
  Module["addRunDependency"] = addRunDependency;
8443
8404
 
@@ -8455,10 +8416,10 @@ Module["FS_createDevice"] = FS.createDevice;
8455
8416
 
8456
8417
  Module["FS_unlink"] = FS.unlink;
8457
8418
 
8458
- Module["stringToNewUTF8"] = stringToNewUTF8;
8459
-
8460
8419
  Module["ccall"] = ccall;
8461
8420
 
8421
+ Module["stringToNewUTF8"] = stringToNewUTF8;
8422
+
8462
8423
  var calledRun;
8463
8424
 
8464
8425
  dependenciesFulfilled = function runCaller() {
@@ -8466,8 +8427,7 @@ dependenciesFulfilled = function runCaller() {
8466
8427
  if (!calledRun) dependenciesFulfilled = runCaller;
8467
8428
  };
8468
8429
 
8469
- function run(args) {
8470
- args = args || arguments_;
8430
+ function run() {
8471
8431
  if (runDependencies > 0) {
8472
8432
  return;
8473
8433
  }
@@ -8510,6 +8470,7 @@ run();
8510
8470
 
8511
8471
  return ModuleFactory.ready
8512
8472
  }
8473
+
8513
8474
  );
8514
8475
  })();
8515
8476
  if (typeof exports === 'object' && typeof module === 'object')