MCPcopy
hub / github.com/opentrace/opentrace / 'build/lbug/lbug_wasm.js'

Function 'build/lbug/lbug_wasm.js'

ui/public/lbug_wasm_worker.js:1500–12393  ·  view source on GitHub ↗
(exports, module)

Source from the content-addressed store, hash-verified

1498// build/lbug/lbug_wasm.js
1499var require_lbug_wasm = __commonJS({
1500 'build/lbug/lbug_wasm.js'(exports, module) {
1501 var lbug = (() => {
1502 var _scriptName = globalThis.document?.currentScript?.src;
1503 return async function (moduleArg = {}) {
1504 var moduleRtn;
1505 (function () {
1506 function humanReadableVersionToPacked(str) {
1507 str = str.split('-')[0];
1508 var vers = str.split('.').slice(0, 3);
1509 while (vers.length < 3) vers.push('00');
1510 vers = vers.map((n, i, arr) => n.padStart(2, '0'));
1511 return vers.join('');
1512 }
1513 var packedVersionToHumanReadable = (n) =>
1514 [(n / 1e4) | 0, ((n / 100) | 0) % 100, n % 100].join('.');
1515 var TARGET_NOT_SUPPORTED = 2147483647;
1516 var currentNodeVersion =
1517 typeof process !== 'undefined' && process.versions?.node
1518 ? humanReadableVersionToPacked(process.versions.node)
1519 : TARGET_NOT_SUPPORTED;
1520 if (currentNodeVersion < 16e4) {
1521 throw new Error(
1522 `This emscripten-generated code requires node v${packedVersionToHumanReadable(16e4)} (detected v${packedVersionToHumanReadable(currentNodeVersion)})`,
1523 );
1524 }
1525 var userAgent =
1526 typeof navigator !== 'undefined' && navigator.userAgent;
1527 if (!userAgent) {
1528 return;
1529 }
1530 var currentSafariVersion =
1531 userAgent.includes('Safari/') &&
1532 !userAgent.includes('Chrome/') &&
1533 userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)
1534 ? humanReadableVersionToPacked(
1535 userAgent.match(/Version\/(\d+\.?\d*\.?\d*)/)[1],
1536 )
1537 : TARGET_NOT_SUPPORTED;
1538 if (currentSafariVersion < 15e4) {
1539 throw new Error(
1540 `This emscripten-generated code requires Safari v${packedVersionToHumanReadable(15e4)} (detected v${currentSafariVersion})`,
1541 );
1542 }
1543 var currentFirefoxVersion = userAgent.match(
1544 /Firefox\/(\d+(?:\.\d+)?)/,
1545 )
1546 ? parseFloat(userAgent.match(/Firefox\/(\d+(?:\.\d+)?)/)[1])
1547 : TARGET_NOT_SUPPORTED;
1548 if (currentFirefoxVersion < 79) {
1549 throw new Error(
1550 `This emscripten-generated code requires Firefox v79 (detected v${currentFirefoxVersion})`,
1551 );
1552 }
1553 var currentChromeVersion = userAgent.match(/Chrome\/(\d+(?:\.\d+)?)/)
1554 ? parseFloat(userAgent.match(/Chrome\/(\d+(?:\.\d+)?)/)[1])
1555 : TARGET_NOT_SUPPORTED;
1556 if (currentChromeVersion < 85) {
1557 throw new Error(

Callers

nothing calls this directly

Calls 15

isFileURIFunction · 0.85
assertFunction · 0.85
abortFunction · 0.85
trimFunction · 0.85
toAbsoluteFunction · 0.85
doneFunction · 0.85
throwBindingErrorFunction · 0.85
__emval_decrefFunction · 0.85
init_ClassHandleFunction · 0.85
init_RegisteredPointerFunction · 0.85

Tested by

no test coverage detected