@kontur.candy/generator 6.36.0 → 6.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1390 -1130
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18788,251 +18788,355 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
18788
18788
|
/*!**********************************************************************!*\
|
|
18789
18789
|
!*** ./node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js ***!
|
|
18790
18790
|
\**********************************************************************/
|
|
18791
|
-
/***/ (function(
|
|
18791
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
18792
18792
|
|
|
18793
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
18793
18794
|
(function (global, factory) {
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18795
|
+
if (true) {
|
|
18796
|
+
factory(module, __webpack_require__(/*! @jridgewell/sourcemap-codec */ "./node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"), __webpack_require__(/*! @jridgewell/trace-mapping */ "./node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"));
|
|
18797
|
+
module.exports = def(module);
|
|
18798
|
+
} else {}
|
|
18799
|
+
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
|
|
18800
|
+
})(this, (function (module, require_sourcemapCodec, require_traceMapping) {
|
|
18801
|
+
"use strict";
|
|
18802
|
+
var __create = Object.create;
|
|
18803
|
+
var __defProp = Object.defineProperty;
|
|
18804
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
18805
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
18806
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
18807
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18808
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
18809
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18810
|
+
};
|
|
18811
|
+
var __export = (target, all) => {
|
|
18812
|
+
for (var name in all)
|
|
18813
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18814
|
+
};
|
|
18815
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18816
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18817
|
+
for (let key of __getOwnPropNames(from))
|
|
18818
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18819
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18820
|
+
}
|
|
18821
|
+
return to;
|
|
18822
|
+
};
|
|
18823
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18824
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18825
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18826
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
18827
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18828
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18829
|
+
mod
|
|
18830
|
+
));
|
|
18831
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18803
18832
|
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
this._names = new setArray.SetArray();
|
|
18811
|
-
this._sources = new setArray.SetArray();
|
|
18812
|
-
this._sourcesContent = [];
|
|
18813
|
-
this._mappings = [];
|
|
18814
|
-
this.file = file;
|
|
18815
|
-
this.sourceRoot = sourceRoot;
|
|
18816
|
-
this._ignoreList = new setArray.SetArray();
|
|
18817
|
-
}
|
|
18818
|
-
}
|
|
18819
|
-
/**
|
|
18820
|
-
* Typescript doesn't allow friend access to private fields, so this just casts the map into a type
|
|
18821
|
-
* with public access modifiers.
|
|
18822
|
-
*/
|
|
18823
|
-
function cast(map) {
|
|
18824
|
-
return map;
|
|
18825
|
-
}
|
|
18826
|
-
function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
18827
|
-
return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
|
|
18828
|
-
}
|
|
18829
|
-
function addMapping(map, mapping) {
|
|
18830
|
-
return addMappingInternal(false, map, mapping);
|
|
18831
|
-
}
|
|
18832
|
-
/**
|
|
18833
|
-
* Same as `addSegment`, but will only add the segment if it generates useful information in the
|
|
18834
|
-
* resulting map. This only works correctly if segments are added **in order**, meaning you should
|
|
18835
|
-
* not add a segment with a lower generated line/column than one that came before.
|
|
18836
|
-
*/
|
|
18837
|
-
const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
|
|
18838
|
-
return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
|
|
18839
|
-
};
|
|
18840
|
-
/**
|
|
18841
|
-
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
|
|
18842
|
-
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
|
|
18843
|
-
* not add a mapping with a lower generated line/column than one that came before.
|
|
18844
|
-
*/
|
|
18845
|
-
const maybeAddMapping = (map, mapping) => {
|
|
18846
|
-
return addMappingInternal(true, map, mapping);
|
|
18847
|
-
};
|
|
18848
|
-
/**
|
|
18849
|
-
* Adds/removes the content of the source file to the source map.
|
|
18850
|
-
*/
|
|
18851
|
-
function setSourceContent(map, source, content) {
|
|
18852
|
-
const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);
|
|
18853
|
-
const index = setArray.put(sources, source);
|
|
18854
|
-
sourcesContent[index] = content;
|
|
18855
|
-
}
|
|
18856
|
-
function setIgnore(map, source, ignore = true) {
|
|
18857
|
-
const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);
|
|
18858
|
-
const index = setArray.put(sources, source);
|
|
18859
|
-
if (index === sourcesContent.length)
|
|
18860
|
-
sourcesContent[index] = null;
|
|
18861
|
-
if (ignore)
|
|
18862
|
-
setArray.put(ignoreList, index);
|
|
18863
|
-
else
|
|
18864
|
-
setArray.remove(ignoreList, index);
|
|
18865
|
-
}
|
|
18866
|
-
/**
|
|
18867
|
-
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
|
|
18868
|
-
* a sourcemap, or to JSON.stringify.
|
|
18869
|
-
*/
|
|
18870
|
-
function toDecodedMap(map) {
|
|
18871
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map);
|
|
18872
|
-
removeEmptyFinalLines(mappings);
|
|
18873
|
-
return {
|
|
18874
|
-
version: 3,
|
|
18875
|
-
file: map.file || undefined,
|
|
18876
|
-
names: names.array,
|
|
18877
|
-
sourceRoot: map.sourceRoot || undefined,
|
|
18878
|
-
sources: sources.array,
|
|
18879
|
-
sourcesContent,
|
|
18880
|
-
mappings,
|
|
18881
|
-
ignoreList: ignoreList.array,
|
|
18882
|
-
};
|
|
18883
|
-
}
|
|
18884
|
-
/**
|
|
18885
|
-
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
|
|
18886
|
-
* a sourcemap, or to JSON.stringify.
|
|
18887
|
-
*/
|
|
18888
|
-
function toEncodedMap(map) {
|
|
18889
|
-
const decoded = toDecodedMap(map);
|
|
18890
|
-
return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });
|
|
18891
|
-
}
|
|
18892
|
-
/**
|
|
18893
|
-
* Constructs a new GenMapping, using the already present mappings of the input.
|
|
18894
|
-
*/
|
|
18895
|
-
function fromMap(input) {
|
|
18896
|
-
const map = new traceMapping.TraceMap(input);
|
|
18897
|
-
const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
|
|
18898
|
-
putAll(cast(gen)._names, map.names);
|
|
18899
|
-
putAll(cast(gen)._sources, map.sources);
|
|
18900
|
-
cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
|
|
18901
|
-
cast(gen)._mappings = traceMapping.decodedMappings(map);
|
|
18902
|
-
if (map.ignoreList)
|
|
18903
|
-
putAll(cast(gen)._ignoreList, map.ignoreList);
|
|
18904
|
-
return gen;
|
|
18905
|
-
}
|
|
18906
|
-
/**
|
|
18907
|
-
* Returns an array of high-level mapping objects for every recorded segment, which could then be
|
|
18908
|
-
* passed to the `source-map` library.
|
|
18909
|
-
*/
|
|
18910
|
-
function allMappings(map) {
|
|
18911
|
-
const out = [];
|
|
18912
|
-
const { _mappings: mappings, _sources: sources, _names: names } = cast(map);
|
|
18913
|
-
for (let i = 0; i < mappings.length; i++) {
|
|
18914
|
-
const line = mappings[i];
|
|
18915
|
-
for (let j = 0; j < line.length; j++) {
|
|
18916
|
-
const seg = line[j];
|
|
18917
|
-
const generated = { line: i + 1, column: seg[COLUMN] };
|
|
18918
|
-
let source = undefined;
|
|
18919
|
-
let original = undefined;
|
|
18920
|
-
let name = undefined;
|
|
18921
|
-
if (seg.length !== 1) {
|
|
18922
|
-
source = sources.array[seg[SOURCES_INDEX]];
|
|
18923
|
-
original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
|
|
18924
|
-
if (seg.length === 5)
|
|
18925
|
-
name = names.array[seg[NAMES_INDEX]];
|
|
18926
|
-
}
|
|
18927
|
-
out.push({ generated, source, original, name });
|
|
18928
|
-
}
|
|
18929
|
-
}
|
|
18930
|
-
return out;
|
|
18931
|
-
}
|
|
18932
|
-
// This split declaration is only so that terser can elminiate the static initialization block.
|
|
18933
|
-
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
18934
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map);
|
|
18935
|
-
const line = getLine(mappings, genLine);
|
|
18936
|
-
const index = getColumnIndex(line, genColumn);
|
|
18937
|
-
if (!source) {
|
|
18938
|
-
if (skipable && skipSourceless(line, index))
|
|
18939
|
-
return;
|
|
18940
|
-
return insert(line, index, [genColumn]);
|
|
18941
|
-
}
|
|
18942
|
-
const sourcesIndex = setArray.put(sources, source);
|
|
18943
|
-
const namesIndex = name ? setArray.put(names, name) : NO_NAME;
|
|
18944
|
-
if (sourcesIndex === sourcesContent.length)
|
|
18945
|
-
sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
|
|
18946
|
-
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
|
|
18947
|
-
return;
|
|
18948
|
-
}
|
|
18949
|
-
return insert(line, index, name
|
|
18950
|
-
? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
|
|
18951
|
-
: [genColumn, sourcesIndex, sourceLine, sourceColumn]);
|
|
18952
|
-
}
|
|
18953
|
-
function getLine(mappings, index) {
|
|
18954
|
-
for (let i = mappings.length; i <= index; i++) {
|
|
18955
|
-
mappings[i] = [];
|
|
18956
|
-
}
|
|
18957
|
-
return mappings[index];
|
|
18958
|
-
}
|
|
18959
|
-
function getColumnIndex(line, genColumn) {
|
|
18960
|
-
let index = line.length;
|
|
18961
|
-
for (let i = index - 1; i >= 0; index = i--) {
|
|
18962
|
-
const current = line[i];
|
|
18963
|
-
if (genColumn >= current[COLUMN])
|
|
18964
|
-
break;
|
|
18965
|
-
}
|
|
18966
|
-
return index;
|
|
18967
|
-
}
|
|
18968
|
-
function insert(array, index, value) {
|
|
18969
|
-
for (let i = array.length; i > index; i--) {
|
|
18970
|
-
array[i] = array[i - 1];
|
|
18971
|
-
}
|
|
18972
|
-
array[index] = value;
|
|
18973
|
-
}
|
|
18974
|
-
function removeEmptyFinalLines(mappings) {
|
|
18975
|
-
const { length } = mappings;
|
|
18976
|
-
let len = length;
|
|
18977
|
-
for (let i = len - 1; i >= 0; len = i, i--) {
|
|
18978
|
-
if (mappings[i].length > 0)
|
|
18979
|
-
break;
|
|
18980
|
-
}
|
|
18981
|
-
if (len < length)
|
|
18982
|
-
mappings.length = len;
|
|
18983
|
-
}
|
|
18984
|
-
function putAll(setarr, array) {
|
|
18985
|
-
for (let i = 0; i < array.length; i++)
|
|
18986
|
-
setArray.put(setarr, array[i]);
|
|
18987
|
-
}
|
|
18988
|
-
function skipSourceless(line, index) {
|
|
18989
|
-
// The start of a line is already sourceless, so adding a sourceless segment to the beginning
|
|
18990
|
-
// doesn't generate any useful information.
|
|
18991
|
-
if (index === 0)
|
|
18992
|
-
return true;
|
|
18993
|
-
const prev = line[index - 1];
|
|
18994
|
-
// If the previous segment is also sourceless, then adding another sourceless segment doesn't
|
|
18995
|
-
// genrate any new information. Else, this segment will end the source/named segment and point to
|
|
18996
|
-
// a sourceless position, which is useful.
|
|
18997
|
-
return prev.length === 1;
|
|
18998
|
-
}
|
|
18999
|
-
function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
|
|
19000
|
-
// A source/named segment at the start of a line gives position at that genColumn
|
|
19001
|
-
if (index === 0)
|
|
19002
|
-
return false;
|
|
19003
|
-
const prev = line[index - 1];
|
|
19004
|
-
// If the previous segment is sourceless, then we're transitioning to a source.
|
|
19005
|
-
if (prev.length === 1)
|
|
19006
|
-
return false;
|
|
19007
|
-
// If the previous segment maps to the exact same source position, then this segment doesn't
|
|
19008
|
-
// provide any new position information.
|
|
19009
|
-
return (sourcesIndex === prev[SOURCES_INDEX] &&
|
|
19010
|
-
sourceLine === prev[SOURCE_LINE] &&
|
|
19011
|
-
sourceColumn === prev[SOURCE_COLUMN] &&
|
|
19012
|
-
namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));
|
|
19013
|
-
}
|
|
19014
|
-
function addMappingInternal(skipable, map, mapping) {
|
|
19015
|
-
const { generated, source, original, name, content } = mapping;
|
|
19016
|
-
if (!source) {
|
|
19017
|
-
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);
|
|
19018
|
-
}
|
|
19019
|
-
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
|
|
19020
|
-
}
|
|
18833
|
+
// umd:@jridgewell/sourcemap-codec
|
|
18834
|
+
var require_sourcemap_codec = __commonJS({
|
|
18835
|
+
"umd:@jridgewell/sourcemap-codec"(exports, module2) {
|
|
18836
|
+
module2.exports = require_sourcemapCodec;
|
|
18837
|
+
}
|
|
18838
|
+
});
|
|
19021
18839
|
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
exports
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
exports.maybeAddSegment = maybeAddSegment;
|
|
19029
|
-
exports.setIgnore = setIgnore;
|
|
19030
|
-
exports.setSourceContent = setSourceContent;
|
|
19031
|
-
exports.toDecodedMap = toDecodedMap;
|
|
19032
|
-
exports.toEncodedMap = toEncodedMap;
|
|
18840
|
+
// umd:@jridgewell/trace-mapping
|
|
18841
|
+
var require_trace_mapping = __commonJS({
|
|
18842
|
+
"umd:@jridgewell/trace-mapping"(exports, module2) {
|
|
18843
|
+
module2.exports = require_traceMapping;
|
|
18844
|
+
}
|
|
18845
|
+
});
|
|
19033
18846
|
|
|
19034
|
-
|
|
18847
|
+
// src/gen-mapping.ts
|
|
18848
|
+
var gen_mapping_exports = {};
|
|
18849
|
+
__export(gen_mapping_exports, {
|
|
18850
|
+
GenMapping: () => GenMapping,
|
|
18851
|
+
addMapping: () => addMapping,
|
|
18852
|
+
addSegment: () => addSegment,
|
|
18853
|
+
allMappings: () => allMappings,
|
|
18854
|
+
fromMap: () => fromMap,
|
|
18855
|
+
maybeAddMapping: () => maybeAddMapping,
|
|
18856
|
+
maybeAddSegment: () => maybeAddSegment,
|
|
18857
|
+
setIgnore: () => setIgnore,
|
|
18858
|
+
setSourceContent: () => setSourceContent,
|
|
18859
|
+
toDecodedMap: () => toDecodedMap,
|
|
18860
|
+
toEncodedMap: () => toEncodedMap
|
|
18861
|
+
});
|
|
18862
|
+
module.exports = __toCommonJS(gen_mapping_exports);
|
|
19035
18863
|
|
|
18864
|
+
// src/set-array.ts
|
|
18865
|
+
var SetArray = class {
|
|
18866
|
+
constructor() {
|
|
18867
|
+
this._indexes = { __proto__: null };
|
|
18868
|
+
this.array = [];
|
|
18869
|
+
}
|
|
18870
|
+
};
|
|
18871
|
+
function cast(set) {
|
|
18872
|
+
return set;
|
|
18873
|
+
}
|
|
18874
|
+
function get(setarr, key) {
|
|
18875
|
+
return cast(setarr)._indexes[key];
|
|
18876
|
+
}
|
|
18877
|
+
function put(setarr, key) {
|
|
18878
|
+
const index = get(setarr, key);
|
|
18879
|
+
if (index !== void 0) return index;
|
|
18880
|
+
const { array, _indexes: indexes } = cast(setarr);
|
|
18881
|
+
const length = array.push(key);
|
|
18882
|
+
return indexes[key] = length - 1;
|
|
18883
|
+
}
|
|
18884
|
+
function remove(setarr, key) {
|
|
18885
|
+
const index = get(setarr, key);
|
|
18886
|
+
if (index === void 0) return;
|
|
18887
|
+
const { array, _indexes: indexes } = cast(setarr);
|
|
18888
|
+
for (let i = index + 1; i < array.length; i++) {
|
|
18889
|
+
const k = array[i];
|
|
18890
|
+
array[i - 1] = k;
|
|
18891
|
+
indexes[k]--;
|
|
18892
|
+
}
|
|
18893
|
+
indexes[key] = void 0;
|
|
18894
|
+
array.pop();
|
|
18895
|
+
}
|
|
18896
|
+
|
|
18897
|
+
// src/gen-mapping.ts
|
|
18898
|
+
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
|
|
18899
|
+
var import_trace_mapping = __toESM(require_trace_mapping());
|
|
18900
|
+
|
|
18901
|
+
// src/sourcemap-segment.ts
|
|
18902
|
+
var COLUMN = 0;
|
|
18903
|
+
var SOURCES_INDEX = 1;
|
|
18904
|
+
var SOURCE_LINE = 2;
|
|
18905
|
+
var SOURCE_COLUMN = 3;
|
|
18906
|
+
var NAMES_INDEX = 4;
|
|
18907
|
+
|
|
18908
|
+
// src/gen-mapping.ts
|
|
18909
|
+
var NO_NAME = -1;
|
|
18910
|
+
var GenMapping = class {
|
|
18911
|
+
constructor({ file, sourceRoot } = {}) {
|
|
18912
|
+
this._names = new SetArray();
|
|
18913
|
+
this._sources = new SetArray();
|
|
18914
|
+
this._sourcesContent = [];
|
|
18915
|
+
this._mappings = [];
|
|
18916
|
+
this.file = file;
|
|
18917
|
+
this.sourceRoot = sourceRoot;
|
|
18918
|
+
this._ignoreList = new SetArray();
|
|
18919
|
+
}
|
|
18920
|
+
};
|
|
18921
|
+
function cast2(map) {
|
|
18922
|
+
return map;
|
|
18923
|
+
}
|
|
18924
|
+
function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
18925
|
+
return addSegmentInternal(
|
|
18926
|
+
false,
|
|
18927
|
+
map,
|
|
18928
|
+
genLine,
|
|
18929
|
+
genColumn,
|
|
18930
|
+
source,
|
|
18931
|
+
sourceLine,
|
|
18932
|
+
sourceColumn,
|
|
18933
|
+
name,
|
|
18934
|
+
content
|
|
18935
|
+
);
|
|
18936
|
+
}
|
|
18937
|
+
function addMapping(map, mapping) {
|
|
18938
|
+
return addMappingInternal(false, map, mapping);
|
|
18939
|
+
}
|
|
18940
|
+
var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
|
|
18941
|
+
return addSegmentInternal(
|
|
18942
|
+
true,
|
|
18943
|
+
map,
|
|
18944
|
+
genLine,
|
|
18945
|
+
genColumn,
|
|
18946
|
+
source,
|
|
18947
|
+
sourceLine,
|
|
18948
|
+
sourceColumn,
|
|
18949
|
+
name,
|
|
18950
|
+
content
|
|
18951
|
+
);
|
|
18952
|
+
};
|
|
18953
|
+
var maybeAddMapping = (map, mapping) => {
|
|
18954
|
+
return addMappingInternal(true, map, mapping);
|
|
18955
|
+
};
|
|
18956
|
+
function setSourceContent(map, source, content) {
|
|
18957
|
+
const {
|
|
18958
|
+
_sources: sources,
|
|
18959
|
+
_sourcesContent: sourcesContent
|
|
18960
|
+
// _originalScopes: originalScopes,
|
|
18961
|
+
} = cast2(map);
|
|
18962
|
+
const index = put(sources, source);
|
|
18963
|
+
sourcesContent[index] = content;
|
|
18964
|
+
}
|
|
18965
|
+
function setIgnore(map, source, ignore = true) {
|
|
18966
|
+
const {
|
|
18967
|
+
_sources: sources,
|
|
18968
|
+
_sourcesContent: sourcesContent,
|
|
18969
|
+
_ignoreList: ignoreList
|
|
18970
|
+
// _originalScopes: originalScopes,
|
|
18971
|
+
} = cast2(map);
|
|
18972
|
+
const index = put(sources, source);
|
|
18973
|
+
if (index === sourcesContent.length) sourcesContent[index] = null;
|
|
18974
|
+
if (ignore) put(ignoreList, index);
|
|
18975
|
+
else remove(ignoreList, index);
|
|
18976
|
+
}
|
|
18977
|
+
function toDecodedMap(map) {
|
|
18978
|
+
const {
|
|
18979
|
+
_mappings: mappings,
|
|
18980
|
+
_sources: sources,
|
|
18981
|
+
_sourcesContent: sourcesContent,
|
|
18982
|
+
_names: names,
|
|
18983
|
+
_ignoreList: ignoreList
|
|
18984
|
+
// _originalScopes: originalScopes,
|
|
18985
|
+
// _generatedRanges: generatedRanges,
|
|
18986
|
+
} = cast2(map);
|
|
18987
|
+
removeEmptyFinalLines(mappings);
|
|
18988
|
+
return {
|
|
18989
|
+
version: 3,
|
|
18990
|
+
file: map.file || void 0,
|
|
18991
|
+
names: names.array,
|
|
18992
|
+
sourceRoot: map.sourceRoot || void 0,
|
|
18993
|
+
sources: sources.array,
|
|
18994
|
+
sourcesContent,
|
|
18995
|
+
mappings,
|
|
18996
|
+
// originalScopes,
|
|
18997
|
+
// generatedRanges,
|
|
18998
|
+
ignoreList: ignoreList.array
|
|
18999
|
+
};
|
|
19000
|
+
}
|
|
19001
|
+
function toEncodedMap(map) {
|
|
19002
|
+
const decoded = toDecodedMap(map);
|
|
19003
|
+
return Object.assign({}, decoded, {
|
|
19004
|
+
// originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
|
|
19005
|
+
// generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
|
|
19006
|
+
mappings: (0, import_sourcemap_codec.encode)(decoded.mappings)
|
|
19007
|
+
});
|
|
19008
|
+
}
|
|
19009
|
+
function fromMap(input) {
|
|
19010
|
+
const map = new import_trace_mapping.TraceMap(input);
|
|
19011
|
+
const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
|
|
19012
|
+
putAll(cast2(gen)._names, map.names);
|
|
19013
|
+
putAll(cast2(gen)._sources, map.sources);
|
|
19014
|
+
cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
|
|
19015
|
+
cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map);
|
|
19016
|
+
if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList);
|
|
19017
|
+
return gen;
|
|
19018
|
+
}
|
|
19019
|
+
function allMappings(map) {
|
|
19020
|
+
const out = [];
|
|
19021
|
+
const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
|
|
19022
|
+
for (let i = 0; i < mappings.length; i++) {
|
|
19023
|
+
const line = mappings[i];
|
|
19024
|
+
for (let j = 0; j < line.length; j++) {
|
|
19025
|
+
const seg = line[j];
|
|
19026
|
+
const generated = { line: i + 1, column: seg[COLUMN] };
|
|
19027
|
+
let source = void 0;
|
|
19028
|
+
let original = void 0;
|
|
19029
|
+
let name = void 0;
|
|
19030
|
+
if (seg.length !== 1) {
|
|
19031
|
+
source = sources.array[seg[SOURCES_INDEX]];
|
|
19032
|
+
original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
|
|
19033
|
+
if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];
|
|
19034
|
+
}
|
|
19035
|
+
out.push({ generated, source, original, name });
|
|
19036
|
+
}
|
|
19037
|
+
}
|
|
19038
|
+
return out;
|
|
19039
|
+
}
|
|
19040
|
+
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
19041
|
+
const {
|
|
19042
|
+
_mappings: mappings,
|
|
19043
|
+
_sources: sources,
|
|
19044
|
+
_sourcesContent: sourcesContent,
|
|
19045
|
+
_names: names
|
|
19046
|
+
// _originalScopes: originalScopes,
|
|
19047
|
+
} = cast2(map);
|
|
19048
|
+
const line = getIndex(mappings, genLine);
|
|
19049
|
+
const index = getColumnIndex(line, genColumn);
|
|
19050
|
+
if (!source) {
|
|
19051
|
+
if (skipable && skipSourceless(line, index)) return;
|
|
19052
|
+
return insert(line, index, [genColumn]);
|
|
19053
|
+
}
|
|
19054
|
+
assert(sourceLine);
|
|
19055
|
+
assert(sourceColumn);
|
|
19056
|
+
const sourcesIndex = put(sources, source);
|
|
19057
|
+
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
19058
|
+
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
19059
|
+
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
|
|
19060
|
+
return;
|
|
19061
|
+
}
|
|
19062
|
+
return insert(
|
|
19063
|
+
line,
|
|
19064
|
+
index,
|
|
19065
|
+
name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
|
|
19066
|
+
);
|
|
19067
|
+
}
|
|
19068
|
+
function assert(_val) {
|
|
19069
|
+
}
|
|
19070
|
+
function getIndex(arr, index) {
|
|
19071
|
+
for (let i = arr.length; i <= index; i++) {
|
|
19072
|
+
arr[i] = [];
|
|
19073
|
+
}
|
|
19074
|
+
return arr[index];
|
|
19075
|
+
}
|
|
19076
|
+
function getColumnIndex(line, genColumn) {
|
|
19077
|
+
let index = line.length;
|
|
19078
|
+
for (let i = index - 1; i >= 0; index = i--) {
|
|
19079
|
+
const current = line[i];
|
|
19080
|
+
if (genColumn >= current[COLUMN]) break;
|
|
19081
|
+
}
|
|
19082
|
+
return index;
|
|
19083
|
+
}
|
|
19084
|
+
function insert(array, index, value) {
|
|
19085
|
+
for (let i = array.length; i > index; i--) {
|
|
19086
|
+
array[i] = array[i - 1];
|
|
19087
|
+
}
|
|
19088
|
+
array[index] = value;
|
|
19089
|
+
}
|
|
19090
|
+
function removeEmptyFinalLines(mappings) {
|
|
19091
|
+
const { length } = mappings;
|
|
19092
|
+
let len = length;
|
|
19093
|
+
for (let i = len - 1; i >= 0; len = i, i--) {
|
|
19094
|
+
if (mappings[i].length > 0) break;
|
|
19095
|
+
}
|
|
19096
|
+
if (len < length) mappings.length = len;
|
|
19097
|
+
}
|
|
19098
|
+
function putAll(setarr, array) {
|
|
19099
|
+
for (let i = 0; i < array.length; i++) put(setarr, array[i]);
|
|
19100
|
+
}
|
|
19101
|
+
function skipSourceless(line, index) {
|
|
19102
|
+
if (index === 0) return true;
|
|
19103
|
+
const prev = line[index - 1];
|
|
19104
|
+
return prev.length === 1;
|
|
19105
|
+
}
|
|
19106
|
+
function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
|
|
19107
|
+
if (index === 0) return false;
|
|
19108
|
+
const prev = line[index - 1];
|
|
19109
|
+
if (prev.length === 1) return false;
|
|
19110
|
+
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
|
|
19111
|
+
}
|
|
19112
|
+
function addMappingInternal(skipable, map, mapping) {
|
|
19113
|
+
const { generated, source, original, name, content } = mapping;
|
|
19114
|
+
if (!source) {
|
|
19115
|
+
return addSegmentInternal(
|
|
19116
|
+
skipable,
|
|
19117
|
+
map,
|
|
19118
|
+
generated.line - 1,
|
|
19119
|
+
generated.column,
|
|
19120
|
+
null,
|
|
19121
|
+
null,
|
|
19122
|
+
null,
|
|
19123
|
+
null,
|
|
19124
|
+
null
|
|
19125
|
+
);
|
|
19126
|
+
}
|
|
19127
|
+
assert(original);
|
|
19128
|
+
return addSegmentInternal(
|
|
19129
|
+
skipable,
|
|
19130
|
+
map,
|
|
19131
|
+
generated.line - 1,
|
|
19132
|
+
generated.column,
|
|
19133
|
+
source,
|
|
19134
|
+
original.line - 1,
|
|
19135
|
+
original.column,
|
|
19136
|
+
name,
|
|
19137
|
+
content
|
|
19138
|
+
);
|
|
19139
|
+
}
|
|
19036
19140
|
}));
|
|
19037
19141
|
//# sourceMappingURL=gen-mapping.umd.js.map
|
|
19038
19142
|
|
|
@@ -19286,278 +19390,467 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
19286
19390
|
//# sourceMappingURL=resolve-uri.umd.js.map
|
|
19287
19391
|
|
|
19288
19392
|
|
|
19289
|
-
/***/ }),
|
|
19290
|
-
|
|
19291
|
-
/***/ "./node_modules/@jridgewell/set-array/dist/set-array.umd.js":
|
|
19292
|
-
/*!******************************************************************!*\
|
|
19293
|
-
!*** ./node_modules/@jridgewell/set-array/dist/set-array.umd.js ***!
|
|
19294
|
-
\******************************************************************/
|
|
19295
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
19296
|
-
|
|
19297
|
-
(function (global, factory) {
|
|
19298
|
-
true ? factory(exports) :
|
|
19299
|
-
0;
|
|
19300
|
-
})(this, (function (exports) { 'use strict';
|
|
19301
|
-
|
|
19302
|
-
/**
|
|
19303
|
-
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
|
|
19304
|
-
* index of the `key` in the backing array.
|
|
19305
|
-
*
|
|
19306
|
-
* This is designed to allow synchronizing a second array with the contents of the backing array,
|
|
19307
|
-
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
|
|
19308
|
-
* and there are never duplicates.
|
|
19309
|
-
*/
|
|
19310
|
-
class SetArray {
|
|
19311
|
-
constructor() {
|
|
19312
|
-
this._indexes = { __proto__: null };
|
|
19313
|
-
this.array = [];
|
|
19314
|
-
}
|
|
19315
|
-
}
|
|
19316
|
-
/**
|
|
19317
|
-
* Typescript doesn't allow friend access to private fields, so this just casts the set into a type
|
|
19318
|
-
* with public access modifiers.
|
|
19319
|
-
*/
|
|
19320
|
-
function cast(set) {
|
|
19321
|
-
return set;
|
|
19322
|
-
}
|
|
19323
|
-
/**
|
|
19324
|
-
* Gets the index associated with `key` in the backing array, if it is already present.
|
|
19325
|
-
*/
|
|
19326
|
-
function get(setarr, key) {
|
|
19327
|
-
return cast(setarr)._indexes[key];
|
|
19328
|
-
}
|
|
19329
|
-
/**
|
|
19330
|
-
* Puts `key` into the backing array, if it is not already present. Returns
|
|
19331
|
-
* the index of the `key` in the backing array.
|
|
19332
|
-
*/
|
|
19333
|
-
function put(setarr, key) {
|
|
19334
|
-
// The key may or may not be present. If it is present, it's a number.
|
|
19335
|
-
const index = get(setarr, key);
|
|
19336
|
-
if (index !== undefined)
|
|
19337
|
-
return index;
|
|
19338
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
19339
|
-
const length = array.push(key);
|
|
19340
|
-
return (indexes[key] = length - 1);
|
|
19341
|
-
}
|
|
19342
|
-
/**
|
|
19343
|
-
* Pops the last added item out of the SetArray.
|
|
19344
|
-
*/
|
|
19345
|
-
function pop(setarr) {
|
|
19346
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
19347
|
-
if (array.length === 0)
|
|
19348
|
-
return;
|
|
19349
|
-
const last = array.pop();
|
|
19350
|
-
indexes[last] = undefined;
|
|
19351
|
-
}
|
|
19352
|
-
/**
|
|
19353
|
-
* Removes the key, if it exists in the set.
|
|
19354
|
-
*/
|
|
19355
|
-
function remove(setarr, key) {
|
|
19356
|
-
const index = get(setarr, key);
|
|
19357
|
-
if (index === undefined)
|
|
19358
|
-
return;
|
|
19359
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
19360
|
-
for (let i = index + 1; i < array.length; i++) {
|
|
19361
|
-
const k = array[i];
|
|
19362
|
-
array[i - 1] = k;
|
|
19363
|
-
indexes[k]--;
|
|
19364
|
-
}
|
|
19365
|
-
indexes[key] = undefined;
|
|
19366
|
-
array.pop();
|
|
19367
|
-
}
|
|
19368
|
-
|
|
19369
|
-
exports.SetArray = SetArray;
|
|
19370
|
-
exports.get = get;
|
|
19371
|
-
exports.pop = pop;
|
|
19372
|
-
exports.put = put;
|
|
19373
|
-
exports.remove = remove;
|
|
19374
|
-
|
|
19375
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
19376
|
-
|
|
19377
|
-
}));
|
|
19378
|
-
//# sourceMappingURL=set-array.umd.js.map
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
19393
|
/***/ }),
|
|
19382
19394
|
|
|
19383
19395
|
/***/ "./node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js":
|
|
19384
19396
|
/*!******************************************************************************!*\
|
|
19385
19397
|
!*** ./node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js ***!
|
|
19386
19398
|
\******************************************************************************/
|
|
19387
|
-
/***/ (function(
|
|
19399
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
19388
19400
|
|
|
19401
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
19389
19402
|
(function (global, factory) {
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
}
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19403
|
+
if (true) {
|
|
19404
|
+
factory(module);
|
|
19405
|
+
module.exports = def(module);
|
|
19406
|
+
} else {}
|
|
19407
|
+
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
|
|
19408
|
+
})(this, (function (module) {
|
|
19409
|
+
"use strict";
|
|
19410
|
+
var __defProp = Object.defineProperty;
|
|
19411
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
19412
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
19413
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19414
|
+
var __export = (target, all) => {
|
|
19415
|
+
for (var name in all)
|
|
19416
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19417
|
+
};
|
|
19418
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19419
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19420
|
+
for (let key of __getOwnPropNames(from))
|
|
19421
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19422
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19423
|
+
}
|
|
19424
|
+
return to;
|
|
19425
|
+
};
|
|
19426
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19427
|
+
|
|
19428
|
+
// src/sourcemap-codec.ts
|
|
19429
|
+
var sourcemap_codec_exports = {};
|
|
19430
|
+
__export(sourcemap_codec_exports, {
|
|
19431
|
+
decode: () => decode,
|
|
19432
|
+
decodeGeneratedRanges: () => decodeGeneratedRanges,
|
|
19433
|
+
decodeOriginalScopes: () => decodeOriginalScopes,
|
|
19434
|
+
encode: () => encode,
|
|
19435
|
+
encodeGeneratedRanges: () => encodeGeneratedRanges,
|
|
19436
|
+
encodeOriginalScopes: () => encodeOriginalScopes
|
|
19437
|
+
});
|
|
19438
|
+
module.exports = __toCommonJS(sourcemap_codec_exports);
|
|
19439
|
+
|
|
19440
|
+
// src/vlq.ts
|
|
19441
|
+
var comma = ",".charCodeAt(0);
|
|
19442
|
+
var semicolon = ";".charCodeAt(0);
|
|
19443
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
19444
|
+
var intToChar = new Uint8Array(64);
|
|
19445
|
+
var charToInt = new Uint8Array(128);
|
|
19446
|
+
for (let i = 0; i < chars.length; i++) {
|
|
19447
|
+
const c = chars.charCodeAt(i);
|
|
19448
|
+
intToChar[i] = c;
|
|
19449
|
+
charToInt[c] = i;
|
|
19450
|
+
}
|
|
19451
|
+
function decodeInteger(reader, relative) {
|
|
19452
|
+
let value = 0;
|
|
19453
|
+
let shift = 0;
|
|
19454
|
+
let integer = 0;
|
|
19455
|
+
do {
|
|
19456
|
+
const c = reader.next();
|
|
19457
|
+
integer = charToInt[c];
|
|
19458
|
+
value |= (integer & 31) << shift;
|
|
19459
|
+
shift += 5;
|
|
19460
|
+
} while (integer & 32);
|
|
19461
|
+
const shouldNegate = value & 1;
|
|
19462
|
+
value >>>= 1;
|
|
19463
|
+
if (shouldNegate) {
|
|
19464
|
+
value = -2147483648 | -value;
|
|
19465
|
+
}
|
|
19466
|
+
return relative + value;
|
|
19467
|
+
}
|
|
19468
|
+
function encodeInteger(builder, num, relative) {
|
|
19469
|
+
let delta = num - relative;
|
|
19470
|
+
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
19471
|
+
do {
|
|
19472
|
+
let clamped = delta & 31;
|
|
19473
|
+
delta >>>= 5;
|
|
19474
|
+
if (delta > 0) clamped |= 32;
|
|
19475
|
+
builder.write(intToChar[clamped]);
|
|
19476
|
+
} while (delta > 0);
|
|
19477
|
+
return num;
|
|
19478
|
+
}
|
|
19479
|
+
function hasMoreVlq(reader, max) {
|
|
19480
|
+
if (reader.pos >= max) return false;
|
|
19481
|
+
return reader.peek() !== comma;
|
|
19482
|
+
}
|
|
19483
|
+
|
|
19484
|
+
// src/strings.ts
|
|
19485
|
+
var bufLength = 1024 * 16;
|
|
19486
|
+
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
19487
|
+
decode(buf) {
|
|
19488
|
+
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
19489
|
+
return out.toString();
|
|
19490
|
+
}
|
|
19491
|
+
} : {
|
|
19492
|
+
decode(buf) {
|
|
19493
|
+
let out = "";
|
|
19494
|
+
for (let i = 0; i < buf.length; i++) {
|
|
19495
|
+
out += String.fromCharCode(buf[i]);
|
|
19496
|
+
}
|
|
19497
|
+
return out;
|
|
19498
|
+
}
|
|
19499
|
+
};
|
|
19500
|
+
var StringWriter = class {
|
|
19501
|
+
constructor() {
|
|
19502
|
+
this.pos = 0;
|
|
19503
|
+
this.out = "";
|
|
19504
|
+
this.buffer = new Uint8Array(bufLength);
|
|
19505
|
+
}
|
|
19506
|
+
write(v) {
|
|
19507
|
+
const { buffer } = this;
|
|
19508
|
+
buffer[this.pos++] = v;
|
|
19509
|
+
if (this.pos === bufLength) {
|
|
19510
|
+
this.out += td.decode(buffer);
|
|
19511
|
+
this.pos = 0;
|
|
19512
|
+
}
|
|
19513
|
+
}
|
|
19514
|
+
flush() {
|
|
19515
|
+
const { buffer, out, pos } = this;
|
|
19516
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
19517
|
+
}
|
|
19518
|
+
};
|
|
19519
|
+
var StringReader = class {
|
|
19520
|
+
constructor(buffer) {
|
|
19521
|
+
this.pos = 0;
|
|
19522
|
+
this.buffer = buffer;
|
|
19523
|
+
}
|
|
19524
|
+
next() {
|
|
19525
|
+
return this.buffer.charCodeAt(this.pos++);
|
|
19526
|
+
}
|
|
19527
|
+
peek() {
|
|
19528
|
+
return this.buffer.charCodeAt(this.pos);
|
|
19529
|
+
}
|
|
19530
|
+
indexOf(char) {
|
|
19531
|
+
const { buffer, pos } = this;
|
|
19532
|
+
const idx = buffer.indexOf(char, pos);
|
|
19533
|
+
return idx === -1 ? buffer.length : idx;
|
|
19534
|
+
}
|
|
19535
|
+
};
|
|
19536
|
+
|
|
19537
|
+
// src/scopes.ts
|
|
19538
|
+
var EMPTY = [];
|
|
19539
|
+
function decodeOriginalScopes(input) {
|
|
19540
|
+
const { length } = input;
|
|
19541
|
+
const reader = new StringReader(input);
|
|
19542
|
+
const scopes = [];
|
|
19543
|
+
const stack = [];
|
|
19544
|
+
let line = 0;
|
|
19545
|
+
for (; reader.pos < length; reader.pos++) {
|
|
19546
|
+
line = decodeInteger(reader, line);
|
|
19547
|
+
const column = decodeInteger(reader, 0);
|
|
19548
|
+
if (!hasMoreVlq(reader, length)) {
|
|
19549
|
+
const last = stack.pop();
|
|
19550
|
+
last[2] = line;
|
|
19551
|
+
last[3] = column;
|
|
19552
|
+
continue;
|
|
19553
|
+
}
|
|
19554
|
+
const kind = decodeInteger(reader, 0);
|
|
19555
|
+
const fields = decodeInteger(reader, 0);
|
|
19556
|
+
const hasName = fields & 1;
|
|
19557
|
+
const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
|
|
19558
|
+
let vars = EMPTY;
|
|
19559
|
+
if (hasMoreVlq(reader, length)) {
|
|
19560
|
+
vars = [];
|
|
19561
|
+
do {
|
|
19562
|
+
const varsIndex = decodeInteger(reader, 0);
|
|
19563
|
+
vars.push(varsIndex);
|
|
19564
|
+
} while (hasMoreVlq(reader, length));
|
|
19565
|
+
}
|
|
19566
|
+
scope.vars = vars;
|
|
19567
|
+
scopes.push(scope);
|
|
19568
|
+
stack.push(scope);
|
|
19569
|
+
}
|
|
19570
|
+
return scopes;
|
|
19571
|
+
}
|
|
19572
|
+
function encodeOriginalScopes(scopes) {
|
|
19573
|
+
const writer = new StringWriter();
|
|
19574
|
+
for (let i = 0; i < scopes.length; ) {
|
|
19575
|
+
i = _encodeOriginalScopes(scopes, i, writer, [0]);
|
|
19576
|
+
}
|
|
19577
|
+
return writer.flush();
|
|
19578
|
+
}
|
|
19579
|
+
function _encodeOriginalScopes(scopes, index, writer, state) {
|
|
19580
|
+
const scope = scopes[index];
|
|
19581
|
+
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
|
|
19582
|
+
if (index > 0) writer.write(comma);
|
|
19583
|
+
state[0] = encodeInteger(writer, startLine, state[0]);
|
|
19584
|
+
encodeInteger(writer, startColumn, 0);
|
|
19585
|
+
encodeInteger(writer, kind, 0);
|
|
19586
|
+
const fields = scope.length === 6 ? 1 : 0;
|
|
19587
|
+
encodeInteger(writer, fields, 0);
|
|
19588
|
+
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
|
|
19589
|
+
for (const v of vars) {
|
|
19590
|
+
encodeInteger(writer, v, 0);
|
|
19591
|
+
}
|
|
19592
|
+
for (index++; index < scopes.length; ) {
|
|
19593
|
+
const next = scopes[index];
|
|
19594
|
+
const { 0: l, 1: c } = next;
|
|
19595
|
+
if (l > endLine || l === endLine && c >= endColumn) {
|
|
19596
|
+
break;
|
|
19597
|
+
}
|
|
19598
|
+
index = _encodeOriginalScopes(scopes, index, writer, state);
|
|
19599
|
+
}
|
|
19600
|
+
writer.write(comma);
|
|
19601
|
+
state[0] = encodeInteger(writer, endLine, state[0]);
|
|
19602
|
+
encodeInteger(writer, endColumn, 0);
|
|
19603
|
+
return index;
|
|
19604
|
+
}
|
|
19605
|
+
function decodeGeneratedRanges(input) {
|
|
19606
|
+
const { length } = input;
|
|
19607
|
+
const reader = new StringReader(input);
|
|
19608
|
+
const ranges = [];
|
|
19609
|
+
const stack = [];
|
|
19610
|
+
let genLine = 0;
|
|
19611
|
+
let definitionSourcesIndex = 0;
|
|
19612
|
+
let definitionScopeIndex = 0;
|
|
19613
|
+
let callsiteSourcesIndex = 0;
|
|
19614
|
+
let callsiteLine = 0;
|
|
19615
|
+
let callsiteColumn = 0;
|
|
19616
|
+
let bindingLine = 0;
|
|
19617
|
+
let bindingColumn = 0;
|
|
19618
|
+
do {
|
|
19619
|
+
const semi = reader.indexOf(";");
|
|
19620
|
+
let genColumn = 0;
|
|
19621
|
+
for (; reader.pos < semi; reader.pos++) {
|
|
19622
|
+
genColumn = decodeInteger(reader, genColumn);
|
|
19623
|
+
if (!hasMoreVlq(reader, semi)) {
|
|
19624
|
+
const last = stack.pop();
|
|
19625
|
+
last[2] = genLine;
|
|
19626
|
+
last[3] = genColumn;
|
|
19627
|
+
continue;
|
|
19628
|
+
}
|
|
19629
|
+
const fields = decodeInteger(reader, 0);
|
|
19630
|
+
const hasDefinition = fields & 1;
|
|
19631
|
+
const hasCallsite = fields & 2;
|
|
19632
|
+
const hasScope = fields & 4;
|
|
19633
|
+
let callsite = null;
|
|
19634
|
+
let bindings = EMPTY;
|
|
19635
|
+
let range;
|
|
19636
|
+
if (hasDefinition) {
|
|
19637
|
+
const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
|
|
19638
|
+
definitionScopeIndex = decodeInteger(
|
|
19639
|
+
reader,
|
|
19640
|
+
definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
|
|
19641
|
+
);
|
|
19642
|
+
definitionSourcesIndex = defSourcesIndex;
|
|
19643
|
+
range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
|
|
19644
|
+
} else {
|
|
19645
|
+
range = [genLine, genColumn, 0, 0];
|
|
19646
|
+
}
|
|
19647
|
+
range.isScope = !!hasScope;
|
|
19648
|
+
if (hasCallsite) {
|
|
19649
|
+
const prevCsi = callsiteSourcesIndex;
|
|
19650
|
+
const prevLine = callsiteLine;
|
|
19651
|
+
callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
|
|
19652
|
+
const sameSource = prevCsi === callsiteSourcesIndex;
|
|
19653
|
+
callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
|
|
19654
|
+
callsiteColumn = decodeInteger(
|
|
19655
|
+
reader,
|
|
19656
|
+
sameSource && prevLine === callsiteLine ? callsiteColumn : 0
|
|
19657
|
+
);
|
|
19658
|
+
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
|
|
19659
|
+
}
|
|
19660
|
+
range.callsite = callsite;
|
|
19661
|
+
if (hasMoreVlq(reader, semi)) {
|
|
19662
|
+
bindings = [];
|
|
19472
19663
|
do {
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
}
|
|
19486
|
-
function hasMoreVlq(mappings, i, length) {
|
|
19487
|
-
if (i >= length)
|
|
19488
|
-
return false;
|
|
19489
|
-
return mappings.charCodeAt(i) !== comma;
|
|
19490
|
-
}
|
|
19491
|
-
function sort(line) {
|
|
19492
|
-
line.sort(sortComparator);
|
|
19493
|
-
}
|
|
19494
|
-
function sortComparator(a, b) {
|
|
19495
|
-
return a[0] - b[0];
|
|
19496
|
-
}
|
|
19497
|
-
function encode(decoded) {
|
|
19498
|
-
const state = new Int32Array(5);
|
|
19499
|
-
const bufLength = 1024 * 16;
|
|
19500
|
-
const subLength = bufLength - 36;
|
|
19501
|
-
const buf = new Uint8Array(bufLength);
|
|
19502
|
-
const sub = buf.subarray(0, subLength);
|
|
19503
|
-
let pos = 0;
|
|
19504
|
-
let out = '';
|
|
19505
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
19506
|
-
const line = decoded[i];
|
|
19507
|
-
if (i > 0) {
|
|
19508
|
-
if (pos === bufLength) {
|
|
19509
|
-
out += td.decode(buf);
|
|
19510
|
-
pos = 0;
|
|
19511
|
-
}
|
|
19512
|
-
buf[pos++] = semicolon;
|
|
19664
|
+
bindingLine = genLine;
|
|
19665
|
+
bindingColumn = genColumn;
|
|
19666
|
+
const expressionsCount = decodeInteger(reader, 0);
|
|
19667
|
+
let expressionRanges;
|
|
19668
|
+
if (expressionsCount < -1) {
|
|
19669
|
+
expressionRanges = [[decodeInteger(reader, 0)]];
|
|
19670
|
+
for (let i = -1; i > expressionsCount; i--) {
|
|
19671
|
+
const prevBl = bindingLine;
|
|
19672
|
+
bindingLine = decodeInteger(reader, bindingLine);
|
|
19673
|
+
bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
|
|
19674
|
+
const expression = decodeInteger(reader, 0);
|
|
19675
|
+
expressionRanges.push([expression, bindingLine, bindingColumn]);
|
|
19513
19676
|
}
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19520
|
-
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
buf.copyWithin(0, subLength, pos);
|
|
19524
|
-
pos -= subLength;
|
|
19525
|
-
}
|
|
19526
|
-
if (j > 0)
|
|
19527
|
-
buf[pos++] = comma;
|
|
19528
|
-
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
|
|
19529
|
-
if (segment.length === 1)
|
|
19530
|
-
continue;
|
|
19531
|
-
pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
|
|
19532
|
-
pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
|
|
19533
|
-
pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
|
|
19534
|
-
if (segment.length === 4)
|
|
19535
|
-
continue;
|
|
19536
|
-
pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
|
|
19537
|
-
}
|
|
19538
|
-
}
|
|
19539
|
-
return out + td.decode(buf.subarray(0, pos));
|
|
19677
|
+
} else {
|
|
19678
|
+
expressionRanges = [[expressionsCount]];
|
|
19679
|
+
}
|
|
19680
|
+
bindings.push(expressionRanges);
|
|
19681
|
+
} while (hasMoreVlq(reader, semi));
|
|
19682
|
+
}
|
|
19683
|
+
range.bindings = bindings;
|
|
19684
|
+
ranges.push(range);
|
|
19685
|
+
stack.push(range);
|
|
19540
19686
|
}
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19687
|
+
genLine++;
|
|
19688
|
+
reader.pos = semi + 1;
|
|
19689
|
+
} while (reader.pos < length);
|
|
19690
|
+
return ranges;
|
|
19691
|
+
}
|
|
19692
|
+
function encodeGeneratedRanges(ranges) {
|
|
19693
|
+
if (ranges.length === 0) return "";
|
|
19694
|
+
const writer = new StringWriter();
|
|
19695
|
+
for (let i = 0; i < ranges.length; ) {
|
|
19696
|
+
i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
|
|
19697
|
+
}
|
|
19698
|
+
return writer.flush();
|
|
19699
|
+
}
|
|
19700
|
+
function _encodeGeneratedRanges(ranges, index, writer, state) {
|
|
19701
|
+
const range = ranges[index];
|
|
19702
|
+
const {
|
|
19703
|
+
0: startLine,
|
|
19704
|
+
1: startColumn,
|
|
19705
|
+
2: endLine,
|
|
19706
|
+
3: endColumn,
|
|
19707
|
+
isScope,
|
|
19708
|
+
callsite,
|
|
19709
|
+
bindings
|
|
19710
|
+
} = range;
|
|
19711
|
+
if (state[0] < startLine) {
|
|
19712
|
+
catchupLine(writer, state[0], startLine);
|
|
19713
|
+
state[0] = startLine;
|
|
19714
|
+
state[1] = 0;
|
|
19715
|
+
} else if (index > 0) {
|
|
19716
|
+
writer.write(comma);
|
|
19717
|
+
}
|
|
19718
|
+
state[1] = encodeInteger(writer, range[1], state[1]);
|
|
19719
|
+
const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
|
|
19720
|
+
encodeInteger(writer, fields, 0);
|
|
19721
|
+
if (range.length === 6) {
|
|
19722
|
+
const { 4: sourcesIndex, 5: scopesIndex } = range;
|
|
19723
|
+
if (sourcesIndex !== state[2]) {
|
|
19724
|
+
state[3] = 0;
|
|
19725
|
+
}
|
|
19726
|
+
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
|
|
19727
|
+
state[3] = encodeInteger(writer, scopesIndex, state[3]);
|
|
19728
|
+
}
|
|
19729
|
+
if (callsite) {
|
|
19730
|
+
const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
|
|
19731
|
+
if (sourcesIndex !== state[4]) {
|
|
19732
|
+
state[5] = 0;
|
|
19733
|
+
state[6] = 0;
|
|
19734
|
+
} else if (callLine !== state[5]) {
|
|
19735
|
+
state[6] = 0;
|
|
19736
|
+
}
|
|
19737
|
+
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
|
|
19738
|
+
state[5] = encodeInteger(writer, callLine, state[5]);
|
|
19739
|
+
state[6] = encodeInteger(writer, callColumn, state[6]);
|
|
19740
|
+
}
|
|
19741
|
+
if (bindings) {
|
|
19742
|
+
for (const binding of bindings) {
|
|
19743
|
+
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
|
|
19744
|
+
const expression = binding[0][0];
|
|
19745
|
+
encodeInteger(writer, expression, 0);
|
|
19746
|
+
let bindingStartLine = startLine;
|
|
19747
|
+
let bindingStartColumn = startColumn;
|
|
19748
|
+
for (let i = 1; i < binding.length; i++) {
|
|
19749
|
+
const expRange = binding[i];
|
|
19750
|
+
bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
|
|
19751
|
+
bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
|
|
19752
|
+
encodeInteger(writer, expRange[0], 0);
|
|
19753
|
+
}
|
|
19754
|
+
}
|
|
19755
|
+
}
|
|
19756
|
+
for (index++; index < ranges.length; ) {
|
|
19757
|
+
const next = ranges[index];
|
|
19758
|
+
const { 0: l, 1: c } = next;
|
|
19759
|
+
if (l > endLine || l === endLine && c >= endColumn) {
|
|
19760
|
+
break;
|
|
19554
19761
|
}
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19762
|
+
index = _encodeGeneratedRanges(ranges, index, writer, state);
|
|
19763
|
+
}
|
|
19764
|
+
if (state[0] < endLine) {
|
|
19765
|
+
catchupLine(writer, state[0], endLine);
|
|
19766
|
+
state[0] = endLine;
|
|
19767
|
+
state[1] = 0;
|
|
19768
|
+
} else {
|
|
19769
|
+
writer.write(comma);
|
|
19770
|
+
}
|
|
19771
|
+
state[1] = encodeInteger(writer, endColumn, state[1]);
|
|
19772
|
+
return index;
|
|
19773
|
+
}
|
|
19774
|
+
function catchupLine(writer, lastLine, line) {
|
|
19775
|
+
do {
|
|
19776
|
+
writer.write(semicolon);
|
|
19777
|
+
} while (++lastLine < line);
|
|
19778
|
+
}
|
|
19779
|
+
|
|
19780
|
+
// src/sourcemap-codec.ts
|
|
19781
|
+
function decode(mappings) {
|
|
19782
|
+
const { length } = mappings;
|
|
19783
|
+
const reader = new StringReader(mappings);
|
|
19784
|
+
const decoded = [];
|
|
19785
|
+
let genColumn = 0;
|
|
19786
|
+
let sourcesIndex = 0;
|
|
19787
|
+
let sourceLine = 0;
|
|
19788
|
+
let sourceColumn = 0;
|
|
19789
|
+
let namesIndex = 0;
|
|
19790
|
+
do {
|
|
19791
|
+
const semi = reader.indexOf(";");
|
|
19792
|
+
const line = [];
|
|
19793
|
+
let sorted = true;
|
|
19794
|
+
let lastCol = 0;
|
|
19795
|
+
genColumn = 0;
|
|
19796
|
+
while (reader.pos < semi) {
|
|
19797
|
+
let seg;
|
|
19798
|
+
genColumn = decodeInteger(reader, genColumn);
|
|
19799
|
+
if (genColumn < lastCol) sorted = false;
|
|
19800
|
+
lastCol = genColumn;
|
|
19801
|
+
if (hasMoreVlq(reader, semi)) {
|
|
19802
|
+
sourcesIndex = decodeInteger(reader, sourcesIndex);
|
|
19803
|
+
sourceLine = decodeInteger(reader, sourceLine);
|
|
19804
|
+
sourceColumn = decodeInteger(reader, sourceColumn);
|
|
19805
|
+
if (hasMoreVlq(reader, semi)) {
|
|
19806
|
+
namesIndex = decodeInteger(reader, namesIndex);
|
|
19807
|
+
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
|
|
19808
|
+
} else {
|
|
19809
|
+
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
|
|
19810
|
+
}
|
|
19811
|
+
} else {
|
|
19812
|
+
seg = [genColumn];
|
|
19813
|
+
}
|
|
19814
|
+
line.push(seg);
|
|
19815
|
+
reader.pos++;
|
|
19816
|
+
}
|
|
19817
|
+
if (!sorted) sort(line);
|
|
19818
|
+
decoded.push(line);
|
|
19819
|
+
reader.pos = semi + 1;
|
|
19820
|
+
} while (reader.pos <= length);
|
|
19821
|
+
return decoded;
|
|
19822
|
+
}
|
|
19823
|
+
function sort(line) {
|
|
19824
|
+
line.sort(sortComparator);
|
|
19825
|
+
}
|
|
19826
|
+
function sortComparator(a, b) {
|
|
19827
|
+
return a[0] - b[0];
|
|
19828
|
+
}
|
|
19829
|
+
function encode(decoded) {
|
|
19830
|
+
const writer = new StringWriter();
|
|
19831
|
+
let sourcesIndex = 0;
|
|
19832
|
+
let sourceLine = 0;
|
|
19833
|
+
let sourceColumn = 0;
|
|
19834
|
+
let namesIndex = 0;
|
|
19835
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
19836
|
+
const line = decoded[i];
|
|
19837
|
+
if (i > 0) writer.write(semicolon);
|
|
19838
|
+
if (line.length === 0) continue;
|
|
19839
|
+
let genColumn = 0;
|
|
19840
|
+
for (let j = 0; j < line.length; j++) {
|
|
19841
|
+
const segment = line[j];
|
|
19842
|
+
if (j > 0) writer.write(comma);
|
|
19843
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
19844
|
+
if (segment.length === 1) continue;
|
|
19845
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
19846
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
19847
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
19848
|
+
if (segment.length === 4) continue;
|
|
19849
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
19850
|
+
}
|
|
19851
|
+
}
|
|
19852
|
+
return writer.flush();
|
|
19853
|
+
}
|
|
19561
19854
|
}));
|
|
19562
19855
|
//# sourceMappingURL=sourcemap-codec.umd.js.map
|
|
19563
19856
|
|
|
@@ -19568,605 +19861,556 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
19568
19861
|
/*!**************************************************************************!*\
|
|
19569
19862
|
!*** ./node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js ***!
|
|
19570
19863
|
\**************************************************************************/
|
|
19571
|
-
/***/ (function(
|
|
19864
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
19572
19865
|
|
|
19866
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
19573
19867
|
(function (global, factory) {
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19868
|
+
if (true) {
|
|
19869
|
+
factory(module, __webpack_require__(/*! @jridgewell/resolve-uri */ "./node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"), __webpack_require__(/*! @jridgewell/sourcemap-codec */ "./node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"));
|
|
19870
|
+
module.exports = def(module);
|
|
19871
|
+
} else {}
|
|
19872
|
+
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
|
|
19873
|
+
})(this, (function (module, require_resolveURI, require_sourcemapCodec) {
|
|
19874
|
+
"use strict";
|
|
19875
|
+
var __create = Object.create;
|
|
19876
|
+
var __defProp = Object.defineProperty;
|
|
19877
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
19878
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
19879
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
19880
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19881
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
19882
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19883
|
+
};
|
|
19884
|
+
var __export = (target, all) => {
|
|
19885
|
+
for (var name in all)
|
|
19886
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19887
|
+
};
|
|
19888
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19889
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19890
|
+
for (let key of __getOwnPropNames(from))
|
|
19891
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19892
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19893
|
+
}
|
|
19894
|
+
return to;
|
|
19895
|
+
};
|
|
19896
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19897
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19898
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19899
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19900
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
19901
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19902
|
+
mod
|
|
19903
|
+
));
|
|
19904
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19905
|
+
|
|
19906
|
+
// umd:@jridgewell/sourcemap-codec
|
|
19907
|
+
var require_sourcemap_codec = __commonJS({
|
|
19908
|
+
"umd:@jridgewell/sourcemap-codec"(exports, module2) {
|
|
19909
|
+
module2.exports = require_sourcemapCodec;
|
|
19910
|
+
}
|
|
19911
|
+
});
|
|
19912
|
+
|
|
19913
|
+
// umd:@jridgewell/resolve-uri
|
|
19914
|
+
var require_resolve_uri = __commonJS({
|
|
19915
|
+
"umd:@jridgewell/resolve-uri"(exports, module2) {
|
|
19916
|
+
module2.exports = require_resolveURI;
|
|
19917
|
+
}
|
|
19918
|
+
});
|
|
19919
|
+
|
|
19920
|
+
// src/trace-mapping.ts
|
|
19921
|
+
var trace_mapping_exports = {};
|
|
19922
|
+
__export(trace_mapping_exports, {
|
|
19923
|
+
AnyMap: () => FlattenMap,
|
|
19924
|
+
FlattenMap: () => FlattenMap,
|
|
19925
|
+
GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND,
|
|
19926
|
+
LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND,
|
|
19927
|
+
TraceMap: () => TraceMap,
|
|
19928
|
+
allGeneratedPositionsFor: () => allGeneratedPositionsFor,
|
|
19929
|
+
decodedMap: () => decodedMap,
|
|
19930
|
+
decodedMappings: () => decodedMappings,
|
|
19931
|
+
eachMapping: () => eachMapping,
|
|
19932
|
+
encodedMap: () => encodedMap,
|
|
19933
|
+
encodedMappings: () => encodedMappings,
|
|
19934
|
+
generatedPositionFor: () => generatedPositionFor,
|
|
19935
|
+
isIgnored: () => isIgnored,
|
|
19936
|
+
originalPositionFor: () => originalPositionFor,
|
|
19937
|
+
presortedDecodedMap: () => presortedDecodedMap,
|
|
19938
|
+
sourceContentFor: () => sourceContentFor,
|
|
19939
|
+
traceSegment: () => traceSegment
|
|
19940
|
+
});
|
|
19941
|
+
module.exports = __toCommonJS(trace_mapping_exports);
|
|
19942
|
+
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
|
|
19943
|
+
|
|
19944
|
+
// src/resolve.ts
|
|
19945
|
+
var import_resolve_uri = __toESM(require_resolve_uri());
|
|
19946
|
+
|
|
19947
|
+
// src/strip-filename.ts
|
|
19948
|
+
function stripFilename(path) {
|
|
19949
|
+
if (!path) return "";
|
|
19950
|
+
const index = path.lastIndexOf("/");
|
|
19951
|
+
return path.slice(0, index + 1);
|
|
19952
|
+
}
|
|
19953
|
+
|
|
19954
|
+
// src/resolve.ts
|
|
19955
|
+
function resolver(mapUrl, sourceRoot) {
|
|
19956
|
+
const from = stripFilename(mapUrl);
|
|
19957
|
+
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
19958
|
+
return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from);
|
|
19959
|
+
}
|
|
19960
|
+
|
|
19961
|
+
// src/sourcemap-segment.ts
|
|
19962
|
+
var COLUMN = 0;
|
|
19963
|
+
var SOURCES_INDEX = 1;
|
|
19964
|
+
var SOURCE_LINE = 2;
|
|
19965
|
+
var SOURCE_COLUMN = 3;
|
|
19966
|
+
var NAMES_INDEX = 4;
|
|
19967
|
+
var REV_GENERATED_LINE = 1;
|
|
19968
|
+
var REV_GENERATED_COLUMN = 2;
|
|
19969
|
+
|
|
19970
|
+
// src/sort.ts
|
|
19971
|
+
function maybeSort(mappings, owned) {
|
|
19972
|
+
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
19973
|
+
if (unsortedIndex === mappings.length) return mappings;
|
|
19974
|
+
if (!owned) mappings = mappings.slice();
|
|
19975
|
+
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
|
|
19976
|
+
mappings[i] = sortSegments(mappings[i], owned);
|
|
19977
|
+
}
|
|
19978
|
+
return mappings;
|
|
19979
|
+
}
|
|
19980
|
+
function nextUnsortedSegmentLine(mappings, start) {
|
|
19981
|
+
for (let i = start; i < mappings.length; i++) {
|
|
19982
|
+
if (!isSorted(mappings[i])) return i;
|
|
19983
|
+
}
|
|
19984
|
+
return mappings.length;
|
|
19985
|
+
}
|
|
19986
|
+
function isSorted(line) {
|
|
19987
|
+
for (let j = 1; j < line.length; j++) {
|
|
19988
|
+
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
|
|
19989
|
+
return false;
|
|
19595
19990
|
}
|
|
19991
|
+
}
|
|
19992
|
+
return true;
|
|
19993
|
+
}
|
|
19994
|
+
function sortSegments(line, owned) {
|
|
19995
|
+
if (!owned) line = line.slice();
|
|
19996
|
+
return line.sort(sortComparator);
|
|
19997
|
+
}
|
|
19998
|
+
function sortComparator(a, b) {
|
|
19999
|
+
return a[COLUMN] - b[COLUMN];
|
|
20000
|
+
}
|
|
19596
20001
|
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
const
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
|
|
19605
|
-
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
if (!owned)
|
|
19612
|
-
mappings = mappings.slice();
|
|
19613
|
-
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
|
|
19614
|
-
mappings[i] = sortSegments(mappings[i], owned);
|
|
19615
|
-
}
|
|
19616
|
-
return mappings;
|
|
19617
|
-
}
|
|
19618
|
-
function nextUnsortedSegmentLine(mappings, start) {
|
|
19619
|
-
for (let i = start; i < mappings.length; i++) {
|
|
19620
|
-
if (!isSorted(mappings[i]))
|
|
19621
|
-
return i;
|
|
19622
|
-
}
|
|
19623
|
-
return mappings.length;
|
|
19624
|
-
}
|
|
19625
|
-
function isSorted(line) {
|
|
19626
|
-
for (let j = 1; j < line.length; j++) {
|
|
19627
|
-
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
|
|
19628
|
-
return false;
|
|
19629
|
-
}
|
|
19630
|
-
}
|
|
19631
|
-
return true;
|
|
20002
|
+
// src/by-source.ts
|
|
20003
|
+
function buildBySources(decoded, memos) {
|
|
20004
|
+
const sources = memos.map(() => []);
|
|
20005
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
20006
|
+
const line = decoded[i];
|
|
20007
|
+
for (let j = 0; j < line.length; j++) {
|
|
20008
|
+
const seg = line[j];
|
|
20009
|
+
if (seg.length === 1) continue;
|
|
20010
|
+
const sourceIndex2 = seg[SOURCES_INDEX];
|
|
20011
|
+
const sourceLine = seg[SOURCE_LINE];
|
|
20012
|
+
const sourceColumn = seg[SOURCE_COLUMN];
|
|
20013
|
+
const source = sources[sourceIndex2];
|
|
20014
|
+
const segs = source[sourceLine] || (source[sourceLine] = []);
|
|
20015
|
+
segs.push([sourceColumn, i, seg[COLUMN]]);
|
|
19632
20016
|
}
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
return a[COLUMN] - b[COLUMN];
|
|
20017
|
+
}
|
|
20018
|
+
for (let i = 0; i < sources.length; i++) {
|
|
20019
|
+
const source = sources[i];
|
|
20020
|
+
for (let j = 0; j < source.length; j++) {
|
|
20021
|
+
const line = source[j];
|
|
20022
|
+
if (line) line.sort(sortComparator);
|
|
19640
20023
|
}
|
|
20024
|
+
}
|
|
20025
|
+
return sources;
|
|
20026
|
+
}
|
|
19641
20027
|
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
* const needle = 2;
|
|
19652
|
-
* const index = binarySearch(array, needle, (item, needle) => item - needle);
|
|
19653
|
-
*
|
|
19654
|
-
* assert.equal(index, 0);
|
|
19655
|
-
* array.splice(index + 1, 0, needle);
|
|
19656
|
-
* assert.deepEqual(array, [1, 2, 3]);
|
|
19657
|
-
* ```
|
|
19658
|
-
*/
|
|
19659
|
-
function binarySearch(haystack, needle, low, high) {
|
|
19660
|
-
while (low <= high) {
|
|
19661
|
-
const mid = low + ((high - low) >> 1);
|
|
19662
|
-
const cmp = haystack[mid][COLUMN] - needle;
|
|
19663
|
-
if (cmp === 0) {
|
|
19664
|
-
found = true;
|
|
19665
|
-
return mid;
|
|
19666
|
-
}
|
|
19667
|
-
if (cmp < 0) {
|
|
19668
|
-
low = mid + 1;
|
|
19669
|
-
}
|
|
19670
|
-
else {
|
|
19671
|
-
high = mid - 1;
|
|
19672
|
-
}
|
|
19673
|
-
}
|
|
19674
|
-
found = false;
|
|
19675
|
-
return low - 1;
|
|
19676
|
-
}
|
|
19677
|
-
function upperBound(haystack, needle, index) {
|
|
19678
|
-
for (let i = index + 1; i < haystack.length; index = i++) {
|
|
19679
|
-
if (haystack[i][COLUMN] !== needle)
|
|
19680
|
-
break;
|
|
19681
|
-
}
|
|
19682
|
-
return index;
|
|
19683
|
-
}
|
|
19684
|
-
function lowerBound(haystack, needle, index) {
|
|
19685
|
-
for (let i = index - 1; i >= 0; index = i--) {
|
|
19686
|
-
if (haystack[i][COLUMN] !== needle)
|
|
19687
|
-
break;
|
|
19688
|
-
}
|
|
19689
|
-
return index;
|
|
19690
|
-
}
|
|
19691
|
-
function memoizedState() {
|
|
19692
|
-
return {
|
|
19693
|
-
lastKey: -1,
|
|
19694
|
-
lastNeedle: -1,
|
|
19695
|
-
lastIndex: -1,
|
|
19696
|
-
};
|
|
19697
|
-
}
|
|
19698
|
-
/**
|
|
19699
|
-
* This overly complicated beast is just to record the last tested line/column and the resulting
|
|
19700
|
-
* index, allowing us to skip a few tests if mappings are monotonically increasing.
|
|
19701
|
-
*/
|
|
19702
|
-
function memoizedBinarySearch(haystack, needle, state, key) {
|
|
19703
|
-
const { lastKey, lastNeedle, lastIndex } = state;
|
|
19704
|
-
let low = 0;
|
|
19705
|
-
let high = haystack.length - 1;
|
|
19706
|
-
if (key === lastKey) {
|
|
19707
|
-
if (needle === lastNeedle) {
|
|
19708
|
-
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
|
|
19709
|
-
return lastIndex;
|
|
19710
|
-
}
|
|
19711
|
-
if (needle >= lastNeedle) {
|
|
19712
|
-
// lastIndex may be -1 if the previous needle was not found.
|
|
19713
|
-
low = lastIndex === -1 ? 0 : lastIndex;
|
|
19714
|
-
}
|
|
19715
|
-
else {
|
|
19716
|
-
high = lastIndex;
|
|
19717
|
-
}
|
|
19718
|
-
}
|
|
19719
|
-
state.lastKey = key;
|
|
19720
|
-
state.lastNeedle = needle;
|
|
19721
|
-
return (state.lastIndex = binarySearch(haystack, needle, low, high));
|
|
19722
|
-
}
|
|
19723
|
-
|
|
19724
|
-
// Rebuilds the original source files, with mappings that are ordered by source line/column instead
|
|
19725
|
-
// of generated line/column.
|
|
19726
|
-
function buildBySources(decoded, memos) {
|
|
19727
|
-
const sources = memos.map(buildNullArray);
|
|
19728
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
19729
|
-
const line = decoded[i];
|
|
19730
|
-
for (let j = 0; j < line.length; j++) {
|
|
19731
|
-
const seg = line[j];
|
|
19732
|
-
if (seg.length === 1)
|
|
19733
|
-
continue;
|
|
19734
|
-
const sourceIndex = seg[SOURCES_INDEX];
|
|
19735
|
-
const sourceLine = seg[SOURCE_LINE];
|
|
19736
|
-
const sourceColumn = seg[SOURCE_COLUMN];
|
|
19737
|
-
const originalSource = sources[sourceIndex];
|
|
19738
|
-
const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
|
|
19739
|
-
const memo = memos[sourceIndex];
|
|
19740
|
-
// The binary search either found a match, or it found the left-index just before where the
|
|
19741
|
-
// segment should go. Either way, we want to insert after that. And there may be multiple
|
|
19742
|
-
// generated segments associated with an original location, so there may need to move several
|
|
19743
|
-
// indexes before we find where we need to insert.
|
|
19744
|
-
let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
|
|
19745
|
-
memo.lastIndex = ++index;
|
|
19746
|
-
insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);
|
|
19747
|
-
}
|
|
19748
|
-
}
|
|
19749
|
-
return sources;
|
|
19750
|
-
}
|
|
19751
|
-
function insert(array, index, value) {
|
|
19752
|
-
for (let i = array.length; i > index; i--) {
|
|
19753
|
-
array[i] = array[i - 1];
|
|
19754
|
-
}
|
|
19755
|
-
array[index] = value;
|
|
19756
|
-
}
|
|
19757
|
-
// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
|
|
19758
|
-
// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
|
|
19759
|
-
// Numeric properties on objects are magically sorted in ascending order by the engine regardless of
|
|
19760
|
-
// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
|
|
19761
|
-
// order when iterating with for-in.
|
|
19762
|
-
function buildNullArray() {
|
|
19763
|
-
return { __proto__: null };
|
|
19764
|
-
}
|
|
19765
|
-
|
|
19766
|
-
const AnyMap = function (map, mapUrl) {
|
|
19767
|
-
const parsed = parse(map);
|
|
19768
|
-
if (!('sections' in parsed)) {
|
|
19769
|
-
return new TraceMap(parsed, mapUrl);
|
|
19770
|
-
}
|
|
19771
|
-
const mappings = [];
|
|
19772
|
-
const sources = [];
|
|
19773
|
-
const sourcesContent = [];
|
|
19774
|
-
const names = [];
|
|
19775
|
-
const ignoreList = [];
|
|
19776
|
-
recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity);
|
|
19777
|
-
const joined = {
|
|
19778
|
-
version: 3,
|
|
19779
|
-
file: parsed.file,
|
|
19780
|
-
names,
|
|
19781
|
-
sources,
|
|
19782
|
-
sourcesContent,
|
|
19783
|
-
mappings,
|
|
19784
|
-
ignoreList,
|
|
19785
|
-
};
|
|
19786
|
-
return presortedDecodedMap(joined);
|
|
19787
|
-
};
|
|
19788
|
-
function parse(map) {
|
|
19789
|
-
return typeof map === 'string' ? JSON.parse(map) : map;
|
|
19790
|
-
}
|
|
19791
|
-
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
19792
|
-
const { sections } = input;
|
|
19793
|
-
for (let i = 0; i < sections.length; i++) {
|
|
19794
|
-
const { map, offset } = sections[i];
|
|
19795
|
-
let sl = stopLine;
|
|
19796
|
-
let sc = stopColumn;
|
|
19797
|
-
if (i + 1 < sections.length) {
|
|
19798
|
-
const nextOffset = sections[i + 1].offset;
|
|
19799
|
-
sl = Math.min(stopLine, lineOffset + nextOffset.line);
|
|
19800
|
-
if (sl === stopLine) {
|
|
19801
|
-
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
|
|
19802
|
-
}
|
|
19803
|
-
else if (sl < stopLine) {
|
|
19804
|
-
sc = columnOffset + nextOffset.column;
|
|
19805
|
-
}
|
|
19806
|
-
}
|
|
19807
|
-
addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
|
|
19808
|
-
}
|
|
19809
|
-
}
|
|
19810
|
-
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
19811
|
-
const parsed = parse(input);
|
|
19812
|
-
if ('sections' in parsed)
|
|
19813
|
-
return recurse(...arguments);
|
|
19814
|
-
const map = new TraceMap(parsed, mapUrl);
|
|
19815
|
-
const sourcesOffset = sources.length;
|
|
19816
|
-
const namesOffset = names.length;
|
|
19817
|
-
const decoded = decodedMappings(map);
|
|
19818
|
-
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
|
|
19819
|
-
append(sources, resolvedSources);
|
|
19820
|
-
append(names, map.names);
|
|
19821
|
-
if (contents)
|
|
19822
|
-
append(sourcesContent, contents);
|
|
19823
|
-
else
|
|
19824
|
-
for (let i = 0; i < resolvedSources.length; i++)
|
|
19825
|
-
sourcesContent.push(null);
|
|
19826
|
-
if (ignores)
|
|
19827
|
-
for (let i = 0; i < ignores.length; i++)
|
|
19828
|
-
ignoreList.push(ignores[i] + sourcesOffset);
|
|
19829
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
19830
|
-
const lineI = lineOffset + i;
|
|
19831
|
-
// We can only add so many lines before we step into the range that the next section's map
|
|
19832
|
-
// controls. When we get to the last line, then we'll start checking the segments to see if
|
|
19833
|
-
// they've crossed into the column range. But it may not have any columns that overstep, so we
|
|
19834
|
-
// still need to check that we don't overstep lines, too.
|
|
19835
|
-
if (lineI > stopLine)
|
|
19836
|
-
return;
|
|
19837
|
-
// The out line may already exist in mappings (if we're continuing the line started by a
|
|
19838
|
-
// previous section). Or, we may have jumped ahead several lines to start this section.
|
|
19839
|
-
const out = getLine(mappings, lineI);
|
|
19840
|
-
// On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
|
|
19841
|
-
// map can be multiple lines), it doesn't.
|
|
19842
|
-
const cOffset = i === 0 ? columnOffset : 0;
|
|
19843
|
-
const line = decoded[i];
|
|
19844
|
-
for (let j = 0; j < line.length; j++) {
|
|
19845
|
-
const seg = line[j];
|
|
19846
|
-
const column = cOffset + seg[COLUMN];
|
|
19847
|
-
// If this segment steps into the column range that the next section's map controls, we need
|
|
19848
|
-
// to stop early.
|
|
19849
|
-
if (lineI === stopLine && column >= stopColumn)
|
|
19850
|
-
return;
|
|
19851
|
-
if (seg.length === 1) {
|
|
19852
|
-
out.push([column]);
|
|
19853
|
-
continue;
|
|
19854
|
-
}
|
|
19855
|
-
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
|
|
19856
|
-
const sourceLine = seg[SOURCE_LINE];
|
|
19857
|
-
const sourceColumn = seg[SOURCE_COLUMN];
|
|
19858
|
-
out.push(seg.length === 4
|
|
19859
|
-
? [column, sourcesIndex, sourceLine, sourceColumn]
|
|
19860
|
-
: [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
|
|
19861
|
-
}
|
|
19862
|
-
}
|
|
19863
|
-
}
|
|
19864
|
-
function append(arr, other) {
|
|
19865
|
-
for (let i = 0; i < other.length; i++)
|
|
19866
|
-
arr.push(other[i]);
|
|
19867
|
-
}
|
|
19868
|
-
function getLine(arr, index) {
|
|
19869
|
-
for (let i = arr.length; i <= index; i++)
|
|
19870
|
-
arr[i] = [];
|
|
19871
|
-
return arr[index];
|
|
19872
|
-
}
|
|
19873
|
-
|
|
19874
|
-
const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
|
|
19875
|
-
const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
|
|
19876
|
-
const LEAST_UPPER_BOUND = -1;
|
|
19877
|
-
const GREATEST_LOWER_BOUND = 1;
|
|
19878
|
-
class TraceMap {
|
|
19879
|
-
constructor(map, mapUrl) {
|
|
19880
|
-
const isString = typeof map === 'string';
|
|
19881
|
-
if (!isString && map._decodedMemo)
|
|
19882
|
-
return map;
|
|
19883
|
-
const parsed = (isString ? JSON.parse(map) : map);
|
|
19884
|
-
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
19885
|
-
this.version = version;
|
|
19886
|
-
this.file = file;
|
|
19887
|
-
this.names = names || [];
|
|
19888
|
-
this.sourceRoot = sourceRoot;
|
|
19889
|
-
this.sources = sources;
|
|
19890
|
-
this.sourcesContent = sourcesContent;
|
|
19891
|
-
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;
|
|
19892
|
-
const from = resolve(sourceRoot || '', stripFilename(mapUrl));
|
|
19893
|
-
this.resolvedSources = sources.map((s) => resolve(s || '', from));
|
|
19894
|
-
const { mappings } = parsed;
|
|
19895
|
-
if (typeof mappings === 'string') {
|
|
19896
|
-
this._encoded = mappings;
|
|
19897
|
-
this._decoded = undefined;
|
|
19898
|
-
}
|
|
19899
|
-
else {
|
|
19900
|
-
this._encoded = undefined;
|
|
19901
|
-
this._decoded = maybeSort(mappings, isString);
|
|
19902
|
-
}
|
|
19903
|
-
this._decodedMemo = memoizedState();
|
|
19904
|
-
this._bySources = undefined;
|
|
19905
|
-
this._bySourceMemos = undefined;
|
|
19906
|
-
}
|
|
19907
|
-
}
|
|
19908
|
-
/**
|
|
19909
|
-
* Typescript doesn't allow friend access to private fields, so this just casts the map into a type
|
|
19910
|
-
* with public access modifiers.
|
|
19911
|
-
*/
|
|
19912
|
-
function cast(map) {
|
|
19913
|
-
return map;
|
|
19914
|
-
}
|
|
19915
|
-
/**
|
|
19916
|
-
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
|
|
19917
|
-
*/
|
|
19918
|
-
function encodedMappings(map) {
|
|
19919
|
-
var _a;
|
|
19920
|
-
var _b;
|
|
19921
|
-
return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = sourcemapCodec.encode(cast(map)._decoded)));
|
|
19922
|
-
}
|
|
19923
|
-
/**
|
|
19924
|
-
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
|
|
19925
|
-
*/
|
|
19926
|
-
function decodedMappings(map) {
|
|
19927
|
-
var _a;
|
|
19928
|
-
return ((_a = cast(map))._decoded || (_a._decoded = sourcemapCodec.decode(cast(map)._encoded)));
|
|
19929
|
-
}
|
|
19930
|
-
/**
|
|
19931
|
-
* A low-level API to find the segment associated with a generated line/column (think, from a
|
|
19932
|
-
* stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
|
|
19933
|
-
*/
|
|
19934
|
-
function traceSegment(map, line, column) {
|
|
19935
|
-
const decoded = decodedMappings(map);
|
|
19936
|
-
// It's common for parent source maps to have pointers to lines that have no
|
|
19937
|
-
// mapping (like a "//# sourceMappingURL=") at the end of the child file.
|
|
19938
|
-
if (line >= decoded.length)
|
|
19939
|
-
return null;
|
|
19940
|
-
const segments = decoded[line];
|
|
19941
|
-
const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
|
|
19942
|
-
return index === -1 ? null : segments[index];
|
|
19943
|
-
}
|
|
19944
|
-
/**
|
|
19945
|
-
* A higher-level API to find the source/line/column associated with a generated line/column
|
|
19946
|
-
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
|
|
19947
|
-
* `source-map` library.
|
|
19948
|
-
*/
|
|
19949
|
-
function originalPositionFor(map, needle) {
|
|
19950
|
-
let { line, column, bias } = needle;
|
|
19951
|
-
line--;
|
|
19952
|
-
if (line < 0)
|
|
19953
|
-
throw new Error(LINE_GTR_ZERO);
|
|
19954
|
-
if (column < 0)
|
|
19955
|
-
throw new Error(COL_GTR_EQ_ZERO);
|
|
19956
|
-
const decoded = decodedMappings(map);
|
|
19957
|
-
// It's common for parent source maps to have pointers to lines that have no
|
|
19958
|
-
// mapping (like a "//# sourceMappingURL=") at the end of the child file.
|
|
19959
|
-
if (line >= decoded.length)
|
|
19960
|
-
return OMapping(null, null, null, null);
|
|
19961
|
-
const segments = decoded[line];
|
|
19962
|
-
const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
19963
|
-
if (index === -1)
|
|
19964
|
-
return OMapping(null, null, null, null);
|
|
19965
|
-
const segment = segments[index];
|
|
19966
|
-
if (segment.length === 1)
|
|
19967
|
-
return OMapping(null, null, null, null);
|
|
19968
|
-
const { names, resolvedSources } = map;
|
|
19969
|
-
return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
|
|
19970
|
-
}
|
|
19971
|
-
/**
|
|
19972
|
-
* Finds the generated line/column position of the provided source/line/column source position.
|
|
19973
|
-
*/
|
|
19974
|
-
function generatedPositionFor(map, needle) {
|
|
19975
|
-
const { source, line, column, bias } = needle;
|
|
19976
|
-
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
|
|
19977
|
-
}
|
|
19978
|
-
/**
|
|
19979
|
-
* Finds all generated line/column positions of the provided source/line/column source position.
|
|
19980
|
-
*/
|
|
19981
|
-
function allGeneratedPositionsFor(map, needle) {
|
|
19982
|
-
const { source, line, column, bias } = needle;
|
|
19983
|
-
// SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
|
|
19984
|
-
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
|
|
19985
|
-
}
|
|
19986
|
-
/**
|
|
19987
|
-
* Iterates each mapping in generated position order.
|
|
19988
|
-
*/
|
|
19989
|
-
function eachMapping(map, cb) {
|
|
19990
|
-
const decoded = decodedMappings(map);
|
|
19991
|
-
const { names, resolvedSources } = map;
|
|
19992
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
19993
|
-
const line = decoded[i];
|
|
19994
|
-
for (let j = 0; j < line.length; j++) {
|
|
19995
|
-
const seg = line[j];
|
|
19996
|
-
const generatedLine = i + 1;
|
|
19997
|
-
const generatedColumn = seg[0];
|
|
19998
|
-
let source = null;
|
|
19999
|
-
let originalLine = null;
|
|
20000
|
-
let originalColumn = null;
|
|
20001
|
-
let name = null;
|
|
20002
|
-
if (seg.length !== 1) {
|
|
20003
|
-
source = resolvedSources[seg[1]];
|
|
20004
|
-
originalLine = seg[2] + 1;
|
|
20005
|
-
originalColumn = seg[3];
|
|
20006
|
-
}
|
|
20007
|
-
if (seg.length === 5)
|
|
20008
|
-
name = names[seg[4]];
|
|
20009
|
-
cb({
|
|
20010
|
-
generatedLine,
|
|
20011
|
-
generatedColumn,
|
|
20012
|
-
source,
|
|
20013
|
-
originalLine,
|
|
20014
|
-
originalColumn,
|
|
20015
|
-
name,
|
|
20016
|
-
});
|
|
20017
|
-
}
|
|
20018
|
-
}
|
|
20019
|
-
}
|
|
20020
|
-
function sourceIndex(map, source) {
|
|
20021
|
-
const { sources, resolvedSources } = map;
|
|
20022
|
-
let index = sources.indexOf(source);
|
|
20023
|
-
if (index === -1)
|
|
20024
|
-
index = resolvedSources.indexOf(source);
|
|
20025
|
-
return index;
|
|
20026
|
-
}
|
|
20027
|
-
/**
|
|
20028
|
-
* Retrieves the source content for a particular source, if its found. Returns null if not.
|
|
20029
|
-
*/
|
|
20030
|
-
function sourceContentFor(map, source) {
|
|
20031
|
-
const { sourcesContent } = map;
|
|
20032
|
-
if (sourcesContent == null)
|
|
20033
|
-
return null;
|
|
20034
|
-
const index = sourceIndex(map, source);
|
|
20035
|
-
return index === -1 ? null : sourcesContent[index];
|
|
20036
|
-
}
|
|
20037
|
-
/**
|
|
20038
|
-
* Determines if the source is marked to ignore by the source map.
|
|
20039
|
-
*/
|
|
20040
|
-
function isIgnored(map, source) {
|
|
20041
|
-
const { ignoreList } = map;
|
|
20042
|
-
if (ignoreList == null)
|
|
20043
|
-
return false;
|
|
20044
|
-
const index = sourceIndex(map, source);
|
|
20045
|
-
return index === -1 ? false : ignoreList.includes(index);
|
|
20046
|
-
}
|
|
20047
|
-
/**
|
|
20048
|
-
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
|
|
20049
|
-
* maps.
|
|
20050
|
-
*/
|
|
20051
|
-
function presortedDecodedMap(map, mapUrl) {
|
|
20052
|
-
const tracer = new TraceMap(clone(map, []), mapUrl);
|
|
20053
|
-
cast(tracer)._decoded = map.mappings;
|
|
20054
|
-
return tracer;
|
|
20055
|
-
}
|
|
20056
|
-
/**
|
|
20057
|
-
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
|
|
20058
|
-
* a sourcemap, or to JSON.stringify.
|
|
20059
|
-
*/
|
|
20060
|
-
function decodedMap(map) {
|
|
20061
|
-
return clone(map, decodedMappings(map));
|
|
20062
|
-
}
|
|
20063
|
-
/**
|
|
20064
|
-
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
|
|
20065
|
-
* a sourcemap, or to JSON.stringify.
|
|
20066
|
-
*/
|
|
20067
|
-
function encodedMap(map) {
|
|
20068
|
-
return clone(map, encodedMappings(map));
|
|
20028
|
+
// src/binary-search.ts
|
|
20029
|
+
var found = false;
|
|
20030
|
+
function binarySearch(haystack, needle, low, high) {
|
|
20031
|
+
while (low <= high) {
|
|
20032
|
+
const mid = low + (high - low >> 1);
|
|
20033
|
+
const cmp = haystack[mid][COLUMN] - needle;
|
|
20034
|
+
if (cmp === 0) {
|
|
20035
|
+
found = true;
|
|
20036
|
+
return mid;
|
|
20069
20037
|
}
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
names: map.names,
|
|
20075
|
-
sourceRoot: map.sourceRoot,
|
|
20076
|
-
sources: map.sources,
|
|
20077
|
-
sourcesContent: map.sourcesContent,
|
|
20078
|
-
mappings,
|
|
20079
|
-
ignoreList: map.ignoreList || map.x_google_ignoreList,
|
|
20080
|
-
};
|
|
20038
|
+
if (cmp < 0) {
|
|
20039
|
+
low = mid + 1;
|
|
20040
|
+
} else {
|
|
20041
|
+
high = mid - 1;
|
|
20081
20042
|
}
|
|
20082
|
-
|
|
20083
|
-
|
|
20043
|
+
}
|
|
20044
|
+
found = false;
|
|
20045
|
+
return low - 1;
|
|
20046
|
+
}
|
|
20047
|
+
function upperBound(haystack, needle, index) {
|
|
20048
|
+
for (let i = index + 1; i < haystack.length; index = i++) {
|
|
20049
|
+
if (haystack[i][COLUMN] !== needle) break;
|
|
20050
|
+
}
|
|
20051
|
+
return index;
|
|
20052
|
+
}
|
|
20053
|
+
function lowerBound(haystack, needle, index) {
|
|
20054
|
+
for (let i = index - 1; i >= 0; index = i--) {
|
|
20055
|
+
if (haystack[i][COLUMN] !== needle) break;
|
|
20056
|
+
}
|
|
20057
|
+
return index;
|
|
20058
|
+
}
|
|
20059
|
+
function memoizedState() {
|
|
20060
|
+
return {
|
|
20061
|
+
lastKey: -1,
|
|
20062
|
+
lastNeedle: -1,
|
|
20063
|
+
lastIndex: -1
|
|
20064
|
+
};
|
|
20065
|
+
}
|
|
20066
|
+
function memoizedBinarySearch(haystack, needle, state, key) {
|
|
20067
|
+
const { lastKey, lastNeedle, lastIndex } = state;
|
|
20068
|
+
let low = 0;
|
|
20069
|
+
let high = haystack.length - 1;
|
|
20070
|
+
if (key === lastKey) {
|
|
20071
|
+
if (needle === lastNeedle) {
|
|
20072
|
+
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
|
|
20073
|
+
return lastIndex;
|
|
20074
|
+
}
|
|
20075
|
+
if (needle >= lastNeedle) {
|
|
20076
|
+
low = lastIndex === -1 ? 0 : lastIndex;
|
|
20077
|
+
} else {
|
|
20078
|
+
high = lastIndex;
|
|
20084
20079
|
}
|
|
20085
|
-
|
|
20086
|
-
|
|
20080
|
+
}
|
|
20081
|
+
state.lastKey = key;
|
|
20082
|
+
state.lastNeedle = needle;
|
|
20083
|
+
return state.lastIndex = binarySearch(haystack, needle, low, high);
|
|
20084
|
+
}
|
|
20085
|
+
|
|
20086
|
+
// src/types.ts
|
|
20087
|
+
function parse(map) {
|
|
20088
|
+
return typeof map === "string" ? JSON.parse(map) : map;
|
|
20089
|
+
}
|
|
20090
|
+
|
|
20091
|
+
// src/flatten-map.ts
|
|
20092
|
+
var FlattenMap = function(map, mapUrl) {
|
|
20093
|
+
const parsed = parse(map);
|
|
20094
|
+
if (!("sections" in parsed)) {
|
|
20095
|
+
return new TraceMap(parsed, mapUrl);
|
|
20096
|
+
}
|
|
20097
|
+
const mappings = [];
|
|
20098
|
+
const sources = [];
|
|
20099
|
+
const sourcesContent = [];
|
|
20100
|
+
const names = [];
|
|
20101
|
+
const ignoreList = [];
|
|
20102
|
+
recurse(
|
|
20103
|
+
parsed,
|
|
20104
|
+
mapUrl,
|
|
20105
|
+
mappings,
|
|
20106
|
+
sources,
|
|
20107
|
+
sourcesContent,
|
|
20108
|
+
names,
|
|
20109
|
+
ignoreList,
|
|
20110
|
+
0,
|
|
20111
|
+
0,
|
|
20112
|
+
Infinity,
|
|
20113
|
+
Infinity
|
|
20114
|
+
);
|
|
20115
|
+
const joined = {
|
|
20116
|
+
version: 3,
|
|
20117
|
+
file: parsed.file,
|
|
20118
|
+
names,
|
|
20119
|
+
sources,
|
|
20120
|
+
sourcesContent,
|
|
20121
|
+
mappings,
|
|
20122
|
+
ignoreList
|
|
20123
|
+
};
|
|
20124
|
+
return presortedDecodedMap(joined);
|
|
20125
|
+
};
|
|
20126
|
+
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
20127
|
+
const { sections } = input;
|
|
20128
|
+
for (let i = 0; i < sections.length; i++) {
|
|
20129
|
+
const { map, offset } = sections[i];
|
|
20130
|
+
let sl = stopLine;
|
|
20131
|
+
let sc = stopColumn;
|
|
20132
|
+
if (i + 1 < sections.length) {
|
|
20133
|
+
const nextOffset = sections[i + 1].offset;
|
|
20134
|
+
sl = Math.min(stopLine, lineOffset + nextOffset.line);
|
|
20135
|
+
if (sl === stopLine) {
|
|
20136
|
+
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
|
|
20137
|
+
} else if (sl < stopLine) {
|
|
20138
|
+
sc = columnOffset + nextOffset.column;
|
|
20139
|
+
}
|
|
20140
|
+
}
|
|
20141
|
+
addSection(
|
|
20142
|
+
map,
|
|
20143
|
+
mapUrl,
|
|
20144
|
+
mappings,
|
|
20145
|
+
sources,
|
|
20146
|
+
sourcesContent,
|
|
20147
|
+
names,
|
|
20148
|
+
ignoreList,
|
|
20149
|
+
lineOffset + offset.line,
|
|
20150
|
+
columnOffset + offset.column,
|
|
20151
|
+
sl,
|
|
20152
|
+
sc
|
|
20153
|
+
);
|
|
20154
|
+
}
|
|
20155
|
+
}
|
|
20156
|
+
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
20157
|
+
const parsed = parse(input);
|
|
20158
|
+
if ("sections" in parsed) return recurse(...arguments);
|
|
20159
|
+
const map = new TraceMap(parsed, mapUrl);
|
|
20160
|
+
const sourcesOffset = sources.length;
|
|
20161
|
+
const namesOffset = names.length;
|
|
20162
|
+
const decoded = decodedMappings(map);
|
|
20163
|
+
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
|
|
20164
|
+
append(sources, resolvedSources);
|
|
20165
|
+
append(names, map.names);
|
|
20166
|
+
if (contents) append(sourcesContent, contents);
|
|
20167
|
+
else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
|
|
20168
|
+
if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
|
|
20169
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
20170
|
+
const lineI = lineOffset + i;
|
|
20171
|
+
if (lineI > stopLine) return;
|
|
20172
|
+
const out = getLine(mappings, lineI);
|
|
20173
|
+
const cOffset = i === 0 ? columnOffset : 0;
|
|
20174
|
+
const line = decoded[i];
|
|
20175
|
+
for (let j = 0; j < line.length; j++) {
|
|
20176
|
+
const seg = line[j];
|
|
20177
|
+
const column = cOffset + seg[COLUMN];
|
|
20178
|
+
if (lineI === stopLine && column >= stopColumn) return;
|
|
20179
|
+
if (seg.length === 1) {
|
|
20180
|
+
out.push([column]);
|
|
20181
|
+
continue;
|
|
20182
|
+
}
|
|
20183
|
+
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
|
|
20184
|
+
const sourceLine = seg[SOURCE_LINE];
|
|
20185
|
+
const sourceColumn = seg[SOURCE_COLUMN];
|
|
20186
|
+
out.push(
|
|
20187
|
+
seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
|
|
20188
|
+
);
|
|
20087
20189
|
}
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
|
|
20095
|
-
|
|
20096
|
-
|
|
20097
|
-
|
|
20190
|
+
}
|
|
20191
|
+
}
|
|
20192
|
+
function append(arr, other) {
|
|
20193
|
+
for (let i = 0; i < other.length; i++) arr.push(other[i]);
|
|
20194
|
+
}
|
|
20195
|
+
function getLine(arr, index) {
|
|
20196
|
+
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
|
20197
|
+
return arr[index];
|
|
20198
|
+
}
|
|
20199
|
+
|
|
20200
|
+
// src/trace-mapping.ts
|
|
20201
|
+
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
|
|
20202
|
+
var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
|
|
20203
|
+
var LEAST_UPPER_BOUND = -1;
|
|
20204
|
+
var GREATEST_LOWER_BOUND = 1;
|
|
20205
|
+
var TraceMap = class {
|
|
20206
|
+
constructor(map, mapUrl) {
|
|
20207
|
+
const isString = typeof map === "string";
|
|
20208
|
+
if (!isString && map._decodedMemo) return map;
|
|
20209
|
+
const parsed = parse(map);
|
|
20210
|
+
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
20211
|
+
this.version = version;
|
|
20212
|
+
this.file = file;
|
|
20213
|
+
this.names = names || [];
|
|
20214
|
+
this.sourceRoot = sourceRoot;
|
|
20215
|
+
this.sources = sources;
|
|
20216
|
+
this.sourcesContent = sourcesContent;
|
|
20217
|
+
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
20218
|
+
const resolve = resolver(mapUrl, sourceRoot);
|
|
20219
|
+
this.resolvedSources = sources.map(resolve);
|
|
20220
|
+
const { mappings } = parsed;
|
|
20221
|
+
if (typeof mappings === "string") {
|
|
20222
|
+
this._encoded = mappings;
|
|
20223
|
+
this._decoded = void 0;
|
|
20224
|
+
} else if (Array.isArray(mappings)) {
|
|
20225
|
+
this._encoded = void 0;
|
|
20226
|
+
this._decoded = maybeSort(mappings, isString);
|
|
20227
|
+
} else if (parsed.sections) {
|
|
20228
|
+
throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
|
|
20229
|
+
} else {
|
|
20230
|
+
throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
|
|
20098
20231
|
}
|
|
20099
|
-
|
|
20100
|
-
|
|
20101
|
-
|
|
20102
|
-
|
|
20103
|
-
|
|
20104
|
-
|
|
20105
|
-
|
|
20106
|
-
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20117
|
-
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
|
|
20121
|
-
|
|
20122
|
-
|
|
20123
|
-
|
|
20124
|
-
|
|
20232
|
+
this._decodedMemo = memoizedState();
|
|
20233
|
+
this._bySources = void 0;
|
|
20234
|
+
this._bySourceMemos = void 0;
|
|
20235
|
+
}
|
|
20236
|
+
};
|
|
20237
|
+
function cast(map) {
|
|
20238
|
+
return map;
|
|
20239
|
+
}
|
|
20240
|
+
function encodedMappings(map) {
|
|
20241
|
+
var _a, _b;
|
|
20242
|
+
return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded);
|
|
20243
|
+
}
|
|
20244
|
+
function decodedMappings(map) {
|
|
20245
|
+
var _a;
|
|
20246
|
+
return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded));
|
|
20247
|
+
}
|
|
20248
|
+
function traceSegment(map, line, column) {
|
|
20249
|
+
const decoded = decodedMappings(map);
|
|
20250
|
+
if (line >= decoded.length) return null;
|
|
20251
|
+
const segments = decoded[line];
|
|
20252
|
+
const index = traceSegmentInternal(
|
|
20253
|
+
segments,
|
|
20254
|
+
cast(map)._decodedMemo,
|
|
20255
|
+
line,
|
|
20256
|
+
column,
|
|
20257
|
+
GREATEST_LOWER_BOUND
|
|
20258
|
+
);
|
|
20259
|
+
return index === -1 ? null : segments[index];
|
|
20260
|
+
}
|
|
20261
|
+
function originalPositionFor(map, needle) {
|
|
20262
|
+
let { line, column, bias } = needle;
|
|
20263
|
+
line--;
|
|
20264
|
+
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
20265
|
+
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
20266
|
+
const decoded = decodedMappings(map);
|
|
20267
|
+
if (line >= decoded.length) return OMapping(null, null, null, null);
|
|
20268
|
+
const segments = decoded[line];
|
|
20269
|
+
const index = traceSegmentInternal(
|
|
20270
|
+
segments,
|
|
20271
|
+
cast(map)._decodedMemo,
|
|
20272
|
+
line,
|
|
20273
|
+
column,
|
|
20274
|
+
bias || GREATEST_LOWER_BOUND
|
|
20275
|
+
);
|
|
20276
|
+
if (index === -1) return OMapping(null, null, null, null);
|
|
20277
|
+
const segment = segments[index];
|
|
20278
|
+
if (segment.length === 1) return OMapping(null, null, null, null);
|
|
20279
|
+
const { names, resolvedSources } = map;
|
|
20280
|
+
return OMapping(
|
|
20281
|
+
resolvedSources[segment[SOURCES_INDEX]],
|
|
20282
|
+
segment[SOURCE_LINE] + 1,
|
|
20283
|
+
segment[SOURCE_COLUMN],
|
|
20284
|
+
segment.length === 5 ? names[segment[NAMES_INDEX]] : null
|
|
20285
|
+
);
|
|
20286
|
+
}
|
|
20287
|
+
function generatedPositionFor(map, needle) {
|
|
20288
|
+
const { source, line, column, bias } = needle;
|
|
20289
|
+
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
|
|
20290
|
+
}
|
|
20291
|
+
function allGeneratedPositionsFor(map, needle) {
|
|
20292
|
+
const { source, line, column, bias } = needle;
|
|
20293
|
+
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
|
|
20294
|
+
}
|
|
20295
|
+
function eachMapping(map, cb) {
|
|
20296
|
+
const decoded = decodedMappings(map);
|
|
20297
|
+
const { names, resolvedSources } = map;
|
|
20298
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
20299
|
+
const line = decoded[i];
|
|
20300
|
+
for (let j = 0; j < line.length; j++) {
|
|
20301
|
+
const seg = line[j];
|
|
20302
|
+
const generatedLine = i + 1;
|
|
20303
|
+
const generatedColumn = seg[0];
|
|
20304
|
+
let source = null;
|
|
20305
|
+
let originalLine = null;
|
|
20306
|
+
let originalColumn = null;
|
|
20307
|
+
let name = null;
|
|
20308
|
+
if (seg.length !== 1) {
|
|
20309
|
+
source = resolvedSources[seg[1]];
|
|
20310
|
+
originalLine = seg[2] + 1;
|
|
20311
|
+
originalColumn = seg[3];
|
|
20312
|
+
}
|
|
20313
|
+
if (seg.length === 5) name = names[seg[4]];
|
|
20314
|
+
cb({
|
|
20315
|
+
generatedLine,
|
|
20316
|
+
generatedColumn,
|
|
20317
|
+
source,
|
|
20318
|
+
originalLine,
|
|
20319
|
+
originalColumn,
|
|
20320
|
+
name
|
|
20321
|
+
});
|
|
20125
20322
|
}
|
|
20126
|
-
|
|
20127
|
-
|
|
20128
|
-
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20145
|
-
|
|
20146
|
-
|
|
20147
|
-
|
|
20148
|
-
|
|
20149
|
-
|
|
20150
|
-
|
|
20151
|
-
|
|
20152
|
-
|
|
20153
|
-
|
|
20154
|
-
|
|
20155
|
-
|
|
20156
|
-
|
|
20157
|
-
|
|
20158
|
-
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
|
|
20162
|
-
|
|
20163
|
-
|
|
20164
|
-
|
|
20165
|
-
|
|
20166
|
-
|
|
20167
|
-
|
|
20168
|
-
|
|
20169
|
-
|
|
20323
|
+
}
|
|
20324
|
+
}
|
|
20325
|
+
function sourceIndex(map, source) {
|
|
20326
|
+
const { sources, resolvedSources } = map;
|
|
20327
|
+
let index = sources.indexOf(source);
|
|
20328
|
+
if (index === -1) index = resolvedSources.indexOf(source);
|
|
20329
|
+
return index;
|
|
20330
|
+
}
|
|
20331
|
+
function sourceContentFor(map, source) {
|
|
20332
|
+
const { sourcesContent } = map;
|
|
20333
|
+
if (sourcesContent == null) return null;
|
|
20334
|
+
const index = sourceIndex(map, source);
|
|
20335
|
+
return index === -1 ? null : sourcesContent[index];
|
|
20336
|
+
}
|
|
20337
|
+
function isIgnored(map, source) {
|
|
20338
|
+
const { ignoreList } = map;
|
|
20339
|
+
if (ignoreList == null) return false;
|
|
20340
|
+
const index = sourceIndex(map, source);
|
|
20341
|
+
return index === -1 ? false : ignoreList.includes(index);
|
|
20342
|
+
}
|
|
20343
|
+
function presortedDecodedMap(map, mapUrl) {
|
|
20344
|
+
const tracer = new TraceMap(clone(map, []), mapUrl);
|
|
20345
|
+
cast(tracer)._decoded = map.mappings;
|
|
20346
|
+
return tracer;
|
|
20347
|
+
}
|
|
20348
|
+
function decodedMap(map) {
|
|
20349
|
+
return clone(map, decodedMappings(map));
|
|
20350
|
+
}
|
|
20351
|
+
function encodedMap(map) {
|
|
20352
|
+
return clone(map, encodedMappings(map));
|
|
20353
|
+
}
|
|
20354
|
+
function clone(map, mappings) {
|
|
20355
|
+
return {
|
|
20356
|
+
version: map.version,
|
|
20357
|
+
file: map.file,
|
|
20358
|
+
names: map.names,
|
|
20359
|
+
sourceRoot: map.sourceRoot,
|
|
20360
|
+
sources: map.sources,
|
|
20361
|
+
sourcesContent: map.sourcesContent,
|
|
20362
|
+
mappings,
|
|
20363
|
+
ignoreList: map.ignoreList || map.x_google_ignoreList
|
|
20364
|
+
};
|
|
20365
|
+
}
|
|
20366
|
+
function OMapping(source, line, column, name) {
|
|
20367
|
+
return { source, line, column, name };
|
|
20368
|
+
}
|
|
20369
|
+
function GMapping(line, column) {
|
|
20370
|
+
return { line, column };
|
|
20371
|
+
}
|
|
20372
|
+
function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
20373
|
+
let index = memoizedBinarySearch(segments, column, memo, line);
|
|
20374
|
+
if (found) {
|
|
20375
|
+
index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
|
|
20376
|
+
} else if (bias === LEAST_UPPER_BOUND) index++;
|
|
20377
|
+
if (index === -1 || index === segments.length) return -1;
|
|
20378
|
+
return index;
|
|
20379
|
+
}
|
|
20380
|
+
function sliceGeneratedPositions(segments, memo, line, column, bias) {
|
|
20381
|
+
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
|
|
20382
|
+
if (!found && bias === LEAST_UPPER_BOUND) min++;
|
|
20383
|
+
if (min === -1 || min === segments.length) return [];
|
|
20384
|
+
const matchedColumn = found ? column : segments[min][COLUMN];
|
|
20385
|
+
if (!found) min = lowerBound(segments, matchedColumn, min);
|
|
20386
|
+
const max = upperBound(segments, matchedColumn, min);
|
|
20387
|
+
const result = [];
|
|
20388
|
+
for (; min <= max; min++) {
|
|
20389
|
+
const segment = segments[min];
|
|
20390
|
+
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
20391
|
+
}
|
|
20392
|
+
return result;
|
|
20393
|
+
}
|
|
20394
|
+
function generatedPosition(map, source, line, column, bias, all) {
|
|
20395
|
+
var _a, _b;
|
|
20396
|
+
line--;
|
|
20397
|
+
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
20398
|
+
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
20399
|
+
const { sources, resolvedSources } = map;
|
|
20400
|
+
let sourceIndex2 = sources.indexOf(source);
|
|
20401
|
+
if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
|
|
20402
|
+
if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
|
|
20403
|
+
const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));
|
|
20404
|
+
const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));
|
|
20405
|
+
const segments = generated[sourceIndex2][line];
|
|
20406
|
+
if (segments == null) return all ? [] : GMapping(null, null);
|
|
20407
|
+
const memo = bySourceMemos[sourceIndex2];
|
|
20408
|
+
if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
|
|
20409
|
+
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
20410
|
+
if (index === -1) return GMapping(null, null);
|
|
20411
|
+
const segment = segments[index];
|
|
20412
|
+
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
20413
|
+
}
|
|
20170
20414
|
}));
|
|
20171
20415
|
//# sourceMappingURL=trace-mapping.umd.js.map
|
|
20172
20416
|
|
|
@@ -62556,6 +62800,7 @@ function useColors() {
|
|
|
62556
62800
|
|
|
62557
62801
|
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
62558
62802
|
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
62803
|
+
// eslint-disable-next-line no-return-assign
|
|
62559
62804
|
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
62560
62805
|
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
62561
62806
|
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
@@ -62645,7 +62890,7 @@ function save(namespaces) {
|
|
|
62645
62890
|
function load() {
|
|
62646
62891
|
let r;
|
|
62647
62892
|
try {
|
|
62648
|
-
r = exports.storage.getItem('debug');
|
|
62893
|
+
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
|
62649
62894
|
} catch (error) {
|
|
62650
62895
|
// Swallow
|
|
62651
62896
|
// XXX (@Qix-) should we be logging these?
|
|
@@ -62874,24 +63119,62 @@ function setup(env) {
|
|
|
62874
63119
|
createDebug.names = [];
|
|
62875
63120
|
createDebug.skips = [];
|
|
62876
63121
|
|
|
62877
|
-
|
|
62878
|
-
|
|
62879
|
-
|
|
63122
|
+
const split = (typeof namespaces === 'string' ? namespaces : '')
|
|
63123
|
+
.trim()
|
|
63124
|
+
.replace(/\s+/g, ',')
|
|
63125
|
+
.split(',')
|
|
63126
|
+
.filter(Boolean);
|
|
62880
63127
|
|
|
62881
|
-
for (
|
|
62882
|
-
if (
|
|
62883
|
-
|
|
62884
|
-
|
|
63128
|
+
for (const ns of split) {
|
|
63129
|
+
if (ns[0] === '-') {
|
|
63130
|
+
createDebug.skips.push(ns.slice(1));
|
|
63131
|
+
} else {
|
|
63132
|
+
createDebug.names.push(ns);
|
|
62885
63133
|
}
|
|
63134
|
+
}
|
|
63135
|
+
}
|
|
62886
63136
|
|
|
62887
|
-
|
|
62888
|
-
|
|
62889
|
-
|
|
62890
|
-
|
|
63137
|
+
/**
|
|
63138
|
+
* Checks if the given string matches a namespace template, honoring
|
|
63139
|
+
* asterisks as wildcards.
|
|
63140
|
+
*
|
|
63141
|
+
* @param {String} search
|
|
63142
|
+
* @param {String} template
|
|
63143
|
+
* @return {Boolean}
|
|
63144
|
+
*/
|
|
63145
|
+
function matchesTemplate(search, template) {
|
|
63146
|
+
let searchIndex = 0;
|
|
63147
|
+
let templateIndex = 0;
|
|
63148
|
+
let starIndex = -1;
|
|
63149
|
+
let matchIndex = 0;
|
|
63150
|
+
|
|
63151
|
+
while (searchIndex < search.length) {
|
|
63152
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
|
63153
|
+
// Match character or proceed with wildcard
|
|
63154
|
+
if (template[templateIndex] === '*') {
|
|
63155
|
+
starIndex = templateIndex;
|
|
63156
|
+
matchIndex = searchIndex;
|
|
63157
|
+
templateIndex++; // Skip the '*'
|
|
63158
|
+
} else {
|
|
63159
|
+
searchIndex++;
|
|
63160
|
+
templateIndex++;
|
|
63161
|
+
}
|
|
63162
|
+
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
|
63163
|
+
// Backtrack to the last '*' and try to match more characters
|
|
63164
|
+
templateIndex = starIndex + 1;
|
|
63165
|
+
matchIndex++;
|
|
63166
|
+
searchIndex = matchIndex;
|
|
62891
63167
|
} else {
|
|
62892
|
-
|
|
63168
|
+
return false; // No match
|
|
62893
63169
|
}
|
|
62894
63170
|
}
|
|
63171
|
+
|
|
63172
|
+
// Handle trailing '*' in template
|
|
63173
|
+
while (templateIndex < template.length && template[templateIndex] === '*') {
|
|
63174
|
+
templateIndex++;
|
|
63175
|
+
}
|
|
63176
|
+
|
|
63177
|
+
return templateIndex === template.length;
|
|
62895
63178
|
}
|
|
62896
63179
|
|
|
62897
63180
|
/**
|
|
@@ -62902,8 +63185,8 @@ function setup(env) {
|
|
|
62902
63185
|
*/
|
|
62903
63186
|
function disable() {
|
|
62904
63187
|
const namespaces = [
|
|
62905
|
-
...createDebug.names
|
|
62906
|
-
...createDebug.skips.map(
|
|
63188
|
+
...createDebug.names,
|
|
63189
|
+
...createDebug.skips.map(namespace => '-' + namespace)
|
|
62907
63190
|
].join(',');
|
|
62908
63191
|
createDebug.enable('');
|
|
62909
63192
|
return namespaces;
|
|
@@ -62917,21 +63200,14 @@ function setup(env) {
|
|
|
62917
63200
|
* @api public
|
|
62918
63201
|
*/
|
|
62919
63202
|
function enabled(name) {
|
|
62920
|
-
|
|
62921
|
-
|
|
62922
|
-
}
|
|
62923
|
-
|
|
62924
|
-
let i;
|
|
62925
|
-
let len;
|
|
62926
|
-
|
|
62927
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
62928
|
-
if (createDebug.skips[i].test(name)) {
|
|
63203
|
+
for (const skip of createDebug.skips) {
|
|
63204
|
+
if (matchesTemplate(name, skip)) {
|
|
62929
63205
|
return false;
|
|
62930
63206
|
}
|
|
62931
63207
|
}
|
|
62932
63208
|
|
|
62933
|
-
for (
|
|
62934
|
-
if (
|
|
63209
|
+
for (const ns of createDebug.names) {
|
|
63210
|
+
if (matchesTemplate(name, ns)) {
|
|
62935
63211
|
return true;
|
|
62936
63212
|
}
|
|
62937
63213
|
}
|
|
@@ -62939,19 +63215,6 @@ function setup(env) {
|
|
|
62939
63215
|
return false;
|
|
62940
63216
|
}
|
|
62941
63217
|
|
|
62942
|
-
/**
|
|
62943
|
-
* Convert regexp to namespace
|
|
62944
|
-
*
|
|
62945
|
-
* @param {RegExp} regxep
|
|
62946
|
-
* @return {String} namespace
|
|
62947
|
-
* @api private
|
|
62948
|
-
*/
|
|
62949
|
-
function toNamespace(regexp) {
|
|
62950
|
-
return regexp.toString()
|
|
62951
|
-
.substring(2, regexp.toString().length - 2)
|
|
62952
|
-
.replace(/\.\*\?$/, '*');
|
|
62953
|
-
}
|
|
62954
|
-
|
|
62955
63218
|
/**
|
|
62956
63219
|
* Coerce `val`.
|
|
62957
63220
|
*
|
|
@@ -124961,7 +125224,6 @@ function generateKCXmlExpression(expression, prefixPath = "") {
|
|
|
124961
125224
|
case "minus":
|
|
124962
125225
|
case "not":
|
|
124963
125226
|
return [`<m:${expression.type}>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression, prefixPath), 1), `</m:${expression.type}>`].join("\n");
|
|
124964
|
-
break;
|
|
124965
125227
|
case "round":
|
|
124966
125228
|
return [expression.fractionalDigits != undefined ? `<m:round fractionalDigits="${expression.fractionalDigits}">` : `<m:round>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression, prefixPath), 1), `</m:round>`].join("\n");
|
|
124967
125229
|
case "floor":
|
|
@@ -125005,7 +125267,6 @@ function generateKCXmlExpression(expression, prefixPath = "") {
|
|
|
125005
125267
|
}
|
|
125006
125268
|
case "choose":
|
|
125007
125269
|
return [`<m:choose>`, ` <m:if>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.if, prefixPath), 2), ` </m:if>`, ` <m:then>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.then, prefixPath), 2), ` </m:then>`, ` <m:else>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.else, prefixPath), 2), ` </m:else>`, `</m:choose>`].join("\n");
|
|
125008
|
-
break;
|
|
125009
125270
|
case "const":
|
|
125010
125271
|
if (expression.value.type === "decimal") {
|
|
125011
125272
|
return `<m:const value="${expression.value.value}" type="decimal" />`;
|
|
@@ -135406,7 +135667,7 @@ const getAllFiles = async dirPath => {
|
|
|
135406
135667
|
});
|
|
135407
135668
|
const filePaths = await Promise.all(files.map(file => {
|
|
135408
135669
|
const fullPath = node_path__WEBPACK_IMPORTED_MODULE_2___default().join(file.parentPath, file.name);
|
|
135409
|
-
return file.isDirectory() ? getAllFiles(fullPath) : fullPath;
|
|
135670
|
+
return file.isDirectory() ? getAllFiles(fullPath) : Promise.resolve(fullPath);
|
|
135410
135671
|
}));
|
|
135411
135672
|
return filePaths.flat();
|
|
135412
135673
|
};
|
|
@@ -164469,7 +164730,6 @@ class KCLangCalculationsBuildContext {
|
|
|
164469
164730
|
break;
|
|
164470
164731
|
default:
|
|
164471
164732
|
throw new Error(`Unknown base type name: '${baseType}'`);
|
|
164472
|
-
break;
|
|
164473
164733
|
}
|
|
164474
164734
|
}
|
|
164475
164735
|
}
|
|
@@ -166222,8 +166482,8 @@ class SugarNodeConverterBase {
|
|
|
166222
166482
|
}
|
|
166223
166483
|
}
|
|
166224
166484
|
continue;
|
|
166225
|
-
//
|
|
166226
|
-
console.error(`Cannot process node of type ${
|
|
166485
|
+
// Мб все-таки кидать ошибку?
|
|
166486
|
+
// console.error(`Cannot process node of type ${getNodeClass(child).name}`);
|
|
166227
166487
|
// throw new SugarAttributeReadError(
|
|
166228
166488
|
// `Cannot process node of type ${getNodeClass(child).name}`,
|
|
166229
166489
|
// child.sourceXmlNode as SugarXmlNode,
|