@validate.qa/runner 1.0.87 → 1.0.88
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.
- package/dist/cli.js +2378 -20
- package/dist/cli.mjs +2378 -20
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -87744,6 +87744,7 @@ var require_auth_recipe = __commonJS({
|
|
|
87744
87744
|
var START_MARKER = `// >>> VALIDATE_QA_AUTH ${exports2.AUTH_MARKER_VERSION} \u2014 generated, do not edit >>>`;
|
|
87745
87745
|
var END_MARKER = `// <<< VALIDATE_QA_AUTH ${exports2.AUTH_MARKER_VERSION} <<<`;
|
|
87746
87746
|
var SHARED_AUTH_RUNTIME_ENABLED = `!/^false$/i.test((process.env.SHARED_AUTH_INJECT ?? '').trim())`;
|
|
87747
|
+
var WARM_PROOF_SETTLE_MS = 8e3;
|
|
87747
87748
|
var AUTH_REGION_RE = /\/\/ >>> VALIDATE_QA_AUTH[^\n]*\r?\n[\s\S]*?\/\/ <<< VALIDATE_QA_AUTH[^\n]*\r?\n?/g;
|
|
87748
87749
|
function computeRecipeHash(input) {
|
|
87749
87750
|
const canonical = JSON.stringify({
|
|
@@ -87879,12 +87880,20 @@ ${tabs}`);
|
|
|
87879
87880
|
const pred = urlProofPredicateExpr(recipe.authProof.route, recipe.authProof.exact);
|
|
87880
87881
|
lines.push(` await page.waitForURL((u) => !(${pred})(u), { timeout: 2000 }).catch(() => {});`);
|
|
87881
87882
|
lines.push(` if ((${pred})(new URL(page.url())) && !(await page.locator('input[type="password"]').first().isVisible().catch(() => false))) return;`);
|
|
87882
|
-
} else if (loginRoute) {
|
|
87883
|
-
lines.push(` if (await ${authProofLocator(recipe.authProof)}.isVisible().catch(() => false) && new URL(page.url()).pathname !== new URL(${JSON.stringify(loginRoute)}, page.url()).pathname) return;`);
|
|
87884
87883
|
} else {
|
|
87885
|
-
|
|
87884
|
+
const proofSettle = `await ${authProofLocator(recipe.authProof)}.waitFor({ state: 'visible', timeout: ${WARM_PROOF_SETTLE_MS} }).then(() => true).catch(() => false)`;
|
|
87885
|
+
if (loginRoute) {
|
|
87886
|
+
lines.push(` if (new URL(page.url()).pathname !== new URL(${JSON.stringify(loginRoute)}, page.url()).pathname && ${proofSettle}) return;`);
|
|
87887
|
+
} else {
|
|
87888
|
+
lines.push(` if (${proofSettle}) return;`);
|
|
87889
|
+
}
|
|
87886
87890
|
}
|
|
87887
87891
|
lines.push(` }`);
|
|
87892
|
+
lines.push(` if (${SHARED_AUTH_RUNTIME_ENABLED}) {`);
|
|
87893
|
+
lines.push(` await page.context().clearCookies().catch(() => {});`);
|
|
87894
|
+
lines.push(` await page.goto(${JSON.stringify(recipe.preNavRoute)}, { waitUntil: 'domcontentloaded' }).catch(() => {});`);
|
|
87895
|
+
lines.push(` await page.evaluate(() => { try { localStorage.clear(); sessionStorage.clear(); } catch {} }).catch(() => {});`);
|
|
87896
|
+
lines.push(` }`);
|
|
87888
87897
|
}
|
|
87889
87898
|
lines.push(` await page.goto(${JSON.stringify(recipe.preNavRoute)}, { waitUntil: 'domcontentloaded' });`);
|
|
87890
87899
|
for (const cmd of recipe.preNavCmds)
|
|
@@ -95837,6 +95846,32 @@ var require_agentic_discovery_prompts = __commonJS({
|
|
|
95837
95846
|
lines.push("For a pure navigation or page-load scenario (no in-page mutation), URL + one");
|
|
95838
95847
|
lines.push("structural heading is sufficient.");
|
|
95839
95848
|
lines.push("");
|
|
95849
|
+
lines.push("**Stop at the gate for expensive or irreversible actions.** Some controls");
|
|
95850
|
+
lines.push("start work that costs the account real money (an AI generation, a paid");
|
|
95851
|
+
lines.push("third-party call, a checkout), takes minutes to finish, or cannot be undone");
|
|
95852
|
+
lines.push("(delete, publish, cancel a subscription). Do NOT press them. The regression");
|
|
95853
|
+
lines.push("risk lives in the wiring, and the wiring is fully provable for free:");
|
|
95854
|
+
lines.push("- Assert the control is present and correctly ENABLED/DISABLED by its inputs.");
|
|
95855
|
+
lines.push("- If it opens a dialog, assert the dialog, its fields and its confirm button,");
|
|
95856
|
+
lines.push(" then press Cancel and assert nothing changed.");
|
|
95857
|
+
lines.push("- Assert the auth / quota wall fires for a caller who should be refused.");
|
|
95858
|
+
lines.push("A test that waits minutes for generated output cannot finish inside the run");
|
|
95859
|
+
lines.push("budget, bills the account on every run, and leaves permanent rows behind. If");
|
|
95860
|
+
lines.push("the ONLY way to prove a scenario is to trigger such an action, drop it as a");
|
|
95861
|
+
lines.push("gap rather than emitting a test that does.");
|
|
95862
|
+
lines.push("");
|
|
95863
|
+
lines.push("**Never sign up a new account.** Use the injected credentials. Registering a");
|
|
95864
|
+
lines.push("`testuser-<timestamp>` account to get past a login wall leaves a permanent,");
|
|
95865
|
+
lines.push("unowned user in the target database on every single run. Registration is in");
|
|
95866
|
+
lines.push("scope ONLY when the scenario under test IS registration, in which case use");
|
|
95867
|
+
lines.push("the provided inbox helper so the account is tracked and reaped.");
|
|
95868
|
+
lines.push("");
|
|
95869
|
+
lines.push("**Write the assertion so the BUG fails it.** When a scenario documents broken");
|
|
95870
|
+
lines.push("behaviour, still assert the CORRECT outcome. A test that passes because the");
|
|
95871
|
+
lines.push("error message / console error / not-found page is present inverts the suite:");
|
|
95872
|
+
lines.push("fixing the bug turns the test red and the fix is reported as a regression.");
|
|
95873
|
+
lines.push("State the intended behaviour, let it fail, and flag it as a bug.");
|
|
95874
|
+
lines.push("");
|
|
95840
95875
|
lines.push("## Tools");
|
|
95841
95876
|
lines.push("");
|
|
95842
95877
|
lines.push("Browser MCP: `browser_navigate`, `browser_snapshot`, `browser_click`,");
|
|
@@ -96646,7 +96681,7 @@ var require_discover_generator = __commonJS({
|
|
|
96646
96681
|
"../runner-core/dist/services/discover-generator.js"(exports2) {
|
|
96647
96682
|
"use strict";
|
|
96648
96683
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
96649
|
-
exports2.MIN_BUG_DESCRIPTION_LENGTH = exports2.VALID_PLAYWRIGHT_GETBY_METHODS = exports2.BLOCKED_MCP_TOOLS_SCENARIO_GEN = void 0;
|
|
96684
|
+
exports2.MIN_BUG_DESCRIPTION_LENGTH = exports2.NAME_PROHIBITED_ROLES = exports2.VALID_PLAYWRIGHT_GETBY_METHODS = exports2.BLOCKED_MCP_TOOLS_SCENARIO_GEN = void 0;
|
|
96650
96685
|
exports2.scenarioLooksLikeRegistration = scenarioLooksLikeRegistration;
|
|
96651
96686
|
exports2.signupFeatureTestingAllowed = signupFeatureTestingAllowed;
|
|
96652
96687
|
exports2.scenarioTouchesSignupAuthSurface = scenarioTouchesSignupAuthSurface;
|
|
@@ -96676,6 +96711,7 @@ var require_discover_generator = __commonJS({
|
|
|
96676
96711
|
exports2.scanFragileStructuralLocators = scanFragileStructuralLocators;
|
|
96677
96712
|
exports2.bannedRoleTokensInSelector = bannedRoleTokensInSelector;
|
|
96678
96713
|
exports2.scanInvalidRoleTagLocators = scanInvalidRoleTagLocators;
|
|
96714
|
+
exports2.scanNameProhibitedRoleLocators = scanNameProhibitedRoleLocators;
|
|
96679
96715
|
exports2.scanHealedRoleTagLocators = scanHealedRoleTagLocators;
|
|
96680
96716
|
exports2.validateFinalActionFidelity = validateFinalActionFidelity;
|
|
96681
96717
|
exports2.resolveSuspectedBugVerdict = resolveSuspectedBugVerdict;
|
|
@@ -99743,10 +99779,55 @@ ${testOpen}`;
|
|
|
99743
99779
|
}
|
|
99744
99780
|
return findings;
|
|
99745
99781
|
}
|
|
99782
|
+
exports2.NAME_PROHIBITED_ROLES = /* @__PURE__ */ new Set([
|
|
99783
|
+
"caption",
|
|
99784
|
+
"code",
|
|
99785
|
+
"deletion",
|
|
99786
|
+
"emphasis",
|
|
99787
|
+
"generic",
|
|
99788
|
+
"insertion",
|
|
99789
|
+
"mark",
|
|
99790
|
+
"none",
|
|
99791
|
+
"paragraph",
|
|
99792
|
+
"presentation",
|
|
99793
|
+
"strong",
|
|
99794
|
+
"subscript",
|
|
99795
|
+
"superscript",
|
|
99796
|
+
"term",
|
|
99797
|
+
"time"
|
|
99798
|
+
]);
|
|
99799
|
+
function scanNameProhibitedRoleLocators(code) {
|
|
99800
|
+
const findings = [];
|
|
99801
|
+
const seen = /* @__PURE__ */ new Set();
|
|
99802
|
+
const scanCode = code.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " "));
|
|
99803
|
+
const RE = /getByRole\(\s*(['"`])([a-zA-Z]+)\1\s*,\s*\{[^}]*\bname\s*:/g;
|
|
99804
|
+
for (const rawLine of scanCode.split("\n")) {
|
|
99805
|
+
const line = rawLine.replace(/\/\/.*$/, "");
|
|
99806
|
+
if (line.indexOf("getByRole(") === -1)
|
|
99807
|
+
continue;
|
|
99808
|
+
RE.lastIndex = 0;
|
|
99809
|
+
let m;
|
|
99810
|
+
while ((m = RE.exec(line)) !== null) {
|
|
99811
|
+
const role = m[2].toLowerCase();
|
|
99812
|
+
if (!exports2.NAME_PROHIBITED_ROLES.has(role))
|
|
99813
|
+
continue;
|
|
99814
|
+
const key = `${rawLine.trim()} ${role}`;
|
|
99815
|
+
if (seen.has(key))
|
|
99816
|
+
continue;
|
|
99817
|
+
seen.add(key);
|
|
99818
|
+
findings.push({
|
|
99819
|
+
line: rawLine.trim().slice(0, 200),
|
|
99820
|
+
role,
|
|
99821
|
+
reason: `ARIA prohibits an accessible name on role "${role}", so no element ever exposes one \u2014 getByRole('${role}', { name: \u2026 }) matches ZERO nodes and the assertion hangs to its timeout. Match the text instead: page.getByText('\u2026', { exact: true }), optionally scoped (e.g. page.getByRole('main').getByText('\u2026')). If you need the element itself, select a nameable ancestor (region/listitem/link/button) and assert its text.`
|
|
99822
|
+
});
|
|
99823
|
+
}
|
|
99824
|
+
}
|
|
99825
|
+
return findings;
|
|
99826
|
+
}
|
|
99746
99827
|
function scanHealedRoleTagLocators(code, opts) {
|
|
99747
99828
|
const inboxStripped = (0, inbox_stamp_js_1.stripInboxRegions)(code);
|
|
99748
99829
|
const scanned = opts?.stripAuth === false ? inboxStripped : (0, auth_recipe_js_1.stripAuthRegions)(inboxStripped);
|
|
99749
|
-
return scanInvalidRoleTagLocators(scanned);
|
|
99830
|
+
return [...scanInvalidRoleTagLocators(scanned), ...scanNameProhibitedRoleLocators(scanned)];
|
|
99750
99831
|
}
|
|
99751
99832
|
function validateFinalActionFidelity(playwrightCode, actionLedger, credentials, opts) {
|
|
99752
99833
|
const ledgerSigs = [];
|
|
@@ -100467,7 +100548,7 @@ Do NOT add steps you did not execute. Do NOT skip steps from the recording.${led
|
|
|
100467
100548
|
continue;
|
|
100468
100549
|
}
|
|
100469
100550
|
const roleTagMode = (0, discovery_lint_flags_js_1.roleTagLocatorLintMode)();
|
|
100470
|
-
const roleTagFindings = roleTagMode !== "off" ?
|
|
100551
|
+
const roleTagFindings = roleTagMode !== "off" ? scanHealedRoleTagLocators(validated[0].playwrightCode) : [];
|
|
100471
100552
|
if (roleTagMode === "warn" && roleTagFindings.length > 0) {
|
|
100472
100553
|
logs2.push(` Role-tag locator gate [warn]: ${roleTagFindings.length} role-as-CSS-tag locator(s) \u2014 ${roleTagFindings.map((f) => sanitizeLedgerText(f.line)).join(" | ").slice(0, 300)}`);
|
|
100473
100554
|
}
|
|
@@ -100480,12 +100561,10 @@ Do NOT add steps you did not execute. Do NOT skip steps from the recording.${led
|
|
|
100480
100561
|
valid: false,
|
|
100481
100562
|
revisionRequired: true,
|
|
100482
100563
|
reason: "invalid_role_tag_locator",
|
|
100483
|
-
instruction: targeted ? `
|
|
100484
|
-
|
|
100485
|
-
|
|
100486
|
-
|
|
100487
|
-
3. For a verification-code field, prefer the injected helper: await __vqaEnterVerificationCode(page, code).
|
|
100488
|
-
Keep every other line exactly as-is. Submit the COMPLETE corrected test and call finish_generate again.` : `Your resubmission STILL contains a locator that uses an ARIA role as a CSS tag selector (page.locator('<role>[\u2026]')). This can only ever match nothing. Replace EVERY such locator with page.getByRole('<role>', { name: '\u2026' }) / getByLabel / input[type="\u2026"], or use await __vqaEnterVerificationCode(page, code) for the code field, and resubmit the COMPLETE test.`,
|
|
100564
|
+
instruction: targeted ? `Every locator listed below matches ZERO nodes, so the step hangs until the test times out. Read the \`reason\` on each one \u2014 there are two distinct mistakes:
|
|
100565
|
+
(a) An ARIA ROLE used as a CSS tag selector, e.g. page.locator('textbox[name^="code"]'). There is no <textbox>/<checkbox>/<heading> element. Rewrite as page.getByRole('<role>', { name: '<accessible name>' }), or page.getByLabel('<label>'), or a type-scoped CSS like page.locator('input[type="email"]'). For a verification-code field prefer the injected helper: await __vqaEnterVerificationCode(page, code).
|
|
100566
|
+
(b) A { name: \u2026 } filter on a role whose accessible name ARIA PROHIBITS (paragraph, generic, code, emphasis, strong, term, time, mark, caption, presentation/none, insertion, deletion, sub/superscript). No element with those roles ever exposes a name. Match the text instead: page.getByText('\u2026', { exact: true }), scoped if needed (page.getByRole('main').getByText('\u2026')), or target a nameable ancestor such as region/listitem/link/button.
|
|
100567
|
+
Fix EVERY flagged locator, keep every other line exactly as-is, then submit the COMPLETE corrected test and call finish_generate again.` : `Your resubmission STILL contains a locator that can only ever match nothing \u2014 either an ARIA role used as a CSS tag selector (page.locator('<role>[\u2026]')) or a { name: \u2026 } filter on a name-prohibited role (paragraph/generic/code/emphasis/strong/term/time/\u2026). Replace EVERY one: use getByRole('<role>', { name: '\u2026' }) / getByLabel / input[type="\u2026"] for the first, and getByText('\u2026', { exact: true }) for the second. Resubmit the COMPLETE test.`,
|
|
100489
100568
|
offendingLocators: roleTagFindings.map((f) => ({
|
|
100490
100569
|
line: sanitizeLedgerText(f.line),
|
|
100491
100570
|
reason: f.reason
|
|
@@ -101531,6 +101610,2285 @@ var require_rate_limit_detector = __commonJS({
|
|
|
101531
101610
|
}
|
|
101532
101611
|
});
|
|
101533
101612
|
|
|
101613
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/base64.js
|
|
101614
|
+
var require_base64 = __commonJS({
|
|
101615
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/base64.js"(exports2) {
|
|
101616
|
+
"use strict";
|
|
101617
|
+
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
101618
|
+
exports2.encode = function(number) {
|
|
101619
|
+
if (0 <= number && number < intToCharMap.length) {
|
|
101620
|
+
return intToCharMap[number];
|
|
101621
|
+
}
|
|
101622
|
+
throw new TypeError("Must be between 0 and 63: " + number);
|
|
101623
|
+
};
|
|
101624
|
+
exports2.decode = function(charCode) {
|
|
101625
|
+
var bigA = 65;
|
|
101626
|
+
var bigZ = 90;
|
|
101627
|
+
var littleA = 97;
|
|
101628
|
+
var littleZ = 122;
|
|
101629
|
+
var zero = 48;
|
|
101630
|
+
var nine = 57;
|
|
101631
|
+
var plus = 43;
|
|
101632
|
+
var slash = 47;
|
|
101633
|
+
var littleOffset = 26;
|
|
101634
|
+
var numberOffset = 52;
|
|
101635
|
+
if (bigA <= charCode && charCode <= bigZ) {
|
|
101636
|
+
return charCode - bigA;
|
|
101637
|
+
}
|
|
101638
|
+
if (littleA <= charCode && charCode <= littleZ) {
|
|
101639
|
+
return charCode - littleA + littleOffset;
|
|
101640
|
+
}
|
|
101641
|
+
if (zero <= charCode && charCode <= nine) {
|
|
101642
|
+
return charCode - zero + numberOffset;
|
|
101643
|
+
}
|
|
101644
|
+
if (charCode == plus) {
|
|
101645
|
+
return 62;
|
|
101646
|
+
}
|
|
101647
|
+
if (charCode == slash) {
|
|
101648
|
+
return 63;
|
|
101649
|
+
}
|
|
101650
|
+
return -1;
|
|
101651
|
+
};
|
|
101652
|
+
}
|
|
101653
|
+
});
|
|
101654
|
+
|
|
101655
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js
|
|
101656
|
+
var require_base64_vlq = __commonJS({
|
|
101657
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js"(exports2) {
|
|
101658
|
+
"use strict";
|
|
101659
|
+
var base64 = require_base64();
|
|
101660
|
+
var VLQ_BASE_SHIFT = 5;
|
|
101661
|
+
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
101662
|
+
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
101663
|
+
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
101664
|
+
function toVLQSigned(aValue) {
|
|
101665
|
+
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
101666
|
+
}
|
|
101667
|
+
function fromVLQSigned(aValue) {
|
|
101668
|
+
var isNegative = (aValue & 1) === 1;
|
|
101669
|
+
var shifted = aValue >> 1;
|
|
101670
|
+
return isNegative ? -shifted : shifted;
|
|
101671
|
+
}
|
|
101672
|
+
exports2.encode = function base64VLQ_encode(aValue) {
|
|
101673
|
+
var encoded = "";
|
|
101674
|
+
var digit;
|
|
101675
|
+
var vlq = toVLQSigned(aValue);
|
|
101676
|
+
do {
|
|
101677
|
+
digit = vlq & VLQ_BASE_MASK;
|
|
101678
|
+
vlq >>>= VLQ_BASE_SHIFT;
|
|
101679
|
+
if (vlq > 0) {
|
|
101680
|
+
digit |= VLQ_CONTINUATION_BIT;
|
|
101681
|
+
}
|
|
101682
|
+
encoded += base64.encode(digit);
|
|
101683
|
+
} while (vlq > 0);
|
|
101684
|
+
return encoded;
|
|
101685
|
+
};
|
|
101686
|
+
exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
101687
|
+
var strLen = aStr.length;
|
|
101688
|
+
var result = 0;
|
|
101689
|
+
var shift = 0;
|
|
101690
|
+
var continuation, digit;
|
|
101691
|
+
do {
|
|
101692
|
+
if (aIndex >= strLen) {
|
|
101693
|
+
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
101694
|
+
}
|
|
101695
|
+
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
101696
|
+
if (digit === -1) {
|
|
101697
|
+
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
101698
|
+
}
|
|
101699
|
+
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
101700
|
+
digit &= VLQ_BASE_MASK;
|
|
101701
|
+
result = result + (digit << shift);
|
|
101702
|
+
shift += VLQ_BASE_SHIFT;
|
|
101703
|
+
} while (continuation);
|
|
101704
|
+
aOutParam.value = fromVLQSigned(result);
|
|
101705
|
+
aOutParam.rest = aIndex;
|
|
101706
|
+
};
|
|
101707
|
+
}
|
|
101708
|
+
});
|
|
101709
|
+
|
|
101710
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/util.js
|
|
101711
|
+
var require_util4 = __commonJS({
|
|
101712
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/util.js"(exports2) {
|
|
101713
|
+
"use strict";
|
|
101714
|
+
function getArg(aArgs, aName, aDefaultValue) {
|
|
101715
|
+
if (aName in aArgs) {
|
|
101716
|
+
return aArgs[aName];
|
|
101717
|
+
} else if (arguments.length === 3) {
|
|
101718
|
+
return aDefaultValue;
|
|
101719
|
+
} else {
|
|
101720
|
+
throw new Error('"' + aName + '" is a required argument.');
|
|
101721
|
+
}
|
|
101722
|
+
}
|
|
101723
|
+
exports2.getArg = getArg;
|
|
101724
|
+
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
101725
|
+
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
101726
|
+
function urlParse(aUrl) {
|
|
101727
|
+
var match = aUrl.match(urlRegexp);
|
|
101728
|
+
if (!match) {
|
|
101729
|
+
return null;
|
|
101730
|
+
}
|
|
101731
|
+
return {
|
|
101732
|
+
scheme: match[1],
|
|
101733
|
+
auth: match[2],
|
|
101734
|
+
host: match[3],
|
|
101735
|
+
port: match[4],
|
|
101736
|
+
path: match[5]
|
|
101737
|
+
};
|
|
101738
|
+
}
|
|
101739
|
+
exports2.urlParse = urlParse;
|
|
101740
|
+
function urlGenerate(aParsedUrl) {
|
|
101741
|
+
var url = "";
|
|
101742
|
+
if (aParsedUrl.scheme) {
|
|
101743
|
+
url += aParsedUrl.scheme + ":";
|
|
101744
|
+
}
|
|
101745
|
+
url += "//";
|
|
101746
|
+
if (aParsedUrl.auth) {
|
|
101747
|
+
url += aParsedUrl.auth + "@";
|
|
101748
|
+
}
|
|
101749
|
+
if (aParsedUrl.host) {
|
|
101750
|
+
url += aParsedUrl.host;
|
|
101751
|
+
}
|
|
101752
|
+
if (aParsedUrl.port) {
|
|
101753
|
+
url += ":" + aParsedUrl.port;
|
|
101754
|
+
}
|
|
101755
|
+
if (aParsedUrl.path) {
|
|
101756
|
+
url += aParsedUrl.path;
|
|
101757
|
+
}
|
|
101758
|
+
return url;
|
|
101759
|
+
}
|
|
101760
|
+
exports2.urlGenerate = urlGenerate;
|
|
101761
|
+
function normalize(aPath) {
|
|
101762
|
+
var path = aPath;
|
|
101763
|
+
var url = urlParse(aPath);
|
|
101764
|
+
if (url) {
|
|
101765
|
+
if (!url.path) {
|
|
101766
|
+
return aPath;
|
|
101767
|
+
}
|
|
101768
|
+
path = url.path;
|
|
101769
|
+
}
|
|
101770
|
+
var isAbsolute2 = exports2.isAbsolute(path);
|
|
101771
|
+
var parts = path.split(/\/+/);
|
|
101772
|
+
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
101773
|
+
part = parts[i];
|
|
101774
|
+
if (part === ".") {
|
|
101775
|
+
parts.splice(i, 1);
|
|
101776
|
+
} else if (part === "..") {
|
|
101777
|
+
up++;
|
|
101778
|
+
} else if (up > 0) {
|
|
101779
|
+
if (part === "") {
|
|
101780
|
+
parts.splice(i + 1, up);
|
|
101781
|
+
up = 0;
|
|
101782
|
+
} else {
|
|
101783
|
+
parts.splice(i, 2);
|
|
101784
|
+
up--;
|
|
101785
|
+
}
|
|
101786
|
+
}
|
|
101787
|
+
}
|
|
101788
|
+
path = parts.join("/");
|
|
101789
|
+
if (path === "") {
|
|
101790
|
+
path = isAbsolute2 ? "/" : ".";
|
|
101791
|
+
}
|
|
101792
|
+
if (url) {
|
|
101793
|
+
url.path = path;
|
|
101794
|
+
return urlGenerate(url);
|
|
101795
|
+
}
|
|
101796
|
+
return path;
|
|
101797
|
+
}
|
|
101798
|
+
exports2.normalize = normalize;
|
|
101799
|
+
function join8(aRoot, aPath) {
|
|
101800
|
+
if (aRoot === "") {
|
|
101801
|
+
aRoot = ".";
|
|
101802
|
+
}
|
|
101803
|
+
if (aPath === "") {
|
|
101804
|
+
aPath = ".";
|
|
101805
|
+
}
|
|
101806
|
+
var aPathUrl = urlParse(aPath);
|
|
101807
|
+
var aRootUrl = urlParse(aRoot);
|
|
101808
|
+
if (aRootUrl) {
|
|
101809
|
+
aRoot = aRootUrl.path || "/";
|
|
101810
|
+
}
|
|
101811
|
+
if (aPathUrl && !aPathUrl.scheme) {
|
|
101812
|
+
if (aRootUrl) {
|
|
101813
|
+
aPathUrl.scheme = aRootUrl.scheme;
|
|
101814
|
+
}
|
|
101815
|
+
return urlGenerate(aPathUrl);
|
|
101816
|
+
}
|
|
101817
|
+
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
|
101818
|
+
return aPath;
|
|
101819
|
+
}
|
|
101820
|
+
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
101821
|
+
aRootUrl.host = aPath;
|
|
101822
|
+
return urlGenerate(aRootUrl);
|
|
101823
|
+
}
|
|
101824
|
+
var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
101825
|
+
if (aRootUrl) {
|
|
101826
|
+
aRootUrl.path = joined;
|
|
101827
|
+
return urlGenerate(aRootUrl);
|
|
101828
|
+
}
|
|
101829
|
+
return joined;
|
|
101830
|
+
}
|
|
101831
|
+
exports2.join = join8;
|
|
101832
|
+
exports2.isAbsolute = function(aPath) {
|
|
101833
|
+
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
101834
|
+
};
|
|
101835
|
+
function relative(aRoot, aPath) {
|
|
101836
|
+
if (aRoot === "") {
|
|
101837
|
+
aRoot = ".";
|
|
101838
|
+
}
|
|
101839
|
+
aRoot = aRoot.replace(/\/$/, "");
|
|
101840
|
+
var level = 0;
|
|
101841
|
+
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
101842
|
+
var index = aRoot.lastIndexOf("/");
|
|
101843
|
+
if (index < 0) {
|
|
101844
|
+
return aPath;
|
|
101845
|
+
}
|
|
101846
|
+
aRoot = aRoot.slice(0, index);
|
|
101847
|
+
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
101848
|
+
return aPath;
|
|
101849
|
+
}
|
|
101850
|
+
++level;
|
|
101851
|
+
}
|
|
101852
|
+
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
101853
|
+
}
|
|
101854
|
+
exports2.relative = relative;
|
|
101855
|
+
var supportsNullProto = (function() {
|
|
101856
|
+
var obj = /* @__PURE__ */ Object.create(null);
|
|
101857
|
+
return !("__proto__" in obj);
|
|
101858
|
+
})();
|
|
101859
|
+
function identity(s) {
|
|
101860
|
+
return s;
|
|
101861
|
+
}
|
|
101862
|
+
function toSetString(aStr) {
|
|
101863
|
+
if (isProtoString(aStr)) {
|
|
101864
|
+
return "$" + aStr;
|
|
101865
|
+
}
|
|
101866
|
+
return aStr;
|
|
101867
|
+
}
|
|
101868
|
+
exports2.toSetString = supportsNullProto ? identity : toSetString;
|
|
101869
|
+
function fromSetString(aStr) {
|
|
101870
|
+
if (isProtoString(aStr)) {
|
|
101871
|
+
return aStr.slice(1);
|
|
101872
|
+
}
|
|
101873
|
+
return aStr;
|
|
101874
|
+
}
|
|
101875
|
+
exports2.fromSetString = supportsNullProto ? identity : fromSetString;
|
|
101876
|
+
function isProtoString(s) {
|
|
101877
|
+
if (!s) {
|
|
101878
|
+
return false;
|
|
101879
|
+
}
|
|
101880
|
+
var length = s.length;
|
|
101881
|
+
if (length < 9) {
|
|
101882
|
+
return false;
|
|
101883
|
+
}
|
|
101884
|
+
if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
|
|
101885
|
+
return false;
|
|
101886
|
+
}
|
|
101887
|
+
for (var i = length - 10; i >= 0; i--) {
|
|
101888
|
+
if (s.charCodeAt(i) !== 36) {
|
|
101889
|
+
return false;
|
|
101890
|
+
}
|
|
101891
|
+
}
|
|
101892
|
+
return true;
|
|
101893
|
+
}
|
|
101894
|
+
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
101895
|
+
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
101896
|
+
if (cmp !== 0) {
|
|
101897
|
+
return cmp;
|
|
101898
|
+
}
|
|
101899
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
101900
|
+
if (cmp !== 0) {
|
|
101901
|
+
return cmp;
|
|
101902
|
+
}
|
|
101903
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
101904
|
+
if (cmp !== 0 || onlyCompareOriginal) {
|
|
101905
|
+
return cmp;
|
|
101906
|
+
}
|
|
101907
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
101908
|
+
if (cmp !== 0) {
|
|
101909
|
+
return cmp;
|
|
101910
|
+
}
|
|
101911
|
+
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
101912
|
+
if (cmp !== 0) {
|
|
101913
|
+
return cmp;
|
|
101914
|
+
}
|
|
101915
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
101916
|
+
}
|
|
101917
|
+
exports2.compareByOriginalPositions = compareByOriginalPositions;
|
|
101918
|
+
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
101919
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
101920
|
+
if (cmp !== 0) {
|
|
101921
|
+
return cmp;
|
|
101922
|
+
}
|
|
101923
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
101924
|
+
if (cmp !== 0 || onlyCompareGenerated) {
|
|
101925
|
+
return cmp;
|
|
101926
|
+
}
|
|
101927
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
101928
|
+
if (cmp !== 0) {
|
|
101929
|
+
return cmp;
|
|
101930
|
+
}
|
|
101931
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
101932
|
+
if (cmp !== 0) {
|
|
101933
|
+
return cmp;
|
|
101934
|
+
}
|
|
101935
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
101936
|
+
if (cmp !== 0) {
|
|
101937
|
+
return cmp;
|
|
101938
|
+
}
|
|
101939
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
101940
|
+
}
|
|
101941
|
+
exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
101942
|
+
function strcmp(aStr1, aStr2) {
|
|
101943
|
+
if (aStr1 === aStr2) {
|
|
101944
|
+
return 0;
|
|
101945
|
+
}
|
|
101946
|
+
if (aStr1 === null) {
|
|
101947
|
+
return 1;
|
|
101948
|
+
}
|
|
101949
|
+
if (aStr2 === null) {
|
|
101950
|
+
return -1;
|
|
101951
|
+
}
|
|
101952
|
+
if (aStr1 > aStr2) {
|
|
101953
|
+
return 1;
|
|
101954
|
+
}
|
|
101955
|
+
return -1;
|
|
101956
|
+
}
|
|
101957
|
+
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
101958
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
101959
|
+
if (cmp !== 0) {
|
|
101960
|
+
return cmp;
|
|
101961
|
+
}
|
|
101962
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
101963
|
+
if (cmp !== 0) {
|
|
101964
|
+
return cmp;
|
|
101965
|
+
}
|
|
101966
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
101967
|
+
if (cmp !== 0) {
|
|
101968
|
+
return cmp;
|
|
101969
|
+
}
|
|
101970
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
101971
|
+
if (cmp !== 0) {
|
|
101972
|
+
return cmp;
|
|
101973
|
+
}
|
|
101974
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
101975
|
+
if (cmp !== 0) {
|
|
101976
|
+
return cmp;
|
|
101977
|
+
}
|
|
101978
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
101979
|
+
}
|
|
101980
|
+
exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
101981
|
+
function parseSourceMapInput(str) {
|
|
101982
|
+
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
|
101983
|
+
}
|
|
101984
|
+
exports2.parseSourceMapInput = parseSourceMapInput;
|
|
101985
|
+
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
101986
|
+
sourceURL = sourceURL || "";
|
|
101987
|
+
if (sourceRoot) {
|
|
101988
|
+
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
|
101989
|
+
sourceRoot += "/";
|
|
101990
|
+
}
|
|
101991
|
+
sourceURL = sourceRoot + sourceURL;
|
|
101992
|
+
}
|
|
101993
|
+
if (sourceMapURL) {
|
|
101994
|
+
var parsed = urlParse(sourceMapURL);
|
|
101995
|
+
if (!parsed) {
|
|
101996
|
+
throw new Error("sourceMapURL could not be parsed");
|
|
101997
|
+
}
|
|
101998
|
+
if (parsed.path) {
|
|
101999
|
+
var index = parsed.path.lastIndexOf("/");
|
|
102000
|
+
if (index >= 0) {
|
|
102001
|
+
parsed.path = parsed.path.substring(0, index + 1);
|
|
102002
|
+
}
|
|
102003
|
+
}
|
|
102004
|
+
sourceURL = join8(urlGenerate(parsed), sourceURL);
|
|
102005
|
+
}
|
|
102006
|
+
return normalize(sourceURL);
|
|
102007
|
+
}
|
|
102008
|
+
exports2.computeSourceURL = computeSourceURL;
|
|
102009
|
+
}
|
|
102010
|
+
});
|
|
102011
|
+
|
|
102012
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/array-set.js
|
|
102013
|
+
var require_array_set = __commonJS({
|
|
102014
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/array-set.js"(exports2) {
|
|
102015
|
+
"use strict";
|
|
102016
|
+
var util = require_util4();
|
|
102017
|
+
var has = Object.prototype.hasOwnProperty;
|
|
102018
|
+
var hasNativeMap = typeof Map !== "undefined";
|
|
102019
|
+
function ArraySet() {
|
|
102020
|
+
this._array = [];
|
|
102021
|
+
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
102022
|
+
}
|
|
102023
|
+
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
102024
|
+
var set = new ArraySet();
|
|
102025
|
+
for (var i = 0, len = aArray.length; i < len; i++) {
|
|
102026
|
+
set.add(aArray[i], aAllowDuplicates);
|
|
102027
|
+
}
|
|
102028
|
+
return set;
|
|
102029
|
+
};
|
|
102030
|
+
ArraySet.prototype.size = function ArraySet_size() {
|
|
102031
|
+
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
102032
|
+
};
|
|
102033
|
+
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
102034
|
+
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
102035
|
+
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
102036
|
+
var idx = this._array.length;
|
|
102037
|
+
if (!isDuplicate || aAllowDuplicates) {
|
|
102038
|
+
this._array.push(aStr);
|
|
102039
|
+
}
|
|
102040
|
+
if (!isDuplicate) {
|
|
102041
|
+
if (hasNativeMap) {
|
|
102042
|
+
this._set.set(aStr, idx);
|
|
102043
|
+
} else {
|
|
102044
|
+
this._set[sStr] = idx;
|
|
102045
|
+
}
|
|
102046
|
+
}
|
|
102047
|
+
};
|
|
102048
|
+
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
102049
|
+
if (hasNativeMap) {
|
|
102050
|
+
return this._set.has(aStr);
|
|
102051
|
+
} else {
|
|
102052
|
+
var sStr = util.toSetString(aStr);
|
|
102053
|
+
return has.call(this._set, sStr);
|
|
102054
|
+
}
|
|
102055
|
+
};
|
|
102056
|
+
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
102057
|
+
if (hasNativeMap) {
|
|
102058
|
+
var idx = this._set.get(aStr);
|
|
102059
|
+
if (idx >= 0) {
|
|
102060
|
+
return idx;
|
|
102061
|
+
}
|
|
102062
|
+
} else {
|
|
102063
|
+
var sStr = util.toSetString(aStr);
|
|
102064
|
+
if (has.call(this._set, sStr)) {
|
|
102065
|
+
return this._set[sStr];
|
|
102066
|
+
}
|
|
102067
|
+
}
|
|
102068
|
+
throw new Error('"' + aStr + '" is not in the set.');
|
|
102069
|
+
};
|
|
102070
|
+
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
102071
|
+
if (aIdx >= 0 && aIdx < this._array.length) {
|
|
102072
|
+
return this._array[aIdx];
|
|
102073
|
+
}
|
|
102074
|
+
throw new Error("No element indexed by " + aIdx);
|
|
102075
|
+
};
|
|
102076
|
+
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
102077
|
+
return this._array.slice();
|
|
102078
|
+
};
|
|
102079
|
+
exports2.ArraySet = ArraySet;
|
|
102080
|
+
}
|
|
102081
|
+
});
|
|
102082
|
+
|
|
102083
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js
|
|
102084
|
+
var require_mapping_list = __commonJS({
|
|
102085
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js"(exports2) {
|
|
102086
|
+
"use strict";
|
|
102087
|
+
var util = require_util4();
|
|
102088
|
+
function generatedPositionAfter(mappingA, mappingB) {
|
|
102089
|
+
var lineA = mappingA.generatedLine;
|
|
102090
|
+
var lineB = mappingB.generatedLine;
|
|
102091
|
+
var columnA = mappingA.generatedColumn;
|
|
102092
|
+
var columnB = mappingB.generatedColumn;
|
|
102093
|
+
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
102094
|
+
}
|
|
102095
|
+
function MappingList() {
|
|
102096
|
+
this._array = [];
|
|
102097
|
+
this._sorted = true;
|
|
102098
|
+
this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
102099
|
+
}
|
|
102100
|
+
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
102101
|
+
this._array.forEach(aCallback, aThisArg);
|
|
102102
|
+
};
|
|
102103
|
+
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
102104
|
+
if (generatedPositionAfter(this._last, aMapping)) {
|
|
102105
|
+
this._last = aMapping;
|
|
102106
|
+
this._array.push(aMapping);
|
|
102107
|
+
} else {
|
|
102108
|
+
this._sorted = false;
|
|
102109
|
+
this._array.push(aMapping);
|
|
102110
|
+
}
|
|
102111
|
+
};
|
|
102112
|
+
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
102113
|
+
if (!this._sorted) {
|
|
102114
|
+
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
102115
|
+
this._sorted = true;
|
|
102116
|
+
}
|
|
102117
|
+
return this._array;
|
|
102118
|
+
};
|
|
102119
|
+
exports2.MappingList = MappingList;
|
|
102120
|
+
}
|
|
102121
|
+
});
|
|
102122
|
+
|
|
102123
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js
|
|
102124
|
+
var require_source_map_generator = __commonJS({
|
|
102125
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js"(exports2) {
|
|
102126
|
+
"use strict";
|
|
102127
|
+
var base64VLQ = require_base64_vlq();
|
|
102128
|
+
var util = require_util4();
|
|
102129
|
+
var ArraySet = require_array_set().ArraySet;
|
|
102130
|
+
var MappingList = require_mapping_list().MappingList;
|
|
102131
|
+
function SourceMapGenerator(aArgs) {
|
|
102132
|
+
if (!aArgs) {
|
|
102133
|
+
aArgs = {};
|
|
102134
|
+
}
|
|
102135
|
+
this._file = util.getArg(aArgs, "file", null);
|
|
102136
|
+
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
|
102137
|
+
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
|
102138
|
+
this._sources = new ArraySet();
|
|
102139
|
+
this._names = new ArraySet();
|
|
102140
|
+
this._mappings = new MappingList();
|
|
102141
|
+
this._sourcesContents = null;
|
|
102142
|
+
}
|
|
102143
|
+
SourceMapGenerator.prototype._version = 3;
|
|
102144
|
+
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
102145
|
+
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
102146
|
+
var generator = new SourceMapGenerator({
|
|
102147
|
+
file: aSourceMapConsumer.file,
|
|
102148
|
+
sourceRoot
|
|
102149
|
+
});
|
|
102150
|
+
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
102151
|
+
var newMapping = {
|
|
102152
|
+
generated: {
|
|
102153
|
+
line: mapping.generatedLine,
|
|
102154
|
+
column: mapping.generatedColumn
|
|
102155
|
+
}
|
|
102156
|
+
};
|
|
102157
|
+
if (mapping.source != null) {
|
|
102158
|
+
newMapping.source = mapping.source;
|
|
102159
|
+
if (sourceRoot != null) {
|
|
102160
|
+
newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
102161
|
+
}
|
|
102162
|
+
newMapping.original = {
|
|
102163
|
+
line: mapping.originalLine,
|
|
102164
|
+
column: mapping.originalColumn
|
|
102165
|
+
};
|
|
102166
|
+
if (mapping.name != null) {
|
|
102167
|
+
newMapping.name = mapping.name;
|
|
102168
|
+
}
|
|
102169
|
+
}
|
|
102170
|
+
generator.addMapping(newMapping);
|
|
102171
|
+
});
|
|
102172
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
102173
|
+
var sourceRelative = sourceFile;
|
|
102174
|
+
if (sourceRoot !== null) {
|
|
102175
|
+
sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
102176
|
+
}
|
|
102177
|
+
if (!generator._sources.has(sourceRelative)) {
|
|
102178
|
+
generator._sources.add(sourceRelative);
|
|
102179
|
+
}
|
|
102180
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
102181
|
+
if (content != null) {
|
|
102182
|
+
generator.setSourceContent(sourceFile, content);
|
|
102183
|
+
}
|
|
102184
|
+
});
|
|
102185
|
+
return generator;
|
|
102186
|
+
};
|
|
102187
|
+
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
102188
|
+
var generated = util.getArg(aArgs, "generated");
|
|
102189
|
+
var original = util.getArg(aArgs, "original", null);
|
|
102190
|
+
var source = util.getArg(aArgs, "source", null);
|
|
102191
|
+
var name = util.getArg(aArgs, "name", null);
|
|
102192
|
+
if (!this._skipValidation) {
|
|
102193
|
+
this._validateMapping(generated, original, source, name);
|
|
102194
|
+
}
|
|
102195
|
+
if (source != null) {
|
|
102196
|
+
source = String(source);
|
|
102197
|
+
if (!this._sources.has(source)) {
|
|
102198
|
+
this._sources.add(source);
|
|
102199
|
+
}
|
|
102200
|
+
}
|
|
102201
|
+
if (name != null) {
|
|
102202
|
+
name = String(name);
|
|
102203
|
+
if (!this._names.has(name)) {
|
|
102204
|
+
this._names.add(name);
|
|
102205
|
+
}
|
|
102206
|
+
}
|
|
102207
|
+
this._mappings.add({
|
|
102208
|
+
generatedLine: generated.line,
|
|
102209
|
+
generatedColumn: generated.column,
|
|
102210
|
+
originalLine: original != null && original.line,
|
|
102211
|
+
originalColumn: original != null && original.column,
|
|
102212
|
+
source,
|
|
102213
|
+
name
|
|
102214
|
+
});
|
|
102215
|
+
};
|
|
102216
|
+
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
102217
|
+
var source = aSourceFile;
|
|
102218
|
+
if (this._sourceRoot != null) {
|
|
102219
|
+
source = util.relative(this._sourceRoot, source);
|
|
102220
|
+
}
|
|
102221
|
+
if (aSourceContent != null) {
|
|
102222
|
+
if (!this._sourcesContents) {
|
|
102223
|
+
this._sourcesContents = /* @__PURE__ */ Object.create(null);
|
|
102224
|
+
}
|
|
102225
|
+
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
102226
|
+
} else if (this._sourcesContents) {
|
|
102227
|
+
delete this._sourcesContents[util.toSetString(source)];
|
|
102228
|
+
if (Object.keys(this._sourcesContents).length === 0) {
|
|
102229
|
+
this._sourcesContents = null;
|
|
102230
|
+
}
|
|
102231
|
+
}
|
|
102232
|
+
};
|
|
102233
|
+
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
102234
|
+
var sourceFile = aSourceFile;
|
|
102235
|
+
if (aSourceFile == null) {
|
|
102236
|
+
if (aSourceMapConsumer.file == null) {
|
|
102237
|
+
throw new Error(
|
|
102238
|
+
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
|
102239
|
+
);
|
|
102240
|
+
}
|
|
102241
|
+
sourceFile = aSourceMapConsumer.file;
|
|
102242
|
+
}
|
|
102243
|
+
var sourceRoot = this._sourceRoot;
|
|
102244
|
+
if (sourceRoot != null) {
|
|
102245
|
+
sourceFile = util.relative(sourceRoot, sourceFile);
|
|
102246
|
+
}
|
|
102247
|
+
var newSources = new ArraySet();
|
|
102248
|
+
var newNames = new ArraySet();
|
|
102249
|
+
this._mappings.unsortedForEach(function(mapping) {
|
|
102250
|
+
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
102251
|
+
var original = aSourceMapConsumer.originalPositionFor({
|
|
102252
|
+
line: mapping.originalLine,
|
|
102253
|
+
column: mapping.originalColumn
|
|
102254
|
+
});
|
|
102255
|
+
if (original.source != null) {
|
|
102256
|
+
mapping.source = original.source;
|
|
102257
|
+
if (aSourceMapPath != null) {
|
|
102258
|
+
mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
102259
|
+
}
|
|
102260
|
+
if (sourceRoot != null) {
|
|
102261
|
+
mapping.source = util.relative(sourceRoot, mapping.source);
|
|
102262
|
+
}
|
|
102263
|
+
mapping.originalLine = original.line;
|
|
102264
|
+
mapping.originalColumn = original.column;
|
|
102265
|
+
if (original.name != null) {
|
|
102266
|
+
mapping.name = original.name;
|
|
102267
|
+
}
|
|
102268
|
+
}
|
|
102269
|
+
}
|
|
102270
|
+
var source = mapping.source;
|
|
102271
|
+
if (source != null && !newSources.has(source)) {
|
|
102272
|
+
newSources.add(source);
|
|
102273
|
+
}
|
|
102274
|
+
var name = mapping.name;
|
|
102275
|
+
if (name != null && !newNames.has(name)) {
|
|
102276
|
+
newNames.add(name);
|
|
102277
|
+
}
|
|
102278
|
+
}, this);
|
|
102279
|
+
this._sources = newSources;
|
|
102280
|
+
this._names = newNames;
|
|
102281
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
|
102282
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
|
102283
|
+
if (content != null) {
|
|
102284
|
+
if (aSourceMapPath != null) {
|
|
102285
|
+
sourceFile2 = util.join(aSourceMapPath, sourceFile2);
|
|
102286
|
+
}
|
|
102287
|
+
if (sourceRoot != null) {
|
|
102288
|
+
sourceFile2 = util.relative(sourceRoot, sourceFile2);
|
|
102289
|
+
}
|
|
102290
|
+
this.setSourceContent(sourceFile2, content);
|
|
102291
|
+
}
|
|
102292
|
+
}, this);
|
|
102293
|
+
};
|
|
102294
|
+
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
102295
|
+
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
102296
|
+
throw new Error(
|
|
102297
|
+
"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
|
|
102298
|
+
);
|
|
102299
|
+
}
|
|
102300
|
+
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
102301
|
+
return;
|
|
102302
|
+
} else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
|
|
102303
|
+
return;
|
|
102304
|
+
} else {
|
|
102305
|
+
throw new Error("Invalid mapping: " + JSON.stringify({
|
|
102306
|
+
generated: aGenerated,
|
|
102307
|
+
source: aSource,
|
|
102308
|
+
original: aOriginal,
|
|
102309
|
+
name: aName
|
|
102310
|
+
}));
|
|
102311
|
+
}
|
|
102312
|
+
};
|
|
102313
|
+
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
102314
|
+
var previousGeneratedColumn = 0;
|
|
102315
|
+
var previousGeneratedLine = 1;
|
|
102316
|
+
var previousOriginalColumn = 0;
|
|
102317
|
+
var previousOriginalLine = 0;
|
|
102318
|
+
var previousName = 0;
|
|
102319
|
+
var previousSource = 0;
|
|
102320
|
+
var result = "";
|
|
102321
|
+
var next;
|
|
102322
|
+
var mapping;
|
|
102323
|
+
var nameIdx;
|
|
102324
|
+
var sourceIdx;
|
|
102325
|
+
var mappings = this._mappings.toArray();
|
|
102326
|
+
for (var i = 0, len = mappings.length; i < len; i++) {
|
|
102327
|
+
mapping = mappings[i];
|
|
102328
|
+
next = "";
|
|
102329
|
+
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
102330
|
+
previousGeneratedColumn = 0;
|
|
102331
|
+
while (mapping.generatedLine !== previousGeneratedLine) {
|
|
102332
|
+
next += ";";
|
|
102333
|
+
previousGeneratedLine++;
|
|
102334
|
+
}
|
|
102335
|
+
} else {
|
|
102336
|
+
if (i > 0) {
|
|
102337
|
+
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
|
102338
|
+
continue;
|
|
102339
|
+
}
|
|
102340
|
+
next += ",";
|
|
102341
|
+
}
|
|
102342
|
+
}
|
|
102343
|
+
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
102344
|
+
previousGeneratedColumn = mapping.generatedColumn;
|
|
102345
|
+
if (mapping.source != null) {
|
|
102346
|
+
sourceIdx = this._sources.indexOf(mapping.source);
|
|
102347
|
+
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
102348
|
+
previousSource = sourceIdx;
|
|
102349
|
+
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
102350
|
+
previousOriginalLine = mapping.originalLine - 1;
|
|
102351
|
+
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
102352
|
+
previousOriginalColumn = mapping.originalColumn;
|
|
102353
|
+
if (mapping.name != null) {
|
|
102354
|
+
nameIdx = this._names.indexOf(mapping.name);
|
|
102355
|
+
next += base64VLQ.encode(nameIdx - previousName);
|
|
102356
|
+
previousName = nameIdx;
|
|
102357
|
+
}
|
|
102358
|
+
}
|
|
102359
|
+
result += next;
|
|
102360
|
+
}
|
|
102361
|
+
return result;
|
|
102362
|
+
};
|
|
102363
|
+
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
102364
|
+
return aSources.map(function(source) {
|
|
102365
|
+
if (!this._sourcesContents) {
|
|
102366
|
+
return null;
|
|
102367
|
+
}
|
|
102368
|
+
if (aSourceRoot != null) {
|
|
102369
|
+
source = util.relative(aSourceRoot, source);
|
|
102370
|
+
}
|
|
102371
|
+
var key = util.toSetString(source);
|
|
102372
|
+
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
102373
|
+
}, this);
|
|
102374
|
+
};
|
|
102375
|
+
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
102376
|
+
var map2 = {
|
|
102377
|
+
version: this._version,
|
|
102378
|
+
sources: this._sources.toArray(),
|
|
102379
|
+
names: this._names.toArray(),
|
|
102380
|
+
mappings: this._serializeMappings()
|
|
102381
|
+
};
|
|
102382
|
+
if (this._file != null) {
|
|
102383
|
+
map2.file = this._file;
|
|
102384
|
+
}
|
|
102385
|
+
if (this._sourceRoot != null) {
|
|
102386
|
+
map2.sourceRoot = this._sourceRoot;
|
|
102387
|
+
}
|
|
102388
|
+
if (this._sourcesContents) {
|
|
102389
|
+
map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
|
|
102390
|
+
}
|
|
102391
|
+
return map2;
|
|
102392
|
+
};
|
|
102393
|
+
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
102394
|
+
return JSON.stringify(this.toJSON());
|
|
102395
|
+
};
|
|
102396
|
+
exports2.SourceMapGenerator = SourceMapGenerator;
|
|
102397
|
+
}
|
|
102398
|
+
});
|
|
102399
|
+
|
|
102400
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/binary-search.js
|
|
102401
|
+
var require_binary_search = __commonJS({
|
|
102402
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/binary-search.js"(exports2) {
|
|
102403
|
+
"use strict";
|
|
102404
|
+
exports2.GREATEST_LOWER_BOUND = 1;
|
|
102405
|
+
exports2.LEAST_UPPER_BOUND = 2;
|
|
102406
|
+
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
102407
|
+
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
102408
|
+
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
102409
|
+
if (cmp === 0) {
|
|
102410
|
+
return mid;
|
|
102411
|
+
} else if (cmp > 0) {
|
|
102412
|
+
if (aHigh - mid > 1) {
|
|
102413
|
+
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
102414
|
+
}
|
|
102415
|
+
if (aBias == exports2.LEAST_UPPER_BOUND) {
|
|
102416
|
+
return aHigh < aHaystack.length ? aHigh : -1;
|
|
102417
|
+
} else {
|
|
102418
|
+
return mid;
|
|
102419
|
+
}
|
|
102420
|
+
} else {
|
|
102421
|
+
if (mid - aLow > 1) {
|
|
102422
|
+
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
102423
|
+
}
|
|
102424
|
+
if (aBias == exports2.LEAST_UPPER_BOUND) {
|
|
102425
|
+
return mid;
|
|
102426
|
+
} else {
|
|
102427
|
+
return aLow < 0 ? -1 : aLow;
|
|
102428
|
+
}
|
|
102429
|
+
}
|
|
102430
|
+
}
|
|
102431
|
+
exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
102432
|
+
if (aHaystack.length === 0) {
|
|
102433
|
+
return -1;
|
|
102434
|
+
}
|
|
102435
|
+
var index = recursiveSearch(
|
|
102436
|
+
-1,
|
|
102437
|
+
aHaystack.length,
|
|
102438
|
+
aNeedle,
|
|
102439
|
+
aHaystack,
|
|
102440
|
+
aCompare,
|
|
102441
|
+
aBias || exports2.GREATEST_LOWER_BOUND
|
|
102442
|
+
);
|
|
102443
|
+
if (index < 0) {
|
|
102444
|
+
return -1;
|
|
102445
|
+
}
|
|
102446
|
+
while (index - 1 >= 0) {
|
|
102447
|
+
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
|
|
102448
|
+
break;
|
|
102449
|
+
}
|
|
102450
|
+
--index;
|
|
102451
|
+
}
|
|
102452
|
+
return index;
|
|
102453
|
+
};
|
|
102454
|
+
}
|
|
102455
|
+
});
|
|
102456
|
+
|
|
102457
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js
|
|
102458
|
+
var require_quick_sort = __commonJS({
|
|
102459
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js"(exports2) {
|
|
102460
|
+
"use strict";
|
|
102461
|
+
function swap(ary, x, y) {
|
|
102462
|
+
var temp = ary[x];
|
|
102463
|
+
ary[x] = ary[y];
|
|
102464
|
+
ary[y] = temp;
|
|
102465
|
+
}
|
|
102466
|
+
function randomIntInRange(low, high) {
|
|
102467
|
+
return Math.round(low + Math.random() * (high - low));
|
|
102468
|
+
}
|
|
102469
|
+
function doQuickSort(ary, comparator, p, r) {
|
|
102470
|
+
if (p < r) {
|
|
102471
|
+
var pivotIndex = randomIntInRange(p, r);
|
|
102472
|
+
var i = p - 1;
|
|
102473
|
+
swap(ary, pivotIndex, r);
|
|
102474
|
+
var pivot = ary[r];
|
|
102475
|
+
for (var j = p; j < r; j++) {
|
|
102476
|
+
if (comparator(ary[j], pivot) <= 0) {
|
|
102477
|
+
i += 1;
|
|
102478
|
+
swap(ary, i, j);
|
|
102479
|
+
}
|
|
102480
|
+
}
|
|
102481
|
+
swap(ary, i + 1, j);
|
|
102482
|
+
var q = i + 1;
|
|
102483
|
+
doQuickSort(ary, comparator, p, q - 1);
|
|
102484
|
+
doQuickSort(ary, comparator, q + 1, r);
|
|
102485
|
+
}
|
|
102486
|
+
}
|
|
102487
|
+
exports2.quickSort = function(ary, comparator) {
|
|
102488
|
+
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
102489
|
+
};
|
|
102490
|
+
}
|
|
102491
|
+
});
|
|
102492
|
+
|
|
102493
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js
|
|
102494
|
+
var require_source_map_consumer = __commonJS({
|
|
102495
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js"(exports2) {
|
|
102496
|
+
"use strict";
|
|
102497
|
+
var util = require_util4();
|
|
102498
|
+
var binarySearch = require_binary_search();
|
|
102499
|
+
var ArraySet = require_array_set().ArraySet;
|
|
102500
|
+
var base64VLQ = require_base64_vlq();
|
|
102501
|
+
var quickSort = require_quick_sort().quickSort;
|
|
102502
|
+
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
102503
|
+
var sourceMap = aSourceMap;
|
|
102504
|
+
if (typeof aSourceMap === "string") {
|
|
102505
|
+
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
102506
|
+
}
|
|
102507
|
+
return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
102508
|
+
}
|
|
102509
|
+
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
102510
|
+
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
102511
|
+
};
|
|
102512
|
+
SourceMapConsumer.prototype._version = 3;
|
|
102513
|
+
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
102514
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
102515
|
+
configurable: true,
|
|
102516
|
+
enumerable: true,
|
|
102517
|
+
get: function() {
|
|
102518
|
+
if (!this.__generatedMappings) {
|
|
102519
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
|
102520
|
+
}
|
|
102521
|
+
return this.__generatedMappings;
|
|
102522
|
+
}
|
|
102523
|
+
});
|
|
102524
|
+
SourceMapConsumer.prototype.__originalMappings = null;
|
|
102525
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
102526
|
+
configurable: true,
|
|
102527
|
+
enumerable: true,
|
|
102528
|
+
get: function() {
|
|
102529
|
+
if (!this.__originalMappings) {
|
|
102530
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
|
102531
|
+
}
|
|
102532
|
+
return this.__originalMappings;
|
|
102533
|
+
}
|
|
102534
|
+
});
|
|
102535
|
+
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
102536
|
+
var c = aStr.charAt(index);
|
|
102537
|
+
return c === ";" || c === ",";
|
|
102538
|
+
};
|
|
102539
|
+
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
102540
|
+
throw new Error("Subclasses must implement _parseMappings");
|
|
102541
|
+
};
|
|
102542
|
+
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
102543
|
+
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
102544
|
+
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
102545
|
+
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
102546
|
+
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
102547
|
+
var context = aContext || null;
|
|
102548
|
+
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
102549
|
+
var mappings;
|
|
102550
|
+
switch (order) {
|
|
102551
|
+
case SourceMapConsumer.GENERATED_ORDER:
|
|
102552
|
+
mappings = this._generatedMappings;
|
|
102553
|
+
break;
|
|
102554
|
+
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
102555
|
+
mappings = this._originalMappings;
|
|
102556
|
+
break;
|
|
102557
|
+
default:
|
|
102558
|
+
throw new Error("Unknown order of iteration.");
|
|
102559
|
+
}
|
|
102560
|
+
var sourceRoot = this.sourceRoot;
|
|
102561
|
+
mappings.map(function(mapping) {
|
|
102562
|
+
var source = mapping.source === null ? null : this._sources.at(mapping.source);
|
|
102563
|
+
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
|
|
102564
|
+
return {
|
|
102565
|
+
source,
|
|
102566
|
+
generatedLine: mapping.generatedLine,
|
|
102567
|
+
generatedColumn: mapping.generatedColumn,
|
|
102568
|
+
originalLine: mapping.originalLine,
|
|
102569
|
+
originalColumn: mapping.originalColumn,
|
|
102570
|
+
name: mapping.name === null ? null : this._names.at(mapping.name)
|
|
102571
|
+
};
|
|
102572
|
+
}, this).forEach(aCallback, context);
|
|
102573
|
+
};
|
|
102574
|
+
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
102575
|
+
var line = util.getArg(aArgs, "line");
|
|
102576
|
+
var needle = {
|
|
102577
|
+
source: util.getArg(aArgs, "source"),
|
|
102578
|
+
originalLine: line,
|
|
102579
|
+
originalColumn: util.getArg(aArgs, "column", 0)
|
|
102580
|
+
};
|
|
102581
|
+
needle.source = this._findSourceIndex(needle.source);
|
|
102582
|
+
if (needle.source < 0) {
|
|
102583
|
+
return [];
|
|
102584
|
+
}
|
|
102585
|
+
var mappings = [];
|
|
102586
|
+
var index = this._findMapping(
|
|
102587
|
+
needle,
|
|
102588
|
+
this._originalMappings,
|
|
102589
|
+
"originalLine",
|
|
102590
|
+
"originalColumn",
|
|
102591
|
+
util.compareByOriginalPositions,
|
|
102592
|
+
binarySearch.LEAST_UPPER_BOUND
|
|
102593
|
+
);
|
|
102594
|
+
if (index >= 0) {
|
|
102595
|
+
var mapping = this._originalMappings[index];
|
|
102596
|
+
if (aArgs.column === void 0) {
|
|
102597
|
+
var originalLine = mapping.originalLine;
|
|
102598
|
+
while (mapping && mapping.originalLine === originalLine) {
|
|
102599
|
+
mappings.push({
|
|
102600
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
102601
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
102602
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
102603
|
+
});
|
|
102604
|
+
mapping = this._originalMappings[++index];
|
|
102605
|
+
}
|
|
102606
|
+
} else {
|
|
102607
|
+
var originalColumn = mapping.originalColumn;
|
|
102608
|
+
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
102609
|
+
mappings.push({
|
|
102610
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
102611
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
102612
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
102613
|
+
});
|
|
102614
|
+
mapping = this._originalMappings[++index];
|
|
102615
|
+
}
|
|
102616
|
+
}
|
|
102617
|
+
}
|
|
102618
|
+
return mappings;
|
|
102619
|
+
};
|
|
102620
|
+
exports2.SourceMapConsumer = SourceMapConsumer;
|
|
102621
|
+
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
102622
|
+
var sourceMap = aSourceMap;
|
|
102623
|
+
if (typeof aSourceMap === "string") {
|
|
102624
|
+
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
102625
|
+
}
|
|
102626
|
+
var version = util.getArg(sourceMap, "version");
|
|
102627
|
+
var sources = util.getArg(sourceMap, "sources");
|
|
102628
|
+
var names = util.getArg(sourceMap, "names", []);
|
|
102629
|
+
var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
|
|
102630
|
+
var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
|
|
102631
|
+
var mappings = util.getArg(sourceMap, "mappings");
|
|
102632
|
+
var file = util.getArg(sourceMap, "file", null);
|
|
102633
|
+
if (version != this._version) {
|
|
102634
|
+
throw new Error("Unsupported version: " + version);
|
|
102635
|
+
}
|
|
102636
|
+
if (sourceRoot) {
|
|
102637
|
+
sourceRoot = util.normalize(sourceRoot);
|
|
102638
|
+
}
|
|
102639
|
+
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
102640
|
+
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
102641
|
+
});
|
|
102642
|
+
this._names = ArraySet.fromArray(names.map(String), true);
|
|
102643
|
+
this._sources = ArraySet.fromArray(sources, true);
|
|
102644
|
+
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
102645
|
+
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
102646
|
+
});
|
|
102647
|
+
this.sourceRoot = sourceRoot;
|
|
102648
|
+
this.sourcesContent = sourcesContent;
|
|
102649
|
+
this._mappings = mappings;
|
|
102650
|
+
this._sourceMapURL = aSourceMapURL;
|
|
102651
|
+
this.file = file;
|
|
102652
|
+
}
|
|
102653
|
+
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
102654
|
+
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
102655
|
+
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
102656
|
+
var relativeSource = aSource;
|
|
102657
|
+
if (this.sourceRoot != null) {
|
|
102658
|
+
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
102659
|
+
}
|
|
102660
|
+
if (this._sources.has(relativeSource)) {
|
|
102661
|
+
return this._sources.indexOf(relativeSource);
|
|
102662
|
+
}
|
|
102663
|
+
var i;
|
|
102664
|
+
for (i = 0; i < this._absoluteSources.length; ++i) {
|
|
102665
|
+
if (this._absoluteSources[i] == aSource) {
|
|
102666
|
+
return i;
|
|
102667
|
+
}
|
|
102668
|
+
}
|
|
102669
|
+
return -1;
|
|
102670
|
+
};
|
|
102671
|
+
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
102672
|
+
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
102673
|
+
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
102674
|
+
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
102675
|
+
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
102676
|
+
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
102677
|
+
smc._sources.toArray(),
|
|
102678
|
+
smc.sourceRoot
|
|
102679
|
+
);
|
|
102680
|
+
smc.file = aSourceMap._file;
|
|
102681
|
+
smc._sourceMapURL = aSourceMapURL;
|
|
102682
|
+
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
102683
|
+
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
102684
|
+
});
|
|
102685
|
+
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
102686
|
+
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
102687
|
+
var destOriginalMappings = smc.__originalMappings = [];
|
|
102688
|
+
for (var i = 0, length = generatedMappings.length; i < length; i++) {
|
|
102689
|
+
var srcMapping = generatedMappings[i];
|
|
102690
|
+
var destMapping = new Mapping();
|
|
102691
|
+
destMapping.generatedLine = srcMapping.generatedLine;
|
|
102692
|
+
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
102693
|
+
if (srcMapping.source) {
|
|
102694
|
+
destMapping.source = sources.indexOf(srcMapping.source);
|
|
102695
|
+
destMapping.originalLine = srcMapping.originalLine;
|
|
102696
|
+
destMapping.originalColumn = srcMapping.originalColumn;
|
|
102697
|
+
if (srcMapping.name) {
|
|
102698
|
+
destMapping.name = names.indexOf(srcMapping.name);
|
|
102699
|
+
}
|
|
102700
|
+
destOriginalMappings.push(destMapping);
|
|
102701
|
+
}
|
|
102702
|
+
destGeneratedMappings.push(destMapping);
|
|
102703
|
+
}
|
|
102704
|
+
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
102705
|
+
return smc;
|
|
102706
|
+
};
|
|
102707
|
+
BasicSourceMapConsumer.prototype._version = 3;
|
|
102708
|
+
Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
|
|
102709
|
+
get: function() {
|
|
102710
|
+
return this._absoluteSources.slice();
|
|
102711
|
+
}
|
|
102712
|
+
});
|
|
102713
|
+
function Mapping() {
|
|
102714
|
+
this.generatedLine = 0;
|
|
102715
|
+
this.generatedColumn = 0;
|
|
102716
|
+
this.source = null;
|
|
102717
|
+
this.originalLine = null;
|
|
102718
|
+
this.originalColumn = null;
|
|
102719
|
+
this.name = null;
|
|
102720
|
+
}
|
|
102721
|
+
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
102722
|
+
var generatedLine = 1;
|
|
102723
|
+
var previousGeneratedColumn = 0;
|
|
102724
|
+
var previousOriginalLine = 0;
|
|
102725
|
+
var previousOriginalColumn = 0;
|
|
102726
|
+
var previousSource = 0;
|
|
102727
|
+
var previousName = 0;
|
|
102728
|
+
var length = aStr.length;
|
|
102729
|
+
var index = 0;
|
|
102730
|
+
var cachedSegments = {};
|
|
102731
|
+
var temp = {};
|
|
102732
|
+
var originalMappings = [];
|
|
102733
|
+
var generatedMappings = [];
|
|
102734
|
+
var mapping, str, segment, end, value;
|
|
102735
|
+
while (index < length) {
|
|
102736
|
+
if (aStr.charAt(index) === ";") {
|
|
102737
|
+
generatedLine++;
|
|
102738
|
+
index++;
|
|
102739
|
+
previousGeneratedColumn = 0;
|
|
102740
|
+
} else if (aStr.charAt(index) === ",") {
|
|
102741
|
+
index++;
|
|
102742
|
+
} else {
|
|
102743
|
+
mapping = new Mapping();
|
|
102744
|
+
mapping.generatedLine = generatedLine;
|
|
102745
|
+
for (end = index; end < length; end++) {
|
|
102746
|
+
if (this._charIsMappingSeparator(aStr, end)) {
|
|
102747
|
+
break;
|
|
102748
|
+
}
|
|
102749
|
+
}
|
|
102750
|
+
str = aStr.slice(index, end);
|
|
102751
|
+
segment = cachedSegments[str];
|
|
102752
|
+
if (segment) {
|
|
102753
|
+
index += str.length;
|
|
102754
|
+
} else {
|
|
102755
|
+
segment = [];
|
|
102756
|
+
while (index < end) {
|
|
102757
|
+
base64VLQ.decode(aStr, index, temp);
|
|
102758
|
+
value = temp.value;
|
|
102759
|
+
index = temp.rest;
|
|
102760
|
+
segment.push(value);
|
|
102761
|
+
}
|
|
102762
|
+
if (segment.length === 2) {
|
|
102763
|
+
throw new Error("Found a source, but no line and column");
|
|
102764
|
+
}
|
|
102765
|
+
if (segment.length === 3) {
|
|
102766
|
+
throw new Error("Found a source and line, but no column");
|
|
102767
|
+
}
|
|
102768
|
+
cachedSegments[str] = segment;
|
|
102769
|
+
}
|
|
102770
|
+
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
102771
|
+
previousGeneratedColumn = mapping.generatedColumn;
|
|
102772
|
+
if (segment.length > 1) {
|
|
102773
|
+
mapping.source = previousSource + segment[1];
|
|
102774
|
+
previousSource += segment[1];
|
|
102775
|
+
mapping.originalLine = previousOriginalLine + segment[2];
|
|
102776
|
+
previousOriginalLine = mapping.originalLine;
|
|
102777
|
+
mapping.originalLine += 1;
|
|
102778
|
+
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
102779
|
+
previousOriginalColumn = mapping.originalColumn;
|
|
102780
|
+
if (segment.length > 4) {
|
|
102781
|
+
mapping.name = previousName + segment[4];
|
|
102782
|
+
previousName += segment[4];
|
|
102783
|
+
}
|
|
102784
|
+
}
|
|
102785
|
+
generatedMappings.push(mapping);
|
|
102786
|
+
if (typeof mapping.originalLine === "number") {
|
|
102787
|
+
originalMappings.push(mapping);
|
|
102788
|
+
}
|
|
102789
|
+
}
|
|
102790
|
+
}
|
|
102791
|
+
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
102792
|
+
this.__generatedMappings = generatedMappings;
|
|
102793
|
+
quickSort(originalMappings, util.compareByOriginalPositions);
|
|
102794
|
+
this.__originalMappings = originalMappings;
|
|
102795
|
+
};
|
|
102796
|
+
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
102797
|
+
if (aNeedle[aLineName] <= 0) {
|
|
102798
|
+
throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
|
|
102799
|
+
}
|
|
102800
|
+
if (aNeedle[aColumnName] < 0) {
|
|
102801
|
+
throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
|
|
102802
|
+
}
|
|
102803
|
+
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
102804
|
+
};
|
|
102805
|
+
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
102806
|
+
for (var index = 0; index < this._generatedMappings.length; ++index) {
|
|
102807
|
+
var mapping = this._generatedMappings[index];
|
|
102808
|
+
if (index + 1 < this._generatedMappings.length) {
|
|
102809
|
+
var nextMapping = this._generatedMappings[index + 1];
|
|
102810
|
+
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
102811
|
+
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
102812
|
+
continue;
|
|
102813
|
+
}
|
|
102814
|
+
}
|
|
102815
|
+
mapping.lastGeneratedColumn = Infinity;
|
|
102816
|
+
}
|
|
102817
|
+
};
|
|
102818
|
+
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
102819
|
+
var needle = {
|
|
102820
|
+
generatedLine: util.getArg(aArgs, "line"),
|
|
102821
|
+
generatedColumn: util.getArg(aArgs, "column")
|
|
102822
|
+
};
|
|
102823
|
+
var index = this._findMapping(
|
|
102824
|
+
needle,
|
|
102825
|
+
this._generatedMappings,
|
|
102826
|
+
"generatedLine",
|
|
102827
|
+
"generatedColumn",
|
|
102828
|
+
util.compareByGeneratedPositionsDeflated,
|
|
102829
|
+
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
102830
|
+
);
|
|
102831
|
+
if (index >= 0) {
|
|
102832
|
+
var mapping = this._generatedMappings[index];
|
|
102833
|
+
if (mapping.generatedLine === needle.generatedLine) {
|
|
102834
|
+
var source = util.getArg(mapping, "source", null);
|
|
102835
|
+
if (source !== null) {
|
|
102836
|
+
source = this._sources.at(source);
|
|
102837
|
+
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
102838
|
+
}
|
|
102839
|
+
var name = util.getArg(mapping, "name", null);
|
|
102840
|
+
if (name !== null) {
|
|
102841
|
+
name = this._names.at(name);
|
|
102842
|
+
}
|
|
102843
|
+
return {
|
|
102844
|
+
source,
|
|
102845
|
+
line: util.getArg(mapping, "originalLine", null),
|
|
102846
|
+
column: util.getArg(mapping, "originalColumn", null),
|
|
102847
|
+
name
|
|
102848
|
+
};
|
|
102849
|
+
}
|
|
102850
|
+
}
|
|
102851
|
+
return {
|
|
102852
|
+
source: null,
|
|
102853
|
+
line: null,
|
|
102854
|
+
column: null,
|
|
102855
|
+
name: null
|
|
102856
|
+
};
|
|
102857
|
+
};
|
|
102858
|
+
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
102859
|
+
if (!this.sourcesContent) {
|
|
102860
|
+
return false;
|
|
102861
|
+
}
|
|
102862
|
+
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
102863
|
+
return sc == null;
|
|
102864
|
+
});
|
|
102865
|
+
};
|
|
102866
|
+
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
102867
|
+
if (!this.sourcesContent) {
|
|
102868
|
+
return null;
|
|
102869
|
+
}
|
|
102870
|
+
var index = this._findSourceIndex(aSource);
|
|
102871
|
+
if (index >= 0) {
|
|
102872
|
+
return this.sourcesContent[index];
|
|
102873
|
+
}
|
|
102874
|
+
var relativeSource = aSource;
|
|
102875
|
+
if (this.sourceRoot != null) {
|
|
102876
|
+
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
102877
|
+
}
|
|
102878
|
+
var url;
|
|
102879
|
+
if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
|
|
102880
|
+
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
102881
|
+
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
102882
|
+
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
102883
|
+
}
|
|
102884
|
+
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
102885
|
+
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
102886
|
+
}
|
|
102887
|
+
}
|
|
102888
|
+
if (nullOnMissing) {
|
|
102889
|
+
return null;
|
|
102890
|
+
} else {
|
|
102891
|
+
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
102892
|
+
}
|
|
102893
|
+
};
|
|
102894
|
+
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
102895
|
+
var source = util.getArg(aArgs, "source");
|
|
102896
|
+
source = this._findSourceIndex(source);
|
|
102897
|
+
if (source < 0) {
|
|
102898
|
+
return {
|
|
102899
|
+
line: null,
|
|
102900
|
+
column: null,
|
|
102901
|
+
lastColumn: null
|
|
102902
|
+
};
|
|
102903
|
+
}
|
|
102904
|
+
var needle = {
|
|
102905
|
+
source,
|
|
102906
|
+
originalLine: util.getArg(aArgs, "line"),
|
|
102907
|
+
originalColumn: util.getArg(aArgs, "column")
|
|
102908
|
+
};
|
|
102909
|
+
var index = this._findMapping(
|
|
102910
|
+
needle,
|
|
102911
|
+
this._originalMappings,
|
|
102912
|
+
"originalLine",
|
|
102913
|
+
"originalColumn",
|
|
102914
|
+
util.compareByOriginalPositions,
|
|
102915
|
+
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
102916
|
+
);
|
|
102917
|
+
if (index >= 0) {
|
|
102918
|
+
var mapping = this._originalMappings[index];
|
|
102919
|
+
if (mapping.source === needle.source) {
|
|
102920
|
+
return {
|
|
102921
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
102922
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
102923
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
102924
|
+
};
|
|
102925
|
+
}
|
|
102926
|
+
}
|
|
102927
|
+
return {
|
|
102928
|
+
line: null,
|
|
102929
|
+
column: null,
|
|
102930
|
+
lastColumn: null
|
|
102931
|
+
};
|
|
102932
|
+
};
|
|
102933
|
+
exports2.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
|
102934
|
+
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
102935
|
+
var sourceMap = aSourceMap;
|
|
102936
|
+
if (typeof aSourceMap === "string") {
|
|
102937
|
+
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
102938
|
+
}
|
|
102939
|
+
var version = util.getArg(sourceMap, "version");
|
|
102940
|
+
var sections = util.getArg(sourceMap, "sections");
|
|
102941
|
+
if (version != this._version) {
|
|
102942
|
+
throw new Error("Unsupported version: " + version);
|
|
102943
|
+
}
|
|
102944
|
+
this._sources = new ArraySet();
|
|
102945
|
+
this._names = new ArraySet();
|
|
102946
|
+
var lastOffset = {
|
|
102947
|
+
line: -1,
|
|
102948
|
+
column: 0
|
|
102949
|
+
};
|
|
102950
|
+
this._sections = sections.map(function(s) {
|
|
102951
|
+
if (s.url) {
|
|
102952
|
+
throw new Error("Support for url field in sections not implemented.");
|
|
102953
|
+
}
|
|
102954
|
+
var offset = util.getArg(s, "offset");
|
|
102955
|
+
var offsetLine = util.getArg(offset, "line");
|
|
102956
|
+
var offsetColumn = util.getArg(offset, "column");
|
|
102957
|
+
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
102958
|
+
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
102959
|
+
}
|
|
102960
|
+
lastOffset = offset;
|
|
102961
|
+
return {
|
|
102962
|
+
generatedOffset: {
|
|
102963
|
+
// The offset fields are 0-based, but we use 1-based indices when
|
|
102964
|
+
// encoding/decoding from VLQ.
|
|
102965
|
+
generatedLine: offsetLine + 1,
|
|
102966
|
+
generatedColumn: offsetColumn + 1
|
|
102967
|
+
},
|
|
102968
|
+
consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
|
|
102969
|
+
};
|
|
102970
|
+
});
|
|
102971
|
+
}
|
|
102972
|
+
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
102973
|
+
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
102974
|
+
IndexedSourceMapConsumer.prototype._version = 3;
|
|
102975
|
+
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
102976
|
+
get: function() {
|
|
102977
|
+
var sources = [];
|
|
102978
|
+
for (var i = 0; i < this._sections.length; i++) {
|
|
102979
|
+
for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
|
|
102980
|
+
sources.push(this._sections[i].consumer.sources[j]);
|
|
102981
|
+
}
|
|
102982
|
+
}
|
|
102983
|
+
return sources;
|
|
102984
|
+
}
|
|
102985
|
+
});
|
|
102986
|
+
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
102987
|
+
var needle = {
|
|
102988
|
+
generatedLine: util.getArg(aArgs, "line"),
|
|
102989
|
+
generatedColumn: util.getArg(aArgs, "column")
|
|
102990
|
+
};
|
|
102991
|
+
var sectionIndex = binarySearch.search(
|
|
102992
|
+
needle,
|
|
102993
|
+
this._sections,
|
|
102994
|
+
function(needle2, section2) {
|
|
102995
|
+
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
102996
|
+
if (cmp) {
|
|
102997
|
+
return cmp;
|
|
102998
|
+
}
|
|
102999
|
+
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
103000
|
+
}
|
|
103001
|
+
);
|
|
103002
|
+
var section = this._sections[sectionIndex];
|
|
103003
|
+
if (!section) {
|
|
103004
|
+
return {
|
|
103005
|
+
source: null,
|
|
103006
|
+
line: null,
|
|
103007
|
+
column: null,
|
|
103008
|
+
name: null
|
|
103009
|
+
};
|
|
103010
|
+
}
|
|
103011
|
+
return section.consumer.originalPositionFor({
|
|
103012
|
+
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
103013
|
+
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
103014
|
+
bias: aArgs.bias
|
|
103015
|
+
});
|
|
103016
|
+
};
|
|
103017
|
+
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
103018
|
+
return this._sections.every(function(s) {
|
|
103019
|
+
return s.consumer.hasContentsOfAllSources();
|
|
103020
|
+
});
|
|
103021
|
+
};
|
|
103022
|
+
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
103023
|
+
for (var i = 0; i < this._sections.length; i++) {
|
|
103024
|
+
var section = this._sections[i];
|
|
103025
|
+
var content = section.consumer.sourceContentFor(aSource, true);
|
|
103026
|
+
if (content) {
|
|
103027
|
+
return content;
|
|
103028
|
+
}
|
|
103029
|
+
}
|
|
103030
|
+
if (nullOnMissing) {
|
|
103031
|
+
return null;
|
|
103032
|
+
} else {
|
|
103033
|
+
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
103034
|
+
}
|
|
103035
|
+
};
|
|
103036
|
+
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
103037
|
+
for (var i = 0; i < this._sections.length; i++) {
|
|
103038
|
+
var section = this._sections[i];
|
|
103039
|
+
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
|
|
103040
|
+
continue;
|
|
103041
|
+
}
|
|
103042
|
+
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
103043
|
+
if (generatedPosition) {
|
|
103044
|
+
var ret = {
|
|
103045
|
+
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
103046
|
+
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
103047
|
+
};
|
|
103048
|
+
return ret;
|
|
103049
|
+
}
|
|
103050
|
+
}
|
|
103051
|
+
return {
|
|
103052
|
+
line: null,
|
|
103053
|
+
column: null
|
|
103054
|
+
};
|
|
103055
|
+
};
|
|
103056
|
+
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
103057
|
+
this.__generatedMappings = [];
|
|
103058
|
+
this.__originalMappings = [];
|
|
103059
|
+
for (var i = 0; i < this._sections.length; i++) {
|
|
103060
|
+
var section = this._sections[i];
|
|
103061
|
+
var sectionMappings = section.consumer._generatedMappings;
|
|
103062
|
+
for (var j = 0; j < sectionMappings.length; j++) {
|
|
103063
|
+
var mapping = sectionMappings[j];
|
|
103064
|
+
var source = section.consumer._sources.at(mapping.source);
|
|
103065
|
+
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
103066
|
+
this._sources.add(source);
|
|
103067
|
+
source = this._sources.indexOf(source);
|
|
103068
|
+
var name = null;
|
|
103069
|
+
if (mapping.name) {
|
|
103070
|
+
name = section.consumer._names.at(mapping.name);
|
|
103071
|
+
this._names.add(name);
|
|
103072
|
+
name = this._names.indexOf(name);
|
|
103073
|
+
}
|
|
103074
|
+
var adjustedMapping = {
|
|
103075
|
+
source,
|
|
103076
|
+
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
103077
|
+
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
103078
|
+
originalLine: mapping.originalLine,
|
|
103079
|
+
originalColumn: mapping.originalColumn,
|
|
103080
|
+
name
|
|
103081
|
+
};
|
|
103082
|
+
this.__generatedMappings.push(adjustedMapping);
|
|
103083
|
+
if (typeof adjustedMapping.originalLine === "number") {
|
|
103084
|
+
this.__originalMappings.push(adjustedMapping);
|
|
103085
|
+
}
|
|
103086
|
+
}
|
|
103087
|
+
}
|
|
103088
|
+
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
103089
|
+
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
103090
|
+
};
|
|
103091
|
+
exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
103092
|
+
}
|
|
103093
|
+
});
|
|
103094
|
+
|
|
103095
|
+
// ../../node_modules/source-map-support/node_modules/source-map/lib/source-node.js
|
|
103096
|
+
var require_source_node = __commonJS({
|
|
103097
|
+
"../../node_modules/source-map-support/node_modules/source-map/lib/source-node.js"(exports2) {
|
|
103098
|
+
"use strict";
|
|
103099
|
+
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
103100
|
+
var util = require_util4();
|
|
103101
|
+
var REGEX_NEWLINE = /(\r?\n)/;
|
|
103102
|
+
var NEWLINE_CODE = 10;
|
|
103103
|
+
var isSourceNode = "$$$isSourceNode$$$";
|
|
103104
|
+
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
103105
|
+
this.children = [];
|
|
103106
|
+
this.sourceContents = {};
|
|
103107
|
+
this.line = aLine == null ? null : aLine;
|
|
103108
|
+
this.column = aColumn == null ? null : aColumn;
|
|
103109
|
+
this.source = aSource == null ? null : aSource;
|
|
103110
|
+
this.name = aName == null ? null : aName;
|
|
103111
|
+
this[isSourceNode] = true;
|
|
103112
|
+
if (aChunks != null) this.add(aChunks);
|
|
103113
|
+
}
|
|
103114
|
+
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
103115
|
+
var node = new SourceNode();
|
|
103116
|
+
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
103117
|
+
var remainingLinesIndex = 0;
|
|
103118
|
+
var shiftNextLine = function() {
|
|
103119
|
+
var lineContents = getNextLine();
|
|
103120
|
+
var newLine = getNextLine() || "";
|
|
103121
|
+
return lineContents + newLine;
|
|
103122
|
+
function getNextLine() {
|
|
103123
|
+
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
|
|
103124
|
+
}
|
|
103125
|
+
};
|
|
103126
|
+
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
103127
|
+
var lastMapping = null;
|
|
103128
|
+
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
103129
|
+
if (lastMapping !== null) {
|
|
103130
|
+
if (lastGeneratedLine < mapping.generatedLine) {
|
|
103131
|
+
addMappingWithCode(lastMapping, shiftNextLine());
|
|
103132
|
+
lastGeneratedLine++;
|
|
103133
|
+
lastGeneratedColumn = 0;
|
|
103134
|
+
} else {
|
|
103135
|
+
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
103136
|
+
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
103137
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
103138
|
+
lastGeneratedColumn = mapping.generatedColumn;
|
|
103139
|
+
addMappingWithCode(lastMapping, code);
|
|
103140
|
+
lastMapping = mapping;
|
|
103141
|
+
return;
|
|
103142
|
+
}
|
|
103143
|
+
}
|
|
103144
|
+
while (lastGeneratedLine < mapping.generatedLine) {
|
|
103145
|
+
node.add(shiftNextLine());
|
|
103146
|
+
lastGeneratedLine++;
|
|
103147
|
+
}
|
|
103148
|
+
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
103149
|
+
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
103150
|
+
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
103151
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
103152
|
+
lastGeneratedColumn = mapping.generatedColumn;
|
|
103153
|
+
}
|
|
103154
|
+
lastMapping = mapping;
|
|
103155
|
+
}, this);
|
|
103156
|
+
if (remainingLinesIndex < remainingLines.length) {
|
|
103157
|
+
if (lastMapping) {
|
|
103158
|
+
addMappingWithCode(lastMapping, shiftNextLine());
|
|
103159
|
+
}
|
|
103160
|
+
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
103161
|
+
}
|
|
103162
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
103163
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
103164
|
+
if (content != null) {
|
|
103165
|
+
if (aRelativePath != null) {
|
|
103166
|
+
sourceFile = util.join(aRelativePath, sourceFile);
|
|
103167
|
+
}
|
|
103168
|
+
node.setSourceContent(sourceFile, content);
|
|
103169
|
+
}
|
|
103170
|
+
});
|
|
103171
|
+
return node;
|
|
103172
|
+
function addMappingWithCode(mapping, code) {
|
|
103173
|
+
if (mapping === null || mapping.source === void 0) {
|
|
103174
|
+
node.add(code);
|
|
103175
|
+
} else {
|
|
103176
|
+
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
103177
|
+
node.add(new SourceNode(
|
|
103178
|
+
mapping.originalLine,
|
|
103179
|
+
mapping.originalColumn,
|
|
103180
|
+
source,
|
|
103181
|
+
code,
|
|
103182
|
+
mapping.name
|
|
103183
|
+
));
|
|
103184
|
+
}
|
|
103185
|
+
}
|
|
103186
|
+
};
|
|
103187
|
+
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
103188
|
+
if (Array.isArray(aChunk)) {
|
|
103189
|
+
aChunk.forEach(function(chunk) {
|
|
103190
|
+
this.add(chunk);
|
|
103191
|
+
}, this);
|
|
103192
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
103193
|
+
if (aChunk) {
|
|
103194
|
+
this.children.push(aChunk);
|
|
103195
|
+
}
|
|
103196
|
+
} else {
|
|
103197
|
+
throw new TypeError(
|
|
103198
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
103199
|
+
);
|
|
103200
|
+
}
|
|
103201
|
+
return this;
|
|
103202
|
+
};
|
|
103203
|
+
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
103204
|
+
if (Array.isArray(aChunk)) {
|
|
103205
|
+
for (var i = aChunk.length - 1; i >= 0; i--) {
|
|
103206
|
+
this.prepend(aChunk[i]);
|
|
103207
|
+
}
|
|
103208
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
103209
|
+
this.children.unshift(aChunk);
|
|
103210
|
+
} else {
|
|
103211
|
+
throw new TypeError(
|
|
103212
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
103213
|
+
);
|
|
103214
|
+
}
|
|
103215
|
+
return this;
|
|
103216
|
+
};
|
|
103217
|
+
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
103218
|
+
var chunk;
|
|
103219
|
+
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
103220
|
+
chunk = this.children[i];
|
|
103221
|
+
if (chunk[isSourceNode]) {
|
|
103222
|
+
chunk.walk(aFn);
|
|
103223
|
+
} else {
|
|
103224
|
+
if (chunk !== "") {
|
|
103225
|
+
aFn(chunk, {
|
|
103226
|
+
source: this.source,
|
|
103227
|
+
line: this.line,
|
|
103228
|
+
column: this.column,
|
|
103229
|
+
name: this.name
|
|
103230
|
+
});
|
|
103231
|
+
}
|
|
103232
|
+
}
|
|
103233
|
+
}
|
|
103234
|
+
};
|
|
103235
|
+
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
103236
|
+
var newChildren;
|
|
103237
|
+
var i;
|
|
103238
|
+
var len = this.children.length;
|
|
103239
|
+
if (len > 0) {
|
|
103240
|
+
newChildren = [];
|
|
103241
|
+
for (i = 0; i < len - 1; i++) {
|
|
103242
|
+
newChildren.push(this.children[i]);
|
|
103243
|
+
newChildren.push(aSep);
|
|
103244
|
+
}
|
|
103245
|
+
newChildren.push(this.children[i]);
|
|
103246
|
+
this.children = newChildren;
|
|
103247
|
+
}
|
|
103248
|
+
return this;
|
|
103249
|
+
};
|
|
103250
|
+
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
103251
|
+
var lastChild = this.children[this.children.length - 1];
|
|
103252
|
+
if (lastChild[isSourceNode]) {
|
|
103253
|
+
lastChild.replaceRight(aPattern, aReplacement);
|
|
103254
|
+
} else if (typeof lastChild === "string") {
|
|
103255
|
+
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
|
103256
|
+
} else {
|
|
103257
|
+
this.children.push("".replace(aPattern, aReplacement));
|
|
103258
|
+
}
|
|
103259
|
+
return this;
|
|
103260
|
+
};
|
|
103261
|
+
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
103262
|
+
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
103263
|
+
};
|
|
103264
|
+
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
103265
|
+
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
103266
|
+
if (this.children[i][isSourceNode]) {
|
|
103267
|
+
this.children[i].walkSourceContents(aFn);
|
|
103268
|
+
}
|
|
103269
|
+
}
|
|
103270
|
+
var sources = Object.keys(this.sourceContents);
|
|
103271
|
+
for (var i = 0, len = sources.length; i < len; i++) {
|
|
103272
|
+
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
|
103273
|
+
}
|
|
103274
|
+
};
|
|
103275
|
+
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
103276
|
+
var str = "";
|
|
103277
|
+
this.walk(function(chunk) {
|
|
103278
|
+
str += chunk;
|
|
103279
|
+
});
|
|
103280
|
+
return str;
|
|
103281
|
+
};
|
|
103282
|
+
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
103283
|
+
var generated = {
|
|
103284
|
+
code: "",
|
|
103285
|
+
line: 1,
|
|
103286
|
+
column: 0
|
|
103287
|
+
};
|
|
103288
|
+
var map2 = new SourceMapGenerator(aArgs);
|
|
103289
|
+
var sourceMappingActive = false;
|
|
103290
|
+
var lastOriginalSource = null;
|
|
103291
|
+
var lastOriginalLine = null;
|
|
103292
|
+
var lastOriginalColumn = null;
|
|
103293
|
+
var lastOriginalName = null;
|
|
103294
|
+
this.walk(function(chunk, original) {
|
|
103295
|
+
generated.code += chunk;
|
|
103296
|
+
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
103297
|
+
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
103298
|
+
map2.addMapping({
|
|
103299
|
+
source: original.source,
|
|
103300
|
+
original: {
|
|
103301
|
+
line: original.line,
|
|
103302
|
+
column: original.column
|
|
103303
|
+
},
|
|
103304
|
+
generated: {
|
|
103305
|
+
line: generated.line,
|
|
103306
|
+
column: generated.column
|
|
103307
|
+
},
|
|
103308
|
+
name: original.name
|
|
103309
|
+
});
|
|
103310
|
+
}
|
|
103311
|
+
lastOriginalSource = original.source;
|
|
103312
|
+
lastOriginalLine = original.line;
|
|
103313
|
+
lastOriginalColumn = original.column;
|
|
103314
|
+
lastOriginalName = original.name;
|
|
103315
|
+
sourceMappingActive = true;
|
|
103316
|
+
} else if (sourceMappingActive) {
|
|
103317
|
+
map2.addMapping({
|
|
103318
|
+
generated: {
|
|
103319
|
+
line: generated.line,
|
|
103320
|
+
column: generated.column
|
|
103321
|
+
}
|
|
103322
|
+
});
|
|
103323
|
+
lastOriginalSource = null;
|
|
103324
|
+
sourceMappingActive = false;
|
|
103325
|
+
}
|
|
103326
|
+
for (var idx = 0, length = chunk.length; idx < length; idx++) {
|
|
103327
|
+
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
103328
|
+
generated.line++;
|
|
103329
|
+
generated.column = 0;
|
|
103330
|
+
if (idx + 1 === length) {
|
|
103331
|
+
lastOriginalSource = null;
|
|
103332
|
+
sourceMappingActive = false;
|
|
103333
|
+
} else if (sourceMappingActive) {
|
|
103334
|
+
map2.addMapping({
|
|
103335
|
+
source: original.source,
|
|
103336
|
+
original: {
|
|
103337
|
+
line: original.line,
|
|
103338
|
+
column: original.column
|
|
103339
|
+
},
|
|
103340
|
+
generated: {
|
|
103341
|
+
line: generated.line,
|
|
103342
|
+
column: generated.column
|
|
103343
|
+
},
|
|
103344
|
+
name: original.name
|
|
103345
|
+
});
|
|
103346
|
+
}
|
|
103347
|
+
} else {
|
|
103348
|
+
generated.column++;
|
|
103349
|
+
}
|
|
103350
|
+
}
|
|
103351
|
+
});
|
|
103352
|
+
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
103353
|
+
map2.setSourceContent(sourceFile, sourceContent);
|
|
103354
|
+
});
|
|
103355
|
+
return { code: generated.code, map: map2 };
|
|
103356
|
+
};
|
|
103357
|
+
exports2.SourceNode = SourceNode;
|
|
103358
|
+
}
|
|
103359
|
+
});
|
|
103360
|
+
|
|
103361
|
+
// ../../node_modules/source-map-support/node_modules/source-map/source-map.js
|
|
103362
|
+
var require_source_map = __commonJS({
|
|
103363
|
+
"../../node_modules/source-map-support/node_modules/source-map/source-map.js"(exports2) {
|
|
103364
|
+
"use strict";
|
|
103365
|
+
exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
103366
|
+
exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
103367
|
+
exports2.SourceNode = require_source_node().SourceNode;
|
|
103368
|
+
}
|
|
103369
|
+
});
|
|
103370
|
+
|
|
103371
|
+
// ../../node_modules/buffer-from/index.js
|
|
103372
|
+
var require_buffer_from = __commonJS({
|
|
103373
|
+
"../../node_modules/buffer-from/index.js"(exports2, module2) {
|
|
103374
|
+
"use strict";
|
|
103375
|
+
var toString = Object.prototype.toString;
|
|
103376
|
+
var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
103377
|
+
function isArrayBuffer(input) {
|
|
103378
|
+
return toString.call(input).slice(8, -1) === "ArrayBuffer";
|
|
103379
|
+
}
|
|
103380
|
+
function fromArrayBuffer(obj, byteOffset, length) {
|
|
103381
|
+
byteOffset >>>= 0;
|
|
103382
|
+
var maxLength = obj.byteLength - byteOffset;
|
|
103383
|
+
if (maxLength < 0) {
|
|
103384
|
+
throw new RangeError("'offset' is out of bounds");
|
|
103385
|
+
}
|
|
103386
|
+
if (length === void 0) {
|
|
103387
|
+
length = maxLength;
|
|
103388
|
+
} else {
|
|
103389
|
+
length >>>= 0;
|
|
103390
|
+
if (length > maxLength) {
|
|
103391
|
+
throw new RangeError("'length' is out of bounds");
|
|
103392
|
+
}
|
|
103393
|
+
}
|
|
103394
|
+
return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
|
|
103395
|
+
}
|
|
103396
|
+
function fromString(string, encoding) {
|
|
103397
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
103398
|
+
encoding = "utf8";
|
|
103399
|
+
}
|
|
103400
|
+
if (!Buffer.isEncoding(encoding)) {
|
|
103401
|
+
throw new TypeError('"encoding" must be a valid string encoding');
|
|
103402
|
+
}
|
|
103403
|
+
return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding);
|
|
103404
|
+
}
|
|
103405
|
+
function bufferFrom(value, encodingOrOffset, length) {
|
|
103406
|
+
if (typeof value === "number") {
|
|
103407
|
+
throw new TypeError('"value" argument must not be a number');
|
|
103408
|
+
}
|
|
103409
|
+
if (isArrayBuffer(value)) {
|
|
103410
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
103411
|
+
}
|
|
103412
|
+
if (typeof value === "string") {
|
|
103413
|
+
return fromString(value, encodingOrOffset);
|
|
103414
|
+
}
|
|
103415
|
+
return isModern ? Buffer.from(value) : new Buffer(value);
|
|
103416
|
+
}
|
|
103417
|
+
module2.exports = bufferFrom;
|
|
103418
|
+
}
|
|
103419
|
+
});
|
|
103420
|
+
|
|
103421
|
+
// ../../node_modules/source-map-support/source-map-support.js
|
|
103422
|
+
var require_source_map_support = __commonJS({
|
|
103423
|
+
"../../node_modules/source-map-support/source-map-support.js"(exports2, module2) {
|
|
103424
|
+
"use strict";
|
|
103425
|
+
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
103426
|
+
var path = require("path");
|
|
103427
|
+
var fs;
|
|
103428
|
+
try {
|
|
103429
|
+
fs = require("fs");
|
|
103430
|
+
if (!fs.existsSync || !fs.readFileSync) {
|
|
103431
|
+
fs = null;
|
|
103432
|
+
}
|
|
103433
|
+
} catch (err) {
|
|
103434
|
+
}
|
|
103435
|
+
var bufferFrom = require_buffer_from();
|
|
103436
|
+
function dynamicRequire(mod, request) {
|
|
103437
|
+
return mod.require(request);
|
|
103438
|
+
}
|
|
103439
|
+
var errorFormatterInstalled = false;
|
|
103440
|
+
var uncaughtShimInstalled = false;
|
|
103441
|
+
var emptyCacheBetweenOperations = false;
|
|
103442
|
+
var environment = "auto";
|
|
103443
|
+
var fileContentsCache = {};
|
|
103444
|
+
var sourceMapCache = {};
|
|
103445
|
+
var reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
103446
|
+
var retrieveFileHandlers = [];
|
|
103447
|
+
var retrieveMapHandlers = [];
|
|
103448
|
+
function isInBrowser() {
|
|
103449
|
+
if (environment === "browser")
|
|
103450
|
+
return true;
|
|
103451
|
+
if (environment === "node")
|
|
103452
|
+
return false;
|
|
103453
|
+
return typeof window !== "undefined" && typeof XMLHttpRequest === "function" && !(window.require && window.module && window.process && window.process.type === "renderer");
|
|
103454
|
+
}
|
|
103455
|
+
function hasGlobalProcessEventEmitter() {
|
|
103456
|
+
return typeof process === "object" && process !== null && typeof process.on === "function";
|
|
103457
|
+
}
|
|
103458
|
+
function globalProcessVersion() {
|
|
103459
|
+
if (typeof process === "object" && process !== null) {
|
|
103460
|
+
return process.version;
|
|
103461
|
+
} else {
|
|
103462
|
+
return "";
|
|
103463
|
+
}
|
|
103464
|
+
}
|
|
103465
|
+
function globalProcessStderr() {
|
|
103466
|
+
if (typeof process === "object" && process !== null) {
|
|
103467
|
+
return process.stderr;
|
|
103468
|
+
}
|
|
103469
|
+
}
|
|
103470
|
+
function globalProcessExit(code) {
|
|
103471
|
+
if (typeof process === "object" && process !== null && typeof process.exit === "function") {
|
|
103472
|
+
return process.exit(code);
|
|
103473
|
+
}
|
|
103474
|
+
}
|
|
103475
|
+
function handlerExec(list) {
|
|
103476
|
+
return function(arg) {
|
|
103477
|
+
for (var i = 0; i < list.length; i++) {
|
|
103478
|
+
var ret = list[i](arg);
|
|
103479
|
+
if (ret) {
|
|
103480
|
+
return ret;
|
|
103481
|
+
}
|
|
103482
|
+
}
|
|
103483
|
+
return null;
|
|
103484
|
+
};
|
|
103485
|
+
}
|
|
103486
|
+
var retrieveFile = handlerExec(retrieveFileHandlers);
|
|
103487
|
+
retrieveFileHandlers.push(function(path2) {
|
|
103488
|
+
path2 = path2.trim();
|
|
103489
|
+
if (/^file:/.test(path2)) {
|
|
103490
|
+
path2 = path2.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
103491
|
+
return drive ? "" : (
|
|
103492
|
+
// file:///C:/dir/file -> C:/dir/file
|
|
103493
|
+
"/"
|
|
103494
|
+
);
|
|
103495
|
+
});
|
|
103496
|
+
}
|
|
103497
|
+
if (path2 in fileContentsCache) {
|
|
103498
|
+
return fileContentsCache[path2];
|
|
103499
|
+
}
|
|
103500
|
+
var contents = "";
|
|
103501
|
+
try {
|
|
103502
|
+
if (!fs) {
|
|
103503
|
+
var xhr = new XMLHttpRequest();
|
|
103504
|
+
xhr.open(
|
|
103505
|
+
"GET",
|
|
103506
|
+
path2,
|
|
103507
|
+
/** async */
|
|
103508
|
+
false
|
|
103509
|
+
);
|
|
103510
|
+
xhr.send(null);
|
|
103511
|
+
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
103512
|
+
contents = xhr.responseText;
|
|
103513
|
+
}
|
|
103514
|
+
} else if (fs.existsSync(path2)) {
|
|
103515
|
+
contents = fs.readFileSync(path2, "utf8");
|
|
103516
|
+
}
|
|
103517
|
+
} catch (er) {
|
|
103518
|
+
}
|
|
103519
|
+
return fileContentsCache[path2] = contents;
|
|
103520
|
+
});
|
|
103521
|
+
function supportRelativeURL(file, url) {
|
|
103522
|
+
if (!file) return url;
|
|
103523
|
+
var dir = path.dirname(file);
|
|
103524
|
+
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
103525
|
+
var protocol = match ? match[0] : "";
|
|
103526
|
+
var startPath = dir.slice(protocol.length);
|
|
103527
|
+
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
103528
|
+
protocol += "/";
|
|
103529
|
+
return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
|
|
103530
|
+
}
|
|
103531
|
+
return protocol + path.resolve(dir.slice(protocol.length), url);
|
|
103532
|
+
}
|
|
103533
|
+
function retrieveSourceMapURL(source) {
|
|
103534
|
+
var fileData;
|
|
103535
|
+
if (isInBrowser()) {
|
|
103536
|
+
try {
|
|
103537
|
+
var xhr = new XMLHttpRequest();
|
|
103538
|
+
xhr.open("GET", source, false);
|
|
103539
|
+
xhr.send(null);
|
|
103540
|
+
fileData = xhr.readyState === 4 ? xhr.responseText : null;
|
|
103541
|
+
var sourceMapHeader = xhr.getResponseHeader("SourceMap") || xhr.getResponseHeader("X-SourceMap");
|
|
103542
|
+
if (sourceMapHeader) {
|
|
103543
|
+
return sourceMapHeader;
|
|
103544
|
+
}
|
|
103545
|
+
} catch (e) {
|
|
103546
|
+
}
|
|
103547
|
+
}
|
|
103548
|
+
fileData = retrieveFile(source);
|
|
103549
|
+
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
|
|
103550
|
+
var lastMatch, match;
|
|
103551
|
+
while (match = re.exec(fileData)) lastMatch = match;
|
|
103552
|
+
if (!lastMatch) return null;
|
|
103553
|
+
return lastMatch[1];
|
|
103554
|
+
}
|
|
103555
|
+
var retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
103556
|
+
retrieveMapHandlers.push(function(source) {
|
|
103557
|
+
var sourceMappingURL = retrieveSourceMapURL(source);
|
|
103558
|
+
if (!sourceMappingURL) return null;
|
|
103559
|
+
var sourceMapData;
|
|
103560
|
+
if (reSourceMap.test(sourceMappingURL)) {
|
|
103561
|
+
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
|
|
103562
|
+
sourceMapData = bufferFrom(rawData, "base64").toString();
|
|
103563
|
+
sourceMappingURL = source;
|
|
103564
|
+
} else {
|
|
103565
|
+
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
|
103566
|
+
sourceMapData = retrieveFile(sourceMappingURL);
|
|
103567
|
+
}
|
|
103568
|
+
if (!sourceMapData) {
|
|
103569
|
+
return null;
|
|
103570
|
+
}
|
|
103571
|
+
return {
|
|
103572
|
+
url: sourceMappingURL,
|
|
103573
|
+
map: sourceMapData
|
|
103574
|
+
};
|
|
103575
|
+
});
|
|
103576
|
+
function mapSourcePosition(position) {
|
|
103577
|
+
var sourceMap = sourceMapCache[position.source];
|
|
103578
|
+
if (!sourceMap) {
|
|
103579
|
+
var urlAndMap = retrieveSourceMap(position.source);
|
|
103580
|
+
if (urlAndMap) {
|
|
103581
|
+
sourceMap = sourceMapCache[position.source] = {
|
|
103582
|
+
url: urlAndMap.url,
|
|
103583
|
+
map: new SourceMapConsumer(urlAndMap.map)
|
|
103584
|
+
};
|
|
103585
|
+
if (sourceMap.map.sourcesContent) {
|
|
103586
|
+
sourceMap.map.sources.forEach(function(source, i) {
|
|
103587
|
+
var contents = sourceMap.map.sourcesContent[i];
|
|
103588
|
+
if (contents) {
|
|
103589
|
+
var url = supportRelativeURL(sourceMap.url, source);
|
|
103590
|
+
fileContentsCache[url] = contents;
|
|
103591
|
+
}
|
|
103592
|
+
});
|
|
103593
|
+
}
|
|
103594
|
+
} else {
|
|
103595
|
+
sourceMap = sourceMapCache[position.source] = {
|
|
103596
|
+
url: null,
|
|
103597
|
+
map: null
|
|
103598
|
+
};
|
|
103599
|
+
}
|
|
103600
|
+
}
|
|
103601
|
+
if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === "function") {
|
|
103602
|
+
var originalPosition = sourceMap.map.originalPositionFor(position);
|
|
103603
|
+
if (originalPosition.source !== null) {
|
|
103604
|
+
originalPosition.source = supportRelativeURL(
|
|
103605
|
+
sourceMap.url,
|
|
103606
|
+
originalPosition.source
|
|
103607
|
+
);
|
|
103608
|
+
return originalPosition;
|
|
103609
|
+
}
|
|
103610
|
+
}
|
|
103611
|
+
return position;
|
|
103612
|
+
}
|
|
103613
|
+
function mapEvalOrigin(origin) {
|
|
103614
|
+
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
103615
|
+
if (match) {
|
|
103616
|
+
var position = mapSourcePosition({
|
|
103617
|
+
source: match[2],
|
|
103618
|
+
line: +match[3],
|
|
103619
|
+
column: match[4] - 1
|
|
103620
|
+
});
|
|
103621
|
+
return "eval at " + match[1] + " (" + position.source + ":" + position.line + ":" + (position.column + 1) + ")";
|
|
103622
|
+
}
|
|
103623
|
+
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
103624
|
+
if (match) {
|
|
103625
|
+
return "eval at " + match[1] + " (" + mapEvalOrigin(match[2]) + ")";
|
|
103626
|
+
}
|
|
103627
|
+
return origin;
|
|
103628
|
+
}
|
|
103629
|
+
function CallSiteToString() {
|
|
103630
|
+
var fileName;
|
|
103631
|
+
var fileLocation = "";
|
|
103632
|
+
if (this.isNative()) {
|
|
103633
|
+
fileLocation = "native";
|
|
103634
|
+
} else {
|
|
103635
|
+
fileName = this.getScriptNameOrSourceURL();
|
|
103636
|
+
if (!fileName && this.isEval()) {
|
|
103637
|
+
fileLocation = this.getEvalOrigin();
|
|
103638
|
+
fileLocation += ", ";
|
|
103639
|
+
}
|
|
103640
|
+
if (fileName) {
|
|
103641
|
+
fileLocation += fileName;
|
|
103642
|
+
} else {
|
|
103643
|
+
fileLocation += "<anonymous>";
|
|
103644
|
+
}
|
|
103645
|
+
var lineNumber = this.getLineNumber();
|
|
103646
|
+
if (lineNumber != null) {
|
|
103647
|
+
fileLocation += ":" + lineNumber;
|
|
103648
|
+
var columnNumber = this.getColumnNumber();
|
|
103649
|
+
if (columnNumber) {
|
|
103650
|
+
fileLocation += ":" + columnNumber;
|
|
103651
|
+
}
|
|
103652
|
+
}
|
|
103653
|
+
}
|
|
103654
|
+
var line = "";
|
|
103655
|
+
var functionName = this.getFunctionName();
|
|
103656
|
+
var addSuffix = true;
|
|
103657
|
+
var isConstructor = this.isConstructor();
|
|
103658
|
+
var isMethodCall = !(this.isToplevel() || isConstructor);
|
|
103659
|
+
if (isMethodCall) {
|
|
103660
|
+
var typeName = this.getTypeName();
|
|
103661
|
+
if (typeName === "[object Object]") {
|
|
103662
|
+
typeName = "null";
|
|
103663
|
+
}
|
|
103664
|
+
var methodName = this.getMethodName();
|
|
103665
|
+
if (functionName) {
|
|
103666
|
+
if (typeName && functionName.indexOf(typeName) != 0) {
|
|
103667
|
+
line += typeName + ".";
|
|
103668
|
+
}
|
|
103669
|
+
line += functionName;
|
|
103670
|
+
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
|
|
103671
|
+
line += " [as " + methodName + "]";
|
|
103672
|
+
}
|
|
103673
|
+
} else {
|
|
103674
|
+
line += typeName + "." + (methodName || "<anonymous>");
|
|
103675
|
+
}
|
|
103676
|
+
} else if (isConstructor) {
|
|
103677
|
+
line += "new " + (functionName || "<anonymous>");
|
|
103678
|
+
} else if (functionName) {
|
|
103679
|
+
line += functionName;
|
|
103680
|
+
} else {
|
|
103681
|
+
line += fileLocation;
|
|
103682
|
+
addSuffix = false;
|
|
103683
|
+
}
|
|
103684
|
+
if (addSuffix) {
|
|
103685
|
+
line += " (" + fileLocation + ")";
|
|
103686
|
+
}
|
|
103687
|
+
return line;
|
|
103688
|
+
}
|
|
103689
|
+
function cloneCallSite(frame) {
|
|
103690
|
+
var object = {};
|
|
103691
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
|
103692
|
+
object[name] = /^(?:is|get)/.test(name) ? function() {
|
|
103693
|
+
return frame[name].call(frame);
|
|
103694
|
+
} : frame[name];
|
|
103695
|
+
});
|
|
103696
|
+
object.toString = CallSiteToString;
|
|
103697
|
+
return object;
|
|
103698
|
+
}
|
|
103699
|
+
function wrapCallSite(frame, state2) {
|
|
103700
|
+
if (state2 === void 0) {
|
|
103701
|
+
state2 = { nextPosition: null, curPosition: null };
|
|
103702
|
+
}
|
|
103703
|
+
if (frame.isNative()) {
|
|
103704
|
+
state2.curPosition = null;
|
|
103705
|
+
return frame;
|
|
103706
|
+
}
|
|
103707
|
+
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
103708
|
+
if (source) {
|
|
103709
|
+
var line = frame.getLineNumber();
|
|
103710
|
+
var column = frame.getColumnNumber() - 1;
|
|
103711
|
+
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
|
103712
|
+
var headerLength = noHeader.test(globalProcessVersion()) ? 0 : 62;
|
|
103713
|
+
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
|
103714
|
+
column -= headerLength;
|
|
103715
|
+
}
|
|
103716
|
+
var position = mapSourcePosition({
|
|
103717
|
+
source,
|
|
103718
|
+
line,
|
|
103719
|
+
column
|
|
103720
|
+
});
|
|
103721
|
+
state2.curPosition = position;
|
|
103722
|
+
frame = cloneCallSite(frame);
|
|
103723
|
+
var originalFunctionName = frame.getFunctionName;
|
|
103724
|
+
frame.getFunctionName = function() {
|
|
103725
|
+
if (state2.nextPosition == null) {
|
|
103726
|
+
return originalFunctionName();
|
|
103727
|
+
}
|
|
103728
|
+
return state2.nextPosition.name || originalFunctionName();
|
|
103729
|
+
};
|
|
103730
|
+
frame.getFileName = function() {
|
|
103731
|
+
return position.source;
|
|
103732
|
+
};
|
|
103733
|
+
frame.getLineNumber = function() {
|
|
103734
|
+
return position.line;
|
|
103735
|
+
};
|
|
103736
|
+
frame.getColumnNumber = function() {
|
|
103737
|
+
return position.column + 1;
|
|
103738
|
+
};
|
|
103739
|
+
frame.getScriptNameOrSourceURL = function() {
|
|
103740
|
+
return position.source;
|
|
103741
|
+
};
|
|
103742
|
+
return frame;
|
|
103743
|
+
}
|
|
103744
|
+
var origin = frame.isEval() && frame.getEvalOrigin();
|
|
103745
|
+
if (origin) {
|
|
103746
|
+
origin = mapEvalOrigin(origin);
|
|
103747
|
+
frame = cloneCallSite(frame);
|
|
103748
|
+
frame.getEvalOrigin = function() {
|
|
103749
|
+
return origin;
|
|
103750
|
+
};
|
|
103751
|
+
return frame;
|
|
103752
|
+
}
|
|
103753
|
+
return frame;
|
|
103754
|
+
}
|
|
103755
|
+
function prepareStackTrace(error2, stack) {
|
|
103756
|
+
if (emptyCacheBetweenOperations) {
|
|
103757
|
+
fileContentsCache = {};
|
|
103758
|
+
sourceMapCache = {};
|
|
103759
|
+
}
|
|
103760
|
+
var name = error2.name || "Error";
|
|
103761
|
+
var message = error2.message || "";
|
|
103762
|
+
var errorString = name + ": " + message;
|
|
103763
|
+
var state2 = { nextPosition: null, curPosition: null };
|
|
103764
|
+
var processedStack = [];
|
|
103765
|
+
for (var i = stack.length - 1; i >= 0; i--) {
|
|
103766
|
+
processedStack.push("\n at " + wrapCallSite(stack[i], state2));
|
|
103767
|
+
state2.nextPosition = state2.curPosition;
|
|
103768
|
+
}
|
|
103769
|
+
state2.curPosition = state2.nextPosition = null;
|
|
103770
|
+
return errorString + processedStack.reverse().join("");
|
|
103771
|
+
}
|
|
103772
|
+
function getErrorSource(error2) {
|
|
103773
|
+
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error2.stack);
|
|
103774
|
+
if (match) {
|
|
103775
|
+
var source = match[1];
|
|
103776
|
+
var line = +match[2];
|
|
103777
|
+
var column = +match[3];
|
|
103778
|
+
var contents = fileContentsCache[source];
|
|
103779
|
+
if (!contents && fs && fs.existsSync(source)) {
|
|
103780
|
+
try {
|
|
103781
|
+
contents = fs.readFileSync(source, "utf8");
|
|
103782
|
+
} catch (er) {
|
|
103783
|
+
contents = "";
|
|
103784
|
+
}
|
|
103785
|
+
}
|
|
103786
|
+
if (contents) {
|
|
103787
|
+
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
|
103788
|
+
if (code) {
|
|
103789
|
+
return source + ":" + line + "\n" + code + "\n" + new Array(column).join(" ") + "^";
|
|
103790
|
+
}
|
|
103791
|
+
}
|
|
103792
|
+
}
|
|
103793
|
+
return null;
|
|
103794
|
+
}
|
|
103795
|
+
function printErrorAndExit(error2) {
|
|
103796
|
+
var source = getErrorSource(error2);
|
|
103797
|
+
var stderr = globalProcessStderr();
|
|
103798
|
+
if (stderr && stderr._handle && stderr._handle.setBlocking) {
|
|
103799
|
+
stderr._handle.setBlocking(true);
|
|
103800
|
+
}
|
|
103801
|
+
if (source) {
|
|
103802
|
+
console.error();
|
|
103803
|
+
console.error(source);
|
|
103804
|
+
}
|
|
103805
|
+
console.error(error2.stack);
|
|
103806
|
+
globalProcessExit(1);
|
|
103807
|
+
}
|
|
103808
|
+
function shimEmitUncaughtException() {
|
|
103809
|
+
var origEmit = process.emit;
|
|
103810
|
+
process.emit = function(type) {
|
|
103811
|
+
if (type === "uncaughtException") {
|
|
103812
|
+
var hasStack = arguments[1] && arguments[1].stack;
|
|
103813
|
+
var hasListeners = this.listeners(type).length > 0;
|
|
103814
|
+
if (hasStack && !hasListeners) {
|
|
103815
|
+
return printErrorAndExit(arguments[1]);
|
|
103816
|
+
}
|
|
103817
|
+
}
|
|
103818
|
+
return origEmit.apply(this, arguments);
|
|
103819
|
+
};
|
|
103820
|
+
}
|
|
103821
|
+
var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
|
|
103822
|
+
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
|
|
103823
|
+
exports2.wrapCallSite = wrapCallSite;
|
|
103824
|
+
exports2.getErrorSource = getErrorSource;
|
|
103825
|
+
exports2.mapSourcePosition = mapSourcePosition;
|
|
103826
|
+
exports2.retrieveSourceMap = retrieveSourceMap;
|
|
103827
|
+
exports2.install = function(options) {
|
|
103828
|
+
options = options || {};
|
|
103829
|
+
if (options.environment) {
|
|
103830
|
+
environment = options.environment;
|
|
103831
|
+
if (["node", "browser", "auto"].indexOf(environment) === -1) {
|
|
103832
|
+
throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}");
|
|
103833
|
+
}
|
|
103834
|
+
}
|
|
103835
|
+
if (options.retrieveFile) {
|
|
103836
|
+
if (options.overrideRetrieveFile) {
|
|
103837
|
+
retrieveFileHandlers.length = 0;
|
|
103838
|
+
}
|
|
103839
|
+
retrieveFileHandlers.unshift(options.retrieveFile);
|
|
103840
|
+
}
|
|
103841
|
+
if (options.retrieveSourceMap) {
|
|
103842
|
+
if (options.overrideRetrieveSourceMap) {
|
|
103843
|
+
retrieveMapHandlers.length = 0;
|
|
103844
|
+
}
|
|
103845
|
+
retrieveMapHandlers.unshift(options.retrieveSourceMap);
|
|
103846
|
+
}
|
|
103847
|
+
if (options.hookRequire && !isInBrowser()) {
|
|
103848
|
+
var Module = dynamicRequire(module2, "module");
|
|
103849
|
+
var $compile = Module.prototype._compile;
|
|
103850
|
+
if (!$compile.__sourceMapSupport) {
|
|
103851
|
+
Module.prototype._compile = function(content, filename) {
|
|
103852
|
+
fileContentsCache[filename] = content;
|
|
103853
|
+
sourceMapCache[filename] = void 0;
|
|
103854
|
+
return $compile.call(this, content, filename);
|
|
103855
|
+
};
|
|
103856
|
+
Module.prototype._compile.__sourceMapSupport = true;
|
|
103857
|
+
}
|
|
103858
|
+
}
|
|
103859
|
+
if (!emptyCacheBetweenOperations) {
|
|
103860
|
+
emptyCacheBetweenOperations = "emptyCacheBetweenOperations" in options ? options.emptyCacheBetweenOperations : false;
|
|
103861
|
+
}
|
|
103862
|
+
if (!errorFormatterInstalled) {
|
|
103863
|
+
errorFormatterInstalled = true;
|
|
103864
|
+
Error.prepareStackTrace = prepareStackTrace;
|
|
103865
|
+
}
|
|
103866
|
+
if (!uncaughtShimInstalled) {
|
|
103867
|
+
var installHandler = "handleUncaughtExceptions" in options ? options.handleUncaughtExceptions : true;
|
|
103868
|
+
try {
|
|
103869
|
+
var worker_threads = dynamicRequire(module2, "worker_threads");
|
|
103870
|
+
if (worker_threads.isMainThread === false) {
|
|
103871
|
+
installHandler = false;
|
|
103872
|
+
}
|
|
103873
|
+
} catch (e) {
|
|
103874
|
+
}
|
|
103875
|
+
if (installHandler && hasGlobalProcessEventEmitter()) {
|
|
103876
|
+
uncaughtShimInstalled = true;
|
|
103877
|
+
shimEmitUncaughtException();
|
|
103878
|
+
}
|
|
103879
|
+
}
|
|
103880
|
+
};
|
|
103881
|
+
exports2.resetRetrieveHandlers = function() {
|
|
103882
|
+
retrieveFileHandlers.length = 0;
|
|
103883
|
+
retrieveMapHandlers.length = 0;
|
|
103884
|
+
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
|
103885
|
+
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
|
|
103886
|
+
retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
103887
|
+
retrieveFile = handlerExec(retrieveFileHandlers);
|
|
103888
|
+
};
|
|
103889
|
+
}
|
|
103890
|
+
});
|
|
103891
|
+
|
|
101534
103892
|
// ../../node_modules/typescript/lib/typescript.js
|
|
101535
103893
|
var require_typescript = __commonJS({
|
|
101536
103894
|
"../../node_modules/typescript/lib/typescript.js"(exports2, module2) {
|
|
@@ -110187,7 +112545,7 @@ ${lanes.join("\n")}
|
|
|
110187
112545
|
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(arg)) || !!process.recordreplay,
|
|
110188
112546
|
tryEnableSourceMapsForHost() {
|
|
110189
112547
|
try {
|
|
110190
|
-
|
|
112548
|
+
require_source_map_support().install();
|
|
110191
112549
|
} catch {
|
|
110192
112550
|
}
|
|
110193
112551
|
},
|
|
@@ -338722,7 +341080,7 @@ var require_decoder = __commonJS({
|
|
|
338722
341080
|
});
|
|
338723
341081
|
|
|
338724
341082
|
// ../../node_modules/adm-zip/util/index.js
|
|
338725
|
-
var
|
|
341083
|
+
var require_util5 = __commonJS({
|
|
338726
341084
|
"../../node_modules/adm-zip/util/index.js"(exports2, module2) {
|
|
338727
341085
|
"use strict";
|
|
338728
341086
|
module2.exports = require_utils2();
|
|
@@ -338737,7 +341095,7 @@ var require_util4 = __commonJS({
|
|
|
338737
341095
|
var require_entryHeader = __commonJS({
|
|
338738
341096
|
"../../node_modules/adm-zip/headers/entryHeader.js"(exports2, module2) {
|
|
338739
341097
|
"use strict";
|
|
338740
|
-
var Utils =
|
|
341098
|
+
var Utils = require_util5();
|
|
338741
341099
|
var Constants = Utils.Constants;
|
|
338742
341100
|
module2.exports = function() {
|
|
338743
341101
|
var _verMade = 20, _version = 10, _flags = 0, _method = 0, _time = 0, _crc = 0, _compressedSize = 0, _size = 0, _fnameLen = 0, _extraLen = 0, _comLen = 0, _diskStart = 0, _inattr = 0, _attr = 0, _offset = 0;
|
|
@@ -339008,7 +341366,7 @@ var require_entryHeader = __commonJS({
|
|
|
339008
341366
|
var require_mainHeader = __commonJS({
|
|
339009
341367
|
"../../node_modules/adm-zip/headers/mainHeader.js"(exports2, module2) {
|
|
339010
341368
|
"use strict";
|
|
339011
|
-
var Utils =
|
|
341369
|
+
var Utils = require_util5();
|
|
339012
341370
|
var Constants = Utils.Constants;
|
|
339013
341371
|
module2.exports = function() {
|
|
339014
341372
|
var _volumeEntries = 0, _totalEntries = 0, _size = 0, _offset = 0, _commentLength = 0;
|
|
@@ -339306,7 +341664,7 @@ var require_methods = __commonJS({
|
|
|
339306
341664
|
var require_zipEntry = __commonJS({
|
|
339307
341665
|
"../../node_modules/adm-zip/zipEntry.js"(exports2, module2) {
|
|
339308
341666
|
"use strict";
|
|
339309
|
-
var Utils =
|
|
341667
|
+
var Utils = require_util5();
|
|
339310
341668
|
var Headers = require_headers3();
|
|
339311
341669
|
var Constants = Utils.Constants;
|
|
339312
341670
|
var Methods = require_methods();
|
|
@@ -339640,7 +341998,7 @@ var require_zipFile = __commonJS({
|
|
|
339640
341998
|
"use strict";
|
|
339641
341999
|
var ZipEntry = require_zipEntry();
|
|
339642
342000
|
var Headers = require_headers3();
|
|
339643
|
-
var Utils =
|
|
342001
|
+
var Utils = require_util5();
|
|
339644
342002
|
module2.exports = function(inBuffer, options) {
|
|
339645
342003
|
var entryList = [], entryTable = {}, _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader(), loadedEntries = false;
|
|
339646
342004
|
var password = null;
|
|
@@ -339985,7 +342343,7 @@ var require_zipFile = __commonJS({
|
|
|
339985
342343
|
var require_adm_zip = __commonJS({
|
|
339986
342344
|
"../../node_modules/adm-zip/adm-zip.js"(exports2, module2) {
|
|
339987
342345
|
"use strict";
|
|
339988
|
-
var Utils =
|
|
342346
|
+
var Utils = require_util5();
|
|
339989
342347
|
var pth = require("path");
|
|
339990
342348
|
var ZipEntry = require_zipEntry();
|
|
339991
342349
|
var ZipFile = require_zipFile();
|
|
@@ -351618,7 +353976,7 @@ var require_package4 = __commonJS({
|
|
|
351618
353976
|
"package.json"(exports2, module2) {
|
|
351619
353977
|
module2.exports = {
|
|
351620
353978
|
name: "@validate.qa/runner",
|
|
351621
|
-
version: "1.0.
|
|
353979
|
+
version: "1.0.88",
|
|
351622
353980
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
351623
353981
|
bin: {
|
|
351624
353982
|
"validate-runner": "dist/cli.js"
|