@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"]["kd"];
470
- updateGlobalBufferAndViews(wasmMemory.buffer);
471
- wasmTable = Module["asm"]["md"];
472
- addOnInit(Module["asm"]["ld"]);
381
+ wasmMemory = Module["asm"]["ld"];
382
+ updateMemoryViews();
383
+ wasmTable = Module["asm"]["nd"];
384
+ addOnInit(Module["asm"]["md"]);
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
- 1162062: $0 => {
409
+ 1205702: $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
- 1162197: () => {
414
+ 1205837: () => {
529
415
  return typeof HTMLCanvasElement !== "undefined";
530
416
  },
531
- 1162252: ($0, $1, $2, $3, $4) => {
417
+ 1205892: ($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
- 1162503: ($0, $1, $2, $3) => {
429
+ 1206143: ($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
- 1162851: ($0, $1) => {
446
+ 1206491: ($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
- 1163075: ($0, $1) => {
453
+ 1206715: ($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
- 1163279: ($0, $1) => {
460
+ 1206919: ($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
- 1163415: () => {
466
+ 1207055: () => {
581
467
  return !!Module["preinitializedWebGPUDevice"];
582
468
  },
583
- 1163466: () => {
469
+ 1207106: () => {
584
470
  specialHTMLTargets["#canvas"] = Module.canvas;
585
471
  },
586
- 1163517: () => {
472
+ 1207157: () => {
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
  }
@@ -6720,6 +6667,10 @@ function _glUniform1i(location, v0) {
6720
6667
  GLctx.uniform1i(webglGetUniformLocation(location), v0);
6721
6668
  }
6722
6669
 
6670
+ function _glUniform2f(location, v0, v1) {
6671
+ GLctx.uniform2f(webglGetUniformLocation(location), v0, v1);
6672
+ }
6673
+
6723
6674
  var miniTempWebGLFloatBuffers = [];
6724
6675
 
6725
6676
  function _glUniform2fv(location, count, value) {
@@ -6765,7 +6716,7 @@ function _glUniform4fv(location, count, value) {
6765
6716
  GLctx.uniform4fv(webglGetUniformLocation(location), view);
6766
6717
  }
6767
6718
 
6768
- var __miniTempWebGLIntBuffers = [];
6719
+ var miniTempWebGLIntBuffers = [];
6769
6720
 
6770
6721
  function _glUniform4iv(location, count, value) {
6771
6722
  if (GL.currentContext.version >= 2) {
@@ -6773,7 +6724,7 @@ function _glUniform4iv(location, count, value) {
6773
6724
  return;
6774
6725
  }
6775
6726
  if (count <= 72) {
6776
- var view = __miniTempWebGLIntBuffers[4 * count - 1];
6727
+ var view = miniTempWebGLIntBuffers[4 * count - 1];
6777
6728
  for (var i = 0; i < 4 * count; i += 4) {
6778
6729
  view[i] = HEAP32[value + 4 * i >> 2];
6779
6730
  view[i + 1] = HEAP32[value + (4 * i + 4) >> 2];
@@ -6866,22 +6817,22 @@ function _mediapipe_webgl_tex_image_drawable(drawableHandle) {
6866
6817
  GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, drawable);
6867
6818
  }
6868
6819
 
6869
- function __arraySum(array, index) {
6820
+ function arraySum(array, index) {
6870
6821
  var sum = 0;
6871
6822
  for (var i = 0; i <= index; sum += array[i++]) {}
6872
6823
  return sum;
6873
6824
  }
6874
6825
 
6875
- var __MONTH_DAYS_LEAP = [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6826
+ var MONTH_DAYS_LEAP = [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6876
6827
 
6877
- var __MONTH_DAYS_REGULAR = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6828
+ var MONTH_DAYS_REGULAR = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
6878
6829
 
6879
- function __addDays(date, days) {
6830
+ function addDays(date, days) {
6880
6831
  var newDate = new Date(date.getTime());
6881
6832
  while (days > 0) {
6882
- var leap = __isLeapYear(newDate.getFullYear());
6833
+ var leap = isLeapYear(newDate.getFullYear());
6883
6834
  var currentMonth = newDate.getMonth();
6884
- var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth];
6835
+ var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth];
6885
6836
  if (days > daysInCurrentMonth - newDate.getDate()) {
6886
6837
  days -= daysInCurrentMonth - newDate.getDate() + 1;
6887
6838
  newDate.setDate(1);
@@ -7001,7 +6952,7 @@ function _strftime(s, maxsize, format, tm) {
7001
6952
  }
7002
6953
  }
7003
6954
  function getWeekBasedYear(date) {
7004
- var thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
6955
+ var thisDate = addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
7005
6956
  var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);
7006
6957
  var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4);
7007
6958
  var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
@@ -7052,7 +7003,7 @@ function _strftime(s, maxsize, format, tm) {
7052
7003
  return leadingNulls(twelveHour, 2);
7053
7004
  },
7054
7005
  "%j": function(date) {
7055
- return leadingNulls(date.tm_mday + __arraySum(__isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
7006
+ return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year + 1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
7056
7007
  },
7057
7008
  "%m": function(date) {
7058
7009
  return leadingNulls(date.tm_mon + 1, 2);
@@ -7090,12 +7041,12 @@ function _strftime(s, maxsize, format, tm) {
7090
7041
  if (!val) {
7091
7042
  val = 52;
7092
7043
  var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7;
7093
- if (dec31 == 4 || dec31 == 5 && __isLeapYear(date.tm_year % 400 - 1)) {
7044
+ if (dec31 == 4 || dec31 == 5 && isLeapYear(date.tm_year % 400 - 1)) {
7094
7045
  val++;
7095
7046
  }
7096
7047
  } else if (val == 53) {
7097
7048
  var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7;
7098
- if (jan1 != 4 && (jan1 != 3 || !__isLeapYear(date.tm_year))) val = 1;
7049
+ if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year))) val = 1;
7099
7050
  }
7100
7051
  return leadingNulls(val, 2);
7101
7052
  },
@@ -7332,11 +7283,7 @@ function _wgpuCommandEncoderRelease(id) {
7332
7283
 
7333
7284
  function _wgpuComputePassEncoderDispatchWorkgroups(passId, x, y, z) {
7334
7285
  var pass = WebGPU.mgrComputePassEncoder.get(passId);
7335
- if (pass["dispatchWorkgroups"]) {
7336
- pass["dispatchWorkgroups"](x, y, z);
7337
- } else {
7338
- pass["dispatch"](x, y, z);
7339
- }
7286
+ pass["dispatchWorkgroups"](x, y, z);
7340
7287
  }
7341
7288
 
7342
7289
  function _wgpuComputePassEncoderEnd(passId) {
@@ -7384,9 +7331,9 @@ function _wgpuDeviceCreateBindGroup(deviceId, descriptor) {
7384
7331
  var textureViewId = HEAPU32[entryPtr + 36 >> 2];
7385
7332
  var binding = HEAPU32[entryPtr + 4 >> 2];
7386
7333
  if (bufferId) {
7387
- var size_low = HEAPU32[entryPtr + 24 >> 2];
7388
- var size_high = HEAPU32[entryPtr + 28 >> 2];
7389
- var size = size_high === -1 && size_low === -1 ? undefined : size_high * 4294967296 + size_low;
7334
+ var size_low = HEAP32[entryPtr + 24 >> 2];
7335
+ var size_high = HEAP32[entryPtr + 28 >> 2];
7336
+ var size = size_high === -1 && size_low === -1 ? undefined : (size_high >>> 0) * 4294967296 + (size_low >>> 0);
7390
7337
  return {
7391
7338
  "binding": binding,
7392
7339
  "resource": {
@@ -7715,7 +7662,7 @@ function _wgpuQueueSubmit(queueId, commandCount, commands) {
7715
7662
  function _wgpuQueueWriteBuffer(queueId, bufferId, bufferOffset_low, bufferOffset_high, data, size) {
7716
7663
  var queue = WebGPU.mgrQueue.get(queueId);
7717
7664
  var buffer = WebGPU.mgrBuffer.get(bufferId);
7718
- var bufferOffset = bufferOffset_high * 4294967296 + bufferOffset_low;
7665
+ var bufferOffset = (bufferOffset_high >>> 0) * 4294967296 + (bufferOffset_low >>> 0);
7719
7666
  var subarray = HEAPU8.subarray(data, data + size);
7720
7667
  queue["writeBuffer"](buffer, bufferOffset, subarray, 0, size);
7721
7668
  }
@@ -7825,14 +7772,19 @@ function getCFunc(ident) {
7825
7772
  return func;
7826
7773
  }
7827
7774
 
7775
+ function stringToUTF8OnStack(str) {
7776
+ var size = lengthBytesUTF8(str) + 1;
7777
+ var ret = stackAlloc(size);
7778
+ stringToUTF8(str, ret, size);
7779
+ return ret;
7780
+ }
7781
+
7828
7782
  function ccall(ident, returnType, argTypes, args, opts) {
7829
7783
  var toC = {
7830
7784
  "string": str => {
7831
7785
  var ret = 0;
7832
7786
  if (str !== null && str !== undefined && str !== 0) {
7833
- var len = (str.length << 2) + 1;
7834
- ret = stackAlloc(len);
7835
- stringToUTF8(str, ret, len);
7787
+ ret = stringToUTF8OnStack(str);
7836
7788
  }
7837
7789
  return ret;
7838
7790
  },
@@ -7988,466 +7940,475 @@ for (var i = 0; i < 288; ++i) {
7988
7940
  miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i + 1);
7989
7941
  }
7990
7942
 
7991
- var __miniTempWebGLIntBuffersStorage = new Int32Array(288);
7943
+ var miniTempWebGLIntBuffersStorage = new Int32Array(288);
7992
7944
 
7993
7945
  for (var i = 0; i < 288; ++i) {
7994
- __miniTempWebGLIntBuffers[i] = __miniTempWebGLIntBuffersStorage.subarray(0, i + 1);
7995
- }
7996
-
7997
- var asmLibraryArg = {
7998
- "jd": HaveOffsetConverter,
7999
- "id": JsOnEmptyPacketListener,
8000
- "hd": JsOnFloat32ArrayImageListener,
8001
- "gd": JsOnFloat32ArrayImageVectorListener,
8002
- "Ka": JsOnSimpleListenerBinaryArray,
8003
- "fd": JsOnSimpleListenerBool,
8004
- "ed": JsOnSimpleListenerDouble,
8005
- "dd": JsOnSimpleListenerFloat,
8006
- "cd": JsOnSimpleListenerInt,
8007
- "bd": JsOnSimpleListenerString,
8008
- "ad": JsOnUint8ClampedArrayImageListener,
8009
- "$c": JsOnUint8ClampedArrayImageVectorListener,
8010
- "J": JsOnVectorFinishedListener,
8011
- "_c": JsOnVectorListenerBool,
8012
- "Zc": JsOnVectorListenerDouble,
8013
- "Yc": JsOnVectorListenerFloat,
8014
- "Xc": JsOnVectorListenerInt,
8015
- "Wc": JsOnVectorListenerProto,
8016
- "Vc": JsOnVectorListenerString,
8017
- "Uc": JsOnWebGLTextureListener,
8018
- "Tc": JsOnWebGLTextureVectorListener,
8019
- "F": JsWrapErrorListener,
8020
- "Ja": JsWrapImageConverter,
8021
- "r": JsWrapSimpleListeners,
8022
- "i": ___cxa_allocate_exception,
8023
- "h": ___cxa_throw,
8024
- "Ia": ___syscall_fcntl64,
7946
+ miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i + 1);
7947
+ }
7948
+
7949
+ var wasmImports = {
7950
+ "kd": HaveOffsetConverter,
7951
+ "jd": JsOnEmptyPacketListener,
7952
+ "id": JsOnFloat32ArrayImageListener,
7953
+ "hd": JsOnFloat32ArrayImageVectorListener,
7954
+ "Ma": JsOnSimpleListenerBinaryArray,
7955
+ "gd": JsOnSimpleListenerBool,
7956
+ "fd": JsOnSimpleListenerDouble,
7957
+ "ed": JsOnSimpleListenerFloat,
7958
+ "dd": JsOnSimpleListenerInt,
7959
+ "cd": JsOnSimpleListenerString,
7960
+ "bd": JsOnUint8ClampedArrayImageListener,
7961
+ "ad": JsOnUint8ClampedArrayImageVectorListener,
7962
+ "K": JsOnVectorFinishedListener,
7963
+ "$c": JsOnVectorListenerBool,
7964
+ "_c": JsOnVectorListenerDouble,
7965
+ "Zc": JsOnVectorListenerFloat,
7966
+ "Yc": JsOnVectorListenerInt,
7967
+ "Xc": JsOnVectorListenerProto,
7968
+ "Wc": JsOnVectorListenerString,
7969
+ "Vc": JsOnWebGLTextureListener,
7970
+ "Uc": JsOnWebGLTextureVectorListener,
7971
+ "G": JsWrapErrorListener,
7972
+ "La": JsWrapImageConverter,
7973
+ "s": JsWrapSimpleListeners,
7974
+ "Tc": ___call_sighandler,
7975
+ "i": ___cxa_throw,
7976
+ "Ka": ___syscall_fcntl64,
8025
7977
  "Sc": ___syscall_fstat64,
8026
7978
  "Rc": ___syscall_ioctl,
8027
7979
  "Qc": ___syscall_lstat64,
8028
7980
  "Pc": ___syscall_newfstatat,
8029
- "Ha": ___syscall_openat,
7981
+ "Ja": ___syscall_openat,
8030
7982
  "Oc": ___syscall_stat64,
8031
- "Kc": __dlinit,
8032
- "Jc": __dlopen_js,
8033
- "Ic": __dlsym_js,
8034
- "Qb": __embind_register_bigint,
8035
- "Hc": __embind_register_bool,
8036
- "Gc": __embind_register_emval,
8037
- "Fa": __embind_register_float,
8038
- "D": __embind_register_integer,
8039
- "l": __embind_register_memory_view,
8040
- "Ea": __embind_register_std_string,
8041
- "ka": __embind_register_std_wstring,
8042
- "Fc": __embind_register_void,
8043
- "Ec": __emscripten_get_now_is_monotonic,
8044
- "ja": __emval_as,
7983
+ "Kc": __dlopen_js,
7984
+ "Jc": __dlsym_js,
7985
+ "Sb": __embind_register_bigint,
7986
+ "Ic": __embind_register_bool,
7987
+ "Hc": __embind_register_emval,
7988
+ "Ha": __embind_register_float,
7989
+ "E": __embind_register_integer,
7990
+ "n": __embind_register_memory_view,
7991
+ "Ga": __embind_register_std_string,
7992
+ "ja": __embind_register_std_wstring,
7993
+ "Gc": __embind_register_void,
7994
+ "Fc": __emscripten_get_now_is_monotonic,
7995
+ "ia": __emval_as,
8045
7996
  "k": __emval_decref,
8046
- "ia": __emval_get_global,
8047
- "Da": __emval_get_property,
8048
- "Ca": __emval_incref,
8049
- "ha": __emval_instanceof,
8050
- "ca": __emval_new_cstring,
8051
- "ga": __emval_run_destructors,
8052
- "Ba": __emval_set_property,
8053
- "ba": __emval_take_value,
8054
- "Dc": __emval_typeof,
8055
- "Cc": __gmtime_js,
8056
- "Bc": __localtime_js,
8057
- "Ac": __mktime_js,
8058
- "zc": __mmap_js,
8059
- "yc": __munmap_js,
8060
- "xc": __tzset_js,
7997
+ "ha": __emval_get_global,
7998
+ "Fa": __emval_get_property,
7999
+ "Ea": __emval_incref,
8000
+ "ga": __emval_instanceof,
8001
+ "ba": __emval_new_cstring,
8002
+ "fa": __emval_run_destructors,
8003
+ "Da": __emval_set_property,
8004
+ "aa": __emval_take_value,
8005
+ "Ec": __emval_typeof,
8006
+ "Dc": __gmtime_js,
8007
+ "Cc": __localtime_js,
8008
+ "Bc": __mktime_js,
8009
+ "Ac": __mmap_js,
8010
+ "zc": __munmap_js,
8011
+ "Ca": __setitimer_js,
8012
+ "yc": __tzset_js,
8061
8013
  "a": _abort,
8062
- "C": _emscripten_asm_const_int,
8063
- "wc": _emscripten_date_now,
8064
- "vc": _emscripten_get_heap_max,
8065
- "E": _emscripten_get_now,
8066
- "uc": _emscripten_memcpy_big,
8067
- "tc": _emscripten_pc_get_function,
8068
- "sc": _emscripten_resize_heap,
8069
- "rc": _emscripten_stack_snapshot,
8070
- "qc": _emscripten_stack_unwind_buffer,
8071
- "pc": _emscripten_webgl_create_context,
8072
- "oc": _emscripten_webgl_destroy_context,
8073
- "nc": _emscripten_webgl_get_context_attributes,
8074
- "Aa": _emscripten_webgl_get_current_context,
8075
- "mc": _emscripten_webgl_init_context_attributes,
8076
- "lc": _emscripten_webgl_make_context_current,
8077
- "kc": _emscripten_webgpu_export_bind_group_layout,
8078
- "za": _emscripten_webgpu_export_device,
8079
- "jc": _emscripten_webgpu_export_sampler,
8080
- "ic": _emscripten_webgpu_export_texture,
8081
- "I": _emscripten_webgpu_get_device,
8082
- "hc": _emscripten_webgpu_import_bind_group,
8083
- "gc": _emscripten_webgpu_import_texture,
8084
- "T": _emscripten_webgpu_release_js_handle,
8014
+ "D": _emscripten_asm_const_int,
8015
+ "xc": _emscripten_date_now,
8016
+ "wc": _emscripten_get_heap_max,
8017
+ "r": _emscripten_get_now,
8018
+ "vc": _emscripten_memcpy_big,
8019
+ "uc": _emscripten_pc_get_function,
8020
+ "tc": _emscripten_resize_heap,
8021
+ "sc": _emscripten_stack_snapshot,
8022
+ "rc": _emscripten_stack_unwind_buffer,
8023
+ "qc": _emscripten_webgl_create_context,
8024
+ "pc": _emscripten_webgl_destroy_context,
8025
+ "oc": _emscripten_webgl_get_context_attributes,
8026
+ "Ba": _emscripten_webgl_get_current_context,
8027
+ "nc": _emscripten_webgl_init_context_attributes,
8028
+ "mc": _emscripten_webgl_make_context_current,
8029
+ "lc": _emscripten_webgpu_export_bind_group_layout,
8030
+ "Aa": _emscripten_webgpu_export_device,
8031
+ "kc": _emscripten_webgpu_export_sampler,
8032
+ "jc": _emscripten_webgpu_export_texture,
8033
+ "J": _emscripten_webgpu_get_device,
8034
+ "ic": _emscripten_webgpu_import_bind_group,
8035
+ "hc": _emscripten_webgpu_import_texture,
8036
+ "U": _emscripten_webgpu_release_js_handle,
8085
8037
  "Nc": _environ_get,
8086
8038
  "Mc": _environ_sizes_get,
8087
- "ya": _exit,
8088
- "ma": _fd_close,
8089
- "Ga": _fd_read,
8090
- "Rb": _fd_seek,
8091
- "la": _fd_write,
8092
- "fc": _getentropy,
8093
- "c": _glActiveTexture,
8094
- "aa": _glAttachShader,
8095
- "ec": _glBindAttribLocation,
8096
- "f": _glBindBuffer,
8097
- "dc": _glBindBufferBase,
8098
- "t": _glBindFramebuffer,
8039
+ "za": _exit,
8040
+ "la": _fd_close,
8041
+ "Ia": _fd_read,
8042
+ "Tb": _fd_seek,
8043
+ "ka": _fd_write,
8044
+ "gc": _getentropy,
8045
+ "d": _glActiveTexture,
8046
+ "$": _glAttachShader,
8047
+ "fc": _glBindAttribLocation,
8048
+ "e": _glBindBuffer,
8049
+ "ec": _glBindBufferBase,
8050
+ "v": _glBindFramebuffer,
8099
8051
  "b": _glBindTexture,
8100
- "y": _glBindVertexArray,
8101
- "xa": _glBlendEquation,
8102
- "cc": _glBlendFunc,
8103
- "s": _glBufferData,
8104
- "v": _glClear,
8105
- "fa": _glClearColor,
8106
- "Pb": _glClientWaitSync,
8107
- "wa": _glCompileShader,
8108
- "va": _glCreateProgram,
8109
- "ua": _glCreateShader,
8110
- "H": _glDeleteBuffers,
8111
- "S": _glDeleteFramebuffers,
8112
- "n": _glDeleteProgram,
8113
- "R": _glDeleteShader,
8114
- "Q": _glDeleteSync,
8115
- "u": _glDeleteTextures,
8116
- "$": _glDeleteVertexArrays,
8117
- "L": _glDisable,
8118
- "x": _glDisableVertexAttribArray,
8119
- "m": _glDrawArrays,
8120
- "P": _glDrawBuffers,
8121
- "bc": _glEnable,
8122
- "q": _glEnableVertexAttribArray,
8123
- "ta": _glFenceSync,
8052
+ "u": _glBindVertexArray,
8053
+ "ya": _glBlendEquation,
8054
+ "dc": _glBlendFunc,
8055
+ "p": _glBufferData,
8056
+ "z": _glClear,
8057
+ "ea": _glClearColor,
8058
+ "Rb": _glClientWaitSync,
8059
+ "xa": _glCompileShader,
8060
+ "wa": _glCreateProgram,
8061
+ "va": _glCreateShader,
8062
+ "C": _glDeleteBuffers,
8063
+ "P": _glDeleteFramebuffers,
8064
+ "j": _glDeleteProgram,
8065
+ "T": _glDeleteShader,
8066
+ "S": _glDeleteSync,
8067
+ "y": _glDeleteTextures,
8068
+ "O": _glDeleteVertexArrays,
8069
+ "I": _glDisable,
8070
+ "t": _glDisableVertexAttribArray,
8071
+ "o": _glDrawArrays,
8072
+ "R": _glDrawBuffers,
8073
+ "cc": _glEnable,
8074
+ "m": _glEnableVertexAttribArray,
8075
+ "ua": _glFenceSync,
8124
8076
  "_": _glFinish,
8125
- "K": _glFlush,
8126
- "w": _glFramebufferTexture2D,
8127
- "sa": _glFramebufferTextureLayer,
8128
- "B": _glGenBuffers,
8129
- "O": _glGenFramebuffers,
8130
- "A": _glGenTextures,
8131
- "Z": _glGenVertexArrays,
8132
- "ra": _glGetAttribLocation,
8133
- "Y": _glGetError,
8134
- "p": _glGetIntegerv,
8135
- "ac": _glGetProgramiv,
8136
- "$b": _glGetShaderInfoLog,
8137
- "_b": _glGetShaderiv,
8138
- "G": _glGetString,
8139
- "Zb": _glGetUniformBlockIndex,
8077
+ "F": _glFlush,
8078
+ "x": _glFramebufferTexture2D,
8079
+ "ta": _glFramebufferTextureLayer,
8080
+ "w": _glGenBuffers,
8081
+ "N": _glGenFramebuffers,
8082
+ "B": _glGenTextures,
8083
+ "M": _glGenVertexArrays,
8084
+ "sa": _glGetAttribLocation,
8085
+ "Z": _glGetError,
8086
+ "q": _glGetIntegerv,
8087
+ "bc": _glGetProgramiv,
8088
+ "ac": _glGetShaderInfoLog,
8089
+ "$b": _glGetShaderiv,
8090
+ "H": _glGetString,
8091
+ "_b": _glGetUniformBlockIndex,
8140
8092
  "g": _glGetUniformLocation,
8141
- "qa": _glLinkProgram,
8142
- "X": _glPixelStorei,
8143
- "ea": _glReadPixels,
8144
- "pa": _glShaderSource,
8145
- "z": _glTexImage2D,
8146
- "W": _glTexParameterf,
8147
- "Yb": _glTexParameterfv,
8148
- "d": _glTexParameteri,
8149
- "da": _glTexStorage2D,
8150
- "Xb": _glTexStorage3D,
8151
- "N": _glTexSubImage2D,
8152
- "Wb": _glTexSubImage3D,
8153
- "V": _glUniform1f,
8154
- "e": _glUniform1i,
8155
- "Vb": _glUniform2fv,
8093
+ "ra": _glLinkProgram,
8094
+ "Y": _glPixelStorei,
8095
+ "da": _glReadPixels,
8096
+ "qa": _glShaderSource,
8097
+ "A": _glTexImage2D,
8098
+ "X": _glTexParameterf,
8099
+ "pa": _glTexParameterfv,
8100
+ "c": _glTexParameteri,
8101
+ "ca": _glTexStorage2D,
8102
+ "Zb": _glTexStorage3D,
8103
+ "Q": _glTexSubImage2D,
8104
+ "Yb": _glTexSubImage3D,
8105
+ "W": _glUniform1f,
8106
+ "f": _glUniform1i,
8107
+ "Xb": _glUniform2f,
8108
+ "Wb": _glUniform2fv,
8156
8109
  "oa": _glUniform3f,
8157
8110
  "na": _glUniform4fv,
8158
- "Ub": _glUniform4iv,
8159
- "Tb": _glUniformBlockBinding,
8160
- "Sb": _glUniformMatrix4fv,
8161
- "j": _glUseProgram,
8162
- "o": _glVertexAttribPointer,
8163
- "M": _glViewport,
8164
- "Nb": mediapipe_create_utility_canvas2d,
8165
- "Mb": _mediapipe_find_canvas_event_target,
8166
- "Lb": mediapipe_import_external_texture,
8167
- "Kb": _mediapipe_webgl_tex_image_drawable,
8111
+ "Vb": _glUniform4iv,
8112
+ "Ub": _glUniformBlockBinding,
8113
+ "ma": _glUniformMatrix4fv,
8114
+ "h": _glUseProgram,
8115
+ "l": _glVertexAttribPointer,
8116
+ "L": _glViewport,
8117
+ "Pb": mediapipe_create_utility_canvas2d,
8118
+ "Ob": _mediapipe_find_canvas_event_target,
8119
+ "Nb": mediapipe_import_external_texture,
8120
+ "Mb": _mediapipe_webgl_tex_image_drawable,
8168
8121
  "Lc": _proc_exit,
8169
- "U": _strftime,
8170
- "Jb": _strftime_l,
8171
- "Ib": _wgpuBindGroupLayoutRelease,
8172
- "Hb": _wgpuBindGroupRelease,
8173
- "Gb": _wgpuBufferGetMappedRange,
8174
- "Fb": _wgpuBufferReference,
8175
- "Eb": _wgpuBufferRelease,
8176
- "Db": _wgpuBufferUnmap,
8177
- "Cb": _wgpuCommandBufferRelease,
8178
- "Bb": _wgpuCommandEncoderBeginComputePass,
8179
- "Ab": _wgpuCommandEncoderBeginRenderPass,
8180
- "zb": _wgpuCommandEncoderCopyBufferToTexture,
8181
- "yb": _wgpuCommandEncoderCopyTextureToTexture,
8182
- "xb": _wgpuCommandEncoderFinish,
8183
- "wb": _wgpuCommandEncoderRelease,
8184
- "vb": _wgpuComputePassEncoderDispatchWorkgroups,
8185
- "ub": _wgpuComputePassEncoderEnd,
8186
- "tb": _wgpuComputePassEncoderRelease,
8187
- "sb": _wgpuComputePassEncoderSetBindGroup,
8188
- "rb": _wgpuComputePassEncoderSetPipeline,
8189
- "qb": _wgpuComputePipelineGetBindGroupLayout,
8190
- "pb": _wgpuComputePipelineRelease,
8191
- "ob": _wgpuDeviceCreateBindGroup,
8192
- "nb": _wgpuDeviceCreateBuffer,
8193
- "mb": _wgpuDeviceCreateCommandEncoder,
8194
- "lb": _wgpuDeviceCreateComputePipeline,
8195
- "kb": _wgpuDeviceCreateRenderPipeline,
8196
- "jb": _wgpuDeviceCreateSampler,
8197
- "ib": _wgpuDeviceCreateShaderModule,
8198
- "hb": _wgpuDeviceCreateTexture,
8199
- "gb": _wgpuDeviceGetQueue,
8200
- "fb": _wgpuDeviceReference,
8201
- "eb": _wgpuDeviceRelease,
8202
- "db": _wgpuPipelineLayoutRelease,
8203
- "cb": _wgpuQuerySetRelease,
8204
- "bb": _wgpuQueueRelease,
8205
- "ab": _wgpuQueueSubmit,
8206
- "Ob": _wgpuQueueWriteBuffer,
8207
- "$a": _wgpuRenderPassEncoderDraw,
8208
- "_a": _wgpuRenderPassEncoderEnd,
8209
- "Za": _wgpuRenderPassEncoderRelease,
8210
- "Ya": _wgpuRenderPassEncoderSetBindGroup,
8211
- "Xa": _wgpuRenderPassEncoderSetPipeline,
8212
- "Wa": _wgpuRenderPipelineGetBindGroupLayout,
8213
- "Va": _wgpuRenderPipelineRelease,
8214
- "Ua": _wgpuSamplerReference,
8215
- "Ta": _wgpuSamplerRelease,
8216
- "Sa": _wgpuShaderModuleReference,
8217
- "Ra": _wgpuShaderModuleRelease,
8218
- "Qa": _wgpuTextureCreateView,
8219
- "Pa": _wgpuTextureDestroy,
8220
- "Oa": _wgpuTextureReference,
8221
- "Na": _wgpuTextureRelease,
8222
- "Ma": _wgpuTextureViewReference,
8223
- "La": _wgpuTextureViewRelease
8122
+ "V": _strftime,
8123
+ "Lb": _strftime_l,
8124
+ "Kb": _wgpuBindGroupLayoutRelease,
8125
+ "Jb": _wgpuBindGroupRelease,
8126
+ "Ib": _wgpuBufferGetMappedRange,
8127
+ "Hb": _wgpuBufferReference,
8128
+ "Gb": _wgpuBufferRelease,
8129
+ "Fb": _wgpuBufferUnmap,
8130
+ "Eb": _wgpuCommandBufferRelease,
8131
+ "Db": _wgpuCommandEncoderBeginComputePass,
8132
+ "Cb": _wgpuCommandEncoderBeginRenderPass,
8133
+ "Bb": _wgpuCommandEncoderCopyBufferToTexture,
8134
+ "Ab": _wgpuCommandEncoderCopyTextureToTexture,
8135
+ "zb": _wgpuCommandEncoderFinish,
8136
+ "yb": _wgpuCommandEncoderRelease,
8137
+ "xb": _wgpuComputePassEncoderDispatchWorkgroups,
8138
+ "wb": _wgpuComputePassEncoderEnd,
8139
+ "vb": _wgpuComputePassEncoderRelease,
8140
+ "ub": _wgpuComputePassEncoderSetBindGroup,
8141
+ "tb": _wgpuComputePassEncoderSetPipeline,
8142
+ "sb": _wgpuComputePipelineGetBindGroupLayout,
8143
+ "rb": _wgpuComputePipelineRelease,
8144
+ "qb": _wgpuDeviceCreateBindGroup,
8145
+ "pb": _wgpuDeviceCreateBuffer,
8146
+ "ob": _wgpuDeviceCreateCommandEncoder,
8147
+ "nb": _wgpuDeviceCreateComputePipeline,
8148
+ "mb": _wgpuDeviceCreateRenderPipeline,
8149
+ "lb": _wgpuDeviceCreateSampler,
8150
+ "kb": _wgpuDeviceCreateShaderModule,
8151
+ "jb": _wgpuDeviceCreateTexture,
8152
+ "ib": _wgpuDeviceGetQueue,
8153
+ "hb": _wgpuDeviceReference,
8154
+ "gb": _wgpuDeviceRelease,
8155
+ "fb": _wgpuPipelineLayoutRelease,
8156
+ "eb": _wgpuQuerySetRelease,
8157
+ "db": _wgpuQueueRelease,
8158
+ "cb": _wgpuQueueSubmit,
8159
+ "Qb": _wgpuQueueWriteBuffer,
8160
+ "bb": _wgpuRenderPassEncoderDraw,
8161
+ "ab": _wgpuRenderPassEncoderEnd,
8162
+ "$a": _wgpuRenderPassEncoderRelease,
8163
+ "_a": _wgpuRenderPassEncoderSetBindGroup,
8164
+ "Za": _wgpuRenderPassEncoderSetPipeline,
8165
+ "Ya": _wgpuRenderPipelineGetBindGroupLayout,
8166
+ "Xa": _wgpuRenderPipelineRelease,
8167
+ "Wa": _wgpuSamplerReference,
8168
+ "Va": _wgpuSamplerRelease,
8169
+ "Ua": _wgpuShaderModuleReference,
8170
+ "Ta": _wgpuShaderModuleRelease,
8171
+ "Sa": _wgpuTextureCreateView,
8172
+ "Ra": _wgpuTextureDestroy,
8173
+ "Qa": _wgpuTextureReference,
8174
+ "Pa": _wgpuTextureRelease,
8175
+ "Oa": _wgpuTextureViewReference,
8176
+ "Na": _wgpuTextureViewRelease
8224
8177
  };
8225
8178
 
8226
8179
  var asm = createWasm();
8227
8180
 
8228
- var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() {
8229
- return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["ld"]).apply(null, arguments);
8181
+ var ___wasm_call_ctors = function() {
8182
+ return (___wasm_call_ctors = Module["asm"]["md"]).apply(null, arguments);
8230
8183
  };
8231
8184
 
8232
8185
  var _free = Module["_free"] = function() {
8233
- return (_free = Module["_free"] = Module["asm"]["nd"]).apply(null, arguments);
8186
+ return (_free = Module["_free"] = Module["asm"]["od"]).apply(null, arguments);
8234
8187
  };
8235
8188
 
8236
8189
  var _malloc = Module["_malloc"] = function() {
8237
- return (_malloc = Module["_malloc"] = Module["asm"]["od"]).apply(null, arguments);
8190
+ return (_malloc = Module["_malloc"] = Module["asm"]["pd"]).apply(null, arguments);
8238
8191
  };
8239
8192
 
8240
8193
  var _addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = function() {
8241
- return (_addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = Module["asm"]["pd"]).apply(null, arguments);
8194
+ return (_addBoundTextureAsImageToStream = Module["_addBoundTextureAsImageToStream"] = Module["asm"]["qd"]).apply(null, arguments);
8242
8195
  };
8243
8196
 
8244
8197
  var _attachImageListener = Module["_attachImageListener"] = function() {
8245
- return (_attachImageListener = Module["_attachImageListener"] = Module["asm"]["qd"]).apply(null, arguments);
8198
+ return (_attachImageListener = Module["_attachImageListener"] = Module["asm"]["rd"]).apply(null, arguments);
8246
8199
  };
8247
8200
 
8248
8201
  var _attachImageVectorListener = Module["_attachImageVectorListener"] = function() {
8249
- return (_attachImageVectorListener = Module["_attachImageVectorListener"] = Module["asm"]["rd"]).apply(null, arguments);
8202
+ return (_attachImageVectorListener = Module["_attachImageVectorListener"] = Module["asm"]["sd"]).apply(null, arguments);
8250
8203
  };
8251
8204
 
8252
8205
  var _registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = function() {
8253
- return (_registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = Module["asm"]["sd"]).apply(null, arguments);
8206
+ return (_registerModelResourcesGraphService = Module["_registerModelResourcesGraphService"] = Module["asm"]["td"]).apply(null, arguments);
8254
8207
  };
8255
8208
 
8256
- var ___errno_location = Module["___errno_location"] = function() {
8257
- return (___errno_location = Module["___errno_location"] = Module["asm"]["td"]).apply(null, arguments);
8209
+ var ___errno_location = function() {
8210
+ return (___errno_location = Module["asm"]["ud"]).apply(null, arguments);
8258
8211
  };
8259
8212
 
8260
8213
  var _bindTextureToStream = Module["_bindTextureToStream"] = function() {
8261
- return (_bindTextureToStream = Module["_bindTextureToStream"] = Module["asm"]["ud"]).apply(null, arguments);
8214
+ return (_bindTextureToStream = Module["_bindTextureToStream"] = Module["asm"]["vd"]).apply(null, arguments);
8262
8215
  };
8263
8216
 
8264
8217
  var _addBoundTextureToStream = Module["_addBoundTextureToStream"] = function() {
8265
- return (_addBoundTextureToStream = Module["_addBoundTextureToStream"] = Module["asm"]["vd"]).apply(null, arguments);
8218
+ return (_addBoundTextureToStream = Module["_addBoundTextureToStream"] = Module["asm"]["wd"]).apply(null, arguments);
8266
8219
  };
8267
8220
 
8268
8221
  var _addDoubleToInputStream = Module["_addDoubleToInputStream"] = function() {
8269
- return (_addDoubleToInputStream = Module["_addDoubleToInputStream"] = Module["asm"]["wd"]).apply(null, arguments);
8222
+ return (_addDoubleToInputStream = Module["_addDoubleToInputStream"] = Module["asm"]["xd"]).apply(null, arguments);
8270
8223
  };
8271
8224
 
8272
8225
  var _addFloatToInputStream = Module["_addFloatToInputStream"] = function() {
8273
- return (_addFloatToInputStream = Module["_addFloatToInputStream"] = Module["asm"]["xd"]).apply(null, arguments);
8226
+ return (_addFloatToInputStream = Module["_addFloatToInputStream"] = Module["asm"]["yd"]).apply(null, arguments);
8274
8227
  };
8275
8228
 
8276
8229
  var _addBoolToInputStream = Module["_addBoolToInputStream"] = function() {
8277
- return (_addBoolToInputStream = Module["_addBoolToInputStream"] = Module["asm"]["yd"]).apply(null, arguments);
8230
+ return (_addBoolToInputStream = Module["_addBoolToInputStream"] = Module["asm"]["zd"]).apply(null, arguments);
8278
8231
  };
8279
8232
 
8280
8233
  var _addIntToInputStream = Module["_addIntToInputStream"] = function() {
8281
- return (_addIntToInputStream = Module["_addIntToInputStream"] = Module["asm"]["zd"]).apply(null, arguments);
8234
+ return (_addIntToInputStream = Module["_addIntToInputStream"] = Module["asm"]["Ad"]).apply(null, arguments);
8282
8235
  };
8283
8236
 
8284
8237
  var _addStringToInputStream = Module["_addStringToInputStream"] = function() {
8285
- return (_addStringToInputStream = Module["_addStringToInputStream"] = Module["asm"]["Ad"]).apply(null, arguments);
8238
+ return (_addStringToInputStream = Module["_addStringToInputStream"] = Module["asm"]["Bd"]).apply(null, arguments);
8286
8239
  };
8287
8240
 
8288
8241
  var _addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = function() {
8289
- return (_addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = Module["asm"]["Bd"]).apply(null, arguments);
8242
+ return (_addFlatHashMapToInputStream = Module["_addFlatHashMapToInputStream"] = Module["asm"]["Cd"]).apply(null, arguments);
8290
8243
  };
8291
8244
 
8292
8245
  var _addProtoToInputStream = Module["_addProtoToInputStream"] = function() {
8293
- return (_addProtoToInputStream = Module["_addProtoToInputStream"] = Module["asm"]["Cd"]).apply(null, arguments);
8246
+ return (_addProtoToInputStream = Module["_addProtoToInputStream"] = Module["asm"]["Dd"]).apply(null, arguments);
8294
8247
  };
8295
8248
 
8296
8249
  var _addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = function() {
8297
- return (_addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = Module["asm"]["Dd"]).apply(null, arguments);
8250
+ return (_addEmptyPacketToInputStream = Module["_addEmptyPacketToInputStream"] = Module["asm"]["Ed"]).apply(null, arguments);
8298
8251
  };
8299
8252
 
8300
8253
  var _addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = function() {
8301
- return (_addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = Module["asm"]["Ed"]).apply(null, arguments);
8254
+ return (_addBoolToInputSidePacket = Module["_addBoolToInputSidePacket"] = Module["asm"]["Fd"]).apply(null, arguments);
8302
8255
  };
8303
8256
 
8304
8257
  var _addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = function() {
8305
- return (_addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = Module["asm"]["Fd"]).apply(null, arguments);
8258
+ return (_addDoubleToInputSidePacket = Module["_addDoubleToInputSidePacket"] = Module["asm"]["Gd"]).apply(null, arguments);
8306
8259
  };
8307
8260
 
8308
8261
  var _addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = function() {
8309
- return (_addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = Module["asm"]["Gd"]).apply(null, arguments);
8262
+ return (_addFloatToInputSidePacket = Module["_addFloatToInputSidePacket"] = Module["asm"]["Hd"]).apply(null, arguments);
8310
8263
  };
8311
8264
 
8312
8265
  var _addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = function() {
8313
- return (_addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = Module["asm"]["Hd"]).apply(null, arguments);
8266
+ return (_addIntToInputSidePacket = Module["_addIntToInputSidePacket"] = Module["asm"]["Id"]).apply(null, arguments);
8314
8267
  };
8315
8268
 
8316
8269
  var _addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = function() {
8317
- return (_addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = Module["asm"]["Id"]).apply(null, arguments);
8270
+ return (_addStringToInputSidePacket = Module["_addStringToInputSidePacket"] = Module["asm"]["Jd"]).apply(null, arguments);
8318
8271
  };
8319
8272
 
8320
8273
  var _addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = function() {
8321
- return (_addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = Module["asm"]["Jd"]).apply(null, arguments);
8274
+ return (_addProtoToInputSidePacket = Module["_addProtoToInputSidePacket"] = Module["asm"]["Kd"]).apply(null, arguments);
8322
8275
  };
8323
8276
 
8324
8277
  var _attachBoolListener = Module["_attachBoolListener"] = function() {
8325
- return (_attachBoolListener = Module["_attachBoolListener"] = Module["asm"]["Kd"]).apply(null, arguments);
8278
+ return (_attachBoolListener = Module["_attachBoolListener"] = Module["asm"]["Ld"]).apply(null, arguments);
8326
8279
  };
8327
8280
 
8328
8281
  var _attachBoolVectorListener = Module["_attachBoolVectorListener"] = function() {
8329
- return (_attachBoolVectorListener = Module["_attachBoolVectorListener"] = Module["asm"]["Ld"]).apply(null, arguments);
8282
+ return (_attachBoolVectorListener = Module["_attachBoolVectorListener"] = Module["asm"]["Md"]).apply(null, arguments);
8330
8283
  };
8331
8284
 
8332
8285
  var _attachDoubleListener = Module["_attachDoubleListener"] = function() {
8333
- return (_attachDoubleListener = Module["_attachDoubleListener"] = Module["asm"]["Md"]).apply(null, arguments);
8286
+ return (_attachDoubleListener = Module["_attachDoubleListener"] = Module["asm"]["Nd"]).apply(null, arguments);
8334
8287
  };
8335
8288
 
8336
8289
  var _attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = function() {
8337
- return (_attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = Module["asm"]["Nd"]).apply(null, arguments);
8290
+ return (_attachDoubleVectorListener = Module["_attachDoubleVectorListener"] = Module["asm"]["Od"]).apply(null, arguments);
8338
8291
  };
8339
8292
 
8340
8293
  var _attachFloatListener = Module["_attachFloatListener"] = function() {
8341
- return (_attachFloatListener = Module["_attachFloatListener"] = Module["asm"]["Od"]).apply(null, arguments);
8294
+ return (_attachFloatListener = Module["_attachFloatListener"] = Module["asm"]["Pd"]).apply(null, arguments);
8342
8295
  };
8343
8296
 
8344
8297
  var _attachFloatVectorListener = Module["_attachFloatVectorListener"] = function() {
8345
- return (_attachFloatVectorListener = Module["_attachFloatVectorListener"] = Module["asm"]["Pd"]).apply(null, arguments);
8298
+ return (_attachFloatVectorListener = Module["_attachFloatVectorListener"] = Module["asm"]["Qd"]).apply(null, arguments);
8346
8299
  };
8347
8300
 
8348
8301
  var _attachIntListener = Module["_attachIntListener"] = function() {
8349
- return (_attachIntListener = Module["_attachIntListener"] = Module["asm"]["Qd"]).apply(null, arguments);
8302
+ return (_attachIntListener = Module["_attachIntListener"] = Module["asm"]["Rd"]).apply(null, arguments);
8350
8303
  };
8351
8304
 
8352
8305
  var _attachIntVectorListener = Module["_attachIntVectorListener"] = function() {
8353
- return (_attachIntVectorListener = Module["_attachIntVectorListener"] = Module["asm"]["Rd"]).apply(null, arguments);
8306
+ return (_attachIntVectorListener = Module["_attachIntVectorListener"] = Module["asm"]["Sd"]).apply(null, arguments);
8354
8307
  };
8355
8308
 
8356
8309
  var _attachStringListener = Module["_attachStringListener"] = function() {
8357
- return (_attachStringListener = Module["_attachStringListener"] = Module["asm"]["Sd"]).apply(null, arguments);
8310
+ return (_attachStringListener = Module["_attachStringListener"] = Module["asm"]["Td"]).apply(null, arguments);
8358
8311
  };
8359
8312
 
8360
8313
  var _attachStringVectorListener = Module["_attachStringVectorListener"] = function() {
8361
- return (_attachStringVectorListener = Module["_attachStringVectorListener"] = Module["asm"]["Td"]).apply(null, arguments);
8314
+ return (_attachStringVectorListener = Module["_attachStringVectorListener"] = Module["asm"]["Ud"]).apply(null, arguments);
8362
8315
  };
8363
8316
 
8364
8317
  var _attachProtoListener = Module["_attachProtoListener"] = function() {
8365
- return (_attachProtoListener = Module["_attachProtoListener"] = Module["asm"]["Ud"]).apply(null, arguments);
8318
+ return (_attachProtoListener = Module["_attachProtoListener"] = Module["asm"]["Vd"]).apply(null, arguments);
8366
8319
  };
8367
8320
 
8368
8321
  var _attachProtoVectorListener = Module["_attachProtoVectorListener"] = function() {
8369
- return (_attachProtoVectorListener = Module["_attachProtoVectorListener"] = Module["asm"]["Vd"]).apply(null, arguments);
8322
+ return (_attachProtoVectorListener = Module["_attachProtoVectorListener"] = Module["asm"]["Wd"]).apply(null, arguments);
8370
8323
  };
8371
8324
 
8372
8325
  var _getGraphConfig = Module["_getGraphConfig"] = function() {
8373
- return (_getGraphConfig = Module["_getGraphConfig"] = Module["asm"]["Wd"]).apply(null, arguments);
8326
+ return (_getGraphConfig = Module["_getGraphConfig"] = Module["asm"]["Xd"]).apply(null, arguments);
8374
8327
  };
8375
8328
 
8376
8329
  var _clearSubgraphs = Module["_clearSubgraphs"] = function() {
8377
- return (_clearSubgraphs = Module["_clearSubgraphs"] = Module["asm"]["Xd"]).apply(null, arguments);
8330
+ return (_clearSubgraphs = Module["_clearSubgraphs"] = Module["asm"]["Yd"]).apply(null, arguments);
8378
8331
  };
8379
8332
 
8380
8333
  var _pushBinarySubgraph = Module["_pushBinarySubgraph"] = function() {
8381
- return (_pushBinarySubgraph = Module["_pushBinarySubgraph"] = Module["asm"]["Yd"]).apply(null, arguments);
8334
+ return (_pushBinarySubgraph = Module["_pushBinarySubgraph"] = Module["asm"]["Zd"]).apply(null, arguments);
8382
8335
  };
8383
8336
 
8384
8337
  var _pushTextSubgraph = Module["_pushTextSubgraph"] = function() {
8385
- return (_pushTextSubgraph = Module["_pushTextSubgraph"] = Module["asm"]["Zd"]).apply(null, arguments);
8338
+ return (_pushTextSubgraph = Module["_pushTextSubgraph"] = Module["asm"]["_d"]).apply(null, arguments);
8386
8339
  };
8387
8340
 
8388
8341
  var _changeBinaryGraph = Module["_changeBinaryGraph"] = function() {
8389
- return (_changeBinaryGraph = Module["_changeBinaryGraph"] = Module["asm"]["_d"]).apply(null, arguments);
8342
+ return (_changeBinaryGraph = Module["_changeBinaryGraph"] = Module["asm"]["$d"]).apply(null, arguments);
8390
8343
  };
8391
8344
 
8392
8345
  var _changeTextGraph = Module["_changeTextGraph"] = function() {
8393
- return (_changeTextGraph = Module["_changeTextGraph"] = Module["asm"]["$d"]).apply(null, arguments);
8346
+ return (_changeTextGraph = Module["_changeTextGraph"] = Module["asm"]["ae"]).apply(null, arguments);
8394
8347
  };
8395
8348
 
8396
8349
  var _processGl = Module["_processGl"] = function() {
8397
- return (_processGl = Module["_processGl"] = Module["asm"]["ae"]).apply(null, arguments);
8350
+ return (_processGl = Module["_processGl"] = Module["asm"]["be"]).apply(null, arguments);
8398
8351
  };
8399
8352
 
8400
8353
  var _process = Module["_process"] = function() {
8401
- return (_process = Module["_process"] = Module["asm"]["be"]).apply(null, arguments);
8354
+ return (_process = Module["_process"] = Module["asm"]["ce"]).apply(null, arguments);
8402
8355
  };
8403
8356
 
8404
8357
  var _bindTextureToCanvas = Module["_bindTextureToCanvas"] = function() {
8405
- return (_bindTextureToCanvas = Module["_bindTextureToCanvas"] = Module["asm"]["ce"]).apply(null, arguments);
8358
+ return (_bindTextureToCanvas = Module["_bindTextureToCanvas"] = Module["asm"]["de"]).apply(null, arguments);
8406
8359
  };
8407
8360
 
8408
8361
  var _requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = function() {
8409
- return (_requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = Module["asm"]["de"]).apply(null, arguments);
8362
+ return (_requestShaderRefreshOnGraphChange = Module["_requestShaderRefreshOnGraphChange"] = Module["asm"]["ee"]).apply(null, arguments);
8410
8363
  };
8411
8364
 
8412
8365
  var _waitUntilIdle = Module["_waitUntilIdle"] = function() {
8413
- return (_waitUntilIdle = Module["_waitUntilIdle"] = Module["asm"]["ee"]).apply(null, arguments);
8366
+ return (_waitUntilIdle = Module["_waitUntilIdle"] = Module["asm"]["fe"]).apply(null, arguments);
8414
8367
  };
8415
8368
 
8416
8369
  var _setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = function() {
8417
- return (_setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = Module["asm"]["fe"]).apply(null, arguments);
8370
+ return (_setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = Module["asm"]["ge"]).apply(null, arguments);
8418
8371
  };
8419
8372
 
8420
8373
  var ___getTypeName = Module["___getTypeName"] = function() {
8421
- return (___getTypeName = Module["___getTypeName"] = Module["asm"]["ge"]).apply(null, arguments);
8374
+ return (___getTypeName = Module["___getTypeName"] = Module["asm"]["he"]).apply(null, arguments);
8422
8375
  };
8423
8376
 
8424
8377
  var __embind_initialize_bindings = Module["__embind_initialize_bindings"] = function() {
8425
- return (__embind_initialize_bindings = Module["__embind_initialize_bindings"] = Module["asm"]["he"]).apply(null, arguments);
8378
+ return (__embind_initialize_bindings = Module["__embind_initialize_bindings"] = Module["asm"]["ie"]).apply(null, arguments);
8426
8379
  };
8427
8380
 
8428
- var _emscripten_builtin_memalign = Module["_emscripten_builtin_memalign"] = function() {
8429
- return (_emscripten_builtin_memalign = Module["_emscripten_builtin_memalign"] = Module["asm"]["ie"]).apply(null, arguments);
8381
+ var ___dl_seterr = function() {
8382
+ return (___dl_seterr = Module["asm"]["__dl_seterr"]).apply(null, arguments);
8430
8383
  };
8431
8384
 
8432
- var stackSave = Module["stackSave"] = function() {
8433
- return (stackSave = Module["stackSave"] = Module["asm"]["je"]).apply(null, arguments);
8385
+ var __emscripten_timeout = function() {
8386
+ return (__emscripten_timeout = Module["asm"]["je"]).apply(null, arguments);
8434
8387
  };
8435
8388
 
8436
- var stackRestore = Module["stackRestore"] = function() {
8437
- return (stackRestore = Module["stackRestore"] = Module["asm"]["ke"]).apply(null, arguments);
8389
+ var _emscripten_builtin_memalign = function() {
8390
+ return (_emscripten_builtin_memalign = Module["asm"]["ke"]).apply(null, arguments);
8438
8391
  };
8439
8392
 
8440
- var stackAlloc = Module["stackAlloc"] = function() {
8441
- return (stackAlloc = Module["stackAlloc"] = Module["asm"]["le"]).apply(null, arguments);
8393
+ var stackSave = function() {
8394
+ return (stackSave = Module["asm"]["le"]).apply(null, arguments);
8442
8395
  };
8443
8396
 
8444
- var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = function() {
8445
- return (___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = Module["asm"]["me"]).apply(null, arguments);
8397
+ var stackRestore = function() {
8398
+ return (stackRestore = Module["asm"]["me"]).apply(null, arguments);
8446
8399
  };
8447
8400
 
8448
- var ___start_em_js = Module["___start_em_js"] = 1155500;
8401
+ var stackAlloc = function() {
8402
+ return (stackAlloc = Module["asm"]["ne"]).apply(null, arguments);
8403
+ };
8404
+
8405
+ var ___cxa_is_pointer_type = function() {
8406
+ return (___cxa_is_pointer_type = Module["asm"]["oe"]).apply(null, arguments);
8407
+ };
8449
8408
 
8450
- var ___stop_em_js = Module["___stop_em_js"] = 1162062;
8409
+ var ___start_em_js = Module["___start_em_js"] = 1199140;
8410
+
8411
+ var ___stop_em_js = Module["___stop_em_js"] = 1205702;
8451
8412
 
8452
8413
  Module["addRunDependency"] = addRunDependency;
8453
8414
 
@@ -8465,10 +8426,10 @@ Module["FS_createDevice"] = FS.createDevice;
8465
8426
 
8466
8427
  Module["FS_unlink"] = FS.unlink;
8467
8428
 
8468
- Module["stringToNewUTF8"] = stringToNewUTF8;
8469
-
8470
8429
  Module["ccall"] = ccall;
8471
8430
 
8431
+ Module["stringToNewUTF8"] = stringToNewUTF8;
8432
+
8472
8433
  var calledRun;
8473
8434
 
8474
8435
  dependenciesFulfilled = function runCaller() {
@@ -8476,8 +8437,7 @@ dependenciesFulfilled = function runCaller() {
8476
8437
  if (!calledRun) dependenciesFulfilled = runCaller;
8477
8438
  };
8478
8439
 
8479
- function run(args) {
8480
- args = args || arguments_;
8440
+ function run() {
8481
8441
  if (runDependencies > 0) {
8482
8442
  return;
8483
8443
  }
@@ -8520,6 +8480,7 @@ run();
8520
8480
 
8521
8481
  return ModuleFactory.ready
8522
8482
  }
8483
+
8523
8484
  );
8524
8485
  })();
8525
8486
  if (typeof exports === 'object' && typeof module === 'object')