@tinacms/mdx 1.3.13 → 1.3.14
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.browser.es.js +607 -633
- package/dist/index.es.js +872 -898
- package/dist/index.js +872 -898
- package/dist/next/stringify/acorn.d.ts +1 -1
- package/dist/stringify/acorn.d.ts +1 -1
- package/package.json +6 -52
package/dist/index.es.js
CHANGED
|
@@ -2308,11 +2308,11 @@ var require_acorn = __commonJS({
|
|
|
2308
2308
|
};
|
|
2309
2309
|
types$13.star.updateContext = function(prevType) {
|
|
2310
2310
|
if (prevType === types$13._function) {
|
|
2311
|
-
var
|
|
2312
|
-
if (this.context[
|
|
2313
|
-
this.context[
|
|
2311
|
+
var index2 = this.context.length - 1;
|
|
2312
|
+
if (this.context[index2] === types4.f_expr) {
|
|
2313
|
+
this.context[index2] = types4.f_expr_gen;
|
|
2314
2314
|
} else {
|
|
2315
|
-
this.context[
|
|
2315
|
+
this.context[index2] = types4.f_gen;
|
|
2316
2316
|
}
|
|
2317
2317
|
}
|
|
2318
2318
|
this.exprAllowed = true;
|
|
@@ -4922,11 +4922,11 @@ var require_acorn = __commonJS({
|
|
|
4922
4922
|
}
|
|
4923
4923
|
this.inTemplateElement = false;
|
|
4924
4924
|
};
|
|
4925
|
-
pp3.invalidStringToken = function(
|
|
4925
|
+
pp3.invalidStringToken = function(position2, message) {
|
|
4926
4926
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
4927
4927
|
throw INVALID_TEMPLATE_ESCAPE_ERROR3;
|
|
4928
4928
|
} else {
|
|
4929
|
-
this.raise(
|
|
4929
|
+
this.raise(position2, message);
|
|
4930
4930
|
}
|
|
4931
4931
|
};
|
|
4932
4932
|
pp3.readTmplToken = function() {
|
|
@@ -5866,9 +5866,9 @@ var require_doc = __commonJS({
|
|
|
5866
5866
|
"use strict";
|
|
5867
5867
|
init_define_process();
|
|
5868
5868
|
function guessEndOfLine(text8) {
|
|
5869
|
-
const
|
|
5870
|
-
if (
|
|
5871
|
-
return text8.charAt(
|
|
5869
|
+
const index2 = text8.indexOf("\r");
|
|
5870
|
+
if (index2 >= 0) {
|
|
5871
|
+
return text8.charAt(index2 + 1) === "\n" ? "crlf" : "cr";
|
|
5872
5872
|
}
|
|
5873
5873
|
return "lf";
|
|
5874
5874
|
}
|
|
@@ -5977,8 +5977,8 @@ var require_doc = __commonJS({
|
|
|
5977
5977
|
}
|
|
5978
5978
|
string5 = string5.replace((0, import_emoji_regex.default)(), " ");
|
|
5979
5979
|
let width = 0;
|
|
5980
|
-
for (let
|
|
5981
|
-
const codePoint = string5.codePointAt(
|
|
5980
|
+
for (let index2 = 0; index2 < string5.length; index2++) {
|
|
5981
|
+
const codePoint = string5.codePointAt(index2);
|
|
5982
5982
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
5983
5983
|
continue;
|
|
5984
5984
|
}
|
|
@@ -5986,7 +5986,7 @@ var require_doc = __commonJS({
|
|
|
5986
5986
|
continue;
|
|
5987
5987
|
}
|
|
5988
5988
|
if (codePoint > 65535) {
|
|
5989
|
-
|
|
5989
|
+
index2++;
|
|
5990
5990
|
}
|
|
5991
5991
|
width += isFullwidthCodePoint(codePoint) ? 2 : 1;
|
|
5992
5992
|
}
|
|
@@ -6879,7 +6879,7 @@ var require_doc = __commonJS({
|
|
|
6879
6879
|
const printedSymbols = /* @__PURE__ */ Object.create(null);
|
|
6880
6880
|
const usedKeysForSymbols = /* @__PURE__ */ new Set();
|
|
6881
6881
|
return printDoc(flattenDoc(doc));
|
|
6882
|
-
function printDoc(doc2,
|
|
6882
|
+
function printDoc(doc2, index2, parentParts) {
|
|
6883
6883
|
if (typeof doc2 === "string") {
|
|
6884
6884
|
return JSON.stringify(doc2);
|
|
6885
6885
|
}
|
|
@@ -6888,7 +6888,7 @@ var require_doc = __commonJS({
|
|
|
6888
6888
|
return printed.length === 1 ? printed[0] : "[".concat(printed.join(", "), "]");
|
|
6889
6889
|
}
|
|
6890
6890
|
if (doc2.type === "line") {
|
|
6891
|
-
const withBreakParent = Array.isArray(parentParts) && parentParts[
|
|
6891
|
+
const withBreakParent = Array.isArray(parentParts) && parentParts[index2 + 1] && parentParts[index2 + 1].type === "break-parent";
|
|
6892
6892
|
if (doc2.literal) {
|
|
6893
6893
|
return withBreakParent ? "literalline" : "literallineWithoutBreakParent";
|
|
6894
6894
|
}
|
|
@@ -6901,7 +6901,7 @@ var require_doc = __commonJS({
|
|
|
6901
6901
|
return "line";
|
|
6902
6902
|
}
|
|
6903
6903
|
if (doc2.type === "break-parent") {
|
|
6904
|
-
const afterHardline = Array.isArray(parentParts) && parentParts[
|
|
6904
|
+
const afterHardline = Array.isArray(parentParts) && parentParts[index2 - 1] && parentParts[index2 - 1].type === "line" && parentParts[index2 - 1].hard;
|
|
6905
6905
|
return afterHardline ? void 0 : "breakParent";
|
|
6906
6906
|
}
|
|
6907
6907
|
if (doc2.type === "trim") {
|
|
@@ -7317,16 +7317,16 @@ var require_third_party = __commonJS({
|
|
|
7317
7317
|
}
|
|
7318
7318
|
this.offsets = offsets;
|
|
7319
7319
|
}
|
|
7320
|
-
LinesAndColumns2.prototype.locationForIndex = function(
|
|
7321
|
-
if (
|
|
7320
|
+
LinesAndColumns2.prototype.locationForIndex = function(index2) {
|
|
7321
|
+
if (index2 < 0 || index2 > this.string.length) {
|
|
7322
7322
|
return null;
|
|
7323
7323
|
}
|
|
7324
7324
|
var line2 = 0;
|
|
7325
7325
|
var offsets = this.offsets;
|
|
7326
|
-
while (offsets[line2 + 1] <=
|
|
7326
|
+
while (offsets[line2 + 1] <= index2) {
|
|
7327
7327
|
line2++;
|
|
7328
7328
|
}
|
|
7329
|
-
var column =
|
|
7329
|
+
var column = index2 - offsets[line2];
|
|
7330
7330
|
return {
|
|
7331
7331
|
line: line2,
|
|
7332
7332
|
column
|
|
@@ -9304,8 +9304,8 @@ var require_third_party = __commonJS({
|
|
|
9304
9304
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
9305
9305
|
const numberMaxWidth = String(end).length;
|
|
9306
9306
|
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
|
9307
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2,
|
|
9308
|
-
const number = start3 + 1 +
|
|
9307
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2, index2) => {
|
|
9308
|
+
const number = start3 + 1 + index2;
|
|
9309
9309
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
9310
9310
|
const gutter = ` ${paddedNumber} |`;
|
|
9311
9311
|
const hasMarker = markerLines[number];
|
|
@@ -9394,8 +9394,8 @@ ${frame}`;
|
|
|
9394
9394
|
}
|
|
9395
9395
|
if (indexMatch && indexMatch.length > 0) {
|
|
9396
9396
|
const lines2 = new LinesAndColumns(string5);
|
|
9397
|
-
const
|
|
9398
|
-
const location2 = lines2.locationForIndex(
|
|
9397
|
+
const index2 = Number(indexMatch[1]);
|
|
9398
|
+
const location2 = lines2.locationForIndex(index2);
|
|
9399
9399
|
const codeFrame = codeFrameColumns(string5, {
|
|
9400
9400
|
start: {
|
|
9401
9401
|
line: location2.line + 1,
|
|
@@ -192681,8 +192681,8 @@ var require_prettier = __commonJS({
|
|
|
192681
192681
|
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
192682
192682
|
var max = Math.max;
|
|
192683
192683
|
var min = Math.min;
|
|
192684
|
-
module2.exports = function(
|
|
192685
|
-
var integer = toIntegerOrInfinity(
|
|
192684
|
+
module2.exports = function(index2, length) {
|
|
192685
|
+
var integer = toIntegerOrInfinity(index2);
|
|
192686
192686
|
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
192687
192687
|
};
|
|
192688
192688
|
}
|
|
@@ -192713,18 +192713,18 @@ var require_prettier = __commonJS({
|
|
|
192713
192713
|
return function($this, el, fromIndex) {
|
|
192714
192714
|
var O = toIndexedObject($this);
|
|
192715
192715
|
var length = lengthOfArrayLike(O);
|
|
192716
|
-
var
|
|
192716
|
+
var index2 = toAbsoluteIndex(fromIndex, length);
|
|
192717
192717
|
var value;
|
|
192718
192718
|
if (IS_INCLUDES && el != el)
|
|
192719
|
-
while (length >
|
|
192720
|
-
value = O[
|
|
192719
|
+
while (length > index2) {
|
|
192720
|
+
value = O[index2++];
|
|
192721
192721
|
if (value != value)
|
|
192722
192722
|
return true;
|
|
192723
192723
|
}
|
|
192724
192724
|
else
|
|
192725
|
-
for (; length >
|
|
192726
|
-
if ((IS_INCLUDES ||
|
|
192727
|
-
return IS_INCLUDES ||
|
|
192725
|
+
for (; length > index2; index2++) {
|
|
192726
|
+
if ((IS_INCLUDES || index2 in O) && O[index2] === el)
|
|
192727
|
+
return IS_INCLUDES || index2 || 0;
|
|
192728
192728
|
}
|
|
192729
192729
|
return !IS_INCLUDES && -1;
|
|
192730
192730
|
};
|
|
@@ -193173,7 +193173,7 @@ var require_prettier = __commonJS({
|
|
|
193173
193173
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
193174
193174
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
193175
193175
|
var fn = bind(unboundFunction, that);
|
|
193176
|
-
var iterator, iterFn,
|
|
193176
|
+
var iterator, iterFn, index2, length, result, next, step;
|
|
193177
193177
|
var stop = function(condition) {
|
|
193178
193178
|
if (iterator)
|
|
193179
193179
|
iteratorClose(iterator, "normal", condition);
|
|
@@ -193193,8 +193193,8 @@ var require_prettier = __commonJS({
|
|
|
193193
193193
|
if (!iterFn)
|
|
193194
193194
|
throw TypeError2(tryToString(iterable) + " is not iterable");
|
|
193195
193195
|
if (isArrayIteratorMethod(iterFn)) {
|
|
193196
|
-
for (
|
|
193197
|
-
result = callFn(iterable[
|
|
193196
|
+
for (index2 = 0, length = lengthOfArrayLike(iterable); length > index2; index2++) {
|
|
193197
|
+
result = callFn(iterable[index2]);
|
|
193198
193198
|
if (result && isPrototypeOf(ResultPrototype, result))
|
|
193199
193199
|
return result;
|
|
193200
193200
|
}
|
|
@@ -193624,11 +193624,11 @@ var require_prettier = __commonJS({
|
|
|
193624
193624
|
var t = exports2.t = {};
|
|
193625
193625
|
var R = 0;
|
|
193626
193626
|
var createToken = (name2, value, isGlobal) => {
|
|
193627
|
-
const
|
|
193628
|
-
debug(name2,
|
|
193629
|
-
t[name2] =
|
|
193630
|
-
src[
|
|
193631
|
-
re[
|
|
193627
|
+
const index2 = R++;
|
|
193628
|
+
debug(name2, index2, value);
|
|
193629
|
+
t[name2] = index2;
|
|
193630
|
+
src[index2] = value;
|
|
193631
|
+
re[index2] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
193632
193632
|
};
|
|
193633
193633
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
193634
193634
|
createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
|
|
@@ -194573,8 +194573,8 @@ var require_prettier = __commonJS({
|
|
|
194573
194573
|
}
|
|
194574
194574
|
string5 = string5.replace((0, import_emoji_regex.default)(), " ");
|
|
194575
194575
|
let width = 0;
|
|
194576
|
-
for (let
|
|
194577
|
-
const codePoint = string5.codePointAt(
|
|
194576
|
+
for (let index2 = 0; index2 < string5.length; index2++) {
|
|
194577
|
+
const codePoint = string5.codePointAt(index2);
|
|
194578
194578
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
194579
194579
|
continue;
|
|
194580
194580
|
}
|
|
@@ -194582,7 +194582,7 @@ var require_prettier = __commonJS({
|
|
|
194582
194582
|
continue;
|
|
194583
194583
|
}
|
|
194584
194584
|
if (codePoint > 65535) {
|
|
194585
|
-
|
|
194585
|
+
index2++;
|
|
194586
194586
|
}
|
|
194587
194587
|
width += isFullwidthCodePoint(codePoint) ? 2 : 1;
|
|
194588
194588
|
}
|
|
@@ -194617,15 +194617,15 @@ var require_prettier = __commonJS({
|
|
|
194617
194617
|
"src/utils/text/skip.js"(exports2, module2) {
|
|
194618
194618
|
"use strict";
|
|
194619
194619
|
function skip(chars2) {
|
|
194620
|
-
return (text8,
|
|
194620
|
+
return (text8, index2, opts) => {
|
|
194621
194621
|
const backwards = opts && opts.backwards;
|
|
194622
|
-
if (
|
|
194622
|
+
if (index2 === false) {
|
|
194623
194623
|
return false;
|
|
194624
194624
|
}
|
|
194625
194625
|
const {
|
|
194626
194626
|
length
|
|
194627
194627
|
} = text8;
|
|
194628
|
-
let cursor =
|
|
194628
|
+
let cursor = index2;
|
|
194629
194629
|
while (cursor >= 0 && cursor < length) {
|
|
194630
194630
|
const c = text8.charAt(cursor);
|
|
194631
194631
|
if (chars2 instanceof RegExp) {
|
|
@@ -194658,18 +194658,18 @@ var require_prettier = __commonJS({
|
|
|
194658
194658
|
var require_skip_inline_comment = __commonJS22({
|
|
194659
194659
|
"src/utils/text/skip-inline-comment.js"(exports2, module2) {
|
|
194660
194660
|
"use strict";
|
|
194661
|
-
function skipInlineComment(text8,
|
|
194662
|
-
if (
|
|
194661
|
+
function skipInlineComment(text8, index2) {
|
|
194662
|
+
if (index2 === false) {
|
|
194663
194663
|
return false;
|
|
194664
194664
|
}
|
|
194665
|
-
if (text8.charAt(
|
|
194666
|
-
for (let i =
|
|
194665
|
+
if (text8.charAt(index2) === "/" && text8.charAt(index2 + 1) === "*") {
|
|
194666
|
+
for (let i = index2 + 2; i < text8.length; ++i) {
|
|
194667
194667
|
if (text8.charAt(i) === "*" && text8.charAt(i + 1) === "/") {
|
|
194668
194668
|
return i + 2;
|
|
194669
194669
|
}
|
|
194670
194670
|
}
|
|
194671
194671
|
}
|
|
194672
|
-
return
|
|
194672
|
+
return index2;
|
|
194673
194673
|
}
|
|
194674
194674
|
module2.exports = skipInlineComment;
|
|
194675
194675
|
}
|
|
@@ -194680,14 +194680,14 @@ var require_prettier = __commonJS({
|
|
|
194680
194680
|
var {
|
|
194681
194681
|
skipEverythingButNewLine
|
|
194682
194682
|
} = require_skip();
|
|
194683
|
-
function skipTrailingComment(text8,
|
|
194684
|
-
if (
|
|
194683
|
+
function skipTrailingComment(text8, index2) {
|
|
194684
|
+
if (index2 === false) {
|
|
194685
194685
|
return false;
|
|
194686
194686
|
}
|
|
194687
|
-
if (text8.charAt(
|
|
194688
|
-
return skipEverythingButNewLine(text8,
|
|
194687
|
+
if (text8.charAt(index2) === "/" && text8.charAt(index2 + 1) === "/") {
|
|
194688
|
+
return skipEverythingButNewLine(text8, index2);
|
|
194689
194689
|
}
|
|
194690
|
-
return
|
|
194690
|
+
return index2;
|
|
194691
194691
|
}
|
|
194692
194692
|
module2.exports = skipTrailingComment;
|
|
194693
194693
|
}
|
|
@@ -194695,28 +194695,28 @@ var require_prettier = __commonJS({
|
|
|
194695
194695
|
var require_skip_newline = __commonJS22({
|
|
194696
194696
|
"src/utils/text/skip-newline.js"(exports2, module2) {
|
|
194697
194697
|
"use strict";
|
|
194698
|
-
function skipNewline(text8,
|
|
194698
|
+
function skipNewline(text8, index2, opts) {
|
|
194699
194699
|
const backwards = opts && opts.backwards;
|
|
194700
|
-
if (
|
|
194700
|
+
if (index2 === false) {
|
|
194701
194701
|
return false;
|
|
194702
194702
|
}
|
|
194703
|
-
const atIndex = text8.charAt(
|
|
194703
|
+
const atIndex = text8.charAt(index2);
|
|
194704
194704
|
if (backwards) {
|
|
194705
|
-
if (text8.charAt(
|
|
194706
|
-
return
|
|
194705
|
+
if (text8.charAt(index2 - 1) === "\r" && atIndex === "\n") {
|
|
194706
|
+
return index2 - 2;
|
|
194707
194707
|
}
|
|
194708
194708
|
if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
|
|
194709
|
-
return
|
|
194709
|
+
return index2 - 1;
|
|
194710
194710
|
}
|
|
194711
194711
|
} else {
|
|
194712
|
-
if (atIndex === "\r" && text8.charAt(
|
|
194713
|
-
return
|
|
194712
|
+
if (atIndex === "\r" && text8.charAt(index2 + 1) === "\n") {
|
|
194713
|
+
return index2 + 2;
|
|
194714
194714
|
}
|
|
194715
194715
|
if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") {
|
|
194716
|
-
return
|
|
194716
|
+
return index2 + 1;
|
|
194717
194717
|
}
|
|
194718
194718
|
}
|
|
194719
|
-
return
|
|
194719
|
+
return index2;
|
|
194720
194720
|
}
|
|
194721
194721
|
module2.exports = skipNewline;
|
|
194722
194722
|
}
|
|
@@ -194769,15 +194769,15 @@ var require_prettier = __commonJS({
|
|
|
194769
194769
|
var getNextNonSpaceNonCommentCharacterIndexWithStartIndex = require_get_next_non_space_non_comment_character_index_with_start_index();
|
|
194770
194770
|
var getPenultimate = (arr) => arr[arr.length - 2];
|
|
194771
194771
|
function skip(chars2) {
|
|
194772
|
-
return (text8,
|
|
194772
|
+
return (text8, index2, opts) => {
|
|
194773
194773
|
const backwards = opts && opts.backwards;
|
|
194774
|
-
if (
|
|
194774
|
+
if (index2 === false) {
|
|
194775
194775
|
return false;
|
|
194776
194776
|
}
|
|
194777
194777
|
const {
|
|
194778
194778
|
length
|
|
194779
194779
|
} = text8;
|
|
194780
|
-
let cursor =
|
|
194780
|
+
let cursor = index2;
|
|
194781
194781
|
while (cursor >= 0 && cursor < length) {
|
|
194782
194782
|
const c = text8.charAt(cursor);
|
|
194783
194783
|
if (chars2 instanceof RegExp) {
|
|
@@ -194795,8 +194795,8 @@ var require_prettier = __commonJS({
|
|
|
194795
194795
|
return false;
|
|
194796
194796
|
};
|
|
194797
194797
|
}
|
|
194798
|
-
function hasNewline(text8,
|
|
194799
|
-
const idx = skipSpaces(text8, opts.backwards ?
|
|
194798
|
+
function hasNewline(text8, index2, opts = {}) {
|
|
194799
|
+
const idx = skipSpaces(text8, opts.backwards ? index2 - 1 : index2, opts);
|
|
194800
194800
|
const idx2 = skipNewline(text8, idx, opts);
|
|
194801
194801
|
return idx !== idx2;
|
|
194802
194802
|
}
|
|
@@ -194824,9 +194824,9 @@ var require_prettier = __commonJS({
|
|
|
194824
194824
|
});
|
|
194825
194825
|
return idx !== idx2;
|
|
194826
194826
|
}
|
|
194827
|
-
function isNextLineEmptyAfterIndex(text8,
|
|
194827
|
+
function isNextLineEmptyAfterIndex(text8, index2) {
|
|
194828
194828
|
let oldIdx = null;
|
|
194829
|
-
let idx =
|
|
194829
|
+
let idx = index2;
|
|
194830
194830
|
while (idx !== oldIdx) {
|
|
194831
194831
|
oldIdx = idx;
|
|
194832
194832
|
idx = skipToLineEnd(text8, idx);
|
|
@@ -194846,9 +194846,9 @@ var require_prettier = __commonJS({
|
|
|
194846
194846
|
function getNextNonSpaceNonCommentCharacter(text8, node, locEnd) {
|
|
194847
194847
|
return text8.charAt(getNextNonSpaceNonCommentCharacterIndex(text8, node, locEnd));
|
|
194848
194848
|
}
|
|
194849
|
-
function hasSpaces(text8,
|
|
194850
|
-
const idx = skipSpaces(text8, opts.backwards ?
|
|
194851
|
-
return idx !==
|
|
194849
|
+
function hasSpaces(text8, index2, opts = {}) {
|
|
194850
|
+
const idx = skipSpaces(text8, opts.backwards ? index2 - 1 : index2, opts);
|
|
194851
|
+
return idx !== index2;
|
|
194852
194852
|
}
|
|
194853
194853
|
function getAlignmentSize(value, tabWidth, startIndex = 0) {
|
|
194854
194854
|
let size = 0;
|
|
@@ -195044,9 +195044,9 @@ var require_prettier = __commonJS({
|
|
|
195044
195044
|
"src/common/end-of-line.js"(exports2, module2) {
|
|
195045
195045
|
"use strict";
|
|
195046
195046
|
function guessEndOfLine(text8) {
|
|
195047
|
-
const
|
|
195048
|
-
if (
|
|
195049
|
-
return text8.charAt(
|
|
195047
|
+
const index2 = text8.indexOf("\r");
|
|
195048
|
+
if (index2 >= 0) {
|
|
195049
|
+
return text8.charAt(index2 + 1) === "\n" ? "crlf" : "cr";
|
|
195050
195050
|
}
|
|
195051
195051
|
return "lf";
|
|
195052
195052
|
}
|
|
@@ -198973,8 +198973,8 @@ var require_prettier = __commonJS({
|
|
|
198973
198973
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
198974
198974
|
const numberMaxWidth = String(end).length;
|
|
198975
198975
|
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
|
198976
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2,
|
|
198977
|
-
const number = start3 + 1 +
|
|
198976
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2, index2) => {
|
|
198977
|
+
const number = start3 + 1 + index2;
|
|
198978
198978
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
198979
198979
|
const gutter = ` ${paddedNumber} |`;
|
|
198980
198980
|
const hasMarker = markerLines[number];
|
|
@@ -199536,14 +199536,14 @@ ${frame}`;
|
|
|
199536
199536
|
endOfLine: handleEndOfLineComment = returnFalse,
|
|
199537
199537
|
remaining: handleRemainingComment = returnFalse
|
|
199538
199538
|
} = handleComments;
|
|
199539
|
-
const decoratedComments = comments.map((comment,
|
|
199539
|
+
const decoratedComments = comments.map((comment, index2) => Object.assign(Object.assign({}, decorateComment(ast, comment, options)), {}, {
|
|
199540
199540
|
comment,
|
|
199541
199541
|
text: text8,
|
|
199542
199542
|
options,
|
|
199543
199543
|
ast,
|
|
199544
|
-
isLastComment: comments.length - 1 ===
|
|
199544
|
+
isLastComment: comments.length - 1 === index2
|
|
199545
199545
|
}));
|
|
199546
|
-
for (const [
|
|
199546
|
+
for (const [index2, context] of decoratedComments.entries()) {
|
|
199547
199547
|
const {
|
|
199548
199548
|
comment,
|
|
199549
199549
|
precedingNode,
|
|
@@ -199573,7 +199573,7 @@ ${frame}`;
|
|
|
199573
199573
|
comment.followingNode = followingNode;
|
|
199574
199574
|
args = [comment, text22, options2, ast2, isLastComment];
|
|
199575
199575
|
}
|
|
199576
|
-
if (isOwnLineComment(text22, options2, decoratedComments,
|
|
199576
|
+
if (isOwnLineComment(text22, options2, decoratedComments, index2)) {
|
|
199577
199577
|
comment.placement = "ownLine";
|
|
199578
199578
|
if (handleOwnLineComment(...args)) {
|
|
199579
199579
|
} else if (followingNode) {
|
|
@@ -199585,7 +199585,7 @@ ${frame}`;
|
|
|
199585
199585
|
} else {
|
|
199586
199586
|
addDanglingComment(ast2, comment);
|
|
199587
199587
|
}
|
|
199588
|
-
} else if (isEndOfLineComment(text22, options2, decoratedComments,
|
|
199588
|
+
} else if (isEndOfLineComment(text22, options2, decoratedComments, index2)) {
|
|
199589
199589
|
comment.placement = "endOfLine";
|
|
199590
199590
|
if (handleEndOfLineComment(...args)) {
|
|
199591
199591
|
} else if (precedingNode) {
|
|
@@ -199641,11 +199641,11 @@ ${frame}`;
|
|
|
199641
199641
|
} = options;
|
|
199642
199642
|
let start3 = locStart(comment);
|
|
199643
199643
|
if (precedingNode) {
|
|
199644
|
-
for (let
|
|
199644
|
+
for (let index2 = commentIndex - 1; index2 >= 0; index2--) {
|
|
199645
199645
|
const {
|
|
199646
199646
|
comment: comment2,
|
|
199647
199647
|
precedingNode: currentCommentPrecedingNode
|
|
199648
|
-
} = decoratedComments[
|
|
199648
|
+
} = decoratedComments[index2];
|
|
199649
199649
|
if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text8.slice(locEnd(comment2), start3))) {
|
|
199650
199650
|
break;
|
|
199651
199651
|
}
|
|
@@ -199667,11 +199667,11 @@ ${frame}`;
|
|
|
199667
199667
|
} = options;
|
|
199668
199668
|
let end = locEnd(comment);
|
|
199669
199669
|
if (followingNode) {
|
|
199670
|
-
for (let
|
|
199670
|
+
for (let index2 = commentIndex + 1; index2 < decoratedComments.length; index2++) {
|
|
199671
199671
|
const {
|
|
199672
199672
|
comment: comment2,
|
|
199673
199673
|
followingNode: currentCommentFollowingNode
|
|
199674
|
-
} = decoratedComments[
|
|
199674
|
+
} = decoratedComments[index2];
|
|
199675
199675
|
if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text8.slice(end, locStart(comment2)))) {
|
|
199676
199676
|
break;
|
|
199677
199677
|
}
|
|
@@ -199756,8 +199756,8 @@ ${frame}`;
|
|
|
199756
199756
|
} else {
|
|
199757
199757
|
parts.push(hardline);
|
|
199758
199758
|
}
|
|
199759
|
-
const
|
|
199760
|
-
if (
|
|
199759
|
+
const index2 = skipNewline(originalText, skipSpaces(originalText, locEnd(comment)));
|
|
199760
|
+
if (index2 !== false && hasNewline(originalText, index2)) {
|
|
199761
199761
|
parts.push(hardline);
|
|
199762
199762
|
}
|
|
199763
199763
|
return parts;
|
|
@@ -199963,8 +199963,8 @@ ${frame}`;
|
|
|
199963
199963
|
}
|
|
199964
199964
|
map(callback, ...names) {
|
|
199965
199965
|
const result = [];
|
|
199966
|
-
this.each((path,
|
|
199967
|
-
result[
|
|
199966
|
+
this.each((path, index2, value) => {
|
|
199967
|
+
result[index2] = callback(path, index2, value);
|
|
199968
199968
|
}, ...names);
|
|
199969
199969
|
return result;
|
|
199970
199970
|
}
|
|
@@ -200510,11 +200510,11 @@ ${frame}`;
|
|
|
200510
200510
|
comments: rangeResult.comments
|
|
200511
200511
|
};
|
|
200512
200512
|
}
|
|
200513
|
-
function ensureIndexInText(text8,
|
|
200514
|
-
if (typeof
|
|
200513
|
+
function ensureIndexInText(text8, index2, defaultValue) {
|
|
200514
|
+
if (typeof index2 !== "number" || Number.isNaN(index2) || index2 < 0 || index2 > text8.length) {
|
|
200515
200515
|
return defaultValue;
|
|
200516
200516
|
}
|
|
200517
|
-
return
|
|
200517
|
+
return index2;
|
|
200518
200518
|
}
|
|
200519
200519
|
function normalizeIndexes(text8, options) {
|
|
200520
200520
|
let {
|
|
@@ -200549,7 +200549,7 @@ ${frame}`;
|
|
|
200549
200549
|
endOfLine = guessEndOfLine(text8);
|
|
200550
200550
|
}
|
|
200551
200551
|
if (text8.includes("\r")) {
|
|
200552
|
-
const countCrlfBefore = (
|
|
200552
|
+
const countCrlfBefore = (index2) => countEndOfLineChars(text8.slice(0, Math.max(index2, 0)), "\r\n");
|
|
200553
200553
|
cursorOffset -= countCrlfBefore(cursorOffset);
|
|
200554
200554
|
rangeStart -= countCrlfBefore(rangeStart);
|
|
200555
200555
|
rangeEnd -= countCrlfBefore(rangeEnd);
|
|
@@ -201005,14 +201005,14 @@ ${frame}`;
|
|
|
201005
201005
|
var isNumber = (num) => Number.isInteger(+num);
|
|
201006
201006
|
var zeros = (input) => {
|
|
201007
201007
|
let value = `${input}`;
|
|
201008
|
-
let
|
|
201008
|
+
let index2 = -1;
|
|
201009
201009
|
if (value[0] === "-")
|
|
201010
201010
|
value = value.slice(1);
|
|
201011
201011
|
if (value === "0")
|
|
201012
201012
|
return false;
|
|
201013
|
-
while (value[++
|
|
201013
|
+
while (value[++index2] === "0")
|
|
201014
201014
|
;
|
|
201015
|
-
return
|
|
201015
|
+
return index2 > 0;
|
|
201016
201016
|
};
|
|
201017
201017
|
var stringify2 = (start3, end, options) => {
|
|
201018
201018
|
if (typeof start3 === "string" || typeof end === "string") {
|
|
@@ -201129,15 +201129,15 @@ ${frame}`;
|
|
|
201129
201129
|
};
|
|
201130
201130
|
let push2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
201131
201131
|
let range = [];
|
|
201132
|
-
let
|
|
201132
|
+
let index2 = 0;
|
|
201133
201133
|
while (descending ? a >= b : a <= b) {
|
|
201134
201134
|
if (options.toRegex === true && step > 1) {
|
|
201135
201135
|
push2(a);
|
|
201136
201136
|
} else {
|
|
201137
|
-
range.push(pad(format3(a,
|
|
201137
|
+
range.push(pad(format3(a, index2), maxLen, toNumber));
|
|
201138
201138
|
}
|
|
201139
201139
|
a = descending ? a - step : a + step;
|
|
201140
|
-
|
|
201140
|
+
index2++;
|
|
201141
201141
|
}
|
|
201142
201142
|
if (options.toRegex === true) {
|
|
201143
201143
|
return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
|
|
@@ -201160,11 +201160,11 @@ ${frame}`;
|
|
|
201160
201160
|
return toRange(min, max, false, options);
|
|
201161
201161
|
}
|
|
201162
201162
|
let range = [];
|
|
201163
|
-
let
|
|
201163
|
+
let index2 = 0;
|
|
201164
201164
|
while (descending ? a >= b : a <= b) {
|
|
201165
|
-
range.push(format3(a,
|
|
201165
|
+
range.push(format3(a, index2));
|
|
201166
201166
|
a = descending ? a - step : a + step;
|
|
201167
|
-
|
|
201167
|
+
index2++;
|
|
201168
201168
|
}
|
|
201169
201169
|
if (options.toRegex === true) {
|
|
201170
201170
|
return toRegex(range, null, {
|
|
@@ -201445,11 +201445,11 @@ ${frame}`;
|
|
|
201445
201445
|
let prev = ast;
|
|
201446
201446
|
let brackets = 0;
|
|
201447
201447
|
let length = input.length;
|
|
201448
|
-
let
|
|
201448
|
+
let index2 = 0;
|
|
201449
201449
|
let depth = 0;
|
|
201450
201450
|
let value;
|
|
201451
201451
|
let memo = {};
|
|
201452
|
-
const advance3 = () => input[
|
|
201452
|
+
const advance3 = () => input[index2++];
|
|
201453
201453
|
const push2 = (node) => {
|
|
201454
201454
|
if (node.type === "text" && prev.type === "dot") {
|
|
201455
201455
|
prev.type = "text";
|
|
@@ -201467,7 +201467,7 @@ ${frame}`;
|
|
|
201467
201467
|
push2({
|
|
201468
201468
|
type: "bos"
|
|
201469
201469
|
});
|
|
201470
|
-
while (
|
|
201470
|
+
while (index2 < length) {
|
|
201471
201471
|
block = stack[stack.length - 1];
|
|
201472
201472
|
value = advance3();
|
|
201473
201473
|
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
|
|
@@ -201491,7 +201491,7 @@ ${frame}`;
|
|
|
201491
201491
|
brackets++;
|
|
201492
201492
|
let closed = true;
|
|
201493
201493
|
let next;
|
|
201494
|
-
while (
|
|
201494
|
+
while (index2 < length && (next = advance3())) {
|
|
201495
201495
|
value += next;
|
|
201496
201496
|
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
201497
201497
|
brackets++;
|
|
@@ -201548,7 +201548,7 @@ ${frame}`;
|
|
|
201548
201548
|
if (options.keepQuotes !== true) {
|
|
201549
201549
|
value = "";
|
|
201550
201550
|
}
|
|
201551
|
-
while (
|
|
201551
|
+
while (index2 < length && (next = advance3())) {
|
|
201552
201552
|
if (next === CHAR_BACKSLASH) {
|
|
201553
201553
|
value += next + advance3();
|
|
201554
201554
|
continue;
|
|
@@ -202010,7 +202010,7 @@ ${frame}`;
|
|
|
202010
202010
|
const tokens = [];
|
|
202011
202011
|
const parts = [];
|
|
202012
202012
|
let str = input;
|
|
202013
|
-
let
|
|
202013
|
+
let index2 = -1;
|
|
202014
202014
|
let start3 = 0;
|
|
202015
202015
|
let lastIndex = 0;
|
|
202016
202016
|
let isBrace = false;
|
|
@@ -202031,13 +202031,13 @@ ${frame}`;
|
|
|
202031
202031
|
depth: 0,
|
|
202032
202032
|
isGlob: false
|
|
202033
202033
|
};
|
|
202034
|
-
const eos = () =>
|
|
202035
|
-
const peek = () => str.charCodeAt(
|
|
202034
|
+
const eos = () => index2 >= length;
|
|
202035
|
+
const peek = () => str.charCodeAt(index2 + 1);
|
|
202036
202036
|
const advance3 = () => {
|
|
202037
202037
|
prev = code2;
|
|
202038
|
-
return str.charCodeAt(++
|
|
202038
|
+
return str.charCodeAt(++index2);
|
|
202039
202039
|
};
|
|
202040
|
-
while (
|
|
202040
|
+
while (index2 < length) {
|
|
202041
202041
|
code2 = advance3();
|
|
202042
202042
|
let next;
|
|
202043
202043
|
if (code2 === CHAR_BACKWARD_SLASH) {
|
|
@@ -202094,7 +202094,7 @@ ${frame}`;
|
|
|
202094
202094
|
break;
|
|
202095
202095
|
}
|
|
202096
202096
|
if (code2 === CHAR_FORWARD_SLASH) {
|
|
202097
|
-
slashes.push(
|
|
202097
|
+
slashes.push(index2);
|
|
202098
202098
|
tokens.push(token);
|
|
202099
202099
|
token = {
|
|
202100
202100
|
value: "",
|
|
@@ -202103,11 +202103,11 @@ ${frame}`;
|
|
|
202103
202103
|
};
|
|
202104
202104
|
if (finished === true)
|
|
202105
202105
|
continue;
|
|
202106
|
-
if (prev === CHAR_DOT &&
|
|
202106
|
+
if (prev === CHAR_DOT && index2 === start3 + 1) {
|
|
202107
202107
|
start3 += 2;
|
|
202108
202108
|
continue;
|
|
202109
202109
|
}
|
|
202110
|
-
lastIndex =
|
|
202110
|
+
lastIndex = index2 + 1;
|
|
202111
202111
|
continue;
|
|
202112
202112
|
}
|
|
202113
202113
|
if (opts.noext !== true) {
|
|
@@ -202116,7 +202116,7 @@ ${frame}`;
|
|
|
202116
202116
|
isGlob = token.isGlob = true;
|
|
202117
202117
|
isExtglob = token.isExtglob = true;
|
|
202118
202118
|
finished = true;
|
|
202119
|
-
if (code2 === CHAR_EXCLAMATION_MARK &&
|
|
202119
|
+
if (code2 === CHAR_EXCLAMATION_MARK && index2 === start3) {
|
|
202120
202120
|
negatedExtglob = true;
|
|
202121
202121
|
}
|
|
202122
202122
|
if (scanToEnd === true) {
|
|
@@ -202174,7 +202174,7 @@ ${frame}`;
|
|
|
202174
202174
|
}
|
|
202175
202175
|
break;
|
|
202176
202176
|
}
|
|
202177
|
-
if (opts.nonegate !== true && code2 === CHAR_EXCLAMATION_MARK &&
|
|
202177
|
+
if (opts.nonegate !== true && code2 === CHAR_EXCLAMATION_MARK && index2 === start3) {
|
|
202178
202178
|
negated = token.negated = true;
|
|
202179
202179
|
start3++;
|
|
202180
202180
|
continue;
|
|
@@ -202510,7 +202510,7 @@ ${frame}`;
|
|
|
202510
202510
|
};
|
|
202511
202511
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
202512
202512
|
let backslashes = false;
|
|
202513
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars2, first, rest,
|
|
202513
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars2, first, rest, index2) => {
|
|
202514
202514
|
if (first === "\\") {
|
|
202515
202515
|
backslashes = true;
|
|
202516
202516
|
return m;
|
|
@@ -202519,7 +202519,7 @@ ${frame}`;
|
|
|
202519
202519
|
if (esc) {
|
|
202520
202520
|
return esc + first + (rest ? QMARK.repeat(rest.length) : "");
|
|
202521
202521
|
}
|
|
202522
|
-
if (
|
|
202522
|
+
if (index2 === 0) {
|
|
202523
202523
|
return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
|
|
202524
202524
|
}
|
|
202525
202525
|
return QMARK.repeat(chars2.length);
|
|
@@ -210112,7 +210112,7 @@ ${fromBody}`;
|
|
|
210112
210112
|
};
|
|
210113
210113
|
var REPLACERS = [[/\\?\s+$/, (match) => match.indexOf("\\") === 0 ? SPACE2 : EMPTY], [/\\\s/g, () => SPACE2], [/[\\$.|*+(){^]/g, (match) => `\\${match}`], [/(?!\\)\?/g, () => "[^/]"], [/^\//, () => "^"], [/\//g, () => "\\/"], [/^\^*\\\*\\\*\\\//, () => "^(?:.*\\/)?"], [/^(?=[^^])/, function startingReplacer() {
|
|
210114
210114
|
return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
|
|
210115
|
-
}], [/\\\/\\\*\\\*(?=\\\/|$)/g, (_,
|
|
210115
|
+
}], [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index2, str) => index2 + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"], [/(^|[^\\]+)\\\*(?=.+)/g, (_, p1) => `${p1}[^\\/]*`], [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE], [/\\\\/g, () => ESCAPE], [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"], [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`], [/(\^|\\\/)?\\\*$/, (_, p1) => {
|
|
210116
210116
|
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
210117
210117
|
return `${prefix}(?=$|\\/$)`;
|
|
210118
210118
|
}]];
|
|
@@ -210588,54 +210588,54 @@ ${fromBody}`;
|
|
|
210588
210588
|
if (str[0] === "!") {
|
|
210589
210589
|
return true;
|
|
210590
210590
|
}
|
|
210591
|
-
var
|
|
210591
|
+
var index2 = 0;
|
|
210592
210592
|
var pipeIndex = -2;
|
|
210593
210593
|
var closeSquareIndex = -2;
|
|
210594
210594
|
var closeCurlyIndex = -2;
|
|
210595
210595
|
var closeParenIndex = -2;
|
|
210596
210596
|
var backSlashIndex = -2;
|
|
210597
|
-
while (
|
|
210598
|
-
if (str[
|
|
210597
|
+
while (index2 < str.length) {
|
|
210598
|
+
if (str[index2] === "*") {
|
|
210599
210599
|
return true;
|
|
210600
210600
|
}
|
|
210601
|
-
if (str[
|
|
210601
|
+
if (str[index2 + 1] === "?" && /[\].+)]/.test(str[index2])) {
|
|
210602
210602
|
return true;
|
|
210603
210603
|
}
|
|
210604
|
-
if (closeSquareIndex !== -1 && str[
|
|
210605
|
-
if (closeSquareIndex <
|
|
210606
|
-
closeSquareIndex = str.indexOf("]",
|
|
210604
|
+
if (closeSquareIndex !== -1 && str[index2] === "[" && str[index2 + 1] !== "]") {
|
|
210605
|
+
if (closeSquareIndex < index2) {
|
|
210606
|
+
closeSquareIndex = str.indexOf("]", index2);
|
|
210607
210607
|
}
|
|
210608
|
-
if (closeSquareIndex >
|
|
210608
|
+
if (closeSquareIndex > index2) {
|
|
210609
210609
|
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
210610
210610
|
return true;
|
|
210611
210611
|
}
|
|
210612
|
-
backSlashIndex = str.indexOf("\\",
|
|
210612
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210613
210613
|
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
210614
210614
|
return true;
|
|
210615
210615
|
}
|
|
210616
210616
|
}
|
|
210617
210617
|
}
|
|
210618
|
-
if (closeCurlyIndex !== -1 && str[
|
|
210619
|
-
closeCurlyIndex = str.indexOf("}",
|
|
210620
|
-
if (closeCurlyIndex >
|
|
210621
|
-
backSlashIndex = str.indexOf("\\",
|
|
210618
|
+
if (closeCurlyIndex !== -1 && str[index2] === "{" && str[index2 + 1] !== "}") {
|
|
210619
|
+
closeCurlyIndex = str.indexOf("}", index2);
|
|
210620
|
+
if (closeCurlyIndex > index2) {
|
|
210621
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210622
210622
|
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
|
|
210623
210623
|
return true;
|
|
210624
210624
|
}
|
|
210625
210625
|
}
|
|
210626
210626
|
}
|
|
210627
|
-
if (closeParenIndex !== -1 && str[
|
|
210628
|
-
closeParenIndex = str.indexOf(")",
|
|
210629
|
-
if (closeParenIndex >
|
|
210630
|
-
backSlashIndex = str.indexOf("\\",
|
|
210627
|
+
if (closeParenIndex !== -1 && str[index2] === "(" && str[index2 + 1] === "?" && /[:!=]/.test(str[index2 + 2]) && str[index2 + 3] !== ")") {
|
|
210628
|
+
closeParenIndex = str.indexOf(")", index2);
|
|
210629
|
+
if (closeParenIndex > index2) {
|
|
210630
|
+
backSlashIndex = str.indexOf("\\", index2);
|
|
210631
210631
|
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
210632
210632
|
return true;
|
|
210633
210633
|
}
|
|
210634
210634
|
}
|
|
210635
210635
|
}
|
|
210636
|
-
if (pipeIndex !== -1 && str[
|
|
210637
|
-
if (pipeIndex <
|
|
210638
|
-
pipeIndex = str.indexOf("|",
|
|
210636
|
+
if (pipeIndex !== -1 && str[index2] === "(" && str[index2 + 1] !== "|") {
|
|
210637
|
+
if (pipeIndex < index2) {
|
|
210638
|
+
pipeIndex = str.indexOf("|", index2);
|
|
210639
210639
|
}
|
|
210640
210640
|
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
|
|
210641
210641
|
closeParenIndex = str.indexOf(")", pipeIndex);
|
|
@@ -210647,21 +210647,21 @@ ${fromBody}`;
|
|
|
210647
210647
|
}
|
|
210648
210648
|
}
|
|
210649
210649
|
}
|
|
210650
|
-
if (str[
|
|
210651
|
-
var open = str[
|
|
210652
|
-
|
|
210650
|
+
if (str[index2] === "\\") {
|
|
210651
|
+
var open = str[index2 + 1];
|
|
210652
|
+
index2 += 2;
|
|
210653
210653
|
var close = chars2[open];
|
|
210654
210654
|
if (close) {
|
|
210655
|
-
var n = str.indexOf(close,
|
|
210655
|
+
var n = str.indexOf(close, index2);
|
|
210656
210656
|
if (n !== -1) {
|
|
210657
|
-
|
|
210657
|
+
index2 = n + 1;
|
|
210658
210658
|
}
|
|
210659
210659
|
}
|
|
210660
|
-
if (str[
|
|
210660
|
+
if (str[index2] === "!") {
|
|
210661
210661
|
return true;
|
|
210662
210662
|
}
|
|
210663
210663
|
} else {
|
|
210664
|
-
|
|
210664
|
+
index2++;
|
|
210665
210665
|
}
|
|
210666
210666
|
}
|
|
210667
210667
|
return false;
|
|
@@ -210670,26 +210670,26 @@ ${fromBody}`;
|
|
|
210670
210670
|
if (str[0] === "!") {
|
|
210671
210671
|
return true;
|
|
210672
210672
|
}
|
|
210673
|
-
var
|
|
210674
|
-
while (
|
|
210675
|
-
if (/[*?{}()[\]]/.test(str[
|
|
210673
|
+
var index2 = 0;
|
|
210674
|
+
while (index2 < str.length) {
|
|
210675
|
+
if (/[*?{}()[\]]/.test(str[index2])) {
|
|
210676
210676
|
return true;
|
|
210677
210677
|
}
|
|
210678
|
-
if (str[
|
|
210679
|
-
var open = str[
|
|
210680
|
-
|
|
210678
|
+
if (str[index2] === "\\") {
|
|
210679
|
+
var open = str[index2 + 1];
|
|
210680
|
+
index2 += 2;
|
|
210681
210681
|
var close = chars2[open];
|
|
210682
210682
|
if (close) {
|
|
210683
|
-
var n = str.indexOf(close,
|
|
210683
|
+
var n = str.indexOf(close, index2);
|
|
210684
210684
|
if (n !== -1) {
|
|
210685
|
-
|
|
210685
|
+
index2 = n + 1;
|
|
210686
210686
|
}
|
|
210687
210687
|
}
|
|
210688
|
-
if (str[
|
|
210688
|
+
if (str[index2] === "!") {
|
|
210689
210689
|
return true;
|
|
210690
210690
|
}
|
|
210691
210691
|
} else {
|
|
210692
|
-
|
|
210692
|
+
index2++;
|
|
210693
210693
|
}
|
|
210694
210694
|
}
|
|
210695
210695
|
return false;
|
|
@@ -212419,12 +212419,12 @@ ${fromBody}`;
|
|
|
212419
212419
|
const stream = new stream_1.PassThrough({
|
|
212420
212420
|
objectMode: true
|
|
212421
212421
|
});
|
|
212422
|
-
stream._write = (
|
|
212423
|
-
return this._getEntry(filepaths[
|
|
212422
|
+
stream._write = (index2, _enc, done) => {
|
|
212423
|
+
return this._getEntry(filepaths[index2], patterns[index2], options).then((entry) => {
|
|
212424
212424
|
if (entry !== null && options.entryFilter(entry)) {
|
|
212425
212425
|
stream.push(entry);
|
|
212426
212426
|
}
|
|
212427
|
-
if (
|
|
212427
|
+
if (index2 === filepaths.length - 1) {
|
|
212428
212428
|
stream.end();
|
|
212429
212429
|
}
|
|
212430
212430
|
done();
|
|
@@ -212523,8 +212523,8 @@ ${fromBody}`;
|
|
|
212523
212523
|
if (!pattern.complete && levels > section.length) {
|
|
212524
212524
|
return true;
|
|
212525
212525
|
}
|
|
212526
|
-
const match = parts.every((part,
|
|
212527
|
-
const segment = pattern.segments[
|
|
212526
|
+
const match = parts.every((part, index2) => {
|
|
212527
|
+
const segment = pattern.segments[index2];
|
|
212528
212528
|
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
212529
212529
|
return true;
|
|
212530
212530
|
}
|
|
@@ -213420,9 +213420,9 @@ ${fromBody}`;
|
|
|
213420
213420
|
"use strict";
|
|
213421
213421
|
function isNodeMatchesNameOrPath(node, nameOrPath) {
|
|
213422
213422
|
const names = nameOrPath.split(".");
|
|
213423
|
-
for (let
|
|
213424
|
-
const name2 = names[
|
|
213425
|
-
if (
|
|
213423
|
+
for (let index2 = names.length - 1; index2 >= 0; index2--) {
|
|
213424
|
+
const name2 = names[index2];
|
|
213425
|
+
if (index2 === 0) {
|
|
213426
213426
|
return node.type === "Identifier" && node.name === name2;
|
|
213427
213427
|
}
|
|
213428
213428
|
if (node.type !== "MemberExpression" || node.optional || node.computed || node.property.type !== "Identifier" || node.property.name !== name2) {
|
|
@@ -213843,7 +213843,7 @@ ${fromBody}`;
|
|
|
213843
213843
|
}
|
|
213844
213844
|
return true;
|
|
213845
213845
|
}
|
|
213846
|
-
var PRECEDENCE = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((operators,
|
|
213846
|
+
var PRECEDENCE = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((operators, index2) => operators.map((operator) => [operator, index2])));
|
|
213847
213847
|
function getPrecedence(operator) {
|
|
213848
213848
|
return PRECEDENCE.get(operator);
|
|
213849
213849
|
}
|
|
@@ -213886,8 +213886,8 @@ ${fromBody}`;
|
|
|
213886
213886
|
}
|
|
213887
213887
|
function iterateFunctionParametersPath(path, iteratee) {
|
|
213888
213888
|
const node = path.getValue();
|
|
213889
|
-
let
|
|
213890
|
-
const callback = (childPath) => iteratee(childPath,
|
|
213889
|
+
let index2 = 0;
|
|
213890
|
+
const callback = (childPath) => iteratee(childPath, index2++);
|
|
213891
213891
|
if (node.this) {
|
|
213892
213892
|
path.call(callback, "this");
|
|
213893
213893
|
}
|
|
@@ -213952,7 +213952,7 @@ ${fromBody}`;
|
|
|
213952
213952
|
flags = 0;
|
|
213953
213953
|
}
|
|
213954
213954
|
if (flags || fn) {
|
|
213955
|
-
return (comment,
|
|
213955
|
+
return (comment, index2, comments) => !(flags & CommentCheckFlags.Leading && !comment.leading || flags & CommentCheckFlags.Trailing && !comment.trailing || flags & CommentCheckFlags.Dangling && (comment.leading || comment.trailing) || flags & CommentCheckFlags.Block && !isBlockComment(comment) || flags & CommentCheckFlags.Line && !isLineComment(comment) || flags & CommentCheckFlags.First && index2 !== 0 || flags & CommentCheckFlags.Last && index2 !== comments.length - 1 || flags & CommentCheckFlags.PrettierIgnore && !isPrettierIgnoreComment(comment) || fn && !fn(comment));
|
|
213956
213956
|
}
|
|
213957
213957
|
};
|
|
213958
213958
|
function hasComment(node, flags, fn) {
|
|
@@ -214167,11 +214167,11 @@ ${fromBody}`;
|
|
|
214167
214167
|
for (const {
|
|
214168
214168
|
cells
|
|
214169
214169
|
} of table.filter((row) => !row.hasLineBreak)) {
|
|
214170
|
-
for (const [
|
|
214171
|
-
maxColumnWidths[
|
|
214170
|
+
for (const [index2, cell] of cells.entries()) {
|
|
214171
|
+
maxColumnWidths[index2] = Math.max(maxColumnWidths[index2], getStringWidth(cell));
|
|
214172
214172
|
}
|
|
214173
214173
|
}
|
|
214174
|
-
parts.push(lineSuffixBoundary, "`", indent([hardline, join3(hardline, table.map((row) => join3(" | ", row.cells.map((cell,
|
|
214174
|
+
parts.push(lineSuffixBoundary, "`", indent([hardline, join3(hardline, table.map((row) => join3(" | ", row.cells.map((cell, index2) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index2] - getStringWidth(cell))))))]), hardline, "`");
|
|
214175
214175
|
return parts;
|
|
214176
214176
|
}
|
|
214177
214177
|
}
|
|
@@ -214418,8 +214418,8 @@ ${fromBody}`;
|
|
|
214418
214418
|
const node = path.getValue();
|
|
214419
214419
|
const counter = htmlTemplateLiteralCounter;
|
|
214420
214420
|
htmlTemplateLiteralCounter = htmlTemplateLiteralCounter + 1 >>> 0;
|
|
214421
|
-
const composePlaceholder = (
|
|
214422
|
-
const text8 = node.quasis.map((quasi,
|
|
214421
|
+
const composePlaceholder = (index2) => `PRETTIER_HTML_PLACEHOLDER_${index2}_${counter}_IN_JS`;
|
|
214422
|
+
const text8 = node.quasis.map((quasi, index2, quasis) => index2 === quasis.length - 1 ? quasi.value.cooked : quasi.value.cooked + composePlaceholder(index2)).join("");
|
|
214423
214423
|
const expressionDocs = printTemplateExpressions(path, print);
|
|
214424
214424
|
if (expressionDocs.length === 0 && text8.trim().length === 0) {
|
|
214425
214425
|
return "``";
|
|
@@ -214653,8 +214653,8 @@ ${fromBody}`;
|
|
|
214653
214653
|
const expression = ast.expression || ast.callee;
|
|
214654
214654
|
if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) {
|
|
214655
214655
|
const astProps = ast.expression.arguments[0].properties;
|
|
214656
|
-
for (const [
|
|
214657
|
-
switch (astProps[
|
|
214656
|
+
for (const [index2, prop] of newObj.expression.arguments[0].properties.entries()) {
|
|
214657
|
+
switch (astProps[index2].key.name) {
|
|
214658
214658
|
case "styles":
|
|
214659
214659
|
if (prop.value.type === "ArrayExpression") {
|
|
214660
214660
|
removeTemplateElementsValue(prop.value.elements[0]);
|
|
@@ -214817,11 +214817,11 @@ ${fromBody}`;
|
|
|
214817
214817
|
if (!text8.startsWith("#!")) {
|
|
214818
214818
|
return "";
|
|
214819
214819
|
}
|
|
214820
|
-
const
|
|
214821
|
-
if (
|
|
214820
|
+
const index2 = text8.indexOf("\n");
|
|
214821
|
+
if (index2 === -1) {
|
|
214822
214822
|
return text8;
|
|
214823
214823
|
}
|
|
214824
|
-
return text8.slice(0,
|
|
214824
|
+
return text8.slice(0, index2);
|
|
214825
214825
|
}
|
|
214826
214826
|
module2.exports = getShebang;
|
|
214827
214827
|
}
|
|
@@ -215163,8 +215163,8 @@ ${fromBody}`;
|
|
|
215163
215163
|
if (!((enclosingNode === null || enclosingNode === void 0 ? void 0 : enclosingNode.type) === "ArrowFunctionExpression")) {
|
|
215164
215164
|
return false;
|
|
215165
215165
|
}
|
|
215166
|
-
const
|
|
215167
|
-
if (
|
|
215166
|
+
const index2 = getNextNonSpaceNonCommentCharacterIndex(text8, comment, locEnd);
|
|
215167
|
+
if (index2 !== false && text8.slice(index2, index2 + 2) === "=>") {
|
|
215168
215168
|
addDanglingComment(enclosingNode, comment);
|
|
215169
215169
|
return true;
|
|
215170
215170
|
}
|
|
@@ -216231,15 +216231,15 @@ ${fromBody}`;
|
|
|
216231
216231
|
case "NGQuotedExpression":
|
|
216232
216232
|
return [node.prefix, ": ", node.value.trim()];
|
|
216233
216233
|
case "NGMicrosyntax":
|
|
216234
|
-
return path.map((childPath,
|
|
216234
|
+
return path.map((childPath, index2) => [index2 === 0 ? "" : isNgForOf(childPath.getValue(), index2, node) ? " " : [";", line2], print()], "body");
|
|
216235
216235
|
case "NGMicrosyntaxKey":
|
|
216236
216236
|
return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(node.name) ? node.name : JSON.stringify(node.name);
|
|
216237
216237
|
case "NGMicrosyntaxExpression":
|
|
216238
216238
|
return [print("expression"), node.alias === null ? "" : [" as ", print("alias")]];
|
|
216239
216239
|
case "NGMicrosyntaxKeyedExpression": {
|
|
216240
|
-
const
|
|
216240
|
+
const index2 = path.getName();
|
|
216241
216241
|
const parentNode = path.getParentNode();
|
|
216242
|
-
const shouldNotPrintColon = isNgForOf(node,
|
|
216242
|
+
const shouldNotPrintColon = isNgForOf(node, index2, parentNode) || (index2 === 1 && (node.key.name === "then" || node.key.name === "else") || index2 === 2 && node.key.name === "else" && parentNode.body[index2 - 1].type === "NGMicrosyntaxKeyedExpression" && parentNode.body[index2 - 1].key.name === "then") && parentNode.body[0].type === "NGMicrosyntaxExpression";
|
|
216243
216243
|
return [print("key"), shouldNotPrintColon ? " " : ": ", print("expression")];
|
|
216244
216244
|
}
|
|
216245
216245
|
case "NGMicrosyntaxLet":
|
|
@@ -216250,8 +216250,8 @@ ${fromBody}`;
|
|
|
216250
216250
|
throw new Error(`Unknown Angular node type: ${JSON.stringify(node.type)}.`);
|
|
216251
216251
|
}
|
|
216252
216252
|
}
|
|
216253
|
-
function isNgForOf(node,
|
|
216254
|
-
return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" &&
|
|
216253
|
+
function isNgForOf(node, index2, parentNode) {
|
|
216254
|
+
return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index2 === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
|
|
216255
216255
|
}
|
|
216256
216256
|
function hasNgSideEffect(path) {
|
|
216257
216257
|
return hasNode(path.getValue(), (node) => {
|
|
@@ -216666,9 +216666,9 @@ ${fromBody}`;
|
|
|
216666
216666
|
if (!parent || !node || !isJsxNode(node) || !isJsxNode(parent)) {
|
|
216667
216667
|
return false;
|
|
216668
216668
|
}
|
|
216669
|
-
const
|
|
216669
|
+
const index2 = parent.children.indexOf(node);
|
|
216670
216670
|
let prevSibling = null;
|
|
216671
|
-
for (let i =
|
|
216671
|
+
for (let i = index2; i > 0; i--) {
|
|
216672
216672
|
const candidate = parent.children[i - 1];
|
|
216673
216673
|
if (candidate.type === "JSXText" && !isMeaningfulJsxText(candidate)) {
|
|
216674
216674
|
continue;
|
|
@@ -216940,12 +216940,12 @@ ${fromBody}`;
|
|
|
216940
216940
|
let hasEmptyLineFollowingFirstArg = false;
|
|
216941
216941
|
const lastArgIndex = args.length - 1;
|
|
216942
216942
|
const printedArguments = [];
|
|
216943
|
-
iterateCallArgumentsPath(path, (argPath,
|
|
216943
|
+
iterateCallArgumentsPath(path, (argPath, index2) => {
|
|
216944
216944
|
const arg = argPath.getNode();
|
|
216945
216945
|
const parts = [print()];
|
|
216946
|
-
if (
|
|
216946
|
+
if (index2 === lastArgIndex) {
|
|
216947
216947
|
} else if (isNextLineEmpty(arg, options)) {
|
|
216948
|
-
if (
|
|
216948
|
+
if (index2 === 0) {
|
|
216949
216949
|
hasEmptyLineFollowingFirstArg = true;
|
|
216950
216950
|
}
|
|
216951
216951
|
anyArgEmptyLine = true;
|
|
@@ -217713,8 +217713,8 @@ ${fromBody}`;
|
|
|
217713
217713
|
const isParametersInTestCall = isTestCall(parent);
|
|
217714
217714
|
const shouldHugParameters = shouldHugFunctionParameters(functionNode);
|
|
217715
217715
|
const printed = [];
|
|
217716
|
-
iterateFunctionParametersPath(path, (parameterPath,
|
|
217717
|
-
const isLastParameter =
|
|
217716
|
+
iterateFunctionParametersPath(path, (parameterPath, index2) => {
|
|
217717
|
+
const isLastParameter = index2 === parameters.length - 1;
|
|
217718
217718
|
if (isLastParameter && functionNode.rest) {
|
|
217719
217719
|
printed.push("...");
|
|
217720
217720
|
}
|
|
@@ -217725,7 +217725,7 @@ ${fromBody}`;
|
|
|
217725
217725
|
printed.push(",");
|
|
217726
217726
|
if (isParametersInTestCall || shouldHugParameters) {
|
|
217727
217727
|
printed.push(" ");
|
|
217728
|
-
} else if (isNextLineEmpty(parameters[
|
|
217728
|
+
} else if (isNextLineEmpty(parameters[index2], options)) {
|
|
217729
217729
|
printed.push(hardline, hardline);
|
|
217730
217730
|
} else {
|
|
217731
217731
|
printed.push(line2);
|
|
@@ -219496,8 +219496,8 @@ ${fromBody}`;
|
|
|
219496
219496
|
} = require_doc();
|
|
219497
219497
|
function conditionalExpressionChainContainsJsx(node) {
|
|
219498
219498
|
const conditionalExpressions = [node];
|
|
219499
|
-
for (let
|
|
219500
|
-
const conditionalExpression = conditionalExpressions[
|
|
219499
|
+
for (let index2 = 0; index2 < conditionalExpressions.length; index2++) {
|
|
219500
|
+
const conditionalExpression = conditionalExpressions[index2];
|
|
219501
219501
|
for (const property of ["test", "consequent", "alternate"]) {
|
|
219502
219502
|
const node2 = conditionalExpression[property];
|
|
219503
219503
|
if (isJsxNode(node2)) {
|
|
@@ -219621,7 +219621,7 @@ ${fromBody}`;
|
|
|
219621
219621
|
const parts = [];
|
|
219622
219622
|
const isClassBody = node.type === "ClassBody";
|
|
219623
219623
|
const lastStatement = getLastStatement(node[property]);
|
|
219624
|
-
path.each((path2,
|
|
219624
|
+
path.each((path2, index2, statements) => {
|
|
219625
219625
|
const node2 = path2.getValue();
|
|
219626
219626
|
if (node2.type === "EmptyStatement") {
|
|
219627
219627
|
return;
|
|
@@ -219638,7 +219638,7 @@ ${fromBody}`;
|
|
|
219638
219638
|
} else {
|
|
219639
219639
|
parts.push(printed);
|
|
219640
219640
|
}
|
|
219641
|
-
if (!options.semi && isClassBody && isClassProperty(node2) && shouldPrintSemicolonAfterClassProperty(node2, statements[
|
|
219641
|
+
if (!options.semi && isClassBody && isClassProperty(node2) && shouldPrintSemicolonAfterClassProperty(node2, statements[index2 + 1])) {
|
|
219642
219642
|
parts.push(";");
|
|
219643
219643
|
}
|
|
219644
219644
|
if (node2 !== lastStatement) {
|
|
@@ -219837,9 +219837,9 @@ ${fromBody}`;
|
|
|
219837
219837
|
}
|
|
219838
219838
|
const parts = [];
|
|
219839
219839
|
if (nodeHasDirectives) {
|
|
219840
|
-
path.each((childPath,
|
|
219840
|
+
path.each((childPath, index2, directives) => {
|
|
219841
219841
|
parts.push(print());
|
|
219842
|
-
if (
|
|
219842
|
+
if (index2 < directives.length - 1 || nodeHasBody || nodeHasComment) {
|
|
219843
219843
|
parts.push(hardline);
|
|
219844
219844
|
if (isNextLineEmpty(childPath.getValue(), options)) {
|
|
219845
219845
|
parts.push(hardline);
|
|
@@ -220276,7 +220276,7 @@ ${fromBody}`;
|
|
|
220276
220276
|
}
|
|
220277
220277
|
function printIndentableBlockComment(comment) {
|
|
220278
220278
|
const lines2 = comment.value.split("\n");
|
|
220279
|
-
return ["/*", join3(hardline, lines2.map((line2,
|
|
220279
|
+
return ["/*", join3(hardline, lines2.map((line2, index2) => index2 === 0 ? line2.trimEnd() : " " + (index2 < lines2.length - 1 ? line2.trim() : line2.trimStart()))), "*/"];
|
|
220280
220280
|
}
|
|
220281
220281
|
module2.exports = {
|
|
220282
220282
|
printComment
|
|
@@ -220697,8 +220697,8 @@ ${fromBody}`;
|
|
|
220697
220697
|
const parent = path.getParentNode(0);
|
|
220698
220698
|
if (parent.type === "ExpressionStatement" || parent.type === "ForStatement") {
|
|
220699
220699
|
const parts2 = [];
|
|
220700
|
-
path.each((expressionPath,
|
|
220701
|
-
if (
|
|
220700
|
+
path.each((expressionPath, index2) => {
|
|
220701
|
+
if (index2 === 0) {
|
|
220702
220702
|
parts2.push(print());
|
|
220703
220703
|
} else {
|
|
220704
220704
|
parts2.push(",", indent([line2, print()]));
|
|
@@ -220829,9 +220829,9 @@ ${fromBody}`;
|
|
|
220829
220829
|
}
|
|
220830
220830
|
return ["catch ", print("body")];
|
|
220831
220831
|
case "SwitchStatement":
|
|
220832
|
-
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join3(hardline, path.map((casePath,
|
|
220832
|
+
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join3(hardline, path.map((casePath, index2, cases) => {
|
|
220833
220833
|
const caseNode = casePath.getValue();
|
|
220834
|
-
return [print(),
|
|
220834
|
+
return [print(), index2 !== cases.length - 1 && isNextLineEmpty(caseNode, options) ? hardline : ""];
|
|
220835
220835
|
}, "cases"))]) : "", hardline, "}"];
|
|
220836
220836
|
case "SwitchCase": {
|
|
220837
220837
|
if (node.test) {
|
|
@@ -220998,9 +220998,9 @@ ${fromBody}`;
|
|
|
220998
220998
|
return newNode.argument;
|
|
220999
220999
|
}
|
|
221000
221000
|
if (type === "ArrayExpression") {
|
|
221001
|
-
for (const [
|
|
221001
|
+
for (const [index2, element] of node.elements.entries()) {
|
|
221002
221002
|
if (element === null) {
|
|
221003
|
-
newNode.elements.splice(
|
|
221003
|
+
newNode.elements.splice(index2, 0, {
|
|
221004
221004
|
type: "NullLiteral"
|
|
221005
221005
|
});
|
|
221006
221006
|
}
|
|
@@ -221520,10 +221520,10 @@ ${fromBody}`;
|
|
|
221520
221520
|
delete newObj.value;
|
|
221521
221521
|
}
|
|
221522
221522
|
if (ast.type === "value-comma_group") {
|
|
221523
|
-
const
|
|
221524
|
-
if (
|
|
221525
|
-
newObj.groups[
|
|
221526
|
-
newObj.groups.splice(
|
|
221523
|
+
const index2 = ast.groups.findIndex((node) => node.type === "value-number" && node.unit === "...");
|
|
221524
|
+
if (index2 !== -1) {
|
|
221525
|
+
newObj.groups[index2].unit = "";
|
|
221526
|
+
newObj.groups.splice(index2 + 1, 0, {
|
|
221527
221527
|
type: "value-word",
|
|
221528
221528
|
value: "...",
|
|
221529
221529
|
isColor: false,
|
|
@@ -221834,11 +221834,11 @@ ${fromBody}`;
|
|
|
221834
221834
|
const {
|
|
221835
221835
|
groups
|
|
221836
221836
|
} = parentNode;
|
|
221837
|
-
const
|
|
221838
|
-
if (
|
|
221837
|
+
const index2 = groups.indexOf(node);
|
|
221838
|
+
if (index2 === -1) {
|
|
221839
221839
|
return false;
|
|
221840
221840
|
}
|
|
221841
|
-
return isColonNode(groups[
|
|
221841
|
+
return isColonNode(groups[index2 + 1]);
|
|
221842
221842
|
}
|
|
221843
221843
|
function isMediaAndSupportsKeywords(node) {
|
|
221844
221844
|
return node.value && ["not", "and", "or"].includes(node.value.toLowerCase());
|
|
@@ -221929,11 +221929,11 @@ ${fromBody}`;
|
|
|
221929
221929
|
"src/utils/line-column-to-index.js"(exports2, module2) {
|
|
221930
221930
|
"use strict";
|
|
221931
221931
|
module2.exports = function(lineColumn, text8) {
|
|
221932
|
-
let
|
|
221932
|
+
let index2 = 0;
|
|
221933
221933
|
for (let i = 0; i < lineColumn.line - 1; ++i) {
|
|
221934
|
-
|
|
221934
|
+
index2 = text8.indexOf("\n", index2) + 1;
|
|
221935
221935
|
}
|
|
221936
|
-
return
|
|
221936
|
+
return index2 + lineColumn.column;
|
|
221937
221937
|
};
|
|
221938
221938
|
}
|
|
221939
221939
|
});
|
|
@@ -222406,8 +222406,8 @@ ${fromBody}`;
|
|
|
222406
222406
|
}
|
|
222407
222407
|
case "selector-tag": {
|
|
222408
222408
|
const parentNode = path.getParentNode();
|
|
222409
|
-
const
|
|
222410
|
-
const prevNode =
|
|
222409
|
+
const index2 = parentNode && parentNode.nodes.indexOf(node);
|
|
222410
|
+
const prevNode = index2 && parentNode.nodes[index2 - 1];
|
|
222411
222411
|
return [node.namespace ? [node.namespace === true ? "" : node.namespace.trim(), "|"] : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isKeyframeAtRuleKeywords(path, node.value) ? node.value.toLowerCase() : node.value)];
|
|
222412
222412
|
}
|
|
222413
222413
|
case "selector-id": {
|
|
@@ -222634,9 +222634,9 @@ ${fromBody}`;
|
|
|
222634
222634
|
const isConfiguration = isConfigurationNode(node, parentNode);
|
|
222635
222635
|
const shouldBreak = isConfiguration || isSCSSMapItem && !isKey;
|
|
222636
222636
|
const shouldDedent = isConfiguration || isKey;
|
|
222637
|
-
const printed = group([node.open ? print("open") : "", indent([softline, join3([line2], path.map((childPath,
|
|
222637
|
+
const printed = group([node.open ? print("open") : "", indent([softline, join3([line2], path.map((childPath, index2) => {
|
|
222638
222638
|
const child = childPath.getValue();
|
|
222639
|
-
const isLast =
|
|
222639
|
+
const isLast = index2 === node.groups.length - 1;
|
|
222640
222640
|
const printed2 = [print(), isLast ? "" : ","];
|
|
222641
222641
|
if (isKeyValuePairNode(child) && child.type === "value-comma_group" && child.groups && child.groups[0].type !== "value-paren_group" && child.groups[2] && child.groups[2].type === "value-paren_group") {
|
|
222642
222642
|
const parts = getDocParts(printed2[0].contents.contents);
|
|
@@ -222675,8 +222675,8 @@ ${fromBody}`;
|
|
|
222675
222675
|
}
|
|
222676
222676
|
case "value-colon": {
|
|
222677
222677
|
const parentNode = path.getParentNode();
|
|
222678
|
-
const
|
|
222679
|
-
const prevNode =
|
|
222678
|
+
const index2 = parentNode && parentNode.groups.indexOf(node);
|
|
222679
|
+
const prevNode = index2 && parentNode.groups[index2 - 1];
|
|
222680
222680
|
return [node.value, prevNode && typeof prevNode.value === "string" && getLast(prevNode.value) === "\\" || insideValueFunctionNode(path, "url") ? "" : line2];
|
|
222681
222681
|
}
|
|
222682
222682
|
case "value-comma": {
|
|
@@ -222962,8 +222962,8 @@ ${fromBody}`;
|
|
|
222962
222962
|
const node = path.getValue();
|
|
222963
222963
|
const parentNode = (_path$getParentNode2 = path.getParentNode(0)) !== null && _path$getParentNode2 !== void 0 ? _path$getParentNode2 : {};
|
|
222964
222964
|
const children = (_ref7 = (_ref8 = (_parentNode$children = parentNode.children) !== null && _parentNode$children !== void 0 ? _parentNode$children : parentNode.body) !== null && _ref8 !== void 0 ? _ref8 : parentNode.parts) !== null && _ref7 !== void 0 ? _ref7 : [];
|
|
222965
|
-
const
|
|
222966
|
-
return
|
|
222965
|
+
const index2 = children.indexOf(node);
|
|
222966
|
+
return index2 !== -1 && children[index2 + offset3];
|
|
222967
222967
|
}
|
|
222968
222968
|
function getPreviousNode(path, lookBack = 1) {
|
|
222969
222969
|
return getSiblingNode(path, -lookBack);
|
|
@@ -223253,8 +223253,8 @@ ${fromBody}`;
|
|
|
223253
223253
|
const attributes2 = types4.flatMap((type) => node[type]).sort(sortByLoc);
|
|
223254
223254
|
for (const attributeType of types4) {
|
|
223255
223255
|
path.each((attributePath) => {
|
|
223256
|
-
const
|
|
223257
|
-
attributes2.splice(
|
|
223256
|
+
const index2 = attributes2.indexOf(attributePath.getValue());
|
|
223257
|
+
attributes2.splice(index2, 1, [line2, print2()]);
|
|
223258
223258
|
}, attributeType);
|
|
223259
223259
|
}
|
|
223260
223260
|
if (isNonEmptyArray(node.blockParams)) {
|
|
@@ -223425,13 +223425,13 @@ ${fromBody}`;
|
|
|
223425
223425
|
return [quote, stringLiteral.replace(regex, `\\${quote}`), quote];
|
|
223426
223426
|
}
|
|
223427
223427
|
function needsOppositeQuote(path) {
|
|
223428
|
-
let
|
|
223429
|
-
let parentNode = path.getParentNode(
|
|
223428
|
+
let index2 = 0;
|
|
223429
|
+
let parentNode = path.getParentNode(index2);
|
|
223430
223430
|
while (parentNode && isNodeOfSomeType(parentNode, ["SubExpression"])) {
|
|
223431
|
-
|
|
223432
|
-
parentNode = path.getParentNode(
|
|
223431
|
+
index2++;
|
|
223432
|
+
parentNode = path.getParentNode(index2);
|
|
223433
223433
|
}
|
|
223434
|
-
if (parentNode && isNodeOfSomeType(path.getParentNode(
|
|
223434
|
+
if (parentNode && isNodeOfSomeType(path.getParentNode(index2 + 1), ["ConcatStatement"]) && isNodeOfSomeType(path.getParentNode(index2 + 2), ["AttrNode"])) {
|
|
223435
223435
|
return true;
|
|
223436
223436
|
}
|
|
223437
223437
|
return false;
|
|
@@ -223597,9 +223597,9 @@ ${fromBody}`;
|
|
|
223597
223597
|
switch (node.kind) {
|
|
223598
223598
|
case "Document": {
|
|
223599
223599
|
const parts = [];
|
|
223600
|
-
path.each((pathChild,
|
|
223600
|
+
path.each((pathChild, index2, definitions) => {
|
|
223601
223601
|
parts.push(print());
|
|
223602
|
-
if (
|
|
223602
|
+
if (index2 !== definitions.length - 1) {
|
|
223603
223603
|
parts.push(hardline);
|
|
223604
223604
|
if (isNextLineEmpty(options.originalText, pathChild.getValue(), locEnd)) {
|
|
223605
223605
|
parts.push(hardline);
|
|
@@ -223743,9 +223743,9 @@ ${fromBody}`;
|
|
|
223743
223743
|
return [" ", group(indent([softline, printed]))];
|
|
223744
223744
|
}
|
|
223745
223745
|
function printSequence(path, options, print, property) {
|
|
223746
|
-
return path.map((path2,
|
|
223746
|
+
return path.map((path2, index2, sequence) => {
|
|
223747
223747
|
const printed = print();
|
|
223748
|
-
if (
|
|
223748
|
+
if (index2 < sequence.length - 1 && isNextLineEmpty(options.originalText, path2.getValue(), locEnd)) {
|
|
223749
223749
|
return [printed, hardline];
|
|
223750
223750
|
}
|
|
223751
223751
|
return printed;
|
|
@@ -223768,10 +223768,10 @@ ${fromBody}`;
|
|
|
223768
223768
|
interfaces
|
|
223769
223769
|
} = node;
|
|
223770
223770
|
const printed = path.map((node2) => print(node2), "interfaces");
|
|
223771
|
-
for (let
|
|
223772
|
-
const interfaceNode = interfaces[
|
|
223773
|
-
parts.push(printed[
|
|
223774
|
-
const nextInterfaceNode = interfaces[
|
|
223771
|
+
for (let index2 = 0; index2 < interfaces.length; index2++) {
|
|
223772
|
+
const interfaceNode = interfaces[index2];
|
|
223773
|
+
parts.push(printed[index2]);
|
|
223774
|
+
const nextInterfaceNode = interfaces[index2 + 1];
|
|
223775
223775
|
if (nextInterfaceNode) {
|
|
223776
223776
|
const textBetween = options.originalText.slice(interfaceNode.loc.end, nextInterfaceNode.loc.start);
|
|
223777
223777
|
const hasComment = textBetween.includes("#");
|
|
@@ -223908,15 +223908,15 @@ ${fromBody}`;
|
|
|
223908
223908
|
const nodes = [];
|
|
223909
223909
|
const tokens = (options.proseWrap === "preserve" ? text8 : text8.replace(new RegExp(`(${cjkPattern})
|
|
223910
223910
|
(${cjkPattern})`, "g"), "$1$2")).split(/([\t\n ]+)/);
|
|
223911
|
-
for (const [
|
|
223912
|
-
if (
|
|
223911
|
+
for (const [index2, token] of tokens.entries()) {
|
|
223912
|
+
if (index2 % 2 === 1) {
|
|
223913
223913
|
nodes.push({
|
|
223914
223914
|
type: "whitespace",
|
|
223915
223915
|
value: /\n/.test(token) ? "\n" : " "
|
|
223916
223916
|
});
|
|
223917
223917
|
continue;
|
|
223918
223918
|
}
|
|
223919
|
-
if ((
|
|
223919
|
+
if ((index2 === 0 || index2 === tokens.length - 1) && token === "") {
|
|
223920
223920
|
continue;
|
|
223921
223921
|
}
|
|
223922
223922
|
const innerTokens = token.split(new RegExp(`(${cjkPattern})`));
|
|
@@ -224006,8 +224006,8 @@ ${fromBody}`;
|
|
|
224006
224006
|
return value;
|
|
224007
224007
|
}
|
|
224008
224008
|
function mapAst(ast, handler) {
|
|
224009
|
-
return function preorder(node,
|
|
224010
|
-
const newNode = Object.assign({}, handler(node,
|
|
224009
|
+
return function preorder(node, index2, parentStack) {
|
|
224010
|
+
const newNode = Object.assign({}, handler(node, index2, parentStack));
|
|
224011
224011
|
if (newNode.children) {
|
|
224012
224012
|
newNode.children = newNode.children.map((child, index22) => preorder(child, index22, [newNode, ...parentStack]));
|
|
224013
224013
|
}
|
|
@@ -224215,7 +224215,7 @@ ${extracted.content}`;
|
|
|
224215
224215
|
}));
|
|
224216
224216
|
}
|
|
224217
224217
|
function splitTextIntoSentences(ast, options) {
|
|
224218
|
-
return mapAst(ast, (node,
|
|
224218
|
+
return mapAst(ast, (node, index2, [parentNode]) => {
|
|
224219
224219
|
if (node.type !== "text") {
|
|
224220
224220
|
return node;
|
|
224221
224221
|
}
|
|
@@ -224223,10 +224223,10 @@ ${extracted.content}`;
|
|
|
224223
224223
|
value
|
|
224224
224224
|
} = node;
|
|
224225
224225
|
if (parentNode.type === "paragraph") {
|
|
224226
|
-
if (
|
|
224226
|
+
if (index2 === 0) {
|
|
224227
224227
|
value = value.trimStart();
|
|
224228
224228
|
}
|
|
224229
|
-
if (
|
|
224229
|
+
if (index2 === parentNode.children.length - 1) {
|
|
224230
224230
|
value = value.trimEnd();
|
|
224231
224231
|
}
|
|
224232
224232
|
}
|
|
@@ -224238,7 +224238,7 @@ ${extracted.content}`;
|
|
|
224238
224238
|
});
|
|
224239
224239
|
}
|
|
224240
224240
|
function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
|
|
224241
|
-
return mapAst(ast, (node,
|
|
224241
|
+
return mapAst(ast, (node, index2, parentStack) => {
|
|
224242
224242
|
if (node.type === "code") {
|
|
224243
224243
|
const isIndented = /^\n?(?: {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
|
|
224244
224244
|
node.isIndented = isIndented;
|
|
@@ -224258,7 +224258,7 @@ ${extracted.content}`;
|
|
|
224258
224258
|
});
|
|
224259
224259
|
}
|
|
224260
224260
|
function markAlignedList(ast, options) {
|
|
224261
|
-
return mapAst(ast, (node,
|
|
224261
|
+
return mapAst(ast, (node, index2, parentStack) => {
|
|
224262
224262
|
if (node.type === "list" && node.children.length > 0) {
|
|
224263
224263
|
for (let i = 0; i < parentStack.length; i++) {
|
|
224264
224264
|
const parent = parentStack[i];
|
|
@@ -224425,17 +224425,17 @@ ${extracted.content}`;
|
|
|
224425
224425
|
return printChildren(path, options, print);
|
|
224426
224426
|
case "word": {
|
|
224427
224427
|
let escapedValue = node.value.replace(/\*/g, "\\$&").replace(new RegExp([`(^|${punctuationPattern})(_+)`, `(_+)(${punctuationPattern}|$)`].join("|"), "g"), (_, text1, underscore1, underscore2, text22) => (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text22}`).replace(/_/g, "\\_"));
|
|
224428
|
-
const isFirstSentence = (node2, name2,
|
|
224429
|
-
const isLastChildAutolink = (node2, name2,
|
|
224430
|
-
if (escapedValue !== node.value && (path.match(void 0, isFirstSentence, isLastChildAutolink) || path.match(void 0, isFirstSentence, (node2, name2,
|
|
224428
|
+
const isFirstSentence = (node2, name2, index2) => node2.type === "sentence" && index2 === 0;
|
|
224429
|
+
const isLastChildAutolink = (node2, name2, index2) => isAutolink(node2.children[index2 - 1]);
|
|
224430
|
+
if (escapedValue !== node.value && (path.match(void 0, isFirstSentence, isLastChildAutolink) || path.match(void 0, isFirstSentence, (node2, name2, index2) => node2.type === "emphasis" && index2 === 0, isLastChildAutolink))) {
|
|
224431
224431
|
escapedValue = escapedValue.replace(/^(\\?[*_])+/, (prefix) => prefix.replace(/\\/g, ""));
|
|
224432
224432
|
}
|
|
224433
224433
|
return escapedValue;
|
|
224434
224434
|
}
|
|
224435
224435
|
case "whitespace": {
|
|
224436
224436
|
const parentNode = path.getParentNode();
|
|
224437
|
-
const
|
|
224438
|
-
const nextNode = parentNode.children[
|
|
224437
|
+
const index2 = parentNode.children.indexOf(node);
|
|
224438
|
+
const nextNode = parentNode.children[index2 + 1];
|
|
224439
224439
|
const proseWrap = nextNode && /^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(nextNode.value) ? "never" : options.proseWrap;
|
|
224440
224440
|
return printLine(path, node.value, {
|
|
224441
224441
|
proseWrap
|
|
@@ -224447,9 +224447,9 @@ ${extracted.content}`;
|
|
|
224447
224447
|
style = options.originalText[node.position.start.offset];
|
|
224448
224448
|
} else {
|
|
224449
224449
|
const parentNode = path.getParentNode();
|
|
224450
|
-
const
|
|
224451
|
-
const prevNode = parentNode.children[
|
|
224452
|
-
const nextNode = parentNode.children[
|
|
224450
|
+
const index2 = parentNode.children.indexOf(node);
|
|
224451
|
+
const prevNode = parentNode.children[index2 - 1];
|
|
224452
|
+
const nextNode = parentNode.children[index2 + 1];
|
|
224453
224453
|
const hasPrevOrNextWord = prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && getLast(prevNode.children).type === "word" && !getLast(prevNode.children).hasTrailingPunctuation || nextNode && nextNode.type === "sentence" && nextNode.children.length > 0 && nextNode.children[0].type === "word" && !nextNode.children[0].hasLeadingPunctuation;
|
|
224454
224454
|
style = hasPrevOrNextWord || getAncestorNode(path, "emphasis") ? "*" : "_";
|
|
224455
224455
|
}
|
|
@@ -224511,7 +224511,7 @@ ${extracted.content}`;
|
|
|
224511
224511
|
const nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
|
|
224512
224512
|
const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList(node, options);
|
|
224513
224513
|
return printChildren(path, options, print, {
|
|
224514
|
-
processor: (childPath,
|
|
224514
|
+
processor: (childPath, index2) => {
|
|
224515
224515
|
const prefix = getPrefix();
|
|
224516
224516
|
const childNode = childPath.getValue();
|
|
224517
224517
|
if (childNode.children.length === 2 && childNode.children[1].type === "html" && childNode.children[0].position.start.column !== childNode.children[1].position.start.column) {
|
|
@@ -224519,7 +224519,7 @@ ${extracted.content}`;
|
|
|
224519
224519
|
}
|
|
224520
224520
|
return [prefix, align(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))];
|
|
224521
224521
|
function getPrefix() {
|
|
224522
|
-
const rawPrefix = node.ordered ? (
|
|
224522
|
+
const rawPrefix = node.ordered ? (index2 === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index2) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
|
|
224523
224523
|
return node.isAligned || node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
|
|
224524
224524
|
}
|
|
224525
224525
|
}
|
|
@@ -224554,7 +224554,7 @@ ${extracted.content}`;
|
|
|
224554
224554
|
const nextNode = path.getParentNode().children[path.getName() + 1];
|
|
224555
224555
|
const shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
|
|
224556
224556
|
return ["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren(path, options, print) : group([align(" ".repeat(4), printChildren(path, options, print, {
|
|
224557
|
-
processor: (childPath,
|
|
224557
|
+
processor: (childPath, index2) => index2 === 0 ? group([softline, print()]) : print()
|
|
224558
224558
|
})), nextNode && nextNode.type === "footnoteDefinition" ? softline : ""])];
|
|
224559
224559
|
}
|
|
224560
224560
|
case "table":
|
|
@@ -224586,8 +224586,8 @@ ${extracted.content}`;
|
|
|
224586
224586
|
const node = path.getValue();
|
|
224587
224587
|
const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
|
|
224588
224588
|
return [prefix, printChildren(path, options, print, {
|
|
224589
|
-
processor: (childPath,
|
|
224590
|
-
if (
|
|
224589
|
+
processor: (childPath, index2) => {
|
|
224590
|
+
if (index2 === 0 && childPath.getValue().type !== "list") {
|
|
224591
224591
|
return align(" ".repeat(prefix.length), print());
|
|
224592
224592
|
}
|
|
224593
224593
|
const alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3));
|
|
@@ -224607,15 +224607,15 @@ ${extracted.content}`;
|
|
|
224607
224607
|
return getNthSiblingIndex(node, parentNode, (siblingNode) => siblingNode.ordered === node.ordered);
|
|
224608
224608
|
}
|
|
224609
224609
|
function getNthSiblingIndex(node, parentNode, condition) {
|
|
224610
|
-
let
|
|
224610
|
+
let index2 = -1;
|
|
224611
224611
|
for (const childNode of parentNode.children) {
|
|
224612
224612
|
if (childNode.type === node.type && condition(childNode)) {
|
|
224613
|
-
|
|
224613
|
+
index2++;
|
|
224614
224614
|
} else {
|
|
224615
|
-
|
|
224615
|
+
index2 = -1;
|
|
224616
224616
|
}
|
|
224617
224617
|
if (childNode === node) {
|
|
224618
|
-
return
|
|
224618
|
+
return index2;
|
|
224619
224619
|
}
|
|
224620
224620
|
}
|
|
224621
224621
|
}
|
|
@@ -224667,8 +224667,8 @@ ${extracted.content}`;
|
|
|
224667
224667
|
return join3(hardlineWithoutBreakParent, parts);
|
|
224668
224668
|
}
|
|
224669
224669
|
function printAlign(isCompact) {
|
|
224670
|
-
const align2 = columnMaxWidths.map((width,
|
|
224671
|
-
const align3 = node.align[
|
|
224670
|
+
const align2 = columnMaxWidths.map((width, index2) => {
|
|
224671
|
+
const align3 = node.align[index2];
|
|
224672
224672
|
const first = align3 === "center" || align3 === "left" ? ":" : "-";
|
|
224673
224673
|
const last = align3 === "center" || align3 === "right" ? ":" : "-";
|
|
224674
224674
|
const middle = isCompact ? "-" : "-".repeat(width - 2);
|
|
@@ -224704,12 +224704,12 @@ ${extracted.content}`;
|
|
|
224704
224704
|
const {
|
|
224705
224705
|
children
|
|
224706
224706
|
} = path.getValue();
|
|
224707
|
-
for (const [
|
|
224707
|
+
for (const [index2, childNode] of children.entries()) {
|
|
224708
224708
|
switch (isPrettierIgnore(childNode)) {
|
|
224709
224709
|
case "start":
|
|
224710
224710
|
if (ignoreStart === null) {
|
|
224711
224711
|
ignoreStart = {
|
|
224712
|
-
index:
|
|
224712
|
+
index: index2,
|
|
224713
224713
|
offset: childNode.position.end.offset
|
|
224714
224714
|
};
|
|
224715
224715
|
}
|
|
@@ -224719,7 +224719,7 @@ ${extracted.content}`;
|
|
|
224719
224719
|
ignoreRanges.push({
|
|
224720
224720
|
start: ignoreStart,
|
|
224721
224721
|
end: {
|
|
224722
|
-
index:
|
|
224722
|
+
index: index2,
|
|
224723
224723
|
offset: childNode.position.start.offset
|
|
224724
224724
|
}
|
|
224725
224725
|
});
|
|
@@ -224731,16 +224731,16 @@ ${extracted.content}`;
|
|
|
224731
224731
|
}
|
|
224732
224732
|
}
|
|
224733
224733
|
return printChildren(path, options, print, {
|
|
224734
|
-
processor: (childPath,
|
|
224734
|
+
processor: (childPath, index2) => {
|
|
224735
224735
|
if (ignoreRanges.length > 0) {
|
|
224736
224736
|
const ignoreRange = ignoreRanges[0];
|
|
224737
|
-
if (
|
|
224737
|
+
if (index2 === ignoreRange.start.index) {
|
|
224738
224738
|
return [children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value];
|
|
224739
224739
|
}
|
|
224740
|
-
if (ignoreRange.start.index <
|
|
224740
|
+
if (ignoreRange.start.index < index2 && index2 < ignoreRange.end.index) {
|
|
224741
224741
|
return false;
|
|
224742
224742
|
}
|
|
224743
|
-
if (
|
|
224743
|
+
if (index2 === ignoreRange.end.index) {
|
|
224744
224744
|
ignoreRanges.shift();
|
|
224745
224745
|
return false;
|
|
224746
224746
|
}
|
|
@@ -224757,9 +224757,9 @@ ${extracted.content}`;
|
|
|
224757
224757
|
const node = path.getValue();
|
|
224758
224758
|
const parts = [];
|
|
224759
224759
|
let lastChildNode;
|
|
224760
|
-
path.each((childPath,
|
|
224760
|
+
path.each((childPath, index2) => {
|
|
224761
224761
|
const childNode = childPath.getValue();
|
|
224762
|
-
const result = processor(childPath,
|
|
224762
|
+
const result = processor(childPath, index2);
|
|
224763
224763
|
if (result !== false) {
|
|
224764
224764
|
const data3 = {
|
|
224765
224765
|
parts,
|
|
@@ -224864,11 +224864,11 @@ ${extracted.content}`;
|
|
|
224864
224864
|
return value < min ? min : value > max ? max : value;
|
|
224865
224865
|
}
|
|
224866
224866
|
function hasPrettierIgnore(path) {
|
|
224867
|
-
const
|
|
224868
|
-
if (
|
|
224867
|
+
const index2 = Number(path.getName());
|
|
224868
|
+
if (index2 === 0) {
|
|
224869
224869
|
return false;
|
|
224870
224870
|
}
|
|
224871
|
-
const prevNode = path.getParentNode().children[
|
|
224871
|
+
const prevNode = path.getParentNode().children[index2 - 1];
|
|
224872
224872
|
return isPrettierIgnore(prevNode) === "next";
|
|
224873
224873
|
}
|
|
224874
224874
|
module2.exports = {
|
|
@@ -225742,12 +225742,12 @@ ${extracted.content}`;
|
|
|
225742
225742
|
}
|
|
225743
225743
|
function utf8Encode(str) {
|
|
225744
225744
|
let encoded = "";
|
|
225745
|
-
for (let
|
|
225746
|
-
let codePoint = str.charCodeAt(
|
|
225747
|
-
if (codePoint >= 55296 && codePoint <= 56319 && str.length >
|
|
225748
|
-
const low = str.charCodeAt(
|
|
225745
|
+
for (let index2 = 0; index2 < str.length; index2++) {
|
|
225746
|
+
let codePoint = str.charCodeAt(index2);
|
|
225747
|
+
if (codePoint >= 55296 && codePoint <= 56319 && str.length > index2 + 1) {
|
|
225748
|
+
const low = str.charCodeAt(index2 + 1);
|
|
225749
225749
|
if (low >= 56320 && low <= 57343) {
|
|
225750
|
-
|
|
225750
|
+
index2++;
|
|
225751
225751
|
codePoint = (codePoint - 55296 << 10) + low - 56320 + 65536;
|
|
225752
225752
|
}
|
|
225753
225753
|
}
|
|
@@ -226686,10 +226686,10 @@ ${extracted.content}`;
|
|
|
226686
226686
|
child.isLeadingSpaceSensitive = isLeadingSpaceSensitiveNode(child, options);
|
|
226687
226687
|
child.isTrailingSpaceSensitive = isTrailingSpaceSensitiveNode(child, options);
|
|
226688
226688
|
}
|
|
226689
|
-
for (let
|
|
226690
|
-
const child = children[
|
|
226691
|
-
child.isLeadingSpaceSensitive =
|
|
226692
|
-
child.isTrailingSpaceSensitive =
|
|
226689
|
+
for (let index2 = 0; index2 < children.length; index2++) {
|
|
226690
|
+
const child = children[index2];
|
|
226691
|
+
child.isLeadingSpaceSensitive = index2 === 0 ? child.isLeadingSpaceSensitive : child.prev.isTrailingSpaceSensitive && child.isLeadingSpaceSensitive;
|
|
226692
|
+
child.isTrailingSpaceSensitive = index2 === children.length - 1 ? child.isTrailingSpaceSensitive : child.next.isLeadingSpaceSensitive && child.isTrailingSpaceSensitive;
|
|
226693
226693
|
}
|
|
226694
226694
|
});
|
|
226695
226695
|
}
|
|
@@ -227129,16 +227129,16 @@ ${extracted.content}`;
|
|
|
227129
227129
|
const maxUrlLength = getMax(urls.map((url) => url.length));
|
|
227130
227130
|
const descriptors = srcset.map((src) => src[key]).map((descriptor) => descriptor ? descriptor.toString() : "");
|
|
227131
227131
|
const descriptorLeftLengths = descriptors.map((descriptor) => {
|
|
227132
|
-
const
|
|
227133
|
-
return
|
|
227132
|
+
const index2 = descriptor.indexOf(".");
|
|
227133
|
+
return index2 === -1 ? descriptor.length : index2;
|
|
227134
227134
|
});
|
|
227135
227135
|
const maxDescriptorLeftLength = getMax(descriptorLeftLengths);
|
|
227136
|
-
return join3([",", line2], urls.map((url,
|
|
227136
|
+
return join3([",", line2], urls.map((url, index2) => {
|
|
227137
227137
|
const parts = [url];
|
|
227138
|
-
const descriptor = descriptors[
|
|
227138
|
+
const descriptor = descriptors[index2];
|
|
227139
227139
|
if (descriptor) {
|
|
227140
227140
|
const urlPadding = maxUrlLength - url.length + 1;
|
|
227141
|
-
const descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[
|
|
227141
|
+
const descriptorPadding = maxDescriptorLeftLength - descriptorLeftLengths[index2];
|
|
227142
227142
|
const alignment = " ".repeat(urlPadding + descriptorPadding);
|
|
227143
227143
|
parts.push(ifBreak(alignment, " "), descriptor + unit);
|
|
227144
227144
|
}
|
|
@@ -227202,7 +227202,7 @@ ${extracted.content}`;
|
|
|
227202
227202
|
res.alias = alias;
|
|
227203
227203
|
}
|
|
227204
227204
|
const left = [res.alias, res.iterator1, res.iterator2];
|
|
227205
|
-
if (left.some((part,
|
|
227205
|
+
if (left.some((part, index2) => !part && (index2 === 0 || left.slice(index2 + 1).some(Boolean)))) {
|
|
227206
227206
|
return;
|
|
227207
227207
|
}
|
|
227208
227208
|
return {
|
|
@@ -227398,8 +227398,8 @@ ${extracted.content}`;
|
|
|
227398
227398
|
const value = getValue();
|
|
227399
227399
|
if (interpolationRegex.test(value)) {
|
|
227400
227400
|
const parts = [];
|
|
227401
|
-
for (const [
|
|
227402
|
-
if (
|
|
227401
|
+
for (const [index2, part] of value.split(interpolationRegex).entries()) {
|
|
227402
|
+
if (index2 % 2 === 0) {
|
|
227403
227403
|
parts.push(replaceTextEndOfLine(part));
|
|
227404
227404
|
} else {
|
|
227405
227405
|
try {
|
|
@@ -228141,11 +228141,11 @@ ${text8}`;
|
|
|
228141
228141
|
return parts;
|
|
228142
228142
|
}
|
|
228143
228143
|
function getFlowScalarLineContents(nodeType, content4, options) {
|
|
228144
|
-
const rawLineContents = content4.split("\n").map((lineContent,
|
|
228144
|
+
const rawLineContents = content4.split("\n").map((lineContent, index2, lineContents) => index2 === 0 && index2 === lineContents.length - 1 ? lineContent : index2 !== 0 && index2 !== lineContents.length - 1 ? lineContent.trim() : index2 === 0 ? lineContent.trimEnd() : lineContent.trimStart());
|
|
228145
228145
|
if (options.proseWrap === "preserve") {
|
|
228146
228146
|
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : [lineContent]);
|
|
228147
228147
|
}
|
|
228148
|
-
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords,
|
|
228148
|
+
return rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index2) => index2 !== 0 && rawLineContents[index2 - 1].length > 0 && lineContentWords.length > 0 && !(nodeType === "quoteDouble" && getLast(getLast(reduced)).endsWith("\\")) ? [...reduced.slice(0, -1), [...getLast(reduced), ...lineContentWords]] : [...reduced, lineContentWords], []).map((lineContentWords) => options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords);
|
|
228149
228149
|
}
|
|
228150
228150
|
function getBlockValueLineContents(node, {
|
|
228151
228151
|
parentIndent,
|
|
@@ -228164,7 +228164,7 @@ ${text8}`;
|
|
|
228164
228164
|
if (options.proseWrap === "preserve" || node.type === "blockLiteral") {
|
|
228165
228165
|
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : [lineContent]));
|
|
228166
228166
|
}
|
|
228167
|
-
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords,
|
|
228167
|
+
return removeUnnecessaryTrailingNewlines(rawLineContents.map((lineContent) => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index2) => index2 !== 0 && rawLineContents[index2 - 1].length > 0 && lineContentWords.length > 0 && !/^\s/.test(lineContentWords[0]) && !/^\s|\s$/.test(getLast(reduced)) ? [...reduced.slice(0, -1), [...getLast(reduced), ...lineContentWords]] : [...reduced, lineContentWords], []).map((lineContentWords) => lineContentWords.reduce((reduced, word) => reduced.length > 0 && /\s$/.test(getLast(reduced)) ? [...reduced.slice(0, -1), getLast(reduced) + " " + word] : [...reduced, word], [])).map((lineContentWords) => options.proseWrap === "never" ? [lineContentWords.join(" ")] : lineContentWords));
|
|
228168
228168
|
function removeUnnecessaryTrailingNewlines(lineContents) {
|
|
228169
228169
|
if (node.chomping === "keep") {
|
|
228170
228170
|
return getLast(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents;
|
|
@@ -228334,7 +228334,7 @@ ${text8}`;
|
|
|
228334
228334
|
}
|
|
228335
228335
|
function printChildren(path, print, options) {
|
|
228336
228336
|
const node = path.getValue();
|
|
228337
|
-
const parts = path.map((childPath,
|
|
228337
|
+
const parts = path.map((childPath, index2) => [print(), index2 === node.children.length - 1 ? "" : [",", line2, node.children[index2].position.start.line !== node.children[index2 + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : ""]], "children");
|
|
228338
228338
|
return parts;
|
|
228339
228339
|
}
|
|
228340
228340
|
module2.exports = {
|
|
@@ -228517,12 +228517,12 @@ ${text8}`;
|
|
|
228517
228517
|
options
|
|
228518
228518
|
});
|
|
228519
228519
|
const contentsParts = [];
|
|
228520
|
-
for (const [
|
|
228521
|
-
if (
|
|
228520
|
+
for (const [index2, lineWords] of lineContents.entries()) {
|
|
228521
|
+
if (index2 === 0) {
|
|
228522
228522
|
contentsParts.push(hardline);
|
|
228523
228523
|
}
|
|
228524
228524
|
contentsParts.push(fill(getDocParts(join3(line2, lineWords))));
|
|
228525
|
-
if (
|
|
228525
|
+
if (index2 !== lineContents.length - 1) {
|
|
228526
228526
|
contentsParts.push(lineWords.length === 0 ? hardline : markAsRoot(literalline));
|
|
228527
228527
|
} else if (node.chomping === "keep" && isLastDescendant) {
|
|
228528
228528
|
contentsParts.push(dedentToRoot(lineWords.length === 0 ? hardline : literalline));
|
|
@@ -228647,10 +228647,10 @@ ${text8}`;
|
|
|
228647
228647
|
children
|
|
228648
228648
|
} = node;
|
|
228649
228649
|
const parts = [];
|
|
228650
|
-
path.each((childPath,
|
|
228651
|
-
const document6 = children[
|
|
228652
|
-
const nextDocument = children[
|
|
228653
|
-
if (
|
|
228650
|
+
path.each((childPath, index2) => {
|
|
228651
|
+
const document6 = children[index2];
|
|
228652
|
+
const nextDocument = children[index2 + 1];
|
|
228653
|
+
if (index2 !== 0) {
|
|
228654
228654
|
parts.push(hardline);
|
|
228655
228655
|
}
|
|
228656
228656
|
parts.push(print());
|
|
@@ -229073,14 +229073,14 @@ function trough() {
|
|
|
229073
229073
|
next(null, ...values2);
|
|
229074
229074
|
function next(error, ...output) {
|
|
229075
229075
|
const fn = fns[++middlewareIndex];
|
|
229076
|
-
let
|
|
229076
|
+
let index2 = -1;
|
|
229077
229077
|
if (error) {
|
|
229078
229078
|
callback(error);
|
|
229079
229079
|
return;
|
|
229080
229080
|
}
|
|
229081
|
-
while (++
|
|
229082
|
-
if (output[
|
|
229083
|
-
output[
|
|
229081
|
+
while (++index2 < values2.length) {
|
|
229082
|
+
if (output[index2] === null || output[index2] === void 0) {
|
|
229083
|
+
output[index2] = values2[index2];
|
|
229084
229084
|
}
|
|
229085
229085
|
}
|
|
229086
229086
|
values2 = output;
|
|
@@ -229159,8 +229159,8 @@ function stringifyPosition(value) {
|
|
|
229159
229159
|
}
|
|
229160
229160
|
return "";
|
|
229161
229161
|
}
|
|
229162
|
-
function point(
|
|
229163
|
-
return index(
|
|
229162
|
+
function point(point3) {
|
|
229163
|
+
return index(point3 && point3.line) + ":" + index(point3 && point3.column);
|
|
229164
229164
|
}
|
|
229165
229165
|
function position(pos) {
|
|
229166
229166
|
return point(pos && pos.start) + "-" + point(pos && pos.end);
|
|
@@ -229173,7 +229173,7 @@ function index(value) {
|
|
|
229173
229173
|
var VFileMessage = class extends Error {
|
|
229174
229174
|
constructor(reason, place, origin) {
|
|
229175
229175
|
const parts = [null, null];
|
|
229176
|
-
let
|
|
229176
|
+
let position2 = {
|
|
229177
229177
|
start: { line: null, column: null },
|
|
229178
229178
|
end: { line: null, column: null }
|
|
229179
229179
|
};
|
|
@@ -229183,23 +229183,23 @@ var VFileMessage = class extends Error {
|
|
|
229183
229183
|
place = void 0;
|
|
229184
229184
|
}
|
|
229185
229185
|
if (typeof origin === "string") {
|
|
229186
|
-
const
|
|
229187
|
-
if (
|
|
229186
|
+
const index2 = origin.indexOf(":");
|
|
229187
|
+
if (index2 === -1) {
|
|
229188
229188
|
parts[1] = origin;
|
|
229189
229189
|
} else {
|
|
229190
|
-
parts[0] = origin.slice(0,
|
|
229191
|
-
parts[1] = origin.slice(
|
|
229190
|
+
parts[0] = origin.slice(0, index2);
|
|
229191
|
+
parts[1] = origin.slice(index2 + 1);
|
|
229192
229192
|
}
|
|
229193
229193
|
}
|
|
229194
229194
|
if (place) {
|
|
229195
229195
|
if ("type" in place || "position" in place) {
|
|
229196
229196
|
if (place.position) {
|
|
229197
|
-
|
|
229197
|
+
position2 = place.position;
|
|
229198
229198
|
}
|
|
229199
229199
|
} else if ("start" in place || "end" in place) {
|
|
229200
|
-
|
|
229200
|
+
position2 = place;
|
|
229201
229201
|
} else if ("line" in place || "column" in place) {
|
|
229202
|
-
|
|
229202
|
+
position2.start = place;
|
|
229203
229203
|
}
|
|
229204
229204
|
}
|
|
229205
229205
|
this.name = stringifyPosition(place) || "1:1";
|
|
@@ -229210,9 +229210,9 @@ var VFileMessage = class extends Error {
|
|
|
229210
229210
|
}
|
|
229211
229211
|
this.reason = this.message;
|
|
229212
229212
|
this.fatal;
|
|
229213
|
-
this.line =
|
|
229214
|
-
this.column =
|
|
229215
|
-
this.position =
|
|
229213
|
+
this.line = position2.start.line;
|
|
229214
|
+
this.column = position2.start.column;
|
|
229215
|
+
this.position = position2;
|
|
229216
229216
|
this.source = parts[0];
|
|
229217
229217
|
this.ruleId = parts[1];
|
|
229218
229218
|
this.file;
|
|
@@ -229270,9 +229270,9 @@ var VFile = class {
|
|
|
229270
229270
|
this.stored;
|
|
229271
229271
|
this.result;
|
|
229272
229272
|
this.map;
|
|
229273
|
-
let
|
|
229274
|
-
while (++
|
|
229275
|
-
const prop2 = order[
|
|
229273
|
+
let index2 = -1;
|
|
229274
|
+
while (++index2 < order.length) {
|
|
229275
|
+
const prop2 = order[index2];
|
|
229276
229276
|
if (prop2 in options && options[prop2] !== void 0) {
|
|
229277
229277
|
this[prop2] = prop2 === "history" ? [...options[prop2]] : options[prop2];
|
|
229278
229278
|
}
|
|
@@ -229400,9 +229400,9 @@ function base() {
|
|
|
229400
229400
|
return processor;
|
|
229401
229401
|
function processor() {
|
|
229402
229402
|
const destination = base();
|
|
229403
|
-
let
|
|
229404
|
-
while (++
|
|
229405
|
-
destination.use(...attachers[
|
|
229403
|
+
let index2 = -1;
|
|
229404
|
+
while (++index2 < attachers.length) {
|
|
229405
|
+
destination.use(...attachers[index2]);
|
|
229406
229406
|
}
|
|
229407
229407
|
destination.data((0, import_extend.default)(true, {}, namespace));
|
|
229408
229408
|
return destination;
|
|
@@ -229484,11 +229484,11 @@ function base() {
|
|
|
229484
229484
|
}
|
|
229485
229485
|
}
|
|
229486
229486
|
function addList(plugins) {
|
|
229487
|
-
let
|
|
229487
|
+
let index2 = -1;
|
|
229488
229488
|
if (plugins === null || plugins === void 0) {
|
|
229489
229489
|
} else if (Array.isArray(plugins)) {
|
|
229490
|
-
while (++
|
|
229491
|
-
const thing = plugins[
|
|
229490
|
+
while (++index2 < plugins.length) {
|
|
229491
|
+
const thing = plugins[index2];
|
|
229492
229492
|
add(thing);
|
|
229493
229493
|
}
|
|
229494
229494
|
} else {
|
|
@@ -229496,11 +229496,11 @@ function base() {
|
|
|
229496
229496
|
}
|
|
229497
229497
|
}
|
|
229498
229498
|
function addPlugin(plugin, value2) {
|
|
229499
|
-
let
|
|
229499
|
+
let index2 = -1;
|
|
229500
229500
|
let entry;
|
|
229501
|
-
while (++
|
|
229502
|
-
if (attachers[
|
|
229503
|
-
entry = attachers[
|
|
229501
|
+
while (++index2 < attachers.length) {
|
|
229502
|
+
if (attachers[index2][0] === plugin) {
|
|
229503
|
+
entry = attachers[index2];
|
|
229504
229504
|
break;
|
|
229505
229505
|
}
|
|
229506
229506
|
}
|
|
@@ -229685,9 +229685,9 @@ function one(node, includeImageAlt) {
|
|
|
229685
229685
|
}
|
|
229686
229686
|
function all(values2, includeImageAlt) {
|
|
229687
229687
|
var result = [];
|
|
229688
|
-
var
|
|
229689
|
-
while (++
|
|
229690
|
-
result[
|
|
229688
|
+
var index2 = -1;
|
|
229689
|
+
while (++index2 < values2.length) {
|
|
229690
|
+
result[index2] = one(values2[index2], includeImageAlt);
|
|
229691
229691
|
}
|
|
229692
229692
|
return result.join("");
|
|
229693
229693
|
}
|
|
@@ -229731,9 +229731,9 @@ function push(list3, items) {
|
|
|
229731
229731
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
229732
229732
|
function combineExtensions(extensions) {
|
|
229733
229733
|
const all2 = {};
|
|
229734
|
-
let
|
|
229735
|
-
while (++
|
|
229736
|
-
syntaxExtension(all2, extensions[
|
|
229734
|
+
let index2 = -1;
|
|
229735
|
+
while (++index2 < extensions.length) {
|
|
229736
|
+
syntaxExtension(all2, extensions[index2]);
|
|
229737
229737
|
}
|
|
229738
229738
|
return all2;
|
|
229739
229739
|
}
|
|
@@ -229756,11 +229756,11 @@ function syntaxExtension(all2, extension3) {
|
|
|
229756
229756
|
}
|
|
229757
229757
|
}
|
|
229758
229758
|
function constructs(existing, list3) {
|
|
229759
|
-
let
|
|
229759
|
+
let index2 = -1;
|
|
229760
229760
|
const before = [];
|
|
229761
|
-
while (++
|
|
229761
|
+
while (++index2 < list3.length) {
|
|
229762
229762
|
;
|
|
229763
|
-
(list3[
|
|
229763
|
+
(list3[index2].add === "after" ? existing : before).push(list3[index2]);
|
|
229764
229764
|
}
|
|
229765
229765
|
splice(existing, 0, 0, before);
|
|
229766
229766
|
}
|
|
@@ -229908,18 +229908,18 @@ function initializeDocument(effects) {
|
|
|
229908
229908
|
}
|
|
229909
229909
|
const indexBeforeExits = self2.events.length;
|
|
229910
229910
|
let indexBeforeFlow = indexBeforeExits;
|
|
229911
|
-
let
|
|
229911
|
+
let point3;
|
|
229912
229912
|
while (indexBeforeFlow--) {
|
|
229913
229913
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
229914
|
-
|
|
229914
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
229915
229915
|
break;
|
|
229916
229916
|
}
|
|
229917
229917
|
}
|
|
229918
229918
|
exitContainers(continued);
|
|
229919
|
-
let
|
|
229920
|
-
while (
|
|
229921
|
-
self2.events[
|
|
229922
|
-
|
|
229919
|
+
let index2 = indexBeforeExits;
|
|
229920
|
+
while (index2 < self2.events.length) {
|
|
229921
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
229922
|
+
index2++;
|
|
229923
229923
|
}
|
|
229924
229924
|
splice(
|
|
229925
229925
|
self2.events,
|
|
@@ -229927,7 +229927,7 @@ function initializeDocument(effects) {
|
|
|
229927
229927
|
0,
|
|
229928
229928
|
self2.events.slice(indexBeforeExits)
|
|
229929
229929
|
);
|
|
229930
|
-
self2.events.length =
|
|
229930
|
+
self2.events.length = index2;
|
|
229931
229931
|
return checkNewContainers(code2);
|
|
229932
229932
|
}
|
|
229933
229933
|
return start3(code2);
|
|
@@ -230019,30 +230019,30 @@ function initializeDocument(effects) {
|
|
|
230019
230019
|
childFlow.defineSkip(token.start);
|
|
230020
230020
|
childFlow.write(stream);
|
|
230021
230021
|
if (self2.parser.lazy[token.start.line]) {
|
|
230022
|
-
let
|
|
230023
|
-
while (
|
|
230024
|
-
if (childFlow.events[
|
|
230022
|
+
let index2 = childFlow.events.length;
|
|
230023
|
+
while (index2--) {
|
|
230024
|
+
if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
|
|
230025
230025
|
return;
|
|
230026
230026
|
}
|
|
230027
230027
|
}
|
|
230028
230028
|
const indexBeforeExits = self2.events.length;
|
|
230029
230029
|
let indexBeforeFlow = indexBeforeExits;
|
|
230030
230030
|
let seen;
|
|
230031
|
-
let
|
|
230031
|
+
let point3;
|
|
230032
230032
|
while (indexBeforeFlow--) {
|
|
230033
230033
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
230034
230034
|
if (seen) {
|
|
230035
|
-
|
|
230035
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
230036
230036
|
break;
|
|
230037
230037
|
}
|
|
230038
230038
|
seen = true;
|
|
230039
230039
|
}
|
|
230040
230040
|
}
|
|
230041
230041
|
exitContainers(continued);
|
|
230042
|
-
|
|
230043
|
-
while (
|
|
230044
|
-
self2.events[
|
|
230045
|
-
|
|
230042
|
+
index2 = indexBeforeExits;
|
|
230043
|
+
while (index2 < self2.events.length) {
|
|
230044
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
230045
|
+
index2++;
|
|
230046
230046
|
}
|
|
230047
230047
|
splice(
|
|
230048
230048
|
self2.events,
|
|
@@ -230050,13 +230050,13 @@ function initializeDocument(effects) {
|
|
|
230050
230050
|
0,
|
|
230051
230051
|
self2.events.slice(indexBeforeExits)
|
|
230052
230052
|
);
|
|
230053
|
-
self2.events.length =
|
|
230053
|
+
self2.events.length = index2;
|
|
230054
230054
|
}
|
|
230055
230055
|
}
|
|
230056
230056
|
function exitContainers(size) {
|
|
230057
|
-
let
|
|
230058
|
-
while (
|
|
230059
|
-
const entry = stack[
|
|
230057
|
+
let index2 = stack.length;
|
|
230058
|
+
while (index2-- > size) {
|
|
230059
|
+
const entry = stack[index2];
|
|
230060
230060
|
self2.containerState = entry[1];
|
|
230061
230061
|
entry[0].exit.call(self2, effects);
|
|
230062
230062
|
}
|
|
@@ -230091,9 +230091,9 @@ function classifyCharacter(code2) {
|
|
|
230091
230091
|
// ../../../node_modules/.pnpm/micromark-util-resolve-all@1.0.0/node_modules/micromark-util-resolve-all/index.js
|
|
230092
230092
|
function resolveAll(constructs2, events, context) {
|
|
230093
230093
|
const called = [];
|
|
230094
|
-
let
|
|
230095
|
-
while (++
|
|
230096
|
-
const resolve = constructs2[
|
|
230094
|
+
let index2 = -1;
|
|
230095
|
+
while (++index2 < constructs2.length) {
|
|
230096
|
+
const resolve = constructs2[index2].resolveAll;
|
|
230097
230097
|
if (resolve && !called.includes(resolve)) {
|
|
230098
230098
|
events = resolve(events, context);
|
|
230099
230099
|
called.push(resolve);
|
|
@@ -230109,7 +230109,7 @@ var attention = {
|
|
|
230109
230109
|
resolveAll: resolveAllAttention
|
|
230110
230110
|
};
|
|
230111
230111
|
function resolveAllAttention(events, context) {
|
|
230112
|
-
let
|
|
230112
|
+
let index2 = -1;
|
|
230113
230113
|
let open;
|
|
230114
230114
|
let group;
|
|
230115
230115
|
let text8;
|
|
@@ -230118,17 +230118,17 @@ function resolveAllAttention(events, context) {
|
|
|
230118
230118
|
let use;
|
|
230119
230119
|
let nextEvents;
|
|
230120
230120
|
let offset3;
|
|
230121
|
-
while (++
|
|
230122
|
-
if (events[
|
|
230123
|
-
open =
|
|
230121
|
+
while (++index2 < events.length) {
|
|
230122
|
+
if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) {
|
|
230123
|
+
open = index2;
|
|
230124
230124
|
while (open--) {
|
|
230125
|
-
if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[
|
|
230126
|
-
if ((events[open][1]._close || events[
|
|
230125
|
+
if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) {
|
|
230126
|
+
if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) {
|
|
230127
230127
|
continue;
|
|
230128
230128
|
}
|
|
230129
|
-
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[
|
|
230129
|
+
use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1;
|
|
230130
230130
|
const start3 = Object.assign({}, events[open][1].end);
|
|
230131
|
-
const end = Object.assign({}, events[
|
|
230131
|
+
const end = Object.assign({}, events[index2][1].start);
|
|
230132
230132
|
movePoint(start3, -use);
|
|
230133
230133
|
movePoint(end, use);
|
|
230134
230134
|
openingSequence = {
|
|
@@ -230138,13 +230138,13 @@ function resolveAllAttention(events, context) {
|
|
|
230138
230138
|
};
|
|
230139
230139
|
closingSequence = {
|
|
230140
230140
|
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
230141
|
-
start: Object.assign({}, events[
|
|
230141
|
+
start: Object.assign({}, events[index2][1].start),
|
|
230142
230142
|
end
|
|
230143
230143
|
};
|
|
230144
230144
|
text8 = {
|
|
230145
230145
|
type: use > 1 ? "strongText" : "emphasisText",
|
|
230146
230146
|
start: Object.assign({}, events[open][1].end),
|
|
230147
|
-
end: Object.assign({}, events[
|
|
230147
|
+
end: Object.assign({}, events[index2][1].start)
|
|
230148
230148
|
};
|
|
230149
230149
|
group = {
|
|
230150
230150
|
type: use > 1 ? "strong" : "emphasis",
|
|
@@ -230152,7 +230152,7 @@ function resolveAllAttention(events, context) {
|
|
|
230152
230152
|
end: Object.assign({}, closingSequence.end)
|
|
230153
230153
|
};
|
|
230154
230154
|
events[open][1].end = Object.assign({}, openingSequence.start);
|
|
230155
|
-
events[
|
|
230155
|
+
events[index2][1].start = Object.assign({}, closingSequence.end);
|
|
230156
230156
|
nextEvents = [];
|
|
230157
230157
|
if (events[open][1].end.offset - events[open][1].start.offset) {
|
|
230158
230158
|
nextEvents = push(nextEvents, [
|
|
@@ -230170,7 +230170,7 @@ function resolveAllAttention(events, context) {
|
|
|
230170
230170
|
nextEvents,
|
|
230171
230171
|
resolveAll(
|
|
230172
230172
|
context.parser.constructs.insideSpan.null,
|
|
230173
|
-
events.slice(open + 1,
|
|
230173
|
+
events.slice(open + 1, index2),
|
|
230174
230174
|
context
|
|
230175
230175
|
)
|
|
230176
230176
|
);
|
|
@@ -230180,26 +230180,26 @@ function resolveAllAttention(events, context) {
|
|
|
230180
230180
|
["exit", closingSequence, context],
|
|
230181
230181
|
["exit", group, context]
|
|
230182
230182
|
]);
|
|
230183
|
-
if (events[
|
|
230183
|
+
if (events[index2][1].end.offset - events[index2][1].start.offset) {
|
|
230184
230184
|
offset3 = 2;
|
|
230185
230185
|
nextEvents = push(nextEvents, [
|
|
230186
|
-
["enter", events[
|
|
230187
|
-
["exit", events[
|
|
230186
|
+
["enter", events[index2][1], context],
|
|
230187
|
+
["exit", events[index2][1], context]
|
|
230188
230188
|
]);
|
|
230189
230189
|
} else {
|
|
230190
230190
|
offset3 = 0;
|
|
230191
230191
|
}
|
|
230192
|
-
splice(events, open - 1,
|
|
230193
|
-
|
|
230192
|
+
splice(events, open - 1, index2 - open + 3, nextEvents);
|
|
230193
|
+
index2 = open + nextEvents.length - offset3 - 2;
|
|
230194
230194
|
break;
|
|
230195
230195
|
}
|
|
230196
230196
|
}
|
|
230197
230197
|
}
|
|
230198
230198
|
}
|
|
230199
|
-
|
|
230200
|
-
while (++
|
|
230201
|
-
if (events[
|
|
230202
|
-
events[
|
|
230199
|
+
index2 = -1;
|
|
230200
|
+
while (++index2 < events.length) {
|
|
230201
|
+
if (events[index2][1].type === "attentionSequence") {
|
|
230202
|
+
events[index2][1].type = "data";
|
|
230203
230203
|
}
|
|
230204
230204
|
}
|
|
230205
230205
|
return events;
|
|
@@ -230229,10 +230229,10 @@ function tokenizeAttention(effects, ok3) {
|
|
|
230229
230229
|
return ok3(code2);
|
|
230230
230230
|
}
|
|
230231
230231
|
}
|
|
230232
|
-
function movePoint(
|
|
230233
|
-
|
|
230234
|
-
|
|
230235
|
-
|
|
230232
|
+
function movePoint(point3, offset3) {
|
|
230233
|
+
point3.column += offset3;
|
|
230234
|
+
point3.offset += offset3;
|
|
230235
|
+
point3._bufferIndex += offset3;
|
|
230236
230236
|
}
|
|
230237
230237
|
|
|
230238
230238
|
// ../../../node_modules/.pnpm/micromark-core-commonmark@1.0.6/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
@@ -232857,12 +232857,12 @@ var codeText = {
|
|
|
232857
232857
|
function resolveCodeText(events) {
|
|
232858
232858
|
let tailExitIndex = events.length - 4;
|
|
232859
232859
|
let headEnterIndex = 3;
|
|
232860
|
-
let
|
|
232860
|
+
let index2;
|
|
232861
232861
|
let enter;
|
|
232862
232862
|
if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
|
|
232863
|
-
|
|
232864
|
-
while (++
|
|
232865
|
-
if (events[
|
|
232863
|
+
index2 = headEnterIndex;
|
|
232864
|
+
while (++index2 < tailExitIndex) {
|
|
232865
|
+
if (events[index2][1].type === "codeTextData") {
|
|
232866
232866
|
events[headEnterIndex][1].type = "codeTextPadding";
|
|
232867
232867
|
events[tailExitIndex][1].type = "codeTextPadding";
|
|
232868
232868
|
headEnterIndex += 2;
|
|
@@ -232871,20 +232871,20 @@ function resolveCodeText(events) {
|
|
|
232871
232871
|
}
|
|
232872
232872
|
}
|
|
232873
232873
|
}
|
|
232874
|
-
|
|
232874
|
+
index2 = headEnterIndex - 1;
|
|
232875
232875
|
tailExitIndex++;
|
|
232876
|
-
while (++
|
|
232876
|
+
while (++index2 <= tailExitIndex) {
|
|
232877
232877
|
if (enter === void 0) {
|
|
232878
|
-
if (
|
|
232879
|
-
enter =
|
|
232878
|
+
if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") {
|
|
232879
|
+
enter = index2;
|
|
232880
232880
|
}
|
|
232881
|
-
} else if (
|
|
232881
|
+
} else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") {
|
|
232882
232882
|
events[enter][1].type = "codeTextData";
|
|
232883
|
-
if (
|
|
232884
|
-
events[enter][1].end = events[
|
|
232885
|
-
events.splice(enter + 2,
|
|
232886
|
-
tailExitIndex -=
|
|
232887
|
-
|
|
232883
|
+
if (index2 !== enter + 2) {
|
|
232884
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
232885
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
232886
|
+
tailExitIndex -= index2 - enter - 2;
|
|
232887
|
+
index2 = enter + 2;
|
|
232888
232888
|
}
|
|
232889
232889
|
enter = void 0;
|
|
232890
232890
|
}
|
|
@@ -232965,7 +232965,7 @@ function tokenizeCodeText(effects, ok3, nok) {
|
|
|
232965
232965
|
// ../../../node_modules/.pnpm/micromark-util-subtokenize@1.0.2/node_modules/micromark-util-subtokenize/index.js
|
|
232966
232966
|
function subtokenize(events) {
|
|
232967
232967
|
const jumps = {};
|
|
232968
|
-
let
|
|
232968
|
+
let index2 = -1;
|
|
232969
232969
|
let event;
|
|
232970
232970
|
let lineIndex;
|
|
232971
232971
|
let otherIndex;
|
|
@@ -232973,12 +232973,12 @@ function subtokenize(events) {
|
|
|
232973
232973
|
let parameters;
|
|
232974
232974
|
let subevents;
|
|
232975
232975
|
let more;
|
|
232976
|
-
while (++
|
|
232977
|
-
while (
|
|
232978
|
-
|
|
232976
|
+
while (++index2 < events.length) {
|
|
232977
|
+
while (index2 in jumps) {
|
|
232978
|
+
index2 = jumps[index2];
|
|
232979
232979
|
}
|
|
232980
|
-
event = events[
|
|
232981
|
-
if (
|
|
232980
|
+
event = events[index2];
|
|
232981
|
+
if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") {
|
|
232982
232982
|
subevents = event[1]._tokenizer.events;
|
|
232983
232983
|
otherIndex = 0;
|
|
232984
232984
|
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
|
|
@@ -232998,12 +232998,12 @@ function subtokenize(events) {
|
|
|
232998
232998
|
}
|
|
232999
232999
|
if (event[0] === "enter") {
|
|
233000
233000
|
if (event[1].contentType) {
|
|
233001
|
-
Object.assign(jumps, subcontent(events,
|
|
233002
|
-
|
|
233001
|
+
Object.assign(jumps, subcontent(events, index2));
|
|
233002
|
+
index2 = jumps[index2];
|
|
233003
233003
|
more = true;
|
|
233004
233004
|
}
|
|
233005
233005
|
} else if (event[1]._container) {
|
|
233006
|
-
otherIndex =
|
|
233006
|
+
otherIndex = index2;
|
|
233007
233007
|
lineIndex = void 0;
|
|
233008
233008
|
while (otherIndex--) {
|
|
233009
233009
|
otherEvent = events[otherIndex];
|
|
@@ -233021,9 +233021,9 @@ function subtokenize(events) {
|
|
|
233021
233021
|
}
|
|
233022
233022
|
if (lineIndex) {
|
|
233023
233023
|
event[1].end = Object.assign({}, events[lineIndex][1].start);
|
|
233024
|
-
parameters = events.slice(lineIndex,
|
|
233024
|
+
parameters = events.slice(lineIndex, index2);
|
|
233025
233025
|
parameters.unshift(event);
|
|
233026
|
-
splice(events, lineIndex,
|
|
233026
|
+
splice(events, lineIndex, index2 - lineIndex + 1, parameters);
|
|
233027
233027
|
}
|
|
233028
233028
|
}
|
|
233029
233029
|
}
|
|
@@ -233040,7 +233040,7 @@ function subcontent(events, eventIndex) {
|
|
|
233040
233040
|
const gaps = {};
|
|
233041
233041
|
let stream;
|
|
233042
233042
|
let previous2;
|
|
233043
|
-
let
|
|
233043
|
+
let index2 = -1;
|
|
233044
233044
|
let current3 = token;
|
|
233045
233045
|
let adjust = 0;
|
|
233046
233046
|
let start3 = 0;
|
|
@@ -233069,9 +233069,9 @@ function subcontent(events, eventIndex) {
|
|
|
233069
233069
|
current3 = current3.next;
|
|
233070
233070
|
}
|
|
233071
233071
|
current3 = token;
|
|
233072
|
-
while (++
|
|
233073
|
-
if (childEvents[
|
|
233074
|
-
start3 =
|
|
233072
|
+
while (++index2 < childEvents.length) {
|
|
233073
|
+
if (childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line) {
|
|
233074
|
+
start3 = index2 + 1;
|
|
233075
233075
|
breaks.push(start3);
|
|
233076
233076
|
current3._tokenizer = void 0;
|
|
233077
233077
|
current3.previous = void 0;
|
|
@@ -233085,17 +233085,17 @@ function subcontent(events, eventIndex) {
|
|
|
233085
233085
|
} else {
|
|
233086
233086
|
breaks.pop();
|
|
233087
233087
|
}
|
|
233088
|
-
|
|
233089
|
-
while (
|
|
233090
|
-
const slice = childEvents.slice(breaks[
|
|
233088
|
+
index2 = breaks.length;
|
|
233089
|
+
while (index2--) {
|
|
233090
|
+
const slice = childEvents.slice(breaks[index2], breaks[index2 + 1]);
|
|
233091
233091
|
const start4 = startPositions.pop();
|
|
233092
233092
|
jumps.unshift([start4, start4 + slice.length - 1]);
|
|
233093
233093
|
splice(events, start4, 2, slice);
|
|
233094
233094
|
}
|
|
233095
|
-
|
|
233096
|
-
while (++
|
|
233097
|
-
gaps[adjust + jumps[
|
|
233098
|
-
adjust += jumps[
|
|
233095
|
+
index2 = -1;
|
|
233096
|
+
while (++index2 < jumps.length) {
|
|
233097
|
+
gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1];
|
|
233098
|
+
adjust += jumps[index2][1] - jumps[index2][0] - 1;
|
|
233099
233099
|
}
|
|
233100
233100
|
return gaps;
|
|
233101
233101
|
}
|
|
@@ -233700,16 +233700,16 @@ var nextBlankConstruct = {
|
|
|
233700
233700
|
partial: true
|
|
233701
233701
|
};
|
|
233702
233702
|
function resolveToHtmlFlow(events) {
|
|
233703
|
-
let
|
|
233704
|
-
while (
|
|
233705
|
-
if (events[
|
|
233703
|
+
let index2 = events.length;
|
|
233704
|
+
while (index2--) {
|
|
233705
|
+
if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") {
|
|
233706
233706
|
break;
|
|
233707
233707
|
}
|
|
233708
233708
|
}
|
|
233709
|
-
if (
|
|
233710
|
-
events[
|
|
233711
|
-
events[
|
|
233712
|
-
events.splice(
|
|
233709
|
+
if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") {
|
|
233710
|
+
events[index2][1].start = events[index2 - 2][1].start;
|
|
233711
|
+
events[index2 + 1][1].start = events[index2 - 2][1].start;
|
|
233712
|
+
events.splice(index2 - 2, 2);
|
|
233713
233713
|
}
|
|
233714
233714
|
return events;
|
|
233715
233715
|
}
|
|
@@ -233718,7 +233718,7 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233718
233718
|
let kind;
|
|
233719
233719
|
let startTag;
|
|
233720
233720
|
let buffer2;
|
|
233721
|
-
let
|
|
233721
|
+
let index2;
|
|
233722
233722
|
let marker;
|
|
233723
233723
|
return start3;
|
|
233724
233724
|
function start3(code2) {
|
|
@@ -233759,7 +233759,7 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233759
233759
|
effects.consume(code2);
|
|
233760
233760
|
kind = 5;
|
|
233761
233761
|
buffer2 = "CDATA[";
|
|
233762
|
-
|
|
233762
|
+
index2 = 0;
|
|
233763
233763
|
return cdataOpenInside;
|
|
233764
233764
|
}
|
|
233765
233765
|
if (asciiAlpha(code2)) {
|
|
@@ -233777,9 +233777,9 @@ function tokenizeHtmlFlow(effects, ok3, nok) {
|
|
|
233777
233777
|
return nok(code2);
|
|
233778
233778
|
}
|
|
233779
233779
|
function cdataOpenInside(code2) {
|
|
233780
|
-
if (code2 === buffer2.charCodeAt(
|
|
233780
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
233781
233781
|
effects.consume(code2);
|
|
233782
|
-
return
|
|
233782
|
+
return index2 === buffer2.length ? self2.interrupt ? ok3 : continuation : cdataOpenInside;
|
|
233783
233783
|
}
|
|
233784
233784
|
return nok(code2);
|
|
233785
233785
|
}
|
|
@@ -234061,7 +234061,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234061
234061
|
const self2 = this;
|
|
234062
234062
|
let marker;
|
|
234063
234063
|
let buffer2;
|
|
234064
|
-
let
|
|
234064
|
+
let index2;
|
|
234065
234065
|
let returnState;
|
|
234066
234066
|
return start3;
|
|
234067
234067
|
function start3(code2) {
|
|
@@ -234097,7 +234097,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234097
234097
|
if (code2 === 91) {
|
|
234098
234098
|
effects.consume(code2);
|
|
234099
234099
|
buffer2 = "CDATA[";
|
|
234100
|
-
|
|
234100
|
+
index2 = 0;
|
|
234101
234101
|
return cdataOpen;
|
|
234102
234102
|
}
|
|
234103
234103
|
if (asciiAlpha(code2)) {
|
|
@@ -234152,9 +234152,9 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
234152
234152
|
return comment(code2);
|
|
234153
234153
|
}
|
|
234154
234154
|
function cdataOpen(code2) {
|
|
234155
|
-
if (code2 === buffer2.charCodeAt(
|
|
234155
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
234156
234156
|
effects.consume(code2);
|
|
234157
|
-
return
|
|
234157
|
+
return index2 === buffer2.length ? cdata : cdataOpen;
|
|
234158
234158
|
}
|
|
234159
234159
|
return nok(code2);
|
|
234160
234160
|
}
|
|
@@ -234391,44 +234391,44 @@ var collapsedReferenceConstruct = {
|
|
|
234391
234391
|
tokenize: tokenizeCollapsedReference
|
|
234392
234392
|
};
|
|
234393
234393
|
function resolveAllLabelEnd(events) {
|
|
234394
|
-
let
|
|
234394
|
+
let index2 = -1;
|
|
234395
234395
|
let token;
|
|
234396
|
-
while (++
|
|
234397
|
-
token = events[
|
|
234396
|
+
while (++index2 < events.length) {
|
|
234397
|
+
token = events[index2][1];
|
|
234398
234398
|
if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
|
|
234399
|
-
events.splice(
|
|
234399
|
+
events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2);
|
|
234400
234400
|
token.type = "data";
|
|
234401
|
-
|
|
234401
|
+
index2++;
|
|
234402
234402
|
}
|
|
234403
234403
|
}
|
|
234404
234404
|
return events;
|
|
234405
234405
|
}
|
|
234406
234406
|
function resolveToLabelEnd(events, context) {
|
|
234407
|
-
let
|
|
234407
|
+
let index2 = events.length;
|
|
234408
234408
|
let offset3 = 0;
|
|
234409
234409
|
let token;
|
|
234410
234410
|
let open;
|
|
234411
234411
|
let close;
|
|
234412
234412
|
let media;
|
|
234413
|
-
while (
|
|
234414
|
-
token = events[
|
|
234413
|
+
while (index2--) {
|
|
234414
|
+
token = events[index2][1];
|
|
234415
234415
|
if (open) {
|
|
234416
234416
|
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
234417
234417
|
break;
|
|
234418
234418
|
}
|
|
234419
|
-
if (events[
|
|
234419
|
+
if (events[index2][0] === "enter" && token.type === "labelLink") {
|
|
234420
234420
|
token._inactive = true;
|
|
234421
234421
|
}
|
|
234422
234422
|
} else if (close) {
|
|
234423
|
-
if (events[
|
|
234424
|
-
open =
|
|
234423
|
+
if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
|
|
234424
|
+
open = index2;
|
|
234425
234425
|
if (token.type !== "labelLink") {
|
|
234426
234426
|
offset3 = 2;
|
|
234427
234427
|
break;
|
|
234428
234428
|
}
|
|
234429
234429
|
}
|
|
234430
234430
|
} else if (token.type === "labelEnd") {
|
|
234431
|
-
close =
|
|
234431
|
+
close = index2;
|
|
234432
234432
|
}
|
|
234433
234433
|
}
|
|
234434
234434
|
const group = {
|
|
@@ -234473,12 +234473,12 @@ function resolveToLabelEnd(events, context) {
|
|
|
234473
234473
|
}
|
|
234474
234474
|
function tokenizeLabelEnd(effects, ok3, nok) {
|
|
234475
234475
|
const self2 = this;
|
|
234476
|
-
let
|
|
234476
|
+
let index2 = self2.events.length;
|
|
234477
234477
|
let labelStart;
|
|
234478
234478
|
let defined;
|
|
234479
|
-
while (
|
|
234480
|
-
if ((self2.events[
|
|
234481
|
-
labelStart = self2.events[
|
|
234479
|
+
while (index2--) {
|
|
234480
|
+
if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) {
|
|
234481
|
+
labelStart = self2.events[index2][1];
|
|
234482
234482
|
break;
|
|
234483
234483
|
}
|
|
234484
234484
|
}
|
|
@@ -234888,25 +234888,25 @@ var setextUnderline = {
|
|
|
234888
234888
|
resolveTo: resolveToSetextUnderline
|
|
234889
234889
|
};
|
|
234890
234890
|
function resolveToSetextUnderline(events, context) {
|
|
234891
|
-
let
|
|
234891
|
+
let index2 = events.length;
|
|
234892
234892
|
let content4;
|
|
234893
234893
|
let text8;
|
|
234894
234894
|
let definition3;
|
|
234895
|
-
while (
|
|
234896
|
-
if (events[
|
|
234897
|
-
if (events[
|
|
234898
|
-
content4 =
|
|
234895
|
+
while (index2--) {
|
|
234896
|
+
if (events[index2][0] === "enter") {
|
|
234897
|
+
if (events[index2][1].type === "content") {
|
|
234898
|
+
content4 = index2;
|
|
234899
234899
|
break;
|
|
234900
234900
|
}
|
|
234901
|
-
if (events[
|
|
234902
|
-
text8 =
|
|
234901
|
+
if (events[index2][1].type === "paragraph") {
|
|
234902
|
+
text8 = index2;
|
|
234903
234903
|
}
|
|
234904
234904
|
} else {
|
|
234905
|
-
if (events[
|
|
234906
|
-
events.splice(
|
|
234905
|
+
if (events[index2][1].type === "content") {
|
|
234906
|
+
events.splice(index2, 1);
|
|
234907
234907
|
}
|
|
234908
|
-
if (!definition3 && events[
|
|
234909
|
-
definition3 =
|
|
234908
|
+
if (!definition3 && events[index2][1].type === "definition") {
|
|
234909
|
+
definition3 = index2;
|
|
234910
234910
|
}
|
|
234911
234911
|
}
|
|
234912
234912
|
}
|
|
@@ -234928,12 +234928,12 @@ function resolveToSetextUnderline(events, context) {
|
|
|
234928
234928
|
}
|
|
234929
234929
|
function tokenizeSetextUnderline(effects, ok3, nok) {
|
|
234930
234930
|
const self2 = this;
|
|
234931
|
-
let
|
|
234931
|
+
let index2 = self2.events.length;
|
|
234932
234932
|
let marker;
|
|
234933
234933
|
let paragraph2;
|
|
234934
|
-
while (
|
|
234935
|
-
if (self2.events[
|
|
234936
|
-
paragraph2 = self2.events[
|
|
234934
|
+
while (index2--) {
|
|
234935
|
+
if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") {
|
|
234936
|
+
paragraph2 = self2.events[index2][1].type === "paragraph";
|
|
234937
234937
|
break;
|
|
234938
234938
|
}
|
|
234939
234939
|
}
|
|
@@ -235055,10 +235055,10 @@ function initializeFactory(field) {
|
|
|
235055
235055
|
return true;
|
|
235056
235056
|
}
|
|
235057
235057
|
const list3 = constructs2[code2];
|
|
235058
|
-
let
|
|
235058
|
+
let index2 = -1;
|
|
235059
235059
|
if (list3) {
|
|
235060
|
-
while (++
|
|
235061
|
-
const item = list3[
|
|
235060
|
+
while (++index2 < list3.length) {
|
|
235061
|
+
const item = list3[index2];
|
|
235062
235062
|
if (!item.previous || item.previous.call(self2, self2.previous)) {
|
|
235063
235063
|
return true;
|
|
235064
235064
|
}
|
|
@@ -235071,19 +235071,19 @@ function initializeFactory(field) {
|
|
|
235071
235071
|
function createResolver(extraResolver) {
|
|
235072
235072
|
return resolveAllText;
|
|
235073
235073
|
function resolveAllText(events, context) {
|
|
235074
|
-
let
|
|
235074
|
+
let index2 = -1;
|
|
235075
235075
|
let enter;
|
|
235076
|
-
while (++
|
|
235076
|
+
while (++index2 <= events.length) {
|
|
235077
235077
|
if (enter === void 0) {
|
|
235078
|
-
if (events[
|
|
235079
|
-
enter =
|
|
235080
|
-
|
|
235078
|
+
if (events[index2] && events[index2][1].type === "data") {
|
|
235079
|
+
enter = index2;
|
|
235080
|
+
index2++;
|
|
235081
235081
|
}
|
|
235082
|
-
} else if (!events[
|
|
235083
|
-
if (
|
|
235084
|
-
events[enter][1].end = events[
|
|
235085
|
-
events.splice(enter + 2,
|
|
235086
|
-
|
|
235082
|
+
} else if (!events[index2] || events[index2][1].type !== "data") {
|
|
235083
|
+
if (index2 !== enter + 2) {
|
|
235084
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
235085
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
235086
|
+
index2 = enter + 2;
|
|
235087
235087
|
}
|
|
235088
235088
|
enter = void 0;
|
|
235089
235089
|
}
|
|
@@ -235097,12 +235097,12 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235097
235097
|
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
|
|
235098
235098
|
const data3 = events[eventIndex - 1][1];
|
|
235099
235099
|
const chunks = context.sliceStream(data3);
|
|
235100
|
-
let
|
|
235100
|
+
let index2 = chunks.length;
|
|
235101
235101
|
let bufferIndex = -1;
|
|
235102
235102
|
let size = 0;
|
|
235103
235103
|
let tabs;
|
|
235104
|
-
while (
|
|
235105
|
-
const chunk = chunks[
|
|
235104
|
+
while (index2--) {
|
|
235105
|
+
const chunk = chunks[index2];
|
|
235106
235106
|
if (typeof chunk === "string") {
|
|
235107
235107
|
bufferIndex = chunk.length;
|
|
235108
235108
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
@@ -235117,7 +235117,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235117
235117
|
size++;
|
|
235118
235118
|
} else if (chunk === -1) {
|
|
235119
235119
|
} else {
|
|
235120
|
-
|
|
235120
|
+
index2++;
|
|
235121
235121
|
break;
|
|
235122
235122
|
}
|
|
235123
235123
|
}
|
|
@@ -235128,8 +235128,8 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235128
235128
|
line: data3.end.line,
|
|
235129
235129
|
column: data3.end.column - size,
|
|
235130
235130
|
offset: data3.end.offset - size,
|
|
235131
|
-
_index: data3.start._index +
|
|
235132
|
-
_bufferIndex:
|
|
235131
|
+
_index: data3.start._index + index2,
|
|
235132
|
+
_bufferIndex: index2 ? bufferIndex : data3.start._bufferIndex + bufferIndex
|
|
235133
235133
|
},
|
|
235134
235134
|
end: Object.assign({}, data3.end)
|
|
235135
235135
|
};
|
|
@@ -235154,7 +235154,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
235154
235154
|
|
|
235155
235155
|
// ../../../node_modules/.pnpm/micromark@3.0.10/node_modules/micromark/lib/create-tokenizer.js
|
|
235156
235156
|
function createTokenizer(parser, initialize, from) {
|
|
235157
|
-
let
|
|
235157
|
+
let point3 = Object.assign(
|
|
235158
235158
|
from ? Object.assign({}, from) : {
|
|
235159
235159
|
line: 1,
|
|
235160
235160
|
column: 1,
|
|
@@ -235215,7 +235215,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235215
235215
|
return sliceChunks(chunks, token);
|
|
235216
235216
|
}
|
|
235217
235217
|
function now() {
|
|
235218
|
-
return Object.assign({},
|
|
235218
|
+
return Object.assign({}, point3);
|
|
235219
235219
|
}
|
|
235220
235220
|
function defineSkip(value) {
|
|
235221
235221
|
columnStart[value.line] = value.column;
|
|
@@ -235223,15 +235223,15 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235223
235223
|
}
|
|
235224
235224
|
function main() {
|
|
235225
235225
|
let chunkIndex;
|
|
235226
|
-
while (
|
|
235227
|
-
const chunk = chunks[
|
|
235226
|
+
while (point3._index < chunks.length) {
|
|
235227
|
+
const chunk = chunks[point3._index];
|
|
235228
235228
|
if (typeof chunk === "string") {
|
|
235229
|
-
chunkIndex =
|
|
235230
|
-
if (
|
|
235231
|
-
|
|
235229
|
+
chunkIndex = point3._index;
|
|
235230
|
+
if (point3._bufferIndex < 0) {
|
|
235231
|
+
point3._bufferIndex = 0;
|
|
235232
235232
|
}
|
|
235233
|
-
while (
|
|
235234
|
-
go(chunk.charCodeAt(
|
|
235233
|
+
while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
|
|
235234
|
+
go(chunk.charCodeAt(point3._bufferIndex));
|
|
235235
235235
|
}
|
|
235236
235236
|
} else {
|
|
235237
235237
|
go(chunk);
|
|
@@ -235245,21 +235245,21 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235245
235245
|
}
|
|
235246
235246
|
function consume(code2) {
|
|
235247
235247
|
if (markdownLineEnding(code2)) {
|
|
235248
|
-
|
|
235249
|
-
|
|
235250
|
-
|
|
235248
|
+
point3.line++;
|
|
235249
|
+
point3.column = 1;
|
|
235250
|
+
point3.offset += code2 === -3 ? 2 : 1;
|
|
235251
235251
|
accountForPotentialSkip();
|
|
235252
235252
|
} else if (code2 !== -1) {
|
|
235253
|
-
|
|
235254
|
-
|
|
235253
|
+
point3.column++;
|
|
235254
|
+
point3.offset++;
|
|
235255
235255
|
}
|
|
235256
|
-
if (
|
|
235257
|
-
|
|
235256
|
+
if (point3._bufferIndex < 0) {
|
|
235257
|
+
point3._index++;
|
|
235258
235258
|
} else {
|
|
235259
|
-
|
|
235260
|
-
if (
|
|
235261
|
-
|
|
235262
|
-
|
|
235259
|
+
point3._bufferIndex++;
|
|
235260
|
+
if (point3._bufferIndex === chunks[point3._index].length) {
|
|
235261
|
+
point3._bufferIndex = -1;
|
|
235262
|
+
point3._index++;
|
|
235263
235263
|
}
|
|
235264
235264
|
}
|
|
235265
235265
|
context.previous = code2;
|
|
@@ -235374,7 +235374,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235374
235374
|
from: startEventsIndex
|
|
235375
235375
|
};
|
|
235376
235376
|
function restore() {
|
|
235377
|
-
|
|
235377
|
+
point3 = startPoint;
|
|
235378
235378
|
context.previous = startPrevious;
|
|
235379
235379
|
context.currentConstruct = startCurrentConstruct;
|
|
235380
235380
|
context.events.length = startEventsIndex;
|
|
@@ -235383,9 +235383,9 @@ function createTokenizer(parser, initialize, from) {
|
|
|
235383
235383
|
}
|
|
235384
235384
|
}
|
|
235385
235385
|
function accountForPotentialSkip() {
|
|
235386
|
-
if (
|
|
235387
|
-
|
|
235388
|
-
|
|
235386
|
+
if (point3.line in columnStart && point3.column < 2) {
|
|
235387
|
+
point3.column = columnStart[point3.line];
|
|
235388
|
+
point3.offset += columnStart[point3.line] - 1;
|
|
235389
235389
|
}
|
|
235390
235390
|
}
|
|
235391
235391
|
}
|
|
@@ -235409,11 +235409,11 @@ function sliceChunks(chunks, token) {
|
|
|
235409
235409
|
return view;
|
|
235410
235410
|
}
|
|
235411
235411
|
function serializeChunks(chunks, expandTabs) {
|
|
235412
|
-
let
|
|
235412
|
+
let index2 = -1;
|
|
235413
235413
|
const result = [];
|
|
235414
235414
|
let atTab;
|
|
235415
|
-
while (++
|
|
235416
|
-
const chunk = chunks[
|
|
235415
|
+
while (++index2 < chunks.length) {
|
|
235416
|
+
const chunk = chunks[index2];
|
|
235417
235417
|
let value;
|
|
235418
235418
|
if (typeof chunk === "string") {
|
|
235419
235419
|
value = chunk;
|
|
@@ -235666,32 +235666,6 @@ function decode($0, $1, $2) {
|
|
|
235666
235666
|
return decodeNamedCharacterReference($2) || $0;
|
|
235667
235667
|
}
|
|
235668
235668
|
|
|
235669
|
-
// ../../../node_modules/.pnpm/unist-util-stringify-position@3.0.2/node_modules/unist-util-stringify-position/index.js
|
|
235670
|
-
function stringifyPosition2(value) {
|
|
235671
|
-
if (!value || typeof value !== "object") {
|
|
235672
|
-
return "";
|
|
235673
|
-
}
|
|
235674
|
-
if ("position" in value || "type" in value) {
|
|
235675
|
-
return position2(value.position);
|
|
235676
|
-
}
|
|
235677
|
-
if ("start" in value || "end" in value) {
|
|
235678
|
-
return position2(value);
|
|
235679
|
-
}
|
|
235680
|
-
if ("line" in value || "column" in value) {
|
|
235681
|
-
return point2(value);
|
|
235682
|
-
}
|
|
235683
|
-
return "";
|
|
235684
|
-
}
|
|
235685
|
-
function point2(point4) {
|
|
235686
|
-
return index2(point4 && point4.line) + ":" + index2(point4 && point4.column);
|
|
235687
|
-
}
|
|
235688
|
-
function position2(pos) {
|
|
235689
|
-
return point2(pos && pos.start) + "-" + point2(pos && pos.end);
|
|
235690
|
-
}
|
|
235691
|
-
function index2(value) {
|
|
235692
|
-
return value && typeof value === "number" ? value : 1;
|
|
235693
|
-
}
|
|
235694
|
-
|
|
235695
235669
|
// ../../../node_modules/.pnpm/mdast-util-from-markdown@1.2.0/node_modules/mdast-util-from-markdown/lib/index.js
|
|
235696
235670
|
var own3 = {}.hasOwnProperty;
|
|
235697
235671
|
var fromMarkdown = function(value, encoding, options) {
|
|
@@ -235833,29 +235807,29 @@ function compiler(options = {}) {
|
|
|
235833
235807
|
setData,
|
|
235834
235808
|
getData
|
|
235835
235809
|
};
|
|
235836
|
-
let
|
|
235837
|
-
while (++
|
|
235838
|
-
if (events[
|
|
235839
|
-
if (events[
|
|
235840
|
-
listStack.push(
|
|
235810
|
+
let index2 = -1;
|
|
235811
|
+
while (++index2 < events.length) {
|
|
235812
|
+
if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
|
|
235813
|
+
if (events[index2][0] === "enter") {
|
|
235814
|
+
listStack.push(index2);
|
|
235841
235815
|
} else {
|
|
235842
235816
|
const tail = listStack.pop();
|
|
235843
|
-
|
|
235817
|
+
index2 = prepareList(events, tail, index2);
|
|
235844
235818
|
}
|
|
235845
235819
|
}
|
|
235846
235820
|
}
|
|
235847
|
-
|
|
235848
|
-
while (++
|
|
235849
|
-
const handler = config[events[
|
|
235850
|
-
if (own3.call(handler, events[
|
|
235851
|
-
handler[events[
|
|
235821
|
+
index2 = -1;
|
|
235822
|
+
while (++index2 < events.length) {
|
|
235823
|
+
const handler = config[events[index2][0]];
|
|
235824
|
+
if (own3.call(handler, events[index2][1].type)) {
|
|
235825
|
+
handler[events[index2][1].type].call(
|
|
235852
235826
|
Object.assign(
|
|
235853
235827
|
{
|
|
235854
|
-
sliceSerialize: events[
|
|
235828
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
235855
235829
|
},
|
|
235856
235830
|
context
|
|
235857
235831
|
),
|
|
235858
|
-
events[
|
|
235832
|
+
events[index2][1]
|
|
235859
235833
|
);
|
|
235860
235834
|
}
|
|
235861
235835
|
}
|
|
@@ -235865,14 +235839,14 @@ function compiler(options = {}) {
|
|
|
235865
235839
|
handler.call(context, void 0, tail[0]);
|
|
235866
235840
|
}
|
|
235867
235841
|
tree.position = {
|
|
235868
|
-
start:
|
|
235842
|
+
start: point3(
|
|
235869
235843
|
events.length > 0 ? events[0][1].start : {
|
|
235870
235844
|
line: 1,
|
|
235871
235845
|
column: 1,
|
|
235872
235846
|
offset: 0
|
|
235873
235847
|
}
|
|
235874
235848
|
),
|
|
235875
|
-
end:
|
|
235849
|
+
end: point3(
|
|
235876
235850
|
events.length > 0 ? events[events.length - 2][1].end : {
|
|
235877
235851
|
line: 1,
|
|
235878
235852
|
column: 1,
|
|
@@ -235880,22 +235854,22 @@ function compiler(options = {}) {
|
|
|
235880
235854
|
}
|
|
235881
235855
|
)
|
|
235882
235856
|
};
|
|
235883
|
-
|
|
235884
|
-
while (++
|
|
235885
|
-
tree = config.transforms[
|
|
235857
|
+
index2 = -1;
|
|
235858
|
+
while (++index2 < config.transforms.length) {
|
|
235859
|
+
tree = config.transforms[index2](tree) || tree;
|
|
235886
235860
|
}
|
|
235887
235861
|
return tree;
|
|
235888
235862
|
}
|
|
235889
235863
|
function prepareList(events, start3, length) {
|
|
235890
|
-
let
|
|
235864
|
+
let index2 = start3 - 1;
|
|
235891
235865
|
let containerBalance = -1;
|
|
235892
235866
|
let listSpread = false;
|
|
235893
235867
|
let listItem3;
|
|
235894
235868
|
let lineIndex;
|
|
235895
235869
|
let firstBlankLineIndex;
|
|
235896
235870
|
let atMarker;
|
|
235897
|
-
while (++
|
|
235898
|
-
const event = events[
|
|
235871
|
+
while (++index2 <= length) {
|
|
235872
|
+
const event = events[index2];
|
|
235899
235873
|
if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
|
|
235900
235874
|
if (event[0] === "enter") {
|
|
235901
235875
|
containerBalance++;
|
|
@@ -235906,7 +235880,7 @@ function compiler(options = {}) {
|
|
|
235906
235880
|
} else if (event[1].type === "lineEndingBlank") {
|
|
235907
235881
|
if (event[0] === "enter") {
|
|
235908
235882
|
if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
|
|
235909
|
-
firstBlankLineIndex =
|
|
235883
|
+
firstBlankLineIndex = index2;
|
|
235910
235884
|
}
|
|
235911
235885
|
atMarker = void 0;
|
|
235912
235886
|
}
|
|
@@ -235916,7 +235890,7 @@ function compiler(options = {}) {
|
|
|
235916
235890
|
}
|
|
235917
235891
|
if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
|
|
235918
235892
|
if (listItem3) {
|
|
235919
|
-
let tailIndex =
|
|
235893
|
+
let tailIndex = index2;
|
|
235920
235894
|
lineIndex = void 0;
|
|
235921
235895
|
while (tailIndex--) {
|
|
235922
235896
|
const tailEvent = events[tailIndex];
|
|
@@ -235941,8 +235915,8 @@ function compiler(options = {}) {
|
|
|
235941
235915
|
{},
|
|
235942
235916
|
lineIndex ? events[lineIndex][1].start : event[1].end
|
|
235943
235917
|
);
|
|
235944
|
-
events.splice(lineIndex ||
|
|
235945
|
-
|
|
235918
|
+
events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
|
|
235919
|
+
index2++;
|
|
235946
235920
|
length++;
|
|
235947
235921
|
}
|
|
235948
235922
|
if (event[1].type === "listItemPrefix") {
|
|
@@ -235951,8 +235925,8 @@ function compiler(options = {}) {
|
|
|
235951
235925
|
_spread: false,
|
|
235952
235926
|
start: Object.assign({}, event[1].start)
|
|
235953
235927
|
};
|
|
235954
|
-
events.splice(
|
|
235955
|
-
|
|
235928
|
+
events.splice(index2, 0, ["enter", listItem3, event[2]]);
|
|
235929
|
+
index2++;
|
|
235956
235930
|
length++;
|
|
235957
235931
|
firstBlankLineIndex = void 0;
|
|
235958
235932
|
atMarker = true;
|
|
@@ -235968,7 +235942,7 @@ function compiler(options = {}) {
|
|
|
235968
235942
|
function getData(key) {
|
|
235969
235943
|
return data3[key];
|
|
235970
235944
|
}
|
|
235971
|
-
function
|
|
235945
|
+
function point3(d) {
|
|
235972
235946
|
return {
|
|
235973
235947
|
line: d.line,
|
|
235974
235948
|
column: d.column,
|
|
@@ -235995,7 +235969,7 @@ function compiler(options = {}) {
|
|
|
235995
235969
|
this.stack.push(node);
|
|
235996
235970
|
this.tokenStack.push([token, errorHandler]);
|
|
235997
235971
|
node.position = {
|
|
235998
|
-
start:
|
|
235972
|
+
start: point3(token.start)
|
|
235999
235973
|
};
|
|
236000
235974
|
return node;
|
|
236001
235975
|
}
|
|
@@ -236012,7 +235986,7 @@ function compiler(options = {}) {
|
|
|
236012
235986
|
const open = this.tokenStack.pop();
|
|
236013
235987
|
if (!open) {
|
|
236014
235988
|
throw new Error(
|
|
236015
|
-
"Cannot close `" + token.type + "` (" +
|
|
235989
|
+
"Cannot close `" + token.type + "` (" + stringifyPosition({
|
|
236016
235990
|
start: token.start,
|
|
236017
235991
|
end: token.end
|
|
236018
235992
|
}) + "): it\u2019s not open"
|
|
@@ -236025,7 +235999,7 @@ function compiler(options = {}) {
|
|
|
236025
235999
|
handler.call(this, token, open[0]);
|
|
236026
236000
|
}
|
|
236027
236001
|
}
|
|
236028
|
-
node.position.end =
|
|
236002
|
+
node.position.end = point3(token.end);
|
|
236029
236003
|
return node;
|
|
236030
236004
|
}
|
|
236031
236005
|
function resume() {
|
|
@@ -236109,7 +236083,7 @@ function compiler(options = {}) {
|
|
|
236109
236083
|
if (!tail || tail.type !== "text") {
|
|
236110
236084
|
tail = text8();
|
|
236111
236085
|
tail.position = {
|
|
236112
|
-
start:
|
|
236086
|
+
start: point3(token.start)
|
|
236113
236087
|
};
|
|
236114
236088
|
parent.children.push(tail);
|
|
236115
236089
|
}
|
|
@@ -236118,13 +236092,13 @@ function compiler(options = {}) {
|
|
|
236118
236092
|
function onexitdata(token) {
|
|
236119
236093
|
const tail = this.stack.pop();
|
|
236120
236094
|
tail.value += this.sliceSerialize(token);
|
|
236121
|
-
tail.position.end =
|
|
236095
|
+
tail.position.end = point3(token.end);
|
|
236122
236096
|
}
|
|
236123
236097
|
function onexitlineending(token) {
|
|
236124
236098
|
const context = this.stack[this.stack.length - 1];
|
|
236125
236099
|
if (getData("atHardBreak")) {
|
|
236126
236100
|
const tail = context.children[context.children.length - 1];
|
|
236127
|
-
tail.position.end =
|
|
236101
|
+
tail.position.end = point3(token.end);
|
|
236128
236102
|
setData("atHardBreak");
|
|
236129
236103
|
return;
|
|
236130
236104
|
}
|
|
@@ -236237,7 +236211,7 @@ function compiler(options = {}) {
|
|
|
236237
236211
|
}
|
|
236238
236212
|
const tail = this.stack.pop();
|
|
236239
236213
|
tail.value += value;
|
|
236240
|
-
tail.position.end =
|
|
236214
|
+
tail.position.end = point3(token.end);
|
|
236241
236215
|
}
|
|
236242
236216
|
function onexitautolinkprotocol(token) {
|
|
236243
236217
|
onexitdata.call(this, token);
|
|
@@ -236360,9 +236334,9 @@ function compiler(options = {}) {
|
|
|
236360
236334
|
}
|
|
236361
236335
|
}
|
|
236362
236336
|
function configure(combined, extensions) {
|
|
236363
|
-
let
|
|
236364
|
-
while (++
|
|
236365
|
-
const value = extensions[
|
|
236337
|
+
let index2 = -1;
|
|
236338
|
+
while (++index2 < extensions.length) {
|
|
236339
|
+
const value = extensions[index2];
|
|
236366
236340
|
if (Array.isArray(value)) {
|
|
236367
236341
|
configure(combined, value);
|
|
236368
236342
|
} else {
|
|
@@ -236392,17 +236366,17 @@ function extension(combined, extension3) {
|
|
|
236392
236366
|
function defaultOnError(left, right) {
|
|
236393
236367
|
if (left) {
|
|
236394
236368
|
throw new Error(
|
|
236395
|
-
"Cannot close `" + left.type + "` (" +
|
|
236369
|
+
"Cannot close `" + left.type + "` (" + stringifyPosition({
|
|
236396
236370
|
start: left.start,
|
|
236397
236371
|
end: left.end
|
|
236398
|
-
}) + "): a different token (`" + right.type + "`, " +
|
|
236372
|
+
}) + "): a different token (`" + right.type + "`, " + stringifyPosition({
|
|
236399
236373
|
start: right.start,
|
|
236400
236374
|
end: right.end
|
|
236401
236375
|
}) + ") is open"
|
|
236402
236376
|
);
|
|
236403
236377
|
} else {
|
|
236404
236378
|
throw new Error(
|
|
236405
|
-
"Cannot close document, a token (`" + right.type + "`, " +
|
|
236379
|
+
"Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
|
|
236406
236380
|
start: right.start,
|
|
236407
236381
|
end: right.end
|
|
236408
236382
|
}) + ") is still open"
|
|
@@ -236450,11 +236424,11 @@ function zwitch(key, options) {
|
|
|
236450
236424
|
|
|
236451
236425
|
// ../../../node_modules/.pnpm/mdast-util-to-markdown@1.5.0/node_modules/mdast-util-to-markdown/lib/configure.js
|
|
236452
236426
|
function configure2(base2, extension3) {
|
|
236453
|
-
let
|
|
236427
|
+
let index2 = -1;
|
|
236454
236428
|
let key;
|
|
236455
236429
|
if (extension3.extensions) {
|
|
236456
|
-
while (++
|
|
236457
|
-
configure2(base2, extension3.extensions[
|
|
236430
|
+
while (++index2 < extension3.extensions.length) {
|
|
236431
|
+
configure2(base2, extension3.extensions[index2]);
|
|
236458
236432
|
}
|
|
236459
236433
|
}
|
|
236460
236434
|
for (key in extension3) {
|
|
@@ -236498,9 +236472,9 @@ function listInScope(stack, list3, none) {
|
|
|
236498
236472
|
if (!list3 || list3.length === 0) {
|
|
236499
236473
|
return none;
|
|
236500
236474
|
}
|
|
236501
|
-
let
|
|
236502
|
-
while (++
|
|
236503
|
-
if (stack.includes(list3[
|
|
236475
|
+
let index2 = -1;
|
|
236476
|
+
while (++index2 < list3.length) {
|
|
236477
|
+
if (stack.includes(list3[index2])) {
|
|
236504
236478
|
return true;
|
|
236505
236479
|
}
|
|
236506
236480
|
}
|
|
@@ -236509,9 +236483,9 @@ function listInScope(stack, list3, none) {
|
|
|
236509
236483
|
|
|
236510
236484
|
// ../../../node_modules/.pnpm/mdast-util-to-markdown@1.5.0/node_modules/mdast-util-to-markdown/lib/handle/break.js
|
|
236511
236485
|
function hardBreak(_, _1, state, info) {
|
|
236512
|
-
let
|
|
236513
|
-
while (++
|
|
236514
|
-
if (state.unsafe[
|
|
236486
|
+
let index2 = -1;
|
|
236487
|
+
while (++index2 < state.unsafe.length) {
|
|
236488
|
+
if (state.unsafe[index2].character === "\n" && patternInScope(state.stack, state.unsafe[index2])) {
|
|
236515
236489
|
return /[ \t]/.test(info.before) ? "" : " ";
|
|
236516
236490
|
}
|
|
236517
236491
|
}
|
|
@@ -236521,23 +236495,23 @@ function hardBreak(_, _1, state, info) {
|
|
|
236521
236495
|
// ../../../node_modules/.pnpm/longest-streak@3.0.1/node_modules/longest-streak/index.js
|
|
236522
236496
|
function longestStreak(value, character) {
|
|
236523
236497
|
const source2 = String(value);
|
|
236524
|
-
let
|
|
236525
|
-
let expected =
|
|
236498
|
+
let index2 = source2.indexOf(character);
|
|
236499
|
+
let expected = index2;
|
|
236526
236500
|
let count = 0;
|
|
236527
236501
|
let max = 0;
|
|
236528
236502
|
if (typeof character !== "string" || character.length !== 1) {
|
|
236529
236503
|
throw new Error("Expected character");
|
|
236530
236504
|
}
|
|
236531
|
-
while (
|
|
236532
|
-
if (
|
|
236505
|
+
while (index2 !== -1) {
|
|
236506
|
+
if (index2 === expected) {
|
|
236533
236507
|
if (++count > max) {
|
|
236534
236508
|
max = count;
|
|
236535
236509
|
}
|
|
236536
236510
|
} else {
|
|
236537
236511
|
count = 1;
|
|
236538
236512
|
}
|
|
236539
|
-
expected =
|
|
236540
|
-
|
|
236513
|
+
expected = index2 + 1;
|
|
236514
|
+
index2 = source2.indexOf(character, expected);
|
|
236541
236515
|
}
|
|
236542
236516
|
return max;
|
|
236543
236517
|
}
|
|
@@ -236726,15 +236700,15 @@ var convert = function(test) {
|
|
|
236726
236700
|
};
|
|
236727
236701
|
function anyFactory(tests) {
|
|
236728
236702
|
const checks = [];
|
|
236729
|
-
let
|
|
236730
|
-
while (++
|
|
236731
|
-
checks[
|
|
236703
|
+
let index2 = -1;
|
|
236704
|
+
while (++index2 < tests.length) {
|
|
236705
|
+
checks[index2] = convert(tests[index2]);
|
|
236732
236706
|
}
|
|
236733
236707
|
return castFactory(any);
|
|
236734
236708
|
function any(...parameters) {
|
|
236735
|
-
let
|
|
236736
|
-
while (++
|
|
236737
|
-
if (checks[
|
|
236709
|
+
let index3 = -1;
|
|
236710
|
+
while (++index3 < checks.length) {
|
|
236711
|
+
if (checks[index3].call(this, ...parameters))
|
|
236738
236712
|
return true;
|
|
236739
236713
|
}
|
|
236740
236714
|
return false;
|
|
@@ -236785,7 +236759,7 @@ var visitParents = function(tree, test, visitor, reverse) {
|
|
|
236785
236759
|
const is2 = convert(test);
|
|
236786
236760
|
const step = reverse ? -1 : 1;
|
|
236787
236761
|
factory(tree, void 0, [])();
|
|
236788
|
-
function factory(node,
|
|
236762
|
+
function factory(node, index2, parents) {
|
|
236789
236763
|
const value = node && typeof node === "object" ? node : {};
|
|
236790
236764
|
if (typeof value.type === "string") {
|
|
236791
236765
|
const name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
|
|
@@ -236799,7 +236773,7 @@ var visitParents = function(tree, test, visitor, reverse) {
|
|
|
236799
236773
|
let subresult;
|
|
236800
236774
|
let offset3;
|
|
236801
236775
|
let grandparents;
|
|
236802
|
-
if (!test || is2(node,
|
|
236776
|
+
if (!test || is2(node, index2, parents[parents.length - 1] || null)) {
|
|
236803
236777
|
result = toResult(visitor(node, parents));
|
|
236804
236778
|
if (result[0] === EXIT) {
|
|
236805
236779
|
return result;
|
|
@@ -237019,25 +236993,25 @@ inlineCode.peek = inlineCodePeek;
|
|
|
237019
236993
|
function inlineCode(node, _, state) {
|
|
237020
236994
|
let value = node.value || "";
|
|
237021
236995
|
let sequence = "`";
|
|
237022
|
-
let
|
|
236996
|
+
let index2 = -1;
|
|
237023
236997
|
while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) {
|
|
237024
236998
|
sequence += "`";
|
|
237025
236999
|
}
|
|
237026
237000
|
if (/[^ \r\n]/.test(value) && (/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value) || /^`|`$/.test(value))) {
|
|
237027
237001
|
value = " " + value + " ";
|
|
237028
237002
|
}
|
|
237029
|
-
while (++
|
|
237030
|
-
const pattern = state.unsafe[
|
|
237003
|
+
while (++index2 < state.unsafe.length) {
|
|
237004
|
+
const pattern = state.unsafe[index2];
|
|
237031
237005
|
const expression = patternCompile(pattern);
|
|
237032
237006
|
let match;
|
|
237033
237007
|
if (!pattern.atBreak)
|
|
237034
237008
|
continue;
|
|
237035
237009
|
while (match = expression.exec(value)) {
|
|
237036
|
-
let
|
|
237037
|
-
if (value.charCodeAt(
|
|
237038
|
-
|
|
237010
|
+
let position2 = match.index;
|
|
237011
|
+
if (value.charCodeAt(position2) === 10 && value.charCodeAt(position2 - 1) === 13) {
|
|
237012
|
+
position2--;
|
|
237039
237013
|
}
|
|
237040
|
-
value = value.slice(0,
|
|
237014
|
+
value = value.slice(0, position2) + " " + value.slice(match.index + 1);
|
|
237041
237015
|
}
|
|
237042
237016
|
}
|
|
237043
237017
|
return sequence + value + sequence;
|
|
@@ -237259,9 +237233,9 @@ function list2(node, parent, state, info) {
|
|
|
237259
237233
|
useDifferentMarker = true;
|
|
237260
237234
|
}
|
|
237261
237235
|
if (checkRule(state) === bullet && firstListItem) {
|
|
237262
|
-
let
|
|
237263
|
-
while (++
|
|
237264
|
-
const item = node.children[
|
|
237236
|
+
let index2 = -1;
|
|
237237
|
+
while (++index2 < node.children.length) {
|
|
237238
|
+
const item = node.children[index2];
|
|
237265
237239
|
if (item && item.type === "listItem" && item.children && item.children[0] && item.children[0].type === "thematicBreak") {
|
|
237266
237240
|
useDifferentMarker = true;
|
|
237267
237241
|
break;
|
|
@@ -237315,8 +237289,8 @@ function listItem(node, parent, state, info) {
|
|
|
237315
237289
|
);
|
|
237316
237290
|
exit2();
|
|
237317
237291
|
return value;
|
|
237318
|
-
function map3(line2,
|
|
237319
|
-
if (
|
|
237292
|
+
function map3(line2, index2, blank) {
|
|
237293
|
+
if (index2) {
|
|
237320
237294
|
return (blank ? "" : " ".repeat(size)) + line2;
|
|
237321
237295
|
}
|
|
237322
237296
|
return (blank ? bullet : bullet + " ".repeat(size - bullet.length)) + line2;
|
|
@@ -237561,19 +237535,19 @@ function containerPhrasing(parent, state, info) {
|
|
|
237561
237535
|
const indexStack = state.indexStack;
|
|
237562
237536
|
const children = parent.children || [];
|
|
237563
237537
|
const results = [];
|
|
237564
|
-
let
|
|
237538
|
+
let index2 = -1;
|
|
237565
237539
|
let before = info.before;
|
|
237566
237540
|
indexStack.push(-1);
|
|
237567
237541
|
let tracker = state.createTracker(info);
|
|
237568
|
-
while (++
|
|
237569
|
-
const child = children[
|
|
237542
|
+
while (++index2 < children.length) {
|
|
237543
|
+
const child = children[index2];
|
|
237570
237544
|
let after;
|
|
237571
|
-
indexStack[indexStack.length - 1] =
|
|
237572
|
-
if (
|
|
237573
|
-
let handle2 = state.handle.handlers[children[
|
|
237545
|
+
indexStack[indexStack.length - 1] = index2;
|
|
237546
|
+
if (index2 + 1 < children.length) {
|
|
237547
|
+
let handle2 = state.handle.handlers[children[index2 + 1].type];
|
|
237574
237548
|
if (handle2 && handle2.peek)
|
|
237575
237549
|
handle2 = handle2.peek;
|
|
237576
|
-
after = handle2 ? handle2(children[
|
|
237550
|
+
after = handle2 ? handle2(children[index2 + 1], parent, state, {
|
|
237577
237551
|
before: "",
|
|
237578
237552
|
after: "",
|
|
237579
237553
|
...tracker.current()
|
|
@@ -237611,11 +237585,11 @@ function containerFlow(parent, state, info) {
|
|
|
237611
237585
|
const children = parent.children || [];
|
|
237612
237586
|
const tracker = state.createTracker(info);
|
|
237613
237587
|
const results = [];
|
|
237614
|
-
let
|
|
237588
|
+
let index2 = -1;
|
|
237615
237589
|
indexStack.push(-1);
|
|
237616
|
-
while (++
|
|
237617
|
-
const child = children[
|
|
237618
|
-
indexStack[indexStack.length - 1] =
|
|
237590
|
+
while (++index2 < children.length) {
|
|
237591
|
+
const child = children[index2];
|
|
237592
|
+
indexStack[indexStack.length - 1] = index2;
|
|
237619
237593
|
results.push(
|
|
237620
237594
|
tracker.move(
|
|
237621
237595
|
state.handle(child, parent, state, {
|
|
@@ -237628,9 +237602,9 @@ function containerFlow(parent, state, info) {
|
|
|
237628
237602
|
if (child.type !== "list") {
|
|
237629
237603
|
state.bulletLastUsed = void 0;
|
|
237630
237604
|
}
|
|
237631
|
-
if (
|
|
237605
|
+
if (index2 < children.length - 1) {
|
|
237632
237606
|
results.push(
|
|
237633
|
-
tracker.move(between(child, children[
|
|
237607
|
+
tracker.move(between(child, children[index2 + 1], parent, state))
|
|
237634
237608
|
);
|
|
237635
237609
|
}
|
|
237636
237610
|
}
|
|
@@ -237638,9 +237612,9 @@ function containerFlow(parent, state, info) {
|
|
|
237638
237612
|
return results.join("");
|
|
237639
237613
|
}
|
|
237640
237614
|
function between(left, right, parent, state) {
|
|
237641
|
-
let
|
|
237642
|
-
while (
|
|
237643
|
-
const result = state.join[
|
|
237615
|
+
let index2 = state.join.length;
|
|
237616
|
+
while (index2--) {
|
|
237617
|
+
const result = state.join[index2](left, right, parent, state);
|
|
237644
237618
|
if (result === true || result === 1) {
|
|
237645
237619
|
break;
|
|
237646
237620
|
}
|
|
@@ -237680,9 +237654,9 @@ function safe(state, input, config) {
|
|
|
237680
237654
|
const positions = [];
|
|
237681
237655
|
const result = [];
|
|
237682
237656
|
const infos = {};
|
|
237683
|
-
let
|
|
237684
|
-
while (++
|
|
237685
|
-
const pattern = state.unsafe[
|
|
237657
|
+
let index2 = -1;
|
|
237658
|
+
while (++index2 < state.unsafe.length) {
|
|
237659
|
+
const pattern = state.unsafe[index2];
|
|
237686
237660
|
if (!patternInScope(state.stack, pattern)) {
|
|
237687
237661
|
continue;
|
|
237688
237662
|
}
|
|
@@ -237691,41 +237665,41 @@ function safe(state, input, config) {
|
|
|
237691
237665
|
while (match = expression.exec(value)) {
|
|
237692
237666
|
const before = "before" in pattern || Boolean(pattern.atBreak);
|
|
237693
237667
|
const after = "after" in pattern;
|
|
237694
|
-
const
|
|
237695
|
-
if (positions.includes(
|
|
237696
|
-
if (infos[
|
|
237697
|
-
infos[
|
|
237668
|
+
const position2 = match.index + (before ? match[1].length : 0);
|
|
237669
|
+
if (positions.includes(position2)) {
|
|
237670
|
+
if (infos[position2].before && !before) {
|
|
237671
|
+
infos[position2].before = false;
|
|
237698
237672
|
}
|
|
237699
|
-
if (infos[
|
|
237700
|
-
infos[
|
|
237673
|
+
if (infos[position2].after && !after) {
|
|
237674
|
+
infos[position2].after = false;
|
|
237701
237675
|
}
|
|
237702
237676
|
} else {
|
|
237703
|
-
positions.push(
|
|
237704
|
-
infos[
|
|
237677
|
+
positions.push(position2);
|
|
237678
|
+
infos[position2] = { before, after };
|
|
237705
237679
|
}
|
|
237706
237680
|
}
|
|
237707
237681
|
}
|
|
237708
237682
|
positions.sort(numerical);
|
|
237709
237683
|
let start3 = config.before ? config.before.length : 0;
|
|
237710
237684
|
const end = value.length - (config.after ? config.after.length : 0);
|
|
237711
|
-
|
|
237712
|
-
while (++
|
|
237713
|
-
const
|
|
237714
|
-
if (
|
|
237685
|
+
index2 = -1;
|
|
237686
|
+
while (++index2 < positions.length) {
|
|
237687
|
+
const position2 = positions[index2];
|
|
237688
|
+
if (position2 < start3 || position2 >= end) {
|
|
237715
237689
|
continue;
|
|
237716
237690
|
}
|
|
237717
|
-
if (
|
|
237691
|
+
if (position2 + 1 < end && positions[index2 + 1] === position2 + 1 && infos[position2].after && !infos[position2 + 1].before && !infos[position2 + 1].after || positions[index2 - 1] === position2 - 1 && infos[position2].before && !infos[position2 - 1].before && !infos[position2 - 1].after) {
|
|
237718
237692
|
continue;
|
|
237719
237693
|
}
|
|
237720
|
-
if (start3 !==
|
|
237721
|
-
result.push(escapeBackslashes(value.slice(start3,
|
|
237694
|
+
if (start3 !== position2) {
|
|
237695
|
+
result.push(escapeBackslashes(value.slice(start3, position2), "\\"));
|
|
237722
237696
|
}
|
|
237723
|
-
start3 =
|
|
237724
|
-
if (/[!-/:-@[-`{-~]/.test(value.charAt(
|
|
237697
|
+
start3 = position2;
|
|
237698
|
+
if (/[!-/:-@[-`{-~]/.test(value.charAt(position2)) && (!config.encode || !config.encode.includes(value.charAt(position2)))) {
|
|
237725
237699
|
result.push("\\");
|
|
237726
237700
|
} else {
|
|
237727
237701
|
result.push(
|
|
237728
|
-
"&#x" + value.charCodeAt(
|
|
237702
|
+
"&#x" + value.charCodeAt(position2).toString(16).toUpperCase() + ";"
|
|
237729
237703
|
);
|
|
237730
237704
|
start3++;
|
|
237731
237705
|
}
|
|
@@ -237741,18 +237715,18 @@ function escapeBackslashes(value, after) {
|
|
|
237741
237715
|
const positions = [];
|
|
237742
237716
|
const results = [];
|
|
237743
237717
|
const whole = value + after;
|
|
237744
|
-
let
|
|
237718
|
+
let index2 = -1;
|
|
237745
237719
|
let start3 = 0;
|
|
237746
237720
|
let match;
|
|
237747
237721
|
while (match = expression.exec(whole)) {
|
|
237748
237722
|
positions.push(match.index);
|
|
237749
237723
|
}
|
|
237750
|
-
while (++
|
|
237751
|
-
if (start3 !== positions[
|
|
237752
|
-
results.push(value.slice(start3, positions[
|
|
237724
|
+
while (++index2 < positions.length) {
|
|
237725
|
+
if (start3 !== positions[index2]) {
|
|
237726
|
+
results.push(value.slice(start3, positions[index2]));
|
|
237753
237727
|
}
|
|
237754
237728
|
results.push("\\");
|
|
237755
|
-
start3 = positions[
|
|
237729
|
+
start3 = positions[index2];
|
|
237756
237730
|
}
|
|
237757
237731
|
results.push(value.slice(start3));
|
|
237758
237732
|
return results.join("");
|
|
@@ -239792,11 +239766,11 @@ types$1.backQuote.updateContext = function() {
|
|
|
239792
239766
|
};
|
|
239793
239767
|
types$1.star.updateContext = function(prevType) {
|
|
239794
239768
|
if (prevType === types$1._function) {
|
|
239795
|
-
var
|
|
239796
|
-
if (this.context[
|
|
239797
|
-
this.context[
|
|
239769
|
+
var index2 = this.context.length - 1;
|
|
239770
|
+
if (this.context[index2] === types.f_expr) {
|
|
239771
|
+
this.context[index2] = types.f_expr_gen;
|
|
239798
239772
|
} else {
|
|
239799
|
-
this.context[
|
|
239773
|
+
this.context[index2] = types.f_gen;
|
|
239800
239774
|
}
|
|
239801
239775
|
}
|
|
239802
239776
|
this.exprAllowed = true;
|
|
@@ -242409,11 +242383,11 @@ pp.tryReadTemplateToken = function() {
|
|
|
242409
242383
|
}
|
|
242410
242384
|
this.inTemplateElement = false;
|
|
242411
242385
|
};
|
|
242412
|
-
pp.invalidStringToken = function(
|
|
242386
|
+
pp.invalidStringToken = function(position2, message) {
|
|
242413
242387
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
242414
242388
|
throw INVALID_TEMPLATE_ESCAPE_ERROR;
|
|
242415
242389
|
} else {
|
|
242416
|
-
this.raise(
|
|
242390
|
+
this.raise(position2, message);
|
|
242417
242391
|
}
|
|
242418
242392
|
};
|
|
242419
242393
|
pp.readTmplToken = function() {
|
|
@@ -242663,13 +242637,13 @@ function visit2(tree, visitor) {
|
|
|
242663
242637
|
leave = visitor.leave;
|
|
242664
242638
|
}
|
|
242665
242639
|
build(tree, null, null, [])();
|
|
242666
|
-
function build(node, key,
|
|
242640
|
+
function build(node, key, index2, parents) {
|
|
242667
242641
|
if (nodelike(node)) {
|
|
242668
242642
|
visit3.displayName = "node (" + color2(node.type) + ")";
|
|
242669
242643
|
}
|
|
242670
242644
|
return visit3;
|
|
242671
242645
|
function visit3() {
|
|
242672
|
-
var result = enter ? toResult2(enter(node, key,
|
|
242646
|
+
var result = enter ? toResult2(enter(node, key, index2, parents)) : [];
|
|
242673
242647
|
var cKey;
|
|
242674
242648
|
var cIndex;
|
|
242675
242649
|
var grandparents;
|
|
@@ -242705,7 +242679,7 @@ function visit2(tree, visitor) {
|
|
|
242705
242679
|
}
|
|
242706
242680
|
}
|
|
242707
242681
|
}
|
|
242708
|
-
return leave ? toResult2(leave(node, key,
|
|
242682
|
+
return leave ? toResult2(leave(node, key, index2, parents)) : result;
|
|
242709
242683
|
}
|
|
242710
242684
|
}
|
|
242711
242685
|
}
|
|
@@ -242735,13 +242709,13 @@ function location(file) {
|
|
|
242735
242709
|
indices.push(value.length + 1);
|
|
242736
242710
|
return { toPoint, toOffset };
|
|
242737
242711
|
function toPoint(offset3) {
|
|
242738
|
-
var
|
|
242712
|
+
var index2 = -1;
|
|
242739
242713
|
if (offset3 > -1 && offset3 < indices[indices.length - 1]) {
|
|
242740
|
-
while (++
|
|
242741
|
-
if (indices[
|
|
242714
|
+
while (++index2 < indices.length) {
|
|
242715
|
+
if (indices[index2] > offset3) {
|
|
242742
242716
|
return {
|
|
242743
|
-
line:
|
|
242744
|
-
column: offset3 - (indices[
|
|
242717
|
+
line: index2 + 1,
|
|
242718
|
+
column: offset3 - (indices[index2 - 1] || 0) + 1,
|
|
242745
242719
|
offset: offset3
|
|
242746
242720
|
};
|
|
242747
242721
|
}
|
|
@@ -242749,9 +242723,9 @@ function location(file) {
|
|
|
242749
242723
|
}
|
|
242750
242724
|
return { line: void 0, column: void 0, offset: void 0 };
|
|
242751
242725
|
}
|
|
242752
|
-
function toOffset(
|
|
242753
|
-
var line2 =
|
|
242754
|
-
var column =
|
|
242726
|
+
function toOffset(point3) {
|
|
242727
|
+
var line2 = point3 && point3.line;
|
|
242728
|
+
var column = point3 && point3.column;
|
|
242755
242729
|
var offset3;
|
|
242756
242730
|
if (typeof line2 === "number" && typeof column === "number" && !Number.isNaN(line2) && !Number.isNaN(column) && line2 - 1 in indices) {
|
|
242757
242731
|
offset3 = (indices[line2 - 2] || 0) + column - 1 || 0;
|
|
@@ -242775,7 +242749,7 @@ function eventsToAcorn(events, options) {
|
|
|
242775
242749
|
});
|
|
242776
242750
|
const chunks = [];
|
|
242777
242751
|
const lines2 = {};
|
|
242778
|
-
let
|
|
242752
|
+
let index2 = -1;
|
|
242779
242753
|
let swallow = false;
|
|
242780
242754
|
let estree;
|
|
242781
242755
|
let exception;
|
|
@@ -242784,8 +242758,8 @@ function eventsToAcorn(events, options) {
|
|
|
242784
242758
|
startLine = options.start.line;
|
|
242785
242759
|
lines2[startLine] = options.start;
|
|
242786
242760
|
}
|
|
242787
|
-
while (++
|
|
242788
|
-
const [kind, token, context] = events[
|
|
242761
|
+
while (++index2 < events.length) {
|
|
242762
|
+
const [kind, token, context] = events[index2];
|
|
242789
242763
|
if (kind === "exit") {
|
|
242790
242764
|
chunks.push(context.sliceSerialize(token));
|
|
242791
242765
|
setPoint(token.start);
|
|
@@ -242807,12 +242781,12 @@ function eventsToAcorn(events, options) {
|
|
|
242807
242781
|
estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value, 0, acornConfig) : options.acorn.parse(value, acornConfig);
|
|
242808
242782
|
} catch (error_) {
|
|
242809
242783
|
const error = error_;
|
|
242810
|
-
const
|
|
242784
|
+
const point3 = parseOffsetToUnistPoint(error.pos);
|
|
242811
242785
|
error.message = String(error.message).replace(/ \(\d+:\d+\)$/, "");
|
|
242812
|
-
error.pos =
|
|
242786
|
+
error.pos = point3.offset;
|
|
242813
242787
|
error.loc = {
|
|
242814
|
-
line:
|
|
242815
|
-
column:
|
|
242788
|
+
line: point3.line,
|
|
242789
|
+
column: point3.column - 1
|
|
242816
242790
|
};
|
|
242817
242791
|
exception = error;
|
|
242818
242792
|
swallow = error.raisedAt >= prefix.length + source2.length || error.message === "Unterminated comment";
|
|
@@ -242835,25 +242809,25 @@ function eventsToAcorn(events, options) {
|
|
|
242835
242809
|
comments: []
|
|
242836
242810
|
};
|
|
242837
242811
|
} else {
|
|
242838
|
-
const
|
|
242812
|
+
const point3 = parseOffsetToUnistPoint(estree.end);
|
|
242839
242813
|
exception = new Error("Unexpected content after expression");
|
|
242840
|
-
exception.pos =
|
|
242814
|
+
exception.pos = point3.offset;
|
|
242841
242815
|
exception.loc = {
|
|
242842
|
-
line:
|
|
242843
|
-
column:
|
|
242816
|
+
line: point3.line,
|
|
242817
|
+
column: point3.column - 1
|
|
242844
242818
|
};
|
|
242845
242819
|
estree = void 0;
|
|
242846
242820
|
}
|
|
242847
242821
|
}
|
|
242848
242822
|
if (estree) {
|
|
242849
242823
|
estree.comments = comments;
|
|
242850
|
-
visit2(estree, (esnode, field,
|
|
242824
|
+
visit2(estree, (esnode, field, index3, parents) => {
|
|
242851
242825
|
let context = parents[parents.length - 1];
|
|
242852
242826
|
let prop = field;
|
|
242853
242827
|
if (esnode.type === "ParenthesizedExpression" && context && prop) {
|
|
242854
|
-
if (typeof
|
|
242828
|
+
if (typeof index3 === "number") {
|
|
242855
242829
|
context = context[prop];
|
|
242856
|
-
prop =
|
|
242830
|
+
prop = index3;
|
|
242857
242831
|
}
|
|
242858
242832
|
context[prop] = esnode.expression;
|
|
242859
242833
|
}
|
|
@@ -242923,12 +242897,12 @@ function eventsToAcorn(events, options) {
|
|
|
242923
242897
|
offset: offset3
|
|
242924
242898
|
};
|
|
242925
242899
|
}
|
|
242926
|
-
function setPoint(
|
|
242927
|
-
if (!startLine ||
|
|
242928
|
-
startLine =
|
|
242900
|
+
function setPoint(point3) {
|
|
242901
|
+
if (!startLine || point3.line < startLine) {
|
|
242902
|
+
startLine = point3.line;
|
|
242929
242903
|
}
|
|
242930
|
-
if (!(
|
|
242931
|
-
lines2[
|
|
242904
|
+
if (!(point3.line in lines2) || lines2[point3.line].offset > point3.offset) {
|
|
242905
|
+
lines2[point3.line] = point3;
|
|
242932
242906
|
}
|
|
242933
242907
|
}
|
|
242934
242908
|
}
|
|
@@ -243817,7 +243791,7 @@ function mdxjsEsm(options) {
|
|
|
243817
243791
|
const self2 = this;
|
|
243818
243792
|
const definedModuleSpecifiers = self2.parser.definedModuleSpecifiers || (self2.parser.definedModuleSpecifiers = []);
|
|
243819
243793
|
const eventStart = this.events.length + 1;
|
|
243820
|
-
let
|
|
243794
|
+
let index2 = 0;
|
|
243821
243795
|
let buffer2;
|
|
243822
243796
|
return self2.interrupt ? nok : start3;
|
|
243823
243797
|
function start3(code2) {
|
|
@@ -243829,9 +243803,9 @@ function mdxjsEsm(options) {
|
|
|
243829
243803
|
return keyword(code2);
|
|
243830
243804
|
}
|
|
243831
243805
|
function keyword(code2) {
|
|
243832
|
-
if (code2 === buffer2.charCodeAt(
|
|
243806
|
+
if (code2 === buffer2.charCodeAt(index2++)) {
|
|
243833
243807
|
effects.consume(code2);
|
|
243834
|
-
return
|
|
243808
|
+
return index2 === buffer2.length ? after : keyword;
|
|
243835
243809
|
}
|
|
243836
243810
|
return nok(code2);
|
|
243837
243811
|
}
|
|
@@ -243874,7 +243848,7 @@ function mdxjsEsm(options) {
|
|
|
243874
243848
|
return atEnd(code2);
|
|
243875
243849
|
}
|
|
243876
243850
|
function atEnd(code2) {
|
|
243877
|
-
let
|
|
243851
|
+
let index3 = -1;
|
|
243878
243852
|
const result = eventsToAcorn(self2.events.slice(eventStart), {
|
|
243879
243853
|
acorn,
|
|
243880
243854
|
acornOptions,
|
|
@@ -243897,8 +243871,8 @@ function mdxjsEsm(options) {
|
|
|
243897
243871
|
if (definedModuleSpecifiers.length > 0) {
|
|
243898
243872
|
result.estree.body.shift();
|
|
243899
243873
|
}
|
|
243900
|
-
while (++
|
|
243901
|
-
const node = result.estree.body[
|
|
243874
|
+
while (++index3 < result.estree.body.length) {
|
|
243875
|
+
const node = result.estree.body[index3];
|
|
243902
243876
|
if (!allowedAcornTypes.has(node.type)) {
|
|
243903
243877
|
throw new VFileMessage(
|
|
243904
243878
|
"Unexpected `" + node.type + "` in code: only import/exports are supported",
|
|
@@ -243907,9 +243881,9 @@ function mdxjsEsm(options) {
|
|
|
243907
243881
|
);
|
|
243908
243882
|
}
|
|
243909
243883
|
if (node.type === "ImportDeclaration" && !self2.interrupt) {
|
|
243910
|
-
let
|
|
243911
|
-
while (++
|
|
243912
|
-
definedModuleSpecifiers.push(node.specifiers[
|
|
243884
|
+
let index4 = -1;
|
|
243885
|
+
while (++index4 < node.specifiers.length) {
|
|
243886
|
+
definedModuleSpecifiers.push(node.specifiers[index4].local.name);
|
|
243913
243887
|
}
|
|
243914
243888
|
}
|
|
243915
243889
|
}
|
|
@@ -244008,10 +243982,10 @@ function ccount(value, character) {
|
|
|
244008
243982
|
throw new TypeError("Expected character");
|
|
244009
243983
|
}
|
|
244010
243984
|
let count = 0;
|
|
244011
|
-
let
|
|
244012
|
-
while (
|
|
243985
|
+
let index2 = source2.indexOf(character);
|
|
243986
|
+
while (index2 !== -1) {
|
|
244013
243987
|
count++;
|
|
244014
|
-
|
|
243988
|
+
index2 = source2.indexOf(character, index2 + character.length);
|
|
244015
243989
|
}
|
|
244016
243990
|
return count;
|
|
244017
243991
|
}
|
|
@@ -244196,37 +244170,37 @@ var messages = [
|
|
|
244196
244170
|
function parseEntities(value, options = {}) {
|
|
244197
244171
|
const additional = typeof options.additional === "string" ? options.additional.charCodeAt(0) : options.additional;
|
|
244198
244172
|
const result = [];
|
|
244199
|
-
let
|
|
244173
|
+
let index2 = 0;
|
|
244200
244174
|
let lines2 = -1;
|
|
244201
244175
|
let queue = "";
|
|
244202
|
-
let
|
|
244176
|
+
let point3;
|
|
244203
244177
|
let indent;
|
|
244204
244178
|
if (options.position) {
|
|
244205
244179
|
if ("start" in options.position || "indent" in options.position) {
|
|
244206
244180
|
indent = options.position.indent;
|
|
244207
|
-
|
|
244181
|
+
point3 = options.position.start;
|
|
244208
244182
|
} else {
|
|
244209
|
-
|
|
244183
|
+
point3 = options.position;
|
|
244210
244184
|
}
|
|
244211
244185
|
}
|
|
244212
|
-
let line2 = (
|
|
244213
|
-
let column = (
|
|
244186
|
+
let line2 = (point3 ? point3.line : 0) || 1;
|
|
244187
|
+
let column = (point3 ? point3.column : 0) || 1;
|
|
244214
244188
|
let previous2 = now();
|
|
244215
244189
|
let character;
|
|
244216
|
-
|
|
244217
|
-
while (++
|
|
244190
|
+
index2--;
|
|
244191
|
+
while (++index2 <= value.length) {
|
|
244218
244192
|
if (character === 10) {
|
|
244219
244193
|
column = (indent ? indent[lines2] : 0) || 1;
|
|
244220
244194
|
}
|
|
244221
|
-
character = value.charCodeAt(
|
|
244195
|
+
character = value.charCodeAt(index2);
|
|
244222
244196
|
if (character === 38) {
|
|
244223
|
-
const following = value.charCodeAt(
|
|
244197
|
+
const following = value.charCodeAt(index2 + 1);
|
|
244224
244198
|
if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) {
|
|
244225
244199
|
queue += fromCharCode(character);
|
|
244226
244200
|
column++;
|
|
244227
244201
|
continue;
|
|
244228
244202
|
}
|
|
244229
|
-
const start3 =
|
|
244203
|
+
const start3 = index2 + 1;
|
|
244230
244204
|
let begin = start3;
|
|
244231
244205
|
let end = start3;
|
|
244232
244206
|
let type;
|
|
@@ -244331,7 +244305,7 @@ function parseEntities(value, options = {}) {
|
|
|
244331
244305
|
if (reference) {
|
|
244332
244306
|
flush();
|
|
244333
244307
|
previous2 = now();
|
|
244334
|
-
|
|
244308
|
+
index2 = end - 1;
|
|
244335
244309
|
column += end - start3 + 1;
|
|
244336
244310
|
result.push(reference);
|
|
244337
244311
|
const next = now();
|
|
@@ -244349,7 +244323,7 @@ function parseEntities(value, options = {}) {
|
|
|
244349
244323
|
characters = value.slice(start3 - 1, end);
|
|
244350
244324
|
queue += characters;
|
|
244351
244325
|
column += characters.length;
|
|
244352
|
-
|
|
244326
|
+
index2 = end - 1;
|
|
244353
244327
|
}
|
|
244354
244328
|
} else {
|
|
244355
244329
|
if (character === 10) {
|
|
@@ -244370,19 +244344,19 @@ function parseEntities(value, options = {}) {
|
|
|
244370
244344
|
return {
|
|
244371
244345
|
line: line2,
|
|
244372
244346
|
column,
|
|
244373
|
-
offset:
|
|
244347
|
+
offset: index2 + ((point3 ? point3.offset : 0) || 0)
|
|
244374
244348
|
};
|
|
244375
244349
|
}
|
|
244376
244350
|
function warning(code2, offset3) {
|
|
244377
|
-
let
|
|
244351
|
+
let position2;
|
|
244378
244352
|
if (options.warning) {
|
|
244379
|
-
|
|
244380
|
-
|
|
244381
|
-
|
|
244353
|
+
position2 = now();
|
|
244354
|
+
position2.column += offset3;
|
|
244355
|
+
position2.offset += offset3;
|
|
244382
244356
|
options.warning.call(
|
|
244383
244357
|
options.warningContext,
|
|
244384
244358
|
messages[code2],
|
|
244385
|
-
|
|
244359
|
+
position2,
|
|
244386
244360
|
code2
|
|
244387
244361
|
);
|
|
244388
244362
|
}
|
|
@@ -244420,26 +244394,26 @@ function core(value, options) {
|
|
|
244420
244394
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,
|
|
244421
244395
|
basic
|
|
244422
244396
|
);
|
|
244423
|
-
function surrogate(pair,
|
|
244397
|
+
function surrogate(pair, index2, all2) {
|
|
244424
244398
|
return options.format(
|
|
244425
244399
|
(pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
|
|
244426
|
-
all2.charCodeAt(
|
|
244400
|
+
all2.charCodeAt(index2 + 2),
|
|
244427
244401
|
options
|
|
244428
244402
|
);
|
|
244429
244403
|
}
|
|
244430
|
-
function basic(character,
|
|
244404
|
+
function basic(character, index2, all2) {
|
|
244431
244405
|
return options.format(
|
|
244432
244406
|
character.charCodeAt(0),
|
|
244433
|
-
all2.charCodeAt(
|
|
244407
|
+
all2.charCodeAt(index2 + 1),
|
|
244434
244408
|
options
|
|
244435
244409
|
);
|
|
244436
244410
|
}
|
|
244437
244411
|
}
|
|
244438
244412
|
function charactersToExpression(subset) {
|
|
244439
244413
|
const groups = [];
|
|
244440
|
-
let
|
|
244441
|
-
while (++
|
|
244442
|
-
groups.push(subset[
|
|
244414
|
+
let index2 = -1;
|
|
244415
|
+
while (++index2 < subset.length) {
|
|
244416
|
+
groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"));
|
|
244443
244417
|
}
|
|
244444
244418
|
return new RegExp("(?:" + groups.join("|") + ")", "g");
|
|
244445
244419
|
}
|
|
@@ -244658,10 +244632,10 @@ function mdxJsxFromMarkdown() {
|
|
|
244658
244632
|
function onErrorRightIsTag(closing, open) {
|
|
244659
244633
|
const tag = this.getData("mdxJsxTag");
|
|
244660
244634
|
const place = closing ? " before the end of `" + closing.type + "`" : "";
|
|
244661
|
-
const
|
|
244635
|
+
const position2 = closing ? { start: closing.start, end: closing.end } : void 0;
|
|
244662
244636
|
throw new VFileMessage(
|
|
244663
244637
|
"Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
|
|
244664
|
-
|
|
244638
|
+
position2,
|
|
244665
244639
|
"mdast-util-mdx-jsx:end-tag-mismatch"
|
|
244666
244640
|
);
|
|
244667
244641
|
}
|
|
@@ -244706,15 +244680,15 @@ function mdxJsxToMarkdown(options) {
|
|
|
244706
244680
|
const tracker = track(safeOptions);
|
|
244707
244681
|
const selfClosing = node.name && (!node.children || node.children.length === 0);
|
|
244708
244682
|
const exit2 = context.enter(node.type);
|
|
244709
|
-
let
|
|
244683
|
+
let index2 = -1;
|
|
244710
244684
|
const serializedAttributes = [];
|
|
244711
244685
|
let value = tracker.move("<" + (node.name || ""));
|
|
244712
244686
|
if (node.attributes && node.attributes.length > 0) {
|
|
244713
244687
|
if (!node.name) {
|
|
244714
244688
|
throw new Error("Cannot serialize fragment w/ attributes");
|
|
244715
244689
|
}
|
|
244716
|
-
while (++
|
|
244717
|
-
const attribute = node.attributes[
|
|
244690
|
+
while (++index2 < node.attributes.length) {
|
|
244691
|
+
const attribute = node.attributes[index2];
|
|
244718
244692
|
let result;
|
|
244719
244693
|
if (attribute.type === "mdxJsxExpressionAttribute") {
|
|
244720
244694
|
result = "{" + (attribute.value || "") + "}";
|
|
@@ -245060,10 +245034,10 @@ function mdxJsxFromMarkdown2({ patterns }) {
|
|
|
245060
245034
|
if (!tag)
|
|
245061
245035
|
return;
|
|
245062
245036
|
const place = closing ? " before the end of `" + closing.type + "`" : "";
|
|
245063
|
-
const
|
|
245037
|
+
const position2 = closing ? { start: closing.start, end: closing.end } : void 0;
|
|
245064
245038
|
throw new VFileMessage(
|
|
245065
245039
|
"Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
|
|
245066
|
-
|
|
245040
|
+
position2,
|
|
245067
245041
|
"mdast-util-mdx-jsx:end-tag-mismatch"
|
|
245068
245042
|
);
|
|
245069
245043
|
};
|
|
@@ -245145,15 +245119,15 @@ var mdxJsxToMarkdown2 = function(options) {
|
|
|
245145
245119
|
const tracker = track(safeOptions);
|
|
245146
245120
|
const selfClosing = pattern.leaf;
|
|
245147
245121
|
const exit2 = context.enter(node.type);
|
|
245148
|
-
let
|
|
245122
|
+
let index2 = -1;
|
|
245149
245123
|
const serializedAttributes = [];
|
|
245150
245124
|
let value = tracker.move(pattern.start + " " + (patternName || ""));
|
|
245151
245125
|
if (node.attributes && node.attributes.length > 0) {
|
|
245152
245126
|
if (!node.name) {
|
|
245153
245127
|
throw new Error("Cannot serialize fragment w/ attributes");
|
|
245154
245128
|
}
|
|
245155
|
-
while (++
|
|
245156
|
-
const attribute = node.attributes[
|
|
245129
|
+
while (++index2 < node.attributes.length) {
|
|
245130
|
+
const attribute = node.attributes[index2];
|
|
245157
245131
|
let result;
|
|
245158
245132
|
if (attribute?.type === "mdxJsxExpressionAttribute") {
|
|
245159
245133
|
result = "{" + (attribute.value || "") + "}";
|
|
@@ -245682,11 +245656,11 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
245682
245656
|
}
|
|
245683
245657
|
}
|
|
245684
245658
|
let nonMatchingSiblingIndex = 0;
|
|
245685
|
-
if (content4.slice(1).every((content5,
|
|
245659
|
+
if (content4.slice(1).every((content5, index2) => {
|
|
245686
245660
|
if (matches(marks, getMarks(content5))) {
|
|
245687
245661
|
return true;
|
|
245688
245662
|
} else {
|
|
245689
|
-
nonMatchingSiblingIndex =
|
|
245663
|
+
nonMatchingSiblingIndex = index2;
|
|
245690
245664
|
return false;
|
|
245691
245665
|
}
|
|
245692
245666
|
})) {
|
|
@@ -245696,9 +245670,9 @@ var eat2 = (c, field, imageCallback) => {
|
|
|
245696
245670
|
const markCounts = {};
|
|
245697
245671
|
marks.forEach((mark) => {
|
|
245698
245672
|
let count2 = 1;
|
|
245699
|
-
matchingSiblings.every((sibling,
|
|
245673
|
+
matchingSiblings.every((sibling, index2) => {
|
|
245700
245674
|
if (getMarks(sibling).includes(mark)) {
|
|
245701
|
-
count2 =
|
|
245675
|
+
count2 = index2 + 1;
|
|
245702
245676
|
return true;
|
|
245703
245677
|
}
|
|
245704
245678
|
});
|
|
@@ -246520,11 +246494,11 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
246520
246494
|
}
|
|
246521
246495
|
}
|
|
246522
246496
|
let nonMatchingSiblingIndex = 0;
|
|
246523
|
-
if (content4.slice(1).every((content5,
|
|
246497
|
+
if (content4.slice(1).every((content5, index2) => {
|
|
246524
246498
|
if (matches2(marks, getMarks(content5))) {
|
|
246525
246499
|
return true;
|
|
246526
246500
|
} else {
|
|
246527
|
-
nonMatchingSiblingIndex =
|
|
246501
|
+
nonMatchingSiblingIndex = index2;
|
|
246528
246502
|
return false;
|
|
246529
246503
|
}
|
|
246530
246504
|
})) {
|
|
@@ -246534,9 +246508,9 @@ var eat3 = (c, field, imageCallback) => {
|
|
|
246534
246508
|
const markCounts = {};
|
|
246535
246509
|
marks.forEach((mark) => {
|
|
246536
246510
|
let count2 = 1;
|
|
246537
|
-
matchingSiblings.every((sibling,
|
|
246511
|
+
matchingSiblings.every((sibling, index2) => {
|
|
246538
246512
|
if (getMarks(sibling).includes(mark)) {
|
|
246539
|
-
count2 =
|
|
246513
|
+
count2 = index2 + 1;
|
|
246540
246514
|
return true;
|
|
246541
246515
|
}
|
|
246542
246516
|
});
|
|
@@ -246851,18 +246825,18 @@ function initializeDocument2(effects) {
|
|
|
246851
246825
|
}
|
|
246852
246826
|
const indexBeforeExits = self2.events.length;
|
|
246853
246827
|
let indexBeforeFlow = indexBeforeExits;
|
|
246854
|
-
let
|
|
246828
|
+
let point3;
|
|
246855
246829
|
while (indexBeforeFlow--) {
|
|
246856
246830
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
246857
|
-
|
|
246831
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
246858
246832
|
break;
|
|
246859
246833
|
}
|
|
246860
246834
|
}
|
|
246861
246835
|
exitContainers(continued);
|
|
246862
|
-
let
|
|
246863
|
-
while (
|
|
246864
|
-
self2.events[
|
|
246865
|
-
|
|
246836
|
+
let index2 = indexBeforeExits;
|
|
246837
|
+
while (index2 < self2.events.length) {
|
|
246838
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
246839
|
+
index2++;
|
|
246866
246840
|
}
|
|
246867
246841
|
splice(
|
|
246868
246842
|
self2.events,
|
|
@@ -246870,7 +246844,7 @@ function initializeDocument2(effects) {
|
|
|
246870
246844
|
0,
|
|
246871
246845
|
self2.events.slice(indexBeforeExits)
|
|
246872
246846
|
);
|
|
246873
|
-
self2.events.length =
|
|
246847
|
+
self2.events.length = index2;
|
|
246874
246848
|
return checkNewContainers(code2);
|
|
246875
246849
|
}
|
|
246876
246850
|
return start3(code2);
|
|
@@ -246962,30 +246936,30 @@ function initializeDocument2(effects) {
|
|
|
246962
246936
|
childFlow.defineSkip(token.start);
|
|
246963
246937
|
childFlow.write(stream);
|
|
246964
246938
|
if (self2.parser.lazy[token.start.line]) {
|
|
246965
|
-
let
|
|
246966
|
-
while (
|
|
246967
|
-
if (childFlow.events[
|
|
246939
|
+
let index2 = childFlow.events.length;
|
|
246940
|
+
while (index2--) {
|
|
246941
|
+
if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
|
|
246968
246942
|
return;
|
|
246969
246943
|
}
|
|
246970
246944
|
}
|
|
246971
246945
|
const indexBeforeExits = self2.events.length;
|
|
246972
246946
|
let indexBeforeFlow = indexBeforeExits;
|
|
246973
246947
|
let seen;
|
|
246974
|
-
let
|
|
246948
|
+
let point3;
|
|
246975
246949
|
while (indexBeforeFlow--) {
|
|
246976
246950
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
246977
246951
|
if (seen) {
|
|
246978
|
-
|
|
246952
|
+
point3 = self2.events[indexBeforeFlow][1].end;
|
|
246979
246953
|
break;
|
|
246980
246954
|
}
|
|
246981
246955
|
seen = true;
|
|
246982
246956
|
}
|
|
246983
246957
|
}
|
|
246984
246958
|
exitContainers(continued);
|
|
246985
|
-
|
|
246986
|
-
while (
|
|
246987
|
-
self2.events[
|
|
246988
|
-
|
|
246959
|
+
index2 = indexBeforeExits;
|
|
246960
|
+
while (index2 < self2.events.length) {
|
|
246961
|
+
self2.events[index2][1].end = Object.assign({}, point3);
|
|
246962
|
+
index2++;
|
|
246989
246963
|
}
|
|
246990
246964
|
splice(
|
|
246991
246965
|
self2.events,
|
|
@@ -246993,13 +246967,13 @@ function initializeDocument2(effects) {
|
|
|
246993
246967
|
0,
|
|
246994
246968
|
self2.events.slice(indexBeforeExits)
|
|
246995
246969
|
);
|
|
246996
|
-
self2.events.length =
|
|
246970
|
+
self2.events.length = index2;
|
|
246997
246971
|
}
|
|
246998
246972
|
}
|
|
246999
246973
|
function exitContainers(size) {
|
|
247000
|
-
let
|
|
247001
|
-
while (
|
|
247002
|
-
const entry = stack[
|
|
246974
|
+
let index2 = stack.length;
|
|
246975
|
+
while (index2-- > size) {
|
|
246976
|
+
const entry = stack[index2];
|
|
247003
246977
|
self2.containerState = entry[1];
|
|
247004
246978
|
entry[0].exit.call(self2, effects);
|
|
247005
246979
|
}
|
|
@@ -247112,10 +247086,10 @@ function initializeFactory2(field) {
|
|
|
247112
247086
|
return true;
|
|
247113
247087
|
}
|
|
247114
247088
|
const list3 = constructs2[code2];
|
|
247115
|
-
let
|
|
247089
|
+
let index2 = -1;
|
|
247116
247090
|
if (list3) {
|
|
247117
|
-
while (++
|
|
247118
|
-
const item = list3[
|
|
247091
|
+
while (++index2 < list3.length) {
|
|
247092
|
+
const item = list3[index2];
|
|
247119
247093
|
if (!item.previous || item.previous.call(self2, self2.previous)) {
|
|
247120
247094
|
return true;
|
|
247121
247095
|
}
|
|
@@ -247128,19 +247102,19 @@ function initializeFactory2(field) {
|
|
|
247128
247102
|
function createResolver2(extraResolver) {
|
|
247129
247103
|
return resolveAllText;
|
|
247130
247104
|
function resolveAllText(events, context) {
|
|
247131
|
-
let
|
|
247105
|
+
let index2 = -1;
|
|
247132
247106
|
let enter;
|
|
247133
|
-
while (++
|
|
247107
|
+
while (++index2 <= events.length) {
|
|
247134
247108
|
if (enter === void 0) {
|
|
247135
|
-
if (events[
|
|
247136
|
-
enter =
|
|
247137
|
-
|
|
247109
|
+
if (events[index2] && events[index2][1].type === "data") {
|
|
247110
|
+
enter = index2;
|
|
247111
|
+
index2++;
|
|
247138
247112
|
}
|
|
247139
|
-
} else if (!events[
|
|
247140
|
-
if (
|
|
247141
|
-
events[enter][1].end = events[
|
|
247142
|
-
events.splice(enter + 2,
|
|
247143
|
-
|
|
247113
|
+
} else if (!events[index2] || events[index2][1].type !== "data") {
|
|
247114
|
+
if (index2 !== enter + 2) {
|
|
247115
|
+
events[enter][1].end = events[index2 - 1][1].end;
|
|
247116
|
+
events.splice(enter + 2, index2 - enter - 2);
|
|
247117
|
+
index2 = enter + 2;
|
|
247144
247118
|
}
|
|
247145
247119
|
enter = void 0;
|
|
247146
247120
|
}
|
|
@@ -247154,12 +247128,12 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247154
247128
|
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
|
|
247155
247129
|
const data3 = events[eventIndex - 1][1];
|
|
247156
247130
|
const chunks = context.sliceStream(data3);
|
|
247157
|
-
let
|
|
247131
|
+
let index2 = chunks.length;
|
|
247158
247132
|
let bufferIndex = -1;
|
|
247159
247133
|
let size = 0;
|
|
247160
247134
|
let tabs;
|
|
247161
|
-
while (
|
|
247162
|
-
const chunk = chunks[
|
|
247135
|
+
while (index2--) {
|
|
247136
|
+
const chunk = chunks[index2];
|
|
247163
247137
|
if (typeof chunk === "string") {
|
|
247164
247138
|
bufferIndex = chunk.length;
|
|
247165
247139
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
@@ -247174,7 +247148,7 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247174
247148
|
size++;
|
|
247175
247149
|
} else if (chunk === -1) {
|
|
247176
247150
|
} else {
|
|
247177
|
-
|
|
247151
|
+
index2++;
|
|
247178
247152
|
break;
|
|
247179
247153
|
}
|
|
247180
247154
|
}
|
|
@@ -247185,8 +247159,8 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247185
247159
|
line: data3.end.line,
|
|
247186
247160
|
column: data3.end.column - size,
|
|
247187
247161
|
offset: data3.end.offset - size,
|
|
247188
|
-
_index: data3.start._index +
|
|
247189
|
-
_bufferIndex:
|
|
247162
|
+
_index: data3.start._index + index2,
|
|
247163
|
+
_bufferIndex: index2 ? bufferIndex : data3.start._bufferIndex + bufferIndex
|
|
247190
247164
|
},
|
|
247191
247165
|
end: Object.assign({}, data3.end)
|
|
247192
247166
|
};
|
|
@@ -247211,7 +247185,7 @@ function resolveAllLineSuffixes2(events, context) {
|
|
|
247211
247185
|
|
|
247212
247186
|
// ../../../node_modules/.pnpm/micromark@3.1.0/node_modules/micromark/lib/create-tokenizer.js
|
|
247213
247187
|
function createTokenizer2(parser, initialize, from) {
|
|
247214
|
-
let
|
|
247188
|
+
let point3 = Object.assign(
|
|
247215
247189
|
from ? Object.assign({}, from) : {
|
|
247216
247190
|
line: 1,
|
|
247217
247191
|
column: 1,
|
|
@@ -247272,7 +247246,7 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247272
247246
|
return sliceChunks2(chunks, token);
|
|
247273
247247
|
}
|
|
247274
247248
|
function now() {
|
|
247275
|
-
return Object.assign({},
|
|
247249
|
+
return Object.assign({}, point3);
|
|
247276
247250
|
}
|
|
247277
247251
|
function defineSkip(value) {
|
|
247278
247252
|
columnStart[value.line] = value.column;
|
|
@@ -247280,15 +247254,15 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247280
247254
|
}
|
|
247281
247255
|
function main() {
|
|
247282
247256
|
let chunkIndex;
|
|
247283
|
-
while (
|
|
247284
|
-
const chunk = chunks[
|
|
247257
|
+
while (point3._index < chunks.length) {
|
|
247258
|
+
const chunk = chunks[point3._index];
|
|
247285
247259
|
if (typeof chunk === "string") {
|
|
247286
|
-
chunkIndex =
|
|
247287
|
-
if (
|
|
247288
|
-
|
|
247260
|
+
chunkIndex = point3._index;
|
|
247261
|
+
if (point3._bufferIndex < 0) {
|
|
247262
|
+
point3._bufferIndex = 0;
|
|
247289
247263
|
}
|
|
247290
|
-
while (
|
|
247291
|
-
go(chunk.charCodeAt(
|
|
247264
|
+
while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
|
|
247265
|
+
go(chunk.charCodeAt(point3._bufferIndex));
|
|
247292
247266
|
}
|
|
247293
247267
|
} else {
|
|
247294
247268
|
go(chunk);
|
|
@@ -247302,21 +247276,21 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247302
247276
|
}
|
|
247303
247277
|
function consume(code2) {
|
|
247304
247278
|
if (markdownLineEnding(code2)) {
|
|
247305
|
-
|
|
247306
|
-
|
|
247307
|
-
|
|
247279
|
+
point3.line++;
|
|
247280
|
+
point3.column = 1;
|
|
247281
|
+
point3.offset += code2 === -3 ? 2 : 1;
|
|
247308
247282
|
accountForPotentialSkip();
|
|
247309
247283
|
} else if (code2 !== -1) {
|
|
247310
|
-
|
|
247311
|
-
|
|
247284
|
+
point3.column++;
|
|
247285
|
+
point3.offset++;
|
|
247312
247286
|
}
|
|
247313
|
-
if (
|
|
247314
|
-
|
|
247287
|
+
if (point3._bufferIndex < 0) {
|
|
247288
|
+
point3._index++;
|
|
247315
247289
|
} else {
|
|
247316
|
-
|
|
247317
|
-
if (
|
|
247318
|
-
|
|
247319
|
-
|
|
247290
|
+
point3._bufferIndex++;
|
|
247291
|
+
if (point3._bufferIndex === chunks[point3._index].length) {
|
|
247292
|
+
point3._bufferIndex = -1;
|
|
247293
|
+
point3._index++;
|
|
247320
247294
|
}
|
|
247321
247295
|
}
|
|
247322
247296
|
context.previous = code2;
|
|
@@ -247431,7 +247405,7 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247431
247405
|
from: startEventsIndex
|
|
247432
247406
|
};
|
|
247433
247407
|
function restore() {
|
|
247434
|
-
|
|
247408
|
+
point3 = startPoint;
|
|
247435
247409
|
context.previous = startPrevious;
|
|
247436
247410
|
context.currentConstruct = startCurrentConstruct;
|
|
247437
247411
|
context.events.length = startEventsIndex;
|
|
@@ -247440,9 +247414,9 @@ function createTokenizer2(parser, initialize, from) {
|
|
|
247440
247414
|
}
|
|
247441
247415
|
}
|
|
247442
247416
|
function accountForPotentialSkip() {
|
|
247443
|
-
if (
|
|
247444
|
-
|
|
247445
|
-
|
|
247417
|
+
if (point3.line in columnStart && point3.column < 2) {
|
|
247418
|
+
point3.column = columnStart[point3.line];
|
|
247419
|
+
point3.offset += columnStart[point3.line] - 1;
|
|
247446
247420
|
}
|
|
247447
247421
|
}
|
|
247448
247422
|
}
|
|
@@ -247466,11 +247440,11 @@ function sliceChunks2(chunks, token) {
|
|
|
247466
247440
|
return view;
|
|
247467
247441
|
}
|
|
247468
247442
|
function serializeChunks2(chunks, expandTabs) {
|
|
247469
|
-
let
|
|
247443
|
+
let index2 = -1;
|
|
247470
247444
|
const result = [];
|
|
247471
247445
|
let atTab;
|
|
247472
|
-
while (++
|
|
247473
|
-
const chunk = chunks[
|
|
247446
|
+
while (++index2 < chunks.length) {
|
|
247447
|
+
const chunk = chunks[index2];
|
|
247474
247448
|
let value;
|
|
247475
247449
|
if (typeof chunk === "string") {
|
|
247476
247450
|
value = chunk;
|
|
@@ -247827,29 +247801,29 @@ function compiler2(options) {
|
|
|
247827
247801
|
getData
|
|
247828
247802
|
};
|
|
247829
247803
|
const listStack = [];
|
|
247830
|
-
let
|
|
247831
|
-
while (++
|
|
247832
|
-
if (events[
|
|
247833
|
-
if (events[
|
|
247834
|
-
listStack.push(
|
|
247804
|
+
let index2 = -1;
|
|
247805
|
+
while (++index2 < events.length) {
|
|
247806
|
+
if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
|
|
247807
|
+
if (events[index2][0] === "enter") {
|
|
247808
|
+
listStack.push(index2);
|
|
247835
247809
|
} else {
|
|
247836
247810
|
const tail = listStack.pop();
|
|
247837
|
-
|
|
247811
|
+
index2 = prepareList(events, tail, index2);
|
|
247838
247812
|
}
|
|
247839
247813
|
}
|
|
247840
247814
|
}
|
|
247841
|
-
|
|
247842
|
-
while (++
|
|
247843
|
-
const handler = config[events[
|
|
247844
|
-
if (own7.call(handler, events[
|
|
247845
|
-
handler[events[
|
|
247815
|
+
index2 = -1;
|
|
247816
|
+
while (++index2 < events.length) {
|
|
247817
|
+
const handler = config[events[index2][0]];
|
|
247818
|
+
if (own7.call(handler, events[index2][1].type)) {
|
|
247819
|
+
handler[events[index2][1].type].call(
|
|
247846
247820
|
Object.assign(
|
|
247847
247821
|
{
|
|
247848
|
-
sliceSerialize: events[
|
|
247822
|
+
sliceSerialize: events[index2][2].sliceSerialize
|
|
247849
247823
|
},
|
|
247850
247824
|
context
|
|
247851
247825
|
),
|
|
247852
|
-
events[
|
|
247826
|
+
events[index2][1]
|
|
247853
247827
|
);
|
|
247854
247828
|
}
|
|
247855
247829
|
}
|
|
@@ -247859,14 +247833,14 @@ function compiler2(options) {
|
|
|
247859
247833
|
handler.call(context, void 0, tail[0]);
|
|
247860
247834
|
}
|
|
247861
247835
|
tree.position = {
|
|
247862
|
-
start:
|
|
247836
|
+
start: point2(
|
|
247863
247837
|
events.length > 0 ? events[0][1].start : {
|
|
247864
247838
|
line: 1,
|
|
247865
247839
|
column: 1,
|
|
247866
247840
|
offset: 0
|
|
247867
247841
|
}
|
|
247868
247842
|
),
|
|
247869
|
-
end:
|
|
247843
|
+
end: point2(
|
|
247870
247844
|
events.length > 0 ? events[events.length - 2][1].end : {
|
|
247871
247845
|
line: 1,
|
|
247872
247846
|
column: 1,
|
|
@@ -247874,22 +247848,22 @@ function compiler2(options) {
|
|
|
247874
247848
|
}
|
|
247875
247849
|
)
|
|
247876
247850
|
};
|
|
247877
|
-
|
|
247878
|
-
while (++
|
|
247879
|
-
tree = config.transforms[
|
|
247851
|
+
index2 = -1;
|
|
247852
|
+
while (++index2 < config.transforms.length) {
|
|
247853
|
+
tree = config.transforms[index2](tree) || tree;
|
|
247880
247854
|
}
|
|
247881
247855
|
return tree;
|
|
247882
247856
|
}
|
|
247883
247857
|
function prepareList(events, start3, length) {
|
|
247884
|
-
let
|
|
247858
|
+
let index2 = start3 - 1;
|
|
247885
247859
|
let containerBalance = -1;
|
|
247886
247860
|
let listSpread = false;
|
|
247887
247861
|
let listItem3;
|
|
247888
247862
|
let lineIndex;
|
|
247889
247863
|
let firstBlankLineIndex;
|
|
247890
247864
|
let atMarker;
|
|
247891
|
-
while (++
|
|
247892
|
-
const event = events[
|
|
247865
|
+
while (++index2 <= length) {
|
|
247866
|
+
const event = events[index2];
|
|
247893
247867
|
if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
|
|
247894
247868
|
if (event[0] === "enter") {
|
|
247895
247869
|
containerBalance++;
|
|
@@ -247900,7 +247874,7 @@ function compiler2(options) {
|
|
|
247900
247874
|
} else if (event[1].type === "lineEndingBlank") {
|
|
247901
247875
|
if (event[0] === "enter") {
|
|
247902
247876
|
if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
|
|
247903
|
-
firstBlankLineIndex =
|
|
247877
|
+
firstBlankLineIndex = index2;
|
|
247904
247878
|
}
|
|
247905
247879
|
atMarker = void 0;
|
|
247906
247880
|
}
|
|
@@ -247910,7 +247884,7 @@ function compiler2(options) {
|
|
|
247910
247884
|
}
|
|
247911
247885
|
if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
|
|
247912
247886
|
if (listItem3) {
|
|
247913
|
-
let tailIndex =
|
|
247887
|
+
let tailIndex = index2;
|
|
247914
247888
|
lineIndex = void 0;
|
|
247915
247889
|
while (tailIndex--) {
|
|
247916
247890
|
const tailEvent = events[tailIndex];
|
|
@@ -247935,8 +247909,8 @@ function compiler2(options) {
|
|
|
247935
247909
|
{},
|
|
247936
247910
|
lineIndex ? events[lineIndex][1].start : event[1].end
|
|
247937
247911
|
);
|
|
247938
|
-
events.splice(lineIndex ||
|
|
247939
|
-
|
|
247912
|
+
events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
|
|
247913
|
+
index2++;
|
|
247940
247914
|
length++;
|
|
247941
247915
|
}
|
|
247942
247916
|
if (event[1].type === "listItemPrefix") {
|
|
@@ -247945,8 +247919,8 @@ function compiler2(options) {
|
|
|
247945
247919
|
_spread: false,
|
|
247946
247920
|
start: Object.assign({}, event[1].start)
|
|
247947
247921
|
};
|
|
247948
|
-
events.splice(
|
|
247949
|
-
|
|
247922
|
+
events.splice(index2, 0, ["enter", listItem3, event[2]]);
|
|
247923
|
+
index2++;
|
|
247950
247924
|
length++;
|
|
247951
247925
|
firstBlankLineIndex = void 0;
|
|
247952
247926
|
atMarker = true;
|
|
@@ -247982,7 +247956,7 @@ function compiler2(options) {
|
|
|
247982
247956
|
this.stack.push(node);
|
|
247983
247957
|
this.tokenStack.push([token, errorHandler]);
|
|
247984
247958
|
node.position = {
|
|
247985
|
-
start:
|
|
247959
|
+
start: point2(token.start)
|
|
247986
247960
|
};
|
|
247987
247961
|
return node;
|
|
247988
247962
|
}
|
|
@@ -248012,7 +247986,7 @@ function compiler2(options) {
|
|
|
248012
247986
|
handler.call(this, token, open[0]);
|
|
248013
247987
|
}
|
|
248014
247988
|
}
|
|
248015
|
-
node.position.end =
|
|
247989
|
+
node.position.end = point2(token.end);
|
|
248016
247990
|
return node;
|
|
248017
247991
|
}
|
|
248018
247992
|
function resume() {
|
|
@@ -248096,7 +248070,7 @@ function compiler2(options) {
|
|
|
248096
248070
|
if (!tail || tail.type !== "text") {
|
|
248097
248071
|
tail = text8();
|
|
248098
248072
|
tail.position = {
|
|
248099
|
-
start:
|
|
248073
|
+
start: point2(token.start)
|
|
248100
248074
|
};
|
|
248101
248075
|
node.children.push(tail);
|
|
248102
248076
|
}
|
|
@@ -248105,13 +248079,13 @@ function compiler2(options) {
|
|
|
248105
248079
|
function onexitdata(token) {
|
|
248106
248080
|
const tail = this.stack.pop();
|
|
248107
248081
|
tail.value += this.sliceSerialize(token);
|
|
248108
|
-
tail.position.end =
|
|
248082
|
+
tail.position.end = point2(token.end);
|
|
248109
248083
|
}
|
|
248110
248084
|
function onexitlineending(token) {
|
|
248111
248085
|
const context = this.stack[this.stack.length - 1];
|
|
248112
248086
|
if (getData("atHardBreak")) {
|
|
248113
248087
|
const tail = context.children[context.children.length - 1];
|
|
248114
|
-
tail.position.end =
|
|
248088
|
+
tail.position.end = point2(token.end);
|
|
248115
248089
|
setData("atHardBreak");
|
|
248116
248090
|
return;
|
|
248117
248091
|
}
|
|
@@ -248228,7 +248202,7 @@ function compiler2(options) {
|
|
|
248228
248202
|
}
|
|
248229
248203
|
const tail = this.stack.pop();
|
|
248230
248204
|
tail.value += value;
|
|
248231
|
-
tail.position.end =
|
|
248205
|
+
tail.position.end = point2(token.end);
|
|
248232
248206
|
}
|
|
248233
248207
|
function onexitautolinkprotocol(token) {
|
|
248234
248208
|
onexitdata.call(this, token);
|
|
@@ -248350,7 +248324,7 @@ function compiler2(options) {
|
|
|
248350
248324
|
};
|
|
248351
248325
|
}
|
|
248352
248326
|
}
|
|
248353
|
-
function
|
|
248327
|
+
function point2(d) {
|
|
248354
248328
|
return {
|
|
248355
248329
|
line: d.line,
|
|
248356
248330
|
column: d.column,
|
|
@@ -248358,9 +248332,9 @@ function point3(d) {
|
|
|
248358
248332
|
};
|
|
248359
248333
|
}
|
|
248360
248334
|
function configure3(combined, extensions) {
|
|
248361
|
-
let
|
|
248362
|
-
while (++
|
|
248363
|
-
const value = extensions[
|
|
248335
|
+
let index2 = -1;
|
|
248336
|
+
while (++index2 < extensions.length) {
|
|
248337
|
+
const value = extensions[index2];
|
|
248364
248338
|
if (Array.isArray(value)) {
|
|
248365
248339
|
configure3(combined, value);
|
|
248366
248340
|
} else {
|
|
@@ -252281,11 +252255,11 @@ types$12.backQuote.updateContext = function() {
|
|
|
252281
252255
|
};
|
|
252282
252256
|
types$12.star.updateContext = function(prevType) {
|
|
252283
252257
|
if (prevType === types$12._function) {
|
|
252284
|
-
var
|
|
252285
|
-
if (this.context[
|
|
252286
|
-
this.context[
|
|
252258
|
+
var index2 = this.context.length - 1;
|
|
252259
|
+
if (this.context[index2] === types3.f_expr) {
|
|
252260
|
+
this.context[index2] = types3.f_expr_gen;
|
|
252287
252261
|
} else {
|
|
252288
|
-
this.context[
|
|
252262
|
+
this.context[index2] = types3.f_gen;
|
|
252289
252263
|
}
|
|
252290
252264
|
}
|
|
252291
252265
|
this.exprAllowed = true;
|
|
@@ -254902,11 +254876,11 @@ pp2.tryReadTemplateToken = function() {
|
|
|
254902
254876
|
}
|
|
254903
254877
|
this.inTemplateElement = false;
|
|
254904
254878
|
};
|
|
254905
|
-
pp2.invalidStringToken = function(
|
|
254879
|
+
pp2.invalidStringToken = function(position2, message) {
|
|
254906
254880
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
|
|
254907
254881
|
throw INVALID_TEMPLATE_ESCAPE_ERROR2;
|
|
254908
254882
|
} else {
|
|
254909
|
-
this.raise(
|
|
254883
|
+
this.raise(position2, message);
|
|
254910
254884
|
}
|
|
254911
254885
|
};
|
|
254912
254886
|
pp2.readTmplToken = function() {
|
|
@@ -255124,7 +255098,7 @@ function tokenizer3(input, options) {
|
|
|
255124
255098
|
var fromMarkdown3 = (value, field) => {
|
|
255125
255099
|
const patterns = getFieldPatterns(field);
|
|
255126
255100
|
const acornDefault = acorn_exports;
|
|
255127
|
-
|
|
255101
|
+
const skipHTML = false;
|
|
255128
255102
|
const tree = fromMarkdown2(value, {
|
|
255129
255103
|
extensions: [
|
|
255130
255104
|
mdxJsx2({ acorn: acornDefault, patterns, addResult: true, skipHTML })
|
|
@@ -255136,9 +255110,9 @@ var fromMarkdown3 = (value, field) => {
|
|
|
255136
255110
|
|
|
255137
255111
|
// ../../../node_modules/.pnpm/mdast-util-compact@4.1.1/node_modules/mdast-util-compact/lib/index.js
|
|
255138
255112
|
function compact(tree) {
|
|
255139
|
-
visit(tree, function(child,
|
|
255140
|
-
if (parent &&
|
|
255141
|
-
const previous2 = parent.children[
|
|
255113
|
+
visit(tree, function(child, index2, parent) {
|
|
255114
|
+
if (parent && index2 && (child.type === "text" || child.type === "blockquote")) {
|
|
255115
|
+
const previous2 = parent.children[index2 - 1];
|
|
255142
255116
|
if (previous2.type === child.type) {
|
|
255143
255117
|
if ("value" in child) {
|
|
255144
255118
|
previous2.value += child.value;
|
|
@@ -255146,11 +255120,11 @@ function compact(tree) {
|
|
|
255146
255120
|
if ("children" in child) {
|
|
255147
255121
|
previous2.children = previous2.children.concat(child.children);
|
|
255148
255122
|
}
|
|
255149
|
-
parent.children.splice(
|
|
255123
|
+
parent.children.splice(index2, 1);
|
|
255150
255124
|
if (previous2.position && child.position) {
|
|
255151
255125
|
previous2.position.end = child.position.end;
|
|
255152
255126
|
}
|
|
255153
|
-
return
|
|
255127
|
+
return index2;
|
|
255154
255128
|
}
|
|
255155
255129
|
}
|
|
255156
255130
|
});
|
|
@@ -255244,9 +255218,9 @@ var isArguments_default = isArguments;
|
|
|
255244
255218
|
|
|
255245
255219
|
// ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js
|
|
255246
255220
|
function arrayPush(array, values2) {
|
|
255247
|
-
var
|
|
255248
|
-
while (++
|
|
255249
|
-
array[offset3 +
|
|
255221
|
+
var index2 = -1, length = values2.length, offset3 = array.length;
|
|
255222
|
+
while (++index2 < length) {
|
|
255223
|
+
array[offset3 + index2] = values2[index2];
|
|
255250
255224
|
}
|
|
255251
255225
|
return array;
|
|
255252
255226
|
}
|
|
@@ -255261,11 +255235,11 @@ var isFlattenable_default = isFlattenable;
|
|
|
255261
255235
|
|
|
255262
255236
|
// ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFlatten.js
|
|
255263
255237
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
255264
|
-
var
|
|
255238
|
+
var index2 = -1, length = array.length;
|
|
255265
255239
|
predicate || (predicate = isFlattenable_default);
|
|
255266
255240
|
result || (result = []);
|
|
255267
|
-
while (++
|
|
255268
|
-
var value = array[
|
|
255241
|
+
while (++index2 < length) {
|
|
255242
|
+
var value = array[index2];
|
|
255269
255243
|
if (depth > 0 && predicate(value)) {
|
|
255270
255244
|
if (depth > 1) {
|
|
255271
255245
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
@@ -255473,18 +255447,18 @@ var trimFragments = (string5) => {
|
|
|
255473
255447
|
const rawArr = string5.split("\n");
|
|
255474
255448
|
let openingFragmentIndex = null;
|
|
255475
255449
|
let closingFragmentIndex = null;
|
|
255476
|
-
rawArr.forEach((item,
|
|
255450
|
+
rawArr.forEach((item, index2) => {
|
|
255477
255451
|
if (item.trim() === "<>") {
|
|
255478
255452
|
if (!openingFragmentIndex) {
|
|
255479
|
-
openingFragmentIndex =
|
|
255453
|
+
openingFragmentIndex = index2 + 1;
|
|
255480
255454
|
}
|
|
255481
255455
|
}
|
|
255482
255456
|
});
|
|
255483
|
-
rawArr.reverse().forEach((item,
|
|
255457
|
+
rawArr.reverse().forEach((item, index2) => {
|
|
255484
255458
|
if (item.trim() === "</>") {
|
|
255485
255459
|
const length = rawArr.length - 1;
|
|
255486
255460
|
if (!closingFragmentIndex) {
|
|
255487
|
-
closingFragmentIndex = length -
|
|
255461
|
+
closingFragmentIndex = length - index2;
|
|
255488
255462
|
}
|
|
255489
255463
|
}
|
|
255490
255464
|
});
|
|
@@ -255497,12 +255471,12 @@ var search3 = /\r?\n|\r/g;
|
|
|
255497
255471
|
function source(value, file) {
|
|
255498
255472
|
const doc = String(file);
|
|
255499
255473
|
const loc = location(file);
|
|
255500
|
-
const
|
|
255501
|
-
if (!
|
|
255474
|
+
const position2 = value && typeof value === "object" ? "type" in value ? value.position : value : void 0;
|
|
255475
|
+
if (!position2 || !position2.start || !position2.end) {
|
|
255502
255476
|
return null;
|
|
255503
255477
|
}
|
|
255504
|
-
const endOffset = loc.toOffset(
|
|
255505
|
-
let startOffset = loc.toOffset(
|
|
255478
|
+
const endOffset = loc.toOffset(position2.end);
|
|
255479
|
+
let startOffset = loc.toOffset(position2.start);
|
|
255506
255480
|
if (endOffset === -1 || startOffset === -1) {
|
|
255507
255481
|
return null;
|
|
255508
255482
|
}
|
|
@@ -255745,13 +255719,13 @@ var remarkToSlate = (root3, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
255745
255719
|
child.position
|
|
255746
255720
|
);
|
|
255747
255721
|
default:
|
|
255748
|
-
let
|
|
255722
|
+
let position2;
|
|
255749
255723
|
if (child.type !== "containerDirective") {
|
|
255750
|
-
|
|
255724
|
+
position2 = child.position;
|
|
255751
255725
|
}
|
|
255752
255726
|
throw new RichTextParseError(
|
|
255753
255727
|
`Unknown list item of type ${child.type}`,
|
|
255754
|
-
|
|
255728
|
+
position2
|
|
255755
255729
|
);
|
|
255756
255730
|
}
|
|
255757
255731
|
})
|
|
@@ -255976,14 +255950,14 @@ var remarkToSlate = (root3, field, imageCallback, raw, skipMDXProcess) => {
|
|
|
255976
255950
|
};
|
|
255977
255951
|
};
|
|
255978
255952
|
var RichTextParseError = class extends Error {
|
|
255979
|
-
constructor(message,
|
|
255953
|
+
constructor(message, position2) {
|
|
255980
255954
|
super(message);
|
|
255981
255955
|
__publicField(this, "position");
|
|
255982
255956
|
if (Error.captureStackTrace) {
|
|
255983
255957
|
Error.captureStackTrace(this, RichTextParseError);
|
|
255984
255958
|
}
|
|
255985
255959
|
this.name = "RichTextParseError";
|
|
255986
|
-
this.position =
|
|
255960
|
+
this.position = position2;
|
|
255987
255961
|
}
|
|
255988
255962
|
};
|
|
255989
255963
|
|