@mediapipe/tasks-text 0.10.34 → 0.10.36-rc.20260507

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.
@@ -199,14 +199,17 @@ var EXITSTATUS;
199
199
  // include: runtime_stack_check.js
200
200
  // end include: runtime_stack_check.js
201
201
  // include: runtime_exceptions.js
202
+ // Base Emscripten EH error class
203
+ class EmscriptenEH {}
204
+
205
+ class EmscriptenSjLj extends EmscriptenEH {}
206
+
202
207
  // end include: runtime_exceptions.js
203
208
  // include: runtime_debug.js
204
209
  // end include: runtime_debug.js
205
210
  var readyPromiseResolve, readyPromiseReject;
206
211
 
207
212
  // Memory management
208
- var /** @type {!Int8Array} */ HEAP8, /** @type {!Uint8Array} */ HEAPU8, /** @type {!Int16Array} */ HEAP16, /** @type {!Uint16Array} */ HEAPU16, /** @type {!Int32Array} */ HEAP32, /** @type {!Uint32Array} */ HEAPU32, /** @type {!Float32Array} */ HEAPF32, /** @type {!Float64Array} */ HEAPF64;
209
-
210
213
  var runtimeInitialized = false;
211
214
 
212
215
  function updateMemoryViews() {
@@ -258,9 +261,11 @@ function postRun() {
258
261
  callRuntimeCallbacks(onPostRuns);
259
262
  }
260
263
 
261
- /** @param {string|number=} what */ function abort(what) {
264
+ /**
265
+ * @param {string|number=} what
266
+ */ function abort(what) {
262
267
  Module["onAbort"]?.(what);
263
- what = "Aborted(" + what + ")";
268
+ what = `Aborted(${what})`;
264
269
  // TODO(sbc): Should we remove printing and leave it up to whoever
265
270
  // catches the exception?
266
271
  err(what);
@@ -792,13 +797,8 @@ var Browser = {
792
797
  // in the coordinates.
793
798
  var canvas = Browser.getCanvas();
794
799
  var rect = canvas.getBoundingClientRect();
795
- // Neither .scrollX or .pageXOffset are defined in a spec, but
796
- // we prefer .scrollX because it is currently in a spec draft.
797
- // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
798
- var scrollX = ((typeof window.scrollX != "undefined") ? window.scrollX : window.pageXOffset);
799
- var scrollY = ((typeof window.scrollY != "undefined") ? window.scrollY : window.pageYOffset);
800
- var adjustedX = pageX - (scrollX + rect.left);
801
- var adjustedY = pageY - (scrollY + rect.top);
800
+ var adjustedX = pageX - (window.scrollX + rect.left);
801
+ var adjustedY = pageY - (window.scrollY + rect.top);
802
802
  // the canvas might be CSS-scaled compared to its backbuffer;
803
803
  // SDL-using content will want mouse coordinates in terms
804
804
  // of backbuffer units.
@@ -931,6 +931,22 @@ var Browser = {
931
931
  }
932
932
  };
933
933
 
934
+ /** @type {!Int16Array} */ var HEAP16;
935
+
936
+ /** @type {!Int32Array} */ var HEAP32;
937
+
938
+ /** @type {!Int8Array} */ var HEAP8;
939
+
940
+ /** @type {!Float32Array} */ var HEAPF32;
941
+
942
+ /** @type {!Float64Array} */ var HEAPF64;
943
+
944
+ /** @type {!Uint16Array} */ var HEAPU16;
945
+
946
+ /** @type {!Uint32Array} */ var HEAPU32;
947
+
948
+ /** @type {!Uint8Array} */ var HEAPU8;
949
+
934
950
  var callRuntimeCallbacks = callbacks => {
935
951
  while (callbacks.length > 0) {
936
952
  // Pass the module as the first argument.
@@ -1016,13 +1032,10 @@ var initRandomFill = () => {
1016
1032
  var nodeCrypto = require("node:crypto");
1017
1033
  return view => nodeCrypto.randomFillSync(view);
1018
1034
  }
1019
- return view => crypto.getRandomValues(view);
1035
+ return view => (crypto.getRandomValues(view), 0);
1020
1036
  };
1021
1037
 
1022
- var randomFill = view => {
1023
- // Lazily init on the first invocation.
1024
- (randomFill = initRandomFill())(view);
1025
- };
1038
+ var randomFill = view => (randomFill = initRandomFill())(view);
1026
1039
 
1027
1040
  var PATH_FS = {
1028
1041
  resolve: (...args) => {
@@ -1417,12 +1430,14 @@ var MEMFS = {
1417
1430
  } else if (FS.isFile(node.mode)) {
1418
1431
  node.node_ops = MEMFS.ops_table.file.node;
1419
1432
  node.stream_ops = MEMFS.ops_table.file.stream;
1433
+ // The actual number of bytes used in the typed array, as opposed to
1434
+ // contents.length which gives the whole capacity.
1420
1435
  node.usedBytes = 0;
1421
- // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.
1422
- // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred
1423
- // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size
1424
- // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.
1425
- node.contents = null;
1436
+ // The byte data of the file is stored in a typed array.
1437
+ // Note: typed arrays are not resizable like normal JS arrays are, so
1438
+ // there is a small penalty involved for appending file writes that
1439
+ // continuously grow a file similar to std::vector capacity vs used.
1440
+ node.contents = MEMFS.emptyFileContents ??= new Uint8Array(0);
1426
1441
  } else if (FS.isLink(node.mode)) {
1427
1442
  node.node_ops = MEMFS.ops_table.link.node;
1428
1443
  node.stream_ops = MEMFS.ops_table.link.stream;
@@ -1439,42 +1454,34 @@ var MEMFS = {
1439
1454
  return node;
1440
1455
  },
1441
1456
  getFileDataAsTypedArray(node) {
1442
- if (!node.contents) return new Uint8Array(0);
1443
- if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes);
1444
- // Make sure to not return excess unused bytes.
1445
- return new Uint8Array(node.contents);
1457
+ return node.contents.subarray(0, node.usedBytes);
1446
1458
  },
1447
1459
  expandFileStorage(node, newCapacity) {
1448
- var prevCapacity = node.contents ? node.contents.length : 0;
1460
+ var prevCapacity = node.contents.length;
1449
1461
  if (prevCapacity >= newCapacity) return;
1450
1462
  // No need to expand, the storage was already large enough.
1451
- // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.
1452
- // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to
1453
- // avoid overshooting the allocation cap by a very large margin.
1463
+ // Don't expand strictly to the given requested limit if it's only a very
1464
+ // small increase, but instead geometrically grow capacity.
1465
+ // For small filesizes (<1MB), perform size*2 geometric increase, but for
1466
+ // large sizes, do a much more conservative size*1.125 increase to avoid
1467
+ // overshooting the allocation cap by a very large margin.
1454
1468
  var CAPACITY_DOUBLING_MAX = 1024 * 1024;
1455
1469
  newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125)) >>> 0);
1456
- if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256);
1470
+ if (prevCapacity) newCapacity = Math.max(newCapacity, 256);
1457
1471
  // At minimum allocate 256b for each file when expanding.
1458
- var oldContents = node.contents;
1472
+ var oldContents = MEMFS.getFileDataAsTypedArray(node);
1459
1473
  node.contents = new Uint8Array(newCapacity);
1460
1474
  // Allocate new storage.
1461
- if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0);
1475
+ node.contents.set(oldContents);
1462
1476
  },
1463
1477
  resizeFileStorage(node, newSize) {
1464
1478
  if (node.usedBytes == newSize) return;
1465
- if (newSize == 0) {
1466
- node.contents = null;
1467
- // Fully decommit when requesting a resize to zero.
1468
- node.usedBytes = 0;
1469
- } else {
1470
- var oldContents = node.contents;
1471
- node.contents = new Uint8Array(newSize);
1472
- // Allocate new storage.
1473
- if (oldContents) {
1474
- node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
1475
- }
1476
- node.usedBytes = newSize;
1477
- }
1479
+ var oldContents = node.contents;
1480
+ node.contents = new Uint8Array(newSize);
1481
+ // Allocate new storage.
1482
+ node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
1483
+ // Copy old data over to the new storage.
1484
+ node.usedBytes = newSize;
1478
1485
  },
1479
1486
  node_ops: {
1480
1487
  getattr(node) {
@@ -1579,12 +1586,7 @@ var MEMFS = {
1579
1586
  var contents = stream.node.contents;
1580
1587
  if (position >= stream.node.usedBytes) return 0;
1581
1588
  var size = Math.min(stream.node.usedBytes - position, length);
1582
- if (size > 8 && contents.subarray) {
1583
- // non-trivial, and typed array
1584
- buffer.set(contents.subarray(position, position + size), offset);
1585
- } else {
1586
- for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
1587
- }
1589
+ buffer.set(contents.subarray(position, position + size), offset);
1588
1590
  return size;
1589
1591
  },
1590
1592
  write(stream, buffer, offset, length, position, canOwn) {
@@ -1598,34 +1600,19 @@ var MEMFS = {
1598
1600
  if (!length) return 0;
1599
1601
  var node = stream.node;
1600
1602
  node.mtime = node.ctime = Date.now();
1601
- if (buffer.subarray && (!node.contents || node.contents.subarray)) {
1602
- // This write is from a typed array to a typed array?
1603
- if (canOwn) {
1604
- node.contents = buffer.subarray(offset, offset + length);
1605
- node.usedBytes = length;
1606
- return length;
1607
- } else if (node.usedBytes === 0 && position === 0) {
1608
- // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
1609
- node.contents = buffer.slice(offset, offset + length);
1610
- node.usedBytes = length;
1611
- return length;
1612
- } else if (position + length <= node.usedBytes) {
1613
- // Writing to an already allocated and used subrange of the file?
1614
- node.contents.set(buffer.subarray(offset, offset + length), position);
1615
- return length;
1616
- }
1617
- }
1618
- // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
1619
- MEMFS.expandFileStorage(node, position + length);
1620
- if (node.contents.subarray && buffer.subarray) {
1603
+ if (canOwn) {
1604
+ node.contents = buffer.subarray(offset, offset + length);
1605
+ node.usedBytes = length;
1606
+ } else if (node.usedBytes === 0 && position === 0) {
1607
+ // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
1608
+ node.contents = buffer.slice(offset, offset + length);
1609
+ node.usedBytes = length;
1610
+ } else {
1611
+ MEMFS.expandFileStorage(node, position + length);
1621
1612
  // Use typed array write which is available.
1622
1613
  node.contents.set(buffer.subarray(offset, offset + length), position);
1623
- } else {
1624
- for (var i = 0; i < length; i++) {
1625
- node.contents[position + i] = buffer[offset + i];
1626
- }
1614
+ node.usedBytes = Math.max(node.usedBytes, position + length);
1627
1615
  }
1628
- node.usedBytes = Math.max(node.usedBytes, position + length);
1629
1616
  return length;
1630
1617
  },
1631
1618
  llseek(stream, offset, whence) {
@@ -1650,7 +1637,7 @@ var MEMFS = {
1650
1637
  var allocated;
1651
1638
  var contents = stream.node.contents;
1652
1639
  // Only make a new copy when MAP_PRIVATE is specified.
1653
- if (!(flags & 2) && contents && contents.buffer === HEAP8.buffer) {
1640
+ if (!(flags & 2) && contents.buffer === HEAP8.buffer) {
1654
1641
  // We can't emulate MAP_SHARED when the file is not backed by the
1655
1642
  // buffer we're mapping to (e.g. the HEAP buffer).
1656
1643
  allocated = false;
@@ -1687,6 +1674,7 @@ var MEMFS = {
1687
1674
  };
1688
1675
 
1689
1676
  var FS_modeStringToFlags = str => {
1677
+ if (typeof str != "string") return str;
1690
1678
  var flagModes = {
1691
1679
  "r": 0,
1692
1680
  "r+": 2,
@@ -1702,6 +1690,16 @@ var FS_modeStringToFlags = str => {
1702
1690
  return flags;
1703
1691
  };
1704
1692
 
1693
+ var FS_fileDataToTypedArray = data => {
1694
+ if (typeof data == "string") {
1695
+ data = intArrayFromString(data, true);
1696
+ }
1697
+ if (!data.subarray) {
1698
+ data = new Uint8Array(data);
1699
+ }
1700
+ return data;
1701
+ };
1702
+
1705
1703
  var FS_getMode = (canRead, canWrite) => {
1706
1704
  var mode = 0;
1707
1705
  if (canRead) mode |= 292 | 73;
@@ -1877,7 +1875,7 @@ var FS = {
1877
1875
  if (!PATH.isAbs(path)) {
1878
1876
  path = FS.cwd() + "/" + path;
1879
1877
  }
1880
- // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
1878
+ // limit max consecutive symlinks to SYMLOOP_MAX.
1881
1879
  linkloop: for (var nlinks = 0; nlinks < 40; nlinks++) {
1882
1880
  // split the absolute path
1883
1881
  var parts = path.split("/").filter(p => !!p);
@@ -2160,7 +2158,14 @@ var FS = {
2160
2158
  var arg = setattr ? stream : node;
2161
2159
  setattr ??= node.node_ops.setattr;
2162
2160
  FS.checkOpExists(setattr, 63);
2163
- setattr(arg, attr);
2161
+ try {
2162
+ setattr(arg, attr);
2163
+ } catch (e) {
2164
+ if (e instanceof RangeError) {
2165
+ throw new FS.ErrnoError(22);
2166
+ }
2167
+ throw e;
2168
+ }
2164
2169
  },
2165
2170
  chrdev_stream_ops: {
2166
2171
  open(stream) {
@@ -2678,7 +2683,7 @@ var FS = {
2678
2683
  if (path === "") {
2679
2684
  throw new FS.ErrnoError(44);
2680
2685
  }
2681
- flags = typeof flags == "string" ? FS_modeStringToFlags(flags) : flags;
2686
+ flags = FS_modeStringToFlags(flags);
2682
2687
  if ((flags & 64)) {
2683
2688
  mode = (mode & 4095) | 32768;
2684
2689
  } else {
@@ -2910,14 +2915,8 @@ var FS = {
2910
2915
  writeFile(path, data, opts = {}) {
2911
2916
  opts.flags = opts.flags || 577;
2912
2917
  var stream = FS.open(path, opts.flags, opts.mode);
2913
- if (typeof data == "string") {
2914
- data = new Uint8Array(intArrayFromString(data, true));
2915
- }
2916
- if (ArrayBuffer.isView(data)) {
2917
- FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
2918
- } else {
2919
- abort("Unsupported data type");
2920
- }
2918
+ data = FS_fileDataToTypedArray(data);
2919
+ FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
2921
2920
  FS.close(stream);
2922
2921
  },
2923
2922
  cwd: () => FS.currentPath,
@@ -3147,11 +3146,7 @@ var FS = {
3147
3146
  var mode = FS_getMode(canRead, canWrite);
3148
3147
  var node = FS.create(path, mode);
3149
3148
  if (data) {
3150
- if (typeof data == "string") {
3151
- var arr = new Array(data.length);
3152
- for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
3153
- data = arr;
3154
- }
3149
+ data = FS_fileDataToTypedArray(data);
3155
3150
  // make sure we can write to the file
3156
3151
  FS.chmod(node, mode | 146);
3157
3152
  var stream = FS.open(node, 577);
@@ -3414,6 +3409,7 @@ var FS = {
3414
3409
  };
3415
3410
 
3416
3411
  var SYSCALLS = {
3412
+ currentUmask: 18,
3417
3413
  calculateAt(dirfd, path, allowEmpty) {
3418
3414
  if (PATH.isAbs(path)) {
3419
3415
  return path;
@@ -3582,7 +3578,8 @@ function ___syscall_fcntl64(fd, cmd, varargs) {
3582
3578
  case 4:
3583
3579
  {
3584
3580
  var arg = syscallGetVarargI();
3585
- stream.flags |= arg;
3581
+ var mask = 289792;
3582
+ stream.flags = (stream.flags & ~mask) | (arg & mask);
3586
3583
  return 0;
3587
3584
  }
3588
3585
 
@@ -3624,7 +3621,7 @@ var convertI32PairToI53Checked = (lo, hi) => ((hi + 2097152) >>> 0 < 4194305 - !
3624
3621
  function ___syscall_ftruncate64(fd, length_low, length_high) {
3625
3622
  var length = convertI32PairToI53Checked(length_low, length_high);
3626
3623
  try {
3627
- if (isNaN(length)) return -61;
3624
+ if (isNaN(length)) return -22;
3628
3625
  FS.ftruncate(fd, length);
3629
3626
  return 0;
3630
3627
  } catch (e) {
@@ -3785,6 +3782,9 @@ function ___syscall_openat(dirfd, path, flags, varargs) {
3785
3782
  path = SYSCALLS.getStr(path);
3786
3783
  path = SYSCALLS.calculateAt(dirfd, path);
3787
3784
  var mode = varargs ? syscallGetVarargI() : 0;
3785
+ if (flags & 64) {
3786
+ mode &= ~SYSCALLS.currentUmask;
3787
+ }
3788
3788
  return FS.open(path, flags, mode).fd;
3789
3789
  } catch (e) {
3790
3790
  if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
@@ -3859,6 +3859,9 @@ var setTempRet0 = val => __emscripten_tempret_set(val);
3859
3859
  var __mktime_js = function(tmPtr) {
3860
3860
  var ret = (() => {
3861
3861
  var date = new Date(HEAP32[(((tmPtr) + (20)) >> 2)] + 1900, HEAP32[(((tmPtr) + (16)) >> 2)], HEAP32[(((tmPtr) + (12)) >> 2)], HEAP32[(((tmPtr) + (8)) >> 2)], HEAP32[(((tmPtr) + (4)) >> 2)], HEAP32[((tmPtr) >> 2)], 0);
3862
+ if (isNaN(date.getTime())) {
3863
+ return -1;
3864
+ }
3862
3865
  // There's an ambiguous hour when the time goes back; the tm_isdst field is
3863
3866
  // used to disambiguate it. Date() basically guesses, so we fix it up if it
3864
3867
  // guessed wrong, or fill in tm_isdst with the guess if it's -1.
@@ -3888,12 +3891,8 @@ var __mktime_js = function(tmPtr) {
3888
3891
  HEAP32[(((tmPtr) + (12)) >> 2)] = date.getDate();
3889
3892
  HEAP32[(((tmPtr) + (16)) >> 2)] = date.getMonth();
3890
3893
  HEAP32[(((tmPtr) + (20)) >> 2)] = date.getYear();
3891
- var timeMs = date.getTime();
3892
- if (isNaN(timeMs)) {
3893
- return -1;
3894
- }
3895
- // Return time in microseconds
3896
- return timeMs / 1e3;
3894
+ // Return time in seconds
3895
+ return date.getTime() / 1e3;
3897
3896
  })();
3898
3897
  return (setTempRet0((tempDouble = ret, (+(Math.abs(tempDouble))) >= 1 ? (tempDouble > 0 ? (+(Math.floor((tempDouble) / 4294967296))) >>> 0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296))))) >>> 0) : 0)),
3899
3898
  ret >>> 0);
@@ -5215,7 +5214,7 @@ var WebGPU = {
5215
5214
  ToneMappingMode: [ , "standard", "extended" ],
5216
5215
  VertexFormat: [ , "uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra" ],
5217
5216
  VertexStepMode: [ , "vertex", "instance" ],
5218
- WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1" ]
5217
+ WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1", "linear_indexing" ]
5219
5218
  };
5220
5219
 
5221
5220
  var _emwgpuBufferDestroy = bufferPtr => {
@@ -5271,7 +5270,6 @@ var getExecutableName = () => thisProgram || "./this.program";
5271
5270
  var getEnvStrings = () => {
5272
5271
  if (!getEnvStrings.strings) {
5273
5272
  // Default values.
5274
- // Browser language detection #8751
5275
5273
  var lang = (globalThis.navigator?.language ?? "C").replace("-", "_") + ".UTF-8";
5276
5274
  var env = {
5277
5275
  "USER": "web_user",
@@ -5365,7 +5363,7 @@ function _fd_read(fd, iov, iovcnt, pnum) {
5365
5363
  function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
5366
5364
  var offset = convertI32PairToI53Checked(offset_low, offset_high);
5367
5365
  try {
5368
- if (isNaN(offset)) return 61;
5366
+ if (isNaN(offset)) return 22;
5369
5367
  var stream = SYSCALLS.getStreamFromFD(fd);
5370
5368
  FS.llseek(stream, offset, whence);
5371
5369
  (tempI64 = [ stream.position >>> 0, (tempDouble = stream.position, (+(Math.abs(tempDouble))) >= 1 ? (tempDouble > 0 ? (+(Math.floor((tempDouble) / 4294967296))) >>> 0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296))))) >>> 0) : 0) ],
@@ -6226,15 +6224,7 @@ var _emscripten_glViewport = (x0, x1, x2, x3) => GLctx.viewport(x0, x1, x2, x3);
6226
6224
 
6227
6225
  var _glViewport = _emscripten_glViewport;
6228
6226
 
6229
- function _random_get(buffer, size) {
6230
- try {
6231
- randomFill(HEAPU8.subarray(buffer, buffer + size));
6232
- return 0;
6233
- } catch (e) {
6234
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
6235
- return e.errno;
6236
- }
6237
- }
6227
+ var _random_get = (buffer, size) => randomFill(HEAPU8.subarray(buffer, buffer + size));
6238
6228
 
6239
6229
  var _wgpuCommandEncoderCopyTextureToBuffer = (encoderPtr, srcPtr, dstPtr, copySizePtr) => {
6240
6230
  var commandEncoder = WebGPU.getJsObject(encoderPtr);
@@ -6407,7 +6397,7 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
6407
6397
  // End JS library exports
6408
6398
  // end include: postlibrary.js
6409
6399
  var ASM_CONSTS = {
6410
- 706631: () => {
6400
+ 722479: () => {
6411
6401
  specialHTMLTargets["#canvas"] = Module.canvas;
6412
6402
  }
6413
6403
  };
@@ -6548,7 +6538,7 @@ function custom_emscripten_dbgn(str, len) {
6548
6538
  }
6549
6539
 
6550
6540
  // Imports from the Wasm binary.
6551
- var _free, _malloc, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_jii, dynCall_ji, dynCall_iiiijij, dynCall_viji, dynCall_viijii, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_iiiji, dynCall_vij, dynCall_viiiji, dynCall_viiji, dynCall_vijjj, dynCall_vj, dynCall_viij, dynCall_jiji, dynCall_iiiiij, dynCall_iiiiijj, dynCall_iiiiiijj, memory, _kVersionStampBuildChangelistStr, _kVersionStampCitcSnapshotStr, _kVersionStampCitcWorkspaceIdStr, _kVersionStampSourceUriStr, _kVersionStampBuildClientStr, _kVersionStampBuildClientMintStatusStr, _kVersionStampBuildCompilerStr, _kVersionStampBuildDateTimePstStr, _kVersionStampBuildDepotPathStr, _kVersionStampBuildIdStr, _kVersionStampBuildInfoStr, _kVersionStampBuildLabelStr, _kVersionStampBuildTargetStr, _kVersionStampBuildTimestampStr, _kVersionStampBuildToolStr, _kVersionStampG3BuildTargetStr, _kVersionStampVerifiableStr, _kVersionStampBuildFdoTypeStr, _kVersionStampBuildBaselineChangelistStr, _kVersionStampBuildLtoTypeStr, _kVersionStampBuildPropellerTypeStr, _kVersionStampBuildPghoTypeStr, _kVersionStampBuildUsernameStr, _kVersionStampBuildHostnameStr, _kVersionStampBuildDirectoryStr, _kVersionStampBuildChangelistInt, _kVersionStampCitcSnapshotInt, _kVersionStampBuildClientMintStatusInt, _kVersionStampBuildTimestampInt, _kVersionStampVerifiableInt, _kVersionStampBuildCoverageEnabledInt, _kVersionStampBuildBaselineChangelistInt, _kVersionStampPrecookedTimestampStr, _kVersionStampPrecookedClientInfoStr, __indirect_function_table, wasmMemory, wasmTable;
6541
+ var _free, _malloc, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_jii, dynCall_ji, dynCall_iiiijij, dynCall_viji, dynCall_viijii, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_iiiji, dynCall_vij, dynCall_viiiji, dynCall_viiji, dynCall_vijjj, dynCall_vj, dynCall_viij, dynCall_jiji, dynCall_iiiiij, dynCall_iiiiijj, dynCall_iiiiiijj, memory, _kVersionStampBuildChangelistStr, _kVersionStampCitcSnapshotStr, _kVersionStampCitcWorkspaceIdStr, _kVersionStampSourceUriStr, _kVersionStampBuildClientStr, _kVersionStampBuildClientMintStatusStr, _kVersionStampBuildCompilerStr, _kVersionStampBuildDateTimePstStr, _kVersionStampBuildDepotPathStr, _kVersionStampBuildIdStr, _kVersionStampBuildInfoStr, _kVersionStampBuildLabelStr, _kVersionStampBuildTargetStr, _kVersionStampBuildTimestampStr, _kVersionStampBuildToolStr, _kVersionStampG3BuildTargetStr, _kVersionStampVerifiableStr, _kVersionStampBuildFdoTypeStr, _kVersionStampBuildBaselineChangelistStr, _kVersionStampBuildLtoTypeStr, _kVersionStampBuildPropellerTypeStr, _kVersionStampBuildPghoTypeStr, _kVersionStampBuildUsernameStr, _kVersionStampBuildHostnameStr, _kVersionStampBuildDirectoryStr, _kVersionStampBuildChangelistInt, _kVersionStampCitcSnapshotInt, _kVersionStampBuildClientMintStatusInt, _kVersionStampBuildTimestampInt, _kVersionStampVerifiableInt, _kVersionStampBuildCoverageEnabledInt, _kVersionStampBuildBaselineChangelistInt, _kVersionStampPrecookedTimestampStr, _kVersionStampPrecookedClientInfoStr, __indirect_function_table, _kVersionStampBuildHasHardeningProtobuf, wasmMemory, wasmTable;
6552
6542
 
6553
6543
  function assignWasmExports(wasmExports) {
6554
6544
  _free = Module["_free"] = wasmExports["Sb"];
@@ -6647,11 +6637,11 @@ function assignWasmExports(wasmExports) {
6647
6637
  _waitUntilIdle = Module["_waitUntilIdle"] = wasmExports["Dd"];
6648
6638
  _closeGraph = Module["_closeGraph"] = wasmExports["Ed"];
6649
6639
  _setAutoRenderToScreen = Module["_setAutoRenderToScreen"] = wasmExports["Fd"];
6650
- _emscripten_builtin_memalign = wasmExports["Gd"];
6651
- __emscripten_tempret_set = wasmExports["Hd"];
6652
- __emscripten_stack_restore = wasmExports["Id"];
6653
- __emscripten_stack_alloc = wasmExports["Jd"];
6654
- _emscripten_stack_get_current = wasmExports["Kd"];
6640
+ _emscripten_builtin_memalign = wasmExports["Hd"];
6641
+ __emscripten_tempret_set = wasmExports["Id"];
6642
+ __emscripten_stack_restore = wasmExports["Jd"];
6643
+ __emscripten_stack_alloc = wasmExports["Kd"];
6644
+ _emscripten_stack_get_current = wasmExports["Ld"];
6655
6645
  dynCall_jii = wasmExports["dynCall_jii"];
6656
6646
  dynCall_ji = wasmExports["dynCall_ji"];
6657
6647
  dynCall_iiiijij = wasmExports["dynCall_iiiijij"];
@@ -6708,11 +6698,12 @@ function assignWasmExports(wasmExports) {
6708
6698
  _kVersionStampPrecookedTimestampStr = Module["_kVersionStampPrecookedTimestampStr"] = wasmExports["Pb"].value;
6709
6699
  _kVersionStampPrecookedClientInfoStr = Module["_kVersionStampPrecookedClientInfoStr"] = wasmExports["Qb"].value;
6710
6700
  __indirect_function_table = wasmTable = wasmExports["Rb"];
6701
+ _kVersionStampBuildHasHardeningProtobuf = Module["_kVersionStampBuildHasHardeningProtobuf"] = wasmExports["Gd"].value;
6711
6702
  }
6712
6703
 
6713
6704
  var wasmImports = {
6714
6705
  /** @export */ gb: JsOnEmptyPacketListener,
6715
- /** @export */ R: JsOnSimpleListenerBinaryArray,
6706
+ /** @export */ S: JsOnSimpleListenerBinaryArray,
6716
6707
  /** @export */ fb: JsOnSimpleListenerBool,
6717
6708
  /** @export */ eb: JsOnSimpleListenerDouble,
6718
6709
  /** @export */ db: JsOnSimpleListenerFloat,
@@ -6729,36 +6720,36 @@ var wasmImports = {
6729
6720
  /** @export */ Va: JsOnVectorListenerUint,
6730
6721
  /** @export */ x: JsWrapErrorListener,
6731
6722
  /** @export */ a: JsWrapSimpleListeners,
6732
- /** @export */ Q: UseBottomLeftGpuOrigin,
6733
- /** @export */ Y: __asyncjs__mediapipe_map_buffer_jspi,
6723
+ /** @export */ R: UseBottomLeftGpuOrigin,
6724
+ /** @export */ Z: __asyncjs__mediapipe_map_buffer_jspi,
6734
6725
  /** @export */ Ua: ___syscall_dup,
6735
6726
  /** @export */ Ta: ___syscall_faccessat,
6736
- /** @export */ P: ___syscall_fcntl64,
6727
+ /** @export */ Q: ___syscall_fcntl64,
6737
6728
  /** @export */ Sa: ___syscall_fstat64,
6738
- /** @export */ ea: ___syscall_ftruncate64,
6729
+ /** @export */ fa: ___syscall_ftruncate64,
6739
6730
  /** @export */ Ra: ___syscall_ioctl,
6740
6731
  /** @export */ Qa: ___syscall_lstat64,
6741
6732
  /** @export */ Pa: ___syscall_newfstatat,
6742
- /** @export */ O: ___syscall_openat,
6733
+ /** @export */ P: ___syscall_openat,
6743
6734
  /** @export */ Oa: ___syscall_stat64,
6744
6735
  /** @export */ Ja: __abort_js,
6745
- /** @export */ ba: __gmtime_js,
6746
- /** @export */ aa: __localtime_js,
6747
- /** @export */ $: __mktime_js,
6748
- /** @export */ _: __mmap_js,
6749
- /** @export */ Z: __munmap_js,
6736
+ /** @export */ ca: __gmtime_js,
6737
+ /** @export */ ba: __localtime_js,
6738
+ /** @export */ aa: __mktime_js,
6739
+ /** @export */ $: __mmap_js,
6740
+ /** @export */ _: __munmap_js,
6750
6741
  /** @export */ Ia: __tzset_js,
6751
- /** @export */ da: _clock_time_get,
6742
+ /** @export */ ea: _clock_time_get,
6752
6743
  /** @export */ Ha: custom_emscripten_dbgn,
6753
6744
  /** @export */ Ga: _emscripten_asm_const_int,
6754
6745
  /** @export */ u: _emscripten_errn,
6755
6746
  /** @export */ Fa: _emscripten_get_heap_max,
6756
6747
  /** @export */ b: _emscripten_get_now,
6757
- /** @export */ M: _emscripten_has_asyncify,
6748
+ /** @export */ N: _emscripten_has_asyncify,
6758
6749
  /** @export */ Ea: _emscripten_outn,
6759
6750
  /** @export */ Da: _emscripten_pc_get_function,
6760
6751
  /** @export */ Ca: _emscripten_resize_heap,
6761
- /** @export */ L: _emscripten_stack_snapshot,
6752
+ /** @export */ M: _emscripten_stack_snapshot,
6762
6753
  /** @export */ Ba: _emscripten_stack_unwind_buffer,
6763
6754
  /** @export */ Aa: _emscripten_webgl_create_context,
6764
6755
  /** @export */ za: _emscripten_webgl_destroy_context,
@@ -6771,61 +6762,61 @@ var wasmImports = {
6771
6762
  /** @export */ ua: _emwgpuDeviceDestroy,
6772
6763
  /** @export */ Na: _environ_get,
6773
6764
  /** @export */ Ma: _environ_sizes_get,
6774
- /** @export */ ta: _exit,
6765
+ /** @export */ L: _exit,
6775
6766
  /** @export */ w: _fd_close,
6776
- /** @export */ N: _fd_read,
6777
- /** @export */ ca: _fd_seek,
6767
+ /** @export */ O: _fd_read,
6768
+ /** @export */ da: _fd_seek,
6778
6769
  /** @export */ v: _fd_write,
6779
6770
  /** @export */ t: _glActiveTexture,
6780
6771
  /** @export */ K: _glAttachShader,
6781
- /** @export */ sa: _glBindAttribLocation,
6772
+ /** @export */ ta: _glBindAttribLocation,
6782
6773
  /** @export */ f: _glBindBuffer,
6783
6774
  /** @export */ m: _glBindFramebuffer,
6784
6775
  /** @export */ e: _glBindTexture,
6785
6776
  /** @export */ s: _glBufferData,
6786
6777
  /** @export */ h: _glClientWaitSync,
6787
- /** @export */ ra: _glCompileShader,
6788
- /** @export */ qa: _glCreateProgram,
6789
- /** @export */ pa: _glCreateShader,
6778
+ /** @export */ sa: _glCompileShader,
6779
+ /** @export */ ra: _glCreateProgram,
6780
+ /** @export */ qa: _glCreateShader,
6790
6781
  /** @export */ J: _glDeleteFramebuffers,
6791
- /** @export */ oa: _glDeleteProgram,
6782
+ /** @export */ pa: _glDeleteProgram,
6792
6783
  /** @export */ I: _glDeleteShader,
6793
6784
  /** @export */ l: _glDeleteSync,
6794
6785
  /** @export */ H: _glDeleteTextures,
6795
6786
  /** @export */ G: _glDetachShader,
6796
6787
  /** @export */ F: _glDisableVertexAttribArray,
6797
- /** @export */ na: _glDrawArrays,
6788
+ /** @export */ oa: _glDrawArrays,
6798
6789
  /** @export */ E: _glEnableVertexAttribArray,
6799
6790
  /** @export */ D: _glFenceSync,
6800
6791
  /** @export */ k: _glFinish,
6801
6792
  /** @export */ r: _glFramebufferTexture2D,
6802
6793
  /** @export */ C: _glGenBuffers,
6803
- /** @export */ ma: _glGenFramebuffers,
6794
+ /** @export */ na: _glGenFramebuffers,
6804
6795
  /** @export */ q: _glGenTextures,
6805
6796
  /** @export */ j: _glGetError,
6806
6797
  /** @export */ B: _glGetIntegerv,
6807
6798
  /** @export */ p: _glGetString,
6808
- /** @export */ la: _glGetUniformLocation,
6809
- /** @export */ ka: _glLinkProgram,
6799
+ /** @export */ ma: _glGetUniformLocation,
6800
+ /** @export */ la: _glLinkProgram,
6810
6801
  /** @export */ o: _glPixelStorei,
6811
6802
  /** @export */ A: _glReadPixels,
6812
- /** @export */ ja: _glShaderSource,
6813
- /** @export */ ia: _glTexImage2D,
6803
+ /** @export */ ka: _glShaderSource,
6804
+ /** @export */ ja: _glTexImage2D,
6814
6805
  /** @export */ d: _glTexParameteri,
6815
6806
  /** @export */ z: _glTexStorage2D,
6816
- /** @export */ ha: _glUniform1i,
6817
- /** @export */ ga: _glUseProgram,
6807
+ /** @export */ ia: _glUniform1i,
6808
+ /** @export */ ha: _glUseProgram,
6818
6809
  /** @export */ y: _glVertexAttribPointer,
6819
- /** @export */ fa: _glViewport,
6810
+ /** @export */ ga: _glViewport,
6820
6811
  /** @export */ n: hardware_concurrency,
6821
6812
  /** @export */ La: _proc_exit,
6822
6813
  /** @export */ Ka: _random_get,
6823
- /** @export */ X: _wgpuCommandEncoderCopyTextureToBuffer,
6824
- /** @export */ W: _wgpuCommandEncoderFinish,
6825
- /** @export */ V: _wgpuDeviceCreateCommandEncoder,
6826
- /** @export */ U: _wgpuQueueSubmit,
6827
- /** @export */ T: _wgpuTextureDestroy,
6828
- /** @export */ S: _wgpuTextureGetFormat
6814
+ /** @export */ Y: _wgpuCommandEncoderCopyTextureToBuffer,
6815
+ /** @export */ X: _wgpuCommandEncoderFinish,
6816
+ /** @export */ W: _wgpuDeviceCreateCommandEncoder,
6817
+ /** @export */ V: _wgpuQueueSubmit,
6818
+ /** @export */ U: _wgpuTextureDestroy,
6819
+ /** @export */ T: _wgpuTextureGetFormat
6829
6820
  };
6830
6821
 
6831
6822
  // include: postamble.js
Binary file