@coana-tech/cli 14.12.111 → 14.12.112
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/cli.mjs +1141 -1015
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +759 -758
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/javap-service/javap-service.jar +0 -0
|
@@ -32816,7 +32816,7 @@ var require_mime_types = __commonJS({
|
|
|
32816
32816
|
"../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js"(exports) {
|
|
32817
32817
|
"use strict";
|
|
32818
32818
|
var db = require_mime_db();
|
|
32819
|
-
var
|
|
32819
|
+
var extname5 = __require("path").extname;
|
|
32820
32820
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
32821
32821
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
32822
32822
|
exports.charset = charset;
|
|
@@ -32870,7 +32870,7 @@ var require_mime_types = __commonJS({
|
|
|
32870
32870
|
if (!path10 || typeof path10 !== "string") {
|
|
32871
32871
|
return false;
|
|
32872
32872
|
}
|
|
32873
|
-
var extension2 =
|
|
32873
|
+
var extension2 = extname5("x." + path10).toLowerCase().substr(1);
|
|
32874
32874
|
if (!extension2) {
|
|
32875
32875
|
return false;
|
|
32876
32876
|
}
|
|
@@ -35531,8 +35531,8 @@ var require_follow_redirects = __commonJS({
|
|
|
35531
35531
|
}
|
|
35532
35532
|
return parsed;
|
|
35533
35533
|
}
|
|
35534
|
-
function resolveUrl(
|
|
35535
|
-
return useNativeURL ? new URL3(
|
|
35534
|
+
function resolveUrl(relative11, base) {
|
|
35535
|
+
return useNativeURL ? new URL3(relative11, base) : parseUrl(url3.resolve(base, relative11));
|
|
35536
35536
|
}
|
|
35537
35537
|
function validateUrl(input) {
|
|
35538
35538
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -54971,7 +54971,7 @@ var require_old = __commonJS({
|
|
|
54971
54971
|
if (cache) cache[original] = p;
|
|
54972
54972
|
return p;
|
|
54973
54973
|
};
|
|
54974
|
-
exports.realpath = function
|
|
54974
|
+
exports.realpath = function realpath3(p, cache, cb) {
|
|
54975
54975
|
if (typeof cb !== "function") {
|
|
54976
54976
|
cb = maybeCallback(cache);
|
|
54977
54977
|
cache = null;
|
|
@@ -55059,12 +55059,12 @@ var require_old = __commonJS({
|
|
|
55059
55059
|
// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js
|
|
55060
55060
|
var require_fs = __commonJS({
|
|
55061
55061
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports, module) {
|
|
55062
|
-
module.exports =
|
|
55063
|
-
|
|
55064
|
-
|
|
55065
|
-
|
|
55066
|
-
|
|
55067
|
-
|
|
55062
|
+
module.exports = realpath3;
|
|
55063
|
+
realpath3.realpath = realpath3;
|
|
55064
|
+
realpath3.sync = realpathSync2;
|
|
55065
|
+
realpath3.realpathSync = realpathSync2;
|
|
55066
|
+
realpath3.monkeypatch = monkeypatch;
|
|
55067
|
+
realpath3.unmonkeypatch = unmonkeypatch;
|
|
55068
55068
|
var fs12 = __require("fs");
|
|
55069
55069
|
var origRealpath = fs12.realpath;
|
|
55070
55070
|
var origRealpathSync = fs12.realpathSync;
|
|
@@ -55074,7 +55074,7 @@ var require_fs = __commonJS({
|
|
|
55074
55074
|
function newError(er) {
|
|
55075
55075
|
return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
|
|
55076
55076
|
}
|
|
55077
|
-
function
|
|
55077
|
+
function realpath3(p, cache, cb) {
|
|
55078
55078
|
if (ok) {
|
|
55079
55079
|
return origRealpath(p, cache, cb);
|
|
55080
55080
|
}
|
|
@@ -55105,7 +55105,7 @@ var require_fs = __commonJS({
|
|
|
55105
55105
|
}
|
|
55106
55106
|
}
|
|
55107
55107
|
function monkeypatch() {
|
|
55108
|
-
fs12.realpath =
|
|
55108
|
+
fs12.realpath = realpath3;
|
|
55109
55109
|
fs12.realpathSync = realpathSync2;
|
|
55110
55110
|
}
|
|
55111
55111
|
function unmonkeypatch() {
|
|
@@ -56302,18 +56302,18 @@ var require_sync = __commonJS({
|
|
|
56302
56302
|
if (this.follow)
|
|
56303
56303
|
return this._readdir(abs, false);
|
|
56304
56304
|
var entries;
|
|
56305
|
-
var
|
|
56305
|
+
var lstat3;
|
|
56306
56306
|
var stat3;
|
|
56307
56307
|
try {
|
|
56308
|
-
|
|
56308
|
+
lstat3 = this.fs.lstatSync(abs);
|
|
56309
56309
|
} catch (er) {
|
|
56310
56310
|
if (er.code === "ENOENT") {
|
|
56311
56311
|
return null;
|
|
56312
56312
|
}
|
|
56313
56313
|
}
|
|
56314
|
-
var isSym =
|
|
56314
|
+
var isSym = lstat3 && lstat3.isSymbolicLink();
|
|
56315
56315
|
this.symlinks[abs] = isSym;
|
|
56316
|
-
if (!isSym &&
|
|
56316
|
+
if (!isSym && lstat3 && !lstat3.isDirectory())
|
|
56317
56317
|
this.cache[abs] = "FILE";
|
|
56318
56318
|
else
|
|
56319
56319
|
entries = this._readdir(abs, false);
|
|
@@ -56440,23 +56440,23 @@ var require_sync = __commonJS({
|
|
|
56440
56440
|
var exists2;
|
|
56441
56441
|
var stat3 = this.statCache[abs];
|
|
56442
56442
|
if (!stat3) {
|
|
56443
|
-
var
|
|
56443
|
+
var lstat3;
|
|
56444
56444
|
try {
|
|
56445
|
-
|
|
56445
|
+
lstat3 = this.fs.lstatSync(abs);
|
|
56446
56446
|
} catch (er) {
|
|
56447
56447
|
if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
|
|
56448
56448
|
this.statCache[abs] = false;
|
|
56449
56449
|
return false;
|
|
56450
56450
|
}
|
|
56451
56451
|
}
|
|
56452
|
-
if (
|
|
56452
|
+
if (lstat3 && lstat3.isSymbolicLink()) {
|
|
56453
56453
|
try {
|
|
56454
56454
|
stat3 = this.fs.statSync(abs);
|
|
56455
56455
|
} catch (er) {
|
|
56456
|
-
stat3 =
|
|
56456
|
+
stat3 = lstat3;
|
|
56457
56457
|
}
|
|
56458
56458
|
} else {
|
|
56459
|
-
stat3 =
|
|
56459
|
+
stat3 = lstat3;
|
|
56460
56460
|
}
|
|
56461
56461
|
}
|
|
56462
56462
|
this.statCache[abs] = stat3;
|
|
@@ -56945,12 +56945,12 @@ var require_glob = __commonJS({
|
|
|
56945
56945
|
var lstatcb = inflight(lstatkey, lstatcb_);
|
|
56946
56946
|
if (lstatcb)
|
|
56947
56947
|
self2.fs.lstat(abs, lstatcb);
|
|
56948
|
-
function lstatcb_(er,
|
|
56948
|
+
function lstatcb_(er, lstat3) {
|
|
56949
56949
|
if (er && er.code === "ENOENT")
|
|
56950
56950
|
return cb();
|
|
56951
|
-
var isSym =
|
|
56951
|
+
var isSym = lstat3 && lstat3.isSymbolicLink();
|
|
56952
56952
|
self2.symlinks[abs] = isSym;
|
|
56953
|
-
if (!isSym &&
|
|
56953
|
+
if (!isSym && lstat3 && !lstat3.isDirectory()) {
|
|
56954
56954
|
self2.cache[abs] = "FILE";
|
|
56955
56955
|
cb();
|
|
56956
56956
|
} else
|
|
@@ -57120,16 +57120,16 @@ var require_glob = __commonJS({
|
|
|
57120
57120
|
var statcb = inflight("stat\0" + abs, lstatcb_);
|
|
57121
57121
|
if (statcb)
|
|
57122
57122
|
self2.fs.lstat(abs, statcb);
|
|
57123
|
-
function lstatcb_(er,
|
|
57124
|
-
if (
|
|
57123
|
+
function lstatcb_(er, lstat3) {
|
|
57124
|
+
if (lstat3 && lstat3.isSymbolicLink()) {
|
|
57125
57125
|
return self2.fs.stat(abs, function(er2, stat4) {
|
|
57126
57126
|
if (er2)
|
|
57127
|
-
self2._stat2(f2, abs, null,
|
|
57127
|
+
self2._stat2(f2, abs, null, lstat3, cb);
|
|
57128
57128
|
else
|
|
57129
57129
|
self2._stat2(f2, abs, er2, stat4, cb);
|
|
57130
57130
|
});
|
|
57131
57131
|
} else {
|
|
57132
|
-
self2._stat2(f2, abs, er,
|
|
57132
|
+
self2._stat2(f2, abs, er, lstat3, cb);
|
|
57133
57133
|
}
|
|
57134
57134
|
}
|
|
57135
57135
|
};
|
|
@@ -66931,8 +66931,8 @@ var require_code_point_iterator = __commonJS({
|
|
|
66931
66931
|
getLocFromIndex(index2) {
|
|
66932
66932
|
return this.locs.getLocFromIndex(index2);
|
|
66933
66933
|
}
|
|
66934
|
-
eat(
|
|
66935
|
-
if (this.text.codePointAt(this.end) ===
|
|
66934
|
+
eat(cp8) {
|
|
66935
|
+
if (this.text.codePointAt(this.end) === cp8) {
|
|
66936
66936
|
this.next();
|
|
66937
66937
|
return true;
|
|
66938
66938
|
}
|
|
@@ -66941,23 +66941,23 @@ var require_code_point_iterator = __commonJS({
|
|
|
66941
66941
|
moveAt(offset) {
|
|
66942
66942
|
var _a2;
|
|
66943
66943
|
this.start = this.end = offset;
|
|
66944
|
-
const
|
|
66945
|
-
if (
|
|
66944
|
+
const cp8 = (_a2 = this.text.codePointAt(this.start)) !== null && _a2 !== void 0 ? _a2 : -1;
|
|
66945
|
+
if (cp8 === -1) {
|
|
66946
66946
|
this.end = this.start;
|
|
66947
|
-
return
|
|
66947
|
+
return cp8;
|
|
66948
66948
|
}
|
|
66949
|
-
const shift =
|
|
66949
|
+
const shift = cp8 >= 65536 ? 2 : 1;
|
|
66950
66950
|
this.end += shift;
|
|
66951
|
-
if (
|
|
66951
|
+
if (cp8 === 10) {
|
|
66952
66952
|
this.locs.addOffset(this.end);
|
|
66953
|
-
} else if (
|
|
66953
|
+
} else if (cp8 === 13) {
|
|
66954
66954
|
if (this.text.codePointAt(this.end) === 10) {
|
|
66955
66955
|
this.end++;
|
|
66956
66956
|
this.locs.addOffset(this.end);
|
|
66957
66957
|
}
|
|
66958
66958
|
return 10;
|
|
66959
66959
|
}
|
|
66960
|
-
return
|
|
66960
|
+
return cp8;
|
|
66961
66961
|
}
|
|
66962
66962
|
};
|
|
66963
66963
|
exports.CodePointIterator = CodePointIterator;
|
|
@@ -66970,50 +66970,50 @@ var require_code_point = __commonJS({
|
|
|
66970
66970
|
"use strict";
|
|
66971
66971
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66972
66972
|
exports.isUnicodeScalarValue = exports.isLowSurrogate = exports.isHighSurrogate = exports.isOctalDig = exports.isHexDig = exports.isDigit = exports.isLetter = exports.isEOL = exports.isWhitespace = exports.isControl = void 0;
|
|
66973
|
-
function isControl(
|
|
66974
|
-
return
|
|
66973
|
+
function isControl(cp8) {
|
|
66974
|
+
return cp8 >= 0 && cp8 <= 31;
|
|
66975
66975
|
}
|
|
66976
66976
|
exports.isControl = isControl;
|
|
66977
|
-
function isWhitespace3(
|
|
66978
|
-
return
|
|
66977
|
+
function isWhitespace3(cp8) {
|
|
66978
|
+
return cp8 === 9 || cp8 === 32;
|
|
66979
66979
|
}
|
|
66980
66980
|
exports.isWhitespace = isWhitespace3;
|
|
66981
|
-
function isEOL(
|
|
66982
|
-
return
|
|
66981
|
+
function isEOL(cp8) {
|
|
66982
|
+
return cp8 === 10 || cp8 === 13;
|
|
66983
66983
|
}
|
|
66984
66984
|
exports.isEOL = isEOL;
|
|
66985
|
-
function isUpperLetter(
|
|
66986
|
-
return
|
|
66985
|
+
function isUpperLetter(cp8) {
|
|
66986
|
+
return cp8 >= 65 && cp8 <= 90;
|
|
66987
66987
|
}
|
|
66988
|
-
function isLowerLetter(
|
|
66989
|
-
return
|
|
66988
|
+
function isLowerLetter(cp8) {
|
|
66989
|
+
return cp8 >= 97 && cp8 <= 122;
|
|
66990
66990
|
}
|
|
66991
|
-
function isLetter(
|
|
66992
|
-
return isLowerLetter(
|
|
66991
|
+
function isLetter(cp8) {
|
|
66992
|
+
return isLowerLetter(cp8) || isUpperLetter(cp8);
|
|
66993
66993
|
}
|
|
66994
66994
|
exports.isLetter = isLetter;
|
|
66995
|
-
function isDigit(
|
|
66996
|
-
return
|
|
66995
|
+
function isDigit(cp8) {
|
|
66996
|
+
return cp8 >= 48 && cp8 <= 57;
|
|
66997
66997
|
}
|
|
66998
66998
|
exports.isDigit = isDigit;
|
|
66999
|
-
function isHexDig(
|
|
67000
|
-
return isDigit(
|
|
66999
|
+
function isHexDig(cp8) {
|
|
67000
|
+
return isDigit(cp8) || cp8 >= 97 && cp8 <= 102 || cp8 >= 65 && cp8 <= 70;
|
|
67001
67001
|
}
|
|
67002
67002
|
exports.isHexDig = isHexDig;
|
|
67003
|
-
function isOctalDig(
|
|
67004
|
-
return
|
|
67003
|
+
function isOctalDig(cp8) {
|
|
67004
|
+
return cp8 >= 48 && cp8 <= 55;
|
|
67005
67005
|
}
|
|
67006
67006
|
exports.isOctalDig = isOctalDig;
|
|
67007
|
-
function isHighSurrogate(
|
|
67008
|
-
return
|
|
67007
|
+
function isHighSurrogate(cp8) {
|
|
67008
|
+
return cp8 >= 55296 && cp8 <= 57343;
|
|
67009
67009
|
}
|
|
67010
67010
|
exports.isHighSurrogate = isHighSurrogate;
|
|
67011
|
-
function isLowSurrogate(
|
|
67012
|
-
return
|
|
67011
|
+
function isLowSurrogate(cp8) {
|
|
67012
|
+
return cp8 >= 56320 && cp8 <= 57343;
|
|
67013
67013
|
}
|
|
67014
67014
|
exports.isLowSurrogate = isLowSurrogate;
|
|
67015
|
-
function isUnicodeScalarValue(
|
|
67016
|
-
return
|
|
67015
|
+
function isUnicodeScalarValue(cp8) {
|
|
67016
|
+
return cp8 >= 0 && cp8 <= 55295 || cp8 >= 57344 && cp8 <= 1114111;
|
|
67017
67017
|
}
|
|
67018
67018
|
exports.isUnicodeScalarValue = isUnicodeScalarValue;
|
|
67019
67019
|
}
|
|
@@ -67121,10 +67121,10 @@ var require_tokenizer = __commonJS({
|
|
|
67121
67121
|
this.token = null;
|
|
67122
67122
|
return token;
|
|
67123
67123
|
}
|
|
67124
|
-
let
|
|
67125
|
-
while (
|
|
67126
|
-
|
|
67127
|
-
const nextState = this[this.state](
|
|
67124
|
+
let cp8 = this.lastCodePoint;
|
|
67125
|
+
while (cp8 !== -1 && !this.token) {
|
|
67126
|
+
cp8 = this.nextCode();
|
|
67127
|
+
const nextState = this[this.state](cp8);
|
|
67128
67128
|
if (!nextState) {
|
|
67129
67129
|
throw new Error(`Unknown error: pre state=${this.state}`);
|
|
67130
67130
|
}
|
|
@@ -67150,18 +67150,18 @@ var require_tokenizer = __commonJS({
|
|
|
67150
67150
|
/**
|
|
67151
67151
|
* Eat the next code point.
|
|
67152
67152
|
*/
|
|
67153
|
-
eatCode(
|
|
67153
|
+
eatCode(cp8) {
|
|
67154
67154
|
if (this.lastCodePoint === -1) {
|
|
67155
67155
|
return false;
|
|
67156
67156
|
}
|
|
67157
67157
|
if (this.backCode) {
|
|
67158
|
-
if (this.lastCodePoint ===
|
|
67158
|
+
if (this.lastCodePoint === cp8) {
|
|
67159
67159
|
this.backCode = false;
|
|
67160
67160
|
return true;
|
|
67161
67161
|
}
|
|
67162
67162
|
return false;
|
|
67163
67163
|
}
|
|
67164
|
-
return this.codePointIterator.eat(
|
|
67164
|
+
return this.codePointIterator.eat(cp8);
|
|
67165
67165
|
}
|
|
67166
67166
|
/**
|
|
67167
67167
|
* Moves the character position to the given position.
|
|
@@ -67260,61 +67260,61 @@ var require_tokenizer = __commonJS({
|
|
|
67260
67260
|
this.token = token;
|
|
67261
67261
|
}
|
|
67262
67262
|
}
|
|
67263
|
-
DATA(
|
|
67264
|
-
while ((0, code_point_1.isWhitespace)(
|
|
67265
|
-
|
|
67263
|
+
DATA(cp8) {
|
|
67264
|
+
while ((0, code_point_1.isWhitespace)(cp8) || (0, code_point_1.isEOL)(cp8)) {
|
|
67265
|
+
cp8 = this.nextCode();
|
|
67266
67266
|
}
|
|
67267
|
-
if (
|
|
67267
|
+
if (cp8 === 35) {
|
|
67268
67268
|
this.startToken();
|
|
67269
67269
|
return "COMMENT";
|
|
67270
67270
|
}
|
|
67271
|
-
if (
|
|
67271
|
+
if (cp8 === 34) {
|
|
67272
67272
|
this.startToken();
|
|
67273
67273
|
return "BASIC_STRING";
|
|
67274
67274
|
}
|
|
67275
|
-
if (
|
|
67275
|
+
if (cp8 === 39) {
|
|
67276
67276
|
this.startToken();
|
|
67277
67277
|
return "LITERAL_STRING";
|
|
67278
67278
|
}
|
|
67279
|
-
if (
|
|
67280
|
-
|
|
67281
|
-
|
|
67282
|
-
|
|
67283
|
-
|
|
67284
|
-
|
|
67285
|
-
|
|
67279
|
+
if (cp8 === 46 || // .
|
|
67280
|
+
cp8 === 61 || // =
|
|
67281
|
+
cp8 === 91 || // [
|
|
67282
|
+
cp8 === 93 || // ]
|
|
67283
|
+
cp8 === 123 || // {
|
|
67284
|
+
cp8 === 125 || // }
|
|
67285
|
+
cp8 === 44) {
|
|
67286
67286
|
this.punctuatorToken();
|
|
67287
67287
|
return "DATA";
|
|
67288
67288
|
}
|
|
67289
67289
|
if (this.valuesEnabled) {
|
|
67290
|
-
if (
|
|
67290
|
+
if (cp8 === 45 || cp8 === 43) {
|
|
67291
67291
|
this.startToken();
|
|
67292
67292
|
return "SIGN";
|
|
67293
67293
|
}
|
|
67294
|
-
if (
|
|
67294
|
+
if (cp8 === 110 || cp8 === 105) {
|
|
67295
67295
|
this.startToken();
|
|
67296
67296
|
return this.back("NAN_OR_INF");
|
|
67297
67297
|
}
|
|
67298
|
-
if ((0, code_point_1.isDigit)(
|
|
67298
|
+
if ((0, code_point_1.isDigit)(cp8)) {
|
|
67299
67299
|
this.startToken();
|
|
67300
67300
|
return this.back("NUMBER");
|
|
67301
67301
|
}
|
|
67302
|
-
if (
|
|
67302
|
+
if (cp8 === 116 || cp8 === 102) {
|
|
67303
67303
|
this.startToken();
|
|
67304
67304
|
return this.back("BOOLEAN");
|
|
67305
67305
|
}
|
|
67306
67306
|
} else {
|
|
67307
|
-
if (isUnquotedKeyChar(
|
|
67307
|
+
if (isUnquotedKeyChar(cp8, this.tomlVersion)) {
|
|
67308
67308
|
this.startToken();
|
|
67309
67309
|
return "BARE";
|
|
67310
67310
|
}
|
|
67311
67311
|
}
|
|
67312
|
-
if (
|
|
67312
|
+
if (cp8 === -1) {
|
|
67313
67313
|
return "DATA";
|
|
67314
67314
|
}
|
|
67315
67315
|
return this.reportParseError("unexpected-char");
|
|
67316
67316
|
}
|
|
67317
|
-
COMMENT(
|
|
67317
|
+
COMMENT(cp8) {
|
|
67318
67318
|
const processCommentChar = this.tomlVersion.gte(1, 1) ? (c) => {
|
|
67319
67319
|
if (!isAllowedCommentCharacter(c)) {
|
|
67320
67320
|
this.reportParseError("invalid-comment-character");
|
|
@@ -67324,78 +67324,78 @@ var require_tokenizer = __commonJS({
|
|
|
67324
67324
|
this.reportParseErrorControlChar();
|
|
67325
67325
|
}
|
|
67326
67326
|
};
|
|
67327
|
-
while (!(0, code_point_1.isEOL)(
|
|
67328
|
-
processCommentChar(
|
|
67329
|
-
|
|
67327
|
+
while (!(0, code_point_1.isEOL)(cp8) && cp8 !== -1) {
|
|
67328
|
+
processCommentChar(cp8);
|
|
67329
|
+
cp8 = this.nextCode();
|
|
67330
67330
|
}
|
|
67331
67331
|
this.endToken("Block", "start");
|
|
67332
67332
|
return "DATA";
|
|
67333
67333
|
}
|
|
67334
|
-
BARE(
|
|
67335
|
-
while (isUnquotedKeyChar(
|
|
67336
|
-
|
|
67334
|
+
BARE(cp8) {
|
|
67335
|
+
while (isUnquotedKeyChar(cp8, this.tomlVersion)) {
|
|
67336
|
+
cp8 = this.nextCode();
|
|
67337
67337
|
}
|
|
67338
67338
|
this.endToken("Bare", "start");
|
|
67339
67339
|
return this.back("DATA");
|
|
67340
67340
|
}
|
|
67341
|
-
BASIC_STRING(
|
|
67342
|
-
if (
|
|
67343
|
-
|
|
67344
|
-
if (
|
|
67341
|
+
BASIC_STRING(cp8) {
|
|
67342
|
+
if (cp8 === 34) {
|
|
67343
|
+
cp8 = this.nextCode();
|
|
67344
|
+
if (cp8 === 34) {
|
|
67345
67345
|
return "MULTI_LINE_BASIC_STRING";
|
|
67346
67346
|
}
|
|
67347
67347
|
this.endToken("BasicString", "start", "");
|
|
67348
67348
|
return this.back("DATA");
|
|
67349
67349
|
}
|
|
67350
67350
|
const out = [];
|
|
67351
|
-
while (
|
|
67352
|
-
if (isControlOtherThanTab(
|
|
67351
|
+
while (cp8 !== 34 && cp8 !== -1 && cp8 !== 10) {
|
|
67352
|
+
if (isControlOtherThanTab(cp8)) {
|
|
67353
67353
|
return this.reportParseErrorControlChar();
|
|
67354
67354
|
}
|
|
67355
|
-
if (
|
|
67356
|
-
|
|
67357
|
-
const ecp = this.ESCAPES[
|
|
67355
|
+
if (cp8 === 92) {
|
|
67356
|
+
cp8 = this.nextCode();
|
|
67357
|
+
const ecp = this.ESCAPES[cp8];
|
|
67358
67358
|
if (ecp) {
|
|
67359
67359
|
out.push(ecp);
|
|
67360
|
-
|
|
67360
|
+
cp8 = this.nextCode();
|
|
67361
67361
|
continue;
|
|
67362
|
-
} else if (
|
|
67362
|
+
} else if (cp8 === 117) {
|
|
67363
67363
|
const code2 = this.parseUnicode(4);
|
|
67364
67364
|
out.push(code2);
|
|
67365
|
-
|
|
67365
|
+
cp8 = this.nextCode();
|
|
67366
67366
|
continue;
|
|
67367
|
-
} else if (
|
|
67367
|
+
} else if (cp8 === 85) {
|
|
67368
67368
|
const code2 = this.parseUnicode(8);
|
|
67369
67369
|
out.push(code2);
|
|
67370
|
-
|
|
67370
|
+
cp8 = this.nextCode();
|
|
67371
67371
|
continue;
|
|
67372
|
-
} else if (
|
|
67372
|
+
} else if (cp8 === 120 && this.tomlVersion.gte(1, 1)) {
|
|
67373
67373
|
const code2 = this.parseUnicode(2);
|
|
67374
67374
|
out.push(code2);
|
|
67375
|
-
|
|
67375
|
+
cp8 = this.nextCode();
|
|
67376
67376
|
continue;
|
|
67377
67377
|
}
|
|
67378
67378
|
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
67379
67379
|
}
|
|
67380
|
-
out.push(
|
|
67381
|
-
|
|
67380
|
+
out.push(cp8);
|
|
67381
|
+
cp8 = this.nextCode();
|
|
67382
67382
|
}
|
|
67383
|
-
if (
|
|
67383
|
+
if (cp8 !== 34) {
|
|
67384
67384
|
return this.reportParseError("unterminated-string");
|
|
67385
67385
|
}
|
|
67386
67386
|
this.endToken("BasicString", "end", String.fromCodePoint(...out));
|
|
67387
67387
|
return "DATA";
|
|
67388
67388
|
}
|
|
67389
|
-
MULTI_LINE_BASIC_STRING(
|
|
67389
|
+
MULTI_LINE_BASIC_STRING(cp8) {
|
|
67390
67390
|
const out = [];
|
|
67391
|
-
if (
|
|
67392
|
-
|
|
67391
|
+
if (cp8 === 10) {
|
|
67392
|
+
cp8 = this.nextCode();
|
|
67393
67393
|
}
|
|
67394
|
-
while (
|
|
67395
|
-
if (
|
|
67394
|
+
while (cp8 !== -1) {
|
|
67395
|
+
if (cp8 !== 10 && isControlOtherThanTab(cp8)) {
|
|
67396
67396
|
return this.reportParseErrorControlChar();
|
|
67397
67397
|
}
|
|
67398
|
-
if (
|
|
67398
|
+
if (cp8 === 34) {
|
|
67399
67399
|
const startPos = this.codePointIterator.start;
|
|
67400
67400
|
if (this.eatCode(
|
|
67401
67401
|
34
|
|
@@ -67434,35 +67434,35 @@ var require_tokenizer = __commonJS({
|
|
|
67434
67434
|
}
|
|
67435
67435
|
this.moveAt(startPos);
|
|
67436
67436
|
}
|
|
67437
|
-
if (
|
|
67438
|
-
|
|
67439
|
-
const ecp = this.ESCAPES[
|
|
67437
|
+
if (cp8 === 92) {
|
|
67438
|
+
cp8 = this.nextCode();
|
|
67439
|
+
const ecp = this.ESCAPES[cp8];
|
|
67440
67440
|
if (ecp) {
|
|
67441
67441
|
out.push(ecp);
|
|
67442
|
-
|
|
67442
|
+
cp8 = this.nextCode();
|
|
67443
67443
|
continue;
|
|
67444
|
-
} else if (
|
|
67444
|
+
} else if (cp8 === 117) {
|
|
67445
67445
|
const code2 = this.parseUnicode(4);
|
|
67446
67446
|
out.push(code2);
|
|
67447
|
-
|
|
67447
|
+
cp8 = this.nextCode();
|
|
67448
67448
|
continue;
|
|
67449
|
-
} else if (
|
|
67449
|
+
} else if (cp8 === 85) {
|
|
67450
67450
|
const code2 = this.parseUnicode(8);
|
|
67451
67451
|
out.push(code2);
|
|
67452
|
-
|
|
67452
|
+
cp8 = this.nextCode();
|
|
67453
67453
|
continue;
|
|
67454
|
-
} else if (
|
|
67454
|
+
} else if (cp8 === 120 && this.tomlVersion.gte(1, 1)) {
|
|
67455
67455
|
const code2 = this.parseUnicode(2);
|
|
67456
67456
|
out.push(code2);
|
|
67457
|
-
|
|
67457
|
+
cp8 = this.nextCode();
|
|
67458
67458
|
continue;
|
|
67459
|
-
} else if (
|
|
67460
|
-
|
|
67461
|
-
while ((0, code_point_1.isWhitespace)(
|
|
67462
|
-
|
|
67459
|
+
} else if (cp8 === 10) {
|
|
67460
|
+
cp8 = this.nextCode();
|
|
67461
|
+
while ((0, code_point_1.isWhitespace)(cp8) || cp8 === 10) {
|
|
67462
|
+
cp8 = this.nextCode();
|
|
67463
67463
|
}
|
|
67464
67464
|
continue;
|
|
67465
|
-
} else if ((0, code_point_1.isWhitespace)(
|
|
67465
|
+
} else if ((0, code_point_1.isWhitespace)(cp8)) {
|
|
67466
67466
|
let valid = true;
|
|
67467
67467
|
const startPos = this.codePointIterator.start;
|
|
67468
67468
|
let nextCp;
|
|
@@ -67477,53 +67477,53 @@ var require_tokenizer = __commonJS({
|
|
|
67477
67477
|
}
|
|
67478
67478
|
}
|
|
67479
67479
|
if (valid) {
|
|
67480
|
-
|
|
67481
|
-
while ((0, code_point_1.isWhitespace)(
|
|
67482
|
-
|
|
67480
|
+
cp8 = this.nextCode();
|
|
67481
|
+
while ((0, code_point_1.isWhitespace)(cp8) || cp8 === 10) {
|
|
67482
|
+
cp8 = this.nextCode();
|
|
67483
67483
|
}
|
|
67484
67484
|
continue;
|
|
67485
67485
|
}
|
|
67486
67486
|
}
|
|
67487
67487
|
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
67488
67488
|
}
|
|
67489
|
-
out.push(
|
|
67490
|
-
|
|
67489
|
+
out.push(cp8);
|
|
67490
|
+
cp8 = this.nextCode();
|
|
67491
67491
|
}
|
|
67492
67492
|
return this.reportParseError("unterminated-string");
|
|
67493
67493
|
}
|
|
67494
|
-
LITERAL_STRING(
|
|
67495
|
-
if (
|
|
67496
|
-
|
|
67497
|
-
if (
|
|
67494
|
+
LITERAL_STRING(cp8) {
|
|
67495
|
+
if (cp8 === 39) {
|
|
67496
|
+
cp8 = this.nextCode();
|
|
67497
|
+
if (cp8 === 39) {
|
|
67498
67498
|
return "MULTI_LINE_LITERAL_STRING";
|
|
67499
67499
|
}
|
|
67500
67500
|
this.endToken("LiteralString", "start", "");
|
|
67501
67501
|
return this.back("DATA");
|
|
67502
67502
|
}
|
|
67503
67503
|
const out = [];
|
|
67504
|
-
while (
|
|
67505
|
-
if (isControlOtherThanTab(
|
|
67504
|
+
while (cp8 !== 39 && cp8 !== -1 && cp8 !== 10) {
|
|
67505
|
+
if (isControlOtherThanTab(cp8)) {
|
|
67506
67506
|
return this.reportParseErrorControlChar();
|
|
67507
67507
|
}
|
|
67508
|
-
out.push(
|
|
67509
|
-
|
|
67508
|
+
out.push(cp8);
|
|
67509
|
+
cp8 = this.nextCode();
|
|
67510
67510
|
}
|
|
67511
|
-
if (
|
|
67511
|
+
if (cp8 !== 39) {
|
|
67512
67512
|
return this.reportParseError("unterminated-string");
|
|
67513
67513
|
}
|
|
67514
67514
|
this.endToken("LiteralString", "end", String.fromCodePoint(...out));
|
|
67515
67515
|
return "DATA";
|
|
67516
67516
|
}
|
|
67517
|
-
MULTI_LINE_LITERAL_STRING(
|
|
67517
|
+
MULTI_LINE_LITERAL_STRING(cp8) {
|
|
67518
67518
|
const out = [];
|
|
67519
|
-
if (
|
|
67520
|
-
|
|
67519
|
+
if (cp8 === 10) {
|
|
67520
|
+
cp8 = this.nextCode();
|
|
67521
67521
|
}
|
|
67522
|
-
while (
|
|
67523
|
-
if (
|
|
67522
|
+
while (cp8 !== -1) {
|
|
67523
|
+
if (cp8 !== 10 && isControlOtherThanTab(cp8)) {
|
|
67524
67524
|
return this.reportParseErrorControlChar();
|
|
67525
67525
|
}
|
|
67526
|
-
if (
|
|
67526
|
+
if (cp8 === 39) {
|
|
67527
67527
|
const startPos = this.codePointIterator.start;
|
|
67528
67528
|
if (this.eatCode(
|
|
67529
67529
|
39
|
|
@@ -67562,22 +67562,22 @@ var require_tokenizer = __commonJS({
|
|
|
67562
67562
|
}
|
|
67563
67563
|
this.moveAt(startPos);
|
|
67564
67564
|
}
|
|
67565
|
-
out.push(
|
|
67566
|
-
|
|
67565
|
+
out.push(cp8);
|
|
67566
|
+
cp8 = this.nextCode();
|
|
67567
67567
|
}
|
|
67568
67568
|
return this.reportParseError("unterminated-string");
|
|
67569
67569
|
}
|
|
67570
|
-
SIGN(
|
|
67571
|
-
if (
|
|
67570
|
+
SIGN(cp8) {
|
|
67571
|
+
if (cp8 === 110 || cp8 === 105) {
|
|
67572
67572
|
return this.back("NAN_OR_INF");
|
|
67573
67573
|
}
|
|
67574
|
-
if ((0, code_point_1.isDigit)(
|
|
67574
|
+
if ((0, code_point_1.isDigit)(cp8)) {
|
|
67575
67575
|
return this.back("NUMBER");
|
|
67576
67576
|
}
|
|
67577
67577
|
return this.reportParseError("unexpected-char");
|
|
67578
67578
|
}
|
|
67579
|
-
NAN_OR_INF(
|
|
67580
|
-
if (
|
|
67579
|
+
NAN_OR_INF(cp8) {
|
|
67580
|
+
if (cp8 === 110) {
|
|
67581
67581
|
const startPos = this.codePointIterator.start;
|
|
67582
67582
|
if (this.eatCode(
|
|
67583
67583
|
97
|
|
@@ -67590,7 +67590,7 @@ var require_tokenizer = __commonJS({
|
|
|
67590
67590
|
return "DATA";
|
|
67591
67591
|
}
|
|
67592
67592
|
this.moveAt(startPos);
|
|
67593
|
-
} else if (
|
|
67593
|
+
} else if (cp8 === 105) {
|
|
67594
67594
|
const startPos = this.codePointIterator.start;
|
|
67595
67595
|
if (this.eatCode(
|
|
67596
67596
|
110
|
|
@@ -67606,10 +67606,10 @@ var require_tokenizer = __commonJS({
|
|
|
67606
67606
|
}
|
|
67607
67607
|
return this.reportParseError("unexpected-char");
|
|
67608
67608
|
}
|
|
67609
|
-
NUMBER(
|
|
67609
|
+
NUMBER(cp8) {
|
|
67610
67610
|
const start = this.text[this.tokenStart];
|
|
67611
67611
|
const sign = start === "+" ? 43 : start === "-" ? 45 : 0;
|
|
67612
|
-
if (
|
|
67612
|
+
if (cp8 === 48) {
|
|
67613
67613
|
if (sign === 0) {
|
|
67614
67614
|
const startPos = this.codePointIterator.start;
|
|
67615
67615
|
const nextCp2 = this.nextCode();
|
|
@@ -67652,14 +67652,14 @@ var require_tokenizer = __commonJS({
|
|
|
67652
67652
|
}
|
|
67653
67653
|
this.moveAt(startPos);
|
|
67654
67654
|
}
|
|
67655
|
-
|
|
67656
|
-
if (
|
|
67655
|
+
cp8 = this.nextCode();
|
|
67656
|
+
if (cp8 === 120 || cp8 === 111 || cp8 === 98) {
|
|
67657
67657
|
if (sign !== 0) {
|
|
67658
67658
|
return this.reportParseError("unexpected-char");
|
|
67659
67659
|
}
|
|
67660
|
-
return
|
|
67660
|
+
return cp8 === 120 ? "HEX" : cp8 === 111 ? "OCTAL" : "BINARY";
|
|
67661
67661
|
}
|
|
67662
|
-
if (
|
|
67662
|
+
if (cp8 === 101 || cp8 === 69) {
|
|
67663
67663
|
const data2 = {
|
|
67664
67664
|
// Float values -0.0 and +0.0 are valid and should map according to IEEE 754.
|
|
67665
67665
|
minus: sign === 45,
|
|
@@ -67671,7 +67671,7 @@ var require_tokenizer = __commonJS({
|
|
|
67671
67671
|
this.data = data2;
|
|
67672
67672
|
return "EXPONENT_RIGHT";
|
|
67673
67673
|
}
|
|
67674
|
-
if (
|
|
67674
|
+
if (cp8 === 46) {
|
|
67675
67675
|
const data2 = {
|
|
67676
67676
|
minus: sign === 45,
|
|
67677
67677
|
absInt: [
|
|
@@ -67685,7 +67685,7 @@ var require_tokenizer = __commonJS({
|
|
|
67685
67685
|
this.endToken("Integer", "start", "0", 10);
|
|
67686
67686
|
return this.back("DATA");
|
|
67687
67687
|
}
|
|
67688
|
-
const { out, nextCp, hasUnderscore } = this.parseDigits(
|
|
67688
|
+
const { out, nextCp, hasUnderscore } = this.parseDigits(cp8, code_point_1.isDigit);
|
|
67689
67689
|
if (nextCp === 45 && sign === 0 && !hasUnderscore && out.length === 4) {
|
|
67690
67690
|
const data2 = {
|
|
67691
67691
|
hasDate: true,
|
|
@@ -67731,28 +67731,28 @@ var require_tokenizer = __commonJS({
|
|
|
67731
67731
|
this.endToken("Integer", "start", sign === 45 ? String.fromCodePoint(45, ...out) : String.fromCodePoint(...out), 10);
|
|
67732
67732
|
return this.back("DATA");
|
|
67733
67733
|
}
|
|
67734
|
-
HEX(
|
|
67735
|
-
const { out } = this.parseDigits(
|
|
67734
|
+
HEX(cp8) {
|
|
67735
|
+
const { out } = this.parseDigits(cp8, code_point_1.isHexDig);
|
|
67736
67736
|
this.endToken("Integer", "start", String.fromCodePoint(...out), 16);
|
|
67737
67737
|
return this.back("DATA");
|
|
67738
67738
|
}
|
|
67739
|
-
OCTAL(
|
|
67740
|
-
const { out } = this.parseDigits(
|
|
67739
|
+
OCTAL(cp8) {
|
|
67740
|
+
const { out } = this.parseDigits(cp8, code_point_1.isOctalDig);
|
|
67741
67741
|
this.endToken("Integer", "start", String.fromCodePoint(...out), 8);
|
|
67742
67742
|
return this.back("DATA");
|
|
67743
67743
|
}
|
|
67744
|
-
BINARY(
|
|
67744
|
+
BINARY(cp8) {
|
|
67745
67745
|
const { out } = this.parseDigits(
|
|
67746
|
-
|
|
67746
|
+
cp8,
|
|
67747
67747
|
(c) => c === 48 || c === 49
|
|
67748
67748
|
/* CodePoint.DIGIT_1 */
|
|
67749
67749
|
);
|
|
67750
67750
|
this.endToken("Integer", "start", String.fromCodePoint(...out), 2);
|
|
67751
67751
|
return this.back("DATA");
|
|
67752
67752
|
}
|
|
67753
|
-
FRACTIONAL_RIGHT(
|
|
67753
|
+
FRACTIONAL_RIGHT(cp8) {
|
|
67754
67754
|
const { minus, absInt } = this.data;
|
|
67755
|
-
const { out, nextCp } = this.parseDigits(
|
|
67755
|
+
const { out, nextCp } = this.parseDigits(cp8, code_point_1.isDigit);
|
|
67756
67756
|
const absNum = [...absInt, 46, ...out];
|
|
67757
67757
|
if (nextCp === 101 || nextCp === 69) {
|
|
67758
67758
|
const data2 = {
|
|
@@ -67766,14 +67766,14 @@ var require_tokenizer = __commonJS({
|
|
|
67766
67766
|
this.endToken("Float", "start", value2);
|
|
67767
67767
|
return this.back("DATA");
|
|
67768
67768
|
}
|
|
67769
|
-
EXPONENT_RIGHT(
|
|
67769
|
+
EXPONENT_RIGHT(cp8) {
|
|
67770
67770
|
const { left, minus: leftMinus } = this.data;
|
|
67771
67771
|
let minus = false;
|
|
67772
|
-
if (
|
|
67773
|
-
minus =
|
|
67774
|
-
|
|
67772
|
+
if (cp8 === 45 || cp8 === 43) {
|
|
67773
|
+
minus = cp8 === 45;
|
|
67774
|
+
cp8 = this.nextCode();
|
|
67775
67775
|
}
|
|
67776
|
-
const { out } = this.parseDigits(
|
|
67776
|
+
const { out } = this.parseDigits(cp8, code_point_1.isDigit);
|
|
67777
67777
|
const right = out;
|
|
67778
67778
|
if (minus) {
|
|
67779
67779
|
right.unshift(
|
|
@@ -67785,8 +67785,8 @@ var require_tokenizer = __commonJS({
|
|
|
67785
67785
|
this.endToken("Float", "start", value2);
|
|
67786
67786
|
return this.back("DATA");
|
|
67787
67787
|
}
|
|
67788
|
-
BOOLEAN(
|
|
67789
|
-
if (
|
|
67788
|
+
BOOLEAN(cp8) {
|
|
67789
|
+
if (cp8 === 116) {
|
|
67790
67790
|
const startPos = this.codePointIterator.start;
|
|
67791
67791
|
if (this.eatCode(
|
|
67792
67792
|
114
|
|
@@ -67802,7 +67802,7 @@ var require_tokenizer = __commonJS({
|
|
|
67802
67802
|
return "DATA";
|
|
67803
67803
|
}
|
|
67804
67804
|
this.moveAt(startPos);
|
|
67805
|
-
} else if (
|
|
67805
|
+
} else if (cp8 === 102) {
|
|
67806
67806
|
const startPos = this.codePointIterator.start;
|
|
67807
67807
|
if (this.eatCode(
|
|
67808
67808
|
97
|
|
@@ -67824,17 +67824,17 @@ var require_tokenizer = __commonJS({
|
|
|
67824
67824
|
}
|
|
67825
67825
|
return this.reportParseError("unexpected-char");
|
|
67826
67826
|
}
|
|
67827
|
-
DATE_MONTH(
|
|
67827
|
+
DATE_MONTH(cp8) {
|
|
67828
67828
|
const start = this.codePointIterator.start;
|
|
67829
|
-
if (!(0, code_point_1.isDigit)(
|
|
67829
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67830
67830
|
return this.reportParseError("unexpected-char");
|
|
67831
67831
|
}
|
|
67832
|
-
|
|
67833
|
-
if (!(0, code_point_1.isDigit)(
|
|
67832
|
+
cp8 = this.nextCode();
|
|
67833
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67834
67834
|
return this.reportParseError("unexpected-char");
|
|
67835
67835
|
}
|
|
67836
|
-
|
|
67837
|
-
if (
|
|
67836
|
+
cp8 = this.nextCode();
|
|
67837
|
+
if (cp8 !== 45) {
|
|
67838
67838
|
return this.reportParseError("unexpected-char");
|
|
67839
67839
|
}
|
|
67840
67840
|
const end2 = this.codePointIterator.start;
|
|
@@ -67842,13 +67842,13 @@ var require_tokenizer = __commonJS({
|
|
|
67842
67842
|
data2.month = Number(this.text.slice(start, end2));
|
|
67843
67843
|
return "DATE_DAY";
|
|
67844
67844
|
}
|
|
67845
|
-
DATE_DAY(
|
|
67845
|
+
DATE_DAY(cp8) {
|
|
67846
67846
|
const start = this.codePointIterator.start;
|
|
67847
|
-
if (!(0, code_point_1.isDigit)(
|
|
67847
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67848
67848
|
return this.reportParseError("unexpected-char");
|
|
67849
67849
|
}
|
|
67850
|
-
|
|
67851
|
-
if (!(0, code_point_1.isDigit)(
|
|
67850
|
+
cp8 = this.nextCode();
|
|
67851
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67852
67852
|
return this.reportParseError("unexpected-char");
|
|
67853
67853
|
}
|
|
67854
67854
|
const end2 = this.codePointIterator.end;
|
|
@@ -67857,11 +67857,11 @@ var require_tokenizer = __commonJS({
|
|
|
67857
67857
|
if (!isValidDate(data2.year, data2.month, data2.day)) {
|
|
67858
67858
|
return this.reportParseError("invalid-date");
|
|
67859
67859
|
}
|
|
67860
|
-
|
|
67861
|
-
if (
|
|
67860
|
+
cp8 = this.nextCode();
|
|
67861
|
+
if (cp8 === 84 || cp8 === 116) {
|
|
67862
67862
|
return "TIME_HOUR";
|
|
67863
67863
|
}
|
|
67864
|
-
if (
|
|
67864
|
+
if (cp8 === 32) {
|
|
67865
67865
|
const startPos = this.codePointIterator.start;
|
|
67866
67866
|
if ((0, code_point_1.isDigit)(this.nextCode()) && (0, code_point_1.isDigit)(this.nextCode())) {
|
|
67867
67867
|
this.moveAt(startPos);
|
|
@@ -67873,17 +67873,17 @@ var require_tokenizer = __commonJS({
|
|
|
67873
67873
|
this.endToken("LocalDate", "start", dateValue);
|
|
67874
67874
|
return this.back("DATA");
|
|
67875
67875
|
}
|
|
67876
|
-
TIME_HOUR(
|
|
67876
|
+
TIME_HOUR(cp8) {
|
|
67877
67877
|
const start = this.codePointIterator.start;
|
|
67878
|
-
if (!(0, code_point_1.isDigit)(
|
|
67878
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67879
67879
|
return this.reportParseError("unexpected-char");
|
|
67880
67880
|
}
|
|
67881
|
-
|
|
67882
|
-
if (!(0, code_point_1.isDigit)(
|
|
67881
|
+
cp8 = this.nextCode();
|
|
67882
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67883
67883
|
return this.reportParseError("unexpected-char");
|
|
67884
67884
|
}
|
|
67885
|
-
|
|
67886
|
-
if (
|
|
67885
|
+
cp8 = this.nextCode();
|
|
67886
|
+
if (cp8 !== 58) {
|
|
67887
67887
|
return this.reportParseError("unexpected-char");
|
|
67888
67888
|
}
|
|
67889
67889
|
const end2 = this.codePointIterator.start;
|
|
@@ -67891,20 +67891,20 @@ var require_tokenizer = __commonJS({
|
|
|
67891
67891
|
data2.hour = Number(this.text.slice(start, end2));
|
|
67892
67892
|
return "TIME_MINUTE";
|
|
67893
67893
|
}
|
|
67894
|
-
TIME_MINUTE(
|
|
67894
|
+
TIME_MINUTE(cp8) {
|
|
67895
67895
|
const start = this.codePointIterator.start;
|
|
67896
|
-
if (!(0, code_point_1.isDigit)(
|
|
67896
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67897
67897
|
return this.reportParseError("unexpected-char");
|
|
67898
67898
|
}
|
|
67899
|
-
|
|
67900
|
-
if (!(0, code_point_1.isDigit)(
|
|
67899
|
+
cp8 = this.nextCode();
|
|
67900
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67901
67901
|
return this.reportParseError("unexpected-char");
|
|
67902
67902
|
}
|
|
67903
67903
|
const end2 = this.codePointIterator.end;
|
|
67904
67904
|
const data2 = this.data;
|
|
67905
67905
|
data2.minute = Number(this.text.slice(start, end2));
|
|
67906
|
-
|
|
67907
|
-
if (
|
|
67906
|
+
cp8 = this.nextCode();
|
|
67907
|
+
if (cp8 === 58) {
|
|
67908
67908
|
return "TIME_SECOND";
|
|
67909
67909
|
}
|
|
67910
67910
|
if (this.tomlVersion.lt(1, 1)) {
|
|
@@ -67913,15 +67913,15 @@ var require_tokenizer = __commonJS({
|
|
|
67913
67913
|
if (!isValidTime(data2.hour, data2.minute, data2.second)) {
|
|
67914
67914
|
return this.reportParseError("invalid-time");
|
|
67915
67915
|
}
|
|
67916
|
-
return this.processTimeEnd(
|
|
67916
|
+
return this.processTimeEnd(cp8, data2);
|
|
67917
67917
|
}
|
|
67918
|
-
TIME_SECOND(
|
|
67918
|
+
TIME_SECOND(cp8) {
|
|
67919
67919
|
const start = this.codePointIterator.start;
|
|
67920
|
-
if (!(0, code_point_1.isDigit)(
|
|
67920
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67921
67921
|
return this.reportParseError("unexpected-char");
|
|
67922
67922
|
}
|
|
67923
|
-
|
|
67924
|
-
if (!(0, code_point_1.isDigit)(
|
|
67923
|
+
cp8 = this.nextCode();
|
|
67924
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67925
67925
|
return this.reportParseError("unexpected-char");
|
|
67926
67926
|
}
|
|
67927
67927
|
const end2 = this.codePointIterator.end;
|
|
@@ -67930,32 +67930,32 @@ var require_tokenizer = __commonJS({
|
|
|
67930
67930
|
if (!isValidTime(data2.hour, data2.minute, data2.second)) {
|
|
67931
67931
|
return this.reportParseError("invalid-time");
|
|
67932
67932
|
}
|
|
67933
|
-
|
|
67934
|
-
if (
|
|
67933
|
+
cp8 = this.nextCode();
|
|
67934
|
+
if (cp8 === 46) {
|
|
67935
67935
|
return "TIME_SEC_FRAC";
|
|
67936
67936
|
}
|
|
67937
|
-
return this.processTimeEnd(
|
|
67937
|
+
return this.processTimeEnd(cp8, data2);
|
|
67938
67938
|
}
|
|
67939
|
-
TIME_SEC_FRAC(
|
|
67940
|
-
if (!(0, code_point_1.isDigit)(
|
|
67939
|
+
TIME_SEC_FRAC(cp8) {
|
|
67940
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67941
67941
|
return this.reportParseError("unexpected-char");
|
|
67942
67942
|
}
|
|
67943
67943
|
const start = this.codePointIterator.start;
|
|
67944
|
-
while ((0, code_point_1.isDigit)(
|
|
67945
|
-
|
|
67944
|
+
while ((0, code_point_1.isDigit)(cp8)) {
|
|
67945
|
+
cp8 = this.nextCode();
|
|
67946
67946
|
}
|
|
67947
67947
|
const end2 = this.codePointIterator.start;
|
|
67948
67948
|
const data2 = this.data;
|
|
67949
67949
|
data2.frac = this.text.slice(start, end2);
|
|
67950
|
-
return this.processTimeEnd(
|
|
67950
|
+
return this.processTimeEnd(cp8, data2);
|
|
67951
67951
|
}
|
|
67952
|
-
processTimeEnd(
|
|
67952
|
+
processTimeEnd(cp8, data2) {
|
|
67953
67953
|
if (data2.hasDate) {
|
|
67954
|
-
if (
|
|
67955
|
-
data2.offsetSign =
|
|
67954
|
+
if (cp8 === 45 || cp8 === 43) {
|
|
67955
|
+
data2.offsetSign = cp8;
|
|
67956
67956
|
return "TIME_OFFSET";
|
|
67957
67957
|
}
|
|
67958
|
-
if (
|
|
67958
|
+
if (cp8 === 90 || cp8 === 122) {
|
|
67959
67959
|
const dateValue3 = getDateFromDateTimeData(data2, "Z");
|
|
67960
67960
|
this.endToken("OffsetDateTime", "end", dateValue3);
|
|
67961
67961
|
return "DATA";
|
|
@@ -67968,27 +67968,27 @@ var require_tokenizer = __commonJS({
|
|
|
67968
67968
|
this.endToken("LocalTime", "start", dateValue);
|
|
67969
67969
|
return this.back("DATA");
|
|
67970
67970
|
}
|
|
67971
|
-
TIME_OFFSET(
|
|
67972
|
-
if (!(0, code_point_1.isDigit)(
|
|
67971
|
+
TIME_OFFSET(cp8) {
|
|
67972
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67973
67973
|
return this.reportParseError("unexpected-char");
|
|
67974
67974
|
}
|
|
67975
67975
|
const hourStart = this.codePointIterator.start;
|
|
67976
|
-
|
|
67977
|
-
if (!(0, code_point_1.isDigit)(
|
|
67976
|
+
cp8 = this.nextCode();
|
|
67977
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67978
67978
|
return this.reportParseError("unexpected-char");
|
|
67979
67979
|
}
|
|
67980
|
-
|
|
67981
|
-
if (
|
|
67980
|
+
cp8 = this.nextCode();
|
|
67981
|
+
if (cp8 !== 58) {
|
|
67982
67982
|
return this.reportParseError("unexpected-char");
|
|
67983
67983
|
}
|
|
67984
67984
|
const hourEnd = this.codePointIterator.start;
|
|
67985
|
-
|
|
67985
|
+
cp8 = this.nextCode();
|
|
67986
67986
|
const minuteStart = this.codePointIterator.start;
|
|
67987
|
-
if (!(0, code_point_1.isDigit)(
|
|
67987
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67988
67988
|
return this.reportParseError("unexpected-char");
|
|
67989
67989
|
}
|
|
67990
|
-
|
|
67991
|
-
if (!(0, code_point_1.isDigit)(
|
|
67990
|
+
cp8 = this.nextCode();
|
|
67991
|
+
if (!(0, code_point_1.isDigit)(cp8)) {
|
|
67992
67992
|
return this.reportParseError("unexpected-char");
|
|
67993
67993
|
}
|
|
67994
67994
|
const minuteEnd = this.codePointIterator.end;
|
|
@@ -68002,34 +68002,34 @@ var require_tokenizer = __commonJS({
|
|
|
68002
68002
|
this.endToken("OffsetDateTime", "end", dateValue);
|
|
68003
68003
|
return "DATA";
|
|
68004
68004
|
}
|
|
68005
|
-
parseDigits(
|
|
68006
|
-
if (
|
|
68005
|
+
parseDigits(cp8, checkDigit) {
|
|
68006
|
+
if (cp8 === 95) {
|
|
68007
68007
|
return this.reportParseError("invalid-underscore");
|
|
68008
68008
|
}
|
|
68009
|
-
if (!checkDigit(
|
|
68009
|
+
if (!checkDigit(cp8)) {
|
|
68010
68010
|
return this.reportParseError("unexpected-char");
|
|
68011
68011
|
}
|
|
68012
68012
|
const out = [];
|
|
68013
68013
|
let before2 = 0;
|
|
68014
68014
|
let hasUnderscore = false;
|
|
68015
|
-
while (checkDigit(
|
|
68016
|
-
if (
|
|
68015
|
+
while (checkDigit(cp8) || cp8 === 95) {
|
|
68016
|
+
if (cp8 === 95) {
|
|
68017
68017
|
hasUnderscore = true;
|
|
68018
68018
|
if (before2 === 95) {
|
|
68019
68019
|
return this.reportParseError("invalid-underscore");
|
|
68020
68020
|
}
|
|
68021
68021
|
} else {
|
|
68022
|
-
out.push(
|
|
68022
|
+
out.push(cp8);
|
|
68023
68023
|
}
|
|
68024
|
-
before2 =
|
|
68025
|
-
|
|
68024
|
+
before2 = cp8;
|
|
68025
|
+
cp8 = this.nextCode();
|
|
68026
68026
|
}
|
|
68027
68027
|
if (before2 === 95) {
|
|
68028
68028
|
return this.reportParseError("invalid-underscore");
|
|
68029
68029
|
}
|
|
68030
68030
|
return {
|
|
68031
68031
|
out,
|
|
68032
|
-
nextCp:
|
|
68032
|
+
nextCp: cp8,
|
|
68033
68033
|
hasUnderscore
|
|
68034
68034
|
};
|
|
68035
68035
|
}
|
|
@@ -68037,9 +68037,9 @@ var require_tokenizer = __commonJS({
|
|
|
68037
68037
|
const startLoc = this.codePointIterator.start;
|
|
68038
68038
|
const start = this.codePointIterator.end;
|
|
68039
68039
|
let charCount = 0;
|
|
68040
|
-
let
|
|
68041
|
-
while ((
|
|
68042
|
-
if (!(0, code_point_1.isHexDig)(
|
|
68040
|
+
let cp8;
|
|
68041
|
+
while ((cp8 = this.nextCode()) !== -1) {
|
|
68042
|
+
if (!(0, code_point_1.isHexDig)(cp8)) {
|
|
68043
68043
|
this.moveAt(startLoc);
|
|
68044
68044
|
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
68045
68045
|
}
|
|
@@ -68061,47 +68061,47 @@ var require_tokenizer = __commonJS({
|
|
|
68061
68061
|
}
|
|
68062
68062
|
};
|
|
68063
68063
|
exports.Tokenizer = Tokenizer3;
|
|
68064
|
-
function isUnquotedKeyChar(
|
|
68065
|
-
if ((0, code_point_1.isLetter)(
|
|
68064
|
+
function isUnquotedKeyChar(cp8, tomlVersion) {
|
|
68065
|
+
if ((0, code_point_1.isLetter)(cp8) || (0, code_point_1.isDigit)(cp8) || cp8 === 95 || cp8 === 45) {
|
|
68066
68066
|
return true;
|
|
68067
68067
|
}
|
|
68068
68068
|
if (tomlVersion.lt(1, 1)) {
|
|
68069
68069
|
return false;
|
|
68070
68070
|
}
|
|
68071
|
-
if (
|
|
68071
|
+
if (cp8 === 178 || cp8 === 179 || cp8 === 185 || 188 <= cp8 && cp8 <= 190) {
|
|
68072
68072
|
return true;
|
|
68073
68073
|
}
|
|
68074
|
-
if (192 <=
|
|
68074
|
+
if (192 <= cp8 && cp8 <= 214 || 216 <= cp8 && cp8 <= 246 || 248 <= cp8 && cp8 <= 891) {
|
|
68075
68075
|
return true;
|
|
68076
68076
|
}
|
|
68077
|
-
if (895 <=
|
|
68077
|
+
if (895 <= cp8 && cp8 <= 8191) {
|
|
68078
68078
|
return true;
|
|
68079
68079
|
}
|
|
68080
|
-
if (8204 <=
|
|
68080
|
+
if (8204 <= cp8 && cp8 <= 8205 || 8255 <= cp8 && cp8 <= 8256) {
|
|
68081
68081
|
return true;
|
|
68082
68082
|
}
|
|
68083
|
-
if (8304 <=
|
|
68083
|
+
if (8304 <= cp8 && cp8 <= 8591 || 9312 <= cp8 && cp8 <= 9471) {
|
|
68084
68084
|
return true;
|
|
68085
68085
|
}
|
|
68086
|
-
if (11264 <=
|
|
68086
|
+
if (11264 <= cp8 && cp8 <= 12271 || 12289 <= cp8 && cp8 <= 55295) {
|
|
68087
68087
|
return true;
|
|
68088
68088
|
}
|
|
68089
|
-
if (63744 <=
|
|
68089
|
+
if (63744 <= cp8 && cp8 <= 64975 || 65008 <= cp8 && cp8 <= 65533) {
|
|
68090
68090
|
return true;
|
|
68091
68091
|
}
|
|
68092
|
-
if (65536 <=
|
|
68092
|
+
if (65536 <= cp8 && cp8 <= 983039) {
|
|
68093
68093
|
return true;
|
|
68094
68094
|
}
|
|
68095
68095
|
return false;
|
|
68096
68096
|
}
|
|
68097
|
-
function isControlOtherThanTab(
|
|
68098
|
-
return (0, code_point_1.isControl)(
|
|
68097
|
+
function isControlOtherThanTab(cp8) {
|
|
68098
|
+
return (0, code_point_1.isControl)(cp8) && cp8 !== 9 || cp8 === 127;
|
|
68099
68099
|
}
|
|
68100
|
-
function isAllowedCommentCharacter(
|
|
68101
|
-
return 1 <=
|
|
68100
|
+
function isAllowedCommentCharacter(cp8) {
|
|
68101
|
+
return 1 <= cp8 && cp8 <= 9 || 14 <= cp8 && cp8 <= 127 || isNonAscii(cp8);
|
|
68102
68102
|
}
|
|
68103
|
-
function isNonAscii(
|
|
68104
|
-
return 128 <=
|
|
68103
|
+
function isNonAscii(cp8) {
|
|
68104
|
+
return 128 <= cp8 && cp8 <= 55295 || 57344 <= cp8 && cp8 <= 1114111;
|
|
68105
68105
|
}
|
|
68106
68106
|
function isValidDate(y3, m, d) {
|
|
68107
68107
|
if (y3 >= 0 && m <= 12 && m >= 1 && d >= 1) {
|
|
@@ -73096,8 +73096,8 @@ var require_adm_zip = __commonJS({
|
|
|
73096
73096
|
return null;
|
|
73097
73097
|
}
|
|
73098
73098
|
function fixPath(zipPath) {
|
|
73099
|
-
const { join: join18, normalize: normalize3, sep:
|
|
73100
|
-
return join18(".", normalize3(
|
|
73099
|
+
const { join: join18, normalize: normalize3, sep: sep6 } = pth.posix;
|
|
73100
|
+
return join18(".", normalize3(sep6 + zipPath.split("\\").join(sep6) + sep6));
|
|
73101
73101
|
}
|
|
73102
73102
|
function filenameFilter(filterfn) {
|
|
73103
73103
|
if (filterfn instanceof RegExp) {
|
|
@@ -74016,21 +74016,21 @@ var require_syntax2 = __commonJS({
|
|
|
74016
74016
|
quot: '"'
|
|
74017
74017
|
}));
|
|
74018
74018
|
function isNameChar(char) {
|
|
74019
|
-
let
|
|
74020
|
-
return
|
|
74019
|
+
let cp8 = char.codePointAt(0);
|
|
74020
|
+
return cp8 >= 97 && cp8 <= 122 || cp8 >= 65 && cp8 <= 90 || cp8 >= 48 && cp8 <= 57 || cp8 === 45 || cp8 === 46 || cp8 === 183 || cp8 >= 768 && cp8 <= 879 || cp8 === 8255 || cp8 === 8256 || isNameStartChar(char, cp8);
|
|
74021
74021
|
}
|
|
74022
|
-
function isNameStartChar(char,
|
|
74023
|
-
return
|
|
74022
|
+
function isNameStartChar(char, cp8 = char.codePointAt(0)) {
|
|
74023
|
+
return cp8 >= 97 && cp8 <= 122 || cp8 >= 65 && cp8 <= 90 || cp8 === 58 || cp8 === 95 || cp8 >= 192 && cp8 <= 214 || cp8 >= 216 && cp8 <= 246 || cp8 >= 248 && cp8 <= 767 || cp8 >= 880 && cp8 <= 893 || cp8 >= 895 && cp8 <= 8191 || cp8 === 8204 || cp8 === 8205 || cp8 >= 8304 && cp8 <= 8591 || cp8 >= 11264 && cp8 <= 12271 || cp8 >= 12289 && cp8 <= 55295 || cp8 >= 63744 && cp8 <= 64975 || cp8 >= 65008 && cp8 <= 65533 || cp8 >= 65536 && cp8 <= 983039;
|
|
74024
74024
|
}
|
|
74025
74025
|
function isReferenceChar(char) {
|
|
74026
74026
|
return char === "#" || isNameChar(char);
|
|
74027
74027
|
}
|
|
74028
74028
|
function isWhitespace3(char) {
|
|
74029
|
-
let
|
|
74030
|
-
return
|
|
74029
|
+
let cp8 = char.codePointAt(0);
|
|
74030
|
+
return cp8 === 32 || cp8 === 9 || cp8 === 10 || cp8 === 13;
|
|
74031
74031
|
}
|
|
74032
|
-
function isXmlCodePoint(
|
|
74033
|
-
return
|
|
74032
|
+
function isXmlCodePoint(cp8) {
|
|
74033
|
+
return cp8 >= 32 && cp8 <= 55295 || cp8 === 10 || cp8 === 9 || cp8 === 13 || cp8 >= 57344 && cp8 <= 65533 || cp8 >= 65536 && cp8 <= 1114111;
|
|
74034
74034
|
}
|
|
74035
74035
|
}
|
|
74036
74036
|
});
|
|
@@ -75034,12 +75034,12 @@ var require_Parser = __commonJS({
|
|
|
75034
75034
|
validateChars(string) {
|
|
75035
75035
|
let { length } = string;
|
|
75036
75036
|
for (let i3 = 0; i3 < length; ++i3) {
|
|
75037
|
-
let
|
|
75038
|
-
if (!syntax.isXmlCodePoint(
|
|
75037
|
+
let cp8 = string.codePointAt(i3);
|
|
75038
|
+
if (!syntax.isXmlCodePoint(cp8)) {
|
|
75039
75039
|
this.scanner.reset(-([...string].length - i3));
|
|
75040
75040
|
throw this.error("Invalid character");
|
|
75041
75041
|
}
|
|
75042
|
-
if (
|
|
75042
|
+
if (cp8 > 65535) {
|
|
75043
75043
|
i3 += 1;
|
|
75044
75044
|
}
|
|
75045
75045
|
}
|
|
@@ -80059,7 +80059,7 @@ function deserializeRustDependencyChainNode(s2) {
|
|
|
80059
80059
|
|
|
80060
80060
|
// dist/main.js
|
|
80061
80061
|
var import_lodash22 = __toESM(require_lodash(), 1);
|
|
80062
|
-
import { relative as
|
|
80062
|
+
import { relative as relative10, resolve as resolve23 } from "path";
|
|
80063
80063
|
|
|
80064
80064
|
// ../utils/src/dashboard-api/coana-api.ts
|
|
80065
80065
|
import { writeFile } from "fs/promises";
|
|
@@ -85851,7 +85851,7 @@ var PathScurryBase = class {
|
|
|
85851
85851
|
*
|
|
85852
85852
|
* @internal
|
|
85853
85853
|
*/
|
|
85854
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
85854
|
+
constructor(cwd = process.cwd(), pathImpl, sep6, { nocase, childrenCacheSize = 16 * 1024, fs: fs12 = defaultFS } = {}) {
|
|
85855
85855
|
this.#fs = fsFromOption(fs12);
|
|
85856
85856
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
85857
85857
|
cwd = fileURLToPath(cwd);
|
|
@@ -85862,7 +85862,7 @@ var PathScurryBase = class {
|
|
|
85862
85862
|
this.#resolveCache = new ResolveCache();
|
|
85863
85863
|
this.#resolvePosixCache = new ResolveCache();
|
|
85864
85864
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
85865
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
85865
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep6);
|
|
85866
85866
|
if (split.length === 1 && !split[0]) {
|
|
85867
85867
|
split.pop();
|
|
85868
85868
|
}
|
|
@@ -86683,10 +86683,10 @@ var Ignore = class {
|
|
|
86683
86683
|
ignored(p) {
|
|
86684
86684
|
const fullpath = p.fullpath();
|
|
86685
86685
|
const fullpaths = `${fullpath}/`;
|
|
86686
|
-
const
|
|
86687
|
-
const relatives = `${
|
|
86686
|
+
const relative11 = p.relative() || ".";
|
|
86687
|
+
const relatives = `${relative11}/`;
|
|
86688
86688
|
for (const m of this.relative) {
|
|
86689
|
-
if (m.match(
|
|
86689
|
+
if (m.match(relative11) || m.match(relatives))
|
|
86690
86690
|
return true;
|
|
86691
86691
|
}
|
|
86692
86692
|
for (const m of this.absolute) {
|
|
@@ -86697,9 +86697,9 @@ var Ignore = class {
|
|
|
86697
86697
|
}
|
|
86698
86698
|
childrenIgnored(p) {
|
|
86699
86699
|
const fullpath = p.fullpath() + "/";
|
|
86700
|
-
const
|
|
86700
|
+
const relative11 = (p.relative() || ".") + "/";
|
|
86701
86701
|
for (const m of this.relativeChildren) {
|
|
86702
|
-
if (m.match(
|
|
86702
|
+
if (m.match(relative11))
|
|
86703
86703
|
return true;
|
|
86704
86704
|
}
|
|
86705
86705
|
for (const m of this.absoluteChildren) {
|
|
@@ -87522,7 +87522,7 @@ glob.glob = glob;
|
|
|
87522
87522
|
var import_lodash17 = __toESM(require_lodash(), 1);
|
|
87523
87523
|
var import_semver4 = __toESM(require_semver2(), 1);
|
|
87524
87524
|
import assert7 from "assert";
|
|
87525
|
-
import { relative as
|
|
87525
|
+
import { relative as relative8 } from "path";
|
|
87526
87526
|
|
|
87527
87527
|
// ../utils/src/promise-queue.ts
|
|
87528
87528
|
var PromiseQueue = class {
|
|
@@ -88043,8 +88043,8 @@ var import_lodash14 = __toESM(require_lodash(), 1);
|
|
|
88043
88043
|
var import_semver3 = __toESM(require_semver2(), 1);
|
|
88044
88044
|
import assert5 from "assert";
|
|
88045
88045
|
import { existsSync as existsSync12 } from "fs";
|
|
88046
|
-
import { cp as
|
|
88047
|
-
import { basename as basename11, dirname as dirname15, join as join16, resolve as resolve18, sep as
|
|
88046
|
+
import { cp as cp7, readdir as readdir4, readFile as readFile11, rm as rm5 } from "fs/promises";
|
|
88047
|
+
import { basename as basename11, dirname as dirname15, join as join16, resolve as resolve18, sep as sep5 } from "path";
|
|
88048
88048
|
import util5 from "util";
|
|
88049
88049
|
|
|
88050
88050
|
// ../utils/src/constants.ts
|
|
@@ -88144,9 +88144,9 @@ async function findFilesInPythonProjectMatching(projectDir, fileMatcher, maxDept
|
|
|
88144
88144
|
}
|
|
88145
88145
|
|
|
88146
88146
|
// ../utils/src/tmp-file.ts
|
|
88147
|
-
import { rm, mkdtemp as mkdtemp2 } from "fs/promises";
|
|
88147
|
+
import { rm, mkdtemp as mkdtemp2, cp as cp3, lstat as lstat2 } from "fs/promises";
|
|
88148
88148
|
import { tmpdir } from "os";
|
|
88149
|
-
import { join as join8 } from "path";
|
|
88149
|
+
import { join as join8, relative as relative5, sep as sep2, extname } from "path";
|
|
88150
88150
|
async function createTmpDirectory(prefix) {
|
|
88151
88151
|
try {
|
|
88152
88152
|
const tmpDir = await mkdtemp2(join8(tmpdir(), prefix));
|
|
@@ -88281,7 +88281,7 @@ import { resolve as resolve17 } from "path";
|
|
|
88281
88281
|
// dist/whole-program-code-aware-vulnerability-scanner/dotnet/dotnet-code-aware-vulnerability-scanner.js
|
|
88282
88282
|
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
88283
88283
|
import { existsSync as existsSync6 } from "node:fs";
|
|
88284
|
-
import { basename as basename7, dirname as dirname10, extname as
|
|
88284
|
+
import { basename as basename7, dirname as dirname10, extname as extname3, resolve as resolve10 } from "node:path";
|
|
88285
88285
|
|
|
88286
88286
|
// ../utils/src/nuget-utils.ts
|
|
88287
88287
|
function getUrlForPackage(packageName, version3) {
|
|
@@ -88293,7 +88293,7 @@ function getUrlForPackage(packageName, version3) {
|
|
|
88293
88293
|
// ../utils/src/tool-extractor.ts
|
|
88294
88294
|
import { createHash } from "node:crypto";
|
|
88295
88295
|
import { createReadStream, createWriteStream as createWriteStream2, readFileSync as readFileSync2, statSync as statSync3 } from "node:fs";
|
|
88296
|
-
import { copyFile as copyFile2, cp as
|
|
88296
|
+
import { copyFile as copyFile2, cp as cp4, mkdir as mkdir4, writeFile as writeFile3 } from "node:fs/promises";
|
|
88297
88297
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
88298
88298
|
import { basename as basename5, dirname as dirname8, join as join10 } from "node:path";
|
|
88299
88299
|
import { pipeline } from "node:stream/promises";
|
|
@@ -93553,7 +93553,7 @@ async function extractTool(toolName, resourcePath) {
|
|
|
93553
93553
|
}
|
|
93554
93554
|
const stats = statSync3(sourcePath);
|
|
93555
93555
|
if (stats.isDirectory()) {
|
|
93556
|
-
await
|
|
93556
|
+
await cp4(sourcePath, extractedPath, { recursive: true });
|
|
93557
93557
|
} else if (stats.isFile()) {
|
|
93558
93558
|
const fileName2 = basename5(sourcePath);
|
|
93559
93559
|
const destFile = join10(extractedPath, fileName2);
|
|
@@ -93620,7 +93620,7 @@ function getClassGraphAnalysisCliPath() {
|
|
|
93620
93620
|
// ../utils/src/nuget-project-utils.ts
|
|
93621
93621
|
var import_parse_xml2 = __toESM(require_dist(), 1);
|
|
93622
93622
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
93623
|
-
import { dirname as dirname9, join as join11, relative as
|
|
93623
|
+
import { dirname as dirname9, join as join11, relative as relative6, resolve as resolve9, basename as basename6, extname as extname2 } from "node:path";
|
|
93624
93624
|
|
|
93625
93625
|
// ../utils/src/xml-utils.ts
|
|
93626
93626
|
var import_parse_xml = __toESM(require_dist(), 1);
|
|
@@ -95307,7 +95307,7 @@ async function loadNuGetProjectOrTarget(rootDir, projectFile, mainProject, visit
|
|
|
95307
95307
|
});
|
|
95308
95308
|
currentProject.sourceFiles.push(...files);
|
|
95309
95309
|
} catch (err) {
|
|
95310
|
-
logger.debug(`Failed to glob default pattern for ${
|
|
95310
|
+
logger.debug(`Failed to glob default pattern for ${relative6(rootDir, validatedProjectPath)}: ${err}`);
|
|
95311
95311
|
}
|
|
95312
95312
|
}
|
|
95313
95313
|
mainProject ??= currentProject;
|
|
@@ -95391,10 +95391,10 @@ function addReservedMSBuildProperties(currentProject, mainProject) {
|
|
|
95391
95391
|
"MSBuildProjectDirectoryNoRoot",
|
|
95392
95392
|
normalizeMSBuildPath(dirname9(mainProject.validatedProjectPath)).replace(/^[A-Za-z]:/, "")
|
|
95393
95393
|
],
|
|
95394
|
-
["MSBuildProjectExtension",
|
|
95394
|
+
["MSBuildProjectExtension", extname2(mainProject.validatedProjectPath)],
|
|
95395
95395
|
["MSBuildProjectFile", basename6(mainProject.validatedProjectPath)],
|
|
95396
95396
|
["MSBuildProjectFullPath", normalizeMSBuildPath(mainProject.validatedProjectPath)],
|
|
95397
|
-
["MSBuildProjectName", basename6(mainProject.validatedProjectPath,
|
|
95397
|
+
["MSBuildProjectName", basename6(mainProject.validatedProjectPath, extname2(mainProject.validatedProjectPath))],
|
|
95398
95398
|
// MSBuildThisFile* properties - reference the current project being processed
|
|
95399
95399
|
["MSBuildThisFile", basename6(currentProject.validatedProjectPath)],
|
|
95400
95400
|
["MSBuildThisFileDirectory", normalizeMSBuildPath(dirname9(currentProject.validatedProjectPath)) + "/"],
|
|
@@ -95402,11 +95402,11 @@ function addReservedMSBuildProperties(currentProject, mainProject) {
|
|
|
95402
95402
|
"MSBuildThisFileDirectoryNoRoot",
|
|
95403
95403
|
(normalizeMSBuildPath(dirname9(currentProject.validatedProjectPath)) + "/").replace(/^[A-Za-z]:/, "")
|
|
95404
95404
|
],
|
|
95405
|
-
["MSBuildThisFileExtension",
|
|
95405
|
+
["MSBuildThisFileExtension", extname2(currentProject.validatedProjectPath)],
|
|
95406
95406
|
["MSBuildThisFileFullPath", normalizeMSBuildPath(currentProject.validatedProjectPath)],
|
|
95407
95407
|
[
|
|
95408
95408
|
"MSBuildThisFileName",
|
|
95409
|
-
basename6(currentProject.validatedProjectPath,
|
|
95409
|
+
basename6(currentProject.validatedProjectPath, extname2(currentProject.validatedProjectPath))
|
|
95410
95410
|
]
|
|
95411
95411
|
];
|
|
95412
95412
|
for (const [propertyName, propertyValue] of reservedProperties) {
|
|
@@ -95530,11 +95530,11 @@ async function handleCompileItem(project, child) {
|
|
|
95530
95530
|
} catch (err) {
|
|
95531
95531
|
if (evaluatedExclude) {
|
|
95532
95532
|
logger.debug(
|
|
95533
|
-
`Failed to glob Compile Include ${includePatterns}, Exclude ${excludePatterns} in ${
|
|
95533
|
+
`Failed to glob Compile Include ${includePatterns}, Exclude ${excludePatterns} in ${relative6(project.rootDir, project.validatedProjectPath)}: ${err}`
|
|
95534
95534
|
);
|
|
95535
95535
|
} else {
|
|
95536
95536
|
logger.debug(
|
|
95537
|
-
`Failed to glob Compile Include ${includePatterns} in ${
|
|
95537
|
+
`Failed to glob Compile Include ${includePatterns} in ${relative6(project.rootDir, project.validatedProjectPath)}: ${err}`
|
|
95538
95538
|
);
|
|
95539
95539
|
}
|
|
95540
95540
|
}
|
|
@@ -95554,7 +95554,7 @@ async function handleCompileItem(project, child) {
|
|
|
95554
95554
|
project.sourceFiles = project.sourceFiles.filter((f2) => !removeSet.has(f2));
|
|
95555
95555
|
} catch (err) {
|
|
95556
95556
|
logger.debug(
|
|
95557
|
-
`Failed to glob Compile Remove pattern ${evaluatedRemove} in ${
|
|
95557
|
+
`Failed to glob Compile Remove pattern ${evaluatedRemove} in ${relative6(project.rootDir, project.validatedProjectPath)}: ${err}`
|
|
95558
95558
|
);
|
|
95559
95559
|
}
|
|
95560
95560
|
}
|
|
@@ -95564,7 +95564,7 @@ function handlePropertyGroupElement(project, propertyGroup) {
|
|
|
95564
95564
|
const condition = createAttributeMap(propertyGroup, project.sourceText).get("Condition");
|
|
95565
95565
|
if (condition) {
|
|
95566
95566
|
logger.debug(
|
|
95567
|
-
`Skipping conditional property group ${propertyGroup.name} (${propertyGroup.start}, ${propertyGroup.end}) with condition ${condition.text} in file ${
|
|
95567
|
+
`Skipping conditional property group ${propertyGroup.name} (${propertyGroup.start}, ${propertyGroup.end}) with condition ${condition.text} in file ${relative6(project.rootDir, project.validatedProjectPath)}`
|
|
95568
95568
|
);
|
|
95569
95569
|
return;
|
|
95570
95570
|
}
|
|
@@ -95574,7 +95574,7 @@ function handlePropertyGroupElement(project, propertyGroup) {
|
|
|
95574
95574
|
const condition2 = createAttributeMap(propertyElement, project.sourceText).get("Condition");
|
|
95575
95575
|
if (condition2) {
|
|
95576
95576
|
logger.debug(
|
|
95577
|
-
`Skipping conditional property ${propertyElement.name} (${propertyElement.start}, ${propertyElement.end}) with condition ${condition2.text} in file ${
|
|
95577
|
+
`Skipping conditional property ${propertyElement.name} (${propertyElement.start}, ${propertyElement.end}) with condition ${condition2.text} in file ${relative6(project.rootDir, project.validatedProjectPath)}`
|
|
95578
95578
|
);
|
|
95579
95579
|
continue;
|
|
95580
95580
|
}
|
|
@@ -95615,7 +95615,7 @@ function evaluate(expression, project) {
|
|
|
95615
95615
|
function evaluateWithContext(value2, depth) {
|
|
95616
95616
|
if (depth > 50) {
|
|
95617
95617
|
logger.warn(
|
|
95618
|
-
`Recursion limit hit while evaluating expression ${expression} in project ${
|
|
95618
|
+
`Recursion limit hit while evaluating expression ${expression} in project ${relative6(project.rootDir, project.validatedProjectPath)}`
|
|
95619
95619
|
);
|
|
95620
95620
|
isFullyEvaluated = false;
|
|
95621
95621
|
return value2;
|
|
@@ -95626,7 +95626,7 @@ function evaluate(expression, project) {
|
|
|
95626
95626
|
return evaluateWithContext(property.text, depth + 1);
|
|
95627
95627
|
} else {
|
|
95628
95628
|
logger.debug(
|
|
95629
|
-
`Unknown property ${propertyName} for project ${
|
|
95629
|
+
`Unknown property ${propertyName} for project ${relative6(project.rootDir, project.validatedProjectPath)}`
|
|
95630
95630
|
);
|
|
95631
95631
|
isFullyEvaluated = false;
|
|
95632
95632
|
return "";
|
|
@@ -95897,7 +95897,7 @@ async function extractNugetPackage(nupkgFilePath, packageName, version3, tmpDir)
|
|
|
95897
95897
|
const entryPath = resolve10(packageDir, entry.entryName);
|
|
95898
95898
|
await mkdir5(dirname10(entryPath), { recursive: true });
|
|
95899
95899
|
await writeFile4(entryPath, entry.getData());
|
|
95900
|
-
if (
|
|
95900
|
+
if (extname3(entryPath) === ".dll") {
|
|
95901
95901
|
files.push(entryPath);
|
|
95902
95902
|
}
|
|
95903
95903
|
});
|
|
@@ -97615,10 +97615,10 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
97615
97615
|
function uniqueSort(nodes) {
|
|
97616
97616
|
nodes = nodes.filter((node, i3, arr) => !arr.includes(node, i3 + 1));
|
|
97617
97617
|
nodes.sort((a2, b) => {
|
|
97618
|
-
const
|
|
97619
|
-
if (
|
|
97618
|
+
const relative11 = compareDocumentPosition(a2, b);
|
|
97619
|
+
if (relative11 & DocumentPosition.PRECEDING) {
|
|
97620
97620
|
return -1;
|
|
97621
|
-
} else if (
|
|
97621
|
+
} else if (relative11 & DocumentPosition.FOLLOWING) {
|
|
97622
97622
|
return 1;
|
|
97623
97623
|
}
|
|
97624
97624
|
return 0;
|
|
@@ -100409,20 +100409,20 @@ var SEQUENCES = {
|
|
|
100409
100409
|
PUBLIC: "public",
|
|
100410
100410
|
SYSTEM: "system"
|
|
100411
100411
|
};
|
|
100412
|
-
function isSurrogate(
|
|
100413
|
-
return
|
|
100412
|
+
function isSurrogate(cp8) {
|
|
100413
|
+
return cp8 >= 55296 && cp8 <= 57343;
|
|
100414
100414
|
}
|
|
100415
|
-
function isSurrogatePair(
|
|
100416
|
-
return
|
|
100415
|
+
function isSurrogatePair(cp8) {
|
|
100416
|
+
return cp8 >= 56320 && cp8 <= 57343;
|
|
100417
100417
|
}
|
|
100418
100418
|
function getSurrogatePairCodePoint(cp1, cp22) {
|
|
100419
100419
|
return (cp1 - 55296) * 1024 + 9216 + cp22;
|
|
100420
100420
|
}
|
|
100421
|
-
function isControlCodePoint(
|
|
100422
|
-
return
|
|
100421
|
+
function isControlCodePoint(cp8) {
|
|
100422
|
+
return cp8 !== 32 && cp8 !== 10 && cp8 !== 13 && cp8 !== 9 && cp8 !== 12 && cp8 >= 1 && cp8 <= 31 || cp8 >= 127 && cp8 <= 159;
|
|
100423
100423
|
}
|
|
100424
|
-
function isUndefinedCodePoint(
|
|
100425
|
-
return
|
|
100424
|
+
function isUndefinedCodePoint(cp8) {
|
|
100425
|
+
return cp8 >= 64976 && cp8 <= 65007 || UNDEFINED_CODE_POINTS.has(cp8);
|
|
100426
100426
|
}
|
|
100427
100427
|
|
|
100428
100428
|
// ../../node_modules/.pnpm/parse5@7.1.2/node_modules/parse5/dist/common/error-codes.js
|
|
@@ -100538,20 +100538,20 @@ var Preprocessor = class {
|
|
|
100538
100538
|
this.gapStack.push(this.lastGapPos);
|
|
100539
100539
|
this.lastGapPos = this.pos;
|
|
100540
100540
|
}
|
|
100541
|
-
_processSurrogate(
|
|
100541
|
+
_processSurrogate(cp8) {
|
|
100542
100542
|
if (this.pos !== this.html.length - 1) {
|
|
100543
100543
|
const nextCp = this.html.charCodeAt(this.pos + 1);
|
|
100544
100544
|
if (isSurrogatePair(nextCp)) {
|
|
100545
100545
|
this.pos++;
|
|
100546
100546
|
this._addGap();
|
|
100547
|
-
return getSurrogatePairCodePoint(
|
|
100547
|
+
return getSurrogatePairCodePoint(cp8, nextCp);
|
|
100548
100548
|
}
|
|
100549
100549
|
} else if (!this.lastChunkWritten) {
|
|
100550
100550
|
this.endOfChunkHit = true;
|
|
100551
100551
|
return CODE_POINTS.EOF;
|
|
100552
100552
|
}
|
|
100553
100553
|
this._err(ERR.surrogateInInputStream);
|
|
100554
|
-
return
|
|
100554
|
+
return cp8;
|
|
100555
100555
|
}
|
|
100556
100556
|
willDropParsedChunk() {
|
|
100557
100557
|
return this.pos > this.bufferWaterline;
|
|
@@ -100588,8 +100588,8 @@ var Preprocessor = class {
|
|
|
100588
100588
|
return this.html.startsWith(pattern, this.pos);
|
|
100589
100589
|
}
|
|
100590
100590
|
for (let i3 = 0; i3 < pattern.length; i3++) {
|
|
100591
|
-
const
|
|
100592
|
-
if (
|
|
100591
|
+
const cp8 = this.html.charCodeAt(this.pos + i3) | 32;
|
|
100592
|
+
if (cp8 !== pattern.charCodeAt(i3)) {
|
|
100593
100593
|
return false;
|
|
100594
100594
|
}
|
|
100595
100595
|
}
|
|
@@ -100615,13 +100615,13 @@ var Preprocessor = class {
|
|
|
100615
100615
|
this.endOfChunkHit = !this.lastChunkWritten;
|
|
100616
100616
|
return CODE_POINTS.EOF;
|
|
100617
100617
|
}
|
|
100618
|
-
let
|
|
100619
|
-
if (
|
|
100618
|
+
let cp8 = this.html.charCodeAt(this.pos);
|
|
100619
|
+
if (cp8 === CODE_POINTS.CARRIAGE_RETURN) {
|
|
100620
100620
|
this.isEol = true;
|
|
100621
100621
|
this.skipNextNewLine = true;
|
|
100622
100622
|
return CODE_POINTS.LINE_FEED;
|
|
100623
100623
|
}
|
|
100624
|
-
if (
|
|
100624
|
+
if (cp8 === CODE_POINTS.LINE_FEED) {
|
|
100625
100625
|
this.isEol = true;
|
|
100626
100626
|
if (this.skipNextNewLine) {
|
|
100627
100627
|
this.line--;
|
|
@@ -100631,19 +100631,19 @@ var Preprocessor = class {
|
|
|
100631
100631
|
}
|
|
100632
100632
|
}
|
|
100633
100633
|
this.skipNextNewLine = false;
|
|
100634
|
-
if (isSurrogate(
|
|
100635
|
-
|
|
100634
|
+
if (isSurrogate(cp8)) {
|
|
100635
|
+
cp8 = this._processSurrogate(cp8);
|
|
100636
100636
|
}
|
|
100637
|
-
const isCommonValidRange = this.handler.onParseError === null ||
|
|
100637
|
+
const isCommonValidRange = this.handler.onParseError === null || cp8 > 31 && cp8 < 127 || cp8 === CODE_POINTS.LINE_FEED || cp8 === CODE_POINTS.CARRIAGE_RETURN || cp8 > 159 && cp8 < 64976;
|
|
100638
100638
|
if (!isCommonValidRange) {
|
|
100639
|
-
this._checkForProblematicCharacters(
|
|
100639
|
+
this._checkForProblematicCharacters(cp8);
|
|
100640
100640
|
}
|
|
100641
|
-
return
|
|
100641
|
+
return cp8;
|
|
100642
100642
|
}
|
|
100643
|
-
_checkForProblematicCharacters(
|
|
100644
|
-
if (isControlCodePoint(
|
|
100643
|
+
_checkForProblematicCharacters(cp8) {
|
|
100644
|
+
if (isControlCodePoint(cp8)) {
|
|
100645
100645
|
this._err(ERR.controlCharacterInInputStream);
|
|
100646
|
-
} else if (isUndefinedCodePoint(
|
|
100646
|
+
} else if (isUndefinedCodePoint(cp8)) {
|
|
100647
100647
|
this._err(ERR.noncharacterInInputStream);
|
|
100648
100648
|
}
|
|
100649
100649
|
}
|
|
@@ -101324,41 +101324,41 @@ var TokenizerMode = {
|
|
|
101324
101324
|
PLAINTEXT: State.PLAINTEXT,
|
|
101325
101325
|
CDATA_SECTION: State.CDATA_SECTION
|
|
101326
101326
|
};
|
|
101327
|
-
function isAsciiDigit(
|
|
101328
|
-
return
|
|
101327
|
+
function isAsciiDigit(cp8) {
|
|
101328
|
+
return cp8 >= CODE_POINTS.DIGIT_0 && cp8 <= CODE_POINTS.DIGIT_9;
|
|
101329
101329
|
}
|
|
101330
|
-
function isAsciiUpper(
|
|
101331
|
-
return
|
|
101330
|
+
function isAsciiUpper(cp8) {
|
|
101331
|
+
return cp8 >= CODE_POINTS.LATIN_CAPITAL_A && cp8 <= CODE_POINTS.LATIN_CAPITAL_Z;
|
|
101332
101332
|
}
|
|
101333
|
-
function isAsciiLower(
|
|
101334
|
-
return
|
|
101333
|
+
function isAsciiLower(cp8) {
|
|
101334
|
+
return cp8 >= CODE_POINTS.LATIN_SMALL_A && cp8 <= CODE_POINTS.LATIN_SMALL_Z;
|
|
101335
101335
|
}
|
|
101336
|
-
function isAsciiLetter(
|
|
101337
|
-
return isAsciiLower(
|
|
101336
|
+
function isAsciiLetter(cp8) {
|
|
101337
|
+
return isAsciiLower(cp8) || isAsciiUpper(cp8);
|
|
101338
101338
|
}
|
|
101339
|
-
function isAsciiAlphaNumeric2(
|
|
101340
|
-
return isAsciiLetter(
|
|
101339
|
+
function isAsciiAlphaNumeric2(cp8) {
|
|
101340
|
+
return isAsciiLetter(cp8) || isAsciiDigit(cp8);
|
|
101341
101341
|
}
|
|
101342
|
-
function isAsciiUpperHexDigit(
|
|
101343
|
-
return
|
|
101342
|
+
function isAsciiUpperHexDigit(cp8) {
|
|
101343
|
+
return cp8 >= CODE_POINTS.LATIN_CAPITAL_A && cp8 <= CODE_POINTS.LATIN_CAPITAL_F;
|
|
101344
101344
|
}
|
|
101345
|
-
function isAsciiLowerHexDigit(
|
|
101346
|
-
return
|
|
101345
|
+
function isAsciiLowerHexDigit(cp8) {
|
|
101346
|
+
return cp8 >= CODE_POINTS.LATIN_SMALL_A && cp8 <= CODE_POINTS.LATIN_SMALL_F;
|
|
101347
101347
|
}
|
|
101348
|
-
function isAsciiHexDigit(
|
|
101349
|
-
return isAsciiDigit(
|
|
101348
|
+
function isAsciiHexDigit(cp8) {
|
|
101349
|
+
return isAsciiDigit(cp8) || isAsciiUpperHexDigit(cp8) || isAsciiLowerHexDigit(cp8);
|
|
101350
101350
|
}
|
|
101351
|
-
function toAsciiLower(
|
|
101352
|
-
return
|
|
101351
|
+
function toAsciiLower(cp8) {
|
|
101352
|
+
return cp8 + 32;
|
|
101353
101353
|
}
|
|
101354
|
-
function isWhitespace(
|
|
101355
|
-
return
|
|
101354
|
+
function isWhitespace(cp8) {
|
|
101355
|
+
return cp8 === CODE_POINTS.SPACE || cp8 === CODE_POINTS.LINE_FEED || cp8 === CODE_POINTS.TABULATION || cp8 === CODE_POINTS.FORM_FEED;
|
|
101356
101356
|
}
|
|
101357
101357
|
function isEntityInAttributeInvalidEnd2(nextCp) {
|
|
101358
101358
|
return nextCp === CODE_POINTS.EQUALS_SIGN || isAsciiAlphaNumeric2(nextCp);
|
|
101359
101359
|
}
|
|
101360
|
-
function isScriptDataDoubleEscapeSequenceEnd(
|
|
101361
|
-
return isWhitespace(
|
|
101360
|
+
function isScriptDataDoubleEscapeSequenceEnd(cp8) {
|
|
101361
|
+
return isWhitespace(cp8) || cp8 === CODE_POINTS.SOLIDUS || cp8 === CODE_POINTS.GREATER_THAN_SIGN;
|
|
101362
101362
|
}
|
|
101363
101363
|
var Tokenizer = class {
|
|
101364
101364
|
constructor(options, handler) {
|
|
@@ -101404,9 +101404,9 @@ var Tokenizer = class {
|
|
|
101404
101404
|
this.inLoop = true;
|
|
101405
101405
|
while (this.active && !this.paused) {
|
|
101406
101406
|
this.consumedAfterSnapshot = 0;
|
|
101407
|
-
const
|
|
101407
|
+
const cp8 = this._consume();
|
|
101408
101408
|
if (!this._ensureHibernation()) {
|
|
101409
|
-
this._callState(
|
|
101409
|
+
this._callState(cp8);
|
|
101410
101410
|
}
|
|
101411
101411
|
}
|
|
101412
101412
|
this.inLoop = false;
|
|
@@ -101458,9 +101458,9 @@ var Tokenizer = class {
|
|
|
101458
101458
|
this.consumedAfterSnapshot -= count;
|
|
101459
101459
|
this.preprocessor.retreat(count);
|
|
101460
101460
|
}
|
|
101461
|
-
_reconsumeInState(state,
|
|
101461
|
+
_reconsumeInState(state, cp8) {
|
|
101462
101462
|
this.state = state;
|
|
101463
|
-
this._callState(
|
|
101463
|
+
this._callState(cp8);
|
|
101464
101464
|
}
|
|
101465
101465
|
_advanceBy(count) {
|
|
101466
101466
|
this.consumedAfterSnapshot += count;
|
|
@@ -101648,9 +101648,9 @@ var Tokenizer = class {
|
|
|
101648
101648
|
}
|
|
101649
101649
|
this._createCharacterToken(type, ch);
|
|
101650
101650
|
}
|
|
101651
|
-
_emitCodePoint(
|
|
101652
|
-
const type = isWhitespace(
|
|
101653
|
-
this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(
|
|
101651
|
+
_emitCodePoint(cp8) {
|
|
101652
|
+
const type = isWhitespace(cp8) ? TokenType.WHITESPACE_CHARACTER : cp8 === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
|
|
101653
|
+
this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp8));
|
|
101654
101654
|
}
|
|
101655
101655
|
//NOTE: used when we emit characters explicitly.
|
|
101656
101656
|
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
|
@@ -101658,12 +101658,12 @@ var Tokenizer = class {
|
|
|
101658
101658
|
this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
|
|
101659
101659
|
}
|
|
101660
101660
|
// Character reference helpers
|
|
101661
|
-
_matchNamedCharacterReference(
|
|
101661
|
+
_matchNamedCharacterReference(cp8) {
|
|
101662
101662
|
let result = null;
|
|
101663
101663
|
let excess = 0;
|
|
101664
101664
|
let withoutSemicolon = false;
|
|
101665
|
-
for (let i3 = 0, current = decode_data_html_default[0]; i3 >= 0;
|
|
101666
|
-
i3 = determineBranch(decode_data_html_default, current, i3 + 1,
|
|
101665
|
+
for (let i3 = 0, current = decode_data_html_default[0]; i3 >= 0; cp8 = this._consume()) {
|
|
101666
|
+
i3 = determineBranch(decode_data_html_default, current, i3 + 1, cp8);
|
|
101667
101667
|
if (i3 < 0)
|
|
101668
101668
|
break;
|
|
101669
101669
|
excess += 1;
|
|
@@ -101671,13 +101671,13 @@ var Tokenizer = class {
|
|
|
101671
101671
|
const masked = current & BinTrieFlags.VALUE_LENGTH;
|
|
101672
101672
|
if (masked) {
|
|
101673
101673
|
const valueLength = (masked >> 14) - 1;
|
|
101674
|
-
if (
|
|
101674
|
+
if (cp8 !== CODE_POINTS.SEMICOLON && this._isCharacterReferenceInAttribute() && isEntityInAttributeInvalidEnd2(this.preprocessor.peek(1))) {
|
|
101675
101675
|
result = [CODE_POINTS.AMPERSAND];
|
|
101676
101676
|
i3 += valueLength;
|
|
101677
101677
|
} else {
|
|
101678
101678
|
result = valueLength === 0 ? [decode_data_html_default[i3] & ~BinTrieFlags.VALUE_LENGTH] : valueLength === 1 ? [decode_data_html_default[++i3]] : [decode_data_html_default[++i3], decode_data_html_default[++i3]];
|
|
101679
101679
|
excess = 0;
|
|
101680
|
-
withoutSemicolon =
|
|
101680
|
+
withoutSemicolon = cp8 !== CODE_POINTS.SEMICOLON;
|
|
101681
101681
|
}
|
|
101682
101682
|
if (valueLength === 0) {
|
|
101683
101683
|
this._consume();
|
|
@@ -101695,330 +101695,330 @@ var Tokenizer = class {
|
|
|
101695
101695
|
_isCharacterReferenceInAttribute() {
|
|
101696
101696
|
return this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED;
|
|
101697
101697
|
}
|
|
101698
|
-
_flushCodePointConsumedAsCharacterReference(
|
|
101698
|
+
_flushCodePointConsumedAsCharacterReference(cp8) {
|
|
101699
101699
|
if (this._isCharacterReferenceInAttribute()) {
|
|
101700
|
-
this.currentAttr.value += String.fromCodePoint(
|
|
101700
|
+
this.currentAttr.value += String.fromCodePoint(cp8);
|
|
101701
101701
|
} else {
|
|
101702
|
-
this._emitCodePoint(
|
|
101702
|
+
this._emitCodePoint(cp8);
|
|
101703
101703
|
}
|
|
101704
101704
|
}
|
|
101705
101705
|
// Calling states this way turns out to be much faster than any other approach.
|
|
101706
|
-
_callState(
|
|
101706
|
+
_callState(cp8) {
|
|
101707
101707
|
switch (this.state) {
|
|
101708
101708
|
case State.DATA: {
|
|
101709
|
-
this._stateData(
|
|
101709
|
+
this._stateData(cp8);
|
|
101710
101710
|
break;
|
|
101711
101711
|
}
|
|
101712
101712
|
case State.RCDATA: {
|
|
101713
|
-
this._stateRcdata(
|
|
101713
|
+
this._stateRcdata(cp8);
|
|
101714
101714
|
break;
|
|
101715
101715
|
}
|
|
101716
101716
|
case State.RAWTEXT: {
|
|
101717
|
-
this._stateRawtext(
|
|
101717
|
+
this._stateRawtext(cp8);
|
|
101718
101718
|
break;
|
|
101719
101719
|
}
|
|
101720
101720
|
case State.SCRIPT_DATA: {
|
|
101721
|
-
this._stateScriptData(
|
|
101721
|
+
this._stateScriptData(cp8);
|
|
101722
101722
|
break;
|
|
101723
101723
|
}
|
|
101724
101724
|
case State.PLAINTEXT: {
|
|
101725
|
-
this._statePlaintext(
|
|
101725
|
+
this._statePlaintext(cp8);
|
|
101726
101726
|
break;
|
|
101727
101727
|
}
|
|
101728
101728
|
case State.TAG_OPEN: {
|
|
101729
|
-
this._stateTagOpen(
|
|
101729
|
+
this._stateTagOpen(cp8);
|
|
101730
101730
|
break;
|
|
101731
101731
|
}
|
|
101732
101732
|
case State.END_TAG_OPEN: {
|
|
101733
|
-
this._stateEndTagOpen(
|
|
101733
|
+
this._stateEndTagOpen(cp8);
|
|
101734
101734
|
break;
|
|
101735
101735
|
}
|
|
101736
101736
|
case State.TAG_NAME: {
|
|
101737
|
-
this._stateTagName(
|
|
101737
|
+
this._stateTagName(cp8);
|
|
101738
101738
|
break;
|
|
101739
101739
|
}
|
|
101740
101740
|
case State.RCDATA_LESS_THAN_SIGN: {
|
|
101741
|
-
this._stateRcdataLessThanSign(
|
|
101741
|
+
this._stateRcdataLessThanSign(cp8);
|
|
101742
101742
|
break;
|
|
101743
101743
|
}
|
|
101744
101744
|
case State.RCDATA_END_TAG_OPEN: {
|
|
101745
|
-
this._stateRcdataEndTagOpen(
|
|
101745
|
+
this._stateRcdataEndTagOpen(cp8);
|
|
101746
101746
|
break;
|
|
101747
101747
|
}
|
|
101748
101748
|
case State.RCDATA_END_TAG_NAME: {
|
|
101749
|
-
this._stateRcdataEndTagName(
|
|
101749
|
+
this._stateRcdataEndTagName(cp8);
|
|
101750
101750
|
break;
|
|
101751
101751
|
}
|
|
101752
101752
|
case State.RAWTEXT_LESS_THAN_SIGN: {
|
|
101753
|
-
this._stateRawtextLessThanSign(
|
|
101753
|
+
this._stateRawtextLessThanSign(cp8);
|
|
101754
101754
|
break;
|
|
101755
101755
|
}
|
|
101756
101756
|
case State.RAWTEXT_END_TAG_OPEN: {
|
|
101757
|
-
this._stateRawtextEndTagOpen(
|
|
101757
|
+
this._stateRawtextEndTagOpen(cp8);
|
|
101758
101758
|
break;
|
|
101759
101759
|
}
|
|
101760
101760
|
case State.RAWTEXT_END_TAG_NAME: {
|
|
101761
|
-
this._stateRawtextEndTagName(
|
|
101761
|
+
this._stateRawtextEndTagName(cp8);
|
|
101762
101762
|
break;
|
|
101763
101763
|
}
|
|
101764
101764
|
case State.SCRIPT_DATA_LESS_THAN_SIGN: {
|
|
101765
|
-
this._stateScriptDataLessThanSign(
|
|
101765
|
+
this._stateScriptDataLessThanSign(cp8);
|
|
101766
101766
|
break;
|
|
101767
101767
|
}
|
|
101768
101768
|
case State.SCRIPT_DATA_END_TAG_OPEN: {
|
|
101769
|
-
this._stateScriptDataEndTagOpen(
|
|
101769
|
+
this._stateScriptDataEndTagOpen(cp8);
|
|
101770
101770
|
break;
|
|
101771
101771
|
}
|
|
101772
101772
|
case State.SCRIPT_DATA_END_TAG_NAME: {
|
|
101773
|
-
this._stateScriptDataEndTagName(
|
|
101773
|
+
this._stateScriptDataEndTagName(cp8);
|
|
101774
101774
|
break;
|
|
101775
101775
|
}
|
|
101776
101776
|
case State.SCRIPT_DATA_ESCAPE_START: {
|
|
101777
|
-
this._stateScriptDataEscapeStart(
|
|
101777
|
+
this._stateScriptDataEscapeStart(cp8);
|
|
101778
101778
|
break;
|
|
101779
101779
|
}
|
|
101780
101780
|
case State.SCRIPT_DATA_ESCAPE_START_DASH: {
|
|
101781
|
-
this._stateScriptDataEscapeStartDash(
|
|
101781
|
+
this._stateScriptDataEscapeStartDash(cp8);
|
|
101782
101782
|
break;
|
|
101783
101783
|
}
|
|
101784
101784
|
case State.SCRIPT_DATA_ESCAPED: {
|
|
101785
|
-
this._stateScriptDataEscaped(
|
|
101785
|
+
this._stateScriptDataEscaped(cp8);
|
|
101786
101786
|
break;
|
|
101787
101787
|
}
|
|
101788
101788
|
case State.SCRIPT_DATA_ESCAPED_DASH: {
|
|
101789
|
-
this._stateScriptDataEscapedDash(
|
|
101789
|
+
this._stateScriptDataEscapedDash(cp8);
|
|
101790
101790
|
break;
|
|
101791
101791
|
}
|
|
101792
101792
|
case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {
|
|
101793
|
-
this._stateScriptDataEscapedDashDash(
|
|
101793
|
+
this._stateScriptDataEscapedDashDash(cp8);
|
|
101794
101794
|
break;
|
|
101795
101795
|
}
|
|
101796
101796
|
case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
|
|
101797
|
-
this._stateScriptDataEscapedLessThanSign(
|
|
101797
|
+
this._stateScriptDataEscapedLessThanSign(cp8);
|
|
101798
101798
|
break;
|
|
101799
101799
|
}
|
|
101800
101800
|
case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {
|
|
101801
|
-
this._stateScriptDataEscapedEndTagOpen(
|
|
101801
|
+
this._stateScriptDataEscapedEndTagOpen(cp8);
|
|
101802
101802
|
break;
|
|
101803
101803
|
}
|
|
101804
101804
|
case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {
|
|
101805
|
-
this._stateScriptDataEscapedEndTagName(
|
|
101805
|
+
this._stateScriptDataEscapedEndTagName(cp8);
|
|
101806
101806
|
break;
|
|
101807
101807
|
}
|
|
101808
101808
|
case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {
|
|
101809
|
-
this._stateScriptDataDoubleEscapeStart(
|
|
101809
|
+
this._stateScriptDataDoubleEscapeStart(cp8);
|
|
101810
101810
|
break;
|
|
101811
101811
|
}
|
|
101812
101812
|
case State.SCRIPT_DATA_DOUBLE_ESCAPED: {
|
|
101813
|
-
this._stateScriptDataDoubleEscaped(
|
|
101813
|
+
this._stateScriptDataDoubleEscaped(cp8);
|
|
101814
101814
|
break;
|
|
101815
101815
|
}
|
|
101816
101816
|
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
|
|
101817
|
-
this._stateScriptDataDoubleEscapedDash(
|
|
101817
|
+
this._stateScriptDataDoubleEscapedDash(cp8);
|
|
101818
101818
|
break;
|
|
101819
101819
|
}
|
|
101820
101820
|
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
|
|
101821
|
-
this._stateScriptDataDoubleEscapedDashDash(
|
|
101821
|
+
this._stateScriptDataDoubleEscapedDashDash(cp8);
|
|
101822
101822
|
break;
|
|
101823
101823
|
}
|
|
101824
101824
|
case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
|
|
101825
|
-
this._stateScriptDataDoubleEscapedLessThanSign(
|
|
101825
|
+
this._stateScriptDataDoubleEscapedLessThanSign(cp8);
|
|
101826
101826
|
break;
|
|
101827
101827
|
}
|
|
101828
101828
|
case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {
|
|
101829
|
-
this._stateScriptDataDoubleEscapeEnd(
|
|
101829
|
+
this._stateScriptDataDoubleEscapeEnd(cp8);
|
|
101830
101830
|
break;
|
|
101831
101831
|
}
|
|
101832
101832
|
case State.BEFORE_ATTRIBUTE_NAME: {
|
|
101833
|
-
this._stateBeforeAttributeName(
|
|
101833
|
+
this._stateBeforeAttributeName(cp8);
|
|
101834
101834
|
break;
|
|
101835
101835
|
}
|
|
101836
101836
|
case State.ATTRIBUTE_NAME: {
|
|
101837
|
-
this._stateAttributeName(
|
|
101837
|
+
this._stateAttributeName(cp8);
|
|
101838
101838
|
break;
|
|
101839
101839
|
}
|
|
101840
101840
|
case State.AFTER_ATTRIBUTE_NAME: {
|
|
101841
|
-
this._stateAfterAttributeName(
|
|
101841
|
+
this._stateAfterAttributeName(cp8);
|
|
101842
101842
|
break;
|
|
101843
101843
|
}
|
|
101844
101844
|
case State.BEFORE_ATTRIBUTE_VALUE: {
|
|
101845
|
-
this._stateBeforeAttributeValue(
|
|
101845
|
+
this._stateBeforeAttributeValue(cp8);
|
|
101846
101846
|
break;
|
|
101847
101847
|
}
|
|
101848
101848
|
case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
|
|
101849
|
-
this._stateAttributeValueDoubleQuoted(
|
|
101849
|
+
this._stateAttributeValueDoubleQuoted(cp8);
|
|
101850
101850
|
break;
|
|
101851
101851
|
}
|
|
101852
101852
|
case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {
|
|
101853
|
-
this._stateAttributeValueSingleQuoted(
|
|
101853
|
+
this._stateAttributeValueSingleQuoted(cp8);
|
|
101854
101854
|
break;
|
|
101855
101855
|
}
|
|
101856
101856
|
case State.ATTRIBUTE_VALUE_UNQUOTED: {
|
|
101857
|
-
this._stateAttributeValueUnquoted(
|
|
101857
|
+
this._stateAttributeValueUnquoted(cp8);
|
|
101858
101858
|
break;
|
|
101859
101859
|
}
|
|
101860
101860
|
case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {
|
|
101861
|
-
this._stateAfterAttributeValueQuoted(
|
|
101861
|
+
this._stateAfterAttributeValueQuoted(cp8);
|
|
101862
101862
|
break;
|
|
101863
101863
|
}
|
|
101864
101864
|
case State.SELF_CLOSING_START_TAG: {
|
|
101865
|
-
this._stateSelfClosingStartTag(
|
|
101865
|
+
this._stateSelfClosingStartTag(cp8);
|
|
101866
101866
|
break;
|
|
101867
101867
|
}
|
|
101868
101868
|
case State.BOGUS_COMMENT: {
|
|
101869
|
-
this._stateBogusComment(
|
|
101869
|
+
this._stateBogusComment(cp8);
|
|
101870
101870
|
break;
|
|
101871
101871
|
}
|
|
101872
101872
|
case State.MARKUP_DECLARATION_OPEN: {
|
|
101873
|
-
this._stateMarkupDeclarationOpen(
|
|
101873
|
+
this._stateMarkupDeclarationOpen(cp8);
|
|
101874
101874
|
break;
|
|
101875
101875
|
}
|
|
101876
101876
|
case State.COMMENT_START: {
|
|
101877
|
-
this._stateCommentStart(
|
|
101877
|
+
this._stateCommentStart(cp8);
|
|
101878
101878
|
break;
|
|
101879
101879
|
}
|
|
101880
101880
|
case State.COMMENT_START_DASH: {
|
|
101881
|
-
this._stateCommentStartDash(
|
|
101881
|
+
this._stateCommentStartDash(cp8);
|
|
101882
101882
|
break;
|
|
101883
101883
|
}
|
|
101884
101884
|
case State.COMMENT: {
|
|
101885
|
-
this._stateComment(
|
|
101885
|
+
this._stateComment(cp8);
|
|
101886
101886
|
break;
|
|
101887
101887
|
}
|
|
101888
101888
|
case State.COMMENT_LESS_THAN_SIGN: {
|
|
101889
|
-
this._stateCommentLessThanSign(
|
|
101889
|
+
this._stateCommentLessThanSign(cp8);
|
|
101890
101890
|
break;
|
|
101891
101891
|
}
|
|
101892
101892
|
case State.COMMENT_LESS_THAN_SIGN_BANG: {
|
|
101893
|
-
this._stateCommentLessThanSignBang(
|
|
101893
|
+
this._stateCommentLessThanSignBang(cp8);
|
|
101894
101894
|
break;
|
|
101895
101895
|
}
|
|
101896
101896
|
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {
|
|
101897
|
-
this._stateCommentLessThanSignBangDash(
|
|
101897
|
+
this._stateCommentLessThanSignBangDash(cp8);
|
|
101898
101898
|
break;
|
|
101899
101899
|
}
|
|
101900
101900
|
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {
|
|
101901
|
-
this._stateCommentLessThanSignBangDashDash(
|
|
101901
|
+
this._stateCommentLessThanSignBangDashDash(cp8);
|
|
101902
101902
|
break;
|
|
101903
101903
|
}
|
|
101904
101904
|
case State.COMMENT_END_DASH: {
|
|
101905
|
-
this._stateCommentEndDash(
|
|
101905
|
+
this._stateCommentEndDash(cp8);
|
|
101906
101906
|
break;
|
|
101907
101907
|
}
|
|
101908
101908
|
case State.COMMENT_END: {
|
|
101909
|
-
this._stateCommentEnd(
|
|
101909
|
+
this._stateCommentEnd(cp8);
|
|
101910
101910
|
break;
|
|
101911
101911
|
}
|
|
101912
101912
|
case State.COMMENT_END_BANG: {
|
|
101913
|
-
this._stateCommentEndBang(
|
|
101913
|
+
this._stateCommentEndBang(cp8);
|
|
101914
101914
|
break;
|
|
101915
101915
|
}
|
|
101916
101916
|
case State.DOCTYPE: {
|
|
101917
|
-
this._stateDoctype(
|
|
101917
|
+
this._stateDoctype(cp8);
|
|
101918
101918
|
break;
|
|
101919
101919
|
}
|
|
101920
101920
|
case State.BEFORE_DOCTYPE_NAME: {
|
|
101921
|
-
this._stateBeforeDoctypeName(
|
|
101921
|
+
this._stateBeforeDoctypeName(cp8);
|
|
101922
101922
|
break;
|
|
101923
101923
|
}
|
|
101924
101924
|
case State.DOCTYPE_NAME: {
|
|
101925
|
-
this._stateDoctypeName(
|
|
101925
|
+
this._stateDoctypeName(cp8);
|
|
101926
101926
|
break;
|
|
101927
101927
|
}
|
|
101928
101928
|
case State.AFTER_DOCTYPE_NAME: {
|
|
101929
|
-
this._stateAfterDoctypeName(
|
|
101929
|
+
this._stateAfterDoctypeName(cp8);
|
|
101930
101930
|
break;
|
|
101931
101931
|
}
|
|
101932
101932
|
case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {
|
|
101933
|
-
this._stateAfterDoctypePublicKeyword(
|
|
101933
|
+
this._stateAfterDoctypePublicKeyword(cp8);
|
|
101934
101934
|
break;
|
|
101935
101935
|
}
|
|
101936
101936
|
case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
|
|
101937
|
-
this._stateBeforeDoctypePublicIdentifier(
|
|
101937
|
+
this._stateBeforeDoctypePublicIdentifier(cp8);
|
|
101938
101938
|
break;
|
|
101939
101939
|
}
|
|
101940
101940
|
case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
|
|
101941
|
-
this._stateDoctypePublicIdentifierDoubleQuoted(
|
|
101941
|
+
this._stateDoctypePublicIdentifierDoubleQuoted(cp8);
|
|
101942
101942
|
break;
|
|
101943
101943
|
}
|
|
101944
101944
|
case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
|
|
101945
|
-
this._stateDoctypePublicIdentifierSingleQuoted(
|
|
101945
|
+
this._stateDoctypePublicIdentifierSingleQuoted(cp8);
|
|
101946
101946
|
break;
|
|
101947
101947
|
}
|
|
101948
101948
|
case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
|
|
101949
|
-
this._stateAfterDoctypePublicIdentifier(
|
|
101949
|
+
this._stateAfterDoctypePublicIdentifier(cp8);
|
|
101950
101950
|
break;
|
|
101951
101951
|
}
|
|
101952
101952
|
case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
|
|
101953
|
-
this._stateBetweenDoctypePublicAndSystemIdentifiers(
|
|
101953
|
+
this._stateBetweenDoctypePublicAndSystemIdentifiers(cp8);
|
|
101954
101954
|
break;
|
|
101955
101955
|
}
|
|
101956
101956
|
case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {
|
|
101957
|
-
this._stateAfterDoctypeSystemKeyword(
|
|
101957
|
+
this._stateAfterDoctypeSystemKeyword(cp8);
|
|
101958
101958
|
break;
|
|
101959
101959
|
}
|
|
101960
101960
|
case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
|
|
101961
|
-
this._stateBeforeDoctypeSystemIdentifier(
|
|
101961
|
+
this._stateBeforeDoctypeSystemIdentifier(cp8);
|
|
101962
101962
|
break;
|
|
101963
101963
|
}
|
|
101964
101964
|
case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
|
|
101965
|
-
this._stateDoctypeSystemIdentifierDoubleQuoted(
|
|
101965
|
+
this._stateDoctypeSystemIdentifierDoubleQuoted(cp8);
|
|
101966
101966
|
break;
|
|
101967
101967
|
}
|
|
101968
101968
|
case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
|
|
101969
|
-
this._stateDoctypeSystemIdentifierSingleQuoted(
|
|
101969
|
+
this._stateDoctypeSystemIdentifierSingleQuoted(cp8);
|
|
101970
101970
|
break;
|
|
101971
101971
|
}
|
|
101972
101972
|
case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
|
|
101973
|
-
this._stateAfterDoctypeSystemIdentifier(
|
|
101973
|
+
this._stateAfterDoctypeSystemIdentifier(cp8);
|
|
101974
101974
|
break;
|
|
101975
101975
|
}
|
|
101976
101976
|
case State.BOGUS_DOCTYPE: {
|
|
101977
|
-
this._stateBogusDoctype(
|
|
101977
|
+
this._stateBogusDoctype(cp8);
|
|
101978
101978
|
break;
|
|
101979
101979
|
}
|
|
101980
101980
|
case State.CDATA_SECTION: {
|
|
101981
|
-
this._stateCdataSection(
|
|
101981
|
+
this._stateCdataSection(cp8);
|
|
101982
101982
|
break;
|
|
101983
101983
|
}
|
|
101984
101984
|
case State.CDATA_SECTION_BRACKET: {
|
|
101985
|
-
this._stateCdataSectionBracket(
|
|
101985
|
+
this._stateCdataSectionBracket(cp8);
|
|
101986
101986
|
break;
|
|
101987
101987
|
}
|
|
101988
101988
|
case State.CDATA_SECTION_END: {
|
|
101989
|
-
this._stateCdataSectionEnd(
|
|
101989
|
+
this._stateCdataSectionEnd(cp8);
|
|
101990
101990
|
break;
|
|
101991
101991
|
}
|
|
101992
101992
|
case State.CHARACTER_REFERENCE: {
|
|
101993
|
-
this._stateCharacterReference(
|
|
101993
|
+
this._stateCharacterReference(cp8);
|
|
101994
101994
|
break;
|
|
101995
101995
|
}
|
|
101996
101996
|
case State.NAMED_CHARACTER_REFERENCE: {
|
|
101997
|
-
this._stateNamedCharacterReference(
|
|
101997
|
+
this._stateNamedCharacterReference(cp8);
|
|
101998
101998
|
break;
|
|
101999
101999
|
}
|
|
102000
102000
|
case State.AMBIGUOUS_AMPERSAND: {
|
|
102001
|
-
this._stateAmbiguousAmpersand(
|
|
102001
|
+
this._stateAmbiguousAmpersand(cp8);
|
|
102002
102002
|
break;
|
|
102003
102003
|
}
|
|
102004
102004
|
case State.NUMERIC_CHARACTER_REFERENCE: {
|
|
102005
|
-
this._stateNumericCharacterReference(
|
|
102005
|
+
this._stateNumericCharacterReference(cp8);
|
|
102006
102006
|
break;
|
|
102007
102007
|
}
|
|
102008
102008
|
case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {
|
|
102009
|
-
this._stateHexademicalCharacterReferenceStart(
|
|
102009
|
+
this._stateHexademicalCharacterReferenceStart(cp8);
|
|
102010
102010
|
break;
|
|
102011
102011
|
}
|
|
102012
102012
|
case State.HEXADEMICAL_CHARACTER_REFERENCE: {
|
|
102013
|
-
this._stateHexademicalCharacterReference(
|
|
102013
|
+
this._stateHexademicalCharacterReference(cp8);
|
|
102014
102014
|
break;
|
|
102015
102015
|
}
|
|
102016
102016
|
case State.DECIMAL_CHARACTER_REFERENCE: {
|
|
102017
|
-
this._stateDecimalCharacterReference(
|
|
102017
|
+
this._stateDecimalCharacterReference(cp8);
|
|
102018
102018
|
break;
|
|
102019
102019
|
}
|
|
102020
102020
|
case State.NUMERIC_CHARACTER_REFERENCE_END: {
|
|
102021
|
-
this._stateNumericCharacterReferenceEnd(
|
|
102021
|
+
this._stateNumericCharacterReferenceEnd(cp8);
|
|
102022
102022
|
break;
|
|
102023
102023
|
}
|
|
102024
102024
|
default: {
|
|
@@ -102029,8 +102029,8 @@ var Tokenizer = class {
|
|
|
102029
102029
|
// State machine
|
|
102030
102030
|
// Data state
|
|
102031
102031
|
//------------------------------------------------------------------
|
|
102032
|
-
_stateData(
|
|
102033
|
-
switch (
|
|
102032
|
+
_stateData(cp8) {
|
|
102033
|
+
switch (cp8) {
|
|
102034
102034
|
case CODE_POINTS.LESS_THAN_SIGN: {
|
|
102035
102035
|
this.state = State.TAG_OPEN;
|
|
102036
102036
|
break;
|
|
@@ -102042,7 +102042,7 @@ var Tokenizer = class {
|
|
|
102042
102042
|
}
|
|
102043
102043
|
case CODE_POINTS.NULL: {
|
|
102044
102044
|
this._err(ERR.unexpectedNullCharacter);
|
|
102045
|
-
this._emitCodePoint(
|
|
102045
|
+
this._emitCodePoint(cp8);
|
|
102046
102046
|
break;
|
|
102047
102047
|
}
|
|
102048
102048
|
case CODE_POINTS.EOF: {
|
|
@@ -102050,14 +102050,14 @@ var Tokenizer = class {
|
|
|
102050
102050
|
break;
|
|
102051
102051
|
}
|
|
102052
102052
|
default: {
|
|
102053
|
-
this._emitCodePoint(
|
|
102053
|
+
this._emitCodePoint(cp8);
|
|
102054
102054
|
}
|
|
102055
102055
|
}
|
|
102056
102056
|
}
|
|
102057
102057
|
// RCDATA state
|
|
102058
102058
|
//------------------------------------------------------------------
|
|
102059
|
-
_stateRcdata(
|
|
102060
|
-
switch (
|
|
102059
|
+
_stateRcdata(cp8) {
|
|
102060
|
+
switch (cp8) {
|
|
102061
102061
|
case CODE_POINTS.AMPERSAND: {
|
|
102062
102062
|
this.returnState = State.RCDATA;
|
|
102063
102063
|
this.state = State.CHARACTER_REFERENCE;
|
|
@@ -102077,14 +102077,14 @@ var Tokenizer = class {
|
|
|
102077
102077
|
break;
|
|
102078
102078
|
}
|
|
102079
102079
|
default: {
|
|
102080
|
-
this._emitCodePoint(
|
|
102080
|
+
this._emitCodePoint(cp8);
|
|
102081
102081
|
}
|
|
102082
102082
|
}
|
|
102083
102083
|
}
|
|
102084
102084
|
// RAWTEXT state
|
|
102085
102085
|
//------------------------------------------------------------------
|
|
102086
|
-
_stateRawtext(
|
|
102087
|
-
switch (
|
|
102086
|
+
_stateRawtext(cp8) {
|
|
102087
|
+
switch (cp8) {
|
|
102088
102088
|
case CODE_POINTS.LESS_THAN_SIGN: {
|
|
102089
102089
|
this.state = State.RAWTEXT_LESS_THAN_SIGN;
|
|
102090
102090
|
break;
|
|
@@ -102099,14 +102099,14 @@ var Tokenizer = class {
|
|
|
102099
102099
|
break;
|
|
102100
102100
|
}
|
|
102101
102101
|
default: {
|
|
102102
|
-
this._emitCodePoint(
|
|
102102
|
+
this._emitCodePoint(cp8);
|
|
102103
102103
|
}
|
|
102104
102104
|
}
|
|
102105
102105
|
}
|
|
102106
102106
|
// Script data state
|
|
102107
102107
|
//------------------------------------------------------------------
|
|
102108
|
-
_stateScriptData(
|
|
102109
|
-
switch (
|
|
102108
|
+
_stateScriptData(cp8) {
|
|
102109
|
+
switch (cp8) {
|
|
102110
102110
|
case CODE_POINTS.LESS_THAN_SIGN: {
|
|
102111
102111
|
this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;
|
|
102112
102112
|
break;
|
|
@@ -102121,14 +102121,14 @@ var Tokenizer = class {
|
|
|
102121
102121
|
break;
|
|
102122
102122
|
}
|
|
102123
102123
|
default: {
|
|
102124
|
-
this._emitCodePoint(
|
|
102124
|
+
this._emitCodePoint(cp8);
|
|
102125
102125
|
}
|
|
102126
102126
|
}
|
|
102127
102127
|
}
|
|
102128
102128
|
// PLAINTEXT state
|
|
102129
102129
|
//------------------------------------------------------------------
|
|
102130
|
-
_statePlaintext(
|
|
102131
|
-
switch (
|
|
102130
|
+
_statePlaintext(cp8) {
|
|
102131
|
+
switch (cp8) {
|
|
102132
102132
|
case CODE_POINTS.NULL: {
|
|
102133
102133
|
this._err(ERR.unexpectedNullCharacter);
|
|
102134
102134
|
this._emitChars(REPLACEMENT_CHARACTER);
|
|
@@ -102139,19 +102139,19 @@ var Tokenizer = class {
|
|
|
102139
102139
|
break;
|
|
102140
102140
|
}
|
|
102141
102141
|
default: {
|
|
102142
|
-
this._emitCodePoint(
|
|
102142
|
+
this._emitCodePoint(cp8);
|
|
102143
102143
|
}
|
|
102144
102144
|
}
|
|
102145
102145
|
}
|
|
102146
102146
|
// Tag open state
|
|
102147
102147
|
//------------------------------------------------------------------
|
|
102148
|
-
_stateTagOpen(
|
|
102149
|
-
if (isAsciiLetter(
|
|
102148
|
+
_stateTagOpen(cp8) {
|
|
102149
|
+
if (isAsciiLetter(cp8)) {
|
|
102150
102150
|
this._createStartTagToken();
|
|
102151
102151
|
this.state = State.TAG_NAME;
|
|
102152
|
-
this._stateTagName(
|
|
102152
|
+
this._stateTagName(cp8);
|
|
102153
102153
|
} else
|
|
102154
|
-
switch (
|
|
102154
|
+
switch (cp8) {
|
|
102155
102155
|
case CODE_POINTS.EXCLAMATION_MARK: {
|
|
102156
102156
|
this.state = State.MARKUP_DECLARATION_OPEN;
|
|
102157
102157
|
break;
|
|
@@ -102164,7 +102164,7 @@ var Tokenizer = class {
|
|
|
102164
102164
|
this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);
|
|
102165
102165
|
this._createCommentToken(1);
|
|
102166
102166
|
this.state = State.BOGUS_COMMENT;
|
|
102167
|
-
this._stateBogusComment(
|
|
102167
|
+
this._stateBogusComment(cp8);
|
|
102168
102168
|
break;
|
|
102169
102169
|
}
|
|
102170
102170
|
case CODE_POINTS.EOF: {
|
|
@@ -102177,19 +102177,19 @@ var Tokenizer = class {
|
|
|
102177
102177
|
this._err(ERR.invalidFirstCharacterOfTagName);
|
|
102178
102178
|
this._emitChars("<");
|
|
102179
102179
|
this.state = State.DATA;
|
|
102180
|
-
this._stateData(
|
|
102180
|
+
this._stateData(cp8);
|
|
102181
102181
|
}
|
|
102182
102182
|
}
|
|
102183
102183
|
}
|
|
102184
102184
|
// End tag open state
|
|
102185
102185
|
//------------------------------------------------------------------
|
|
102186
|
-
_stateEndTagOpen(
|
|
102187
|
-
if (isAsciiLetter(
|
|
102186
|
+
_stateEndTagOpen(cp8) {
|
|
102187
|
+
if (isAsciiLetter(cp8)) {
|
|
102188
102188
|
this._createEndTagToken();
|
|
102189
102189
|
this.state = State.TAG_NAME;
|
|
102190
|
-
this._stateTagName(
|
|
102190
|
+
this._stateTagName(cp8);
|
|
102191
102191
|
} else
|
|
102192
|
-
switch (
|
|
102192
|
+
switch (cp8) {
|
|
102193
102193
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
102194
102194
|
this._err(ERR.missingEndTagName);
|
|
102195
102195
|
this.state = State.DATA;
|
|
@@ -102205,15 +102205,15 @@ var Tokenizer = class {
|
|
|
102205
102205
|
this._err(ERR.invalidFirstCharacterOfTagName);
|
|
102206
102206
|
this._createCommentToken(2);
|
|
102207
102207
|
this.state = State.BOGUS_COMMENT;
|
|
102208
|
-
this._stateBogusComment(
|
|
102208
|
+
this._stateBogusComment(cp8);
|
|
102209
102209
|
}
|
|
102210
102210
|
}
|
|
102211
102211
|
}
|
|
102212
102212
|
// Tag name state
|
|
102213
102213
|
//------------------------------------------------------------------
|
|
102214
|
-
_stateTagName(
|
|
102214
|
+
_stateTagName(cp8) {
|
|
102215
102215
|
const token = this.currentToken;
|
|
102216
|
-
switch (
|
|
102216
|
+
switch (cp8) {
|
|
102217
102217
|
case CODE_POINTS.SPACE:
|
|
102218
102218
|
case CODE_POINTS.LINE_FEED:
|
|
102219
102219
|
case CODE_POINTS.TABULATION:
|
|
@@ -102241,31 +102241,31 @@ var Tokenizer = class {
|
|
|
102241
102241
|
break;
|
|
102242
102242
|
}
|
|
102243
102243
|
default: {
|
|
102244
|
-
token.tagName += String.fromCodePoint(isAsciiUpper(
|
|
102244
|
+
token.tagName += String.fromCodePoint(isAsciiUpper(cp8) ? toAsciiLower(cp8) : cp8);
|
|
102245
102245
|
}
|
|
102246
102246
|
}
|
|
102247
102247
|
}
|
|
102248
102248
|
// RCDATA less-than sign state
|
|
102249
102249
|
//------------------------------------------------------------------
|
|
102250
|
-
_stateRcdataLessThanSign(
|
|
102251
|
-
if (
|
|
102250
|
+
_stateRcdataLessThanSign(cp8) {
|
|
102251
|
+
if (cp8 === CODE_POINTS.SOLIDUS) {
|
|
102252
102252
|
this.state = State.RCDATA_END_TAG_OPEN;
|
|
102253
102253
|
} else {
|
|
102254
102254
|
this._emitChars("<");
|
|
102255
102255
|
this.state = State.RCDATA;
|
|
102256
|
-
this._stateRcdata(
|
|
102256
|
+
this._stateRcdata(cp8);
|
|
102257
102257
|
}
|
|
102258
102258
|
}
|
|
102259
102259
|
// RCDATA end tag open state
|
|
102260
102260
|
//------------------------------------------------------------------
|
|
102261
|
-
_stateRcdataEndTagOpen(
|
|
102262
|
-
if (isAsciiLetter(
|
|
102261
|
+
_stateRcdataEndTagOpen(cp8) {
|
|
102262
|
+
if (isAsciiLetter(cp8)) {
|
|
102263
102263
|
this.state = State.RCDATA_END_TAG_NAME;
|
|
102264
|
-
this._stateRcdataEndTagName(
|
|
102264
|
+
this._stateRcdataEndTagName(cp8);
|
|
102265
102265
|
} else {
|
|
102266
102266
|
this._emitChars("</");
|
|
102267
102267
|
this.state = State.RCDATA;
|
|
102268
|
-
this._stateRcdata(
|
|
102268
|
+
this._stateRcdata(cp8);
|
|
102269
102269
|
}
|
|
102270
102270
|
}
|
|
102271
102271
|
handleSpecialEndTag(_cp) {
|
|
@@ -102275,8 +102275,8 @@ var Tokenizer = class {
|
|
|
102275
102275
|
this._createEndTagToken();
|
|
102276
102276
|
const token = this.currentToken;
|
|
102277
102277
|
token.tagName = this.lastStartTagName;
|
|
102278
|
-
const
|
|
102279
|
-
switch (
|
|
102278
|
+
const cp8 = this.preprocessor.peek(this.lastStartTagName.length);
|
|
102279
|
+
switch (cp8) {
|
|
102280
102280
|
case CODE_POINTS.SPACE:
|
|
102281
102281
|
case CODE_POINTS.LINE_FEED:
|
|
102282
102282
|
case CODE_POINTS.TABULATION:
|
|
@@ -102303,49 +102303,49 @@ var Tokenizer = class {
|
|
|
102303
102303
|
}
|
|
102304
102304
|
// RCDATA end tag name state
|
|
102305
102305
|
//------------------------------------------------------------------
|
|
102306
|
-
_stateRcdataEndTagName(
|
|
102307
|
-
if (this.handleSpecialEndTag(
|
|
102306
|
+
_stateRcdataEndTagName(cp8) {
|
|
102307
|
+
if (this.handleSpecialEndTag(cp8)) {
|
|
102308
102308
|
this._emitChars("</");
|
|
102309
102309
|
this.state = State.RCDATA;
|
|
102310
|
-
this._stateRcdata(
|
|
102310
|
+
this._stateRcdata(cp8);
|
|
102311
102311
|
}
|
|
102312
102312
|
}
|
|
102313
102313
|
// RAWTEXT less-than sign state
|
|
102314
102314
|
//------------------------------------------------------------------
|
|
102315
|
-
_stateRawtextLessThanSign(
|
|
102316
|
-
if (
|
|
102315
|
+
_stateRawtextLessThanSign(cp8) {
|
|
102316
|
+
if (cp8 === CODE_POINTS.SOLIDUS) {
|
|
102317
102317
|
this.state = State.RAWTEXT_END_TAG_OPEN;
|
|
102318
102318
|
} else {
|
|
102319
102319
|
this._emitChars("<");
|
|
102320
102320
|
this.state = State.RAWTEXT;
|
|
102321
|
-
this._stateRawtext(
|
|
102321
|
+
this._stateRawtext(cp8);
|
|
102322
102322
|
}
|
|
102323
102323
|
}
|
|
102324
102324
|
// RAWTEXT end tag open state
|
|
102325
102325
|
//------------------------------------------------------------------
|
|
102326
|
-
_stateRawtextEndTagOpen(
|
|
102327
|
-
if (isAsciiLetter(
|
|
102326
|
+
_stateRawtextEndTagOpen(cp8) {
|
|
102327
|
+
if (isAsciiLetter(cp8)) {
|
|
102328
102328
|
this.state = State.RAWTEXT_END_TAG_NAME;
|
|
102329
|
-
this._stateRawtextEndTagName(
|
|
102329
|
+
this._stateRawtextEndTagName(cp8);
|
|
102330
102330
|
} else {
|
|
102331
102331
|
this._emitChars("</");
|
|
102332
102332
|
this.state = State.RAWTEXT;
|
|
102333
|
-
this._stateRawtext(
|
|
102333
|
+
this._stateRawtext(cp8);
|
|
102334
102334
|
}
|
|
102335
102335
|
}
|
|
102336
102336
|
// RAWTEXT end tag name state
|
|
102337
102337
|
//------------------------------------------------------------------
|
|
102338
|
-
_stateRawtextEndTagName(
|
|
102339
|
-
if (this.handleSpecialEndTag(
|
|
102338
|
+
_stateRawtextEndTagName(cp8) {
|
|
102339
|
+
if (this.handleSpecialEndTag(cp8)) {
|
|
102340
102340
|
this._emitChars("</");
|
|
102341
102341
|
this.state = State.RAWTEXT;
|
|
102342
|
-
this._stateRawtext(
|
|
102342
|
+
this._stateRawtext(cp8);
|
|
102343
102343
|
}
|
|
102344
102344
|
}
|
|
102345
102345
|
// Script data less-than sign state
|
|
102346
102346
|
//------------------------------------------------------------------
|
|
102347
|
-
_stateScriptDataLessThanSign(
|
|
102348
|
-
switch (
|
|
102347
|
+
_stateScriptDataLessThanSign(cp8) {
|
|
102348
|
+
switch (cp8) {
|
|
102349
102349
|
case CODE_POINTS.SOLIDUS: {
|
|
102350
102350
|
this.state = State.SCRIPT_DATA_END_TAG_OPEN;
|
|
102351
102351
|
break;
|
|
@@ -102358,57 +102358,57 @@ var Tokenizer = class {
|
|
|
102358
102358
|
default: {
|
|
102359
102359
|
this._emitChars("<");
|
|
102360
102360
|
this.state = State.SCRIPT_DATA;
|
|
102361
|
-
this._stateScriptData(
|
|
102361
|
+
this._stateScriptData(cp8);
|
|
102362
102362
|
}
|
|
102363
102363
|
}
|
|
102364
102364
|
}
|
|
102365
102365
|
// Script data end tag open state
|
|
102366
102366
|
//------------------------------------------------------------------
|
|
102367
|
-
_stateScriptDataEndTagOpen(
|
|
102368
|
-
if (isAsciiLetter(
|
|
102367
|
+
_stateScriptDataEndTagOpen(cp8) {
|
|
102368
|
+
if (isAsciiLetter(cp8)) {
|
|
102369
102369
|
this.state = State.SCRIPT_DATA_END_TAG_NAME;
|
|
102370
|
-
this._stateScriptDataEndTagName(
|
|
102370
|
+
this._stateScriptDataEndTagName(cp8);
|
|
102371
102371
|
} else {
|
|
102372
102372
|
this._emitChars("</");
|
|
102373
102373
|
this.state = State.SCRIPT_DATA;
|
|
102374
|
-
this._stateScriptData(
|
|
102374
|
+
this._stateScriptData(cp8);
|
|
102375
102375
|
}
|
|
102376
102376
|
}
|
|
102377
102377
|
// Script data end tag name state
|
|
102378
102378
|
//------------------------------------------------------------------
|
|
102379
|
-
_stateScriptDataEndTagName(
|
|
102380
|
-
if (this.handleSpecialEndTag(
|
|
102379
|
+
_stateScriptDataEndTagName(cp8) {
|
|
102380
|
+
if (this.handleSpecialEndTag(cp8)) {
|
|
102381
102381
|
this._emitChars("</");
|
|
102382
102382
|
this.state = State.SCRIPT_DATA;
|
|
102383
|
-
this._stateScriptData(
|
|
102383
|
+
this._stateScriptData(cp8);
|
|
102384
102384
|
}
|
|
102385
102385
|
}
|
|
102386
102386
|
// Script data escape start state
|
|
102387
102387
|
//------------------------------------------------------------------
|
|
102388
|
-
_stateScriptDataEscapeStart(
|
|
102389
|
-
if (
|
|
102388
|
+
_stateScriptDataEscapeStart(cp8) {
|
|
102389
|
+
if (cp8 === CODE_POINTS.HYPHEN_MINUS) {
|
|
102390
102390
|
this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;
|
|
102391
102391
|
this._emitChars("-");
|
|
102392
102392
|
} else {
|
|
102393
102393
|
this.state = State.SCRIPT_DATA;
|
|
102394
|
-
this._stateScriptData(
|
|
102394
|
+
this._stateScriptData(cp8);
|
|
102395
102395
|
}
|
|
102396
102396
|
}
|
|
102397
102397
|
// Script data escape start dash state
|
|
102398
102398
|
//------------------------------------------------------------------
|
|
102399
|
-
_stateScriptDataEscapeStartDash(
|
|
102400
|
-
if (
|
|
102399
|
+
_stateScriptDataEscapeStartDash(cp8) {
|
|
102400
|
+
if (cp8 === CODE_POINTS.HYPHEN_MINUS) {
|
|
102401
102401
|
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
|
102402
102402
|
this._emitChars("-");
|
|
102403
102403
|
} else {
|
|
102404
102404
|
this.state = State.SCRIPT_DATA;
|
|
102405
|
-
this._stateScriptData(
|
|
102405
|
+
this._stateScriptData(cp8);
|
|
102406
102406
|
}
|
|
102407
102407
|
}
|
|
102408
102408
|
// Script data escaped state
|
|
102409
102409
|
//------------------------------------------------------------------
|
|
102410
|
-
_stateScriptDataEscaped(
|
|
102411
|
-
switch (
|
|
102410
|
+
_stateScriptDataEscaped(cp8) {
|
|
102411
|
+
switch (cp8) {
|
|
102412
102412
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102413
102413
|
this.state = State.SCRIPT_DATA_ESCAPED_DASH;
|
|
102414
102414
|
this._emitChars("-");
|
|
@@ -102429,14 +102429,14 @@ var Tokenizer = class {
|
|
|
102429
102429
|
break;
|
|
102430
102430
|
}
|
|
102431
102431
|
default: {
|
|
102432
|
-
this._emitCodePoint(
|
|
102432
|
+
this._emitCodePoint(cp8);
|
|
102433
102433
|
}
|
|
102434
102434
|
}
|
|
102435
102435
|
}
|
|
102436
102436
|
// Script data escaped dash state
|
|
102437
102437
|
//------------------------------------------------------------------
|
|
102438
|
-
_stateScriptDataEscapedDash(
|
|
102439
|
-
switch (
|
|
102438
|
+
_stateScriptDataEscapedDash(cp8) {
|
|
102439
|
+
switch (cp8) {
|
|
102440
102440
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102441
102441
|
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
|
102442
102442
|
this._emitChars("-");
|
|
@@ -102459,14 +102459,14 @@ var Tokenizer = class {
|
|
|
102459
102459
|
}
|
|
102460
102460
|
default: {
|
|
102461
102461
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102462
|
-
this._emitCodePoint(
|
|
102462
|
+
this._emitCodePoint(cp8);
|
|
102463
102463
|
}
|
|
102464
102464
|
}
|
|
102465
102465
|
}
|
|
102466
102466
|
// Script data escaped dash dash state
|
|
102467
102467
|
//------------------------------------------------------------------
|
|
102468
|
-
_stateScriptDataEscapedDashDash(
|
|
102469
|
-
switch (
|
|
102468
|
+
_stateScriptDataEscapedDashDash(cp8) {
|
|
102469
|
+
switch (cp8) {
|
|
102470
102470
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102471
102471
|
this._emitChars("-");
|
|
102472
102472
|
break;
|
|
@@ -102493,64 +102493,64 @@ var Tokenizer = class {
|
|
|
102493
102493
|
}
|
|
102494
102494
|
default: {
|
|
102495
102495
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102496
|
-
this._emitCodePoint(
|
|
102496
|
+
this._emitCodePoint(cp8);
|
|
102497
102497
|
}
|
|
102498
102498
|
}
|
|
102499
102499
|
}
|
|
102500
102500
|
// Script data escaped less-than sign state
|
|
102501
102501
|
//------------------------------------------------------------------
|
|
102502
|
-
_stateScriptDataEscapedLessThanSign(
|
|
102503
|
-
if (
|
|
102502
|
+
_stateScriptDataEscapedLessThanSign(cp8) {
|
|
102503
|
+
if (cp8 === CODE_POINTS.SOLIDUS) {
|
|
102504
102504
|
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
|
|
102505
|
-
} else if (isAsciiLetter(
|
|
102505
|
+
} else if (isAsciiLetter(cp8)) {
|
|
102506
102506
|
this._emitChars("<");
|
|
102507
102507
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
|
|
102508
|
-
this._stateScriptDataDoubleEscapeStart(
|
|
102508
|
+
this._stateScriptDataDoubleEscapeStart(cp8);
|
|
102509
102509
|
} else {
|
|
102510
102510
|
this._emitChars("<");
|
|
102511
102511
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102512
|
-
this._stateScriptDataEscaped(
|
|
102512
|
+
this._stateScriptDataEscaped(cp8);
|
|
102513
102513
|
}
|
|
102514
102514
|
}
|
|
102515
102515
|
// Script data escaped end tag open state
|
|
102516
102516
|
//------------------------------------------------------------------
|
|
102517
|
-
_stateScriptDataEscapedEndTagOpen(
|
|
102518
|
-
if (isAsciiLetter(
|
|
102517
|
+
_stateScriptDataEscapedEndTagOpen(cp8) {
|
|
102518
|
+
if (isAsciiLetter(cp8)) {
|
|
102519
102519
|
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
|
|
102520
|
-
this._stateScriptDataEscapedEndTagName(
|
|
102520
|
+
this._stateScriptDataEscapedEndTagName(cp8);
|
|
102521
102521
|
} else {
|
|
102522
102522
|
this._emitChars("</");
|
|
102523
102523
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102524
|
-
this._stateScriptDataEscaped(
|
|
102524
|
+
this._stateScriptDataEscaped(cp8);
|
|
102525
102525
|
}
|
|
102526
102526
|
}
|
|
102527
102527
|
// Script data escaped end tag name state
|
|
102528
102528
|
//------------------------------------------------------------------
|
|
102529
|
-
_stateScriptDataEscapedEndTagName(
|
|
102530
|
-
if (this.handleSpecialEndTag(
|
|
102529
|
+
_stateScriptDataEscapedEndTagName(cp8) {
|
|
102530
|
+
if (this.handleSpecialEndTag(cp8)) {
|
|
102531
102531
|
this._emitChars("</");
|
|
102532
102532
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102533
|
-
this._stateScriptDataEscaped(
|
|
102533
|
+
this._stateScriptDataEscaped(cp8);
|
|
102534
102534
|
}
|
|
102535
102535
|
}
|
|
102536
102536
|
// Script data double escape start state
|
|
102537
102537
|
//------------------------------------------------------------------
|
|
102538
|
-
_stateScriptDataDoubleEscapeStart(
|
|
102538
|
+
_stateScriptDataDoubleEscapeStart(cp8) {
|
|
102539
102539
|
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
|
102540
|
-
this._emitCodePoint(
|
|
102540
|
+
this._emitCodePoint(cp8);
|
|
102541
102541
|
for (let i3 = 0; i3 < SEQUENCES.SCRIPT.length; i3++) {
|
|
102542
102542
|
this._emitCodePoint(this._consume());
|
|
102543
102543
|
}
|
|
102544
102544
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
102545
102545
|
} else if (!this._ensureHibernation()) {
|
|
102546
102546
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102547
|
-
this._stateScriptDataEscaped(
|
|
102547
|
+
this._stateScriptDataEscaped(cp8);
|
|
102548
102548
|
}
|
|
102549
102549
|
}
|
|
102550
102550
|
// Script data double escaped state
|
|
102551
102551
|
//------------------------------------------------------------------
|
|
102552
|
-
_stateScriptDataDoubleEscaped(
|
|
102553
|
-
switch (
|
|
102552
|
+
_stateScriptDataDoubleEscaped(cp8) {
|
|
102553
|
+
switch (cp8) {
|
|
102554
102554
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102555
102555
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;
|
|
102556
102556
|
this._emitChars("-");
|
|
@@ -102572,14 +102572,14 @@ var Tokenizer = class {
|
|
|
102572
102572
|
break;
|
|
102573
102573
|
}
|
|
102574
102574
|
default: {
|
|
102575
|
-
this._emitCodePoint(
|
|
102575
|
+
this._emitCodePoint(cp8);
|
|
102576
102576
|
}
|
|
102577
102577
|
}
|
|
102578
102578
|
}
|
|
102579
102579
|
// Script data double escaped dash state
|
|
102580
102580
|
//------------------------------------------------------------------
|
|
102581
|
-
_stateScriptDataDoubleEscapedDash(
|
|
102582
|
-
switch (
|
|
102581
|
+
_stateScriptDataDoubleEscapedDash(cp8) {
|
|
102582
|
+
switch (cp8) {
|
|
102583
102583
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102584
102584
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;
|
|
102585
102585
|
this._emitChars("-");
|
|
@@ -102603,14 +102603,14 @@ var Tokenizer = class {
|
|
|
102603
102603
|
}
|
|
102604
102604
|
default: {
|
|
102605
102605
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
102606
|
-
this._emitCodePoint(
|
|
102606
|
+
this._emitCodePoint(cp8);
|
|
102607
102607
|
}
|
|
102608
102608
|
}
|
|
102609
102609
|
}
|
|
102610
102610
|
// Script data double escaped dash dash state
|
|
102611
102611
|
//------------------------------------------------------------------
|
|
102612
|
-
_stateScriptDataDoubleEscapedDashDash(
|
|
102613
|
-
switch (
|
|
102612
|
+
_stateScriptDataDoubleEscapedDashDash(cp8) {
|
|
102613
|
+
switch (cp8) {
|
|
102614
102614
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
102615
102615
|
this._emitChars("-");
|
|
102616
102616
|
break;
|
|
@@ -102638,39 +102638,39 @@ var Tokenizer = class {
|
|
|
102638
102638
|
}
|
|
102639
102639
|
default: {
|
|
102640
102640
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
102641
|
-
this._emitCodePoint(
|
|
102641
|
+
this._emitCodePoint(cp8);
|
|
102642
102642
|
}
|
|
102643
102643
|
}
|
|
102644
102644
|
}
|
|
102645
102645
|
// Script data double escaped less-than sign state
|
|
102646
102646
|
//------------------------------------------------------------------
|
|
102647
|
-
_stateScriptDataDoubleEscapedLessThanSign(
|
|
102648
|
-
if (
|
|
102647
|
+
_stateScriptDataDoubleEscapedLessThanSign(cp8) {
|
|
102648
|
+
if (cp8 === CODE_POINTS.SOLIDUS) {
|
|
102649
102649
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;
|
|
102650
102650
|
this._emitChars("/");
|
|
102651
102651
|
} else {
|
|
102652
102652
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
102653
|
-
this._stateScriptDataDoubleEscaped(
|
|
102653
|
+
this._stateScriptDataDoubleEscaped(cp8);
|
|
102654
102654
|
}
|
|
102655
102655
|
}
|
|
102656
102656
|
// Script data double escape end state
|
|
102657
102657
|
//------------------------------------------------------------------
|
|
102658
|
-
_stateScriptDataDoubleEscapeEnd(
|
|
102658
|
+
_stateScriptDataDoubleEscapeEnd(cp8) {
|
|
102659
102659
|
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
|
102660
|
-
this._emitCodePoint(
|
|
102660
|
+
this._emitCodePoint(cp8);
|
|
102661
102661
|
for (let i3 = 0; i3 < SEQUENCES.SCRIPT.length; i3++) {
|
|
102662
102662
|
this._emitCodePoint(this._consume());
|
|
102663
102663
|
}
|
|
102664
102664
|
this.state = State.SCRIPT_DATA_ESCAPED;
|
|
102665
102665
|
} else if (!this._ensureHibernation()) {
|
|
102666
102666
|
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
102667
|
-
this._stateScriptDataDoubleEscaped(
|
|
102667
|
+
this._stateScriptDataDoubleEscaped(cp8);
|
|
102668
102668
|
}
|
|
102669
102669
|
}
|
|
102670
102670
|
// Before attribute name state
|
|
102671
102671
|
//------------------------------------------------------------------
|
|
102672
|
-
_stateBeforeAttributeName(
|
|
102673
|
-
switch (
|
|
102672
|
+
_stateBeforeAttributeName(cp8) {
|
|
102673
|
+
switch (cp8) {
|
|
102674
102674
|
case CODE_POINTS.SPACE:
|
|
102675
102675
|
case CODE_POINTS.LINE_FEED:
|
|
102676
102676
|
case CODE_POINTS.TABULATION:
|
|
@@ -102681,7 +102681,7 @@ var Tokenizer = class {
|
|
|
102681
102681
|
case CODE_POINTS.GREATER_THAN_SIGN:
|
|
102682
102682
|
case CODE_POINTS.EOF: {
|
|
102683
102683
|
this.state = State.AFTER_ATTRIBUTE_NAME;
|
|
102684
|
-
this._stateAfterAttributeName(
|
|
102684
|
+
this._stateAfterAttributeName(cp8);
|
|
102685
102685
|
break;
|
|
102686
102686
|
}
|
|
102687
102687
|
case CODE_POINTS.EQUALS_SIGN: {
|
|
@@ -102693,14 +102693,14 @@ var Tokenizer = class {
|
|
|
102693
102693
|
default: {
|
|
102694
102694
|
this._createAttr("");
|
|
102695
102695
|
this.state = State.ATTRIBUTE_NAME;
|
|
102696
|
-
this._stateAttributeName(
|
|
102696
|
+
this._stateAttributeName(cp8);
|
|
102697
102697
|
}
|
|
102698
102698
|
}
|
|
102699
102699
|
}
|
|
102700
102700
|
// Attribute name state
|
|
102701
102701
|
//------------------------------------------------------------------
|
|
102702
|
-
_stateAttributeName(
|
|
102703
|
-
switch (
|
|
102702
|
+
_stateAttributeName(cp8) {
|
|
102703
|
+
switch (cp8) {
|
|
102704
102704
|
case CODE_POINTS.SPACE:
|
|
102705
102705
|
case CODE_POINTS.LINE_FEED:
|
|
102706
102706
|
case CODE_POINTS.TABULATION:
|
|
@@ -102710,7 +102710,7 @@ var Tokenizer = class {
|
|
|
102710
102710
|
case CODE_POINTS.EOF: {
|
|
102711
102711
|
this._leaveAttrName();
|
|
102712
102712
|
this.state = State.AFTER_ATTRIBUTE_NAME;
|
|
102713
|
-
this._stateAfterAttributeName(
|
|
102713
|
+
this._stateAfterAttributeName(cp8);
|
|
102714
102714
|
break;
|
|
102715
102715
|
}
|
|
102716
102716
|
case CODE_POINTS.EQUALS_SIGN: {
|
|
@@ -102722,7 +102722,7 @@ var Tokenizer = class {
|
|
|
102722
102722
|
case CODE_POINTS.APOSTROPHE:
|
|
102723
102723
|
case CODE_POINTS.LESS_THAN_SIGN: {
|
|
102724
102724
|
this._err(ERR.unexpectedCharacterInAttributeName);
|
|
102725
|
-
this.currentAttr.name += String.fromCodePoint(
|
|
102725
|
+
this.currentAttr.name += String.fromCodePoint(cp8);
|
|
102726
102726
|
break;
|
|
102727
102727
|
}
|
|
102728
102728
|
case CODE_POINTS.NULL: {
|
|
@@ -102731,14 +102731,14 @@ var Tokenizer = class {
|
|
|
102731
102731
|
break;
|
|
102732
102732
|
}
|
|
102733
102733
|
default: {
|
|
102734
|
-
this.currentAttr.name += String.fromCodePoint(isAsciiUpper(
|
|
102734
|
+
this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp8) ? toAsciiLower(cp8) : cp8);
|
|
102735
102735
|
}
|
|
102736
102736
|
}
|
|
102737
102737
|
}
|
|
102738
102738
|
// After attribute name state
|
|
102739
102739
|
//------------------------------------------------------------------
|
|
102740
|
-
_stateAfterAttributeName(
|
|
102741
|
-
switch (
|
|
102740
|
+
_stateAfterAttributeName(cp8) {
|
|
102741
|
+
switch (cp8) {
|
|
102742
102742
|
case CODE_POINTS.SPACE:
|
|
102743
102743
|
case CODE_POINTS.LINE_FEED:
|
|
102744
102744
|
case CODE_POINTS.TABULATION:
|
|
@@ -102766,14 +102766,14 @@ var Tokenizer = class {
|
|
|
102766
102766
|
default: {
|
|
102767
102767
|
this._createAttr("");
|
|
102768
102768
|
this.state = State.ATTRIBUTE_NAME;
|
|
102769
|
-
this._stateAttributeName(
|
|
102769
|
+
this._stateAttributeName(cp8);
|
|
102770
102770
|
}
|
|
102771
102771
|
}
|
|
102772
102772
|
}
|
|
102773
102773
|
// Before attribute value state
|
|
102774
102774
|
//------------------------------------------------------------------
|
|
102775
|
-
_stateBeforeAttributeValue(
|
|
102776
|
-
switch (
|
|
102775
|
+
_stateBeforeAttributeValue(cp8) {
|
|
102776
|
+
switch (cp8) {
|
|
102777
102777
|
case CODE_POINTS.SPACE:
|
|
102778
102778
|
case CODE_POINTS.LINE_FEED:
|
|
102779
102779
|
case CODE_POINTS.TABULATION:
|
|
@@ -102796,14 +102796,14 @@ var Tokenizer = class {
|
|
|
102796
102796
|
}
|
|
102797
102797
|
default: {
|
|
102798
102798
|
this.state = State.ATTRIBUTE_VALUE_UNQUOTED;
|
|
102799
|
-
this._stateAttributeValueUnquoted(
|
|
102799
|
+
this._stateAttributeValueUnquoted(cp8);
|
|
102800
102800
|
}
|
|
102801
102801
|
}
|
|
102802
102802
|
}
|
|
102803
102803
|
// Attribute value (double-quoted) state
|
|
102804
102804
|
//------------------------------------------------------------------
|
|
102805
|
-
_stateAttributeValueDoubleQuoted(
|
|
102806
|
-
switch (
|
|
102805
|
+
_stateAttributeValueDoubleQuoted(cp8) {
|
|
102806
|
+
switch (cp8) {
|
|
102807
102807
|
case CODE_POINTS.QUOTATION_MARK: {
|
|
102808
102808
|
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
|
102809
102809
|
break;
|
|
@@ -102824,14 +102824,14 @@ var Tokenizer = class {
|
|
|
102824
102824
|
break;
|
|
102825
102825
|
}
|
|
102826
102826
|
default: {
|
|
102827
|
-
this.currentAttr.value += String.fromCodePoint(
|
|
102827
|
+
this.currentAttr.value += String.fromCodePoint(cp8);
|
|
102828
102828
|
}
|
|
102829
102829
|
}
|
|
102830
102830
|
}
|
|
102831
102831
|
// Attribute value (single-quoted) state
|
|
102832
102832
|
//------------------------------------------------------------------
|
|
102833
|
-
_stateAttributeValueSingleQuoted(
|
|
102834
|
-
switch (
|
|
102833
|
+
_stateAttributeValueSingleQuoted(cp8) {
|
|
102834
|
+
switch (cp8) {
|
|
102835
102835
|
case CODE_POINTS.APOSTROPHE: {
|
|
102836
102836
|
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
|
102837
102837
|
break;
|
|
@@ -102852,14 +102852,14 @@ var Tokenizer = class {
|
|
|
102852
102852
|
break;
|
|
102853
102853
|
}
|
|
102854
102854
|
default: {
|
|
102855
|
-
this.currentAttr.value += String.fromCodePoint(
|
|
102855
|
+
this.currentAttr.value += String.fromCodePoint(cp8);
|
|
102856
102856
|
}
|
|
102857
102857
|
}
|
|
102858
102858
|
}
|
|
102859
102859
|
// Attribute value (unquoted) state
|
|
102860
102860
|
//------------------------------------------------------------------
|
|
102861
|
-
_stateAttributeValueUnquoted(
|
|
102862
|
-
switch (
|
|
102861
|
+
_stateAttributeValueUnquoted(cp8) {
|
|
102862
|
+
switch (cp8) {
|
|
102863
102863
|
case CODE_POINTS.SPACE:
|
|
102864
102864
|
case CODE_POINTS.LINE_FEED:
|
|
102865
102865
|
case CODE_POINTS.TABULATION:
|
|
@@ -102890,7 +102890,7 @@ var Tokenizer = class {
|
|
|
102890
102890
|
case CODE_POINTS.EQUALS_SIGN:
|
|
102891
102891
|
case CODE_POINTS.GRAVE_ACCENT: {
|
|
102892
102892
|
this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
|
|
102893
|
-
this.currentAttr.value += String.fromCodePoint(
|
|
102893
|
+
this.currentAttr.value += String.fromCodePoint(cp8);
|
|
102894
102894
|
break;
|
|
102895
102895
|
}
|
|
102896
102896
|
case CODE_POINTS.EOF: {
|
|
@@ -102899,14 +102899,14 @@ var Tokenizer = class {
|
|
|
102899
102899
|
break;
|
|
102900
102900
|
}
|
|
102901
102901
|
default: {
|
|
102902
|
-
this.currentAttr.value += String.fromCodePoint(
|
|
102902
|
+
this.currentAttr.value += String.fromCodePoint(cp8);
|
|
102903
102903
|
}
|
|
102904
102904
|
}
|
|
102905
102905
|
}
|
|
102906
102906
|
// After attribute value (quoted) state
|
|
102907
102907
|
//------------------------------------------------------------------
|
|
102908
|
-
_stateAfterAttributeValueQuoted(
|
|
102909
|
-
switch (
|
|
102908
|
+
_stateAfterAttributeValueQuoted(cp8) {
|
|
102909
|
+
switch (cp8) {
|
|
102910
102910
|
case CODE_POINTS.SPACE:
|
|
102911
102911
|
case CODE_POINTS.LINE_FEED:
|
|
102912
102912
|
case CODE_POINTS.TABULATION:
|
|
@@ -102934,14 +102934,14 @@ var Tokenizer = class {
|
|
|
102934
102934
|
default: {
|
|
102935
102935
|
this._err(ERR.missingWhitespaceBetweenAttributes);
|
|
102936
102936
|
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
|
102937
|
-
this._stateBeforeAttributeName(
|
|
102937
|
+
this._stateBeforeAttributeName(cp8);
|
|
102938
102938
|
}
|
|
102939
102939
|
}
|
|
102940
102940
|
}
|
|
102941
102941
|
// Self-closing start tag state
|
|
102942
102942
|
//------------------------------------------------------------------
|
|
102943
|
-
_stateSelfClosingStartTag(
|
|
102944
|
-
switch (
|
|
102943
|
+
_stateSelfClosingStartTag(cp8) {
|
|
102944
|
+
switch (cp8) {
|
|
102945
102945
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
102946
102946
|
const token = this.currentToken;
|
|
102947
102947
|
token.selfClosing = true;
|
|
@@ -102957,15 +102957,15 @@ var Tokenizer = class {
|
|
|
102957
102957
|
default: {
|
|
102958
102958
|
this._err(ERR.unexpectedSolidusInTag);
|
|
102959
102959
|
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
|
102960
|
-
this._stateBeforeAttributeName(
|
|
102960
|
+
this._stateBeforeAttributeName(cp8);
|
|
102961
102961
|
}
|
|
102962
102962
|
}
|
|
102963
102963
|
}
|
|
102964
102964
|
// Bogus comment state
|
|
102965
102965
|
//------------------------------------------------------------------
|
|
102966
|
-
_stateBogusComment(
|
|
102966
|
+
_stateBogusComment(cp8) {
|
|
102967
102967
|
const token = this.currentToken;
|
|
102968
|
-
switch (
|
|
102968
|
+
switch (cp8) {
|
|
102969
102969
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
102970
102970
|
this.state = State.DATA;
|
|
102971
102971
|
this.emitCurrentComment(token);
|
|
@@ -102982,13 +102982,13 @@ var Tokenizer = class {
|
|
|
102982
102982
|
break;
|
|
102983
102983
|
}
|
|
102984
102984
|
default: {
|
|
102985
|
-
token.data += String.fromCodePoint(
|
|
102985
|
+
token.data += String.fromCodePoint(cp8);
|
|
102986
102986
|
}
|
|
102987
102987
|
}
|
|
102988
102988
|
}
|
|
102989
102989
|
// Markup declaration open state
|
|
102990
102990
|
//------------------------------------------------------------------
|
|
102991
|
-
_stateMarkupDeclarationOpen(
|
|
102991
|
+
_stateMarkupDeclarationOpen(cp8) {
|
|
102992
102992
|
if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {
|
|
102993
102993
|
this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);
|
|
102994
102994
|
this.state = State.COMMENT_START;
|
|
@@ -103008,13 +103008,13 @@ var Tokenizer = class {
|
|
|
103008
103008
|
this._err(ERR.incorrectlyOpenedComment);
|
|
103009
103009
|
this._createCommentToken(2);
|
|
103010
103010
|
this.state = State.BOGUS_COMMENT;
|
|
103011
|
-
this._stateBogusComment(
|
|
103011
|
+
this._stateBogusComment(cp8);
|
|
103012
103012
|
}
|
|
103013
103013
|
}
|
|
103014
103014
|
// Comment start state
|
|
103015
103015
|
//------------------------------------------------------------------
|
|
103016
|
-
_stateCommentStart(
|
|
103017
|
-
switch (
|
|
103016
|
+
_stateCommentStart(cp8) {
|
|
103017
|
+
switch (cp8) {
|
|
103018
103018
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
103019
103019
|
this.state = State.COMMENT_START_DASH;
|
|
103020
103020
|
break;
|
|
@@ -103028,15 +103028,15 @@ var Tokenizer = class {
|
|
|
103028
103028
|
}
|
|
103029
103029
|
default: {
|
|
103030
103030
|
this.state = State.COMMENT;
|
|
103031
|
-
this._stateComment(
|
|
103031
|
+
this._stateComment(cp8);
|
|
103032
103032
|
}
|
|
103033
103033
|
}
|
|
103034
103034
|
}
|
|
103035
103035
|
// Comment start dash state
|
|
103036
103036
|
//------------------------------------------------------------------
|
|
103037
|
-
_stateCommentStartDash(
|
|
103037
|
+
_stateCommentStartDash(cp8) {
|
|
103038
103038
|
const token = this.currentToken;
|
|
103039
|
-
switch (
|
|
103039
|
+
switch (cp8) {
|
|
103040
103040
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
103041
103041
|
this.state = State.COMMENT_END;
|
|
103042
103042
|
break;
|
|
@@ -103056,15 +103056,15 @@ var Tokenizer = class {
|
|
|
103056
103056
|
default: {
|
|
103057
103057
|
token.data += "-";
|
|
103058
103058
|
this.state = State.COMMENT;
|
|
103059
|
-
this._stateComment(
|
|
103059
|
+
this._stateComment(cp8);
|
|
103060
103060
|
}
|
|
103061
103061
|
}
|
|
103062
103062
|
}
|
|
103063
103063
|
// Comment state
|
|
103064
103064
|
//------------------------------------------------------------------
|
|
103065
|
-
_stateComment(
|
|
103065
|
+
_stateComment(cp8) {
|
|
103066
103066
|
const token = this.currentToken;
|
|
103067
|
-
switch (
|
|
103067
|
+
switch (cp8) {
|
|
103068
103068
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
103069
103069
|
this.state = State.COMMENT_END_DASH;
|
|
103070
103070
|
break;
|
|
@@ -103086,15 +103086,15 @@ var Tokenizer = class {
|
|
|
103086
103086
|
break;
|
|
103087
103087
|
}
|
|
103088
103088
|
default: {
|
|
103089
|
-
token.data += String.fromCodePoint(
|
|
103089
|
+
token.data += String.fromCodePoint(cp8);
|
|
103090
103090
|
}
|
|
103091
103091
|
}
|
|
103092
103092
|
}
|
|
103093
103093
|
// Comment less-than sign state
|
|
103094
103094
|
//------------------------------------------------------------------
|
|
103095
|
-
_stateCommentLessThanSign(
|
|
103095
|
+
_stateCommentLessThanSign(cp8) {
|
|
103096
103096
|
const token = this.currentToken;
|
|
103097
|
-
switch (
|
|
103097
|
+
switch (cp8) {
|
|
103098
103098
|
case CODE_POINTS.EXCLAMATION_MARK: {
|
|
103099
103099
|
token.data += "!";
|
|
103100
103100
|
this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
|
|
@@ -103106,44 +103106,44 @@ var Tokenizer = class {
|
|
|
103106
103106
|
}
|
|
103107
103107
|
default: {
|
|
103108
103108
|
this.state = State.COMMENT;
|
|
103109
|
-
this._stateComment(
|
|
103109
|
+
this._stateComment(cp8);
|
|
103110
103110
|
}
|
|
103111
103111
|
}
|
|
103112
103112
|
}
|
|
103113
103113
|
// Comment less-than sign bang state
|
|
103114
103114
|
//------------------------------------------------------------------
|
|
103115
|
-
_stateCommentLessThanSignBang(
|
|
103116
|
-
if (
|
|
103115
|
+
_stateCommentLessThanSignBang(cp8) {
|
|
103116
|
+
if (cp8 === CODE_POINTS.HYPHEN_MINUS) {
|
|
103117
103117
|
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;
|
|
103118
103118
|
} else {
|
|
103119
103119
|
this.state = State.COMMENT;
|
|
103120
|
-
this._stateComment(
|
|
103120
|
+
this._stateComment(cp8);
|
|
103121
103121
|
}
|
|
103122
103122
|
}
|
|
103123
103123
|
// Comment less-than sign bang dash state
|
|
103124
103124
|
//------------------------------------------------------------------
|
|
103125
|
-
_stateCommentLessThanSignBangDash(
|
|
103126
|
-
if (
|
|
103125
|
+
_stateCommentLessThanSignBangDash(cp8) {
|
|
103126
|
+
if (cp8 === CODE_POINTS.HYPHEN_MINUS) {
|
|
103127
103127
|
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;
|
|
103128
103128
|
} else {
|
|
103129
103129
|
this.state = State.COMMENT_END_DASH;
|
|
103130
|
-
this._stateCommentEndDash(
|
|
103130
|
+
this._stateCommentEndDash(cp8);
|
|
103131
103131
|
}
|
|
103132
103132
|
}
|
|
103133
103133
|
// Comment less-than sign bang dash dash state
|
|
103134
103134
|
//------------------------------------------------------------------
|
|
103135
|
-
_stateCommentLessThanSignBangDashDash(
|
|
103136
|
-
if (
|
|
103135
|
+
_stateCommentLessThanSignBangDashDash(cp8) {
|
|
103136
|
+
if (cp8 !== CODE_POINTS.GREATER_THAN_SIGN && cp8 !== CODE_POINTS.EOF) {
|
|
103137
103137
|
this._err(ERR.nestedComment);
|
|
103138
103138
|
}
|
|
103139
103139
|
this.state = State.COMMENT_END;
|
|
103140
|
-
this._stateCommentEnd(
|
|
103140
|
+
this._stateCommentEnd(cp8);
|
|
103141
103141
|
}
|
|
103142
103142
|
// Comment end dash state
|
|
103143
103143
|
//------------------------------------------------------------------
|
|
103144
|
-
_stateCommentEndDash(
|
|
103144
|
+
_stateCommentEndDash(cp8) {
|
|
103145
103145
|
const token = this.currentToken;
|
|
103146
|
-
switch (
|
|
103146
|
+
switch (cp8) {
|
|
103147
103147
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
103148
103148
|
this.state = State.COMMENT_END;
|
|
103149
103149
|
break;
|
|
@@ -103157,15 +103157,15 @@ var Tokenizer = class {
|
|
|
103157
103157
|
default: {
|
|
103158
103158
|
token.data += "-";
|
|
103159
103159
|
this.state = State.COMMENT;
|
|
103160
|
-
this._stateComment(
|
|
103160
|
+
this._stateComment(cp8);
|
|
103161
103161
|
}
|
|
103162
103162
|
}
|
|
103163
103163
|
}
|
|
103164
103164
|
// Comment end state
|
|
103165
103165
|
//------------------------------------------------------------------
|
|
103166
|
-
_stateCommentEnd(
|
|
103166
|
+
_stateCommentEnd(cp8) {
|
|
103167
103167
|
const token = this.currentToken;
|
|
103168
|
-
switch (
|
|
103168
|
+
switch (cp8) {
|
|
103169
103169
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
103170
103170
|
this.state = State.DATA;
|
|
103171
103171
|
this.emitCurrentComment(token);
|
|
@@ -103188,15 +103188,15 @@ var Tokenizer = class {
|
|
|
103188
103188
|
default: {
|
|
103189
103189
|
token.data += "--";
|
|
103190
103190
|
this.state = State.COMMENT;
|
|
103191
|
-
this._stateComment(
|
|
103191
|
+
this._stateComment(cp8);
|
|
103192
103192
|
}
|
|
103193
103193
|
}
|
|
103194
103194
|
}
|
|
103195
103195
|
// Comment end bang state
|
|
103196
103196
|
//------------------------------------------------------------------
|
|
103197
|
-
_stateCommentEndBang(
|
|
103197
|
+
_stateCommentEndBang(cp8) {
|
|
103198
103198
|
const token = this.currentToken;
|
|
103199
|
-
switch (
|
|
103199
|
+
switch (cp8) {
|
|
103200
103200
|
case CODE_POINTS.HYPHEN_MINUS: {
|
|
103201
103201
|
token.data += "--!";
|
|
103202
103202
|
this.state = State.COMMENT_END_DASH;
|
|
@@ -103217,14 +103217,14 @@ var Tokenizer = class {
|
|
|
103217
103217
|
default: {
|
|
103218
103218
|
token.data += "--!";
|
|
103219
103219
|
this.state = State.COMMENT;
|
|
103220
|
-
this._stateComment(
|
|
103220
|
+
this._stateComment(cp8);
|
|
103221
103221
|
}
|
|
103222
103222
|
}
|
|
103223
103223
|
}
|
|
103224
103224
|
// DOCTYPE state
|
|
103225
103225
|
//------------------------------------------------------------------
|
|
103226
|
-
_stateDoctype(
|
|
103227
|
-
switch (
|
|
103226
|
+
_stateDoctype(cp8) {
|
|
103227
|
+
switch (cp8) {
|
|
103228
103228
|
case CODE_POINTS.SPACE:
|
|
103229
103229
|
case CODE_POINTS.LINE_FEED:
|
|
103230
103230
|
case CODE_POINTS.TABULATION:
|
|
@@ -103234,7 +103234,7 @@ var Tokenizer = class {
|
|
|
103234
103234
|
}
|
|
103235
103235
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
103236
103236
|
this.state = State.BEFORE_DOCTYPE_NAME;
|
|
103237
|
-
this._stateBeforeDoctypeName(
|
|
103237
|
+
this._stateBeforeDoctypeName(cp8);
|
|
103238
103238
|
break;
|
|
103239
103239
|
}
|
|
103240
103240
|
case CODE_POINTS.EOF: {
|
|
@@ -103249,18 +103249,18 @@ var Tokenizer = class {
|
|
|
103249
103249
|
default: {
|
|
103250
103250
|
this._err(ERR.missingWhitespaceBeforeDoctypeName);
|
|
103251
103251
|
this.state = State.BEFORE_DOCTYPE_NAME;
|
|
103252
|
-
this._stateBeforeDoctypeName(
|
|
103252
|
+
this._stateBeforeDoctypeName(cp8);
|
|
103253
103253
|
}
|
|
103254
103254
|
}
|
|
103255
103255
|
}
|
|
103256
103256
|
// Before DOCTYPE name state
|
|
103257
103257
|
//------------------------------------------------------------------
|
|
103258
|
-
_stateBeforeDoctypeName(
|
|
103259
|
-
if (isAsciiUpper(
|
|
103260
|
-
this._createDoctypeToken(String.fromCharCode(toAsciiLower(
|
|
103258
|
+
_stateBeforeDoctypeName(cp8) {
|
|
103259
|
+
if (isAsciiUpper(cp8)) {
|
|
103260
|
+
this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp8)));
|
|
103261
103261
|
this.state = State.DOCTYPE_NAME;
|
|
103262
103262
|
} else
|
|
103263
|
-
switch (
|
|
103263
|
+
switch (cp8) {
|
|
103264
103264
|
case CODE_POINTS.SPACE:
|
|
103265
103265
|
case CODE_POINTS.LINE_FEED:
|
|
103266
103266
|
case CODE_POINTS.TABULATION:
|
|
@@ -103292,16 +103292,16 @@ var Tokenizer = class {
|
|
|
103292
103292
|
break;
|
|
103293
103293
|
}
|
|
103294
103294
|
default: {
|
|
103295
|
-
this._createDoctypeToken(String.fromCodePoint(
|
|
103295
|
+
this._createDoctypeToken(String.fromCodePoint(cp8));
|
|
103296
103296
|
this.state = State.DOCTYPE_NAME;
|
|
103297
103297
|
}
|
|
103298
103298
|
}
|
|
103299
103299
|
}
|
|
103300
103300
|
// DOCTYPE name state
|
|
103301
103301
|
//------------------------------------------------------------------
|
|
103302
|
-
_stateDoctypeName(
|
|
103302
|
+
_stateDoctypeName(cp8) {
|
|
103303
103303
|
const token = this.currentToken;
|
|
103304
|
-
switch (
|
|
103304
|
+
switch (cp8) {
|
|
103305
103305
|
case CODE_POINTS.SPACE:
|
|
103306
103306
|
case CODE_POINTS.LINE_FEED:
|
|
103307
103307
|
case CODE_POINTS.TABULATION:
|
|
@@ -103327,15 +103327,15 @@ var Tokenizer = class {
|
|
|
103327
103327
|
break;
|
|
103328
103328
|
}
|
|
103329
103329
|
default: {
|
|
103330
|
-
token.name += String.fromCodePoint(isAsciiUpper(
|
|
103330
|
+
token.name += String.fromCodePoint(isAsciiUpper(cp8) ? toAsciiLower(cp8) : cp8);
|
|
103331
103331
|
}
|
|
103332
103332
|
}
|
|
103333
103333
|
}
|
|
103334
103334
|
// After DOCTYPE name state
|
|
103335
103335
|
//------------------------------------------------------------------
|
|
103336
|
-
_stateAfterDoctypeName(
|
|
103336
|
+
_stateAfterDoctypeName(cp8) {
|
|
103337
103337
|
const token = this.currentToken;
|
|
103338
|
-
switch (
|
|
103338
|
+
switch (cp8) {
|
|
103339
103339
|
case CODE_POINTS.SPACE:
|
|
103340
103340
|
case CODE_POINTS.LINE_FEED:
|
|
103341
103341
|
case CODE_POINTS.TABULATION:
|
|
@@ -103363,16 +103363,16 @@ var Tokenizer = class {
|
|
|
103363
103363
|
this._err(ERR.invalidCharacterSequenceAfterDoctypeName);
|
|
103364
103364
|
token.forceQuirks = true;
|
|
103365
103365
|
this.state = State.BOGUS_DOCTYPE;
|
|
103366
|
-
this._stateBogusDoctype(
|
|
103366
|
+
this._stateBogusDoctype(cp8);
|
|
103367
103367
|
}
|
|
103368
103368
|
}
|
|
103369
103369
|
}
|
|
103370
103370
|
}
|
|
103371
103371
|
// After DOCTYPE public keyword state
|
|
103372
103372
|
//------------------------------------------------------------------
|
|
103373
|
-
_stateAfterDoctypePublicKeyword(
|
|
103373
|
+
_stateAfterDoctypePublicKeyword(cp8) {
|
|
103374
103374
|
const token = this.currentToken;
|
|
103375
|
-
switch (
|
|
103375
|
+
switch (cp8) {
|
|
103376
103376
|
case CODE_POINTS.SPACE:
|
|
103377
103377
|
case CODE_POINTS.LINE_FEED:
|
|
103378
103378
|
case CODE_POINTS.TABULATION:
|
|
@@ -103410,15 +103410,15 @@ var Tokenizer = class {
|
|
|
103410
103410
|
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
|
103411
103411
|
token.forceQuirks = true;
|
|
103412
103412
|
this.state = State.BOGUS_DOCTYPE;
|
|
103413
|
-
this._stateBogusDoctype(
|
|
103413
|
+
this._stateBogusDoctype(cp8);
|
|
103414
103414
|
}
|
|
103415
103415
|
}
|
|
103416
103416
|
}
|
|
103417
103417
|
// Before DOCTYPE public identifier state
|
|
103418
103418
|
//------------------------------------------------------------------
|
|
103419
|
-
_stateBeforeDoctypePublicIdentifier(
|
|
103419
|
+
_stateBeforeDoctypePublicIdentifier(cp8) {
|
|
103420
103420
|
const token = this.currentToken;
|
|
103421
|
-
switch (
|
|
103421
|
+
switch (cp8) {
|
|
103422
103422
|
case CODE_POINTS.SPACE:
|
|
103423
103423
|
case CODE_POINTS.LINE_FEED:
|
|
103424
103424
|
case CODE_POINTS.TABULATION:
|
|
@@ -103453,15 +103453,15 @@ var Tokenizer = class {
|
|
|
103453
103453
|
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
|
103454
103454
|
token.forceQuirks = true;
|
|
103455
103455
|
this.state = State.BOGUS_DOCTYPE;
|
|
103456
|
-
this._stateBogusDoctype(
|
|
103456
|
+
this._stateBogusDoctype(cp8);
|
|
103457
103457
|
}
|
|
103458
103458
|
}
|
|
103459
103459
|
}
|
|
103460
103460
|
// DOCTYPE public identifier (double-quoted) state
|
|
103461
103461
|
//------------------------------------------------------------------
|
|
103462
|
-
_stateDoctypePublicIdentifierDoubleQuoted(
|
|
103462
|
+
_stateDoctypePublicIdentifierDoubleQuoted(cp8) {
|
|
103463
103463
|
const token = this.currentToken;
|
|
103464
|
-
switch (
|
|
103464
|
+
switch (cp8) {
|
|
103465
103465
|
case CODE_POINTS.QUOTATION_MARK: {
|
|
103466
103466
|
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
|
103467
103467
|
break;
|
|
@@ -103486,15 +103486,15 @@ var Tokenizer = class {
|
|
|
103486
103486
|
break;
|
|
103487
103487
|
}
|
|
103488
103488
|
default: {
|
|
103489
|
-
token.publicId += String.fromCodePoint(
|
|
103489
|
+
token.publicId += String.fromCodePoint(cp8);
|
|
103490
103490
|
}
|
|
103491
103491
|
}
|
|
103492
103492
|
}
|
|
103493
103493
|
// DOCTYPE public identifier (single-quoted) state
|
|
103494
103494
|
//------------------------------------------------------------------
|
|
103495
|
-
_stateDoctypePublicIdentifierSingleQuoted(
|
|
103495
|
+
_stateDoctypePublicIdentifierSingleQuoted(cp8) {
|
|
103496
103496
|
const token = this.currentToken;
|
|
103497
|
-
switch (
|
|
103497
|
+
switch (cp8) {
|
|
103498
103498
|
case CODE_POINTS.APOSTROPHE: {
|
|
103499
103499
|
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
|
103500
103500
|
break;
|
|
@@ -103519,15 +103519,15 @@ var Tokenizer = class {
|
|
|
103519
103519
|
break;
|
|
103520
103520
|
}
|
|
103521
103521
|
default: {
|
|
103522
|
-
token.publicId += String.fromCodePoint(
|
|
103522
|
+
token.publicId += String.fromCodePoint(cp8);
|
|
103523
103523
|
}
|
|
103524
103524
|
}
|
|
103525
103525
|
}
|
|
103526
103526
|
// After DOCTYPE public identifier state
|
|
103527
103527
|
//------------------------------------------------------------------
|
|
103528
|
-
_stateAfterDoctypePublicIdentifier(
|
|
103528
|
+
_stateAfterDoctypePublicIdentifier(cp8) {
|
|
103529
103529
|
const token = this.currentToken;
|
|
103530
|
-
switch (
|
|
103530
|
+
switch (cp8) {
|
|
103531
103531
|
case CODE_POINTS.SPACE:
|
|
103532
103532
|
case CODE_POINTS.LINE_FEED:
|
|
103533
103533
|
case CODE_POINTS.TABULATION:
|
|
@@ -103563,15 +103563,15 @@ var Tokenizer = class {
|
|
|
103563
103563
|
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
103564
103564
|
token.forceQuirks = true;
|
|
103565
103565
|
this.state = State.BOGUS_DOCTYPE;
|
|
103566
|
-
this._stateBogusDoctype(
|
|
103566
|
+
this._stateBogusDoctype(cp8);
|
|
103567
103567
|
}
|
|
103568
103568
|
}
|
|
103569
103569
|
}
|
|
103570
103570
|
// Between DOCTYPE public and system identifiers state
|
|
103571
103571
|
//------------------------------------------------------------------
|
|
103572
|
-
_stateBetweenDoctypePublicAndSystemIdentifiers(
|
|
103572
|
+
_stateBetweenDoctypePublicAndSystemIdentifiers(cp8) {
|
|
103573
103573
|
const token = this.currentToken;
|
|
103574
|
-
switch (
|
|
103574
|
+
switch (cp8) {
|
|
103575
103575
|
case CODE_POINTS.SPACE:
|
|
103576
103576
|
case CODE_POINTS.LINE_FEED:
|
|
103577
103577
|
case CODE_POINTS.TABULATION:
|
|
@@ -103604,15 +103604,15 @@ var Tokenizer = class {
|
|
|
103604
103604
|
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
103605
103605
|
token.forceQuirks = true;
|
|
103606
103606
|
this.state = State.BOGUS_DOCTYPE;
|
|
103607
|
-
this._stateBogusDoctype(
|
|
103607
|
+
this._stateBogusDoctype(cp8);
|
|
103608
103608
|
}
|
|
103609
103609
|
}
|
|
103610
103610
|
}
|
|
103611
103611
|
// After DOCTYPE system keyword state
|
|
103612
103612
|
//------------------------------------------------------------------
|
|
103613
|
-
_stateAfterDoctypeSystemKeyword(
|
|
103613
|
+
_stateAfterDoctypeSystemKeyword(cp8) {
|
|
103614
103614
|
const token = this.currentToken;
|
|
103615
|
-
switch (
|
|
103615
|
+
switch (cp8) {
|
|
103616
103616
|
case CODE_POINTS.SPACE:
|
|
103617
103617
|
case CODE_POINTS.LINE_FEED:
|
|
103618
103618
|
case CODE_POINTS.TABULATION:
|
|
@@ -103650,15 +103650,15 @@ var Tokenizer = class {
|
|
|
103650
103650
|
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
103651
103651
|
token.forceQuirks = true;
|
|
103652
103652
|
this.state = State.BOGUS_DOCTYPE;
|
|
103653
|
-
this._stateBogusDoctype(
|
|
103653
|
+
this._stateBogusDoctype(cp8);
|
|
103654
103654
|
}
|
|
103655
103655
|
}
|
|
103656
103656
|
}
|
|
103657
103657
|
// Before DOCTYPE system identifier state
|
|
103658
103658
|
//------------------------------------------------------------------
|
|
103659
|
-
_stateBeforeDoctypeSystemIdentifier(
|
|
103659
|
+
_stateBeforeDoctypeSystemIdentifier(cp8) {
|
|
103660
103660
|
const token = this.currentToken;
|
|
103661
|
-
switch (
|
|
103661
|
+
switch (cp8) {
|
|
103662
103662
|
case CODE_POINTS.SPACE:
|
|
103663
103663
|
case CODE_POINTS.LINE_FEED:
|
|
103664
103664
|
case CODE_POINTS.TABULATION:
|
|
@@ -103693,15 +103693,15 @@ var Tokenizer = class {
|
|
|
103693
103693
|
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
103694
103694
|
token.forceQuirks = true;
|
|
103695
103695
|
this.state = State.BOGUS_DOCTYPE;
|
|
103696
|
-
this._stateBogusDoctype(
|
|
103696
|
+
this._stateBogusDoctype(cp8);
|
|
103697
103697
|
}
|
|
103698
103698
|
}
|
|
103699
103699
|
}
|
|
103700
103700
|
// DOCTYPE system identifier (double-quoted) state
|
|
103701
103701
|
//------------------------------------------------------------------
|
|
103702
|
-
_stateDoctypeSystemIdentifierDoubleQuoted(
|
|
103702
|
+
_stateDoctypeSystemIdentifierDoubleQuoted(cp8) {
|
|
103703
103703
|
const token = this.currentToken;
|
|
103704
|
-
switch (
|
|
103704
|
+
switch (cp8) {
|
|
103705
103705
|
case CODE_POINTS.QUOTATION_MARK: {
|
|
103706
103706
|
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
|
103707
103707
|
break;
|
|
@@ -103726,15 +103726,15 @@ var Tokenizer = class {
|
|
|
103726
103726
|
break;
|
|
103727
103727
|
}
|
|
103728
103728
|
default: {
|
|
103729
|
-
token.systemId += String.fromCodePoint(
|
|
103729
|
+
token.systemId += String.fromCodePoint(cp8);
|
|
103730
103730
|
}
|
|
103731
103731
|
}
|
|
103732
103732
|
}
|
|
103733
103733
|
// DOCTYPE system identifier (single-quoted) state
|
|
103734
103734
|
//------------------------------------------------------------------
|
|
103735
|
-
_stateDoctypeSystemIdentifierSingleQuoted(
|
|
103735
|
+
_stateDoctypeSystemIdentifierSingleQuoted(cp8) {
|
|
103736
103736
|
const token = this.currentToken;
|
|
103737
|
-
switch (
|
|
103737
|
+
switch (cp8) {
|
|
103738
103738
|
case CODE_POINTS.APOSTROPHE: {
|
|
103739
103739
|
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
|
103740
103740
|
break;
|
|
@@ -103759,15 +103759,15 @@ var Tokenizer = class {
|
|
|
103759
103759
|
break;
|
|
103760
103760
|
}
|
|
103761
103761
|
default: {
|
|
103762
|
-
token.systemId += String.fromCodePoint(
|
|
103762
|
+
token.systemId += String.fromCodePoint(cp8);
|
|
103763
103763
|
}
|
|
103764
103764
|
}
|
|
103765
103765
|
}
|
|
103766
103766
|
// After DOCTYPE system identifier state
|
|
103767
103767
|
//------------------------------------------------------------------
|
|
103768
|
-
_stateAfterDoctypeSystemIdentifier(
|
|
103768
|
+
_stateAfterDoctypeSystemIdentifier(cp8) {
|
|
103769
103769
|
const token = this.currentToken;
|
|
103770
|
-
switch (
|
|
103770
|
+
switch (cp8) {
|
|
103771
103771
|
case CODE_POINTS.SPACE:
|
|
103772
103772
|
case CODE_POINTS.LINE_FEED:
|
|
103773
103773
|
case CODE_POINTS.TABULATION:
|
|
@@ -103789,15 +103789,15 @@ var Tokenizer = class {
|
|
|
103789
103789
|
default: {
|
|
103790
103790
|
this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);
|
|
103791
103791
|
this.state = State.BOGUS_DOCTYPE;
|
|
103792
|
-
this._stateBogusDoctype(
|
|
103792
|
+
this._stateBogusDoctype(cp8);
|
|
103793
103793
|
}
|
|
103794
103794
|
}
|
|
103795
103795
|
}
|
|
103796
103796
|
// Bogus DOCTYPE state
|
|
103797
103797
|
//------------------------------------------------------------------
|
|
103798
|
-
_stateBogusDoctype(
|
|
103798
|
+
_stateBogusDoctype(cp8) {
|
|
103799
103799
|
const token = this.currentToken;
|
|
103800
|
-
switch (
|
|
103800
|
+
switch (cp8) {
|
|
103801
103801
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
103802
103802
|
this.emitCurrentDoctype(token);
|
|
103803
103803
|
this.state = State.DATA;
|
|
@@ -103817,8 +103817,8 @@ var Tokenizer = class {
|
|
|
103817
103817
|
}
|
|
103818
103818
|
// CDATA section state
|
|
103819
103819
|
//------------------------------------------------------------------
|
|
103820
|
-
_stateCdataSection(
|
|
103821
|
-
switch (
|
|
103820
|
+
_stateCdataSection(cp8) {
|
|
103821
|
+
switch (cp8) {
|
|
103822
103822
|
case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
|
|
103823
103823
|
this.state = State.CDATA_SECTION_BRACKET;
|
|
103824
103824
|
break;
|
|
@@ -103829,25 +103829,25 @@ var Tokenizer = class {
|
|
|
103829
103829
|
break;
|
|
103830
103830
|
}
|
|
103831
103831
|
default: {
|
|
103832
|
-
this._emitCodePoint(
|
|
103832
|
+
this._emitCodePoint(cp8);
|
|
103833
103833
|
}
|
|
103834
103834
|
}
|
|
103835
103835
|
}
|
|
103836
103836
|
// CDATA section bracket state
|
|
103837
103837
|
//------------------------------------------------------------------
|
|
103838
|
-
_stateCdataSectionBracket(
|
|
103839
|
-
if (
|
|
103838
|
+
_stateCdataSectionBracket(cp8) {
|
|
103839
|
+
if (cp8 === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
|
|
103840
103840
|
this.state = State.CDATA_SECTION_END;
|
|
103841
103841
|
} else {
|
|
103842
103842
|
this._emitChars("]");
|
|
103843
103843
|
this.state = State.CDATA_SECTION;
|
|
103844
|
-
this._stateCdataSection(
|
|
103844
|
+
this._stateCdataSection(cp8);
|
|
103845
103845
|
}
|
|
103846
103846
|
}
|
|
103847
103847
|
// CDATA section end state
|
|
103848
103848
|
//------------------------------------------------------------------
|
|
103849
|
-
_stateCdataSectionEnd(
|
|
103850
|
-
switch (
|
|
103849
|
+
_stateCdataSectionEnd(cp8) {
|
|
103850
|
+
switch (cp8) {
|
|
103851
103851
|
case CODE_POINTS.GREATER_THAN_SIGN: {
|
|
103852
103852
|
this.state = State.DATA;
|
|
103853
103853
|
break;
|
|
@@ -103859,27 +103859,27 @@ var Tokenizer = class {
|
|
|
103859
103859
|
default: {
|
|
103860
103860
|
this._emitChars("]]");
|
|
103861
103861
|
this.state = State.CDATA_SECTION;
|
|
103862
|
-
this._stateCdataSection(
|
|
103862
|
+
this._stateCdataSection(cp8);
|
|
103863
103863
|
}
|
|
103864
103864
|
}
|
|
103865
103865
|
}
|
|
103866
103866
|
// Character reference state
|
|
103867
103867
|
//------------------------------------------------------------------
|
|
103868
|
-
_stateCharacterReference(
|
|
103869
|
-
if (
|
|
103868
|
+
_stateCharacterReference(cp8) {
|
|
103869
|
+
if (cp8 === CODE_POINTS.NUMBER_SIGN) {
|
|
103870
103870
|
this.state = State.NUMERIC_CHARACTER_REFERENCE;
|
|
103871
|
-
} else if (isAsciiAlphaNumeric2(
|
|
103871
|
+
} else if (isAsciiAlphaNumeric2(cp8)) {
|
|
103872
103872
|
this.state = State.NAMED_CHARACTER_REFERENCE;
|
|
103873
|
-
this._stateNamedCharacterReference(
|
|
103873
|
+
this._stateNamedCharacterReference(cp8);
|
|
103874
103874
|
} else {
|
|
103875
103875
|
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
|
103876
|
-
this._reconsumeInState(this.returnState,
|
|
103876
|
+
this._reconsumeInState(this.returnState, cp8);
|
|
103877
103877
|
}
|
|
103878
103878
|
}
|
|
103879
103879
|
// Named character reference state
|
|
103880
103880
|
//------------------------------------------------------------------
|
|
103881
|
-
_stateNamedCharacterReference(
|
|
103882
|
-
const matchResult = this._matchNamedCharacterReference(
|
|
103881
|
+
_stateNamedCharacterReference(cp8) {
|
|
103882
|
+
const matchResult = this._matchNamedCharacterReference(cp8);
|
|
103883
103883
|
if (this._ensureHibernation()) {
|
|
103884
103884
|
} else if (matchResult) {
|
|
103885
103885
|
for (let i3 = 0; i3 < matchResult.length; i3++) {
|
|
@@ -103893,38 +103893,38 @@ var Tokenizer = class {
|
|
|
103893
103893
|
}
|
|
103894
103894
|
// Ambiguos ampersand state
|
|
103895
103895
|
//------------------------------------------------------------------
|
|
103896
|
-
_stateAmbiguousAmpersand(
|
|
103897
|
-
if (isAsciiAlphaNumeric2(
|
|
103898
|
-
this._flushCodePointConsumedAsCharacterReference(
|
|
103896
|
+
_stateAmbiguousAmpersand(cp8) {
|
|
103897
|
+
if (isAsciiAlphaNumeric2(cp8)) {
|
|
103898
|
+
this._flushCodePointConsumedAsCharacterReference(cp8);
|
|
103899
103899
|
} else {
|
|
103900
|
-
if (
|
|
103900
|
+
if (cp8 === CODE_POINTS.SEMICOLON) {
|
|
103901
103901
|
this._err(ERR.unknownNamedCharacterReference);
|
|
103902
103902
|
}
|
|
103903
|
-
this._reconsumeInState(this.returnState,
|
|
103903
|
+
this._reconsumeInState(this.returnState, cp8);
|
|
103904
103904
|
}
|
|
103905
103905
|
}
|
|
103906
103906
|
// Numeric character reference state
|
|
103907
103907
|
//------------------------------------------------------------------
|
|
103908
|
-
_stateNumericCharacterReference(
|
|
103908
|
+
_stateNumericCharacterReference(cp8) {
|
|
103909
103909
|
this.charRefCode = 0;
|
|
103910
|
-
if (
|
|
103910
|
+
if (cp8 === CODE_POINTS.LATIN_SMALL_X || cp8 === CODE_POINTS.LATIN_CAPITAL_X) {
|
|
103911
103911
|
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;
|
|
103912
|
-
} else if (isAsciiDigit(
|
|
103912
|
+
} else if (isAsciiDigit(cp8)) {
|
|
103913
103913
|
this.state = State.DECIMAL_CHARACTER_REFERENCE;
|
|
103914
|
-
this._stateDecimalCharacterReference(
|
|
103914
|
+
this._stateDecimalCharacterReference(cp8);
|
|
103915
103915
|
} else {
|
|
103916
103916
|
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
|
103917
103917
|
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
|
103918
103918
|
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);
|
|
103919
|
-
this._reconsumeInState(this.returnState,
|
|
103919
|
+
this._reconsumeInState(this.returnState, cp8);
|
|
103920
103920
|
}
|
|
103921
103921
|
}
|
|
103922
103922
|
// Hexademical character reference start state
|
|
103923
103923
|
//------------------------------------------------------------------
|
|
103924
|
-
_stateHexademicalCharacterReferenceStart(
|
|
103925
|
-
if (isAsciiHexDigit(
|
|
103924
|
+
_stateHexademicalCharacterReferenceStart(cp8) {
|
|
103925
|
+
if (isAsciiHexDigit(cp8)) {
|
|
103926
103926
|
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;
|
|
103927
|
-
this._stateHexademicalCharacterReference(
|
|
103927
|
+
this._stateHexademicalCharacterReference(cp8);
|
|
103928
103928
|
} else {
|
|
103929
103929
|
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
|
103930
103930
|
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
|
@@ -103935,37 +103935,37 @@ var Tokenizer = class {
|
|
|
103935
103935
|
}
|
|
103936
103936
|
// Hexademical character reference state
|
|
103937
103937
|
//------------------------------------------------------------------
|
|
103938
|
-
_stateHexademicalCharacterReference(
|
|
103939
|
-
if (isAsciiUpperHexDigit(
|
|
103940
|
-
this.charRefCode = this.charRefCode * 16 +
|
|
103941
|
-
} else if (isAsciiLowerHexDigit(
|
|
103942
|
-
this.charRefCode = this.charRefCode * 16 +
|
|
103943
|
-
} else if (isAsciiDigit(
|
|
103944
|
-
this.charRefCode = this.charRefCode * 16 +
|
|
103945
|
-
} else if (
|
|
103938
|
+
_stateHexademicalCharacterReference(cp8) {
|
|
103939
|
+
if (isAsciiUpperHexDigit(cp8)) {
|
|
103940
|
+
this.charRefCode = this.charRefCode * 16 + cp8 - 55;
|
|
103941
|
+
} else if (isAsciiLowerHexDigit(cp8)) {
|
|
103942
|
+
this.charRefCode = this.charRefCode * 16 + cp8 - 87;
|
|
103943
|
+
} else if (isAsciiDigit(cp8)) {
|
|
103944
|
+
this.charRefCode = this.charRefCode * 16 + cp8 - 48;
|
|
103945
|
+
} else if (cp8 === CODE_POINTS.SEMICOLON) {
|
|
103946
103946
|
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
|
103947
103947
|
} else {
|
|
103948
103948
|
this._err(ERR.missingSemicolonAfterCharacterReference);
|
|
103949
103949
|
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
|
103950
|
-
this._stateNumericCharacterReferenceEnd(
|
|
103950
|
+
this._stateNumericCharacterReferenceEnd(cp8);
|
|
103951
103951
|
}
|
|
103952
103952
|
}
|
|
103953
103953
|
// Decimal character reference state
|
|
103954
103954
|
//------------------------------------------------------------------
|
|
103955
|
-
_stateDecimalCharacterReference(
|
|
103956
|
-
if (isAsciiDigit(
|
|
103957
|
-
this.charRefCode = this.charRefCode * 10 +
|
|
103958
|
-
} else if (
|
|
103955
|
+
_stateDecimalCharacterReference(cp8) {
|
|
103956
|
+
if (isAsciiDigit(cp8)) {
|
|
103957
|
+
this.charRefCode = this.charRefCode * 10 + cp8 - 48;
|
|
103958
|
+
} else if (cp8 === CODE_POINTS.SEMICOLON) {
|
|
103959
103959
|
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
|
103960
103960
|
} else {
|
|
103961
103961
|
this._err(ERR.missingSemicolonAfterCharacterReference);
|
|
103962
103962
|
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
|
103963
|
-
this._stateNumericCharacterReferenceEnd(
|
|
103963
|
+
this._stateNumericCharacterReferenceEnd(cp8);
|
|
103964
103964
|
}
|
|
103965
103965
|
}
|
|
103966
103966
|
// Numeric character reference end state
|
|
103967
103967
|
//------------------------------------------------------------------
|
|
103968
|
-
_stateNumericCharacterReferenceEnd(
|
|
103968
|
+
_stateNumericCharacterReferenceEnd(cp8) {
|
|
103969
103969
|
if (this.charRefCode === CODE_POINTS.NULL) {
|
|
103970
103970
|
this._err(ERR.nullCharacterReference);
|
|
103971
103971
|
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
|
@@ -103985,7 +103985,7 @@ var Tokenizer = class {
|
|
|
103985
103985
|
}
|
|
103986
103986
|
}
|
|
103987
103987
|
this._flushCodePointConsumedAsCharacterReference(this.charRefCode);
|
|
103988
|
-
this._reconsumeInState(this.returnState,
|
|
103988
|
+
this._reconsumeInState(this.returnState, cp8);
|
|
103989
103989
|
}
|
|
103990
103990
|
};
|
|
103991
103991
|
|
|
@@ -109008,11 +109008,11 @@ var Tokenizer2 = class {
|
|
|
109008
109008
|
this.cbs.ontext(start, endIndex);
|
|
109009
109009
|
}
|
|
109010
109010
|
}
|
|
109011
|
-
emitCodePoint(
|
|
109011
|
+
emitCodePoint(cp8) {
|
|
109012
109012
|
if (this.baseState !== State2.Text && this.baseState !== State2.InSpecialTag) {
|
|
109013
|
-
this.cbs.onattribentity(
|
|
109013
|
+
this.cbs.onattribentity(cp8);
|
|
109014
109014
|
} else {
|
|
109015
|
-
this.cbs.ontextentity(
|
|
109015
|
+
this.cbs.ontextentity(cp8);
|
|
109016
109016
|
}
|
|
109017
109017
|
}
|
|
109018
109018
|
};
|
|
@@ -109147,11 +109147,11 @@ var Parser3 = class {
|
|
|
109147
109147
|
this.startIndex = endIndex;
|
|
109148
109148
|
}
|
|
109149
109149
|
/** @internal */
|
|
109150
|
-
ontextentity(
|
|
109150
|
+
ontextentity(cp8) {
|
|
109151
109151
|
var _a2, _b;
|
|
109152
109152
|
const index2 = this.tokenizer.getSectionStart();
|
|
109153
109153
|
this.endIndex = index2 - 1;
|
|
109154
|
-
(_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(
|
|
109154
|
+
(_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(cp8));
|
|
109155
109155
|
this.startIndex = index2;
|
|
109156
109156
|
}
|
|
109157
109157
|
isVoidElement(name2) {
|
|
@@ -109269,8 +109269,8 @@ var Parser3 = class {
|
|
|
109269
109269
|
this.attribvalue += this.getSlice(start, endIndex);
|
|
109270
109270
|
}
|
|
109271
109271
|
/** @internal */
|
|
109272
|
-
onattribentity(
|
|
109273
|
-
this.attribvalue += fromCodePoint(
|
|
109272
|
+
onattribentity(cp8) {
|
|
109273
|
+
this.attribvalue += fromCodePoint(cp8);
|
|
109274
109274
|
}
|
|
109275
109275
|
/** @internal */
|
|
109276
109276
|
onattribend(quote, endIndex) {
|
|
@@ -109971,7 +109971,7 @@ async function extractArchivesIfNeeded(tmpDir, apps, deps) {
|
|
|
109971
109971
|
|
|
109972
109972
|
// dist/whole-program-code-aware-vulnerability-scanner/js/js-code-aware-vulnerability-scanner.js
|
|
109973
109973
|
import { mkdtempSync } from "fs";
|
|
109974
|
-
import { cp as
|
|
109974
|
+
import { cp as cp5, mkdir as mkdir8, rm as rm3, writeFile as writeFile7 } from "fs/promises";
|
|
109975
109975
|
import { tmpdir as tmpdir3 } from "os";
|
|
109976
109976
|
import { join as join14 } from "path";
|
|
109977
109977
|
|
|
@@ -110439,8 +110439,8 @@ function computePackagesOnVulnPath(vulnerabilities, { includeLeafPackages = fals
|
|
|
110439
110439
|
|
|
110440
110440
|
// dist/whole-program-code-aware-vulnerability-scanner/js/jelly-runner.js
|
|
110441
110441
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
110442
|
-
import { readFile as readFile8, rm as rm2, writeFile as writeFile6 } from "fs/promises";
|
|
110443
|
-
import { relative as
|
|
110442
|
+
import { readFile as readFile8, realpath as realpath2, rm as rm2, writeFile as writeFile6 } from "fs/promises";
|
|
110443
|
+
import { relative as relative7, resolve as resolve14 } from "path";
|
|
110444
110444
|
var { map: map2, uniq: uniq4 } = import_lodash10.default;
|
|
110445
110445
|
var PRINT_JELLY_COMMAND = false;
|
|
110446
110446
|
async function runJellyAnalysis(mainProjectRoot, projectRoot, jellyOptions, reachabilityAnalysisOptions, timeoutInSeconds, vulnerabilities, experiment) {
|
|
@@ -110497,8 +110497,9 @@ async function runJellyAnalysis(mainProjectRoot, projectRoot, jellyOptions, reac
|
|
|
110497
110497
|
};
|
|
110498
110498
|
const callStacks = JSON.parse(await readFile8(callStackFile, "utf-8"));
|
|
110499
110499
|
const matches = {};
|
|
110500
|
+
const realProjectRoot = await realpath2(projectRoot);
|
|
110500
110501
|
for (const { vulnerability, paths } of callStacks) {
|
|
110501
|
-
const transformedStacks = transformJellyCallStacks(
|
|
110502
|
+
const transformedStacks = transformJellyCallStacks(realProjectRoot, paths);
|
|
110502
110503
|
if (matches[vulnerability.osv.url]) {
|
|
110503
110504
|
matches[vulnerability.osv.url].stacks.push(...transformedStacks.stacks);
|
|
110504
110505
|
} else
|
|
@@ -110548,7 +110549,7 @@ async function runJellyImportReachabilityAnalysis(mainProjectRoot, projectRoot,
|
|
|
110548
110549
|
}
|
|
110549
110550
|
function getExcludes(mainProjectRoot, projectRoot, options) {
|
|
110550
110551
|
if (options.excludeDirs?.length) {
|
|
110551
|
-
const excludeDirsRelativeToProjectRoot = options.excludeDirs.map((d) =>
|
|
110552
|
+
const excludeDirsRelativeToProjectRoot = options.excludeDirs.map((d) => relative7(projectRoot, resolve14(mainProjectRoot, d)));
|
|
110552
110553
|
const excludeDirsRelativeToProjectRootWithWildcards = excludeDirsRelativeToProjectRoot.map((d) => `${d}/**`);
|
|
110553
110554
|
return [...excludeDirsRelativeToProjectRoot, ...excludeDirsRelativeToProjectRootWithWildcards];
|
|
110554
110555
|
}
|
|
@@ -110558,7 +110559,7 @@ function relativizeSourceLocations(projectDir, paths) {
|
|
|
110558
110559
|
...paths,
|
|
110559
110560
|
stacks: paths.stacks.map((stack) => stack.map((s2) => ({
|
|
110560
110561
|
...s2,
|
|
110561
|
-
sourceLocation: { ...s2.sourceLocation, filename:
|
|
110562
|
+
sourceLocation: { ...s2.sourceLocation, filename: relative7(projectDir, s2.sourceLocation.filename) }
|
|
110562
110563
|
})))
|
|
110563
110564
|
};
|
|
110564
110565
|
}
|
|
@@ -110654,7 +110655,7 @@ var JSCodeAwareVulnerabilityScanner = class _JSCodeAwareVulnerabilityScanner {
|
|
|
110654
110655
|
otherPackageNames.push(nameFromPackageJson);
|
|
110655
110656
|
const targetDirectory = join14(nodeModulesDir, nameFromPackageJson);
|
|
110656
110657
|
logger.info(`Copying ${packagePath} to ${targetDirectory}`);
|
|
110657
|
-
await
|
|
110658
|
+
await cp5(packagePath, targetDirectory, { recursive: true });
|
|
110658
110659
|
fileMappings.set(targetDirectory, packagePath);
|
|
110659
110660
|
}
|
|
110660
110661
|
if (!firstPackageName)
|
|
@@ -110741,9 +110742,9 @@ function transformSourceLocations(fileMappings, detectedOccurrences) {
|
|
|
110741
110742
|
var import_lodash11 = __toESM(require_lodash(), 1);
|
|
110742
110743
|
import assert4 from "assert";
|
|
110743
110744
|
import { existsSync as existsSync10, createReadStream as createReadStream2, createWriteStream as createWriteStream3 } from "fs";
|
|
110744
|
-
import { readFile as readFile9, rm as rm4, cp as
|
|
110745
|
+
import { readFile as readFile9, rm as rm4, cp as cp6 } from "fs/promises";
|
|
110745
110746
|
import zlib2 from "zlib";
|
|
110746
|
-
import { join as join15, resolve as resolve15, sep as
|
|
110747
|
+
import { join as join15, resolve as resolve15, sep as sep3 } from "path";
|
|
110747
110748
|
|
|
110748
110749
|
// dist/whole-program-code-aware-vulnerability-scanner/go/heuristics.js
|
|
110749
110750
|
var GoanaHeuristics = {
|
|
@@ -110837,7 +110838,7 @@ ${stderr}`);
|
|
|
110837
110838
|
const i3 = path10.lastIndexOf("/");
|
|
110838
110839
|
return i3 === -1 ? { type: "golang" /* GOLANG */, name: path10, version: version3 } : { type: "golang" /* GOLANG */, namespace: path10.slice(0, i3), name: path10.slice(i3 + 1), version: version3 };
|
|
110839
110840
|
}),
|
|
110840
|
-
computeDetectedOccurrences: detectedOccurrencesFromAPMatches(result.matches, await runCommandResolveStdOut2("go env GOMODCACHE") +
|
|
110841
|
+
computeDetectedOccurrences: detectedOccurrencesFromAPMatches(result.matches, await runCommandResolveStdOut2("go env GOMODCACHE") + sep3)
|
|
110841
110842
|
};
|
|
110842
110843
|
} finally {
|
|
110843
110844
|
await rm4(tmpDir, { recursive: true, force: true });
|
|
@@ -110848,10 +110849,10 @@ ${stderr}`);
|
|
|
110848
110849
|
const { Dir, GoMod } = JSON.parse(await runCommandResolveStdOut2(cmdt`go mod download -json ${first2.packageName}@v${first2.version}`));
|
|
110849
110850
|
const projectDir = await createTmpDirectory("go-run-on-dependency-chain-");
|
|
110850
110851
|
try {
|
|
110851
|
-
await
|
|
110852
|
+
await cp6(Dir, projectDir, { recursive: true });
|
|
110852
110853
|
const projGoMod = resolve15(projectDir, "go.mod");
|
|
110853
110854
|
if (!existsSync10(projGoMod))
|
|
110854
|
-
await
|
|
110855
|
+
await cp6(GoMod, projGoMod);
|
|
110855
110856
|
await exec2(cmdt`chmod --recursive +w ${projectDir}`);
|
|
110856
110857
|
await runGoModTidy(projectDir);
|
|
110857
110858
|
if (rest.length) {
|
|
@@ -110882,7 +110883,7 @@ ${stderr}`);
|
|
|
110882
110883
|
const [app, ...dependencies] = packages;
|
|
110883
110884
|
const projectDir = await createTmpDirectory("go-run-on-already-downloaded-packages-");
|
|
110884
110885
|
try {
|
|
110885
|
-
await
|
|
110886
|
+
await cp6(app, projectDir, { recursive: true });
|
|
110886
110887
|
await runGoModTidy(projectDir);
|
|
110887
110888
|
if (dependencies.length) {
|
|
110888
110889
|
const replacements = await Promise.all(dependencies.map(async (dep) => {
|
|
@@ -110931,7 +110932,7 @@ var RusticaHeuristics = {
|
|
|
110931
110932
|
};
|
|
110932
110933
|
|
|
110933
110934
|
// ../utils/src/rust-utils.ts
|
|
110934
|
-
import { basename as basename9, dirname as dirname13, extname as
|
|
110935
|
+
import { basename as basename9, dirname as dirname13, extname as extname4, sep as sep4 } from "node:path";
|
|
110935
110936
|
function getUrlForCrate(crateName, version3) {
|
|
110936
110937
|
return `https://crates.io/api/v1/crates/${crateName}/${version3}/download`;
|
|
110937
110938
|
}
|
|
@@ -111799,7 +111800,7 @@ ${errors.join("\n")}`);
|
|
|
111799
111800
|
name: normalizePackageName(name2),
|
|
111800
111801
|
version: version3
|
|
111801
111802
|
})),
|
|
111802
|
-
computeDetectedOccurrences: detectedOccurrencesFromAPMatches(result.matches, this.virtualEnvInfo.virtualEnvFolder +
|
|
111803
|
+
computeDetectedOccurrences: detectedOccurrencesFromAPMatches(result.matches, this.virtualEnvInfo.virtualEnvFolder + sep5)
|
|
111803
111804
|
};
|
|
111804
111805
|
} catch (e) {
|
|
111805
111806
|
let msg = e.message;
|
|
@@ -111834,7 +111835,7 @@ ${msg}`;
|
|
|
111834
111835
|
const fileMappings = /* @__PURE__ */ new Map();
|
|
111835
111836
|
const projectDir = join16(projectTmpDir, basename11(app));
|
|
111836
111837
|
logger.info(`Copying ${app} to ${projectDir}`);
|
|
111837
|
-
await
|
|
111838
|
+
await cp7(app, projectDir, { recursive: true });
|
|
111838
111839
|
fileMappings.set(projectDir, app);
|
|
111839
111840
|
const scanner = new this({
|
|
111840
111841
|
rootWorkingDir: projectTmpDir,
|
|
@@ -111846,7 +111847,7 @@ ${msg}`;
|
|
|
111846
111847
|
for (const dep of dependencies) {
|
|
111847
111848
|
const dependencyDir = join16(sitePackagesDir, basename11(dep));
|
|
111848
111849
|
logger.info(`Copying ${dep} to ${dependencyDir}`);
|
|
111849
|
-
await
|
|
111850
|
+
await cp7(dep, dependencyDir, { recursive: true });
|
|
111850
111851
|
fileMappings.set(dependencyDir, dep);
|
|
111851
111852
|
}
|
|
111852
111853
|
const result = await scanner.runAnalysis([vuln], MambaladeHeuristics.ALL_PACKAGES, options.timeoutSeconds.allVulnRuns);
|
|
@@ -112372,7 +112373,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112372
112373
|
let analysisNumber = 0;
|
|
112373
112374
|
const newAnalysisRunListener = () => statusUpdater?.(`Static analysis run number ${++analysisNumber} in progress...`);
|
|
112374
112375
|
const ecosystem = vulnerabilities[0].ecosystem ?? "NPM";
|
|
112375
|
-
const expHeuristicName = process.env.ONLY_APPLICATION_SOURCE_FILES_FOR_KNOWN_LANGUAGES === "true" ? "ONLY_APPLICATION_SOURCE_FILES_FOR_KNOWN_LANGUAGES" : await getExperimentName(
|
|
112376
|
+
const expHeuristicName = process.env.ONLY_APPLICATION_SOURCE_FILES_FOR_KNOWN_LANGUAGES === "true" ? "ONLY_APPLICATION_SOURCE_FILES_FOR_KNOWN_LANGUAGES" : await getExperimentName(relative8(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, ecosystem, COANA_REPORT_ID, apiKey);
|
|
112376
112377
|
let bucketsToAnalyze = state.otherAnalysisOptions.lightweightReachability ? void 0 : await getBucketsBasedOnPreviousResults();
|
|
112377
112378
|
let useExperimentalHeuristic = Boolean(expHeuristicName && bucketsToAnalyze);
|
|
112378
112379
|
if (!bucketsToAnalyze)
|
|
@@ -112407,7 +112408,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112407
112408
|
}
|
|
112408
112409
|
async function analyzeWithExperimentalHeuristic(buckets) {
|
|
112409
112410
|
try {
|
|
112410
|
-
const previousAnalysisResults = await getPreviousAnalysisResults(
|
|
112411
|
+
const previousAnalysisResults = await getPreviousAnalysisResults(relative8(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, COANA_REPORT_ID, apiKey);
|
|
112411
112412
|
if (!expHeuristicName || !previousAnalysisResults)
|
|
112412
112413
|
return;
|
|
112413
112414
|
const experimentalRes = await analyzeAndAugmentVulns(buckets, void 0, true, expHeuristicName);
|
|
@@ -112443,7 +112444,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112443
112444
|
} catch (e) {
|
|
112444
112445
|
logger.warn("Error while running experimental heuristic - scan will continue in normal mode.", e);
|
|
112445
112446
|
sendWarningToDashboard("Error while running experimental heuristic", {
|
|
112446
|
-
subprojectPath:
|
|
112447
|
+
subprojectPath: relative8(state.rootWorkingDir, state.subprojectDir) || ".",
|
|
112447
112448
|
workspacePath: state.workspacePath,
|
|
112448
112449
|
errorMessage: e.message,
|
|
112449
112450
|
errorStack: e.stack
|
|
@@ -112454,7 +112455,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112454
112455
|
async function getBucketsBasedOnPreviousResults() {
|
|
112455
112456
|
if (state.otherAnalysisOptions.skipCacheUsage || !SOCKET_MODE && (!COANA_REPORT_ID || apiKey.type === "missing"))
|
|
112456
112457
|
return void 0;
|
|
112457
|
-
const bucketsFromLastAnalysisAndCliVersion = await dashboardAPI.getBucketsForLastReport(
|
|
112458
|
+
const bucketsFromLastAnalysisAndCliVersion = await dashboardAPI.getBucketsForLastReport(relative8(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, vulnerabilities[0].ecosystem ?? "NPM", COANA_REPORT_ID, apiKey);
|
|
112458
112459
|
if (!bucketsFromLastAnalysisAndCliVersion)
|
|
112459
112460
|
return void 0;
|
|
112460
112461
|
const { cliVersion: cliVersion2, buckets: bucketsFromLastAnalysis } = bucketsFromLastAnalysisAndCliVersion;
|
|
@@ -112469,7 +112470,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112469
112470
|
const duplicateUrls = findDuplicateVulnsInBuckets(bucketsFromLastAnalysis);
|
|
112470
112471
|
if (duplicateUrls.length > 0) {
|
|
112471
112472
|
sendWarningToDashboard(`Assertion error: Detected bucket(s) with non-unique vulnerability URLs. Non-unique URLs: ${duplicateUrls.join(" ")}.`, {
|
|
112472
|
-
subprojectPath:
|
|
112473
|
+
subprojectPath: relative8(state.rootWorkingDir, state.subprojectDir) || ".",
|
|
112473
112474
|
workspacePath: state.workspacePath
|
|
112474
112475
|
}, bucketsFromLastAnalysisAndCliVersion, COANA_REPORT_ID, apiKey);
|
|
112475
112476
|
return void 0;
|
|
@@ -112605,7 +112606,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112605
112606
|
const oldMd = oldAnalysisMetadata.find((oldMd2) => newMd.vulnUrls.some((vulnUrl) => oldMd2.vulnUrls.includes(vulnUrl)));
|
|
112606
112607
|
if (!oldMd) {
|
|
112607
112608
|
sendWarningToDashboard("Could not find corresponding analysis metadata to compare time regressions with", {
|
|
112608
|
-
subprojectPath:
|
|
112609
|
+
subprojectPath: relative8(state.rootWorkingDir, state.subprojectDir) || ".",
|
|
112609
112610
|
workspacePath: state.workspacePath
|
|
112610
112611
|
}, void 0, COANA_REPORT_ID, apiKey);
|
|
112611
112612
|
return;
|
|
@@ -112632,7 +112633,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112632
112633
|
});
|
|
112633
112634
|
if (regressions.length === 0)
|
|
112634
112635
|
return;
|
|
112635
|
-
sendRegressionsToDashboard(regressions,
|
|
112636
|
+
sendRegressionsToDashboard(regressions, relative8(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, COANA_REPORT_ID, apiKey);
|
|
112636
112637
|
}
|
|
112637
112638
|
function sendReachabilityRegressionsToDashboard(heuristicName, experimentName, origRes, experimentRes) {
|
|
112638
112639
|
const regressions = Object.keys(origRes).filter((vulnUrl) => experimentRes[vulnUrl] && origRes[vulnUrl] !== experimentRes[vulnUrl]).map((vulnUrl) => ({
|
|
@@ -112644,7 +112645,7 @@ async function analyzeWithHeuristics(state, vulns, heuristicsInOrder, doNotRecom
|
|
|
112644
112645
|
originalResult: origRes[vulnUrl],
|
|
112645
112646
|
experimentResult: experimentRes[vulnUrl]
|
|
112646
112647
|
}));
|
|
112647
|
-
sendRegressionsToDashboard(regressions,
|
|
112648
|
+
sendRegressionsToDashboard(regressions, relative8(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, COANA_REPORT_ID, apiKey);
|
|
112648
112649
|
}
|
|
112649
112650
|
}
|
|
112650
112651
|
function getHeuristicFromName(state, heuristicName, ecosystem) {
|
|
@@ -116396,7 +116397,7 @@ var {
|
|
|
116396
116397
|
var import_lodash20 = __toESM(require_lodash(), 1);
|
|
116397
116398
|
import { createWriteStream as createWriteStream4, existsSync as existsSync14 } from "fs";
|
|
116398
116399
|
import { mkdir as mkdir9, readdir as readdir5, readFile as readFile12, rm as rm7 } from "fs/promises";
|
|
116399
|
-
import { join as join17, relative as
|
|
116400
|
+
import { join as join17, relative as relative9 } from "path";
|
|
116400
116401
|
import { pipeline as pipeline3 } from "stream/promises";
|
|
116401
116402
|
var PRINT_ANALYSIS_COMMAND = false;
|
|
116402
116403
|
var { uniqBy: uniqBy2, sortedUniq: sortedUniq2 } = import_lodash20.default;
|
|
@@ -116483,7 +116484,7 @@ var RubyCodeAwareVulnerabilityScanner = class {
|
|
|
116483
116484
|
this.numberAnalysesRun++;
|
|
116484
116485
|
await exec2(cmd, this.projectDir, { timeout: (timeoutInSeconds * 1.5 + 10) * 1e3 });
|
|
116485
116486
|
const result = JSON.parse(await readFile12(vulnsOutputFile, "utf-8"));
|
|
116486
|
-
const relativeLoadPathsToPackageNames = new Map([...loadPathsToPackageNames.entries()].map(([k, v]) => [join17("vendor",
|
|
116487
|
+
const relativeLoadPathsToPackageNames = new Map([...loadPathsToPackageNames.entries()].map(([k, v]) => [join17("vendor", relative9(this.vendorDir, k)), v]));
|
|
116487
116488
|
const { timedOut, ...diagnostics } = JSON.parse(await readFile12(diagnosticsOutputFile, "utf-8"));
|
|
116488
116489
|
const reachedPackages = JSON.parse(await readFile12(reachedPackagesOutputFile, "utf-8"));
|
|
116489
116490
|
logger.debug("Reached packages: %O", reachedPackages);
|
|
@@ -116766,14 +116767,14 @@ var dashboardAPI2 = new DashboardAPI(process.env.SOCKET_MODE === "true", process
|
|
|
116766
116767
|
async function runReachabilityAnalysis(state) {
|
|
116767
116768
|
const projectDir = resolve23(state.subprojectDir, state.workspacePath);
|
|
116768
116769
|
const ecosystem = state.workspaceData.data.type;
|
|
116769
|
-
logger.info(`Preparing to run reachability analysis for project at "${
|
|
116770
|
+
logger.info(`Preparing to run reachability analysis for project at "${relative10(state.rootWorkingDir, projectDir) || "."}" (${ecosystem})`);
|
|
116770
116771
|
const constructor = ecosystemAnalyzer[ecosystem];
|
|
116771
116772
|
if (!constructor)
|
|
116772
116773
|
throw Error(`No analyzer associated with ecosystem ${ecosystem}`);
|
|
116773
116774
|
const analyzer = new constructor(state, projectDir);
|
|
116774
116775
|
const [vulnerabilitiesWithPrecomputedResults, vulnerabilitiesWithoutPrecomputedResults] = partition4(state.vulnerabilities, (v) => "results" in v);
|
|
116775
116776
|
const augmentedVulnerabilities = await runWholeProgramCodeAwareVulnerabilityScanner(analyzer, vulnerabilitiesWithoutPrecomputedResults, async (amd) => {
|
|
116776
|
-
await dashboardAPI2.registerAnalysisMetadata(
|
|
116777
|
+
await dashboardAPI2.registerAnalysisMetadata(relative10(state.rootWorkingDir, state.subprojectDir) || ".", state.workspacePath, state.workspaceData.data.type, amd, COANA_REPORT_ID, apiKey2);
|
|
116777
116778
|
});
|
|
116778
116779
|
const diagnostics = await analyzer.getWorkspaceDiagnostics();
|
|
116779
116780
|
return {
|