bunki 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1209 -424
- package/dist/index.js +1250 -465
- package/dist/server.d.ts +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -4977,20 +4977,20 @@ var require_decode_codepoint = __commonJS((exports) => {
|
|
|
4977
4977
|
|
|
4978
4978
|
// node_modules/entities/lib/decode.js
|
|
4979
4979
|
var require_decode = __commonJS((exports) => {
|
|
4980
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
4981
|
-
if (
|
|
4982
|
-
|
|
4983
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
4980
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
4981
|
+
if (k22 === undefined)
|
|
4982
|
+
k22 = k2;
|
|
4983
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
4984
4984
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
4985
4985
|
desc = { enumerable: true, get: function() {
|
|
4986
|
-
return m2[
|
|
4986
|
+
return m2[k2];
|
|
4987
4987
|
} };
|
|
4988
4988
|
}
|
|
4989
|
-
Object.defineProperty(o,
|
|
4990
|
-
} : function(o, m2,
|
|
4991
|
-
if (
|
|
4992
|
-
|
|
4993
|
-
o[
|
|
4989
|
+
Object.defineProperty(o, k22, desc);
|
|
4990
|
+
} : function(o, m2, k2, k22) {
|
|
4991
|
+
if (k22 === undefined)
|
|
4992
|
+
k22 = k2;
|
|
4993
|
+
o[k22] = m2[k2];
|
|
4994
4994
|
});
|
|
4995
4995
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
4996
4996
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -5002,9 +5002,9 @@ var require_decode = __commonJS((exports) => {
|
|
|
5002
5002
|
return mod;
|
|
5003
5003
|
var result = {};
|
|
5004
5004
|
if (mod != null) {
|
|
5005
|
-
for (var
|
|
5006
|
-
if (
|
|
5007
|
-
__createBinding(result, mod,
|
|
5005
|
+
for (var k2 in mod)
|
|
5006
|
+
if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2))
|
|
5007
|
+
__createBinding(result, mod, k2);
|
|
5008
5008
|
}
|
|
5009
5009
|
__setModuleDefault(result, mod);
|
|
5010
5010
|
return result;
|
|
@@ -6084,20 +6084,20 @@ var require_Tokenizer = __commonJS((exports) => {
|
|
|
6084
6084
|
|
|
6085
6085
|
// node_modules/htmlparser2/lib/Parser.js
|
|
6086
6086
|
var require_Parser = __commonJS((exports) => {
|
|
6087
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
6088
|
-
if (
|
|
6089
|
-
|
|
6090
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
6087
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
6088
|
+
if (k22 === undefined)
|
|
6089
|
+
k22 = k2;
|
|
6090
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
6091
6091
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
6092
6092
|
desc = { enumerable: true, get: function() {
|
|
6093
|
-
return m2[
|
|
6093
|
+
return m2[k2];
|
|
6094
6094
|
} };
|
|
6095
6095
|
}
|
|
6096
|
-
Object.defineProperty(o,
|
|
6097
|
-
} : function(o, m2,
|
|
6098
|
-
if (
|
|
6099
|
-
|
|
6100
|
-
o[
|
|
6096
|
+
Object.defineProperty(o, k22, desc);
|
|
6097
|
+
} : function(o, m2, k2, k22) {
|
|
6098
|
+
if (k22 === undefined)
|
|
6099
|
+
k22 = k2;
|
|
6100
|
+
o[k22] = m2[k2];
|
|
6101
6101
|
});
|
|
6102
6102
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
6103
6103
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -6109,9 +6109,9 @@ var require_Parser = __commonJS((exports) => {
|
|
|
6109
6109
|
return mod;
|
|
6110
6110
|
var result = {};
|
|
6111
6111
|
if (mod != null) {
|
|
6112
|
-
for (var
|
|
6113
|
-
if (
|
|
6114
|
-
__createBinding(result, mod,
|
|
6112
|
+
for (var k2 in mod)
|
|
6113
|
+
if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2))
|
|
6114
|
+
__createBinding(result, mod, k2);
|
|
6115
6115
|
}
|
|
6116
6116
|
__setModuleDefault(result, mod);
|
|
6117
6117
|
return result;
|
|
@@ -6924,20 +6924,20 @@ var require_node = __commonJS((exports) => {
|
|
|
6924
6924
|
|
|
6925
6925
|
// node_modules/domhandler/lib/index.js
|
|
6926
6926
|
var require_lib2 = __commonJS((exports) => {
|
|
6927
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
6928
|
-
if (
|
|
6929
|
-
|
|
6930
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
6927
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
6928
|
+
if (k22 === undefined)
|
|
6929
|
+
k22 = k2;
|
|
6930
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
6931
6931
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
6932
6932
|
desc = { enumerable: true, get: function() {
|
|
6933
|
-
return m2[
|
|
6933
|
+
return m2[k2];
|
|
6934
6934
|
} };
|
|
6935
6935
|
}
|
|
6936
|
-
Object.defineProperty(o,
|
|
6937
|
-
} : function(o, m2,
|
|
6938
|
-
if (
|
|
6939
|
-
|
|
6940
|
-
o[
|
|
6936
|
+
Object.defineProperty(o, k22, desc);
|
|
6937
|
+
} : function(o, m2, k2, k22) {
|
|
6938
|
+
if (k22 === undefined)
|
|
6939
|
+
k22 = k2;
|
|
6940
|
+
o[k22] = m2[k2];
|
|
6941
6941
|
});
|
|
6942
6942
|
var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
|
|
6943
6943
|
for (var p in m2)
|
|
@@ -7460,20 +7460,20 @@ var require_lib4 = __commonJS((exports) => {
|
|
|
7460
7460
|
};
|
|
7461
7461
|
return __assign.apply(this, arguments);
|
|
7462
7462
|
};
|
|
7463
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
7464
|
-
if (
|
|
7465
|
-
|
|
7466
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
7463
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
7464
|
+
if (k22 === undefined)
|
|
7465
|
+
k22 = k2;
|
|
7466
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
7467
7467
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
7468
7468
|
desc = { enumerable: true, get: function() {
|
|
7469
|
-
return m2[
|
|
7469
|
+
return m2[k2];
|
|
7470
7470
|
} };
|
|
7471
7471
|
}
|
|
7472
|
-
Object.defineProperty(o,
|
|
7473
|
-
} : function(o, m2,
|
|
7474
|
-
if (
|
|
7475
|
-
|
|
7476
|
-
o[
|
|
7472
|
+
Object.defineProperty(o, k22, desc);
|
|
7473
|
+
} : function(o, m2, k2, k22) {
|
|
7474
|
+
if (k22 === undefined)
|
|
7475
|
+
k22 = k2;
|
|
7476
|
+
o[k22] = m2[k2];
|
|
7477
7477
|
});
|
|
7478
7478
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
7479
7479
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -7485,9 +7485,9 @@ var require_lib4 = __commonJS((exports) => {
|
|
|
7485
7485
|
return mod;
|
|
7486
7486
|
var result = {};
|
|
7487
7487
|
if (mod != null) {
|
|
7488
|
-
for (var
|
|
7489
|
-
if (
|
|
7490
|
-
__createBinding(result, mod,
|
|
7488
|
+
for (var k2 in mod)
|
|
7489
|
+
if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2))
|
|
7490
|
+
__createBinding(result, mod, k2);
|
|
7491
7491
|
}
|
|
7492
7492
|
__setModuleDefault(result, mod);
|
|
7493
7493
|
return result;
|
|
@@ -8296,20 +8296,20 @@ var require_feeds = __commonJS((exports) => {
|
|
|
8296
8296
|
|
|
8297
8297
|
// node_modules/domutils/lib/index.js
|
|
8298
8298
|
var require_lib5 = __commonJS((exports) => {
|
|
8299
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
8300
|
-
if (
|
|
8301
|
-
|
|
8302
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
8299
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
8300
|
+
if (k22 === undefined)
|
|
8301
|
+
k22 = k2;
|
|
8302
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
8303
8303
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
8304
8304
|
desc = { enumerable: true, get: function() {
|
|
8305
|
-
return m2[
|
|
8305
|
+
return m2[k2];
|
|
8306
8306
|
} };
|
|
8307
8307
|
}
|
|
8308
|
-
Object.defineProperty(o,
|
|
8309
|
-
} : function(o, m2,
|
|
8310
|
-
if (
|
|
8311
|
-
|
|
8312
|
-
o[
|
|
8308
|
+
Object.defineProperty(o, k22, desc);
|
|
8309
|
+
} : function(o, m2, k2, k22) {
|
|
8310
|
+
if (k22 === undefined)
|
|
8311
|
+
k22 = k2;
|
|
8312
|
+
o[k22] = m2[k2];
|
|
8313
8313
|
});
|
|
8314
8314
|
var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
|
|
8315
8315
|
for (var p in m2)
|
|
@@ -8348,20 +8348,20 @@ var require_lib5 = __commonJS((exports) => {
|
|
|
8348
8348
|
|
|
8349
8349
|
// node_modules/htmlparser2/lib/index.js
|
|
8350
8350
|
var require_lib6 = __commonJS((exports) => {
|
|
8351
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2,
|
|
8352
|
-
if (
|
|
8353
|
-
|
|
8354
|
-
var desc = Object.getOwnPropertyDescriptor(m2,
|
|
8351
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
8352
|
+
if (k22 === undefined)
|
|
8353
|
+
k22 = k2;
|
|
8354
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
8355
8355
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
8356
8356
|
desc = { enumerable: true, get: function() {
|
|
8357
|
-
return m2[
|
|
8357
|
+
return m2[k2];
|
|
8358
8358
|
} };
|
|
8359
8359
|
}
|
|
8360
|
-
Object.defineProperty(o,
|
|
8361
|
-
} : function(o, m2,
|
|
8362
|
-
if (
|
|
8363
|
-
|
|
8364
|
-
o[
|
|
8360
|
+
Object.defineProperty(o, k22, desc);
|
|
8361
|
+
} : function(o, m2, k2, k22) {
|
|
8362
|
+
if (k22 === undefined)
|
|
8363
|
+
k22 = k2;
|
|
8364
|
+
o[k22] = m2[k2];
|
|
8365
8365
|
});
|
|
8366
8366
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
8367
8367
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
@@ -8373,9 +8373,9 @@ var require_lib6 = __commonJS((exports) => {
|
|
|
8373
8373
|
return mod;
|
|
8374
8374
|
var result = {};
|
|
8375
8375
|
if (mod != null) {
|
|
8376
|
-
for (var
|
|
8377
|
-
if (
|
|
8378
|
-
__createBinding(result, mod,
|
|
8376
|
+
for (var k2 in mod)
|
|
8377
|
+
if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2))
|
|
8378
|
+
__createBinding(result, mod, k2);
|
|
8379
8379
|
}
|
|
8380
8380
|
__setModuleDefault(result, mod);
|
|
8381
8381
|
return result;
|
|
@@ -8497,8 +8497,8 @@ var require_cjs = __commonJS((exports, module) => {
|
|
|
8497
8497
|
function cloneUnlessOtherwiseSpecified(value, options2) {
|
|
8498
8498
|
return options2.clone !== false && options2.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options2) : value;
|
|
8499
8499
|
}
|
|
8500
|
-
function defaultArrayMerge(target,
|
|
8501
|
-
return target.concat(
|
|
8500
|
+
function defaultArrayMerge(target, source2, options2) {
|
|
8501
|
+
return target.concat(source2).map(function(element) {
|
|
8502
8502
|
return cloneUnlessOtherwiseSpecified(element, options2);
|
|
8503
8503
|
});
|
|
8504
8504
|
}
|
|
@@ -8527,39 +8527,39 @@ var require_cjs = __commonJS((exports, module) => {
|
|
|
8527
8527
|
function propertyIsUnsafe(target, key) {
|
|
8528
8528
|
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
8529
8529
|
}
|
|
8530
|
-
function mergeObject(target,
|
|
8530
|
+
function mergeObject(target, source2, options2) {
|
|
8531
8531
|
var destination = {};
|
|
8532
8532
|
if (options2.isMergeableObject(target)) {
|
|
8533
8533
|
getKeys(target).forEach(function(key) {
|
|
8534
8534
|
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2);
|
|
8535
8535
|
});
|
|
8536
8536
|
}
|
|
8537
|
-
getKeys(
|
|
8537
|
+
getKeys(source2).forEach(function(key) {
|
|
8538
8538
|
if (propertyIsUnsafe(target, key)) {
|
|
8539
8539
|
return;
|
|
8540
8540
|
}
|
|
8541
|
-
if (propertyIsOnObject(target, key) && options2.isMergeableObject(
|
|
8542
|
-
destination[key] = getMergeFunction(key, options2)(target[key],
|
|
8541
|
+
if (propertyIsOnObject(target, key) && options2.isMergeableObject(source2[key])) {
|
|
8542
|
+
destination[key] = getMergeFunction(key, options2)(target[key], source2[key], options2);
|
|
8543
8543
|
} else {
|
|
8544
|
-
destination[key] = cloneUnlessOtherwiseSpecified(
|
|
8544
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source2[key], options2);
|
|
8545
8545
|
}
|
|
8546
8546
|
});
|
|
8547
8547
|
return destination;
|
|
8548
8548
|
}
|
|
8549
|
-
function deepmerge(target,
|
|
8549
|
+
function deepmerge(target, source2, options2) {
|
|
8550
8550
|
options2 = options2 || {};
|
|
8551
8551
|
options2.arrayMerge = options2.arrayMerge || defaultArrayMerge;
|
|
8552
8552
|
options2.isMergeableObject = options2.isMergeableObject || isMergeableObject;
|
|
8553
8553
|
options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
8554
|
-
var sourceIsArray = Array.isArray(
|
|
8554
|
+
var sourceIsArray = Array.isArray(source2);
|
|
8555
8555
|
var targetIsArray = Array.isArray(target);
|
|
8556
8556
|
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
8557
8557
|
if (!sourceAndTargetTypesMatch) {
|
|
8558
|
-
return cloneUnlessOtherwiseSpecified(
|
|
8558
|
+
return cloneUnlessOtherwiseSpecified(source2, options2);
|
|
8559
8559
|
} else if (sourceIsArray) {
|
|
8560
|
-
return options2.arrayMerge(target,
|
|
8560
|
+
return options2.arrayMerge(target, source2, options2);
|
|
8561
8561
|
} else {
|
|
8562
|
-
return mergeObject(target,
|
|
8562
|
+
return mergeObject(target, source2, options2);
|
|
8563
8563
|
}
|
|
8564
8564
|
}
|
|
8565
8565
|
deepmerge.all = function deepmergeAll(array, options2) {
|
|
@@ -8669,7 +8669,7 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
8669
8669
|
}
|
|
8670
8670
|
}
|
|
8671
8671
|
function parseDescriptors() {
|
|
8672
|
-
var pError = false, w2, d2,
|
|
8672
|
+
var pError = false, w2, d2, h, i, candidate = {}, desc, lastChar, value, intVal, floatVal;
|
|
8673
8673
|
for (i = 0;i < descriptors.length; i++) {
|
|
8674
8674
|
desc = descriptors[i];
|
|
8675
8675
|
lastChar = desc[desc.length - 1];
|
|
@@ -8686,7 +8686,7 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
8686
8686
|
w2 = intVal;
|
|
8687
8687
|
}
|
|
8688
8688
|
} else if (regexFloatingPoint.test(value) && lastChar === "x") {
|
|
8689
|
-
if (w2 || d2 ||
|
|
8689
|
+
if (w2 || d2 || h) {
|
|
8690
8690
|
pError = true;
|
|
8691
8691
|
}
|
|
8692
8692
|
if (floatVal < 0) {
|
|
@@ -8695,13 +8695,13 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
8695
8695
|
d2 = floatVal;
|
|
8696
8696
|
}
|
|
8697
8697
|
} else if (regexNonNegativeInteger.test(value) && lastChar === "h") {
|
|
8698
|
-
if (
|
|
8698
|
+
if (h || d2) {
|
|
8699
8699
|
pError = true;
|
|
8700
8700
|
}
|
|
8701
8701
|
if (intVal === 0) {
|
|
8702
8702
|
pError = true;
|
|
8703
8703
|
} else {
|
|
8704
|
-
|
|
8704
|
+
h = intVal;
|
|
8705
8705
|
}
|
|
8706
8706
|
} else {
|
|
8707
8707
|
pError = true;
|
|
@@ -8715,8 +8715,8 @@ var require_parse_srcset = __commonJS((exports, module) => {
|
|
|
8715
8715
|
if (d2) {
|
|
8716
8716
|
candidate.d = d2;
|
|
8717
8717
|
}
|
|
8718
|
-
if (
|
|
8719
|
-
candidate.h =
|
|
8718
|
+
if (h) {
|
|
8719
|
+
candidate.h = h;
|
|
8720
8720
|
}
|
|
8721
8721
|
candidates.push(candidate);
|
|
8722
8722
|
} else if (console && console.log) {
|
|
@@ -9078,15 +9078,15 @@ var require_css_syntax_error = __commonJS((exports, module) => {
|
|
|
9078
9078
|
var terminalHighlight = require_terminal_highlight();
|
|
9079
9079
|
|
|
9080
9080
|
class CssSyntaxError extends Error {
|
|
9081
|
-
constructor(message, line, column,
|
|
9081
|
+
constructor(message, line, column, source2, file, plugin) {
|
|
9082
9082
|
super(message);
|
|
9083
9083
|
this.name = "CssSyntaxError";
|
|
9084
9084
|
this.reason = message;
|
|
9085
9085
|
if (file) {
|
|
9086
9086
|
this.file = file;
|
|
9087
9087
|
}
|
|
9088
|
-
if (
|
|
9089
|
-
this.source =
|
|
9088
|
+
if (source2) {
|
|
9089
|
+
this.source = source2;
|
|
9090
9090
|
}
|
|
9091
9091
|
if (plugin) {
|
|
9092
9092
|
this.plugin = plugin;
|
|
@@ -11025,17 +11025,17 @@ var require_source_map_generator = __commonJS((exports) => {
|
|
|
11025
11025
|
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
11026
11026
|
var generated = util.getArg(aArgs, "generated");
|
|
11027
11027
|
var original = util.getArg(aArgs, "original", null);
|
|
11028
|
-
var
|
|
11028
|
+
var source2 = util.getArg(aArgs, "source", null);
|
|
11029
11029
|
var name = util.getArg(aArgs, "name", null);
|
|
11030
11030
|
if (!this._skipValidation) {
|
|
11031
|
-
if (this._validateMapping(generated, original,
|
|
11031
|
+
if (this._validateMapping(generated, original, source2, name) === false) {
|
|
11032
11032
|
return;
|
|
11033
11033
|
}
|
|
11034
11034
|
}
|
|
11035
|
-
if (
|
|
11036
|
-
|
|
11037
|
-
if (!this._sources.has(
|
|
11038
|
-
this._sources.add(
|
|
11035
|
+
if (source2 != null) {
|
|
11036
|
+
source2 = String(source2);
|
|
11037
|
+
if (!this._sources.has(source2)) {
|
|
11038
|
+
this._sources.add(source2);
|
|
11039
11039
|
}
|
|
11040
11040
|
}
|
|
11041
11041
|
if (name != null) {
|
|
@@ -11049,22 +11049,22 @@ var require_source_map_generator = __commonJS((exports) => {
|
|
|
11049
11049
|
generatedColumn: generated.column,
|
|
11050
11050
|
originalLine: original != null && original.line,
|
|
11051
11051
|
originalColumn: original != null && original.column,
|
|
11052
|
-
source,
|
|
11052
|
+
source: source2,
|
|
11053
11053
|
name
|
|
11054
11054
|
});
|
|
11055
11055
|
};
|
|
11056
11056
|
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
11057
|
-
var
|
|
11057
|
+
var source2 = aSourceFile;
|
|
11058
11058
|
if (this._sourceRoot != null) {
|
|
11059
|
-
|
|
11059
|
+
source2 = util.relative(this._sourceRoot, source2);
|
|
11060
11060
|
}
|
|
11061
11061
|
if (aSourceContent != null) {
|
|
11062
11062
|
if (!this._sourcesContents) {
|
|
11063
11063
|
this._sourcesContents = Object.create(null);
|
|
11064
11064
|
}
|
|
11065
|
-
this._sourcesContents[util.toSetString(
|
|
11065
|
+
this._sourcesContents[util.toSetString(source2)] = aSourceContent;
|
|
11066
11066
|
} else if (this._sourcesContents) {
|
|
11067
|
-
delete this._sourcesContents[util.toSetString(
|
|
11067
|
+
delete this._sourcesContents[util.toSetString(source2)];
|
|
11068
11068
|
if (Object.keys(this._sourcesContents).length === 0) {
|
|
11069
11069
|
this._sourcesContents = null;
|
|
11070
11070
|
}
|
|
@@ -11105,9 +11105,9 @@ var require_source_map_generator = __commonJS((exports) => {
|
|
|
11105
11105
|
}
|
|
11106
11106
|
}
|
|
11107
11107
|
}
|
|
11108
|
-
var
|
|
11109
|
-
if (
|
|
11110
|
-
newSources.add(
|
|
11108
|
+
var source2 = mapping.source;
|
|
11109
|
+
if (source2 != null && !newSources.has(source2)) {
|
|
11110
|
+
newSources.add(source2);
|
|
11111
11111
|
}
|
|
11112
11112
|
var name = mapping.name;
|
|
11113
11113
|
if (name != null && !newNames.has(name)) {
|
|
@@ -11213,14 +11213,14 @@ var require_source_map_generator = __commonJS((exports) => {
|
|
|
11213
11213
|
return result;
|
|
11214
11214
|
};
|
|
11215
11215
|
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
11216
|
-
return aSources.map(function(
|
|
11216
|
+
return aSources.map(function(source2) {
|
|
11217
11217
|
if (!this._sourcesContents) {
|
|
11218
11218
|
return null;
|
|
11219
11219
|
}
|
|
11220
11220
|
if (aSourceRoot != null) {
|
|
11221
|
-
|
|
11221
|
+
source2 = util.relative(aSourceRoot, source2);
|
|
11222
11222
|
}
|
|
11223
|
-
var key = util.toSetString(
|
|
11223
|
+
var key = util.toSetString(source2);
|
|
11224
11224
|
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
11225
11225
|
}, this);
|
|
11226
11226
|
};
|
|
@@ -11298,9 +11298,9 @@ var require_binary_search = __commonJS((exports) => {
|
|
|
11298
11298
|
// node_modules/source-map-js/lib/quick-sort.js
|
|
11299
11299
|
var require_quick_sort = __commonJS((exports) => {
|
|
11300
11300
|
function SortTemplate(comparator) {
|
|
11301
|
-
function swap(ary,
|
|
11302
|
-
var temp = ary[
|
|
11303
|
-
ary[
|
|
11301
|
+
function swap(ary, x2, y2) {
|
|
11302
|
+
var temp = ary[x2];
|
|
11303
|
+
ary[x2] = ary[y2];
|
|
11304
11304
|
ary[y2] = temp;
|
|
11305
11305
|
}
|
|
11306
11306
|
function randomIntInRange(low, high) {
|
|
@@ -11414,12 +11414,12 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11414
11414
|
var sourceMapURL = this._sourceMapURL;
|
|
11415
11415
|
for (var i = 0, n = mappings.length;i < n; i++) {
|
|
11416
11416
|
var mapping = mappings[i];
|
|
11417
|
-
var
|
|
11418
|
-
if (
|
|
11419
|
-
|
|
11417
|
+
var source2 = mapping.source === null ? null : sources.at(mapping.source);
|
|
11418
|
+
if (source2 !== null) {
|
|
11419
|
+
source2 = util.computeSourceURL(sourceRoot, source2, sourceMapURL);
|
|
11420
11420
|
}
|
|
11421
11421
|
boundCallback({
|
|
11422
|
-
source,
|
|
11422
|
+
source: source2,
|
|
11423
11423
|
generatedLine: mapping.generatedLine,
|
|
11424
11424
|
generatedColumn: mapping.generatedColumn,
|
|
11425
11425
|
originalLine: mapping.originalLine,
|
|
@@ -11486,8 +11486,8 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11486
11486
|
if (sourceRoot) {
|
|
11487
11487
|
sourceRoot = util.normalize(sourceRoot);
|
|
11488
11488
|
}
|
|
11489
|
-
sources = sources.map(String).map(util.normalize).map(function(
|
|
11490
|
-
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(
|
|
11489
|
+
sources = sources.map(String).map(util.normalize).map(function(source2) {
|
|
11490
|
+
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source2) ? util.relative(sourceRoot, source2) : source2;
|
|
11491
11491
|
});
|
|
11492
11492
|
this._names = ArraySet.fromArray(names.map(String), true);
|
|
11493
11493
|
this._sources = ArraySet.fromArray(sources, true);
|
|
@@ -11567,7 +11567,7 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11567
11567
|
}
|
|
11568
11568
|
var compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;
|
|
11569
11569
|
function sortGenerated(array, start) {
|
|
11570
|
-
let
|
|
11570
|
+
let l = array.length;
|
|
11571
11571
|
let n = array.length - start;
|
|
11572
11572
|
if (n <= 1) {
|
|
11573
11573
|
return;
|
|
@@ -11579,7 +11579,7 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11579
11579
|
array[start + 1] = a;
|
|
11580
11580
|
}
|
|
11581
11581
|
} else if (n < 20) {
|
|
11582
|
-
for (let i = start;i <
|
|
11582
|
+
for (let i = start;i < l; i++) {
|
|
11583
11583
|
for (let j2 = i;j2 > start; j2--) {
|
|
11584
11584
|
let a = array[j2 - 1];
|
|
11585
11585
|
let b2 = array[j2];
|
|
@@ -11708,17 +11708,17 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11708
11708
|
if (index >= 0) {
|
|
11709
11709
|
var mapping = this._generatedMappings[index];
|
|
11710
11710
|
if (mapping.generatedLine === needle.generatedLine) {
|
|
11711
|
-
var
|
|
11712
|
-
if (
|
|
11713
|
-
|
|
11714
|
-
|
|
11711
|
+
var source2 = util.getArg(mapping, "source", null);
|
|
11712
|
+
if (source2 !== null) {
|
|
11713
|
+
source2 = this._sources.at(source2);
|
|
11714
|
+
source2 = util.computeSourceURL(this.sourceRoot, source2, this._sourceMapURL);
|
|
11715
11715
|
}
|
|
11716
11716
|
var name = util.getArg(mapping, "name", null);
|
|
11717
11717
|
if (name !== null) {
|
|
11718
11718
|
name = this._names.at(name);
|
|
11719
11719
|
}
|
|
11720
11720
|
return {
|
|
11721
|
-
source,
|
|
11721
|
+
source: source2,
|
|
11722
11722
|
line: util.getArg(mapping, "originalLine", null),
|
|
11723
11723
|
column: util.getArg(mapping, "originalColumn", null),
|
|
11724
11724
|
name
|
|
@@ -11769,9 +11769,9 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11769
11769
|
}
|
|
11770
11770
|
};
|
|
11771
11771
|
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
11772
|
-
var
|
|
11773
|
-
|
|
11774
|
-
if (
|
|
11772
|
+
var source2 = util.getArg(aArgs, "source");
|
|
11773
|
+
source2 = this._findSourceIndex(source2);
|
|
11774
|
+
if (source2 < 0) {
|
|
11775
11775
|
return {
|
|
11776
11776
|
line: null,
|
|
11777
11777
|
column: null,
|
|
@@ -11779,7 +11779,7 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11779
11779
|
};
|
|
11780
11780
|
}
|
|
11781
11781
|
var needle = {
|
|
11782
|
-
source,
|
|
11782
|
+
source: source2,
|
|
11783
11783
|
originalLine: util.getArg(aArgs, "line"),
|
|
11784
11784
|
originalColumn: util.getArg(aArgs, "column")
|
|
11785
11785
|
};
|
|
@@ -11925,12 +11925,12 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11925
11925
|
var sectionMappings = section.consumer._generatedMappings;
|
|
11926
11926
|
for (var j2 = 0;j2 < sectionMappings.length; j2++) {
|
|
11927
11927
|
var mapping = sectionMappings[j2];
|
|
11928
|
-
var
|
|
11929
|
-
if (
|
|
11930
|
-
|
|
11928
|
+
var source2 = section.consumer._sources.at(mapping.source);
|
|
11929
|
+
if (source2 !== null) {
|
|
11930
|
+
source2 = util.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
|
|
11931
11931
|
}
|
|
11932
|
-
this._sources.add(
|
|
11933
|
-
|
|
11932
|
+
this._sources.add(source2);
|
|
11933
|
+
source2 = this._sources.indexOf(source2);
|
|
11934
11934
|
var name = null;
|
|
11935
11935
|
if (mapping.name) {
|
|
11936
11936
|
name = section.consumer._names.at(mapping.name);
|
|
@@ -11938,7 +11938,7 @@ var require_source_map_consumer = __commonJS((exports) => {
|
|
|
11938
11938
|
name = this._names.indexOf(name);
|
|
11939
11939
|
}
|
|
11940
11940
|
var adjustedMapping = {
|
|
11941
|
-
source,
|
|
11941
|
+
source: source2,
|
|
11942
11942
|
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
11943
11943
|
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
11944
11944
|
originalLine: mapping.originalLine,
|
|
@@ -12037,8 +12037,8 @@ var require_source_node = __commonJS((exports) => {
|
|
|
12037
12037
|
if (mapping === null || mapping.source === undefined) {
|
|
12038
12038
|
node.add(code);
|
|
12039
12039
|
} else {
|
|
12040
|
-
var
|
|
12041
|
-
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn,
|
|
12040
|
+
var source2 = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
12041
|
+
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source2, code, mapping.name));
|
|
12042
12042
|
}
|
|
12043
12043
|
}
|
|
12044
12044
|
};
|
|
@@ -12441,7 +12441,7 @@ var require_input = __commonJS((exports, module) => {
|
|
|
12441
12441
|
`);
|
|
12442
12442
|
lineToIndex = new Array(lines.length);
|
|
12443
12443
|
let prevIndex = 0;
|
|
12444
|
-
for (let i = 0,
|
|
12444
|
+
for (let i = 0, l = lines.length;i < l; i++) {
|
|
12445
12445
|
lineToIndex[i] = prevIndex;
|
|
12446
12446
|
prevIndex += lines[i].length + 1;
|
|
12447
12447
|
}
|
|
@@ -12510,9 +12510,9 @@ var require_input = __commonJS((exports, module) => {
|
|
|
12510
12510
|
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
12511
12511
|
}
|
|
12512
12512
|
}
|
|
12513
|
-
let
|
|
12514
|
-
if (
|
|
12515
|
-
result.source =
|
|
12513
|
+
let source2 = consumer.sourceContentFor(from.source);
|
|
12514
|
+
if (source2)
|
|
12515
|
+
result.source = source2;
|
|
12516
12516
|
return result;
|
|
12517
12517
|
}
|
|
12518
12518
|
toJSON() {
|
|
@@ -12705,8 +12705,8 @@ var require_fromJSON = __commonJS((exports, module) => {
|
|
|
12705
12705
|
defaults.nodes = json2.nodes.map((n) => fromJSON(n, inputs));
|
|
12706
12706
|
}
|
|
12707
12707
|
if (defaults.source) {
|
|
12708
|
-
let { inputId, ...
|
|
12709
|
-
defaults.source =
|
|
12708
|
+
let { inputId, ...source2 } = defaults.source;
|
|
12709
|
+
defaults.source = source2;
|
|
12710
12710
|
if (inputId != null) {
|
|
12711
12711
|
defaults.source.input = inputs[inputId];
|
|
12712
12712
|
}
|
|
@@ -15397,8 +15397,8 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
15397
15397
|
};
|
|
15398
15398
|
var escapeRegex = /[&"'<>\\]/g;
|
|
15399
15399
|
var _exports = module.exports = {};
|
|
15400
|
-
function hasOwnProp(obj,
|
|
15401
|
-
return ObjProto.hasOwnProperty.call(obj,
|
|
15400
|
+
function hasOwnProp(obj, k2) {
|
|
15401
|
+
return ObjProto.hasOwnProperty.call(obj, k2);
|
|
15402
15402
|
}
|
|
15403
15403
|
_exports.hasOwnProp = hasOwnProp;
|
|
15404
15404
|
function lookupEscape(ch) {
|
|
@@ -15593,7 +15593,7 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
15593
15593
|
if (ArrayProto.forEach && obj.forEach === ArrayProto.forEach) {
|
|
15594
15594
|
obj.forEach(func, context);
|
|
15595
15595
|
} else if (obj.length === +obj.length) {
|
|
15596
|
-
for (var i = 0,
|
|
15596
|
+
for (var i = 0, l = obj.length;i < l; i++) {
|
|
15597
15597
|
func.call(context, obj[i], i, obj);
|
|
15598
15598
|
}
|
|
15599
15599
|
}
|
|
@@ -15635,9 +15635,9 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
15635
15635
|
var i = -1;
|
|
15636
15636
|
function next() {
|
|
15637
15637
|
i++;
|
|
15638
|
-
var
|
|
15638
|
+
var k2 = keys[i];
|
|
15639
15639
|
if (i < len) {
|
|
15640
|
-
iter(
|
|
15640
|
+
iter(k2, obj[k2], i, len, next);
|
|
15641
15641
|
} else {
|
|
15642
15642
|
cb();
|
|
15643
15643
|
}
|
|
@@ -15651,30 +15651,30 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
15651
15651
|
_exports.indexOf = indexOf;
|
|
15652
15652
|
function keys_(obj) {
|
|
15653
15653
|
var arr = [];
|
|
15654
|
-
for (var
|
|
15655
|
-
if (hasOwnProp(obj,
|
|
15656
|
-
arr.push(
|
|
15654
|
+
for (var k2 in obj) {
|
|
15655
|
+
if (hasOwnProp(obj, k2)) {
|
|
15656
|
+
arr.push(k2);
|
|
15657
15657
|
}
|
|
15658
15658
|
}
|
|
15659
15659
|
return arr;
|
|
15660
15660
|
}
|
|
15661
15661
|
_exports.keys = keys_;
|
|
15662
15662
|
function _entries(obj) {
|
|
15663
|
-
return keys_(obj).map(function(
|
|
15664
|
-
return [
|
|
15663
|
+
return keys_(obj).map(function(k2) {
|
|
15664
|
+
return [k2, obj[k2]];
|
|
15665
15665
|
});
|
|
15666
15666
|
}
|
|
15667
15667
|
_exports._entries = _entries;
|
|
15668
15668
|
function _values(obj) {
|
|
15669
|
-
return keys_(obj).map(function(
|
|
15670
|
-
return obj[
|
|
15669
|
+
return keys_(obj).map(function(k2) {
|
|
15670
|
+
return obj[k2];
|
|
15671
15671
|
});
|
|
15672
15672
|
}
|
|
15673
15673
|
_exports._values = _values;
|
|
15674
15674
|
function extend(obj1, obj2) {
|
|
15675
15675
|
obj1 = obj1 || {};
|
|
15676
|
-
keys_(obj2).forEach(function(
|
|
15677
|
-
obj1[
|
|
15676
|
+
keys_(obj2).forEach(function(k2) {
|
|
15677
|
+
obj1[k2] = obj2[k2];
|
|
15678
15678
|
});
|
|
15679
15679
|
return obj1;
|
|
15680
15680
|
}
|
|
@@ -16342,8 +16342,8 @@ var require_object = __commonJS((exports, module) => {
|
|
|
16342
16342
|
}
|
|
16343
16343
|
function extendClass(cls, name, props) {
|
|
16344
16344
|
props = props || {};
|
|
16345
|
-
lib.keys(props).forEach(function(
|
|
16346
|
-
props[
|
|
16345
|
+
lib.keys(props).forEach(function(k2) {
|
|
16346
|
+
props[k2] = parentWrap(cls.prototype[k2], props[k2]);
|
|
16347
16347
|
});
|
|
16348
16348
|
var subclass = /* @__PURE__ */ function(_cls) {
|
|
16349
16349
|
_inheritsLoose(subclass2, _cls);
|
|
@@ -18173,8 +18173,8 @@ var require_runtime = __commonJS((exports, module) => {
|
|
|
18173
18173
|
cb(null, "");
|
|
18174
18174
|
} else {
|
|
18175
18175
|
for (var _i = 0;_i < keys.length; _i++) {
|
|
18176
|
-
var
|
|
18177
|
-
func(
|
|
18176
|
+
var k2 = keys[_i];
|
|
18177
|
+
func(k2, arr[k2], _i, len, done);
|
|
18178
18178
|
}
|
|
18179
18179
|
}
|
|
18180
18180
|
}
|
|
@@ -18760,11 +18760,11 @@ else {`);
|
|
|
18760
18760
|
this._emitLine("if(runtime.isArray(" + arr + ")) {");
|
|
18761
18761
|
this._emitLine("var " + len + " = " + arr + ".length;");
|
|
18762
18762
|
this._emitLine("for(" + i + "=0; " + i + " < " + arr + ".length; " + i + "++) {");
|
|
18763
|
-
node.name.children.forEach(function(child,
|
|
18763
|
+
node.name.children.forEach(function(child, u3) {
|
|
18764
18764
|
var tid = _this10._tmpid();
|
|
18765
|
-
_this10._emitLine("var " + tid + " = " + arr + "[" + i + "][" +
|
|
18766
|
-
_this10._emitLine('frame.set("' + child + '", ' + arr + "[" + i + "][" +
|
|
18767
|
-
frame.set(node.name.children[
|
|
18765
|
+
_this10._emitLine("var " + tid + " = " + arr + "[" + i + "][" + u3 + "];");
|
|
18766
|
+
_this10._emitLine('frame.set("' + child + '", ' + arr + "[" + i + "][" + u3 + "]);");
|
|
18767
|
+
frame.set(node.name.children[u3].value, tid);
|
|
18768
18768
|
});
|
|
18769
18769
|
this._emitLoopBindings(node, arr, i, len);
|
|
18770
18770
|
this._withScopedSyntax(function() {
|
|
@@ -18773,16 +18773,16 @@ else {`);
|
|
|
18773
18773
|
this._emitLine("}");
|
|
18774
18774
|
this._emitLine("} else {");
|
|
18775
18775
|
var _node$name$children = node.name.children, key = _node$name$children[0], val = _node$name$children[1];
|
|
18776
|
-
var
|
|
18776
|
+
var k2 = this._tmpid();
|
|
18777
18777
|
var v2 = this._tmpid();
|
|
18778
|
-
frame.set(key.value,
|
|
18778
|
+
frame.set(key.value, k2);
|
|
18779
18779
|
frame.set(val.value, v2);
|
|
18780
18780
|
this._emitLine(i + " = -1;");
|
|
18781
18781
|
this._emitLine("var " + len + " = runtime.keys(" + arr + ").length;");
|
|
18782
|
-
this._emitLine("for(var " +
|
|
18782
|
+
this._emitLine("for(var " + k2 + " in " + arr + ") {");
|
|
18783
18783
|
this._emitLine(i + "++;");
|
|
18784
|
-
this._emitLine("var " + v2 + " = " + arr + "[" +
|
|
18785
|
-
this._emitLine('frame.set("' + key.value + '", ' +
|
|
18784
|
+
this._emitLine("var " + v2 + " = " + arr + "[" + k2 + "];");
|
|
18785
|
+
this._emitLine('frame.set("' + key.value + '", ' + k2 + ");");
|
|
18786
18786
|
this._emitLine('frame.set("' + val.value + '", ' + v2 + ");");
|
|
18787
18787
|
this._emitLoopBindings(node, arr, i, len);
|
|
18788
18788
|
this._withScopedSyntax(function() {
|
|
@@ -19020,11 +19020,11 @@ else {`);
|
|
|
19020
19020
|
frame.set(id, id);
|
|
19021
19021
|
};
|
|
19022
19022
|
_proto.compileExtends = function compileExtends(node, frame) {
|
|
19023
|
-
var
|
|
19023
|
+
var k2 = this._tmpid();
|
|
19024
19024
|
var parentTemplateId = this._compileGetTemplate(node, frame, true, false);
|
|
19025
19025
|
this._emitLine("parentTemplate = " + parentTemplateId);
|
|
19026
|
-
this._emitLine("for(var " +
|
|
19027
|
-
this._emitLine("context.addBlock(" +
|
|
19026
|
+
this._emitLine("for(var " + k2 + " in parentTemplate.blocks) {");
|
|
19027
|
+
this._emitLine("context.addBlock(" + k2 + ", parentTemplate.blocks[" + k2 + "]);");
|
|
19028
19028
|
this._emitLine("}");
|
|
19029
19029
|
this._addScopeLevel();
|
|
19030
19030
|
};
|
|
@@ -19229,8 +19229,8 @@ var require_filters = __commonJS((exports, module) => {
|
|
|
19229
19229
|
throw new lib.TemplateError("dictsort filter: val must be an object");
|
|
19230
19230
|
}
|
|
19231
19231
|
var array = [];
|
|
19232
|
-
for (var
|
|
19233
|
-
array.push([
|
|
19232
|
+
for (var k2 in val) {
|
|
19233
|
+
array.push([k2, val[k2]]);
|
|
19234
19234
|
}
|
|
19235
19235
|
var si;
|
|
19236
19236
|
if (by === undefined || by === "key") {
|
|
@@ -19298,8 +19298,8 @@ var require_filters = __commonJS((exports, module) => {
|
|
|
19298
19298
|
var lines = str2.split(`
|
|
19299
19299
|
`);
|
|
19300
19300
|
var sp = lib.repeat(" ", width);
|
|
19301
|
-
var res = lines.map(function(
|
|
19302
|
-
return i === 0 && !indentfirst ?
|
|
19301
|
+
var res = lines.map(function(l, i) {
|
|
19302
|
+
return i === 0 && !indentfirst ? l : "" + sp + l;
|
|
19303
19303
|
}).join(`
|
|
19304
19304
|
`);
|
|
19305
19305
|
return r.copySafeness(str2, res);
|
|
@@ -19508,18 +19508,18 @@ var require_filters = __commonJS((exports, module) => {
|
|
|
19508
19508
|
});
|
|
19509
19509
|
var getAttribute = lib.getAttrGetter(attr);
|
|
19510
19510
|
array.sort(function(a, b2) {
|
|
19511
|
-
var
|
|
19511
|
+
var x2 = attr ? getAttribute(a) : a;
|
|
19512
19512
|
var y2 = attr ? getAttribute(b2) : b2;
|
|
19513
|
-
if (_this.env.opts.throwOnUndefined && attr && (
|
|
19513
|
+
if (_this.env.opts.throwOnUndefined && attr && (x2 === undefined || y2 === undefined)) {
|
|
19514
19514
|
throw new TypeError('sort: attribute "' + attr + '" resolved to undefined');
|
|
19515
19515
|
}
|
|
19516
|
-
if (!caseSens && lib.isString(
|
|
19517
|
-
|
|
19516
|
+
if (!caseSens && lib.isString(x2) && lib.isString(y2)) {
|
|
19517
|
+
x2 = x2.toLowerCase();
|
|
19518
19518
|
y2 = y2.toLowerCase();
|
|
19519
19519
|
}
|
|
19520
|
-
if (
|
|
19520
|
+
if (x2 < y2) {
|
|
19521
19521
|
return reversed ? 1 : -1;
|
|
19522
|
-
} else if (
|
|
19522
|
+
} else if (x2 > y2) {
|
|
19523
19523
|
return reversed ? -1 : 1;
|
|
19524
19524
|
} else {
|
|
19525
19525
|
return 0;
|
|
@@ -19591,8 +19591,8 @@ var require_filters = __commonJS((exports, module) => {
|
|
|
19591
19591
|
} else {
|
|
19592
19592
|
var keyvals = lib.isArray(obj) ? obj : lib._entries(obj);
|
|
19593
19593
|
return keyvals.map(function(_ref2) {
|
|
19594
|
-
var
|
|
19595
|
-
return enc(
|
|
19594
|
+
var k2 = _ref2[0], v2 = _ref2[1];
|
|
19595
|
+
return enc(k2) + "=" + enc(v2);
|
|
19596
19596
|
}).join("&");
|
|
19597
19597
|
}
|
|
19598
19598
|
}
|
|
@@ -21005,19 +21005,19 @@ var require_parse3 = __commonJS((exports, module) => {
|
|
|
21005
21005
|
const match = /^(.*?)\.(\w+)$/.exec(str2);
|
|
21006
21006
|
if (!match)
|
|
21007
21007
|
return;
|
|
21008
|
-
const
|
|
21009
|
-
if (!
|
|
21008
|
+
const source3 = create(match[1]);
|
|
21009
|
+
if (!source3)
|
|
21010
21010
|
return;
|
|
21011
|
-
return
|
|
21011
|
+
return source3 + DOT_LITERAL + match[2];
|
|
21012
21012
|
}
|
|
21013
21013
|
}
|
|
21014
21014
|
};
|
|
21015
21015
|
const output = utils.removePrefix(input, state);
|
|
21016
|
-
let
|
|
21017
|
-
if (
|
|
21018
|
-
|
|
21016
|
+
let source2 = create(output);
|
|
21017
|
+
if (source2 && opts.strictSlashes !== true) {
|
|
21018
|
+
source2 += `${SLASH_LITERAL}?`;
|
|
21019
21019
|
}
|
|
21020
|
-
return
|
|
21020
|
+
return source2;
|
|
21021
21021
|
};
|
|
21022
21022
|
module.exports = parse2;
|
|
21023
21023
|
});
|
|
@@ -21126,11 +21126,11 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
21126
21126
|
const opts = options2 || {};
|
|
21127
21127
|
const prepend = opts.contains ? "" : "^";
|
|
21128
21128
|
const append = opts.contains ? "" : "$";
|
|
21129
|
-
let
|
|
21129
|
+
let source2 = `${prepend}(?:${state.output})${append}`;
|
|
21130
21130
|
if (state && state.negated === true) {
|
|
21131
|
-
|
|
21131
|
+
source2 = `^(?!${source2}).*$`;
|
|
21132
21132
|
}
|
|
21133
|
-
const regex = picomatch.toRegex(
|
|
21133
|
+
const regex = picomatch.toRegex(source2, options2);
|
|
21134
21134
|
if (returnState === true) {
|
|
21135
21135
|
regex.state = state;
|
|
21136
21136
|
}
|
|
@@ -21149,10 +21149,10 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
21149
21149
|
}
|
|
21150
21150
|
return picomatch.compileRe(parsed, options2, returnOutput, returnState);
|
|
21151
21151
|
};
|
|
21152
|
-
picomatch.toRegex = (
|
|
21152
|
+
picomatch.toRegex = (source2, options2) => {
|
|
21153
21153
|
try {
|
|
21154
21154
|
const opts = options2 || {};
|
|
21155
|
-
return new RegExp(
|
|
21155
|
+
return new RegExp(source2, opts.flags || (opts.nocase ? "i" : ""));
|
|
21156
21156
|
} catch (err) {
|
|
21157
21157
|
if (options2 && options2.debug === true)
|
|
21158
21158
|
throw err;
|
|
@@ -24707,13 +24707,13 @@ var require_node_loaders = __commonJS((exports, module) => {
|
|
|
24707
24707
|
return null;
|
|
24708
24708
|
}
|
|
24709
24709
|
this.pathsToNames[fullpath] = name;
|
|
24710
|
-
var
|
|
24710
|
+
var source2 = {
|
|
24711
24711
|
src: fs2.readFileSync(fullpath, "utf-8"),
|
|
24712
24712
|
path: fullpath,
|
|
24713
24713
|
noCache: this.noCache
|
|
24714
24714
|
};
|
|
24715
|
-
this.emit("load", name,
|
|
24716
|
-
return
|
|
24715
|
+
this.emit("load", name, source2);
|
|
24716
|
+
return source2;
|
|
24717
24717
|
};
|
|
24718
24718
|
return FileSystemLoader2;
|
|
24719
24719
|
}(Loader);
|
|
@@ -24738,8 +24738,8 @@ var require_node_loaders = __commonJS((exports, module) => {
|
|
|
24738
24738
|
_this2.watcher.on("error", function(error) {
|
|
24739
24739
|
console.log("Watcher error: " + error);
|
|
24740
24740
|
});
|
|
24741
|
-
_this2.on("load", function(name,
|
|
24742
|
-
_this2.watcher.add(
|
|
24741
|
+
_this2.on("load", function(name, source2) {
|
|
24742
|
+
_this2.watcher.add(source2.path);
|
|
24743
24743
|
});
|
|
24744
24744
|
}
|
|
24745
24745
|
return _this2;
|
|
@@ -24759,13 +24759,13 @@ var require_node_loaders = __commonJS((exports, module) => {
|
|
|
24759
24759
|
return null;
|
|
24760
24760
|
}
|
|
24761
24761
|
this.pathsToNames[fullpath] = name;
|
|
24762
|
-
var
|
|
24762
|
+
var source2 = {
|
|
24763
24763
|
src: fs2.readFileSync(fullpath, "utf-8"),
|
|
24764
24764
|
path: fullpath,
|
|
24765
24765
|
noCache: this.noCache
|
|
24766
24766
|
};
|
|
24767
|
-
this.emit("load", name,
|
|
24768
|
-
return
|
|
24767
|
+
this.emit("load", name, source2);
|
|
24768
|
+
return source2;
|
|
24769
24769
|
};
|
|
24770
24770
|
return NodeResolveLoader2;
|
|
24771
24771
|
}(Loader);
|
|
@@ -25070,8 +25070,8 @@ var require_environment = __commonJS((exports, module) => {
|
|
|
25070
25070
|
loader.cache[name] = null;
|
|
25071
25071
|
_this2.emit("update", name, fullname, loader);
|
|
25072
25072
|
});
|
|
25073
|
-
loader.on("load", function(name,
|
|
25074
|
-
_this2.emit("load", name,
|
|
25073
|
+
loader.on("load", function(name, source2) {
|
|
25074
|
+
_this2.emit("load", name, source2, loader);
|
|
25075
25075
|
});
|
|
25076
25076
|
}
|
|
25077
25077
|
});
|
|
@@ -25445,8 +25445,8 @@ var require_environment = __commonJS((exports, module) => {
|
|
|
25445
25445
|
if (this.tmplProps) {
|
|
25446
25446
|
props = this.tmplProps;
|
|
25447
25447
|
} else {
|
|
25448
|
-
var
|
|
25449
|
-
var func = new Function(
|
|
25448
|
+
var source2 = compiler.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts);
|
|
25449
|
+
var func = new Function(source2);
|
|
25450
25450
|
props = func();
|
|
25451
25451
|
}
|
|
25452
25452
|
this.blocks = this._getBlocks(props);
|
|
@@ -25455,9 +25455,9 @@ var require_environment = __commonJS((exports, module) => {
|
|
|
25455
25455
|
};
|
|
25456
25456
|
_proto3._getBlocks = function _getBlocks(props) {
|
|
25457
25457
|
var blocks = {};
|
|
25458
|
-
lib.keys(props).forEach(function(
|
|
25459
|
-
if (
|
|
25460
|
-
blocks[
|
|
25458
|
+
lib.keys(props).forEach(function(k2) {
|
|
25459
|
+
if (k2.slice(0, 2) === "b_") {
|
|
25460
|
+
blocks[k2.slice(2)] = props[k2];
|
|
25461
25461
|
}
|
|
25462
25462
|
});
|
|
25463
25463
|
return blocks;
|
|
@@ -25825,10 +25825,10 @@ var require_jinja_compat = __commonJS((exports, module) => {
|
|
|
25825
25825
|
if (!keys.length) {
|
|
25826
25826
|
throw new Error("KeyError");
|
|
25827
25827
|
}
|
|
25828
|
-
var
|
|
25829
|
-
var val = this[
|
|
25830
|
-
delete this[
|
|
25831
|
-
return [
|
|
25828
|
+
var k2 = keys[0];
|
|
25829
|
+
var val = this[k2];
|
|
25830
|
+
delete this[k2];
|
|
25831
|
+
return [k2, val];
|
|
25832
25832
|
},
|
|
25833
25833
|
setdefault: function setdefault(key, def) {
|
|
25834
25834
|
if (def === undefined) {
|
|
@@ -27345,6 +27345,759 @@ function python(hljs) {
|
|
|
27345
27345
|
};
|
|
27346
27346
|
}
|
|
27347
27347
|
|
|
27348
|
+
// node_modules/highlight.js/es/languages/swift.js
|
|
27349
|
+
function source(re) {
|
|
27350
|
+
if (!re)
|
|
27351
|
+
return null;
|
|
27352
|
+
if (typeof re === "string")
|
|
27353
|
+
return re;
|
|
27354
|
+
return re.source;
|
|
27355
|
+
}
|
|
27356
|
+
function lookahead(re) {
|
|
27357
|
+
return concat("(?=", re, ")");
|
|
27358
|
+
}
|
|
27359
|
+
function concat(...args) {
|
|
27360
|
+
const joined = args.map((x) => source(x)).join("");
|
|
27361
|
+
return joined;
|
|
27362
|
+
}
|
|
27363
|
+
function stripOptionsFromArgs(args) {
|
|
27364
|
+
const opts = args[args.length - 1];
|
|
27365
|
+
if (typeof opts === "object" && opts.constructor === Object) {
|
|
27366
|
+
args.splice(args.length - 1, 1);
|
|
27367
|
+
return opts;
|
|
27368
|
+
} else {
|
|
27369
|
+
return {};
|
|
27370
|
+
}
|
|
27371
|
+
}
|
|
27372
|
+
function either(...args) {
|
|
27373
|
+
const opts = stripOptionsFromArgs(args);
|
|
27374
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")";
|
|
27375
|
+
return joined;
|
|
27376
|
+
}
|
|
27377
|
+
var keywordWrapper = (keyword) => concat(/\b/, keyword, /\w$/.test(keyword) ? /\b/ : /\B/);
|
|
27378
|
+
var dotKeywords = [
|
|
27379
|
+
"Protocol",
|
|
27380
|
+
"Type"
|
|
27381
|
+
].map(keywordWrapper);
|
|
27382
|
+
var optionalDotKeywords = [
|
|
27383
|
+
"init",
|
|
27384
|
+
"self"
|
|
27385
|
+
].map(keywordWrapper);
|
|
27386
|
+
var keywordTypes = [
|
|
27387
|
+
"Any",
|
|
27388
|
+
"Self"
|
|
27389
|
+
];
|
|
27390
|
+
var keywords = [
|
|
27391
|
+
"actor",
|
|
27392
|
+
"any",
|
|
27393
|
+
"associatedtype",
|
|
27394
|
+
"async",
|
|
27395
|
+
"await",
|
|
27396
|
+
/as\?/,
|
|
27397
|
+
/as!/,
|
|
27398
|
+
"as",
|
|
27399
|
+
"borrowing",
|
|
27400
|
+
"break",
|
|
27401
|
+
"case",
|
|
27402
|
+
"catch",
|
|
27403
|
+
"class",
|
|
27404
|
+
"consume",
|
|
27405
|
+
"consuming",
|
|
27406
|
+
"continue",
|
|
27407
|
+
"convenience",
|
|
27408
|
+
"copy",
|
|
27409
|
+
"default",
|
|
27410
|
+
"defer",
|
|
27411
|
+
"deinit",
|
|
27412
|
+
"didSet",
|
|
27413
|
+
"distributed",
|
|
27414
|
+
"do",
|
|
27415
|
+
"dynamic",
|
|
27416
|
+
"each",
|
|
27417
|
+
"else",
|
|
27418
|
+
"enum",
|
|
27419
|
+
"extension",
|
|
27420
|
+
"fallthrough",
|
|
27421
|
+
/fileprivate\(set\)/,
|
|
27422
|
+
"fileprivate",
|
|
27423
|
+
"final",
|
|
27424
|
+
"for",
|
|
27425
|
+
"func",
|
|
27426
|
+
"get",
|
|
27427
|
+
"guard",
|
|
27428
|
+
"if",
|
|
27429
|
+
"import",
|
|
27430
|
+
"indirect",
|
|
27431
|
+
"infix",
|
|
27432
|
+
/init\?/,
|
|
27433
|
+
/init!/,
|
|
27434
|
+
"inout",
|
|
27435
|
+
/internal\(set\)/,
|
|
27436
|
+
"internal",
|
|
27437
|
+
"in",
|
|
27438
|
+
"is",
|
|
27439
|
+
"isolated",
|
|
27440
|
+
"nonisolated",
|
|
27441
|
+
"lazy",
|
|
27442
|
+
"let",
|
|
27443
|
+
"macro",
|
|
27444
|
+
"mutating",
|
|
27445
|
+
"nonmutating",
|
|
27446
|
+
/open\(set\)/,
|
|
27447
|
+
"open",
|
|
27448
|
+
"operator",
|
|
27449
|
+
"optional",
|
|
27450
|
+
"override",
|
|
27451
|
+
"package",
|
|
27452
|
+
"postfix",
|
|
27453
|
+
"precedencegroup",
|
|
27454
|
+
"prefix",
|
|
27455
|
+
/private\(set\)/,
|
|
27456
|
+
"private",
|
|
27457
|
+
"protocol",
|
|
27458
|
+
/public\(set\)/,
|
|
27459
|
+
"public",
|
|
27460
|
+
"repeat",
|
|
27461
|
+
"required",
|
|
27462
|
+
"rethrows",
|
|
27463
|
+
"return",
|
|
27464
|
+
"set",
|
|
27465
|
+
"some",
|
|
27466
|
+
"static",
|
|
27467
|
+
"struct",
|
|
27468
|
+
"subscript",
|
|
27469
|
+
"super",
|
|
27470
|
+
"switch",
|
|
27471
|
+
"throws",
|
|
27472
|
+
"throw",
|
|
27473
|
+
/try\?/,
|
|
27474
|
+
/try!/,
|
|
27475
|
+
"try",
|
|
27476
|
+
"typealias",
|
|
27477
|
+
/unowned\(safe\)/,
|
|
27478
|
+
/unowned\(unsafe\)/,
|
|
27479
|
+
"unowned",
|
|
27480
|
+
"var",
|
|
27481
|
+
"weak",
|
|
27482
|
+
"where",
|
|
27483
|
+
"while",
|
|
27484
|
+
"willSet"
|
|
27485
|
+
];
|
|
27486
|
+
var literals = [
|
|
27487
|
+
"false",
|
|
27488
|
+
"nil",
|
|
27489
|
+
"true"
|
|
27490
|
+
];
|
|
27491
|
+
var precedencegroupKeywords = [
|
|
27492
|
+
"assignment",
|
|
27493
|
+
"associativity",
|
|
27494
|
+
"higherThan",
|
|
27495
|
+
"left",
|
|
27496
|
+
"lowerThan",
|
|
27497
|
+
"none",
|
|
27498
|
+
"right"
|
|
27499
|
+
];
|
|
27500
|
+
var numberSignKeywords = [
|
|
27501
|
+
"#colorLiteral",
|
|
27502
|
+
"#column",
|
|
27503
|
+
"#dsohandle",
|
|
27504
|
+
"#else",
|
|
27505
|
+
"#elseif",
|
|
27506
|
+
"#endif",
|
|
27507
|
+
"#error",
|
|
27508
|
+
"#file",
|
|
27509
|
+
"#fileID",
|
|
27510
|
+
"#fileLiteral",
|
|
27511
|
+
"#filePath",
|
|
27512
|
+
"#function",
|
|
27513
|
+
"#if",
|
|
27514
|
+
"#imageLiteral",
|
|
27515
|
+
"#keyPath",
|
|
27516
|
+
"#line",
|
|
27517
|
+
"#selector",
|
|
27518
|
+
"#sourceLocation",
|
|
27519
|
+
"#warning"
|
|
27520
|
+
];
|
|
27521
|
+
var builtIns = [
|
|
27522
|
+
"abs",
|
|
27523
|
+
"all",
|
|
27524
|
+
"any",
|
|
27525
|
+
"assert",
|
|
27526
|
+
"assertionFailure",
|
|
27527
|
+
"debugPrint",
|
|
27528
|
+
"dump",
|
|
27529
|
+
"fatalError",
|
|
27530
|
+
"getVaList",
|
|
27531
|
+
"isKnownUniquelyReferenced",
|
|
27532
|
+
"max",
|
|
27533
|
+
"min",
|
|
27534
|
+
"numericCast",
|
|
27535
|
+
"pointwiseMax",
|
|
27536
|
+
"pointwiseMin",
|
|
27537
|
+
"precondition",
|
|
27538
|
+
"preconditionFailure",
|
|
27539
|
+
"print",
|
|
27540
|
+
"readLine",
|
|
27541
|
+
"repeatElement",
|
|
27542
|
+
"sequence",
|
|
27543
|
+
"stride",
|
|
27544
|
+
"swap",
|
|
27545
|
+
"swift_unboxFromSwiftValueWithType",
|
|
27546
|
+
"transcode",
|
|
27547
|
+
"type",
|
|
27548
|
+
"unsafeBitCast",
|
|
27549
|
+
"unsafeDowncast",
|
|
27550
|
+
"withExtendedLifetime",
|
|
27551
|
+
"withUnsafeMutablePointer",
|
|
27552
|
+
"withUnsafePointer",
|
|
27553
|
+
"withVaList",
|
|
27554
|
+
"withoutActuallyEscaping",
|
|
27555
|
+
"zip"
|
|
27556
|
+
];
|
|
27557
|
+
var operatorHead = either(/[/=\-+!*%<>&|^~?]/, /[\u00A1-\u00A7]/, /[\u00A9\u00AB]/, /[\u00AC\u00AE]/, /[\u00B0\u00B1]/, /[\u00B6\u00BB\u00BF\u00D7\u00F7]/, /[\u2016-\u2017]/, /[\u2020-\u2027]/, /[\u2030-\u203E]/, /[\u2041-\u2053]/, /[\u2055-\u205E]/, /[\u2190-\u23FF]/, /[\u2500-\u2775]/, /[\u2794-\u2BFF]/, /[\u2E00-\u2E7F]/, /[\u3001-\u3003]/, /[\u3008-\u3020]/, /[\u3030]/);
|
|
27558
|
+
var operatorCharacter = either(operatorHead, /[\u0300-\u036F]/, /[\u1DC0-\u1DFF]/, /[\u20D0-\u20FF]/, /[\uFE00-\uFE0F]/, /[\uFE20-\uFE2F]/);
|
|
27559
|
+
var operator = concat(operatorHead, operatorCharacter, "*");
|
|
27560
|
+
var identifierHead = either(/[a-zA-Z_]/, /[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/, /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/, /[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/, /[\u1E00-\u1FFF]/, /[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/, /[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/, /[\u2C00-\u2DFF\u2E80-\u2FFF]/, /[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/, /[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/, /[\uFE47-\uFEFE\uFF00-\uFFFD]/);
|
|
27561
|
+
var identifierCharacter = either(identifierHead, /\d/, /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/);
|
|
27562
|
+
var identifier = concat(identifierHead, identifierCharacter, "*");
|
|
27563
|
+
var typeIdentifier = concat(/[A-Z]/, identifierCharacter, "*");
|
|
27564
|
+
var keywordAttributes = [
|
|
27565
|
+
"attached",
|
|
27566
|
+
"autoclosure",
|
|
27567
|
+
concat(/convention\(/, either("swift", "block", "c"), /\)/),
|
|
27568
|
+
"discardableResult",
|
|
27569
|
+
"dynamicCallable",
|
|
27570
|
+
"dynamicMemberLookup",
|
|
27571
|
+
"escaping",
|
|
27572
|
+
"freestanding",
|
|
27573
|
+
"frozen",
|
|
27574
|
+
"GKInspectable",
|
|
27575
|
+
"IBAction",
|
|
27576
|
+
"IBDesignable",
|
|
27577
|
+
"IBInspectable",
|
|
27578
|
+
"IBOutlet",
|
|
27579
|
+
"IBSegueAction",
|
|
27580
|
+
"inlinable",
|
|
27581
|
+
"main",
|
|
27582
|
+
"nonobjc",
|
|
27583
|
+
"NSApplicationMain",
|
|
27584
|
+
"NSCopying",
|
|
27585
|
+
"NSManaged",
|
|
27586
|
+
concat(/objc\(/, identifier, /\)/),
|
|
27587
|
+
"objc",
|
|
27588
|
+
"objcMembers",
|
|
27589
|
+
"propertyWrapper",
|
|
27590
|
+
"requires_stored_property_inits",
|
|
27591
|
+
"resultBuilder",
|
|
27592
|
+
"Sendable",
|
|
27593
|
+
"testable",
|
|
27594
|
+
"UIApplicationMain",
|
|
27595
|
+
"unchecked",
|
|
27596
|
+
"unknown",
|
|
27597
|
+
"usableFromInline",
|
|
27598
|
+
"warn_unqualified_access"
|
|
27599
|
+
];
|
|
27600
|
+
var availabilityKeywords = [
|
|
27601
|
+
"iOS",
|
|
27602
|
+
"iOSApplicationExtension",
|
|
27603
|
+
"macOS",
|
|
27604
|
+
"macOSApplicationExtension",
|
|
27605
|
+
"macCatalyst",
|
|
27606
|
+
"macCatalystApplicationExtension",
|
|
27607
|
+
"watchOS",
|
|
27608
|
+
"watchOSApplicationExtension",
|
|
27609
|
+
"tvOS",
|
|
27610
|
+
"tvOSApplicationExtension",
|
|
27611
|
+
"swift"
|
|
27612
|
+
];
|
|
27613
|
+
function swift(hljs) {
|
|
27614
|
+
const WHITESPACE = {
|
|
27615
|
+
match: /\s+/,
|
|
27616
|
+
relevance: 0
|
|
27617
|
+
};
|
|
27618
|
+
const BLOCK_COMMENT = hljs.COMMENT("/\\*", "\\*/", { contains: ["self"] });
|
|
27619
|
+
const COMMENTS = [
|
|
27620
|
+
hljs.C_LINE_COMMENT_MODE,
|
|
27621
|
+
BLOCK_COMMENT
|
|
27622
|
+
];
|
|
27623
|
+
const DOT_KEYWORD = {
|
|
27624
|
+
match: [
|
|
27625
|
+
/\./,
|
|
27626
|
+
either(...dotKeywords, ...optionalDotKeywords)
|
|
27627
|
+
],
|
|
27628
|
+
className: { 2: "keyword" }
|
|
27629
|
+
};
|
|
27630
|
+
const KEYWORD_GUARD = {
|
|
27631
|
+
match: concat(/\./, either(...keywords)),
|
|
27632
|
+
relevance: 0
|
|
27633
|
+
};
|
|
27634
|
+
const PLAIN_KEYWORDS = keywords.filter((kw) => typeof kw === "string").concat(["_|0"]);
|
|
27635
|
+
const REGEX_KEYWORDS = keywords.filter((kw) => typeof kw !== "string").concat(keywordTypes).map(keywordWrapper);
|
|
27636
|
+
const KEYWORD = { variants: [
|
|
27637
|
+
{
|
|
27638
|
+
className: "keyword",
|
|
27639
|
+
match: either(...REGEX_KEYWORDS, ...optionalDotKeywords)
|
|
27640
|
+
}
|
|
27641
|
+
] };
|
|
27642
|
+
const KEYWORDS2 = {
|
|
27643
|
+
$pattern: either(/\b\w+/, /#\w+/),
|
|
27644
|
+
keyword: PLAIN_KEYWORDS.concat(numberSignKeywords),
|
|
27645
|
+
literal: literals
|
|
27646
|
+
};
|
|
27647
|
+
const KEYWORD_MODES = [
|
|
27648
|
+
DOT_KEYWORD,
|
|
27649
|
+
KEYWORD_GUARD,
|
|
27650
|
+
KEYWORD
|
|
27651
|
+
];
|
|
27652
|
+
const BUILT_IN_GUARD = {
|
|
27653
|
+
match: concat(/\./, either(...builtIns)),
|
|
27654
|
+
relevance: 0
|
|
27655
|
+
};
|
|
27656
|
+
const BUILT_IN = {
|
|
27657
|
+
className: "built_in",
|
|
27658
|
+
match: concat(/\b/, either(...builtIns), /(?=\()/)
|
|
27659
|
+
};
|
|
27660
|
+
const BUILT_INS2 = [
|
|
27661
|
+
BUILT_IN_GUARD,
|
|
27662
|
+
BUILT_IN
|
|
27663
|
+
];
|
|
27664
|
+
const OPERATOR_GUARD = {
|
|
27665
|
+
match: /->/,
|
|
27666
|
+
relevance: 0
|
|
27667
|
+
};
|
|
27668
|
+
const OPERATOR = {
|
|
27669
|
+
className: "operator",
|
|
27670
|
+
relevance: 0,
|
|
27671
|
+
variants: [
|
|
27672
|
+
{ match: operator },
|
|
27673
|
+
{
|
|
27674
|
+
match: `\\.(\\.|${operatorCharacter})+`
|
|
27675
|
+
}
|
|
27676
|
+
]
|
|
27677
|
+
};
|
|
27678
|
+
const OPERATORS = [
|
|
27679
|
+
OPERATOR_GUARD,
|
|
27680
|
+
OPERATOR
|
|
27681
|
+
];
|
|
27682
|
+
const decimalDigits = "([0-9]_*)+";
|
|
27683
|
+
const hexDigits = "([0-9a-fA-F]_*)+";
|
|
27684
|
+
const NUMBER = {
|
|
27685
|
+
className: "number",
|
|
27686
|
+
relevance: 0,
|
|
27687
|
+
variants: [
|
|
27688
|
+
{ match: `\\b(${decimalDigits})(\\.(${decimalDigits}))?` + `([eE][+-]?(${decimalDigits}))?\\b` },
|
|
27689
|
+
{ match: `\\b0x(${hexDigits})(\\.(${hexDigits}))?` + `([pP][+-]?(${decimalDigits}))?\\b` },
|
|
27690
|
+
{ match: /\b0o([0-7]_*)+\b/ },
|
|
27691
|
+
{ match: /\b0b([01]_*)+\b/ }
|
|
27692
|
+
]
|
|
27693
|
+
};
|
|
27694
|
+
const ESCAPED_CHARACTER = (rawDelimiter = "") => ({
|
|
27695
|
+
className: "subst",
|
|
27696
|
+
variants: [
|
|
27697
|
+
{ match: concat(/\\/, rawDelimiter, /[0\\tnr"']/) },
|
|
27698
|
+
{ match: concat(/\\/, rawDelimiter, /u\{[0-9a-fA-F]{1,8}\}/) }
|
|
27699
|
+
]
|
|
27700
|
+
});
|
|
27701
|
+
const ESCAPED_NEWLINE = (rawDelimiter = "") => ({
|
|
27702
|
+
className: "subst",
|
|
27703
|
+
match: concat(/\\/, rawDelimiter, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
27704
|
+
});
|
|
27705
|
+
const INTERPOLATION = (rawDelimiter = "") => ({
|
|
27706
|
+
className: "subst",
|
|
27707
|
+
label: "interpol",
|
|
27708
|
+
begin: concat(/\\/, rawDelimiter, /\(/),
|
|
27709
|
+
end: /\)/
|
|
27710
|
+
});
|
|
27711
|
+
const MULTILINE_STRING = (rawDelimiter = "") => ({
|
|
27712
|
+
begin: concat(rawDelimiter, /"""/),
|
|
27713
|
+
end: concat(/"""/, rawDelimiter),
|
|
27714
|
+
contains: [
|
|
27715
|
+
ESCAPED_CHARACTER(rawDelimiter),
|
|
27716
|
+
ESCAPED_NEWLINE(rawDelimiter),
|
|
27717
|
+
INTERPOLATION(rawDelimiter)
|
|
27718
|
+
]
|
|
27719
|
+
});
|
|
27720
|
+
const SINGLE_LINE_STRING = (rawDelimiter = "") => ({
|
|
27721
|
+
begin: concat(rawDelimiter, /"/),
|
|
27722
|
+
end: concat(/"/, rawDelimiter),
|
|
27723
|
+
contains: [
|
|
27724
|
+
ESCAPED_CHARACTER(rawDelimiter),
|
|
27725
|
+
INTERPOLATION(rawDelimiter)
|
|
27726
|
+
]
|
|
27727
|
+
});
|
|
27728
|
+
const STRING = {
|
|
27729
|
+
className: "string",
|
|
27730
|
+
variants: [
|
|
27731
|
+
MULTILINE_STRING(),
|
|
27732
|
+
MULTILINE_STRING("#"),
|
|
27733
|
+
MULTILINE_STRING("##"),
|
|
27734
|
+
MULTILINE_STRING("###"),
|
|
27735
|
+
SINGLE_LINE_STRING(),
|
|
27736
|
+
SINGLE_LINE_STRING("#"),
|
|
27737
|
+
SINGLE_LINE_STRING("##"),
|
|
27738
|
+
SINGLE_LINE_STRING("###")
|
|
27739
|
+
]
|
|
27740
|
+
};
|
|
27741
|
+
const REGEXP_CONTENTS = [
|
|
27742
|
+
hljs.BACKSLASH_ESCAPE,
|
|
27743
|
+
{
|
|
27744
|
+
begin: /\[/,
|
|
27745
|
+
end: /\]/,
|
|
27746
|
+
relevance: 0,
|
|
27747
|
+
contains: [hljs.BACKSLASH_ESCAPE]
|
|
27748
|
+
}
|
|
27749
|
+
];
|
|
27750
|
+
const BARE_REGEXP_LITERAL = {
|
|
27751
|
+
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
27752
|
+
end: /\//,
|
|
27753
|
+
contains: REGEXP_CONTENTS
|
|
27754
|
+
};
|
|
27755
|
+
const EXTENDED_REGEXP_LITERAL = (rawDelimiter) => {
|
|
27756
|
+
const begin = concat(rawDelimiter, /\//);
|
|
27757
|
+
const end = concat(/\//, rawDelimiter);
|
|
27758
|
+
return {
|
|
27759
|
+
begin,
|
|
27760
|
+
end,
|
|
27761
|
+
contains: [
|
|
27762
|
+
...REGEXP_CONTENTS,
|
|
27763
|
+
{
|
|
27764
|
+
scope: "comment",
|
|
27765
|
+
begin: `#(?!.*${end})`,
|
|
27766
|
+
end: /$/
|
|
27767
|
+
}
|
|
27768
|
+
]
|
|
27769
|
+
};
|
|
27770
|
+
};
|
|
27771
|
+
const REGEXP = {
|
|
27772
|
+
scope: "regexp",
|
|
27773
|
+
variants: [
|
|
27774
|
+
EXTENDED_REGEXP_LITERAL("###"),
|
|
27775
|
+
EXTENDED_REGEXP_LITERAL("##"),
|
|
27776
|
+
EXTENDED_REGEXP_LITERAL("#"),
|
|
27777
|
+
BARE_REGEXP_LITERAL
|
|
27778
|
+
]
|
|
27779
|
+
};
|
|
27780
|
+
const QUOTED_IDENTIFIER = { match: concat(/`/, identifier, /`/) };
|
|
27781
|
+
const IMPLICIT_PARAMETER = {
|
|
27782
|
+
className: "variable",
|
|
27783
|
+
match: /\$\d+/
|
|
27784
|
+
};
|
|
27785
|
+
const PROPERTY_WRAPPER_PROJECTION = {
|
|
27786
|
+
className: "variable",
|
|
27787
|
+
match: `\\$${identifierCharacter}+`
|
|
27788
|
+
};
|
|
27789
|
+
const IDENTIFIERS = [
|
|
27790
|
+
QUOTED_IDENTIFIER,
|
|
27791
|
+
IMPLICIT_PARAMETER,
|
|
27792
|
+
PROPERTY_WRAPPER_PROJECTION
|
|
27793
|
+
];
|
|
27794
|
+
const AVAILABLE_ATTRIBUTE = {
|
|
27795
|
+
match: /(@|#(un)?)available/,
|
|
27796
|
+
scope: "keyword",
|
|
27797
|
+
starts: { contains: [
|
|
27798
|
+
{
|
|
27799
|
+
begin: /\(/,
|
|
27800
|
+
end: /\)/,
|
|
27801
|
+
keywords: availabilityKeywords,
|
|
27802
|
+
contains: [
|
|
27803
|
+
...OPERATORS,
|
|
27804
|
+
NUMBER,
|
|
27805
|
+
STRING
|
|
27806
|
+
]
|
|
27807
|
+
}
|
|
27808
|
+
] }
|
|
27809
|
+
};
|
|
27810
|
+
const KEYWORD_ATTRIBUTE = {
|
|
27811
|
+
scope: "keyword",
|
|
27812
|
+
match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/)))
|
|
27813
|
+
};
|
|
27814
|
+
const USER_DEFINED_ATTRIBUTE = {
|
|
27815
|
+
scope: "meta",
|
|
27816
|
+
match: concat(/@/, identifier)
|
|
27817
|
+
};
|
|
27818
|
+
const ATTRIBUTES = [
|
|
27819
|
+
AVAILABLE_ATTRIBUTE,
|
|
27820
|
+
KEYWORD_ATTRIBUTE,
|
|
27821
|
+
USER_DEFINED_ATTRIBUTE
|
|
27822
|
+
];
|
|
27823
|
+
const TYPE = {
|
|
27824
|
+
match: lookahead(/\b[A-Z]/),
|
|
27825
|
+
relevance: 0,
|
|
27826
|
+
contains: [
|
|
27827
|
+
{
|
|
27828
|
+
className: "type",
|
|
27829
|
+
match: concat(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, identifierCharacter, "+")
|
|
27830
|
+
},
|
|
27831
|
+
{
|
|
27832
|
+
className: "type",
|
|
27833
|
+
match: typeIdentifier,
|
|
27834
|
+
relevance: 0
|
|
27835
|
+
},
|
|
27836
|
+
{
|
|
27837
|
+
match: /[?!]+/,
|
|
27838
|
+
relevance: 0
|
|
27839
|
+
},
|
|
27840
|
+
{
|
|
27841
|
+
match: /\.\.\./,
|
|
27842
|
+
relevance: 0
|
|
27843
|
+
},
|
|
27844
|
+
{
|
|
27845
|
+
match: concat(/\s+&\s+/, lookahead(typeIdentifier)),
|
|
27846
|
+
relevance: 0
|
|
27847
|
+
}
|
|
27848
|
+
]
|
|
27849
|
+
};
|
|
27850
|
+
const GENERIC_ARGUMENTS = {
|
|
27851
|
+
begin: /</,
|
|
27852
|
+
end: />/,
|
|
27853
|
+
keywords: KEYWORDS2,
|
|
27854
|
+
contains: [
|
|
27855
|
+
...COMMENTS,
|
|
27856
|
+
...KEYWORD_MODES,
|
|
27857
|
+
...ATTRIBUTES,
|
|
27858
|
+
OPERATOR_GUARD,
|
|
27859
|
+
TYPE
|
|
27860
|
+
]
|
|
27861
|
+
};
|
|
27862
|
+
TYPE.contains.push(GENERIC_ARGUMENTS);
|
|
27863
|
+
const TUPLE_ELEMENT_NAME = {
|
|
27864
|
+
match: concat(identifier, /\s*:/),
|
|
27865
|
+
keywords: "_|0",
|
|
27866
|
+
relevance: 0
|
|
27867
|
+
};
|
|
27868
|
+
const TUPLE = {
|
|
27869
|
+
begin: /\(/,
|
|
27870
|
+
end: /\)/,
|
|
27871
|
+
relevance: 0,
|
|
27872
|
+
keywords: KEYWORDS2,
|
|
27873
|
+
contains: [
|
|
27874
|
+
"self",
|
|
27875
|
+
TUPLE_ELEMENT_NAME,
|
|
27876
|
+
...COMMENTS,
|
|
27877
|
+
REGEXP,
|
|
27878
|
+
...KEYWORD_MODES,
|
|
27879
|
+
...BUILT_INS2,
|
|
27880
|
+
...OPERATORS,
|
|
27881
|
+
NUMBER,
|
|
27882
|
+
STRING,
|
|
27883
|
+
...IDENTIFIERS,
|
|
27884
|
+
...ATTRIBUTES,
|
|
27885
|
+
TYPE
|
|
27886
|
+
]
|
|
27887
|
+
};
|
|
27888
|
+
const GENERIC_PARAMETERS = {
|
|
27889
|
+
begin: /</,
|
|
27890
|
+
end: />/,
|
|
27891
|
+
keywords: "repeat each",
|
|
27892
|
+
contains: [
|
|
27893
|
+
...COMMENTS,
|
|
27894
|
+
TYPE
|
|
27895
|
+
]
|
|
27896
|
+
};
|
|
27897
|
+
const FUNCTION_PARAMETER_NAME = {
|
|
27898
|
+
begin: either(lookahead(concat(identifier, /\s*:/)), lookahead(concat(identifier, /\s+/, identifier, /\s*:/))),
|
|
27899
|
+
end: /:/,
|
|
27900
|
+
relevance: 0,
|
|
27901
|
+
contains: [
|
|
27902
|
+
{
|
|
27903
|
+
className: "keyword",
|
|
27904
|
+
match: /\b_\b/
|
|
27905
|
+
},
|
|
27906
|
+
{
|
|
27907
|
+
className: "params",
|
|
27908
|
+
match: identifier
|
|
27909
|
+
}
|
|
27910
|
+
]
|
|
27911
|
+
};
|
|
27912
|
+
const FUNCTION_PARAMETERS = {
|
|
27913
|
+
begin: /\(/,
|
|
27914
|
+
end: /\)/,
|
|
27915
|
+
keywords: KEYWORDS2,
|
|
27916
|
+
contains: [
|
|
27917
|
+
FUNCTION_PARAMETER_NAME,
|
|
27918
|
+
...COMMENTS,
|
|
27919
|
+
...KEYWORD_MODES,
|
|
27920
|
+
...OPERATORS,
|
|
27921
|
+
NUMBER,
|
|
27922
|
+
STRING,
|
|
27923
|
+
...ATTRIBUTES,
|
|
27924
|
+
TYPE,
|
|
27925
|
+
TUPLE
|
|
27926
|
+
],
|
|
27927
|
+
endsParent: true,
|
|
27928
|
+
illegal: /["']/
|
|
27929
|
+
};
|
|
27930
|
+
const FUNCTION_OR_MACRO = {
|
|
27931
|
+
match: [
|
|
27932
|
+
/(func|macro)/,
|
|
27933
|
+
/\s+/,
|
|
27934
|
+
either(QUOTED_IDENTIFIER.match, identifier, operator)
|
|
27935
|
+
],
|
|
27936
|
+
className: {
|
|
27937
|
+
1: "keyword",
|
|
27938
|
+
3: "title.function"
|
|
27939
|
+
},
|
|
27940
|
+
contains: [
|
|
27941
|
+
GENERIC_PARAMETERS,
|
|
27942
|
+
FUNCTION_PARAMETERS,
|
|
27943
|
+
WHITESPACE
|
|
27944
|
+
],
|
|
27945
|
+
illegal: [
|
|
27946
|
+
/\[/,
|
|
27947
|
+
/%/
|
|
27948
|
+
]
|
|
27949
|
+
};
|
|
27950
|
+
const INIT_SUBSCRIPT = {
|
|
27951
|
+
match: [
|
|
27952
|
+
/\b(?:subscript|init[?!]?)/,
|
|
27953
|
+
/\s*(?=[<(])/
|
|
27954
|
+
],
|
|
27955
|
+
className: { 1: "keyword" },
|
|
27956
|
+
contains: [
|
|
27957
|
+
GENERIC_PARAMETERS,
|
|
27958
|
+
FUNCTION_PARAMETERS,
|
|
27959
|
+
WHITESPACE
|
|
27960
|
+
],
|
|
27961
|
+
illegal: /\[|%/
|
|
27962
|
+
};
|
|
27963
|
+
const OPERATOR_DECLARATION = {
|
|
27964
|
+
match: [
|
|
27965
|
+
/operator/,
|
|
27966
|
+
/\s+/,
|
|
27967
|
+
operator
|
|
27968
|
+
],
|
|
27969
|
+
className: {
|
|
27970
|
+
1: "keyword",
|
|
27971
|
+
3: "title"
|
|
27972
|
+
}
|
|
27973
|
+
};
|
|
27974
|
+
const PRECEDENCEGROUP = {
|
|
27975
|
+
begin: [
|
|
27976
|
+
/precedencegroup/,
|
|
27977
|
+
/\s+/,
|
|
27978
|
+
typeIdentifier
|
|
27979
|
+
],
|
|
27980
|
+
className: {
|
|
27981
|
+
1: "keyword",
|
|
27982
|
+
3: "title"
|
|
27983
|
+
},
|
|
27984
|
+
contains: [TYPE],
|
|
27985
|
+
keywords: [
|
|
27986
|
+
...precedencegroupKeywords,
|
|
27987
|
+
...literals
|
|
27988
|
+
],
|
|
27989
|
+
end: /}/
|
|
27990
|
+
};
|
|
27991
|
+
const CLASS_FUNC_DECLARATION = {
|
|
27992
|
+
match: [
|
|
27993
|
+
/class\b/,
|
|
27994
|
+
/\s+/,
|
|
27995
|
+
/func\b/,
|
|
27996
|
+
/\s+/,
|
|
27997
|
+
/\b[A-Za-z_][A-Za-z0-9_]*\b/
|
|
27998
|
+
],
|
|
27999
|
+
scope: {
|
|
28000
|
+
1: "keyword",
|
|
28001
|
+
3: "keyword",
|
|
28002
|
+
5: "title.function"
|
|
28003
|
+
}
|
|
28004
|
+
};
|
|
28005
|
+
const CLASS_VAR_DECLARATION = {
|
|
28006
|
+
match: [
|
|
28007
|
+
/class\b/,
|
|
28008
|
+
/\s+/,
|
|
28009
|
+
/var\b/
|
|
28010
|
+
],
|
|
28011
|
+
scope: {
|
|
28012
|
+
1: "keyword",
|
|
28013
|
+
3: "keyword"
|
|
28014
|
+
}
|
|
28015
|
+
};
|
|
28016
|
+
const TYPE_DECLARATION = {
|
|
28017
|
+
begin: [
|
|
28018
|
+
/(struct|protocol|class|extension|enum|actor)/,
|
|
28019
|
+
/\s+/,
|
|
28020
|
+
identifier,
|
|
28021
|
+
/\s*/
|
|
28022
|
+
],
|
|
28023
|
+
beginScope: {
|
|
28024
|
+
1: "keyword",
|
|
28025
|
+
3: "title.class"
|
|
28026
|
+
},
|
|
28027
|
+
keywords: KEYWORDS2,
|
|
28028
|
+
contains: [
|
|
28029
|
+
GENERIC_PARAMETERS,
|
|
28030
|
+
...KEYWORD_MODES,
|
|
28031
|
+
{
|
|
28032
|
+
begin: /:/,
|
|
28033
|
+
end: /\{/,
|
|
28034
|
+
keywords: KEYWORDS2,
|
|
28035
|
+
contains: [
|
|
28036
|
+
{
|
|
28037
|
+
scope: "title.class.inherited",
|
|
28038
|
+
match: typeIdentifier
|
|
28039
|
+
},
|
|
28040
|
+
...KEYWORD_MODES
|
|
28041
|
+
],
|
|
28042
|
+
relevance: 0
|
|
28043
|
+
}
|
|
28044
|
+
]
|
|
28045
|
+
};
|
|
28046
|
+
for (const variant of STRING.variants) {
|
|
28047
|
+
const interpolation = variant.contains.find((mode) => mode.label === "interpol");
|
|
28048
|
+
interpolation.keywords = KEYWORDS2;
|
|
28049
|
+
const submodes = [
|
|
28050
|
+
...KEYWORD_MODES,
|
|
28051
|
+
...BUILT_INS2,
|
|
28052
|
+
...OPERATORS,
|
|
28053
|
+
NUMBER,
|
|
28054
|
+
STRING,
|
|
28055
|
+
...IDENTIFIERS
|
|
28056
|
+
];
|
|
28057
|
+
interpolation.contains = [
|
|
28058
|
+
...submodes,
|
|
28059
|
+
{
|
|
28060
|
+
begin: /\(/,
|
|
28061
|
+
end: /\)/,
|
|
28062
|
+
contains: [
|
|
28063
|
+
"self",
|
|
28064
|
+
...submodes
|
|
28065
|
+
]
|
|
28066
|
+
}
|
|
28067
|
+
];
|
|
28068
|
+
}
|
|
28069
|
+
return {
|
|
28070
|
+
name: "Swift",
|
|
28071
|
+
keywords: KEYWORDS2,
|
|
28072
|
+
contains: [
|
|
28073
|
+
...COMMENTS,
|
|
28074
|
+
FUNCTION_OR_MACRO,
|
|
28075
|
+
INIT_SUBSCRIPT,
|
|
28076
|
+
CLASS_FUNC_DECLARATION,
|
|
28077
|
+
CLASS_VAR_DECLARATION,
|
|
28078
|
+
TYPE_DECLARATION,
|
|
28079
|
+
OPERATOR_DECLARATION,
|
|
28080
|
+
PRECEDENCEGROUP,
|
|
28081
|
+
{
|
|
28082
|
+
beginKeywords: "import",
|
|
28083
|
+
end: /$/,
|
|
28084
|
+
contains: [...COMMENTS],
|
|
28085
|
+
relevance: 0
|
|
28086
|
+
},
|
|
28087
|
+
REGEXP,
|
|
28088
|
+
...KEYWORD_MODES,
|
|
28089
|
+
...BUILT_INS2,
|
|
28090
|
+
...OPERATORS,
|
|
28091
|
+
NUMBER,
|
|
28092
|
+
STRING,
|
|
28093
|
+
...IDENTIFIERS,
|
|
28094
|
+
...ATTRIBUTES,
|
|
28095
|
+
TYPE,
|
|
28096
|
+
TUPLE
|
|
28097
|
+
]
|
|
28098
|
+
};
|
|
28099
|
+
}
|
|
28100
|
+
|
|
27348
28101
|
// node_modules/highlight.js/es/languages/typescript.js
|
|
27349
28102
|
var IDENT_RE2 = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
27350
28103
|
var KEYWORDS2 = [
|
|
@@ -28252,99 +29005,100 @@ function xml(hljs) {
|
|
|
28252
29005
|
function L() {
|
|
28253
29006
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
28254
29007
|
}
|
|
28255
|
-
var
|
|
28256
|
-
function
|
|
28257
|
-
|
|
29008
|
+
var T = L();
|
|
29009
|
+
function G(u) {
|
|
29010
|
+
T = u;
|
|
28258
29011
|
}
|
|
28259
|
-
var
|
|
28260
|
-
function
|
|
28261
|
-
let t = typeof
|
|
29012
|
+
var I = { exec: () => null };
|
|
29013
|
+
function d(u, e = "") {
|
|
29014
|
+
let t = typeof u == "string" ? u : u.source, n = { replace: (r, i) => {
|
|
28262
29015
|
let s = typeof i == "string" ? i : i.source;
|
|
28263
29016
|
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
28264
29017
|
}, getRegex: () => new RegExp(t, e) };
|
|
28265
29018
|
return n;
|
|
28266
29019
|
}
|
|
28267
|
-
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (
|
|
28268
|
-
var
|
|
28269
|
-
var
|
|
28270
|
-
var
|
|
28271
|
-
var
|
|
29020
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u) => new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}#`), htmlBeginRegex: (u) => new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i") };
|
|
29021
|
+
var be = /^(?:[ \t]*(?:\n|$))+/;
|
|
29022
|
+
var Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
29023
|
+
var Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
29024
|
+
var E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
28272
29025
|
var Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
28273
|
-
var
|
|
28274
|
-
var
|
|
28275
|
-
var
|
|
28276
|
-
var
|
|
28277
|
-
var
|
|
28278
|
-
var
|
|
29026
|
+
var F = /(?:[*+-]|\d{1,9}[.)])/;
|
|
29027
|
+
var ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
29028
|
+
var oe = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
29029
|
+
var we = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
29030
|
+
var j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
29031
|
+
var ye = /^[^\n]+/;
|
|
28279
29032
|
var Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
28280
|
-
var
|
|
28281
|
-
var
|
|
29033
|
+
var Pe = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
29034
|
+
var Se = d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex();
|
|
28282
29035
|
var v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
28283
29036
|
var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
28284
|
-
var
|
|
28285
|
-
var
|
|
28286
|
-
var
|
|
28287
|
-
var K = { blockquote:
|
|
28288
|
-
var re =
|
|
28289
|
-
var
|
|
28290
|
-
var
|
|
28291
|
-
]`).replace("lheading",
|
|
28292
|
-
var
|
|
28293
|
-
var
|
|
28294
|
-
var
|
|
28295
|
-
var
|
|
29037
|
+
var $e = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
29038
|
+
var ae = d(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
29039
|
+
var _e = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex();
|
|
29040
|
+
var K = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye };
|
|
29041
|
+
var re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3}\t)[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
29042
|
+
var Le = { ...K, lheading: we, table: re, paragraph: d(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() };
|
|
29043
|
+
var Me = { ...K, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
|
|
29044
|
+
]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
29045
|
+
var ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
29046
|
+
var Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
29047
|
+
var le = /^( {2,}|\\)\n(?!\s*$)/;
|
|
29048
|
+
var Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
28296
29049
|
var D = /[\p{P}\p{S}]/u;
|
|
28297
29050
|
var W = /[\s\p{P}\p{S}]/u;
|
|
28298
|
-
var
|
|
28299
|
-
var Ee =
|
|
28300
|
-
var
|
|
29051
|
+
var ue = /[^\s\p{P}\p{S}]/u;
|
|
29052
|
+
var Ee = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex();
|
|
29053
|
+
var pe = /(?!~)[\p{P}\p{S}]/u;
|
|
28301
29054
|
var Ce = /(?!~)[\s\p{P}\p{S}]/u;
|
|
28302
|
-
var
|
|
28303
|
-
var
|
|
28304
|
-
var
|
|
28305
|
-
var
|
|
28306
|
-
var
|
|
28307
|
-
var
|
|
28308
|
-
var
|
|
28309
|
-
var Ze =
|
|
28310
|
-
var Ge =
|
|
28311
|
-
var
|
|
28312
|
-
var
|
|
28313
|
-
var je =
|
|
28314
|
-
var
|
|
28315
|
-
var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]
|
|
28316
|
-
var
|
|
28317
|
-
var
|
|
28318
|
-
var
|
|
28319
|
-
var
|
|
28320
|
-
var
|
|
28321
|
-
var
|
|
28322
|
-
var
|
|
28323
|
-
var
|
|
28324
|
-
var
|
|
28325
|
-
var
|
|
28326
|
-
var
|
|
28327
|
-
var
|
|
28328
|
-
|
|
29055
|
+
var Be = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
29056
|
+
var qe = /\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g;
|
|
29057
|
+
var ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
|
|
29058
|
+
var ve = d(ce, "u").replace(/punct/g, D).getRegex();
|
|
29059
|
+
var De = d(ce, "u").replace(/punct/g, pe).getRegex();
|
|
29060
|
+
var he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
29061
|
+
var He = d(he, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex();
|
|
29062
|
+
var Ze = d(he, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex();
|
|
29063
|
+
var Ge = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex();
|
|
29064
|
+
var Ne = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex();
|
|
29065
|
+
var Fe = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
29066
|
+
var je = d(U).replace("(?:-->|$)", "-->").getRegex();
|
|
29067
|
+
var Qe = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
29068
|
+
var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/;
|
|
29069
|
+
var Ue = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
29070
|
+
var de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex();
|
|
29071
|
+
var ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex();
|
|
29072
|
+
var Ke = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex();
|
|
29073
|
+
var se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
29074
|
+
var X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I };
|
|
29075
|
+
var We = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
|
|
29076
|
+
var N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() };
|
|
29077
|
+
var Xe = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
29078
|
+
var C = { normal: K, gfm: Le, pedantic: Me };
|
|
29079
|
+
var M = { normal: X, gfm: N, breaks: Xe, pedantic: We };
|
|
29080
|
+
var Je = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
29081
|
+
var ge = (u) => Je[u];
|
|
29082
|
+
function w(u, e) {
|
|
28329
29083
|
if (e) {
|
|
28330
|
-
if (m.escapeTest.test(
|
|
28331
|
-
return
|
|
28332
|
-
} else if (m.escapeTestNoEncode.test(
|
|
28333
|
-
return
|
|
28334
|
-
return
|
|
29084
|
+
if (m.escapeTest.test(u))
|
|
29085
|
+
return u.replace(m.escapeReplace, ge);
|
|
29086
|
+
} else if (m.escapeTestNoEncode.test(u))
|
|
29087
|
+
return u.replace(m.escapeReplaceNoEncode, ge);
|
|
29088
|
+
return u;
|
|
28335
29089
|
}
|
|
28336
|
-
function J(
|
|
29090
|
+
function J(u) {
|
|
28337
29091
|
try {
|
|
28338
|
-
|
|
29092
|
+
u = encodeURI(u).replace(m.percentDecode, "%");
|
|
28339
29093
|
} catch {
|
|
28340
29094
|
return null;
|
|
28341
29095
|
}
|
|
28342
|
-
return
|
|
29096
|
+
return u;
|
|
28343
29097
|
}
|
|
28344
|
-
function V(
|
|
28345
|
-
let t =
|
|
28346
|
-
let a = false,
|
|
28347
|
-
for (;--
|
|
29098
|
+
function V(u, e) {
|
|
29099
|
+
let t = u.replace(m.findPipe, (i, s, o) => {
|
|
29100
|
+
let a = false, l = s;
|
|
29101
|
+
for (;--l >= 0 && o[l] === "\\"; )
|
|
28348
29102
|
a = !a;
|
|
28349
29103
|
return a ? "|" : " |";
|
|
28350
29104
|
}), n = t.split(m.splitPipe), r = 0;
|
|
@@ -28358,13 +29112,13 @@ function V(l, e) {
|
|
|
28358
29112
|
n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
28359
29113
|
return n;
|
|
28360
29114
|
}
|
|
28361
|
-
function z(
|
|
28362
|
-
let n =
|
|
29115
|
+
function z(u, e, t) {
|
|
29116
|
+
let n = u.length;
|
|
28363
29117
|
if (n === 0)
|
|
28364
29118
|
return "";
|
|
28365
29119
|
let r = 0;
|
|
28366
29120
|
for (;r < n; ) {
|
|
28367
|
-
let i =
|
|
29121
|
+
let i = u.charAt(n - r - 1);
|
|
28368
29122
|
if (i === e && !t)
|
|
28369
29123
|
r++;
|
|
28370
29124
|
else if (i !== e && t)
|
|
@@ -28372,29 +29126,29 @@ function z(l, e, t) {
|
|
|
28372
29126
|
else
|
|
28373
29127
|
break;
|
|
28374
29128
|
}
|
|
28375
|
-
return
|
|
29129
|
+
return u.slice(0, n - r);
|
|
28376
29130
|
}
|
|
28377
|
-
function
|
|
28378
|
-
if (
|
|
29131
|
+
function fe(u, e) {
|
|
29132
|
+
if (u.indexOf(e[1]) === -1)
|
|
28379
29133
|
return -1;
|
|
28380
29134
|
let t = 0;
|
|
28381
|
-
for (let n = 0;n <
|
|
28382
|
-
if (
|
|
29135
|
+
for (let n = 0;n < u.length; n++)
|
|
29136
|
+
if (u[n] === "\\")
|
|
28383
29137
|
n++;
|
|
28384
|
-
else if (
|
|
29138
|
+
else if (u[n] === e[0])
|
|
28385
29139
|
t++;
|
|
28386
|
-
else if (
|
|
29140
|
+
else if (u[n] === e[1] && (t--, t < 0))
|
|
28387
29141
|
return n;
|
|
28388
29142
|
return t > 0 ? -2 : -1;
|
|
28389
29143
|
}
|
|
28390
|
-
function
|
|
28391
|
-
let i = e.href, s = e.title || null, o =
|
|
29144
|
+
function me(u, e, t, n, r) {
|
|
29145
|
+
let i = e.href, s = e.title || null, o = u[1].replace(r.other.outputLinkReplace, "$1");
|
|
28392
29146
|
n.state.inLink = true;
|
|
28393
|
-
let a = { type:
|
|
29147
|
+
let a = { type: u[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
|
|
28394
29148
|
return n.state.inLink = false, a;
|
|
28395
29149
|
}
|
|
28396
|
-
function
|
|
28397
|
-
let n =
|
|
29150
|
+
function Ve(u, e, t) {
|
|
29151
|
+
let n = u.match(t.other.indentCodeCompensation);
|
|
28398
29152
|
if (n === null)
|
|
28399
29153
|
return e;
|
|
28400
29154
|
let r = n[1];
|
|
@@ -28413,7 +29167,7 @@ var y = class {
|
|
|
28413
29167
|
rules;
|
|
28414
29168
|
lexer;
|
|
28415
29169
|
constructor(e) {
|
|
28416
|
-
this.options = e ||
|
|
29170
|
+
this.options = e || T;
|
|
28417
29171
|
}
|
|
28418
29172
|
space(e) {
|
|
28419
29173
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -28431,7 +29185,7 @@ var y = class {
|
|
|
28431
29185
|
fences(e) {
|
|
28432
29186
|
let t = this.rules.block.fences.exec(e);
|
|
28433
29187
|
if (t) {
|
|
28434
|
-
let n = t[0], r =
|
|
29188
|
+
let n = t[0], r = Ve(n, t[3] || "", this.rules);
|
|
28435
29189
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
28436
29190
|
}
|
|
28437
29191
|
}
|
|
@@ -28459,38 +29213,38 @@ var y = class {
|
|
|
28459
29213
|
`).split(`
|
|
28460
29214
|
`), r = "", i = "", s = [];
|
|
28461
29215
|
for (;n.length > 0; ) {
|
|
28462
|
-
let o = false, a = [],
|
|
28463
|
-
for (
|
|
28464
|
-
if (this.rules.other.blockquoteStart.test(n[
|
|
28465
|
-
a.push(n[
|
|
29216
|
+
let o = false, a = [], l;
|
|
29217
|
+
for (l = 0;l < n.length; l++)
|
|
29218
|
+
if (this.rules.other.blockquoteStart.test(n[l]))
|
|
29219
|
+
a.push(n[l]), o = true;
|
|
28466
29220
|
else if (!o)
|
|
28467
|
-
a.push(n[
|
|
29221
|
+
a.push(n[l]);
|
|
28468
29222
|
else
|
|
28469
29223
|
break;
|
|
28470
|
-
n = n.slice(
|
|
28471
|
-
let
|
|
28472
|
-
`),
|
|
29224
|
+
n = n.slice(l);
|
|
29225
|
+
let c = a.join(`
|
|
29226
|
+
`), p = c.replace(this.rules.other.blockquoteSetextReplace, `
|
|
28473
29227
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
28474
29228
|
r = r ? `${r}
|
|
28475
|
-
${
|
|
28476
|
-
${
|
|
28477
|
-
let
|
|
28478
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(
|
|
29229
|
+
${c}` : c, i = i ? `${i}
|
|
29230
|
+
${p}` : p;
|
|
29231
|
+
let g = this.lexer.state.top;
|
|
29232
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(p, s, true), this.lexer.state.top = g, n.length === 0)
|
|
28479
29233
|
break;
|
|
28480
|
-
let
|
|
28481
|
-
if (
|
|
29234
|
+
let h = s.at(-1);
|
|
29235
|
+
if (h?.type === "code")
|
|
28482
29236
|
break;
|
|
28483
|
-
if (
|
|
28484
|
-
let
|
|
29237
|
+
if (h?.type === "blockquote") {
|
|
29238
|
+
let R = h, f = R.raw + `
|
|
28485
29239
|
` + n.join(`
|
|
28486
|
-
`),
|
|
28487
|
-
s[s.length - 1] =
|
|
29240
|
+
`), O = this.blockquote(f);
|
|
29241
|
+
s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
|
|
28488
29242
|
break;
|
|
28489
|
-
} else if (
|
|
28490
|
-
let
|
|
29243
|
+
} else if (h?.type === "list") {
|
|
29244
|
+
let R = h, f = R.raw + `
|
|
28491
29245
|
` + n.join(`
|
|
28492
|
-
`),
|
|
28493
|
-
s[s.length - 1] =
|
|
29246
|
+
`), O = this.list(f);
|
|
29247
|
+
s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
|
|
28494
29248
|
`);
|
|
28495
29249
|
continue;
|
|
28496
29250
|
}
|
|
@@ -28505,37 +29259,37 @@ ${c}` : c;
|
|
|
28505
29259
|
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
28506
29260
|
let s = this.rules.other.listItemRegex(n), o = false;
|
|
28507
29261
|
for (;e; ) {
|
|
28508
|
-
let
|
|
29262
|
+
let l = false, c = "", p = "";
|
|
28509
29263
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e))
|
|
28510
29264
|
break;
|
|
28511
|
-
|
|
28512
|
-
let
|
|
28513
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (
|
|
28514
|
-
`, 1)[0],
|
|
28515
|
-
if (this.options.pedantic ? (
|
|
28516
|
-
`, e = e.substring(
|
|
28517
|
-
let
|
|
29265
|
+
c = t[0], e = e.substring(c.length);
|
|
29266
|
+
let g = t[2].split(`
|
|
29267
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
|
|
29268
|
+
`, 1)[0], R = !g.trim(), f = 0;
|
|
29269
|
+
if (this.options.pedantic ? (f = 2, p = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, p = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (c += h + `
|
|
29270
|
+
`, e = e.substring(h.length + 1), l = true), !l) {
|
|
29271
|
+
let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
|
|
28518
29272
|
for (;e; ) {
|
|
28519
|
-
let
|
|
29273
|
+
let Z = e.split(`
|
|
28520
29274
|
`, 1)[0], A;
|
|
28521
|
-
if (
|
|
29275
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h))
|
|
28522
29276
|
break;
|
|
28523
|
-
if (A.search(this.rules.other.nonSpaceChar) >=
|
|
28524
|
-
|
|
28525
|
-
` + A.slice(
|
|
29277
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim())
|
|
29278
|
+
p += `
|
|
29279
|
+
` + A.slice(f);
|
|
28526
29280
|
else {
|
|
28527
|
-
if (
|
|
29281
|
+
if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g))
|
|
28528
29282
|
break;
|
|
28529
|
-
|
|
28530
|
-
` +
|
|
29283
|
+
p += `
|
|
29284
|
+
` + h;
|
|
28531
29285
|
}
|
|
28532
|
-
!
|
|
28533
|
-
`, e = e.substring(
|
|
29286
|
+
!R && !h.trim() && (R = true), c += Z + `
|
|
29287
|
+
`, e = e.substring(Z.length + 1), g = A.slice(f);
|
|
28534
29288
|
}
|
|
28535
29289
|
}
|
|
28536
|
-
i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(
|
|
28537
|
-
let
|
|
28538
|
-
this.options.gfm && (
|
|
29290
|
+
i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true));
|
|
29291
|
+
let O = null, Y;
|
|
29292
|
+
this.options.gfm && (O = this.rules.other.listIsTask.exec(p), O && (Y = O[0] !== "[ ] ", p = p.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c, task: !!O, checked: Y, loose: false, text: p, tokens: [] }), i.raw += c;
|
|
28539
29293
|
}
|
|
28540
29294
|
let a = i.items.at(-1);
|
|
28541
29295
|
if (a)
|
|
@@ -28543,14 +29297,14 @@ ${c}` : c;
|
|
|
28543
29297
|
else
|
|
28544
29298
|
return;
|
|
28545
29299
|
i.raw = i.raw.trimEnd();
|
|
28546
|
-
for (let
|
|
28547
|
-
if (this.lexer.state.top = false, i.items[
|
|
28548
|
-
let
|
|
28549
|
-
i.loose =
|
|
29300
|
+
for (let l = 0;l < i.items.length; l++)
|
|
29301
|
+
if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
|
|
29302
|
+
let c = i.items[l].tokens.filter((g) => g.type === "space"), p = c.length > 0 && c.some((g) => this.rules.other.anyLine.test(g.raw));
|
|
29303
|
+
i.loose = p;
|
|
28550
29304
|
}
|
|
28551
29305
|
if (i.loose)
|
|
28552
|
-
for (let
|
|
28553
|
-
i.items[
|
|
29306
|
+
for (let l = 0;l < i.items.length; l++)
|
|
29307
|
+
i.items[l].loose = true;
|
|
28554
29308
|
return i;
|
|
28555
29309
|
}
|
|
28556
29310
|
}
|
|
@@ -28578,7 +29332,7 @@ ${c}` : c;
|
|
|
28578
29332
|
for (let o = 0;o < n.length; o++)
|
|
28579
29333
|
s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s.align[o] });
|
|
28580
29334
|
for (let o of i)
|
|
28581
|
-
s.rows.push(V(o, s.header.length).map((a,
|
|
29335
|
+
s.rows.push(V(o, s.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[l] })));
|
|
28582
29336
|
return s;
|
|
28583
29337
|
}
|
|
28584
29338
|
}
|
|
@@ -28621,7 +29375,7 @@ ${c}` : c;
|
|
|
28621
29375
|
if ((n.length - s.length) % 2 === 0)
|
|
28622
29376
|
return;
|
|
28623
29377
|
} else {
|
|
28624
|
-
let s =
|
|
29378
|
+
let s = fe(t[2], "()");
|
|
28625
29379
|
if (s === -2)
|
|
28626
29380
|
return;
|
|
28627
29381
|
if (s > -1) {
|
|
@@ -28635,7 +29389,7 @@ ${c}` : c;
|
|
|
28635
29389
|
s && (r = s[1], i = s[3]);
|
|
28636
29390
|
} else
|
|
28637
29391
|
i = t[3] ? t[3].slice(1, -1) : "";
|
|
28638
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
29392
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
28639
29393
|
}
|
|
28640
29394
|
}
|
|
28641
29395
|
reflink(e, t) {
|
|
@@ -28646,7 +29400,7 @@ ${c}` : c;
|
|
|
28646
29400
|
let s = n[0].charAt(0);
|
|
28647
29401
|
return { type: "text", raw: s, text: s };
|
|
28648
29402
|
}
|
|
28649
|
-
return
|
|
29403
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
28650
29404
|
}
|
|
28651
29405
|
}
|
|
28652
29406
|
emStrong(e, t, n = "") {
|
|
@@ -28654,27 +29408,27 @@ ${c}` : c;
|
|
|
28654
29408
|
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric))
|
|
28655
29409
|
return;
|
|
28656
29410
|
if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
28657
|
-
let s = [...r[0]].length - 1, o, a,
|
|
28658
|
-
for (
|
|
29411
|
+
let s = [...r[0]].length - 1, o, a, l = s, c = 0, p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
29412
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s);(r = p.exec(t)) != null; ) {
|
|
28659
29413
|
if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o)
|
|
28660
29414
|
continue;
|
|
28661
29415
|
if (a = [...o].length, r[3] || r[4]) {
|
|
28662
|
-
|
|
29416
|
+
l += a;
|
|
28663
29417
|
continue;
|
|
28664
29418
|
} else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
|
|
28665
|
-
|
|
29419
|
+
c += a;
|
|
28666
29420
|
continue;
|
|
28667
29421
|
}
|
|
28668
|
-
if (
|
|
29422
|
+
if (l -= a, l > 0)
|
|
28669
29423
|
continue;
|
|
28670
|
-
a = Math.min(a, a +
|
|
28671
|
-
let
|
|
29424
|
+
a = Math.min(a, a + l + c);
|
|
29425
|
+
let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + a);
|
|
28672
29426
|
if (Math.min(s, a) % 2) {
|
|
28673
|
-
let
|
|
28674
|
-
return { type: "em", raw:
|
|
29427
|
+
let f = h.slice(1, -1);
|
|
29428
|
+
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
28675
29429
|
}
|
|
28676
|
-
let
|
|
28677
|
-
return { type: "strong", raw:
|
|
29430
|
+
let R = h.slice(2, -2);
|
|
29431
|
+
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
28678
29432
|
}
|
|
28679
29433
|
}
|
|
28680
29434
|
}
|
|
@@ -28726,25 +29480,25 @@ ${c}` : c;
|
|
|
28726
29480
|
}
|
|
28727
29481
|
}
|
|
28728
29482
|
};
|
|
28729
|
-
var
|
|
29483
|
+
var x = class u {
|
|
28730
29484
|
tokens;
|
|
28731
29485
|
options;
|
|
28732
29486
|
state;
|
|
28733
29487
|
tokenizer;
|
|
28734
29488
|
inlineQueue;
|
|
28735
29489
|
constructor(e) {
|
|
28736
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
28737
|
-
let t = { other: m, block:
|
|
28738
|
-
this.options.pedantic ? (t.block =
|
|
29490
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y, this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
29491
|
+
let t = { other: m, block: C.normal, inline: M.normal };
|
|
29492
|
+
this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
|
|
28739
29493
|
}
|
|
28740
29494
|
static get rules() {
|
|
28741
|
-
return { block:
|
|
29495
|
+
return { block: C, inline: M };
|
|
28742
29496
|
}
|
|
28743
29497
|
static lex(e, t) {
|
|
28744
|
-
return new
|
|
29498
|
+
return new u(t).lex(e);
|
|
28745
29499
|
}
|
|
28746
29500
|
static lexInline(e, t) {
|
|
28747
|
-
return new
|
|
29501
|
+
return new u(t).inlineTokens(e);
|
|
28748
29502
|
}
|
|
28749
29503
|
lex(e) {
|
|
28750
29504
|
e = e.replace(m.carriageReturn, `
|
|
@@ -28820,8 +29574,8 @@ var b = class l {
|
|
|
28820
29574
|
let i = e;
|
|
28821
29575
|
if (this.options.extensions?.startBlock) {
|
|
28822
29576
|
let s = 1 / 0, o = e.slice(1), a;
|
|
28823
|
-
this.options.extensions.startBlock.forEach((
|
|
28824
|
-
a =
|
|
29577
|
+
this.options.extensions.startBlock.forEach((l) => {
|
|
29578
|
+
a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
|
|
28825
29579
|
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
28826
29580
|
}
|
|
28827
29581
|
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
@@ -28867,11 +29621,12 @@ var b = class l {
|
|
|
28867
29621
|
n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
28868
29622
|
for (;(r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; )
|
|
28869
29623
|
n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
29624
|
+
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
28870
29625
|
let i = false, s = "";
|
|
28871
29626
|
for (;e; ) {
|
|
28872
29627
|
i || (s = ""), i = false;
|
|
28873
29628
|
let o;
|
|
28874
|
-
if (this.options.extensions?.inline?.some((
|
|
29629
|
+
if (this.options.extensions?.inline?.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false))
|
|
28875
29630
|
continue;
|
|
28876
29631
|
if (o = this.tokenizer.escape(e)) {
|
|
28877
29632
|
e = e.substring(o.raw.length), t.push(o);
|
|
@@ -28887,8 +29642,8 @@ var b = class l {
|
|
|
28887
29642
|
}
|
|
28888
29643
|
if (o = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
28889
29644
|
e = e.substring(o.raw.length);
|
|
28890
|
-
let
|
|
28891
|
-
o.type === "text" &&
|
|
29645
|
+
let l = t.at(-1);
|
|
29646
|
+
o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
|
|
28892
29647
|
continue;
|
|
28893
29648
|
}
|
|
28894
29649
|
if (o = this.tokenizer.emStrong(e, n, s)) {
|
|
@@ -28917,24 +29672,24 @@ var b = class l {
|
|
|
28917
29672
|
}
|
|
28918
29673
|
let a = e;
|
|
28919
29674
|
if (this.options.extensions?.startInline) {
|
|
28920
|
-
let
|
|
28921
|
-
this.options.extensions.startInline.forEach((
|
|
28922
|
-
|
|
28923
|
-
}),
|
|
29675
|
+
let l = 1 / 0, c = e.slice(1), p;
|
|
29676
|
+
this.options.extensions.startInline.forEach((g) => {
|
|
29677
|
+
p = g.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
|
|
29678
|
+
}), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
|
|
28924
29679
|
}
|
|
28925
29680
|
if (o = this.tokenizer.inlineText(a)) {
|
|
28926
29681
|
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
|
|
28927
|
-
let
|
|
28928
|
-
|
|
29682
|
+
let l = t.at(-1);
|
|
29683
|
+
l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
|
|
28929
29684
|
continue;
|
|
28930
29685
|
}
|
|
28931
29686
|
if (e) {
|
|
28932
|
-
let
|
|
29687
|
+
let l = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
28933
29688
|
if (this.options.silent) {
|
|
28934
|
-
console.error(
|
|
29689
|
+
console.error(l);
|
|
28935
29690
|
break;
|
|
28936
29691
|
} else
|
|
28937
|
-
throw new Error(
|
|
29692
|
+
throw new Error(l);
|
|
28938
29693
|
}
|
|
28939
29694
|
}
|
|
28940
29695
|
return t;
|
|
@@ -28944,7 +29699,7 @@ var P = class {
|
|
|
28944
29699
|
options;
|
|
28945
29700
|
parser;
|
|
28946
29701
|
constructor(e) {
|
|
28947
|
-
this.options = e ||
|
|
29702
|
+
this.options = e || T;
|
|
28948
29703
|
}
|
|
28949
29704
|
space(e) {
|
|
28950
29705
|
return "";
|
|
@@ -29067,7 +29822,7 @@ ${e}</tr>
|
|
|
29067
29822
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : ("escaped" in e) && e.escaped ? e.text : w(e.text);
|
|
29068
29823
|
}
|
|
29069
29824
|
};
|
|
29070
|
-
var
|
|
29825
|
+
var $ = class {
|
|
29071
29826
|
strong({ text: e }) {
|
|
29072
29827
|
return e;
|
|
29073
29828
|
}
|
|
@@ -29096,18 +29851,18 @@ var S = class {
|
|
|
29096
29851
|
return "";
|
|
29097
29852
|
}
|
|
29098
29853
|
};
|
|
29099
|
-
var
|
|
29854
|
+
var b = class u2 {
|
|
29100
29855
|
options;
|
|
29101
29856
|
renderer;
|
|
29102
29857
|
textRenderer;
|
|
29103
29858
|
constructor(e) {
|
|
29104
|
-
this.options = e ||
|
|
29859
|
+
this.options = e || T, this.options.renderer = this.options.renderer || new P, this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $;
|
|
29105
29860
|
}
|
|
29106
29861
|
static parse(e, t) {
|
|
29107
|
-
return new
|
|
29862
|
+
return new u2(t).parse(e);
|
|
29108
29863
|
}
|
|
29109
29864
|
static parseInline(e, t) {
|
|
29110
|
-
return new
|
|
29865
|
+
return new u2(t).parseInline(e);
|
|
29111
29866
|
}
|
|
29112
29867
|
parse(e, t = true) {
|
|
29113
29868
|
let n = "";
|
|
@@ -29244,13 +29999,14 @@ var R = class l2 {
|
|
|
29244
29999
|
return n;
|
|
29245
30000
|
}
|
|
29246
30001
|
};
|
|
29247
|
-
var
|
|
30002
|
+
var S = class {
|
|
29248
30003
|
options;
|
|
29249
30004
|
block;
|
|
29250
30005
|
constructor(e) {
|
|
29251
|
-
this.options = e ||
|
|
30006
|
+
this.options = e || T;
|
|
29252
30007
|
}
|
|
29253
|
-
static passThroughHooks = new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
30008
|
+
static passThroughHooks = new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
30009
|
+
static passThroughHooksRespectAsync = new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
29254
30010
|
preprocess(e) {
|
|
29255
30011
|
return e;
|
|
29256
30012
|
}
|
|
@@ -29260,11 +30016,14 @@ var $ = class {
|
|
|
29260
30016
|
processAllTokens(e) {
|
|
29261
30017
|
return e;
|
|
29262
30018
|
}
|
|
30019
|
+
emStrongMask(e) {
|
|
30020
|
+
return e;
|
|
30021
|
+
}
|
|
29263
30022
|
provideLexer() {
|
|
29264
|
-
return this.block ?
|
|
30023
|
+
return this.block ? x.lex : x.lexInline;
|
|
29265
30024
|
}
|
|
29266
30025
|
provideParser() {
|
|
29267
|
-
return this.block ?
|
|
30026
|
+
return this.block ? b.parse : b.parseInline;
|
|
29268
30027
|
}
|
|
29269
30028
|
};
|
|
29270
30029
|
var B = class {
|
|
@@ -29272,12 +30031,12 @@ var B = class {
|
|
|
29272
30031
|
options = this.setOptions;
|
|
29273
30032
|
parse = this.parseMarkdown(true);
|
|
29274
30033
|
parseInline = this.parseMarkdown(false);
|
|
29275
|
-
Parser =
|
|
30034
|
+
Parser = b;
|
|
29276
30035
|
Renderer = P;
|
|
29277
|
-
TextRenderer =
|
|
29278
|
-
Lexer =
|
|
30036
|
+
TextRenderer = $;
|
|
30037
|
+
Lexer = x;
|
|
29279
30038
|
Tokenizer = y;
|
|
29280
|
-
Hooks =
|
|
30039
|
+
Hooks = S;
|
|
29281
30040
|
constructor(...e) {
|
|
29282
30041
|
this.use(...e);
|
|
29283
30042
|
}
|
|
@@ -29337,10 +30096,10 @@ var B = class {
|
|
|
29337
30096
|
throw new Error(`renderer '${s}' does not exist`);
|
|
29338
30097
|
if (["options", "parser"].includes(s))
|
|
29339
30098
|
continue;
|
|
29340
|
-
let o = s, a = n.renderer[o],
|
|
29341
|
-
i[o] = (...
|
|
29342
|
-
let
|
|
29343
|
-
return
|
|
30099
|
+
let o = s, a = n.renderer[o], l = i[o];
|
|
30100
|
+
i[o] = (...c) => {
|
|
30101
|
+
let p = a.apply(i, c);
|
|
30102
|
+
return p === false && (p = l.apply(i, c)), p || "";
|
|
29344
30103
|
};
|
|
29345
30104
|
}
|
|
29346
30105
|
r.renderer = i;
|
|
@@ -29352,30 +30111,38 @@ var B = class {
|
|
|
29352
30111
|
throw new Error(`tokenizer '${s}' does not exist`);
|
|
29353
30112
|
if (["options", "rules", "lexer"].includes(s))
|
|
29354
30113
|
continue;
|
|
29355
|
-
let o = s, a = n.tokenizer[o],
|
|
29356
|
-
i[o] = (...
|
|
29357
|
-
let
|
|
29358
|
-
return
|
|
30114
|
+
let o = s, a = n.tokenizer[o], l = i[o];
|
|
30115
|
+
i[o] = (...c) => {
|
|
30116
|
+
let p = a.apply(i, c);
|
|
30117
|
+
return p === false && (p = l.apply(i, c)), p;
|
|
29359
30118
|
};
|
|
29360
30119
|
}
|
|
29361
30120
|
r.tokenizer = i;
|
|
29362
30121
|
}
|
|
29363
30122
|
if (n.hooks) {
|
|
29364
|
-
let i = this.defaults.hooks || new
|
|
30123
|
+
let i = this.defaults.hooks || new S;
|
|
29365
30124
|
for (let s in n.hooks) {
|
|
29366
30125
|
if (!(s in i))
|
|
29367
30126
|
throw new Error(`hook '${s}' does not exist`);
|
|
29368
30127
|
if (["options", "block"].includes(s))
|
|
29369
30128
|
continue;
|
|
29370
|
-
let o = s, a = n.hooks[o],
|
|
29371
|
-
|
|
30129
|
+
let o = s, a = n.hooks[o], l = i[o];
|
|
30130
|
+
S.passThroughHooks.has(s) ? i[o] = (c) => {
|
|
30131
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s))
|
|
30132
|
+
return (async () => {
|
|
30133
|
+
let g = await a.call(i, c);
|
|
30134
|
+
return l.call(i, g);
|
|
30135
|
+
})();
|
|
30136
|
+
let p = a.call(i, c);
|
|
30137
|
+
return l.call(i, p);
|
|
30138
|
+
} : i[o] = (...c) => {
|
|
29372
30139
|
if (this.defaults.async)
|
|
29373
|
-
return
|
|
29374
|
-
|
|
29375
|
-
|
|
29376
|
-
|
|
29377
|
-
let
|
|
29378
|
-
return
|
|
30140
|
+
return (async () => {
|
|
30141
|
+
let g = await a.apply(i, c);
|
|
30142
|
+
return g === false && (g = await l.apply(i, c)), g;
|
|
30143
|
+
})();
|
|
30144
|
+
let p = a.apply(i, c);
|
|
30145
|
+
return p === false && (p = l.apply(i, c)), p;
|
|
29379
30146
|
};
|
|
29380
30147
|
}
|
|
29381
30148
|
r.hooks = i;
|
|
@@ -29394,10 +30161,10 @@ var B = class {
|
|
|
29394
30161
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
29395
30162
|
}
|
|
29396
30163
|
lexer(e, t) {
|
|
29397
|
-
return
|
|
30164
|
+
return x.lex(e, t ?? this.defaults);
|
|
29398
30165
|
}
|
|
29399
30166
|
parser(e, t) {
|
|
29400
|
-
return
|
|
30167
|
+
return b.parse(e, t ?? this.defaults);
|
|
29401
30168
|
}
|
|
29402
30169
|
parseMarkdown(e) {
|
|
29403
30170
|
return (n, r) => {
|
|
@@ -29408,18 +30175,21 @@ var B = class {
|
|
|
29408
30175
|
return o(new Error("marked(): input parameter is undefined or null"));
|
|
29409
30176
|
if (typeof n != "string")
|
|
29410
30177
|
return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
29411
|
-
s.hooks && (s.hooks.options = s, s.hooks.block = e)
|
|
29412
|
-
|
|
29413
|
-
|
|
29414
|
-
|
|
30178
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async)
|
|
30179
|
+
return (async () => {
|
|
30180
|
+
let a = s.hooks ? await s.hooks.preprocess(n) : n, c = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s), p = s.hooks ? await s.hooks.processAllTokens(c) : c;
|
|
30181
|
+
s.walkTokens && await Promise.all(this.walkTokens(p, s.walkTokens));
|
|
30182
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
|
|
30183
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
30184
|
+
})().catch(o);
|
|
29415
30185
|
try {
|
|
29416
30186
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
29417
|
-
let
|
|
29418
|
-
s.hooks && (
|
|
29419
|
-
let
|
|
29420
|
-
return s.hooks && (
|
|
29421
|
-
} catch (
|
|
29422
|
-
return o(
|
|
30187
|
+
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
30188
|
+
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
30189
|
+
let p = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
30190
|
+
return s.hooks && (p = s.hooks.postprocess(p)), p;
|
|
30191
|
+
} catch (a) {
|
|
30192
|
+
return o(a);
|
|
29423
30193
|
}
|
|
29424
30194
|
};
|
|
29425
30195
|
}
|
|
@@ -29437,37 +30207,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
29437
30207
|
}
|
|
29438
30208
|
};
|
|
29439
30209
|
var _ = new B;
|
|
29440
|
-
function
|
|
29441
|
-
return _.parse(
|
|
30210
|
+
function k(u3, e) {
|
|
30211
|
+
return _.parse(u3, e);
|
|
29442
30212
|
}
|
|
29443
|
-
|
|
29444
|
-
return _.setOptions(
|
|
30213
|
+
k.options = k.setOptions = function(u3) {
|
|
30214
|
+
return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
|
|
29445
30215
|
};
|
|
29446
|
-
|
|
29447
|
-
|
|
29448
|
-
|
|
29449
|
-
return _.use(...
|
|
30216
|
+
k.getDefaults = L;
|
|
30217
|
+
k.defaults = T;
|
|
30218
|
+
k.use = function(...u3) {
|
|
30219
|
+
return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
|
|
29450
30220
|
};
|
|
29451
|
-
|
|
29452
|
-
return _.walkTokens(
|
|
30221
|
+
k.walkTokens = function(u3, e) {
|
|
30222
|
+
return _.walkTokens(u3, e);
|
|
29453
30223
|
};
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
|
|
29458
|
-
|
|
29459
|
-
|
|
29460
|
-
|
|
29461
|
-
|
|
29462
|
-
|
|
29463
|
-
|
|
29464
|
-
var
|
|
29465
|
-
var Zt =
|
|
29466
|
-
var Gt =
|
|
29467
|
-
var
|
|
29468
|
-
var
|
|
29469
|
-
var
|
|
29470
|
-
var
|
|
30224
|
+
k.parseInline = _.parseInline;
|
|
30225
|
+
k.Parser = b;
|
|
30226
|
+
k.parser = b.parse;
|
|
30227
|
+
k.Renderer = P;
|
|
30228
|
+
k.TextRenderer = $;
|
|
30229
|
+
k.Lexer = x;
|
|
30230
|
+
k.lexer = x.lex;
|
|
30231
|
+
k.Tokenizer = y;
|
|
30232
|
+
k.Hooks = S;
|
|
30233
|
+
k.parse = k;
|
|
30234
|
+
var Ht = k.options;
|
|
30235
|
+
var Zt = k.setOptions;
|
|
30236
|
+
var Gt = k.use;
|
|
30237
|
+
var Nt = k.walkTokens;
|
|
30238
|
+
var Ft = k.parseInline;
|
|
30239
|
+
var Qt = b.parse;
|
|
30240
|
+
var Ut = x.lex;
|
|
29471
30241
|
|
|
29472
30242
|
// node_modules/marked-highlight/src/index.js
|
|
29473
30243
|
function markedHighlight(options2) {
|
|
@@ -29564,6 +30334,7 @@ core_default.registerLanguage("xml", xml);
|
|
|
29564
30334
|
core_default.registerLanguage("diff", diff);
|
|
29565
30335
|
core_default.registerLanguage("python", python);
|
|
29566
30336
|
core_default.registerLanguage("json", json);
|
|
30337
|
+
core_default.registerLanguage("swift", swift);
|
|
29567
30338
|
var marked = new B(markedHighlight({
|
|
29568
30339
|
emptyLangClass: "hljs",
|
|
29569
30340
|
langPrefix: "hljs language-",
|
|
@@ -29617,7 +30388,9 @@ function convertMarkdownToHtml(markdownContent) {
|
|
|
29617
30388
|
"h2",
|
|
29618
30389
|
"span",
|
|
29619
30390
|
"iframe",
|
|
29620
|
-
"div"
|
|
30391
|
+
"div",
|
|
30392
|
+
"video",
|
|
30393
|
+
"source"
|
|
29621
30394
|
]),
|
|
29622
30395
|
allowedAttributes: {
|
|
29623
30396
|
...import_sanitize_html.default.defaults.allowedAttributes,
|
|
@@ -29627,7 +30400,19 @@ function convertMarkdownToHtml(markdownContent) {
|
|
|
29627
30400
|
pre: ["class"],
|
|
29628
30401
|
span: ["class", "style"],
|
|
29629
30402
|
iframe: ["src", "frameborder", "allow", "allowfullscreen", "loading"],
|
|
29630
|
-
div: ["class"]
|
|
30403
|
+
div: ["class"],
|
|
30404
|
+
video: [
|
|
30405
|
+
"src",
|
|
30406
|
+
"controls",
|
|
30407
|
+
"width",
|
|
30408
|
+
"height",
|
|
30409
|
+
"autoplay",
|
|
30410
|
+
"loop",
|
|
30411
|
+
"muted",
|
|
30412
|
+
"preload",
|
|
30413
|
+
"poster"
|
|
30414
|
+
],
|
|
30415
|
+
source: ["src", "type"]
|
|
29631
30416
|
},
|
|
29632
30417
|
allowedClasses: {
|
|
29633
30418
|
code: ["*"],
|