drizzle-kit 0.9.47 → 0.9.48
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/index.js +35 -2226
- package/package.json +12 -12
- package/LICENSE +0 -674
package/index.js
CHANGED
|
@@ -11662,2197 +11662,6 @@ var require_lib4 = __commonJS({
|
|
|
11662
11662
|
}
|
|
11663
11663
|
});
|
|
11664
11664
|
|
|
11665
|
-
// ../node_modules/source-map/lib/base64.js
|
|
11666
|
-
var require_base64 = __commonJS({
|
|
11667
|
-
"../node_modules/source-map/lib/base64.js"(exports) {
|
|
11668
|
-
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
11669
|
-
exports.encode = function(number) {
|
|
11670
|
-
if (0 <= number && number < intToCharMap.length) {
|
|
11671
|
-
return intToCharMap[number];
|
|
11672
|
-
}
|
|
11673
|
-
throw new TypeError("Must be between 0 and 63: " + number);
|
|
11674
|
-
};
|
|
11675
|
-
exports.decode = function(charCode) {
|
|
11676
|
-
var bigA = 65;
|
|
11677
|
-
var bigZ = 90;
|
|
11678
|
-
var littleA = 97;
|
|
11679
|
-
var littleZ = 122;
|
|
11680
|
-
var zero = 48;
|
|
11681
|
-
var nine = 57;
|
|
11682
|
-
var plus = 43;
|
|
11683
|
-
var slash = 47;
|
|
11684
|
-
var littleOffset = 26;
|
|
11685
|
-
var numberOffset = 52;
|
|
11686
|
-
if (bigA <= charCode && charCode <= bigZ) {
|
|
11687
|
-
return charCode - bigA;
|
|
11688
|
-
}
|
|
11689
|
-
if (littleA <= charCode && charCode <= littleZ) {
|
|
11690
|
-
return charCode - littleA + littleOffset;
|
|
11691
|
-
}
|
|
11692
|
-
if (zero <= charCode && charCode <= nine) {
|
|
11693
|
-
return charCode - zero + numberOffset;
|
|
11694
|
-
}
|
|
11695
|
-
if (charCode == plus) {
|
|
11696
|
-
return 62;
|
|
11697
|
-
}
|
|
11698
|
-
if (charCode == slash) {
|
|
11699
|
-
return 63;
|
|
11700
|
-
}
|
|
11701
|
-
return -1;
|
|
11702
|
-
};
|
|
11703
|
-
}
|
|
11704
|
-
});
|
|
11705
|
-
|
|
11706
|
-
// ../node_modules/source-map/lib/base64-vlq.js
|
|
11707
|
-
var require_base64_vlq = __commonJS({
|
|
11708
|
-
"../node_modules/source-map/lib/base64-vlq.js"(exports) {
|
|
11709
|
-
var base64 = require_base64();
|
|
11710
|
-
var VLQ_BASE_SHIFT = 5;
|
|
11711
|
-
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
11712
|
-
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
11713
|
-
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
11714
|
-
function toVLQSigned(aValue) {
|
|
11715
|
-
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
11716
|
-
}
|
|
11717
|
-
function fromVLQSigned(aValue) {
|
|
11718
|
-
var isNegative = (aValue & 1) === 1;
|
|
11719
|
-
var shifted = aValue >> 1;
|
|
11720
|
-
return isNegative ? -shifted : shifted;
|
|
11721
|
-
}
|
|
11722
|
-
exports.encode = function base64VLQ_encode(aValue) {
|
|
11723
|
-
var encoded = "";
|
|
11724
|
-
var digit;
|
|
11725
|
-
var vlq = toVLQSigned(aValue);
|
|
11726
|
-
do {
|
|
11727
|
-
digit = vlq & VLQ_BASE_MASK;
|
|
11728
|
-
vlq >>>= VLQ_BASE_SHIFT;
|
|
11729
|
-
if (vlq > 0) {
|
|
11730
|
-
digit |= VLQ_CONTINUATION_BIT;
|
|
11731
|
-
}
|
|
11732
|
-
encoded += base64.encode(digit);
|
|
11733
|
-
} while (vlq > 0);
|
|
11734
|
-
return encoded;
|
|
11735
|
-
};
|
|
11736
|
-
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
11737
|
-
var strLen = aStr.length;
|
|
11738
|
-
var result2 = 0;
|
|
11739
|
-
var shift = 0;
|
|
11740
|
-
var continuation, digit;
|
|
11741
|
-
do {
|
|
11742
|
-
if (aIndex >= strLen) {
|
|
11743
|
-
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
11744
|
-
}
|
|
11745
|
-
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
11746
|
-
if (digit === -1) {
|
|
11747
|
-
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
11748
|
-
}
|
|
11749
|
-
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
11750
|
-
digit &= VLQ_BASE_MASK;
|
|
11751
|
-
result2 = result2 + (digit << shift);
|
|
11752
|
-
shift += VLQ_BASE_SHIFT;
|
|
11753
|
-
} while (continuation);
|
|
11754
|
-
aOutParam.value = fromVLQSigned(result2);
|
|
11755
|
-
aOutParam.rest = aIndex;
|
|
11756
|
-
};
|
|
11757
|
-
}
|
|
11758
|
-
});
|
|
11759
|
-
|
|
11760
|
-
// ../node_modules/source-map/lib/util.js
|
|
11761
|
-
var require_util = __commonJS({
|
|
11762
|
-
"../node_modules/source-map/lib/util.js"(exports) {
|
|
11763
|
-
function getArg(aArgs, aName, aDefaultValue) {
|
|
11764
|
-
if (aName in aArgs) {
|
|
11765
|
-
return aArgs[aName];
|
|
11766
|
-
} else if (arguments.length === 3) {
|
|
11767
|
-
return aDefaultValue;
|
|
11768
|
-
} else {
|
|
11769
|
-
throw new Error('"' + aName + '" is a required argument.');
|
|
11770
|
-
}
|
|
11771
|
-
}
|
|
11772
|
-
exports.getArg = getArg;
|
|
11773
|
-
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
11774
|
-
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
11775
|
-
function urlParse(aUrl) {
|
|
11776
|
-
var match = aUrl.match(urlRegexp);
|
|
11777
|
-
if (!match) {
|
|
11778
|
-
return null;
|
|
11779
|
-
}
|
|
11780
|
-
return {
|
|
11781
|
-
scheme: match[1],
|
|
11782
|
-
auth: match[2],
|
|
11783
|
-
host: match[3],
|
|
11784
|
-
port: match[4],
|
|
11785
|
-
path: match[5]
|
|
11786
|
-
};
|
|
11787
|
-
}
|
|
11788
|
-
exports.urlParse = urlParse;
|
|
11789
|
-
function urlGenerate(aParsedUrl) {
|
|
11790
|
-
var url = "";
|
|
11791
|
-
if (aParsedUrl.scheme) {
|
|
11792
|
-
url += aParsedUrl.scheme + ":";
|
|
11793
|
-
}
|
|
11794
|
-
url += "//";
|
|
11795
|
-
if (aParsedUrl.auth) {
|
|
11796
|
-
url += aParsedUrl.auth + "@";
|
|
11797
|
-
}
|
|
11798
|
-
if (aParsedUrl.host) {
|
|
11799
|
-
url += aParsedUrl.host;
|
|
11800
|
-
}
|
|
11801
|
-
if (aParsedUrl.port) {
|
|
11802
|
-
url += ":" + aParsedUrl.port;
|
|
11803
|
-
}
|
|
11804
|
-
if (aParsedUrl.path) {
|
|
11805
|
-
url += aParsedUrl.path;
|
|
11806
|
-
}
|
|
11807
|
-
return url;
|
|
11808
|
-
}
|
|
11809
|
-
exports.urlGenerate = urlGenerate;
|
|
11810
|
-
function normalize(aPath) {
|
|
11811
|
-
var path2 = aPath;
|
|
11812
|
-
var url = urlParse(aPath);
|
|
11813
|
-
if (url) {
|
|
11814
|
-
if (!url.path) {
|
|
11815
|
-
return aPath;
|
|
11816
|
-
}
|
|
11817
|
-
path2 = url.path;
|
|
11818
|
-
}
|
|
11819
|
-
var isAbsolute = exports.isAbsolute(path2);
|
|
11820
|
-
var parts = path2.split(/\/+/);
|
|
11821
|
-
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
11822
|
-
part = parts[i];
|
|
11823
|
-
if (part === ".") {
|
|
11824
|
-
parts.splice(i, 1);
|
|
11825
|
-
} else if (part === "..") {
|
|
11826
|
-
up++;
|
|
11827
|
-
} else if (up > 0) {
|
|
11828
|
-
if (part === "") {
|
|
11829
|
-
parts.splice(i + 1, up);
|
|
11830
|
-
up = 0;
|
|
11831
|
-
} else {
|
|
11832
|
-
parts.splice(i, 2);
|
|
11833
|
-
up--;
|
|
11834
|
-
}
|
|
11835
|
-
}
|
|
11836
|
-
}
|
|
11837
|
-
path2 = parts.join("/");
|
|
11838
|
-
if (path2 === "") {
|
|
11839
|
-
path2 = isAbsolute ? "/" : ".";
|
|
11840
|
-
}
|
|
11841
|
-
if (url) {
|
|
11842
|
-
url.path = path2;
|
|
11843
|
-
return urlGenerate(url);
|
|
11844
|
-
}
|
|
11845
|
-
return path2;
|
|
11846
|
-
}
|
|
11847
|
-
exports.normalize = normalize;
|
|
11848
|
-
function join(aRoot, aPath) {
|
|
11849
|
-
if (aRoot === "") {
|
|
11850
|
-
aRoot = ".";
|
|
11851
|
-
}
|
|
11852
|
-
if (aPath === "") {
|
|
11853
|
-
aPath = ".";
|
|
11854
|
-
}
|
|
11855
|
-
var aPathUrl = urlParse(aPath);
|
|
11856
|
-
var aRootUrl = urlParse(aRoot);
|
|
11857
|
-
if (aRootUrl) {
|
|
11858
|
-
aRoot = aRootUrl.path || "/";
|
|
11859
|
-
}
|
|
11860
|
-
if (aPathUrl && !aPathUrl.scheme) {
|
|
11861
|
-
if (aRootUrl) {
|
|
11862
|
-
aPathUrl.scheme = aRootUrl.scheme;
|
|
11863
|
-
}
|
|
11864
|
-
return urlGenerate(aPathUrl);
|
|
11865
|
-
}
|
|
11866
|
-
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
|
11867
|
-
return aPath;
|
|
11868
|
-
}
|
|
11869
|
-
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
11870
|
-
aRootUrl.host = aPath;
|
|
11871
|
-
return urlGenerate(aRootUrl);
|
|
11872
|
-
}
|
|
11873
|
-
var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
11874
|
-
if (aRootUrl) {
|
|
11875
|
-
aRootUrl.path = joined;
|
|
11876
|
-
return urlGenerate(aRootUrl);
|
|
11877
|
-
}
|
|
11878
|
-
return joined;
|
|
11879
|
-
}
|
|
11880
|
-
exports.join = join;
|
|
11881
|
-
exports.isAbsolute = function(aPath) {
|
|
11882
|
-
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
11883
|
-
};
|
|
11884
|
-
function relative(aRoot, aPath) {
|
|
11885
|
-
if (aRoot === "") {
|
|
11886
|
-
aRoot = ".";
|
|
11887
|
-
}
|
|
11888
|
-
aRoot = aRoot.replace(/\/$/, "");
|
|
11889
|
-
var level = 0;
|
|
11890
|
-
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
11891
|
-
var index = aRoot.lastIndexOf("/");
|
|
11892
|
-
if (index < 0) {
|
|
11893
|
-
return aPath;
|
|
11894
|
-
}
|
|
11895
|
-
aRoot = aRoot.slice(0, index);
|
|
11896
|
-
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
11897
|
-
return aPath;
|
|
11898
|
-
}
|
|
11899
|
-
++level;
|
|
11900
|
-
}
|
|
11901
|
-
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
11902
|
-
}
|
|
11903
|
-
exports.relative = relative;
|
|
11904
|
-
var supportsNullProto = function() {
|
|
11905
|
-
var obj = /* @__PURE__ */ Object.create(null);
|
|
11906
|
-
return !("__proto__" in obj);
|
|
11907
|
-
}();
|
|
11908
|
-
function identity(s) {
|
|
11909
|
-
return s;
|
|
11910
|
-
}
|
|
11911
|
-
function toSetString(aStr) {
|
|
11912
|
-
if (isProtoString(aStr)) {
|
|
11913
|
-
return "$" + aStr;
|
|
11914
|
-
}
|
|
11915
|
-
return aStr;
|
|
11916
|
-
}
|
|
11917
|
-
exports.toSetString = supportsNullProto ? identity : toSetString;
|
|
11918
|
-
function fromSetString(aStr) {
|
|
11919
|
-
if (isProtoString(aStr)) {
|
|
11920
|
-
return aStr.slice(1);
|
|
11921
|
-
}
|
|
11922
|
-
return aStr;
|
|
11923
|
-
}
|
|
11924
|
-
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
|
11925
|
-
function isProtoString(s) {
|
|
11926
|
-
if (!s) {
|
|
11927
|
-
return false;
|
|
11928
|
-
}
|
|
11929
|
-
var length = s.length;
|
|
11930
|
-
if (length < 9) {
|
|
11931
|
-
return false;
|
|
11932
|
-
}
|
|
11933
|
-
if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
|
|
11934
|
-
return false;
|
|
11935
|
-
}
|
|
11936
|
-
for (var i = length - 10; i >= 0; i--) {
|
|
11937
|
-
if (s.charCodeAt(i) !== 36) {
|
|
11938
|
-
return false;
|
|
11939
|
-
}
|
|
11940
|
-
}
|
|
11941
|
-
return true;
|
|
11942
|
-
}
|
|
11943
|
-
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
11944
|
-
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
11945
|
-
if (cmp !== 0) {
|
|
11946
|
-
return cmp;
|
|
11947
|
-
}
|
|
11948
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
11949
|
-
if (cmp !== 0) {
|
|
11950
|
-
return cmp;
|
|
11951
|
-
}
|
|
11952
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
11953
|
-
if (cmp !== 0 || onlyCompareOriginal) {
|
|
11954
|
-
return cmp;
|
|
11955
|
-
}
|
|
11956
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
11957
|
-
if (cmp !== 0) {
|
|
11958
|
-
return cmp;
|
|
11959
|
-
}
|
|
11960
|
-
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
11961
|
-
if (cmp !== 0) {
|
|
11962
|
-
return cmp;
|
|
11963
|
-
}
|
|
11964
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
11965
|
-
}
|
|
11966
|
-
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
11967
|
-
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
11968
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
11969
|
-
if (cmp !== 0) {
|
|
11970
|
-
return cmp;
|
|
11971
|
-
}
|
|
11972
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
11973
|
-
if (cmp !== 0 || onlyCompareGenerated) {
|
|
11974
|
-
return cmp;
|
|
11975
|
-
}
|
|
11976
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
11977
|
-
if (cmp !== 0) {
|
|
11978
|
-
return cmp;
|
|
11979
|
-
}
|
|
11980
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
11981
|
-
if (cmp !== 0) {
|
|
11982
|
-
return cmp;
|
|
11983
|
-
}
|
|
11984
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
11985
|
-
if (cmp !== 0) {
|
|
11986
|
-
return cmp;
|
|
11987
|
-
}
|
|
11988
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
11989
|
-
}
|
|
11990
|
-
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
11991
|
-
function strcmp(aStr1, aStr2) {
|
|
11992
|
-
if (aStr1 === aStr2) {
|
|
11993
|
-
return 0;
|
|
11994
|
-
}
|
|
11995
|
-
if (aStr1 === null) {
|
|
11996
|
-
return 1;
|
|
11997
|
-
}
|
|
11998
|
-
if (aStr2 === null) {
|
|
11999
|
-
return -1;
|
|
12000
|
-
}
|
|
12001
|
-
if (aStr1 > aStr2) {
|
|
12002
|
-
return 1;
|
|
12003
|
-
}
|
|
12004
|
-
return -1;
|
|
12005
|
-
}
|
|
12006
|
-
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
12007
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
12008
|
-
if (cmp !== 0) {
|
|
12009
|
-
return cmp;
|
|
12010
|
-
}
|
|
12011
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
12012
|
-
if (cmp !== 0) {
|
|
12013
|
-
return cmp;
|
|
12014
|
-
}
|
|
12015
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
12016
|
-
if (cmp !== 0) {
|
|
12017
|
-
return cmp;
|
|
12018
|
-
}
|
|
12019
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
12020
|
-
if (cmp !== 0) {
|
|
12021
|
-
return cmp;
|
|
12022
|
-
}
|
|
12023
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
12024
|
-
if (cmp !== 0) {
|
|
12025
|
-
return cmp;
|
|
12026
|
-
}
|
|
12027
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
12028
|
-
}
|
|
12029
|
-
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
12030
|
-
function parseSourceMapInput(str2) {
|
|
12031
|
-
return JSON.parse(str2.replace(/^\)]}'[^\n]*\n/, ""));
|
|
12032
|
-
}
|
|
12033
|
-
exports.parseSourceMapInput = parseSourceMapInput;
|
|
12034
|
-
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
12035
|
-
sourceURL = sourceURL || "";
|
|
12036
|
-
if (sourceRoot) {
|
|
12037
|
-
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
|
12038
|
-
sourceRoot += "/";
|
|
12039
|
-
}
|
|
12040
|
-
sourceURL = sourceRoot + sourceURL;
|
|
12041
|
-
}
|
|
12042
|
-
if (sourceMapURL) {
|
|
12043
|
-
var parsed = urlParse(sourceMapURL);
|
|
12044
|
-
if (!parsed) {
|
|
12045
|
-
throw new Error("sourceMapURL could not be parsed");
|
|
12046
|
-
}
|
|
12047
|
-
if (parsed.path) {
|
|
12048
|
-
var index = parsed.path.lastIndexOf("/");
|
|
12049
|
-
if (index >= 0) {
|
|
12050
|
-
parsed.path = parsed.path.substring(0, index + 1);
|
|
12051
|
-
}
|
|
12052
|
-
}
|
|
12053
|
-
sourceURL = join(urlGenerate(parsed), sourceURL);
|
|
12054
|
-
}
|
|
12055
|
-
return normalize(sourceURL);
|
|
12056
|
-
}
|
|
12057
|
-
exports.computeSourceURL = computeSourceURL;
|
|
12058
|
-
}
|
|
12059
|
-
});
|
|
12060
|
-
|
|
12061
|
-
// ../node_modules/source-map/lib/array-set.js
|
|
12062
|
-
var require_array_set = __commonJS({
|
|
12063
|
-
"../node_modules/source-map/lib/array-set.js"(exports) {
|
|
12064
|
-
var util = require_util();
|
|
12065
|
-
var has = Object.prototype.hasOwnProperty;
|
|
12066
|
-
var hasNativeMap = typeof Map !== "undefined";
|
|
12067
|
-
function ArraySet() {
|
|
12068
|
-
this._array = [];
|
|
12069
|
-
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
12070
|
-
}
|
|
12071
|
-
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
12072
|
-
var set2 = new ArraySet();
|
|
12073
|
-
for (var i = 0, len = aArray.length; i < len; i++) {
|
|
12074
|
-
set2.add(aArray[i], aAllowDuplicates);
|
|
12075
|
-
}
|
|
12076
|
-
return set2;
|
|
12077
|
-
};
|
|
12078
|
-
ArraySet.prototype.size = function ArraySet_size() {
|
|
12079
|
-
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
12080
|
-
};
|
|
12081
|
-
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
12082
|
-
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
12083
|
-
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
12084
|
-
var idx2 = this._array.length;
|
|
12085
|
-
if (!isDuplicate || aAllowDuplicates) {
|
|
12086
|
-
this._array.push(aStr);
|
|
12087
|
-
}
|
|
12088
|
-
if (!isDuplicate) {
|
|
12089
|
-
if (hasNativeMap) {
|
|
12090
|
-
this._set.set(aStr, idx2);
|
|
12091
|
-
} else {
|
|
12092
|
-
this._set[sStr] = idx2;
|
|
12093
|
-
}
|
|
12094
|
-
}
|
|
12095
|
-
};
|
|
12096
|
-
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
12097
|
-
if (hasNativeMap) {
|
|
12098
|
-
return this._set.has(aStr);
|
|
12099
|
-
} else {
|
|
12100
|
-
var sStr = util.toSetString(aStr);
|
|
12101
|
-
return has.call(this._set, sStr);
|
|
12102
|
-
}
|
|
12103
|
-
};
|
|
12104
|
-
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
12105
|
-
if (hasNativeMap) {
|
|
12106
|
-
var idx2 = this._set.get(aStr);
|
|
12107
|
-
if (idx2 >= 0) {
|
|
12108
|
-
return idx2;
|
|
12109
|
-
}
|
|
12110
|
-
} else {
|
|
12111
|
-
var sStr = util.toSetString(aStr);
|
|
12112
|
-
if (has.call(this._set, sStr)) {
|
|
12113
|
-
return this._set[sStr];
|
|
12114
|
-
}
|
|
12115
|
-
}
|
|
12116
|
-
throw new Error('"' + aStr + '" is not in the set.');
|
|
12117
|
-
};
|
|
12118
|
-
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
12119
|
-
if (aIdx >= 0 && aIdx < this._array.length) {
|
|
12120
|
-
return this._array[aIdx];
|
|
12121
|
-
}
|
|
12122
|
-
throw new Error("No element indexed by " + aIdx);
|
|
12123
|
-
};
|
|
12124
|
-
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
12125
|
-
return this._array.slice();
|
|
12126
|
-
};
|
|
12127
|
-
exports.ArraySet = ArraySet;
|
|
12128
|
-
}
|
|
12129
|
-
});
|
|
12130
|
-
|
|
12131
|
-
// ../node_modules/source-map/lib/mapping-list.js
|
|
12132
|
-
var require_mapping_list = __commonJS({
|
|
12133
|
-
"../node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
12134
|
-
var util = require_util();
|
|
12135
|
-
function generatedPositionAfter(mappingA, mappingB) {
|
|
12136
|
-
var lineA = mappingA.generatedLine;
|
|
12137
|
-
var lineB = mappingB.generatedLine;
|
|
12138
|
-
var columnA = mappingA.generatedColumn;
|
|
12139
|
-
var columnB = mappingB.generatedColumn;
|
|
12140
|
-
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
12141
|
-
}
|
|
12142
|
-
function MappingList() {
|
|
12143
|
-
this._array = [];
|
|
12144
|
-
this._sorted = true;
|
|
12145
|
-
this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
12146
|
-
}
|
|
12147
|
-
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
12148
|
-
this._array.forEach(aCallback, aThisArg);
|
|
12149
|
-
};
|
|
12150
|
-
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
12151
|
-
if (generatedPositionAfter(this._last, aMapping)) {
|
|
12152
|
-
this._last = aMapping;
|
|
12153
|
-
this._array.push(aMapping);
|
|
12154
|
-
} else {
|
|
12155
|
-
this._sorted = false;
|
|
12156
|
-
this._array.push(aMapping);
|
|
12157
|
-
}
|
|
12158
|
-
};
|
|
12159
|
-
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
12160
|
-
if (!this._sorted) {
|
|
12161
|
-
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
12162
|
-
this._sorted = true;
|
|
12163
|
-
}
|
|
12164
|
-
return this._array;
|
|
12165
|
-
};
|
|
12166
|
-
exports.MappingList = MappingList;
|
|
12167
|
-
}
|
|
12168
|
-
});
|
|
12169
|
-
|
|
12170
|
-
// ../node_modules/source-map/lib/source-map-generator.js
|
|
12171
|
-
var require_source_map_generator = __commonJS({
|
|
12172
|
-
"../node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
12173
|
-
var base64VLQ = require_base64_vlq();
|
|
12174
|
-
var util = require_util();
|
|
12175
|
-
var ArraySet = require_array_set().ArraySet;
|
|
12176
|
-
var MappingList = require_mapping_list().MappingList;
|
|
12177
|
-
function SourceMapGenerator(aArgs) {
|
|
12178
|
-
if (!aArgs) {
|
|
12179
|
-
aArgs = {};
|
|
12180
|
-
}
|
|
12181
|
-
this._file = util.getArg(aArgs, "file", null);
|
|
12182
|
-
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
|
12183
|
-
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
|
12184
|
-
this._sources = new ArraySet();
|
|
12185
|
-
this._names = new ArraySet();
|
|
12186
|
-
this._mappings = new MappingList();
|
|
12187
|
-
this._sourcesContents = null;
|
|
12188
|
-
}
|
|
12189
|
-
SourceMapGenerator.prototype._version = 3;
|
|
12190
|
-
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
12191
|
-
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
12192
|
-
var generator = new SourceMapGenerator({
|
|
12193
|
-
file: aSourceMapConsumer.file,
|
|
12194
|
-
sourceRoot
|
|
12195
|
-
});
|
|
12196
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
12197
|
-
var newMapping = {
|
|
12198
|
-
generated: {
|
|
12199
|
-
line: mapping.generatedLine,
|
|
12200
|
-
column: mapping.generatedColumn
|
|
12201
|
-
}
|
|
12202
|
-
};
|
|
12203
|
-
if (mapping.source != null) {
|
|
12204
|
-
newMapping.source = mapping.source;
|
|
12205
|
-
if (sourceRoot != null) {
|
|
12206
|
-
newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
12207
|
-
}
|
|
12208
|
-
newMapping.original = {
|
|
12209
|
-
line: mapping.originalLine,
|
|
12210
|
-
column: mapping.originalColumn
|
|
12211
|
-
};
|
|
12212
|
-
if (mapping.name != null) {
|
|
12213
|
-
newMapping.name = mapping.name;
|
|
12214
|
-
}
|
|
12215
|
-
}
|
|
12216
|
-
generator.addMapping(newMapping);
|
|
12217
|
-
});
|
|
12218
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
12219
|
-
var sourceRelative = sourceFile;
|
|
12220
|
-
if (sourceRoot !== null) {
|
|
12221
|
-
sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
12222
|
-
}
|
|
12223
|
-
if (!generator._sources.has(sourceRelative)) {
|
|
12224
|
-
generator._sources.add(sourceRelative);
|
|
12225
|
-
}
|
|
12226
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
12227
|
-
if (content != null) {
|
|
12228
|
-
generator.setSourceContent(sourceFile, content);
|
|
12229
|
-
}
|
|
12230
|
-
});
|
|
12231
|
-
return generator;
|
|
12232
|
-
};
|
|
12233
|
-
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
12234
|
-
var generated = util.getArg(aArgs, "generated");
|
|
12235
|
-
var original = util.getArg(aArgs, "original", null);
|
|
12236
|
-
var source = util.getArg(aArgs, "source", null);
|
|
12237
|
-
var name = util.getArg(aArgs, "name", null);
|
|
12238
|
-
if (!this._skipValidation) {
|
|
12239
|
-
this._validateMapping(generated, original, source, name);
|
|
12240
|
-
}
|
|
12241
|
-
if (source != null) {
|
|
12242
|
-
source = String(source);
|
|
12243
|
-
if (!this._sources.has(source)) {
|
|
12244
|
-
this._sources.add(source);
|
|
12245
|
-
}
|
|
12246
|
-
}
|
|
12247
|
-
if (name != null) {
|
|
12248
|
-
name = String(name);
|
|
12249
|
-
if (!this._names.has(name)) {
|
|
12250
|
-
this._names.add(name);
|
|
12251
|
-
}
|
|
12252
|
-
}
|
|
12253
|
-
this._mappings.add({
|
|
12254
|
-
generatedLine: generated.line,
|
|
12255
|
-
generatedColumn: generated.column,
|
|
12256
|
-
originalLine: original != null && original.line,
|
|
12257
|
-
originalColumn: original != null && original.column,
|
|
12258
|
-
source,
|
|
12259
|
-
name
|
|
12260
|
-
});
|
|
12261
|
-
};
|
|
12262
|
-
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
12263
|
-
var source = aSourceFile;
|
|
12264
|
-
if (this._sourceRoot != null) {
|
|
12265
|
-
source = util.relative(this._sourceRoot, source);
|
|
12266
|
-
}
|
|
12267
|
-
if (aSourceContent != null) {
|
|
12268
|
-
if (!this._sourcesContents) {
|
|
12269
|
-
this._sourcesContents = /* @__PURE__ */ Object.create(null);
|
|
12270
|
-
}
|
|
12271
|
-
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
12272
|
-
} else if (this._sourcesContents) {
|
|
12273
|
-
delete this._sourcesContents[util.toSetString(source)];
|
|
12274
|
-
if (Object.keys(this._sourcesContents).length === 0) {
|
|
12275
|
-
this._sourcesContents = null;
|
|
12276
|
-
}
|
|
12277
|
-
}
|
|
12278
|
-
};
|
|
12279
|
-
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
12280
|
-
var sourceFile = aSourceFile;
|
|
12281
|
-
if (aSourceFile == null) {
|
|
12282
|
-
if (aSourceMapConsumer.file == null) {
|
|
12283
|
-
throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);
|
|
12284
|
-
}
|
|
12285
|
-
sourceFile = aSourceMapConsumer.file;
|
|
12286
|
-
}
|
|
12287
|
-
var sourceRoot = this._sourceRoot;
|
|
12288
|
-
if (sourceRoot != null) {
|
|
12289
|
-
sourceFile = util.relative(sourceRoot, sourceFile);
|
|
12290
|
-
}
|
|
12291
|
-
var newSources = new ArraySet();
|
|
12292
|
-
var newNames = new ArraySet();
|
|
12293
|
-
this._mappings.unsortedForEach(function(mapping) {
|
|
12294
|
-
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
12295
|
-
var original = aSourceMapConsumer.originalPositionFor({
|
|
12296
|
-
line: mapping.originalLine,
|
|
12297
|
-
column: mapping.originalColumn
|
|
12298
|
-
});
|
|
12299
|
-
if (original.source != null) {
|
|
12300
|
-
mapping.source = original.source;
|
|
12301
|
-
if (aSourceMapPath != null) {
|
|
12302
|
-
mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
12303
|
-
}
|
|
12304
|
-
if (sourceRoot != null) {
|
|
12305
|
-
mapping.source = util.relative(sourceRoot, mapping.source);
|
|
12306
|
-
}
|
|
12307
|
-
mapping.originalLine = original.line;
|
|
12308
|
-
mapping.originalColumn = original.column;
|
|
12309
|
-
if (original.name != null) {
|
|
12310
|
-
mapping.name = original.name;
|
|
12311
|
-
}
|
|
12312
|
-
}
|
|
12313
|
-
}
|
|
12314
|
-
var source = mapping.source;
|
|
12315
|
-
if (source != null && !newSources.has(source)) {
|
|
12316
|
-
newSources.add(source);
|
|
12317
|
-
}
|
|
12318
|
-
var name = mapping.name;
|
|
12319
|
-
if (name != null && !newNames.has(name)) {
|
|
12320
|
-
newNames.add(name);
|
|
12321
|
-
}
|
|
12322
|
-
}, this);
|
|
12323
|
-
this._sources = newSources;
|
|
12324
|
-
this._names = newNames;
|
|
12325
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
|
12326
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
|
12327
|
-
if (content != null) {
|
|
12328
|
-
if (aSourceMapPath != null) {
|
|
12329
|
-
sourceFile2 = util.join(aSourceMapPath, sourceFile2);
|
|
12330
|
-
}
|
|
12331
|
-
if (sourceRoot != null) {
|
|
12332
|
-
sourceFile2 = util.relative(sourceRoot, sourceFile2);
|
|
12333
|
-
}
|
|
12334
|
-
this.setSourceContent(sourceFile2, content);
|
|
12335
|
-
}
|
|
12336
|
-
}, this);
|
|
12337
|
-
};
|
|
12338
|
-
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
12339
|
-
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
12340
|
-
throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");
|
|
12341
|
-
}
|
|
12342
|
-
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
12343
|
-
return;
|
|
12344
|
-
} else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
|
|
12345
|
-
return;
|
|
12346
|
-
} else {
|
|
12347
|
-
throw new Error("Invalid mapping: " + JSON.stringify({
|
|
12348
|
-
generated: aGenerated,
|
|
12349
|
-
source: aSource,
|
|
12350
|
-
original: aOriginal,
|
|
12351
|
-
name: aName
|
|
12352
|
-
}));
|
|
12353
|
-
}
|
|
12354
|
-
};
|
|
12355
|
-
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
12356
|
-
var previousGeneratedColumn = 0;
|
|
12357
|
-
var previousGeneratedLine = 1;
|
|
12358
|
-
var previousOriginalColumn = 0;
|
|
12359
|
-
var previousOriginalLine = 0;
|
|
12360
|
-
var previousName = 0;
|
|
12361
|
-
var previousSource = 0;
|
|
12362
|
-
var result2 = "";
|
|
12363
|
-
var next;
|
|
12364
|
-
var mapping;
|
|
12365
|
-
var nameIdx;
|
|
12366
|
-
var sourceIdx;
|
|
12367
|
-
var mappings = this._mappings.toArray();
|
|
12368
|
-
for (var i = 0, len = mappings.length; i < len; i++) {
|
|
12369
|
-
mapping = mappings[i];
|
|
12370
|
-
next = "";
|
|
12371
|
-
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
12372
|
-
previousGeneratedColumn = 0;
|
|
12373
|
-
while (mapping.generatedLine !== previousGeneratedLine) {
|
|
12374
|
-
next += ";";
|
|
12375
|
-
previousGeneratedLine++;
|
|
12376
|
-
}
|
|
12377
|
-
} else {
|
|
12378
|
-
if (i > 0) {
|
|
12379
|
-
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
|
12380
|
-
continue;
|
|
12381
|
-
}
|
|
12382
|
-
next += ",";
|
|
12383
|
-
}
|
|
12384
|
-
}
|
|
12385
|
-
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
12386
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
12387
|
-
if (mapping.source != null) {
|
|
12388
|
-
sourceIdx = this._sources.indexOf(mapping.source);
|
|
12389
|
-
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
12390
|
-
previousSource = sourceIdx;
|
|
12391
|
-
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
12392
|
-
previousOriginalLine = mapping.originalLine - 1;
|
|
12393
|
-
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
12394
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
12395
|
-
if (mapping.name != null) {
|
|
12396
|
-
nameIdx = this._names.indexOf(mapping.name);
|
|
12397
|
-
next += base64VLQ.encode(nameIdx - previousName);
|
|
12398
|
-
previousName = nameIdx;
|
|
12399
|
-
}
|
|
12400
|
-
}
|
|
12401
|
-
result2 += next;
|
|
12402
|
-
}
|
|
12403
|
-
return result2;
|
|
12404
|
-
};
|
|
12405
|
-
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
12406
|
-
return aSources.map(function(source) {
|
|
12407
|
-
if (!this._sourcesContents) {
|
|
12408
|
-
return null;
|
|
12409
|
-
}
|
|
12410
|
-
if (aSourceRoot != null) {
|
|
12411
|
-
source = util.relative(aSourceRoot, source);
|
|
12412
|
-
}
|
|
12413
|
-
var key = util.toSetString(source);
|
|
12414
|
-
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
12415
|
-
}, this);
|
|
12416
|
-
};
|
|
12417
|
-
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
12418
|
-
var map2 = {
|
|
12419
|
-
version: this._version,
|
|
12420
|
-
sources: this._sources.toArray(),
|
|
12421
|
-
names: this._names.toArray(),
|
|
12422
|
-
mappings: this._serializeMappings()
|
|
12423
|
-
};
|
|
12424
|
-
if (this._file != null) {
|
|
12425
|
-
map2.file = this._file;
|
|
12426
|
-
}
|
|
12427
|
-
if (this._sourceRoot != null) {
|
|
12428
|
-
map2.sourceRoot = this._sourceRoot;
|
|
12429
|
-
}
|
|
12430
|
-
if (this._sourcesContents) {
|
|
12431
|
-
map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
|
|
12432
|
-
}
|
|
12433
|
-
return map2;
|
|
12434
|
-
};
|
|
12435
|
-
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
12436
|
-
return JSON.stringify(this.toJSON());
|
|
12437
|
-
};
|
|
12438
|
-
exports.SourceMapGenerator = SourceMapGenerator;
|
|
12439
|
-
}
|
|
12440
|
-
});
|
|
12441
|
-
|
|
12442
|
-
// ../node_modules/source-map/lib/binary-search.js
|
|
12443
|
-
var require_binary_search = __commonJS({
|
|
12444
|
-
"../node_modules/source-map/lib/binary-search.js"(exports) {
|
|
12445
|
-
exports.GREATEST_LOWER_BOUND = 1;
|
|
12446
|
-
exports.LEAST_UPPER_BOUND = 2;
|
|
12447
|
-
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
12448
|
-
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
12449
|
-
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
12450
|
-
if (cmp === 0) {
|
|
12451
|
-
return mid;
|
|
12452
|
-
} else if (cmp > 0) {
|
|
12453
|
-
if (aHigh - mid > 1) {
|
|
12454
|
-
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
12455
|
-
}
|
|
12456
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
12457
|
-
return aHigh < aHaystack.length ? aHigh : -1;
|
|
12458
|
-
} else {
|
|
12459
|
-
return mid;
|
|
12460
|
-
}
|
|
12461
|
-
} else {
|
|
12462
|
-
if (mid - aLow > 1) {
|
|
12463
|
-
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
12464
|
-
}
|
|
12465
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
12466
|
-
return mid;
|
|
12467
|
-
} else {
|
|
12468
|
-
return aLow < 0 ? -1 : aLow;
|
|
12469
|
-
}
|
|
12470
|
-
}
|
|
12471
|
-
}
|
|
12472
|
-
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
12473
|
-
if (aHaystack.length === 0) {
|
|
12474
|
-
return -1;
|
|
12475
|
-
}
|
|
12476
|
-
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
|
|
12477
|
-
if (index < 0) {
|
|
12478
|
-
return -1;
|
|
12479
|
-
}
|
|
12480
|
-
while (index - 1 >= 0) {
|
|
12481
|
-
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
|
|
12482
|
-
break;
|
|
12483
|
-
}
|
|
12484
|
-
--index;
|
|
12485
|
-
}
|
|
12486
|
-
return index;
|
|
12487
|
-
};
|
|
12488
|
-
}
|
|
12489
|
-
});
|
|
12490
|
-
|
|
12491
|
-
// ../node_modules/source-map/lib/quick-sort.js
|
|
12492
|
-
var require_quick_sort = __commonJS({
|
|
12493
|
-
"../node_modules/source-map/lib/quick-sort.js"(exports) {
|
|
12494
|
-
function swap(ary, x, y) {
|
|
12495
|
-
var temp = ary[x];
|
|
12496
|
-
ary[x] = ary[y];
|
|
12497
|
-
ary[y] = temp;
|
|
12498
|
-
}
|
|
12499
|
-
function randomIntInRange(low, high) {
|
|
12500
|
-
return Math.round(low + Math.random() * (high - low));
|
|
12501
|
-
}
|
|
12502
|
-
function doQuickSort(ary, comparator, p, r) {
|
|
12503
|
-
if (p < r) {
|
|
12504
|
-
var pivotIndex = randomIntInRange(p, r);
|
|
12505
|
-
var i = p - 1;
|
|
12506
|
-
swap(ary, pivotIndex, r);
|
|
12507
|
-
var pivot = ary[r];
|
|
12508
|
-
for (var j = p; j < r; j++) {
|
|
12509
|
-
if (comparator(ary[j], pivot) <= 0) {
|
|
12510
|
-
i += 1;
|
|
12511
|
-
swap(ary, i, j);
|
|
12512
|
-
}
|
|
12513
|
-
}
|
|
12514
|
-
swap(ary, i + 1, j);
|
|
12515
|
-
var q = i + 1;
|
|
12516
|
-
doQuickSort(ary, comparator, p, q - 1);
|
|
12517
|
-
doQuickSort(ary, comparator, q + 1, r);
|
|
12518
|
-
}
|
|
12519
|
-
}
|
|
12520
|
-
exports.quickSort = function(ary, comparator) {
|
|
12521
|
-
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
12522
|
-
};
|
|
12523
|
-
}
|
|
12524
|
-
});
|
|
12525
|
-
|
|
12526
|
-
// ../node_modules/source-map/lib/source-map-consumer.js
|
|
12527
|
-
var require_source_map_consumer = __commonJS({
|
|
12528
|
-
"../node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
12529
|
-
var util = require_util();
|
|
12530
|
-
var binarySearch = require_binary_search();
|
|
12531
|
-
var ArraySet = require_array_set().ArraySet;
|
|
12532
|
-
var base64VLQ = require_base64_vlq();
|
|
12533
|
-
var quickSort = require_quick_sort().quickSort;
|
|
12534
|
-
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
12535
|
-
var sourceMap = aSourceMap;
|
|
12536
|
-
if (typeof aSourceMap === "string") {
|
|
12537
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
12538
|
-
}
|
|
12539
|
-
return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
12540
|
-
}
|
|
12541
|
-
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
12542
|
-
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
12543
|
-
};
|
|
12544
|
-
SourceMapConsumer.prototype._version = 3;
|
|
12545
|
-
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
12546
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
12547
|
-
configurable: true,
|
|
12548
|
-
enumerable: true,
|
|
12549
|
-
get: function() {
|
|
12550
|
-
if (!this.__generatedMappings) {
|
|
12551
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
12552
|
-
}
|
|
12553
|
-
return this.__generatedMappings;
|
|
12554
|
-
}
|
|
12555
|
-
});
|
|
12556
|
-
SourceMapConsumer.prototype.__originalMappings = null;
|
|
12557
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
12558
|
-
configurable: true,
|
|
12559
|
-
enumerable: true,
|
|
12560
|
-
get: function() {
|
|
12561
|
-
if (!this.__originalMappings) {
|
|
12562
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
12563
|
-
}
|
|
12564
|
-
return this.__originalMappings;
|
|
12565
|
-
}
|
|
12566
|
-
});
|
|
12567
|
-
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
12568
|
-
var c = aStr.charAt(index);
|
|
12569
|
-
return c === ";" || c === ",";
|
|
12570
|
-
};
|
|
12571
|
-
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
12572
|
-
throw new Error("Subclasses must implement _parseMappings");
|
|
12573
|
-
};
|
|
12574
|
-
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
12575
|
-
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
12576
|
-
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
12577
|
-
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
12578
|
-
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
12579
|
-
var context = aContext || null;
|
|
12580
|
-
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
12581
|
-
var mappings;
|
|
12582
|
-
switch (order) {
|
|
12583
|
-
case SourceMapConsumer.GENERATED_ORDER:
|
|
12584
|
-
mappings = this._generatedMappings;
|
|
12585
|
-
break;
|
|
12586
|
-
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
12587
|
-
mappings = this._originalMappings;
|
|
12588
|
-
break;
|
|
12589
|
-
default:
|
|
12590
|
-
throw new Error("Unknown order of iteration.");
|
|
12591
|
-
}
|
|
12592
|
-
var sourceRoot = this.sourceRoot;
|
|
12593
|
-
mappings.map(function(mapping) {
|
|
12594
|
-
var source = mapping.source === null ? null : this._sources.at(mapping.source);
|
|
12595
|
-
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
|
|
12596
|
-
return {
|
|
12597
|
-
source,
|
|
12598
|
-
generatedLine: mapping.generatedLine,
|
|
12599
|
-
generatedColumn: mapping.generatedColumn,
|
|
12600
|
-
originalLine: mapping.originalLine,
|
|
12601
|
-
originalColumn: mapping.originalColumn,
|
|
12602
|
-
name: mapping.name === null ? null : this._names.at(mapping.name)
|
|
12603
|
-
};
|
|
12604
|
-
}, this).forEach(aCallback, context);
|
|
12605
|
-
};
|
|
12606
|
-
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
12607
|
-
var line = util.getArg(aArgs, "line");
|
|
12608
|
-
var needle = {
|
|
12609
|
-
source: util.getArg(aArgs, "source"),
|
|
12610
|
-
originalLine: line,
|
|
12611
|
-
originalColumn: util.getArg(aArgs, "column", 0)
|
|
12612
|
-
};
|
|
12613
|
-
needle.source = this._findSourceIndex(needle.source);
|
|
12614
|
-
if (needle.source < 0) {
|
|
12615
|
-
return [];
|
|
12616
|
-
}
|
|
12617
|
-
var mappings = [];
|
|
12618
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
|
|
12619
|
-
if (index >= 0) {
|
|
12620
|
-
var mapping = this._originalMappings[index];
|
|
12621
|
-
if (aArgs.column === void 0) {
|
|
12622
|
-
var originalLine = mapping.originalLine;
|
|
12623
|
-
while (mapping && mapping.originalLine === originalLine) {
|
|
12624
|
-
mappings.push({
|
|
12625
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
12626
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
12627
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
12628
|
-
});
|
|
12629
|
-
mapping = this._originalMappings[++index];
|
|
12630
|
-
}
|
|
12631
|
-
} else {
|
|
12632
|
-
var originalColumn = mapping.originalColumn;
|
|
12633
|
-
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
12634
|
-
mappings.push({
|
|
12635
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
12636
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
12637
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
12638
|
-
});
|
|
12639
|
-
mapping = this._originalMappings[++index];
|
|
12640
|
-
}
|
|
12641
|
-
}
|
|
12642
|
-
}
|
|
12643
|
-
return mappings;
|
|
12644
|
-
};
|
|
12645
|
-
exports.SourceMapConsumer = SourceMapConsumer;
|
|
12646
|
-
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
12647
|
-
var sourceMap = aSourceMap;
|
|
12648
|
-
if (typeof aSourceMap === "string") {
|
|
12649
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
12650
|
-
}
|
|
12651
|
-
var version = util.getArg(sourceMap, "version");
|
|
12652
|
-
var sources = util.getArg(sourceMap, "sources");
|
|
12653
|
-
var names = util.getArg(sourceMap, "names", []);
|
|
12654
|
-
var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
|
|
12655
|
-
var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
|
|
12656
|
-
var mappings = util.getArg(sourceMap, "mappings");
|
|
12657
|
-
var file = util.getArg(sourceMap, "file", null);
|
|
12658
|
-
if (version != this._version) {
|
|
12659
|
-
throw new Error("Unsupported version: " + version);
|
|
12660
|
-
}
|
|
12661
|
-
if (sourceRoot) {
|
|
12662
|
-
sourceRoot = util.normalize(sourceRoot);
|
|
12663
|
-
}
|
|
12664
|
-
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
12665
|
-
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
12666
|
-
});
|
|
12667
|
-
this._names = ArraySet.fromArray(names.map(String), true);
|
|
12668
|
-
this._sources = ArraySet.fromArray(sources, true);
|
|
12669
|
-
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
12670
|
-
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
12671
|
-
});
|
|
12672
|
-
this.sourceRoot = sourceRoot;
|
|
12673
|
-
this.sourcesContent = sourcesContent;
|
|
12674
|
-
this._mappings = mappings;
|
|
12675
|
-
this._sourceMapURL = aSourceMapURL;
|
|
12676
|
-
this.file = file;
|
|
12677
|
-
}
|
|
12678
|
-
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
12679
|
-
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
12680
|
-
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
12681
|
-
var relativeSource = aSource;
|
|
12682
|
-
if (this.sourceRoot != null) {
|
|
12683
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
12684
|
-
}
|
|
12685
|
-
if (this._sources.has(relativeSource)) {
|
|
12686
|
-
return this._sources.indexOf(relativeSource);
|
|
12687
|
-
}
|
|
12688
|
-
var i;
|
|
12689
|
-
for (i = 0; i < this._absoluteSources.length; ++i) {
|
|
12690
|
-
if (this._absoluteSources[i] == aSource) {
|
|
12691
|
-
return i;
|
|
12692
|
-
}
|
|
12693
|
-
}
|
|
12694
|
-
return -1;
|
|
12695
|
-
};
|
|
12696
|
-
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
12697
|
-
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
12698
|
-
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
12699
|
-
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
12700
|
-
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
12701
|
-
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
|
|
12702
|
-
smc.file = aSourceMap._file;
|
|
12703
|
-
smc._sourceMapURL = aSourceMapURL;
|
|
12704
|
-
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
12705
|
-
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
12706
|
-
});
|
|
12707
|
-
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
12708
|
-
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
12709
|
-
var destOriginalMappings = smc.__originalMappings = [];
|
|
12710
|
-
for (var i = 0, length = generatedMappings.length; i < length; i++) {
|
|
12711
|
-
var srcMapping = generatedMappings[i];
|
|
12712
|
-
var destMapping = new Mapping();
|
|
12713
|
-
destMapping.generatedLine = srcMapping.generatedLine;
|
|
12714
|
-
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
12715
|
-
if (srcMapping.source) {
|
|
12716
|
-
destMapping.source = sources.indexOf(srcMapping.source);
|
|
12717
|
-
destMapping.originalLine = srcMapping.originalLine;
|
|
12718
|
-
destMapping.originalColumn = srcMapping.originalColumn;
|
|
12719
|
-
if (srcMapping.name) {
|
|
12720
|
-
destMapping.name = names.indexOf(srcMapping.name);
|
|
12721
|
-
}
|
|
12722
|
-
destOriginalMappings.push(destMapping);
|
|
12723
|
-
}
|
|
12724
|
-
destGeneratedMappings.push(destMapping);
|
|
12725
|
-
}
|
|
12726
|
-
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
12727
|
-
return smc;
|
|
12728
|
-
};
|
|
12729
|
-
BasicSourceMapConsumer.prototype._version = 3;
|
|
12730
|
-
Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
|
|
12731
|
-
get: function() {
|
|
12732
|
-
return this._absoluteSources.slice();
|
|
12733
|
-
}
|
|
12734
|
-
});
|
|
12735
|
-
function Mapping() {
|
|
12736
|
-
this.generatedLine = 0;
|
|
12737
|
-
this.generatedColumn = 0;
|
|
12738
|
-
this.source = null;
|
|
12739
|
-
this.originalLine = null;
|
|
12740
|
-
this.originalColumn = null;
|
|
12741
|
-
this.name = null;
|
|
12742
|
-
}
|
|
12743
|
-
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
12744
|
-
var generatedLine = 1;
|
|
12745
|
-
var previousGeneratedColumn = 0;
|
|
12746
|
-
var previousOriginalLine = 0;
|
|
12747
|
-
var previousOriginalColumn = 0;
|
|
12748
|
-
var previousSource = 0;
|
|
12749
|
-
var previousName = 0;
|
|
12750
|
-
var length = aStr.length;
|
|
12751
|
-
var index = 0;
|
|
12752
|
-
var cachedSegments = {};
|
|
12753
|
-
var temp = {};
|
|
12754
|
-
var originalMappings = [];
|
|
12755
|
-
var generatedMappings = [];
|
|
12756
|
-
var mapping, str2, segment, end, value;
|
|
12757
|
-
while (index < length) {
|
|
12758
|
-
if (aStr.charAt(index) === ";") {
|
|
12759
|
-
generatedLine++;
|
|
12760
|
-
index++;
|
|
12761
|
-
previousGeneratedColumn = 0;
|
|
12762
|
-
} else if (aStr.charAt(index) === ",") {
|
|
12763
|
-
index++;
|
|
12764
|
-
} else {
|
|
12765
|
-
mapping = new Mapping();
|
|
12766
|
-
mapping.generatedLine = generatedLine;
|
|
12767
|
-
for (end = index; end < length; end++) {
|
|
12768
|
-
if (this._charIsMappingSeparator(aStr, end)) {
|
|
12769
|
-
break;
|
|
12770
|
-
}
|
|
12771
|
-
}
|
|
12772
|
-
str2 = aStr.slice(index, end);
|
|
12773
|
-
segment = cachedSegments[str2];
|
|
12774
|
-
if (segment) {
|
|
12775
|
-
index += str2.length;
|
|
12776
|
-
} else {
|
|
12777
|
-
segment = [];
|
|
12778
|
-
while (index < end) {
|
|
12779
|
-
base64VLQ.decode(aStr, index, temp);
|
|
12780
|
-
value = temp.value;
|
|
12781
|
-
index = temp.rest;
|
|
12782
|
-
segment.push(value);
|
|
12783
|
-
}
|
|
12784
|
-
if (segment.length === 2) {
|
|
12785
|
-
throw new Error("Found a source, but no line and column");
|
|
12786
|
-
}
|
|
12787
|
-
if (segment.length === 3) {
|
|
12788
|
-
throw new Error("Found a source and line, but no column");
|
|
12789
|
-
}
|
|
12790
|
-
cachedSegments[str2] = segment;
|
|
12791
|
-
}
|
|
12792
|
-
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
12793
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
12794
|
-
if (segment.length > 1) {
|
|
12795
|
-
mapping.source = previousSource + segment[1];
|
|
12796
|
-
previousSource += segment[1];
|
|
12797
|
-
mapping.originalLine = previousOriginalLine + segment[2];
|
|
12798
|
-
previousOriginalLine = mapping.originalLine;
|
|
12799
|
-
mapping.originalLine += 1;
|
|
12800
|
-
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
12801
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
12802
|
-
if (segment.length > 4) {
|
|
12803
|
-
mapping.name = previousName + segment[4];
|
|
12804
|
-
previousName += segment[4];
|
|
12805
|
-
}
|
|
12806
|
-
}
|
|
12807
|
-
generatedMappings.push(mapping);
|
|
12808
|
-
if (typeof mapping.originalLine === "number") {
|
|
12809
|
-
originalMappings.push(mapping);
|
|
12810
|
-
}
|
|
12811
|
-
}
|
|
12812
|
-
}
|
|
12813
|
-
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
12814
|
-
this.__generatedMappings = generatedMappings;
|
|
12815
|
-
quickSort(originalMappings, util.compareByOriginalPositions);
|
|
12816
|
-
this.__originalMappings = originalMappings;
|
|
12817
|
-
};
|
|
12818
|
-
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
12819
|
-
if (aNeedle[aLineName] <= 0) {
|
|
12820
|
-
throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
|
|
12821
|
-
}
|
|
12822
|
-
if (aNeedle[aColumnName] < 0) {
|
|
12823
|
-
throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
|
|
12824
|
-
}
|
|
12825
|
-
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
12826
|
-
};
|
|
12827
|
-
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
12828
|
-
for (var index = 0; index < this._generatedMappings.length; ++index) {
|
|
12829
|
-
var mapping = this._generatedMappings[index];
|
|
12830
|
-
if (index + 1 < this._generatedMappings.length) {
|
|
12831
|
-
var nextMapping = this._generatedMappings[index + 1];
|
|
12832
|
-
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
12833
|
-
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
12834
|
-
continue;
|
|
12835
|
-
}
|
|
12836
|
-
}
|
|
12837
|
-
mapping.lastGeneratedColumn = Infinity;
|
|
12838
|
-
}
|
|
12839
|
-
};
|
|
12840
|
-
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
12841
|
-
var needle = {
|
|
12842
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
12843
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
12844
|
-
};
|
|
12845
|
-
var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
12846
|
-
if (index >= 0) {
|
|
12847
|
-
var mapping = this._generatedMappings[index];
|
|
12848
|
-
if (mapping.generatedLine === needle.generatedLine) {
|
|
12849
|
-
var source = util.getArg(mapping, "source", null);
|
|
12850
|
-
if (source !== null) {
|
|
12851
|
-
source = this._sources.at(source);
|
|
12852
|
-
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
12853
|
-
}
|
|
12854
|
-
var name = util.getArg(mapping, "name", null);
|
|
12855
|
-
if (name !== null) {
|
|
12856
|
-
name = this._names.at(name);
|
|
12857
|
-
}
|
|
12858
|
-
return {
|
|
12859
|
-
source,
|
|
12860
|
-
line: util.getArg(mapping, "originalLine", null),
|
|
12861
|
-
column: util.getArg(mapping, "originalColumn", null),
|
|
12862
|
-
name
|
|
12863
|
-
};
|
|
12864
|
-
}
|
|
12865
|
-
}
|
|
12866
|
-
return {
|
|
12867
|
-
source: null,
|
|
12868
|
-
line: null,
|
|
12869
|
-
column: null,
|
|
12870
|
-
name: null
|
|
12871
|
-
};
|
|
12872
|
-
};
|
|
12873
|
-
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
12874
|
-
if (!this.sourcesContent) {
|
|
12875
|
-
return false;
|
|
12876
|
-
}
|
|
12877
|
-
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
12878
|
-
return sc == null;
|
|
12879
|
-
});
|
|
12880
|
-
};
|
|
12881
|
-
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
12882
|
-
if (!this.sourcesContent) {
|
|
12883
|
-
return null;
|
|
12884
|
-
}
|
|
12885
|
-
var index = this._findSourceIndex(aSource);
|
|
12886
|
-
if (index >= 0) {
|
|
12887
|
-
return this.sourcesContent[index];
|
|
12888
|
-
}
|
|
12889
|
-
var relativeSource = aSource;
|
|
12890
|
-
if (this.sourceRoot != null) {
|
|
12891
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
12892
|
-
}
|
|
12893
|
-
var url;
|
|
12894
|
-
if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
|
|
12895
|
-
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
12896
|
-
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
12897
|
-
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
12898
|
-
}
|
|
12899
|
-
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
12900
|
-
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
12901
|
-
}
|
|
12902
|
-
}
|
|
12903
|
-
if (nullOnMissing) {
|
|
12904
|
-
return null;
|
|
12905
|
-
} else {
|
|
12906
|
-
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
12907
|
-
}
|
|
12908
|
-
};
|
|
12909
|
-
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
12910
|
-
var source = util.getArg(aArgs, "source");
|
|
12911
|
-
source = this._findSourceIndex(source);
|
|
12912
|
-
if (source < 0) {
|
|
12913
|
-
return {
|
|
12914
|
-
line: null,
|
|
12915
|
-
column: null,
|
|
12916
|
-
lastColumn: null
|
|
12917
|
-
};
|
|
12918
|
-
}
|
|
12919
|
-
var needle = {
|
|
12920
|
-
source,
|
|
12921
|
-
originalLine: util.getArg(aArgs, "line"),
|
|
12922
|
-
originalColumn: util.getArg(aArgs, "column")
|
|
12923
|
-
};
|
|
12924
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
12925
|
-
if (index >= 0) {
|
|
12926
|
-
var mapping = this._originalMappings[index];
|
|
12927
|
-
if (mapping.source === needle.source) {
|
|
12928
|
-
return {
|
|
12929
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
12930
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
12931
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
12932
|
-
};
|
|
12933
|
-
}
|
|
12934
|
-
}
|
|
12935
|
-
return {
|
|
12936
|
-
line: null,
|
|
12937
|
-
column: null,
|
|
12938
|
-
lastColumn: null
|
|
12939
|
-
};
|
|
12940
|
-
};
|
|
12941
|
-
exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
|
12942
|
-
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
12943
|
-
var sourceMap = aSourceMap;
|
|
12944
|
-
if (typeof aSourceMap === "string") {
|
|
12945
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
12946
|
-
}
|
|
12947
|
-
var version = util.getArg(sourceMap, "version");
|
|
12948
|
-
var sections = util.getArg(sourceMap, "sections");
|
|
12949
|
-
if (version != this._version) {
|
|
12950
|
-
throw new Error("Unsupported version: " + version);
|
|
12951
|
-
}
|
|
12952
|
-
this._sources = new ArraySet();
|
|
12953
|
-
this._names = new ArraySet();
|
|
12954
|
-
var lastOffset = {
|
|
12955
|
-
line: -1,
|
|
12956
|
-
column: 0
|
|
12957
|
-
};
|
|
12958
|
-
this._sections = sections.map(function(s) {
|
|
12959
|
-
if (s.url) {
|
|
12960
|
-
throw new Error("Support for url field in sections not implemented.");
|
|
12961
|
-
}
|
|
12962
|
-
var offset = util.getArg(s, "offset");
|
|
12963
|
-
var offsetLine = util.getArg(offset, "line");
|
|
12964
|
-
var offsetColumn = util.getArg(offset, "column");
|
|
12965
|
-
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
12966
|
-
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
12967
|
-
}
|
|
12968
|
-
lastOffset = offset;
|
|
12969
|
-
return {
|
|
12970
|
-
generatedOffset: {
|
|
12971
|
-
generatedLine: offsetLine + 1,
|
|
12972
|
-
generatedColumn: offsetColumn + 1
|
|
12973
|
-
},
|
|
12974
|
-
consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
|
|
12975
|
-
};
|
|
12976
|
-
});
|
|
12977
|
-
}
|
|
12978
|
-
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
12979
|
-
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
12980
|
-
IndexedSourceMapConsumer.prototype._version = 3;
|
|
12981
|
-
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
12982
|
-
get: function() {
|
|
12983
|
-
var sources = [];
|
|
12984
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
12985
|
-
for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
|
|
12986
|
-
sources.push(this._sections[i].consumer.sources[j]);
|
|
12987
|
-
}
|
|
12988
|
-
}
|
|
12989
|
-
return sources;
|
|
12990
|
-
}
|
|
12991
|
-
});
|
|
12992
|
-
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
12993
|
-
var needle = {
|
|
12994
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
12995
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
12996
|
-
};
|
|
12997
|
-
var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) {
|
|
12998
|
-
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
12999
|
-
if (cmp) {
|
|
13000
|
-
return cmp;
|
|
13001
|
-
}
|
|
13002
|
-
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
13003
|
-
});
|
|
13004
|
-
var section = this._sections[sectionIndex];
|
|
13005
|
-
if (!section) {
|
|
13006
|
-
return {
|
|
13007
|
-
source: null,
|
|
13008
|
-
line: null,
|
|
13009
|
-
column: null,
|
|
13010
|
-
name: null
|
|
13011
|
-
};
|
|
13012
|
-
}
|
|
13013
|
-
return section.consumer.originalPositionFor({
|
|
13014
|
-
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
13015
|
-
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
13016
|
-
bias: aArgs.bias
|
|
13017
|
-
});
|
|
13018
|
-
};
|
|
13019
|
-
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
13020
|
-
return this._sections.every(function(s) {
|
|
13021
|
-
return s.consumer.hasContentsOfAllSources();
|
|
13022
|
-
});
|
|
13023
|
-
};
|
|
13024
|
-
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
13025
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
13026
|
-
var section = this._sections[i];
|
|
13027
|
-
var content = section.consumer.sourceContentFor(aSource, true);
|
|
13028
|
-
if (content) {
|
|
13029
|
-
return content;
|
|
13030
|
-
}
|
|
13031
|
-
}
|
|
13032
|
-
if (nullOnMissing) {
|
|
13033
|
-
return null;
|
|
13034
|
-
} else {
|
|
13035
|
-
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
13036
|
-
}
|
|
13037
|
-
};
|
|
13038
|
-
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
13039
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
13040
|
-
var section = this._sections[i];
|
|
13041
|
-
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
|
|
13042
|
-
continue;
|
|
13043
|
-
}
|
|
13044
|
-
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
13045
|
-
if (generatedPosition) {
|
|
13046
|
-
var ret = {
|
|
13047
|
-
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
13048
|
-
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
13049
|
-
};
|
|
13050
|
-
return ret;
|
|
13051
|
-
}
|
|
13052
|
-
}
|
|
13053
|
-
return {
|
|
13054
|
-
line: null,
|
|
13055
|
-
column: null
|
|
13056
|
-
};
|
|
13057
|
-
};
|
|
13058
|
-
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
13059
|
-
this.__generatedMappings = [];
|
|
13060
|
-
this.__originalMappings = [];
|
|
13061
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
13062
|
-
var section = this._sections[i];
|
|
13063
|
-
var sectionMappings = section.consumer._generatedMappings;
|
|
13064
|
-
for (var j = 0; j < sectionMappings.length; j++) {
|
|
13065
|
-
var mapping = sectionMappings[j];
|
|
13066
|
-
var source = section.consumer._sources.at(mapping.source);
|
|
13067
|
-
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
13068
|
-
this._sources.add(source);
|
|
13069
|
-
source = this._sources.indexOf(source);
|
|
13070
|
-
var name = null;
|
|
13071
|
-
if (mapping.name) {
|
|
13072
|
-
name = section.consumer._names.at(mapping.name);
|
|
13073
|
-
this._names.add(name);
|
|
13074
|
-
name = this._names.indexOf(name);
|
|
13075
|
-
}
|
|
13076
|
-
var adjustedMapping = {
|
|
13077
|
-
source,
|
|
13078
|
-
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
13079
|
-
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
13080
|
-
originalLine: mapping.originalLine,
|
|
13081
|
-
originalColumn: mapping.originalColumn,
|
|
13082
|
-
name
|
|
13083
|
-
};
|
|
13084
|
-
this.__generatedMappings.push(adjustedMapping);
|
|
13085
|
-
if (typeof adjustedMapping.originalLine === "number") {
|
|
13086
|
-
this.__originalMappings.push(adjustedMapping);
|
|
13087
|
-
}
|
|
13088
|
-
}
|
|
13089
|
-
}
|
|
13090
|
-
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
13091
|
-
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
13092
|
-
};
|
|
13093
|
-
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
13094
|
-
}
|
|
13095
|
-
});
|
|
13096
|
-
|
|
13097
|
-
// ../node_modules/source-map/lib/source-node.js
|
|
13098
|
-
var require_source_node = __commonJS({
|
|
13099
|
-
"../node_modules/source-map/lib/source-node.js"(exports) {
|
|
13100
|
-
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
13101
|
-
var util = require_util();
|
|
13102
|
-
var REGEX_NEWLINE = /(\r?\n)/;
|
|
13103
|
-
var NEWLINE_CODE = 10;
|
|
13104
|
-
var isSourceNode = "$$$isSourceNode$$$";
|
|
13105
|
-
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
13106
|
-
this.children = [];
|
|
13107
|
-
this.sourceContents = {};
|
|
13108
|
-
this.line = aLine == null ? null : aLine;
|
|
13109
|
-
this.column = aColumn == null ? null : aColumn;
|
|
13110
|
-
this.source = aSource == null ? null : aSource;
|
|
13111
|
-
this.name = aName == null ? null : aName;
|
|
13112
|
-
this[isSourceNode] = true;
|
|
13113
|
-
if (aChunks != null)
|
|
13114
|
-
this.add(aChunks);
|
|
13115
|
-
}
|
|
13116
|
-
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
13117
|
-
var node = new SourceNode();
|
|
13118
|
-
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
13119
|
-
var remainingLinesIndex = 0;
|
|
13120
|
-
var shiftNextLine = function() {
|
|
13121
|
-
var lineContents = getNextLine();
|
|
13122
|
-
var newLine = getNextLine() || "";
|
|
13123
|
-
return lineContents + newLine;
|
|
13124
|
-
function getNextLine() {
|
|
13125
|
-
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
|
|
13126
|
-
}
|
|
13127
|
-
};
|
|
13128
|
-
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
13129
|
-
var lastMapping = null;
|
|
13130
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
13131
|
-
if (lastMapping !== null) {
|
|
13132
|
-
if (lastGeneratedLine < mapping.generatedLine) {
|
|
13133
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
13134
|
-
lastGeneratedLine++;
|
|
13135
|
-
lastGeneratedColumn = 0;
|
|
13136
|
-
} else {
|
|
13137
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
13138
|
-
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
13139
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
13140
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
13141
|
-
addMappingWithCode(lastMapping, code);
|
|
13142
|
-
lastMapping = mapping;
|
|
13143
|
-
return;
|
|
13144
|
-
}
|
|
13145
|
-
}
|
|
13146
|
-
while (lastGeneratedLine < mapping.generatedLine) {
|
|
13147
|
-
node.add(shiftNextLine());
|
|
13148
|
-
lastGeneratedLine++;
|
|
13149
|
-
}
|
|
13150
|
-
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
13151
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
13152
|
-
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
13153
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
13154
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
13155
|
-
}
|
|
13156
|
-
lastMapping = mapping;
|
|
13157
|
-
}, this);
|
|
13158
|
-
if (remainingLinesIndex < remainingLines.length) {
|
|
13159
|
-
if (lastMapping) {
|
|
13160
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
13161
|
-
}
|
|
13162
|
-
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
13163
|
-
}
|
|
13164
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
13165
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
13166
|
-
if (content != null) {
|
|
13167
|
-
if (aRelativePath != null) {
|
|
13168
|
-
sourceFile = util.join(aRelativePath, sourceFile);
|
|
13169
|
-
}
|
|
13170
|
-
node.setSourceContent(sourceFile, content);
|
|
13171
|
-
}
|
|
13172
|
-
});
|
|
13173
|
-
return node;
|
|
13174
|
-
function addMappingWithCode(mapping, code) {
|
|
13175
|
-
if (mapping === null || mapping.source === void 0) {
|
|
13176
|
-
node.add(code);
|
|
13177
|
-
} else {
|
|
13178
|
-
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
13179
|
-
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
|
|
13180
|
-
}
|
|
13181
|
-
}
|
|
13182
|
-
};
|
|
13183
|
-
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
13184
|
-
if (Array.isArray(aChunk)) {
|
|
13185
|
-
aChunk.forEach(function(chunk) {
|
|
13186
|
-
this.add(chunk);
|
|
13187
|
-
}, this);
|
|
13188
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
13189
|
-
if (aChunk) {
|
|
13190
|
-
this.children.push(aChunk);
|
|
13191
|
-
}
|
|
13192
|
-
} else {
|
|
13193
|
-
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
13194
|
-
}
|
|
13195
|
-
return this;
|
|
13196
|
-
};
|
|
13197
|
-
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
13198
|
-
if (Array.isArray(aChunk)) {
|
|
13199
|
-
for (var i = aChunk.length - 1; i >= 0; i--) {
|
|
13200
|
-
this.prepend(aChunk[i]);
|
|
13201
|
-
}
|
|
13202
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
13203
|
-
this.children.unshift(aChunk);
|
|
13204
|
-
} else {
|
|
13205
|
-
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
13206
|
-
}
|
|
13207
|
-
return this;
|
|
13208
|
-
};
|
|
13209
|
-
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
13210
|
-
var chunk;
|
|
13211
|
-
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
13212
|
-
chunk = this.children[i];
|
|
13213
|
-
if (chunk[isSourceNode]) {
|
|
13214
|
-
chunk.walk(aFn);
|
|
13215
|
-
} else {
|
|
13216
|
-
if (chunk !== "") {
|
|
13217
|
-
aFn(chunk, {
|
|
13218
|
-
source: this.source,
|
|
13219
|
-
line: this.line,
|
|
13220
|
-
column: this.column,
|
|
13221
|
-
name: this.name
|
|
13222
|
-
});
|
|
13223
|
-
}
|
|
13224
|
-
}
|
|
13225
|
-
}
|
|
13226
|
-
};
|
|
13227
|
-
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
13228
|
-
var newChildren;
|
|
13229
|
-
var i;
|
|
13230
|
-
var len = this.children.length;
|
|
13231
|
-
if (len > 0) {
|
|
13232
|
-
newChildren = [];
|
|
13233
|
-
for (i = 0; i < len - 1; i++) {
|
|
13234
|
-
newChildren.push(this.children[i]);
|
|
13235
|
-
newChildren.push(aSep);
|
|
13236
|
-
}
|
|
13237
|
-
newChildren.push(this.children[i]);
|
|
13238
|
-
this.children = newChildren;
|
|
13239
|
-
}
|
|
13240
|
-
return this;
|
|
13241
|
-
};
|
|
13242
|
-
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
13243
|
-
var lastChild = this.children[this.children.length - 1];
|
|
13244
|
-
if (lastChild[isSourceNode]) {
|
|
13245
|
-
lastChild.replaceRight(aPattern, aReplacement);
|
|
13246
|
-
} else if (typeof lastChild === "string") {
|
|
13247
|
-
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
|
13248
|
-
} else {
|
|
13249
|
-
this.children.push("".replace(aPattern, aReplacement));
|
|
13250
|
-
}
|
|
13251
|
-
return this;
|
|
13252
|
-
};
|
|
13253
|
-
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
13254
|
-
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
13255
|
-
};
|
|
13256
|
-
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
13257
|
-
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
13258
|
-
if (this.children[i][isSourceNode]) {
|
|
13259
|
-
this.children[i].walkSourceContents(aFn);
|
|
13260
|
-
}
|
|
13261
|
-
}
|
|
13262
|
-
var sources = Object.keys(this.sourceContents);
|
|
13263
|
-
for (var i = 0, len = sources.length; i < len; i++) {
|
|
13264
|
-
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
|
13265
|
-
}
|
|
13266
|
-
};
|
|
13267
|
-
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
13268
|
-
var str2 = "";
|
|
13269
|
-
this.walk(function(chunk) {
|
|
13270
|
-
str2 += chunk;
|
|
13271
|
-
});
|
|
13272
|
-
return str2;
|
|
13273
|
-
};
|
|
13274
|
-
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
13275
|
-
var generated = {
|
|
13276
|
-
code: "",
|
|
13277
|
-
line: 1,
|
|
13278
|
-
column: 0
|
|
13279
|
-
};
|
|
13280
|
-
var map2 = new SourceMapGenerator(aArgs);
|
|
13281
|
-
var sourceMappingActive = false;
|
|
13282
|
-
var lastOriginalSource = null;
|
|
13283
|
-
var lastOriginalLine = null;
|
|
13284
|
-
var lastOriginalColumn = null;
|
|
13285
|
-
var lastOriginalName = null;
|
|
13286
|
-
this.walk(function(chunk, original) {
|
|
13287
|
-
generated.code += chunk;
|
|
13288
|
-
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
13289
|
-
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
13290
|
-
map2.addMapping({
|
|
13291
|
-
source: original.source,
|
|
13292
|
-
original: {
|
|
13293
|
-
line: original.line,
|
|
13294
|
-
column: original.column
|
|
13295
|
-
},
|
|
13296
|
-
generated: {
|
|
13297
|
-
line: generated.line,
|
|
13298
|
-
column: generated.column
|
|
13299
|
-
},
|
|
13300
|
-
name: original.name
|
|
13301
|
-
});
|
|
13302
|
-
}
|
|
13303
|
-
lastOriginalSource = original.source;
|
|
13304
|
-
lastOriginalLine = original.line;
|
|
13305
|
-
lastOriginalColumn = original.column;
|
|
13306
|
-
lastOriginalName = original.name;
|
|
13307
|
-
sourceMappingActive = true;
|
|
13308
|
-
} else if (sourceMappingActive) {
|
|
13309
|
-
map2.addMapping({
|
|
13310
|
-
generated: {
|
|
13311
|
-
line: generated.line,
|
|
13312
|
-
column: generated.column
|
|
13313
|
-
}
|
|
13314
|
-
});
|
|
13315
|
-
lastOriginalSource = null;
|
|
13316
|
-
sourceMappingActive = false;
|
|
13317
|
-
}
|
|
13318
|
-
for (var idx2 = 0, length = chunk.length; idx2 < length; idx2++) {
|
|
13319
|
-
if (chunk.charCodeAt(idx2) === NEWLINE_CODE) {
|
|
13320
|
-
generated.line++;
|
|
13321
|
-
generated.column = 0;
|
|
13322
|
-
if (idx2 + 1 === length) {
|
|
13323
|
-
lastOriginalSource = null;
|
|
13324
|
-
sourceMappingActive = false;
|
|
13325
|
-
} else if (sourceMappingActive) {
|
|
13326
|
-
map2.addMapping({
|
|
13327
|
-
source: original.source,
|
|
13328
|
-
original: {
|
|
13329
|
-
line: original.line,
|
|
13330
|
-
column: original.column
|
|
13331
|
-
},
|
|
13332
|
-
generated: {
|
|
13333
|
-
line: generated.line,
|
|
13334
|
-
column: generated.column
|
|
13335
|
-
},
|
|
13336
|
-
name: original.name
|
|
13337
|
-
});
|
|
13338
|
-
}
|
|
13339
|
-
} else {
|
|
13340
|
-
generated.column++;
|
|
13341
|
-
}
|
|
13342
|
-
}
|
|
13343
|
-
});
|
|
13344
|
-
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
13345
|
-
map2.setSourceContent(sourceFile, sourceContent);
|
|
13346
|
-
});
|
|
13347
|
-
return { code: generated.code, map: map2 };
|
|
13348
|
-
};
|
|
13349
|
-
exports.SourceNode = SourceNode;
|
|
13350
|
-
}
|
|
13351
|
-
});
|
|
13352
|
-
|
|
13353
|
-
// ../node_modules/source-map/source-map.js
|
|
13354
|
-
var require_source_map = __commonJS({
|
|
13355
|
-
"../node_modules/source-map/source-map.js"(exports) {
|
|
13356
|
-
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
13357
|
-
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
13358
|
-
exports.SourceNode = require_source_node().SourceNode;
|
|
13359
|
-
}
|
|
13360
|
-
});
|
|
13361
|
-
|
|
13362
|
-
// ../node_modules/buffer-from/index.js
|
|
13363
|
-
var require_buffer_from = __commonJS({
|
|
13364
|
-
"../node_modules/buffer-from/index.js"(exports, module2) {
|
|
13365
|
-
var toString2 = Object.prototype.toString;
|
|
13366
|
-
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
13367
|
-
function isArrayBuffer(input) {
|
|
13368
|
-
return toString2.call(input).slice(8, -1) === "ArrayBuffer";
|
|
13369
|
-
}
|
|
13370
|
-
function fromArrayBuffer(obj, byteOffset, length) {
|
|
13371
|
-
byteOffset >>>= 0;
|
|
13372
|
-
var maxLength = obj.byteLength - byteOffset;
|
|
13373
|
-
if (maxLength < 0) {
|
|
13374
|
-
throw new RangeError("'offset' is out of bounds");
|
|
13375
|
-
}
|
|
13376
|
-
if (length === void 0) {
|
|
13377
|
-
length = maxLength;
|
|
13378
|
-
} else {
|
|
13379
|
-
length >>>= 0;
|
|
13380
|
-
if (length > maxLength) {
|
|
13381
|
-
throw new RangeError("'length' is out of bounds");
|
|
13382
|
-
}
|
|
13383
|
-
}
|
|
13384
|
-
return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
|
|
13385
|
-
}
|
|
13386
|
-
function fromString(string2, encoding) {
|
|
13387
|
-
if (typeof encoding !== "string" || encoding === "") {
|
|
13388
|
-
encoding = "utf8";
|
|
13389
|
-
}
|
|
13390
|
-
if (!Buffer.isEncoding(encoding)) {
|
|
13391
|
-
throw new TypeError('"encoding" must be a valid string encoding');
|
|
13392
|
-
}
|
|
13393
|
-
return isModern ? Buffer.from(string2, encoding) : new Buffer(string2, encoding);
|
|
13394
|
-
}
|
|
13395
|
-
function bufferFrom(value, encodingOrOffset, length) {
|
|
13396
|
-
if (typeof value === "number") {
|
|
13397
|
-
throw new TypeError('"value" argument must not be a number');
|
|
13398
|
-
}
|
|
13399
|
-
if (isArrayBuffer(value)) {
|
|
13400
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
13401
|
-
}
|
|
13402
|
-
if (typeof value === "string") {
|
|
13403
|
-
return fromString(value, encodingOrOffset);
|
|
13404
|
-
}
|
|
13405
|
-
return isModern ? Buffer.from(value) : new Buffer(value);
|
|
13406
|
-
}
|
|
13407
|
-
module2.exports = bufferFrom;
|
|
13408
|
-
}
|
|
13409
|
-
});
|
|
13410
|
-
|
|
13411
|
-
// ../node_modules/source-map-support/source-map-support.js
|
|
13412
|
-
var require_source_map_support = __commonJS({
|
|
13413
|
-
"../node_modules/source-map-support/source-map-support.js"(exports, module2) {
|
|
13414
|
-
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
13415
|
-
var path2 = require("path");
|
|
13416
|
-
var fs5;
|
|
13417
|
-
try {
|
|
13418
|
-
fs5 = require("fs");
|
|
13419
|
-
if (!fs5.existsSync || !fs5.readFileSync) {
|
|
13420
|
-
fs5 = null;
|
|
13421
|
-
}
|
|
13422
|
-
} catch (err) {
|
|
13423
|
-
}
|
|
13424
|
-
var bufferFrom = require_buffer_from();
|
|
13425
|
-
function dynamicRequire(mod, request) {
|
|
13426
|
-
return mod.require(request);
|
|
13427
|
-
}
|
|
13428
|
-
var errorFormatterInstalled = false;
|
|
13429
|
-
var uncaughtShimInstalled = false;
|
|
13430
|
-
var emptyCacheBetweenOperations = false;
|
|
13431
|
-
var environment = "auto";
|
|
13432
|
-
var fileContentsCache = {};
|
|
13433
|
-
var sourceMapCache = {};
|
|
13434
|
-
var reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
13435
|
-
var retrieveFileHandlers = [];
|
|
13436
|
-
var retrieveMapHandlers = [];
|
|
13437
|
-
function isInBrowser() {
|
|
13438
|
-
if (environment === "browser")
|
|
13439
|
-
return true;
|
|
13440
|
-
if (environment === "node")
|
|
13441
|
-
return false;
|
|
13442
|
-
return typeof window !== "undefined" && typeof XMLHttpRequest === "function" && !(window.require && window.module && window.process && window.process.type === "renderer");
|
|
13443
|
-
}
|
|
13444
|
-
function hasGlobalProcessEventEmitter() {
|
|
13445
|
-
return typeof process === "object" && process !== null && typeof process.on === "function";
|
|
13446
|
-
}
|
|
13447
|
-
function handlerExec(list) {
|
|
13448
|
-
return function(arg) {
|
|
13449
|
-
for (var i = 0; i < list.length; i++) {
|
|
13450
|
-
var ret = list[i](arg);
|
|
13451
|
-
if (ret) {
|
|
13452
|
-
return ret;
|
|
13453
|
-
}
|
|
13454
|
-
}
|
|
13455
|
-
return null;
|
|
13456
|
-
};
|
|
13457
|
-
}
|
|
13458
|
-
var retrieveFile = handlerExec(retrieveFileHandlers);
|
|
13459
|
-
retrieveFileHandlers.push(function(path3) {
|
|
13460
|
-
path3 = path3.trim();
|
|
13461
|
-
if (/^file:/.test(path3)) {
|
|
13462
|
-
path3 = path3.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
13463
|
-
return drive ? "" : "/";
|
|
13464
|
-
});
|
|
13465
|
-
}
|
|
13466
|
-
if (path3 in fileContentsCache) {
|
|
13467
|
-
return fileContentsCache[path3];
|
|
13468
|
-
}
|
|
13469
|
-
var contents = "";
|
|
13470
|
-
try {
|
|
13471
|
-
if (!fs5) {
|
|
13472
|
-
var xhr = new XMLHttpRequest();
|
|
13473
|
-
xhr.open("GET", path3, false);
|
|
13474
|
-
xhr.send(null);
|
|
13475
|
-
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
13476
|
-
contents = xhr.responseText;
|
|
13477
|
-
}
|
|
13478
|
-
} else if (fs5.existsSync(path3)) {
|
|
13479
|
-
contents = fs5.readFileSync(path3, "utf8");
|
|
13480
|
-
}
|
|
13481
|
-
} catch (er) {
|
|
13482
|
-
}
|
|
13483
|
-
return fileContentsCache[path3] = contents;
|
|
13484
|
-
});
|
|
13485
|
-
function supportRelativeURL(file, url) {
|
|
13486
|
-
if (!file)
|
|
13487
|
-
return url;
|
|
13488
|
-
var dir = path2.dirname(file);
|
|
13489
|
-
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
13490
|
-
var protocol = match ? match[0] : "";
|
|
13491
|
-
var startPath = dir.slice(protocol.length);
|
|
13492
|
-
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
13493
|
-
protocol += "/";
|
|
13494
|
-
return protocol + path2.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
|
|
13495
|
-
}
|
|
13496
|
-
return protocol + path2.resolve(dir.slice(protocol.length), url);
|
|
13497
|
-
}
|
|
13498
|
-
function retrieveSourceMapURL(source) {
|
|
13499
|
-
var fileData;
|
|
13500
|
-
if (isInBrowser()) {
|
|
13501
|
-
try {
|
|
13502
|
-
var xhr = new XMLHttpRequest();
|
|
13503
|
-
xhr.open("GET", source, false);
|
|
13504
|
-
xhr.send(null);
|
|
13505
|
-
fileData = xhr.readyState === 4 ? xhr.responseText : null;
|
|
13506
|
-
var sourceMapHeader = xhr.getResponseHeader("SourceMap") || xhr.getResponseHeader("X-SourceMap");
|
|
13507
|
-
if (sourceMapHeader) {
|
|
13508
|
-
return sourceMapHeader;
|
|
13509
|
-
}
|
|
13510
|
-
} catch (e) {
|
|
13511
|
-
}
|
|
13512
|
-
}
|
|
13513
|
-
fileData = retrieveFile(source);
|
|
13514
|
-
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
|
|
13515
|
-
var lastMatch, match;
|
|
13516
|
-
while (match = re.exec(fileData))
|
|
13517
|
-
lastMatch = match;
|
|
13518
|
-
if (!lastMatch)
|
|
13519
|
-
return null;
|
|
13520
|
-
return lastMatch[1];
|
|
13521
|
-
}
|
|
13522
|
-
var retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
13523
|
-
retrieveMapHandlers.push(function(source) {
|
|
13524
|
-
var sourceMappingURL = retrieveSourceMapURL(source);
|
|
13525
|
-
if (!sourceMappingURL)
|
|
13526
|
-
return null;
|
|
13527
|
-
var sourceMapData;
|
|
13528
|
-
if (reSourceMap.test(sourceMappingURL)) {
|
|
13529
|
-
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
|
|
13530
|
-
sourceMapData = bufferFrom(rawData, "base64").toString();
|
|
13531
|
-
sourceMappingURL = source;
|
|
13532
|
-
} else {
|
|
13533
|
-
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
|
13534
|
-
sourceMapData = retrieveFile(sourceMappingURL);
|
|
13535
|
-
}
|
|
13536
|
-
if (!sourceMapData) {
|
|
13537
|
-
return null;
|
|
13538
|
-
}
|
|
13539
|
-
return {
|
|
13540
|
-
url: sourceMappingURL,
|
|
13541
|
-
map: sourceMapData
|
|
13542
|
-
};
|
|
13543
|
-
});
|
|
13544
|
-
function mapSourcePosition(position) {
|
|
13545
|
-
var sourceMap = sourceMapCache[position.source];
|
|
13546
|
-
if (!sourceMap) {
|
|
13547
|
-
var urlAndMap = retrieveSourceMap(position.source);
|
|
13548
|
-
if (urlAndMap) {
|
|
13549
|
-
sourceMap = sourceMapCache[position.source] = {
|
|
13550
|
-
url: urlAndMap.url,
|
|
13551
|
-
map: new SourceMapConsumer(urlAndMap.map)
|
|
13552
|
-
};
|
|
13553
|
-
if (sourceMap.map.sourcesContent) {
|
|
13554
|
-
sourceMap.map.sources.forEach(function(source, i) {
|
|
13555
|
-
var contents = sourceMap.map.sourcesContent[i];
|
|
13556
|
-
if (contents) {
|
|
13557
|
-
var url = supportRelativeURL(sourceMap.url, source);
|
|
13558
|
-
fileContentsCache[url] = contents;
|
|
13559
|
-
}
|
|
13560
|
-
});
|
|
13561
|
-
}
|
|
13562
|
-
} else {
|
|
13563
|
-
sourceMap = sourceMapCache[position.source] = {
|
|
13564
|
-
url: null,
|
|
13565
|
-
map: null
|
|
13566
|
-
};
|
|
13567
|
-
}
|
|
13568
|
-
}
|
|
13569
|
-
if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === "function") {
|
|
13570
|
-
var originalPosition = sourceMap.map.originalPositionFor(position);
|
|
13571
|
-
if (originalPosition.source !== null) {
|
|
13572
|
-
originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source);
|
|
13573
|
-
return originalPosition;
|
|
13574
|
-
}
|
|
13575
|
-
}
|
|
13576
|
-
return position;
|
|
13577
|
-
}
|
|
13578
|
-
function mapEvalOrigin(origin) {
|
|
13579
|
-
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
13580
|
-
if (match) {
|
|
13581
|
-
var position = mapSourcePosition({
|
|
13582
|
-
source: match[2],
|
|
13583
|
-
line: +match[3],
|
|
13584
|
-
column: match[4] - 1
|
|
13585
|
-
});
|
|
13586
|
-
return "eval at " + match[1] + " (" + position.source + ":" + position.line + ":" + (position.column + 1) + ")";
|
|
13587
|
-
}
|
|
13588
|
-
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
13589
|
-
if (match) {
|
|
13590
|
-
return "eval at " + match[1] + " (" + mapEvalOrigin(match[2]) + ")";
|
|
13591
|
-
}
|
|
13592
|
-
return origin;
|
|
13593
|
-
}
|
|
13594
|
-
function CallSiteToString() {
|
|
13595
|
-
var fileName2;
|
|
13596
|
-
var fileLocation = "";
|
|
13597
|
-
if (this.isNative()) {
|
|
13598
|
-
fileLocation = "native";
|
|
13599
|
-
} else {
|
|
13600
|
-
fileName2 = this.getScriptNameOrSourceURL();
|
|
13601
|
-
if (!fileName2 && this.isEval()) {
|
|
13602
|
-
fileLocation = this.getEvalOrigin();
|
|
13603
|
-
fileLocation += ", ";
|
|
13604
|
-
}
|
|
13605
|
-
if (fileName2) {
|
|
13606
|
-
fileLocation += fileName2;
|
|
13607
|
-
} else {
|
|
13608
|
-
fileLocation += "<anonymous>";
|
|
13609
|
-
}
|
|
13610
|
-
var lineNumber = this.getLineNumber();
|
|
13611
|
-
if (lineNumber != null) {
|
|
13612
|
-
fileLocation += ":" + lineNumber;
|
|
13613
|
-
var columnNumber = this.getColumnNumber();
|
|
13614
|
-
if (columnNumber) {
|
|
13615
|
-
fileLocation += ":" + columnNumber;
|
|
13616
|
-
}
|
|
13617
|
-
}
|
|
13618
|
-
}
|
|
13619
|
-
var line = "";
|
|
13620
|
-
var functionName = this.getFunctionName();
|
|
13621
|
-
var addSuffix = true;
|
|
13622
|
-
var isConstructor = this.isConstructor();
|
|
13623
|
-
var isMethodCall = !(this.isToplevel() || isConstructor);
|
|
13624
|
-
if (isMethodCall) {
|
|
13625
|
-
var typeName = this.getTypeName();
|
|
13626
|
-
if (typeName === "[object Object]") {
|
|
13627
|
-
typeName = "null";
|
|
13628
|
-
}
|
|
13629
|
-
var methodName = this.getMethodName();
|
|
13630
|
-
if (functionName) {
|
|
13631
|
-
if (typeName && functionName.indexOf(typeName) != 0) {
|
|
13632
|
-
line += typeName + ".";
|
|
13633
|
-
}
|
|
13634
|
-
line += functionName;
|
|
13635
|
-
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
|
|
13636
|
-
line += " [as " + methodName + "]";
|
|
13637
|
-
}
|
|
13638
|
-
} else {
|
|
13639
|
-
line += typeName + "." + (methodName || "<anonymous>");
|
|
13640
|
-
}
|
|
13641
|
-
} else if (isConstructor) {
|
|
13642
|
-
line += "new " + (functionName || "<anonymous>");
|
|
13643
|
-
} else if (functionName) {
|
|
13644
|
-
line += functionName;
|
|
13645
|
-
} else {
|
|
13646
|
-
line += fileLocation;
|
|
13647
|
-
addSuffix = false;
|
|
13648
|
-
}
|
|
13649
|
-
if (addSuffix) {
|
|
13650
|
-
line += " (" + fileLocation + ")";
|
|
13651
|
-
}
|
|
13652
|
-
return line;
|
|
13653
|
-
}
|
|
13654
|
-
function cloneCallSite(frame) {
|
|
13655
|
-
var object2 = {};
|
|
13656
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
|
13657
|
-
object2[name] = /^(?:is|get)/.test(name) ? function() {
|
|
13658
|
-
return frame[name].call(frame);
|
|
13659
|
-
} : frame[name];
|
|
13660
|
-
});
|
|
13661
|
-
object2.toString = CallSiteToString;
|
|
13662
|
-
return object2;
|
|
13663
|
-
}
|
|
13664
|
-
function wrapCallSite(frame, state) {
|
|
13665
|
-
if (state === void 0) {
|
|
13666
|
-
state = { nextPosition: null, curPosition: null };
|
|
13667
|
-
}
|
|
13668
|
-
if (frame.isNative()) {
|
|
13669
|
-
state.curPosition = null;
|
|
13670
|
-
return frame;
|
|
13671
|
-
}
|
|
13672
|
-
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
13673
|
-
if (source) {
|
|
13674
|
-
var line = frame.getLineNumber();
|
|
13675
|
-
var column = frame.getColumnNumber() - 1;
|
|
13676
|
-
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
|
13677
|
-
var headerLength = noHeader.test(process.version) ? 0 : 62;
|
|
13678
|
-
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
|
13679
|
-
column -= headerLength;
|
|
13680
|
-
}
|
|
13681
|
-
var position = mapSourcePosition({
|
|
13682
|
-
source,
|
|
13683
|
-
line,
|
|
13684
|
-
column
|
|
13685
|
-
});
|
|
13686
|
-
state.curPosition = position;
|
|
13687
|
-
frame = cloneCallSite(frame);
|
|
13688
|
-
var originalFunctionName = frame.getFunctionName;
|
|
13689
|
-
frame.getFunctionName = function() {
|
|
13690
|
-
if (state.nextPosition == null) {
|
|
13691
|
-
return originalFunctionName();
|
|
13692
|
-
}
|
|
13693
|
-
return state.nextPosition.name || originalFunctionName();
|
|
13694
|
-
};
|
|
13695
|
-
frame.getFileName = function() {
|
|
13696
|
-
return position.source;
|
|
13697
|
-
};
|
|
13698
|
-
frame.getLineNumber = function() {
|
|
13699
|
-
return position.line;
|
|
13700
|
-
};
|
|
13701
|
-
frame.getColumnNumber = function() {
|
|
13702
|
-
return position.column + 1;
|
|
13703
|
-
};
|
|
13704
|
-
frame.getScriptNameOrSourceURL = function() {
|
|
13705
|
-
return position.source;
|
|
13706
|
-
};
|
|
13707
|
-
return frame;
|
|
13708
|
-
}
|
|
13709
|
-
var origin = frame.isEval() && frame.getEvalOrigin();
|
|
13710
|
-
if (origin) {
|
|
13711
|
-
origin = mapEvalOrigin(origin);
|
|
13712
|
-
frame = cloneCallSite(frame);
|
|
13713
|
-
frame.getEvalOrigin = function() {
|
|
13714
|
-
return origin;
|
|
13715
|
-
};
|
|
13716
|
-
return frame;
|
|
13717
|
-
}
|
|
13718
|
-
return frame;
|
|
13719
|
-
}
|
|
13720
|
-
function prepareStackTrace(error, stack) {
|
|
13721
|
-
if (emptyCacheBetweenOperations) {
|
|
13722
|
-
fileContentsCache = {};
|
|
13723
|
-
sourceMapCache = {};
|
|
13724
|
-
}
|
|
13725
|
-
var name = error.name || "Error";
|
|
13726
|
-
var message = error.message || "";
|
|
13727
|
-
var errorString = name + ": " + message;
|
|
13728
|
-
var state = { nextPosition: null, curPosition: null };
|
|
13729
|
-
var processedStack = [];
|
|
13730
|
-
for (var i = stack.length - 1; i >= 0; i--) {
|
|
13731
|
-
processedStack.push("\n at " + wrapCallSite(stack[i], state));
|
|
13732
|
-
state.nextPosition = state.curPosition;
|
|
13733
|
-
}
|
|
13734
|
-
state.curPosition = state.nextPosition = null;
|
|
13735
|
-
return errorString + processedStack.reverse().join("");
|
|
13736
|
-
}
|
|
13737
|
-
function getErrorSource(error) {
|
|
13738
|
-
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
|
|
13739
|
-
if (match) {
|
|
13740
|
-
var source = match[1];
|
|
13741
|
-
var line = +match[2];
|
|
13742
|
-
var column = +match[3];
|
|
13743
|
-
var contents = fileContentsCache[source];
|
|
13744
|
-
if (!contents && fs5 && fs5.existsSync(source)) {
|
|
13745
|
-
try {
|
|
13746
|
-
contents = fs5.readFileSync(source, "utf8");
|
|
13747
|
-
} catch (er) {
|
|
13748
|
-
contents = "";
|
|
13749
|
-
}
|
|
13750
|
-
}
|
|
13751
|
-
if (contents) {
|
|
13752
|
-
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
|
13753
|
-
if (code) {
|
|
13754
|
-
return source + ":" + line + "\n" + code + "\n" + new Array(column).join(" ") + "^";
|
|
13755
|
-
}
|
|
13756
|
-
}
|
|
13757
|
-
}
|
|
13758
|
-
return null;
|
|
13759
|
-
}
|
|
13760
|
-
function printErrorAndExit(error) {
|
|
13761
|
-
var source = getErrorSource(error);
|
|
13762
|
-
if (process.stderr._handle && process.stderr._handle.setBlocking) {
|
|
13763
|
-
process.stderr._handle.setBlocking(true);
|
|
13764
|
-
}
|
|
13765
|
-
if (source) {
|
|
13766
|
-
console.error();
|
|
13767
|
-
console.error(source);
|
|
13768
|
-
}
|
|
13769
|
-
console.error(error.stack);
|
|
13770
|
-
process.exit(1);
|
|
13771
|
-
}
|
|
13772
|
-
function shimEmitUncaughtException() {
|
|
13773
|
-
var origEmit = process.emit;
|
|
13774
|
-
process.emit = function(type2) {
|
|
13775
|
-
if (type2 === "uncaughtException") {
|
|
13776
|
-
var hasStack = arguments[1] && arguments[1].stack;
|
|
13777
|
-
var hasListeners = this.listeners(type2).length > 0;
|
|
13778
|
-
if (hasStack && !hasListeners) {
|
|
13779
|
-
return printErrorAndExit(arguments[1]);
|
|
13780
|
-
}
|
|
13781
|
-
}
|
|
13782
|
-
return origEmit.apply(this, arguments);
|
|
13783
|
-
};
|
|
13784
|
-
}
|
|
13785
|
-
var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
|
|
13786
|
-
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
|
|
13787
|
-
exports.wrapCallSite = wrapCallSite;
|
|
13788
|
-
exports.getErrorSource = getErrorSource;
|
|
13789
|
-
exports.mapSourcePosition = mapSourcePosition;
|
|
13790
|
-
exports.retrieveSourceMap = retrieveSourceMap;
|
|
13791
|
-
exports.install = function(options) {
|
|
13792
|
-
options = options || {};
|
|
13793
|
-
if (options.environment) {
|
|
13794
|
-
environment = options.environment;
|
|
13795
|
-
if (["node", "browser", "auto"].indexOf(environment) === -1) {
|
|
13796
|
-
throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}");
|
|
13797
|
-
}
|
|
13798
|
-
}
|
|
13799
|
-
if (options.retrieveFile) {
|
|
13800
|
-
if (options.overrideRetrieveFile) {
|
|
13801
|
-
retrieveFileHandlers.length = 0;
|
|
13802
|
-
}
|
|
13803
|
-
retrieveFileHandlers.unshift(options.retrieveFile);
|
|
13804
|
-
}
|
|
13805
|
-
if (options.retrieveSourceMap) {
|
|
13806
|
-
if (options.overrideRetrieveSourceMap) {
|
|
13807
|
-
retrieveMapHandlers.length = 0;
|
|
13808
|
-
}
|
|
13809
|
-
retrieveMapHandlers.unshift(options.retrieveSourceMap);
|
|
13810
|
-
}
|
|
13811
|
-
if (options.hookRequire && !isInBrowser()) {
|
|
13812
|
-
var Module = dynamicRequire(module2, "module");
|
|
13813
|
-
var $compile = Module.prototype._compile;
|
|
13814
|
-
if (!$compile.__sourceMapSupport) {
|
|
13815
|
-
Module.prototype._compile = function(content, filename) {
|
|
13816
|
-
fileContentsCache[filename] = content;
|
|
13817
|
-
sourceMapCache[filename] = void 0;
|
|
13818
|
-
return $compile.call(this, content, filename);
|
|
13819
|
-
};
|
|
13820
|
-
Module.prototype._compile.__sourceMapSupport = true;
|
|
13821
|
-
}
|
|
13822
|
-
}
|
|
13823
|
-
if (!emptyCacheBetweenOperations) {
|
|
13824
|
-
emptyCacheBetweenOperations = "emptyCacheBetweenOperations" in options ? options.emptyCacheBetweenOperations : false;
|
|
13825
|
-
}
|
|
13826
|
-
if (!errorFormatterInstalled) {
|
|
13827
|
-
errorFormatterInstalled = true;
|
|
13828
|
-
Error.prepareStackTrace = prepareStackTrace;
|
|
13829
|
-
}
|
|
13830
|
-
if (!uncaughtShimInstalled) {
|
|
13831
|
-
var installHandler = "handleUncaughtExceptions" in options ? options.handleUncaughtExceptions : true;
|
|
13832
|
-
try {
|
|
13833
|
-
var worker_threads = dynamicRequire(module2, "worker_threads");
|
|
13834
|
-
if (worker_threads.isMainThread === false) {
|
|
13835
|
-
installHandler = false;
|
|
13836
|
-
}
|
|
13837
|
-
} catch (e) {
|
|
13838
|
-
}
|
|
13839
|
-
if (installHandler && hasGlobalProcessEventEmitter()) {
|
|
13840
|
-
uncaughtShimInstalled = true;
|
|
13841
|
-
shimEmitUncaughtException();
|
|
13842
|
-
}
|
|
13843
|
-
}
|
|
13844
|
-
};
|
|
13845
|
-
exports.resetRetrieveHandlers = function() {
|
|
13846
|
-
retrieveFileHandlers.length = 0;
|
|
13847
|
-
retrieveMapHandlers.length = 0;
|
|
13848
|
-
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
|
13849
|
-
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
|
|
13850
|
-
retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
13851
|
-
retrieveFile = handlerExec(retrieveFileHandlers);
|
|
13852
|
-
};
|
|
13853
|
-
}
|
|
13854
|
-
});
|
|
13855
|
-
|
|
13856
11665
|
// node_modules/.pnpm/typescript@4.2.4/node_modules/typescript/lib/typescript.js
|
|
13857
11666
|
var require_typescript = __commonJS({
|
|
13858
11667
|
"node_modules/.pnpm/typescript@4.2.4/node_modules/typescript/lib/typescript.js"(exports, module2) {
|
|
@@ -20081,7 +17890,7 @@ var require_typescript = __commonJS({
|
|
|
20081
17890
|
}),
|
|
20082
17891
|
tryEnableSourceMapsForHost: function() {
|
|
20083
17892
|
try {
|
|
20084
|
-
|
|
17893
|
+
require("source-map-support").install();
|
|
20085
17894
|
} catch (_a2) {
|
|
20086
17895
|
}
|
|
20087
17896
|
},
|
|
@@ -141868,7 +139677,7 @@ var require_difflib2 = __commonJS({
|
|
|
141868
139677
|
});
|
|
141869
139678
|
|
|
141870
139679
|
// node_modules/.pnpm/json-diff@0.5.5/node_modules/json-diff/lib/util.js
|
|
141871
|
-
var
|
|
139680
|
+
var require_util = __commonJS({
|
|
141872
139681
|
"node_modules/.pnpm/json-diff@0.5.5/node_modules/json-diff/lib/util.js"(exports, module2) {
|
|
141873
139682
|
(function() {
|
|
141874
139683
|
var extendedTypeOf;
|
|
@@ -142073,7 +139882,7 @@ var require_colorize = __commonJS({
|
|
|
142073
139882
|
(function() {
|
|
142074
139883
|
var Theme, color, colorize, colorizeToArray, colorizeToCallback, extendedTypeOf, subcolorizeToCallback, hasProp = {}.hasOwnProperty;
|
|
142075
139884
|
color = require_lib5();
|
|
142076
|
-
extendedTypeOf =
|
|
139885
|
+
extendedTypeOf = require_util().extendedTypeOf;
|
|
142077
139886
|
Theme = {
|
|
142078
139887
|
" ": function(s) {
|
|
142079
139888
|
return s;
|
|
@@ -142186,7 +139995,7 @@ var require_lib6 = __commonJS({
|
|
|
142186
139995
|
(function() {
|
|
142187
139996
|
var SequenceMatcher, arrayDiff, colorize, descalarize, diff2, diffScore, diffString, diffWithScore, extendedTypeOf, findMatchingObject, isScalar, isScalarized, objectDiff, scalarize, hasProp = {}.hasOwnProperty;
|
|
142188
139997
|
SequenceMatcher = require_difflib2().SequenceMatcher;
|
|
142189
|
-
extendedTypeOf =
|
|
139998
|
+
extendedTypeOf = require_util().extendedTypeOf;
|
|
142190
139999
|
colorize = require_colorize().colorize;
|
|
142191
140000
|
isScalar = function(obj) {
|
|
142192
140001
|
return typeof obj !== "object" || obj === null;
|
|
@@ -163735,35 +161544,6 @@ var serialize = (path, fileName) => {
|
|
|
163735
161544
|
};
|
|
163736
161545
|
var serializer_default = serialize;
|
|
163737
161546
|
|
|
163738
|
-
// src/migrationPreparator.ts
|
|
163739
|
-
var dry = {
|
|
163740
|
-
version: "1",
|
|
163741
|
-
tables: {},
|
|
163742
|
-
enums: {}
|
|
163743
|
-
};
|
|
163744
|
-
var prepareMigration = (migrationRootFolderName = "drizzle", dataFolderPath) => {
|
|
163745
|
-
const root = migrationRootFolderName;
|
|
163746
|
-
const files = import_fs3.default.readdirSync("./");
|
|
163747
|
-
const drizzleFolder = files.find((it) => {
|
|
163748
|
-
return it === root;
|
|
163749
|
-
});
|
|
163750
|
-
if (!drizzleFolder) {
|
|
163751
|
-
import_fs3.default.mkdirSync(root);
|
|
163752
|
-
}
|
|
163753
|
-
const migrationFolders = import_fs3.default.readdirSync(`./${root}`);
|
|
163754
|
-
let prevSnapshot;
|
|
163755
|
-
if (migrationFolders.length === 0) {
|
|
163756
|
-
prevSnapshot = dry;
|
|
163757
|
-
} else {
|
|
163758
|
-
migrationFolders.sort();
|
|
163759
|
-
const lastSnapshotFolder = migrationFolders[migrationFolders.length - 1];
|
|
163760
|
-
prevSnapshot = JSON.parse(import_fs3.default.readFileSync(`./${root}/${lastSnapshotFolder}/snapshot.json`).toString());
|
|
163761
|
-
}
|
|
163762
|
-
const result2 = serializer_default(dataFolderPath);
|
|
163763
|
-
return { prev: prevSnapshot, cur: result2 };
|
|
163764
|
-
};
|
|
163765
|
-
var migrationPreparator_default = prepareMigration;
|
|
163766
|
-
|
|
163767
161547
|
// src/sqlgenerator.ts
|
|
163768
161548
|
var Convertor = class {
|
|
163769
161549
|
};
|
|
@@ -163968,7 +161748,7 @@ var CreateIndexConvertor = class extends Convertor {
|
|
|
163968
161748
|
convert(statement) {
|
|
163969
161749
|
const { tableName, indexName, value } = statement;
|
|
163970
161750
|
const indexPart = statement.isUnique ? "UNIQUE INDEX" : "INDEX";
|
|
163971
|
-
return `CREATE ${indexPart} IF NOT EXISTS ${indexName} ON ${tableName} (
|
|
161751
|
+
return `CREATE ${indexPart} IF NOT EXISTS ${indexName} ON ${tableName} (${value});`;
|
|
163972
161752
|
}
|
|
163973
161753
|
};
|
|
163974
161754
|
var DropIndexConvertor = class extends Convertor {
|
|
@@ -164395,7 +162175,7 @@ var prepareCreateIndexesJson = (tableName, indexes) => {
|
|
|
164395
162175
|
type: "create_index",
|
|
164396
162176
|
tableName,
|
|
164397
162177
|
indexName: index.name,
|
|
164398
|
-
value: index.columns.join(", "),
|
|
162178
|
+
value: index.columns.map((it) => `"${it}"`).join(", "),
|
|
164399
162179
|
isUnique: index.isUnique
|
|
164400
162180
|
};
|
|
164401
162181
|
});
|
|
@@ -164479,6 +162259,11 @@ var prepareDropIndexesJson = (tableName, indexes) => {
|
|
|
164479
162259
|
};
|
|
164480
162260
|
|
|
164481
162261
|
// src/snapshotsDiffer.ts
|
|
162262
|
+
var dry = {
|
|
162263
|
+
version: "2",
|
|
162264
|
+
tables: {},
|
|
162265
|
+
enums: {}
|
|
162266
|
+
};
|
|
164482
162267
|
var columnSchema = (0, import_yup.object)({
|
|
164483
162268
|
name: (0, import_yup.string)().required(),
|
|
164484
162269
|
type: (0, import_yup.string)().required(),
|
|
@@ -164581,6 +162366,30 @@ var applySnapshotsDiff = async (json1, json2, tablesResolver, columnsResolver) =
|
|
|
164581
162366
|
return sqlStatements.join("\n");
|
|
164582
162367
|
};
|
|
164583
162368
|
|
|
162369
|
+
// src/migrationPreparator.ts
|
|
162370
|
+
var prepareMigration = (migrationRootFolderName = "drizzle", dataFolderPath) => {
|
|
162371
|
+
const root = migrationRootFolderName;
|
|
162372
|
+
const files = import_fs3.default.readdirSync("./");
|
|
162373
|
+
const drizzleFolder = files.find((it) => {
|
|
162374
|
+
return it === root;
|
|
162375
|
+
});
|
|
162376
|
+
if (!drizzleFolder) {
|
|
162377
|
+
import_fs3.default.mkdirSync(root);
|
|
162378
|
+
}
|
|
162379
|
+
const migrationFolders = import_fs3.default.readdirSync(`./${root}`);
|
|
162380
|
+
let prevSnapshot;
|
|
162381
|
+
if (migrationFolders.length === 0) {
|
|
162382
|
+
prevSnapshot = dry;
|
|
162383
|
+
} else {
|
|
162384
|
+
migrationFolders.sort();
|
|
162385
|
+
const lastSnapshotFolder = migrationFolders[migrationFolders.length - 1];
|
|
162386
|
+
prevSnapshot = JSON.parse(import_fs3.default.readFileSync(`./${root}/${lastSnapshotFolder}/snapshot.json`).toString());
|
|
162387
|
+
}
|
|
162388
|
+
const result2 = serializer_default(dataFolderPath);
|
|
162389
|
+
return { prev: prevSnapshot, cur: result2 };
|
|
162390
|
+
};
|
|
162391
|
+
var migrationPreparator_default = prepareMigration;
|
|
162392
|
+
|
|
164584
162393
|
// src/cli/commands/migrate.ts
|
|
164585
162394
|
var prepareAndMigrate = async () => {
|
|
164586
162395
|
const drizzleConfig = js_yaml_default.load(import_fs4.default.readFileSync("drizzle.config.yml", { encoding: "utf-8" }));
|