mystmd 1.3.28__py3-none-any.whl → 1.5.0__py3-none-any.whl
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.
- {mystmd-1.3.28.dist-info → mystmd-1.5.0.dist-info}/METADATA +1 -1
- mystmd-1.5.0.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +568 -396
- mystmd-1.3.28.dist-info/RECORD +0 -9
- {mystmd-1.3.28.dist-info → mystmd-1.5.0.dist-info}/WHEEL +0 -0
- {mystmd-1.3.28.dist-info → mystmd-1.5.0.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.28.dist-info → mystmd-1.5.0.dist-info}/licenses/LICENSE +0 -0
mystmd_py/myst.cjs
CHANGED
@@ -33649,8 +33649,8 @@ var require_type = __commonJS({
|
|
33649
33649
|
exports2.typeMatcher = void 0;
|
33650
33650
|
var _logger = _interopRequireDefault3(require_logger());
|
33651
33651
|
var _dataType = require_dataType();
|
33652
|
-
function _interopRequireDefault3(
|
33653
|
-
return
|
33652
|
+
function _interopRequireDefault3(e2) {
|
33653
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
33654
33654
|
}
|
33655
33655
|
var types6 = {};
|
33656
33656
|
var dataTypes = {};
|
@@ -33759,14 +33759,8 @@ var require_parser2 = __commonJS({
|
|
33759
33759
|
});
|
33760
33760
|
exports2.TypeParser = exports2.FormatParser = exports2.DataParser = void 0;
|
33761
33761
|
var _type3 = require_type();
|
33762
|
-
function _defineProperty(
|
33763
|
-
|
33764
|
-
if (key2 in obj) {
|
33765
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
33766
|
-
} else {
|
33767
|
-
obj[key2] = value;
|
33768
|
-
}
|
33769
|
-
return obj;
|
33762
|
+
function _defineProperty(e2, r2, t2) {
|
33763
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
33770
33764
|
}
|
33771
33765
|
function _toPropertyKey(t2) {
|
33772
33766
|
var i2 = _toPrimitive(t2, "string");
|
@@ -34176,14 +34170,8 @@ var require_csl = __commonJS({
|
|
34176
34170
|
}
|
34177
34171
|
return e2;
|
34178
34172
|
}
|
34179
|
-
function _defineProperty(
|
34180
|
-
|
34181
|
-
if (key2 in obj) {
|
34182
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
34183
|
-
} else {
|
34184
|
-
obj[key2] = value;
|
34185
|
-
}
|
34186
|
-
return obj;
|
34173
|
+
function _defineProperty(e2, r2, t2) {
|
34174
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
34187
34175
|
}
|
34188
34176
|
function _toPropertyKey(t2) {
|
34189
34177
|
var i2 = _toPrimitive(t2, "string");
|
@@ -34472,6 +34460,145 @@ var require_csl = __commonJS({
|
|
34472
34460
|
}
|
34473
34461
|
});
|
34474
34462
|
|
34463
|
+
// ../../node_modules/@citation-js/core/lib/plugins/input/data.js
|
34464
|
+
var require_data = __commonJS({
|
34465
|
+
"../../node_modules/@citation-js/core/lib/plugins/input/data.js"(exports2) {
|
34466
|
+
"use strict";
|
34467
|
+
Object.defineProperty(exports2, "__esModule", {
|
34468
|
+
value: true
|
34469
|
+
});
|
34470
|
+
exports2.addDataParser = addDataParser;
|
34471
|
+
exports2.data = data;
|
34472
|
+
exports2.dataAsync = dataAsync;
|
34473
|
+
exports2.hasDataParser = hasDataParser;
|
34474
|
+
exports2.listDataParser = listDataParser;
|
34475
|
+
exports2.removeDataParser = removeDataParser;
|
34476
|
+
var _type3 = require_type();
|
34477
|
+
var parsers = {};
|
34478
|
+
var asyncParsers = {};
|
34479
|
+
var nativeParsers = {
|
34480
|
+
"@csl/object": (input3) => [input3],
|
34481
|
+
"@csl/list+object": (input3) => input3,
|
34482
|
+
"@else/list+object": (input3) => input3.map((item) => {
|
34483
|
+
const type2 = (0, _type3.type)(item);
|
34484
|
+
return data(item, type2);
|
34485
|
+
}).flat(),
|
34486
|
+
"@invalid": () => {
|
34487
|
+
throw new Error("This format is not supported or recognized");
|
34488
|
+
}
|
34489
|
+
};
|
34490
|
+
var nativeAsyncParsers = {
|
34491
|
+
"@else/list+object": (input3) => Promise.all(input3.map((item) => {
|
34492
|
+
const type2 = (0, _type3.type)(item);
|
34493
|
+
return dataAsync(item, type2);
|
34494
|
+
})).then((input4) => input4.flat())
|
34495
|
+
};
|
34496
|
+
function data(input3, type2) {
|
34497
|
+
if (typeof parsers[type2] === "function") {
|
34498
|
+
return parsers[type2](input3);
|
34499
|
+
} else if (typeof nativeParsers[type2] === "function") {
|
34500
|
+
return nativeParsers[type2](input3);
|
34501
|
+
} else {
|
34502
|
+
throw new TypeError(`No synchronous parser found for ${type2}`);
|
34503
|
+
}
|
34504
|
+
}
|
34505
|
+
async function dataAsync(input3, type2) {
|
34506
|
+
if (typeof asyncParsers[type2] === "function") {
|
34507
|
+
return asyncParsers[type2](input3);
|
34508
|
+
} else if (typeof nativeAsyncParsers[type2] === "function") {
|
34509
|
+
return nativeAsyncParsers[type2](input3);
|
34510
|
+
} else if (hasDataParser(type2, false)) {
|
34511
|
+
return data(input3, type2);
|
34512
|
+
} else {
|
34513
|
+
throw new TypeError(`No parser found for ${type2}`);
|
34514
|
+
}
|
34515
|
+
}
|
34516
|
+
function addDataParser(format, {
|
34517
|
+
parser: parser3,
|
34518
|
+
async
|
34519
|
+
}) {
|
34520
|
+
if (async) {
|
34521
|
+
asyncParsers[format] = parser3;
|
34522
|
+
} else {
|
34523
|
+
parsers[format] = parser3;
|
34524
|
+
}
|
34525
|
+
}
|
34526
|
+
function hasDataParser(type2, async) {
|
34527
|
+
return async ? asyncParsers[type2] || nativeAsyncParsers[type2] : parsers[type2] || nativeParsers[type2];
|
34528
|
+
}
|
34529
|
+
function removeDataParser(type2, async) {
|
34530
|
+
delete (async ? asyncParsers : parsers)[type2];
|
34531
|
+
}
|
34532
|
+
function listDataParser(async) {
|
34533
|
+
return Object.keys(async ? asyncParsers : parsers);
|
34534
|
+
}
|
34535
|
+
}
|
34536
|
+
});
|
34537
|
+
|
34538
|
+
// ../../node_modules/@citation-js/core/lib/plugins/input/register.js
|
34539
|
+
var require_register = __commonJS({
|
34540
|
+
"../../node_modules/@citation-js/core/lib/plugins/input/register.js"(exports2) {
|
34541
|
+
"use strict";
|
34542
|
+
Object.defineProperty(exports2, "__esModule", {
|
34543
|
+
value: true
|
34544
|
+
});
|
34545
|
+
exports2.add = add2;
|
34546
|
+
exports2.get = get2;
|
34547
|
+
exports2.has = has3;
|
34548
|
+
exports2.list = list6;
|
34549
|
+
exports2.remove = remove3;
|
34550
|
+
var _parser = require_parser2();
|
34551
|
+
var _type3 = require_type();
|
34552
|
+
var _data = require_data();
|
34553
|
+
var formats = {};
|
34554
|
+
function add2(format, parsers) {
|
34555
|
+
const formatParser = new _parser.FormatParser(format, parsers);
|
34556
|
+
formatParser.validate();
|
34557
|
+
const index4 = formats[format] || (formats[format] = {});
|
34558
|
+
if (formatParser.typeParser) {
|
34559
|
+
(0, _type3.addTypeParser)(format, formatParser.typeParser);
|
34560
|
+
index4.type = true;
|
34561
|
+
}
|
34562
|
+
if (formatParser.dataParser) {
|
34563
|
+
(0, _data.addDataParser)(format, formatParser.dataParser);
|
34564
|
+
index4.data = true;
|
34565
|
+
}
|
34566
|
+
if (formatParser.asyncDataParser) {
|
34567
|
+
(0, _data.addDataParser)(format, formatParser.asyncDataParser);
|
34568
|
+
index4.asyncData = true;
|
34569
|
+
}
|
34570
|
+
if (parsers.outputs) {
|
34571
|
+
index4.outputs = parsers.outputs;
|
34572
|
+
}
|
34573
|
+
}
|
34574
|
+
function get2(format) {
|
34575
|
+
return formats[format];
|
34576
|
+
}
|
34577
|
+
function remove3(format) {
|
34578
|
+
const index4 = formats[format];
|
34579
|
+
if (!index4) {
|
34580
|
+
return;
|
34581
|
+
}
|
34582
|
+
if (index4.type) {
|
34583
|
+
(0, _type3.removeTypeParser)(format);
|
34584
|
+
}
|
34585
|
+
if (index4.data) {
|
34586
|
+
(0, _data.removeDataParser)(format);
|
34587
|
+
}
|
34588
|
+
if (index4.asyncData) {
|
34589
|
+
(0, _data.removeDataParser)(format, true);
|
34590
|
+
}
|
34591
|
+
delete formats[format];
|
34592
|
+
}
|
34593
|
+
function has3(format) {
|
34594
|
+
return format in formats;
|
34595
|
+
}
|
34596
|
+
function list6() {
|
34597
|
+
return Object.keys(formats);
|
34598
|
+
}
|
34599
|
+
}
|
34600
|
+
});
|
34601
|
+
|
34475
34602
|
// ../../node_modules/@citation-js/core/lib/util/csl.js
|
34476
34603
|
var require_csl2 = __commonJS({
|
34477
34604
|
"../../node_modules/@citation-js/core/lib/util/csl.js"(exports2) {
|
@@ -34502,14 +34629,8 @@ var require_csl2 = __commonJS({
|
|
34502
34629
|
}
|
34503
34630
|
return e2;
|
34504
34631
|
}
|
34505
|
-
function _defineProperty(
|
34506
|
-
|
34507
|
-
if (key2 in obj) {
|
34508
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
34509
|
-
} else {
|
34510
|
-
obj[key2] = value;
|
34511
|
-
}
|
34512
|
-
return obj;
|
34632
|
+
function _defineProperty(e2, r2, t2) {
|
34633
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
34513
34634
|
}
|
34514
34635
|
function _toPropertyKey(t2) {
|
34515
34636
|
var i2 = _toPrimitive(t2, "string");
|
@@ -39205,7 +39326,7 @@ var require_package = __commonJS({
|
|
39205
39326
|
"../../node_modules/@citation-js/core/package.json"(exports2, module2) {
|
39206
39327
|
module2.exports = {
|
39207
39328
|
name: "@citation-js/core",
|
39208
|
-
version: "0.7.
|
39329
|
+
version: "0.7.18",
|
39209
39330
|
description: "Convert different bibliographic metadata sources",
|
39210
39331
|
keywords: [
|
39211
39332
|
"citation-js",
|
@@ -39245,7 +39366,7 @@ var require_package = __commonJS({
|
|
39245
39366
|
"fetch-ponyfill": "^7.1.0",
|
39246
39367
|
"sync-fetch": "^0.4.1"
|
39247
39368
|
},
|
39248
|
-
gitHead: "
|
39369
|
+
gitHead: "c4ac806070502051e36cf3ab8ad29f3d97e85978"
|
39249
39370
|
};
|
39250
39371
|
}
|
39251
39372
|
});
|
@@ -39265,8 +39386,8 @@ var require_fetchFile = __commonJS({
|
|
39265
39386
|
var _fetchPonyfill = _interopRequireDefault3(require_fetch_node());
|
39266
39387
|
var _logger = _interopRequireDefault3(require_logger());
|
39267
39388
|
var _package = _interopRequireDefault3(require_package());
|
39268
|
-
function _interopRequireDefault3(
|
39269
|
-
return
|
39389
|
+
function _interopRequireDefault3(e2) {
|
39390
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
39270
39391
|
}
|
39271
39392
|
var isBrowser = typeof location !== "undefined" && typeof navigator !== "undefined";
|
39272
39393
|
var {
|
@@ -39487,7 +39608,7 @@ var require_stack = __commonJS({
|
|
39487
39608
|
});
|
39488
39609
|
|
39489
39610
|
// ../../node_modules/@citation-js/core/lib/util/register.js
|
39490
|
-
var
|
39611
|
+
var require_register2 = __commonJS({
|
39491
39612
|
"../../node_modules/@citation-js/core/lib/util/register.js"(exports2) {
|
39492
39613
|
"use strict";
|
39493
39614
|
Object.defineProperty(exports2, "__esModule", {
|
@@ -39769,11 +39890,11 @@ var require_util = __commonJS({
|
|
39769
39890
|
var _fetchFile = require_fetchFile();
|
39770
39891
|
var _fetchId = _interopRequireDefault3(require_fetchId());
|
39771
39892
|
var _stack = _interopRequireDefault3(require_stack());
|
39772
|
-
var _register = _interopRequireDefault3(
|
39893
|
+
var _register = _interopRequireDefault3(require_register2());
|
39773
39894
|
var _grammar = require_grammar();
|
39774
39895
|
var _translator = require_translator();
|
39775
|
-
function _interopRequireDefault3(
|
39776
|
-
return
|
39896
|
+
function _interopRequireDefault3(e2) {
|
39897
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
39777
39898
|
}
|
39778
39899
|
}
|
39779
39900
|
});
|
@@ -39788,12 +39909,12 @@ var require_chain = __commonJS({
|
|
39788
39909
|
exports2.chainLinkAsync = exports2.chainLink = exports2.chainAsync = exports2.chain = void 0;
|
39789
39910
|
var _index4 = require_util();
|
39790
39911
|
var _logger = _interopRequireDefault3(require_logger());
|
39791
|
-
var _register =
|
39912
|
+
var _register = require_register();
|
39792
39913
|
var _type3 = require_type();
|
39793
39914
|
var _data = require_data();
|
39794
39915
|
var _graph = require_graph();
|
39795
|
-
function _interopRequireDefault3(
|
39796
|
-
return
|
39916
|
+
function _interopRequireDefault3(e2) {
|
39917
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
39797
39918
|
}
|
39798
39919
|
function prepareParseGraph(graph) {
|
39799
39920
|
return graph.reduce((array, next) => {
|
@@ -39897,139 +40018,6 @@ var require_chain = __commonJS({
|
|
39897
40018
|
}
|
39898
40019
|
});
|
39899
40020
|
|
39900
|
-
// ../../node_modules/@citation-js/core/lib/plugins/input/data.js
|
39901
|
-
var require_data = __commonJS({
|
39902
|
-
"../../node_modules/@citation-js/core/lib/plugins/input/data.js"(exports2) {
|
39903
|
-
"use strict";
|
39904
|
-
Object.defineProperty(exports2, "__esModule", {
|
39905
|
-
value: true
|
39906
|
-
});
|
39907
|
-
exports2.addDataParser = addDataParser;
|
39908
|
-
exports2.data = data;
|
39909
|
-
exports2.dataAsync = dataAsync;
|
39910
|
-
exports2.hasDataParser = hasDataParser;
|
39911
|
-
exports2.listDataParser = listDataParser;
|
39912
|
-
exports2.removeDataParser = removeDataParser;
|
39913
|
-
var _chain = require_chain();
|
39914
|
-
var parsers = {};
|
39915
|
-
var asyncParsers = {};
|
39916
|
-
var nativeParsers = {
|
39917
|
-
"@csl/object": (input3) => [input3],
|
39918
|
-
"@csl/list+object": (input3) => input3,
|
39919
|
-
"@else/list+object": (input3) => input3.map(_chain.chain).flat(),
|
39920
|
-
"@invalid": () => {
|
39921
|
-
throw new Error("This format is not supported or recognized");
|
39922
|
-
}
|
39923
|
-
};
|
39924
|
-
var nativeAsyncParsers = {
|
39925
|
-
"@else/list+object": async (input3) => (await Promise.all(input3.map(_chain.chainAsync))).flat()
|
39926
|
-
};
|
39927
|
-
function data(input3, type2) {
|
39928
|
-
if (typeof parsers[type2] === "function") {
|
39929
|
-
return parsers[type2](input3);
|
39930
|
-
} else if (typeof nativeParsers[type2] === "function") {
|
39931
|
-
return nativeParsers[type2](input3);
|
39932
|
-
} else {
|
39933
|
-
throw new TypeError(`No synchronous parser found for ${type2}`);
|
39934
|
-
}
|
39935
|
-
}
|
39936
|
-
async function dataAsync(input3, type2) {
|
39937
|
-
if (typeof asyncParsers[type2] === "function") {
|
39938
|
-
return asyncParsers[type2](input3);
|
39939
|
-
} else if (typeof nativeAsyncParsers[type2] === "function") {
|
39940
|
-
return nativeAsyncParsers[type2](input3);
|
39941
|
-
} else if (hasDataParser(type2, false)) {
|
39942
|
-
return data(input3, type2);
|
39943
|
-
} else {
|
39944
|
-
throw new TypeError(`No parser found for ${type2}`);
|
39945
|
-
}
|
39946
|
-
}
|
39947
|
-
function addDataParser(format, {
|
39948
|
-
parser: parser3,
|
39949
|
-
async
|
39950
|
-
}) {
|
39951
|
-
if (async) {
|
39952
|
-
asyncParsers[format] = parser3;
|
39953
|
-
} else {
|
39954
|
-
parsers[format] = parser3;
|
39955
|
-
}
|
39956
|
-
}
|
39957
|
-
function hasDataParser(type2, async) {
|
39958
|
-
return async ? asyncParsers[type2] || nativeAsyncParsers[type2] : parsers[type2] || nativeParsers[type2];
|
39959
|
-
}
|
39960
|
-
function removeDataParser(type2, async) {
|
39961
|
-
delete (async ? asyncParsers : parsers)[type2];
|
39962
|
-
}
|
39963
|
-
function listDataParser(async) {
|
39964
|
-
return Object.keys(async ? asyncParsers : parsers);
|
39965
|
-
}
|
39966
|
-
}
|
39967
|
-
});
|
39968
|
-
|
39969
|
-
// ../../node_modules/@citation-js/core/lib/plugins/input/register.js
|
39970
|
-
var require_register2 = __commonJS({
|
39971
|
-
"../../node_modules/@citation-js/core/lib/plugins/input/register.js"(exports2) {
|
39972
|
-
"use strict";
|
39973
|
-
Object.defineProperty(exports2, "__esModule", {
|
39974
|
-
value: true
|
39975
|
-
});
|
39976
|
-
exports2.add = add2;
|
39977
|
-
exports2.get = get2;
|
39978
|
-
exports2.has = has3;
|
39979
|
-
exports2.list = list6;
|
39980
|
-
exports2.remove = remove3;
|
39981
|
-
var _parser = require_parser2();
|
39982
|
-
var _type3 = require_type();
|
39983
|
-
var _data = require_data();
|
39984
|
-
var formats = {};
|
39985
|
-
function add2(format, parsers) {
|
39986
|
-
const formatParser = new _parser.FormatParser(format, parsers);
|
39987
|
-
formatParser.validate();
|
39988
|
-
const index4 = formats[format] || (formats[format] = {});
|
39989
|
-
if (formatParser.typeParser) {
|
39990
|
-
(0, _type3.addTypeParser)(format, formatParser.typeParser);
|
39991
|
-
index4.type = true;
|
39992
|
-
}
|
39993
|
-
if (formatParser.dataParser) {
|
39994
|
-
(0, _data.addDataParser)(format, formatParser.dataParser);
|
39995
|
-
index4.data = true;
|
39996
|
-
}
|
39997
|
-
if (formatParser.asyncDataParser) {
|
39998
|
-
(0, _data.addDataParser)(format, formatParser.asyncDataParser);
|
39999
|
-
index4.asyncData = true;
|
40000
|
-
}
|
40001
|
-
if (parsers.outputs) {
|
40002
|
-
index4.outputs = parsers.outputs;
|
40003
|
-
}
|
40004
|
-
}
|
40005
|
-
function get2(format) {
|
40006
|
-
return formats[format];
|
40007
|
-
}
|
40008
|
-
function remove3(format) {
|
40009
|
-
const index4 = formats[format];
|
40010
|
-
if (!index4) {
|
40011
|
-
return;
|
40012
|
-
}
|
40013
|
-
if (index4.type) {
|
40014
|
-
(0, _type3.removeTypeParser)(format);
|
40015
|
-
}
|
40016
|
-
if (index4.data) {
|
40017
|
-
(0, _data.removeDataParser)(format);
|
40018
|
-
}
|
40019
|
-
if (index4.asyncData) {
|
40020
|
-
(0, _data.removeDataParser)(format, true);
|
40021
|
-
}
|
40022
|
-
delete formats[format];
|
40023
|
-
}
|
40024
|
-
function has3(format) {
|
40025
|
-
return format in formats;
|
40026
|
-
}
|
40027
|
-
function list6() {
|
40028
|
-
return Object.keys(formats);
|
40029
|
-
}
|
40030
|
-
}
|
40031
|
-
});
|
40032
|
-
|
40033
40021
|
// ../../node_modules/@citation-js/core/lib/plugins/input/index.js
|
40034
40022
|
var require_input2 = __commonJS({
|
40035
40023
|
"../../node_modules/@citation-js/core/lib/plugins/input/index.js"(exports2) {
|
@@ -40045,7 +40033,7 @@ var require_input2 = __commonJS({
|
|
40045
40033
|
var graph = _interopRequireWildcard(require_graph());
|
40046
40034
|
var parser3 = _interopRequireWildcard(require_parser2());
|
40047
40035
|
var csl = _interopRequireWildcard(require_csl());
|
40048
|
-
var _register =
|
40036
|
+
var _register = require_register();
|
40049
40037
|
Object.keys(_register).forEach(function(key2) {
|
40050
40038
|
if (key2 === "default" || key2 === "__esModule")
|
40051
40039
|
return;
|
@@ -40147,8 +40135,8 @@ var require_set = __commonJS({
|
|
40147
40135
|
exports2.setAsync = setAsync;
|
40148
40136
|
var _index4 = require_input2();
|
40149
40137
|
var _fetchId = _interopRequireDefault3(require_fetchId());
|
40150
|
-
function _interopRequireDefault3(
|
40151
|
-
return
|
40138
|
+
function _interopRequireDefault3(e2) {
|
40139
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40152
40140
|
}
|
40153
40141
|
function add2(data, options = {}, log = false) {
|
40154
40142
|
if (options === true || log === true) {
|
@@ -40302,9 +40290,9 @@ var require_output2 = __commonJS({
|
|
40302
40290
|
exports2.list = list6;
|
40303
40291
|
exports2.register = void 0;
|
40304
40292
|
exports2.remove = remove3;
|
40305
|
-
var _register = _interopRequireDefault3(
|
40306
|
-
function _interopRequireDefault3(
|
40307
|
-
return
|
40293
|
+
var _register = _interopRequireDefault3(require_register2());
|
40294
|
+
function _interopRequireDefault3(e2) {
|
40295
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40308
40296
|
}
|
40309
40297
|
function validate5(name3, formatter) {
|
40310
40298
|
if (typeof name3 !== "string") {
|
@@ -40468,8 +40456,8 @@ var require_static = __commonJS({
|
|
40468
40456
|
}
|
40469
40457
|
});
|
40470
40458
|
});
|
40471
|
-
function _interopRequireDefault3(
|
40472
|
-
return
|
40459
|
+
function _interopRequireDefault3(e2) {
|
40460
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40473
40461
|
}
|
40474
40462
|
}
|
40475
40463
|
});
|
@@ -40547,9 +40535,9 @@ var require_dict = __commonJS({
|
|
40547
40535
|
exports2.register = void 0;
|
40548
40536
|
exports2.remove = remove3;
|
40549
40537
|
exports2.textDict = void 0;
|
40550
|
-
var _register = _interopRequireDefault3(
|
40551
|
-
function _interopRequireDefault3(
|
40552
|
-
return
|
40538
|
+
var _register = _interopRequireDefault3(require_register2());
|
40539
|
+
function _interopRequireDefault3(e2) {
|
40540
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40553
40541
|
}
|
40554
40542
|
function validate5(name3, dict) {
|
40555
40543
|
if (typeof name3 !== "string") {
|
@@ -40765,8 +40753,8 @@ var require_json = __commonJS({
|
|
40765
40753
|
});
|
40766
40754
|
exports2.default = exports2.parse = parseJSON;
|
40767
40755
|
var _logger = _interopRequireDefault3(require_logger());
|
40768
|
-
function _interopRequireDefault3(
|
40769
|
-
return
|
40756
|
+
function _interopRequireDefault3(e2) {
|
40757
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40770
40758
|
}
|
40771
40759
|
var substituters = [[/((?:\[|:|,)\s*)'((?:\\'|[^'])*?[^\\])?'(?=\s*(?:\]|}|,))/g, '$1"$2"'], [/((?:(?:"|]|}|\/[gmiuys]|\.|(?:\d|\.|-)*\d)\s*,|{)\s*)(?:"([^":\n]+?)"|'([^":\n]+?)'|([^":\n]+?))(\s*):/g, '$1"$2$3$4"$5:']];
|
40772
40760
|
function parseJSON(str2) {
|
@@ -40926,8 +40914,8 @@ var require_json2 = __commonJS({
|
|
40926
40914
|
var plugins3 = _interopRequireWildcard(require_plugins());
|
40927
40915
|
var util4 = _interopRequireWildcard(require_util());
|
40928
40916
|
var _logger = _interopRequireDefault3(require_logger());
|
40929
|
-
function _interopRequireDefault3(
|
40930
|
-
return
|
40917
|
+
function _interopRequireDefault3(e2) {
|
40918
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
40931
40919
|
}
|
40932
40920
|
function _getRequireWildcardCache(e2) {
|
40933
40921
|
if ("function" != typeof WeakMap)
|
@@ -41030,8 +41018,8 @@ var require_output3 = __commonJS({
|
|
41030
41018
|
exports2.default = void 0;
|
41031
41019
|
var _json = _interopRequireDefault3(require_json2());
|
41032
41020
|
var _label = _interopRequireDefault3(require_label());
|
41033
|
-
function _interopRequireDefault3(
|
41034
|
-
return
|
41021
|
+
function _interopRequireDefault3(e2) {
|
41022
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
41035
41023
|
}
|
41036
41024
|
var _default2 = exports2.default = Object.assign({}, _json.default, _label.default);
|
41037
41025
|
}
|
@@ -41044,8 +41032,8 @@ var require_plugin_common = __commonJS({
|
|
41044
41032
|
var plugins3 = _interopRequireWildcard(require_plugins());
|
41045
41033
|
var _input = require_input3();
|
41046
41034
|
var _output = _interopRequireDefault3(require_output3());
|
41047
|
-
function _interopRequireDefault3(
|
41048
|
-
return
|
41035
|
+
function _interopRequireDefault3(e2) {
|
41036
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
41049
41037
|
}
|
41050
41038
|
function _getRequireWildcardCache(e2) {
|
41051
41039
|
if ("function" != typeof WeakMap)
|
@@ -41130,8 +41118,8 @@ var require_lib6 = __commonJS({
|
|
41130
41118
|
}
|
41131
41119
|
return n.default = e2, t2 && t2.set(e2, n), n;
|
41132
41120
|
}
|
41133
|
-
function _interopRequireDefault3(
|
41134
|
-
return
|
41121
|
+
function _interopRequireDefault3(e2) {
|
41122
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
41135
41123
|
}
|
41136
41124
|
var version4 = exports2.version = _package.default.version;
|
41137
41125
|
}
|
@@ -52838,8 +52826,8 @@ var require_constants = __commonJS({
|
|
52838
52826
|
var _required2 = _interopRequireDefault3(require_required());
|
52839
52827
|
var _fieldTypes2 = _interopRequireDefault3(require_fieldTypes());
|
52840
52828
|
var _unicode = _interopRequireDefault3(require_unicode2());
|
52841
|
-
function _interopRequireDefault3(
|
52842
|
-
return
|
52829
|
+
function _interopRequireDefault3(e2) {
|
52830
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
52843
52831
|
}
|
52844
52832
|
var required = exports2.required = _required2.default;
|
52845
52833
|
var fieldTypes = exports2.fieldTypes = _fieldTypes2.default;
|
@@ -53039,8 +53027,8 @@ var require_config3 = __commonJS({
|
|
53039
53027
|
}
|
53040
53028
|
return n.default = e2, t2 && t2.set(e2, n), n;
|
53041
53029
|
}
|
53042
|
-
function _interopRequireDefault3(
|
53043
|
-
return
|
53030
|
+
function _interopRequireDefault3(e2) {
|
53031
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
53044
53032
|
}
|
53045
53033
|
var _default2 = exports2.default = {
|
53046
53034
|
constants: constants2,
|
@@ -53079,8 +53067,8 @@ var require_file = __commonJS({
|
|
53079
53067
|
var _moo = _interopRequireDefault3(require_moo());
|
53080
53068
|
var _config2 = _interopRequireDefault3(require_config3());
|
53081
53069
|
var _constants = require_constants();
|
53082
|
-
function _interopRequireDefault3(
|
53083
|
-
return
|
53070
|
+
function _interopRequireDefault3(e2) {
|
53071
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
53084
53072
|
}
|
53085
53073
|
function ownKeys(e2, r2) {
|
53086
53074
|
var t2 = Object.keys(e2);
|
@@ -53103,14 +53091,8 @@ var require_file = __commonJS({
|
|
53103
53091
|
}
|
53104
53092
|
return e2;
|
53105
53093
|
}
|
53106
|
-
function _defineProperty(
|
53107
|
-
|
53108
|
-
if (key2 in obj) {
|
53109
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
53110
|
-
} else {
|
53111
|
-
obj[key2] = value;
|
53112
|
-
}
|
53113
|
-
return obj;
|
53094
|
+
function _defineProperty(e2, r2, t2) {
|
53095
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
53114
53096
|
}
|
53115
53097
|
function _toPropertyKey(t2) {
|
53116
53098
|
var i2 = _toPrimitive(t2, "string");
|
@@ -53434,8 +53416,8 @@ var require_shared3 = __commonJS({
|
|
53434
53416
|
exports2.parseMonth = parseMonth;
|
53435
53417
|
var _core3 = require_lib6();
|
53436
53418
|
var _config2 = _interopRequireDefault3(require_config3());
|
53437
|
-
function _interopRequireDefault3(
|
53438
|
-
return
|
53419
|
+
function _interopRequireDefault3(e2) {
|
53420
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
53439
53421
|
}
|
53440
53422
|
var stopWords = /* @__PURE__ */ new Set(["the", "a", "an"]);
|
53441
53423
|
var unsafeChars = /(?:<\/?.*?>|[\u0020-\u002F\u003A-\u0040\u005B-\u005E\u0060\u007B-\u007F])+/g;
|
@@ -54073,8 +54055,8 @@ var require_biblatex = __commonJS({
|
|
54073
54055
|
var _date = require_lib13();
|
54074
54056
|
var _biblatexTypes = _interopRequireDefault3(require_biblatexTypes());
|
54075
54057
|
var _shared = require_shared3();
|
54076
|
-
function _interopRequireDefault3(
|
54077
|
-
return
|
54058
|
+
function _interopRequireDefault3(e2) {
|
54059
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
54078
54060
|
}
|
54079
54061
|
var nonSpec = [{
|
54080
54062
|
source: "note",
|
@@ -54526,7 +54508,7 @@ var require_biblatex = __commonJS({
|
|
54526
54508
|
when: {
|
54527
54509
|
source: true,
|
54528
54510
|
target: {
|
54529
|
-
type: ["article", "article-journal", "article-magazine", "article-newspaper", "bill", "book", "broadcast", "chapter", "classic", "collection", "dataset", "document", "entry", "entry-dictionary", "entry-encyclopedia", "event", "figure", "graphic", "hearing", "interview", "legal_case", "legislation", "manuscript", "map", "motion_picture", "musical_score", "pamphlet", "
|
54511
|
+
type: ["article", "article-journal", "article-magazine", "article-newspaper", "bill", "book", "broadcast", "chapter", "classic", "collection", "dataset", "document", "entry", "entry-dictionary", "entry-encyclopedia", "event", "figure", "graphic", "hearing", "interview", "legal_case", "legislation", "manuscript", "map", "motion_picture", "musical_score", "pamphlet", "patent", "performance", "periodical", "personal_communication", "post", "post-weblog", "regulation", "review", "review-book", "software", "song", "speech", "standard", "treaty"]
|
54530
54512
|
}
|
54531
54513
|
}
|
54532
54514
|
}, {
|
@@ -54538,7 +54520,7 @@ var require_biblatex = __commonJS({
|
|
54538
54520
|
publisher: false
|
54539
54521
|
},
|
54540
54522
|
target: {
|
54541
|
-
type: "webpage"
|
54523
|
+
type: ["paper-conference", "webpage"]
|
54542
54524
|
}
|
54543
54525
|
}
|
54544
54526
|
}, {
|
@@ -54656,8 +54638,8 @@ var require_bibtex = __commonJS({
|
|
54656
54638
|
var _date = require_lib13();
|
54657
54639
|
var _bibtexTypes = _interopRequireDefault3(require_bibtexTypes());
|
54658
54640
|
var _shared = require_shared3();
|
54659
|
-
function _interopRequireDefault3(
|
54660
|
-
return
|
54641
|
+
function _interopRequireDefault3(e2) {
|
54642
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
54661
54643
|
}
|
54662
54644
|
var _default2 = exports2.default = new _core3.util.Translator([{
|
54663
54645
|
source: "note",
|
@@ -54943,14 +54925,8 @@ var require_crossref = __commonJS({
|
|
54943
54925
|
}
|
54944
54926
|
return e2;
|
54945
54927
|
}
|
54946
|
-
function _defineProperty(
|
54947
|
-
|
54948
|
-
if (key2 in obj) {
|
54949
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
54950
|
-
} else {
|
54951
|
-
obj[key2] = value;
|
54952
|
-
}
|
54953
|
-
return obj;
|
54928
|
+
function _defineProperty(e2, r2, t2) {
|
54929
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
54954
54930
|
}
|
54955
54931
|
function _toPropertyKey(t2) {
|
54956
54932
|
var i2 = _toPrimitive(t2, "string");
|
@@ -55051,40 +55027,31 @@ var require_mapping = __commonJS({
|
|
55051
55027
|
var _biblatex = _interopRequireDefault3(require_biblatex());
|
55052
55028
|
var _bibtex = _interopRequireDefault3(require_bibtex());
|
55053
55029
|
var _crossref = require_crossref();
|
55054
|
-
function _interopRequireDefault3(
|
55055
|
-
return
|
55030
|
+
function _interopRequireDefault3(e2) {
|
55031
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
55056
55032
|
}
|
55057
|
-
function _objectWithoutProperties(
|
55058
|
-
if (
|
55033
|
+
function _objectWithoutProperties(e2, t2) {
|
55034
|
+
if (null == e2)
|
55059
55035
|
return {};
|
55060
|
-
var
|
55061
|
-
var key2, i2;
|
55036
|
+
var o, r2, i2 = _objectWithoutPropertiesLoose(e2, t2);
|
55062
55037
|
if (Object.getOwnPropertySymbols) {
|
55063
|
-
var
|
55064
|
-
for (
|
55065
|
-
|
55066
|
-
if (excluded.indexOf(key2) >= 0)
|
55067
|
-
continue;
|
55068
|
-
if (!Object.prototype.propertyIsEnumerable.call(source2, key2))
|
55069
|
-
continue;
|
55070
|
-
target[key2] = source2[key2];
|
55071
|
-
}
|
55038
|
+
var s5 = Object.getOwnPropertySymbols(e2);
|
55039
|
+
for (r2 = 0; r2 < s5.length; r2++)
|
55040
|
+
o = s5[r2], t2.includes(o) || {}.propertyIsEnumerable.call(e2, o) && (i2[o] = e2[o]);
|
55072
55041
|
}
|
55073
|
-
return
|
55042
|
+
return i2;
|
55074
55043
|
}
|
55075
|
-
function _objectWithoutPropertiesLoose(
|
55076
|
-
if (
|
55044
|
+
function _objectWithoutPropertiesLoose(r2, e2) {
|
55045
|
+
if (null == r2)
|
55077
55046
|
return {};
|
55078
|
-
var
|
55079
|
-
var
|
55080
|
-
|
55081
|
-
|
55082
|
-
|
55083
|
-
|
55084
|
-
|
55085
|
-
|
55086
|
-
}
|
55087
|
-
return target;
|
55047
|
+
var t2 = {};
|
55048
|
+
for (var n in r2)
|
55049
|
+
if ({}.hasOwnProperty.call(r2, n)) {
|
55050
|
+
if (e2.includes(n))
|
55051
|
+
continue;
|
55052
|
+
t2[n] = r2[n];
|
55053
|
+
}
|
55054
|
+
return t2;
|
55088
55055
|
}
|
55089
55056
|
function ownKeys(e2, r2) {
|
55090
55057
|
var t2 = Object.keys(e2);
|
@@ -55107,14 +55074,8 @@ var require_mapping = __commonJS({
|
|
55107
55074
|
}
|
55108
55075
|
return e2;
|
55109
55076
|
}
|
55110
|
-
function _defineProperty(
|
55111
|
-
|
55112
|
-
if (key2 in obj) {
|
55113
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
55114
|
-
} else {
|
55115
|
-
obj[key2] = value;
|
55116
|
-
}
|
55117
|
-
return obj;
|
55077
|
+
function _defineProperty(e2, r2, t2) {
|
55078
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
55118
55079
|
}
|
55119
55080
|
function _toPropertyKey(t2) {
|
55120
55081
|
var i2 = _toPrimitive(t2, "string");
|
@@ -55316,8 +55277,8 @@ var require_value = __commonJS({
|
|
55316
55277
|
}
|
55317
55278
|
return n.default = e2, t2 && t2.set(e2, n), n;
|
55318
55279
|
}
|
55319
|
-
function _interopRequireDefault3(
|
55320
|
-
return
|
55280
|
+
function _interopRequireDefault3(e2) {
|
55281
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
55321
55282
|
}
|
55322
55283
|
function ownKeys(e2, r2) {
|
55323
55284
|
var t2 = Object.keys(e2);
|
@@ -55340,14 +55301,8 @@ var require_value = __commonJS({
|
|
55340
55301
|
}
|
55341
55302
|
return e2;
|
55342
55303
|
}
|
55343
|
-
function _defineProperty(
|
55344
|
-
|
55345
|
-
if (key2 in obj) {
|
55346
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
55347
|
-
} else {
|
55348
|
-
obj[key2] = value;
|
55349
|
-
}
|
55350
|
-
return obj;
|
55304
|
+
function _defineProperty(e2, r2, t2) {
|
55305
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
55351
55306
|
}
|
55352
55307
|
function _toPropertyKey(t2) {
|
55353
55308
|
var i2 = _toPrimitive(t2, "string");
|
@@ -55899,8 +55854,8 @@ var require_entries = __commonJS({
|
|
55899
55854
|
var _index4 = require_mapping();
|
55900
55855
|
var _value = require_value();
|
55901
55856
|
var _constants = require_constants();
|
55902
|
-
function _interopRequireDefault3(
|
55903
|
-
return
|
55857
|
+
function _interopRequireDefault3(e2) {
|
55858
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
55904
55859
|
}
|
55905
55860
|
function ownKeys(e2, r2) {
|
55906
55861
|
var t2 = Object.keys(e2);
|
@@ -55923,14 +55878,8 @@ var require_entries = __commonJS({
|
|
55923
55878
|
}
|
55924
55879
|
return e2;
|
55925
55880
|
}
|
55926
|
-
function _defineProperty(
|
55927
|
-
|
55928
|
-
if (key2 in obj) {
|
55929
|
-
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
55930
|
-
} else {
|
55931
|
-
obj[key2] = value;
|
55932
|
-
}
|
55933
|
-
return obj;
|
55881
|
+
function _defineProperty(e2, r2, t2) {
|
55882
|
+
return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2;
|
55934
55883
|
}
|
55935
55884
|
function _toPropertyKey(t2) {
|
55936
55885
|
var i2 = _toPrimitive(t2, "string");
|
@@ -56082,8 +56031,8 @@ var require_value2 = __commonJS({
|
|
56082
56031
|
exports2.formatAnnotation = formatAnnotation;
|
56083
56032
|
var _config2 = _interopRequireDefault3(require_config3());
|
56084
56033
|
var _constants = require_constants();
|
56085
|
-
function _interopRequireDefault3(
|
56086
|
-
return
|
56034
|
+
function _interopRequireDefault3(e2) {
|
56035
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
56087
56036
|
}
|
56088
56037
|
var unicode = {};
|
56089
56038
|
for (const command in _constants.commands) {
|
@@ -56099,7 +56048,7 @@ var require_value2 = __commonJS({
|
|
56099
56048
|
for (const command in _constants.mathCommands) {
|
56100
56049
|
mathUnicode[_constants.mathCommands[command]] = command;
|
56101
56050
|
}
|
56102
|
-
var UNSAFE_UNICODE = /[^a-zA-Z0-9\s!"
|
56051
|
+
var UNSAFE_UNICODE = /[^a-zA-Z0-9\s!"'()*+,\-./:;=?@[\]\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g;
|
56103
56052
|
var DIACRITIC_PATTERN = /.[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]+/g;
|
56104
56053
|
var LONE_DIACRITIC_PATTERN = /[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g;
|
56105
56054
|
var listDelimiters = {
|
@@ -56120,6 +56069,8 @@ var require_value2 = __commonJS({
|
|
56120
56069
|
return unicode[char] in _constants.ligatures ? unicode[char] : `\\${unicode[char]}{}`;
|
56121
56070
|
} else if (char in mathUnicode) {
|
56122
56071
|
return `$\\${mathUnicode[char]}$`;
|
56072
|
+
} else if (/^[&%$#_{}]$/.test(char)) {
|
56073
|
+
return `\\${char}`;
|
56123
56074
|
} else {
|
56124
56075
|
return "";
|
56125
56076
|
}
|
@@ -56299,8 +56250,8 @@ var require_bibtex2 = __commonJS({
|
|
56299
56250
|
});
|
56300
56251
|
exports2.format = format;
|
56301
56252
|
var _config2 = _interopRequireDefault3(require_config3());
|
56302
|
-
function _interopRequireDefault3(
|
56303
|
-
return
|
56253
|
+
function _interopRequireDefault3(e2) {
|
56254
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
56304
56255
|
}
|
56305
56256
|
function formatField(field, value, dict) {
|
56306
56257
|
return dict.listItem.join(`${field} = {${value}},`);
|
@@ -56448,8 +56399,8 @@ var require_locales2 = __commonJS({
|
|
56448
56399
|
exports2.locales = exports2.default = void 0;
|
56449
56400
|
var _core3 = require_lib6();
|
56450
56401
|
var _locales2 = _interopRequireDefault3(require_locales());
|
56451
|
-
function _interopRequireDefault3(
|
56452
|
-
return
|
56402
|
+
function _interopRequireDefault3(e2) {
|
56403
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
56453
56404
|
}
|
56454
56405
|
var locales = exports2.locales = new _core3.util.Register(_locales2.default);
|
56455
56406
|
var fetchLocale = (lang) => {
|
@@ -56490,8 +56441,8 @@ var require_styles2 = __commonJS({
|
|
56490
56441
|
exports2.templates = exports2.default = void 0;
|
56491
56442
|
var _core3 = require_lib6();
|
56492
56443
|
var _styles2 = _interopRequireDefault3(require_styles());
|
56493
|
-
function _interopRequireDefault3(
|
56494
|
-
return
|
56444
|
+
function _interopRequireDefault3(e2) {
|
56445
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
56495
56446
|
}
|
56496
56447
|
var templates = exports2.templates = new _core3.util.Register(_styles2.default);
|
56497
56448
|
var fetchStyle = (style3) => {
|
@@ -75484,8 +75435,8 @@ var require_engines = __commonJS({
|
|
75484
75435
|
var _citeproc = _interopRequireDefault3(require_citeproc_commonjs());
|
75485
75436
|
var _styles2 = require_styles2();
|
75486
75437
|
var _locales2 = require_locales2();
|
75487
|
-
function _interopRequireDefault3(
|
75488
|
-
return
|
75438
|
+
function _interopRequireDefault3(e2) {
|
75439
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
75489
75440
|
}
|
75490
75441
|
var proxied = Symbol.for("proxied");
|
75491
75442
|
var getWrapperProxy = function(original) {
|
@@ -75586,8 +75537,8 @@ var require_bibliography = __commonJS({
|
|
75586
75537
|
var _core3 = require_lib6();
|
75587
75538
|
var _engines2 = _interopRequireDefault3(require_engines());
|
75588
75539
|
var _attr = require_attr();
|
75589
|
-
function _interopRequireDefault3(
|
75590
|
-
return
|
75540
|
+
function _interopRequireDefault3(e2) {
|
75541
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
75591
75542
|
}
|
75592
75543
|
var getAffix = (source2, affix) => typeof affix === "function" ? affix(source2) : affix || "";
|
75593
75544
|
function bibliography2(data, options = {}) {
|
@@ -75640,8 +75591,8 @@ var require_citation = __commonJS({
|
|
75640
75591
|
exports2.default = citation;
|
75641
75592
|
var _core3 = require_lib6();
|
75642
75593
|
var _engines2 = _interopRequireDefault3(require_engines());
|
75643
|
-
function _interopRequireDefault3(
|
75644
|
-
return
|
75594
|
+
function _interopRequireDefault3(e2) {
|
75595
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
75645
75596
|
}
|
75646
75597
|
function prepareCiteItem(citeItem) {
|
75647
75598
|
return typeof citeItem === "object" ? citeItem : {
|
@@ -99543,7 +99494,7 @@ var require_parse4 = __commonJS({
|
|
99543
99494
|
POSIX_REGEX_SOURCE,
|
99544
99495
|
REGEX_NON_SPECIAL_CHARS,
|
99545
99496
|
REGEX_SPECIAL_CHARS_BACKREF,
|
99546
|
-
REPLACEMENTS
|
99497
|
+
REPLACEMENTS
|
99547
99498
|
} = constants2;
|
99548
99499
|
var expandRange = (args, options) => {
|
99549
99500
|
if (typeof options.expandRange === "function") {
|
@@ -99565,7 +99516,7 @@ var require_parse4 = __commonJS({
|
|
99565
99516
|
if (typeof input3 !== "string") {
|
99566
99517
|
throw new TypeError("Expected a string");
|
99567
99518
|
}
|
99568
|
-
input3 =
|
99519
|
+
input3 = REPLACEMENTS[input3] || input3;
|
99569
99520
|
const opts = { ...options };
|
99570
99521
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
99571
99522
|
let len = input3.length;
|
@@ -100247,7 +100198,7 @@ var require_parse4 = __commonJS({
|
|
100247
100198
|
if (len > max) {
|
100248
100199
|
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
100249
100200
|
}
|
100250
|
-
input3 =
|
100201
|
+
input3 = REPLACEMENTS[input3] || input3;
|
100251
100202
|
const win322 = utils2.isWindows(options);
|
100252
100203
|
const {
|
100253
100204
|
DOT_LITERAL,
|
@@ -193440,7 +193391,7 @@ var {
|
|
193440
193391
|
} = import_index.default;
|
193441
193392
|
|
193442
193393
|
// src/version.ts
|
193443
|
-
var version = "1.
|
193394
|
+
var version = "1.5.0";
|
193444
193395
|
var version_default = version;
|
193445
193396
|
|
193446
193397
|
// ../myst-cli/dist/build/build.js
|
@@ -194047,7 +193998,7 @@ function validateUrl(input3, opts) {
|
|
194047
193998
|
}
|
194048
193999
|
return value;
|
194049
194000
|
}
|
194050
|
-
function
|
194001
|
+
function validateDomain(input3, opts) {
|
194051
194002
|
let value = validateString(input3, { ...opts, maxLength: 2048 });
|
194052
194003
|
if (value === void 0)
|
194053
194004
|
return value;
|
@@ -194058,7 +194009,7 @@ function validateSubdomain(input3, opts) {
|
|
194058
194009
|
try {
|
194059
194010
|
url = new URL(value);
|
194060
194011
|
} catch {
|
194061
|
-
return validationError(`must be valid
|
194012
|
+
return validationError(`domain must be valid when used as a URL: ${input3}`, opts);
|
194062
194013
|
}
|
194063
194014
|
const { hash, host, pathname, protocol, search: search4 } = url;
|
194064
194015
|
if (protocol !== "http:" && protocol !== "https:") {
|
@@ -194067,11 +194018,16 @@ function validateSubdomain(input3, opts) {
|
|
194067
194018
|
if (pathname && pathname !== "/" || hash || search4) {
|
194068
194019
|
return validationError(`must not specify path, query, or fragment: ${input3}`, opts);
|
194069
194020
|
}
|
194070
|
-
|
194071
|
-
|
194072
|
-
|
194021
|
+
const numParts = host.split(".").length;
|
194022
|
+
if (opts.minParts !== void 0 && opts.minParts > numParts)
|
194023
|
+
return validationError(`must have at least ${opts.minParts} parts: ${input3}`, opts);
|
194024
|
+
if (opts.maxParts !== void 0 && opts.maxParts < numParts)
|
194025
|
+
return validationError(`must have at most ${opts.minParts} parts: ${input3}`, opts);
|
194073
194026
|
return host.toLowerCase();
|
194074
194027
|
}
|
194028
|
+
function validateSubdomain(input3, opts) {
|
194029
|
+
return validateDomain(input3, { ...opts, minParts: 3 });
|
194030
|
+
}
|
194075
194031
|
function validateEmail(input3, opts) {
|
194076
194032
|
const value = validateString(input3, opts);
|
194077
194033
|
if (value === void 0)
|
@@ -194455,7 +194411,7 @@ function validateStringOrNumber(input3, opts) {
|
|
194455
194411
|
return validationError("must be string or number", opts);
|
194456
194412
|
}
|
194457
194413
|
|
194458
|
-
// ../myst-frontmatter/dist/
|
194414
|
+
// ../myst-frontmatter/dist/socials/types.js
|
194459
194415
|
var SOCIAL_LINKS_KEYS = [
|
194460
194416
|
"url",
|
194461
194417
|
"github",
|
@@ -194463,8 +194419,14 @@ var SOCIAL_LINKS_KEYS = [
|
|
194463
194419
|
"mastodon",
|
194464
194420
|
"linkedin",
|
194465
194421
|
"threads",
|
194466
|
-
"twitter"
|
194422
|
+
"twitter",
|
194467
194423
|
// Change to 'x' in future
|
194424
|
+
"youtube",
|
194425
|
+
"discourse",
|
194426
|
+
"discord",
|
194427
|
+
"slack",
|
194428
|
+
"facebook",
|
194429
|
+
"telegram"
|
194468
194430
|
];
|
194469
194431
|
var SOCIAL_LINKS_ALIASES = {
|
194470
194432
|
website: "url",
|
@@ -194474,30 +194436,171 @@ var SOCIAL_LINKS_ALIASES = {
|
|
194474
194436
|
instagram: "threads"
|
194475
194437
|
// This is the same username
|
194476
194438
|
};
|
194477
|
-
|
194439
|
+
|
194440
|
+
// ../myst-frontmatter/dist/socials/validators.js
|
194441
|
+
var MASTODON_REGEX = /^@?([a-zA-Z0-9_]+)@([^@]+\.[^@]*[^.])$/;
|
194442
|
+
var BLUESKY_REGEX = /^@?([^/:]+\..*[^.])$/;
|
194443
|
+
var BLUESKY_URL_REGEX = /^https:\/\/bsky\.app\/profile\/@?(.+\..*[^.])$/;
|
194444
|
+
var YOUTUBE_REGEX = /^@?([a-zA-Z0-9.]+)$/;
|
194445
|
+
var THREADS_REGEX = /^[a-zA-Z0-9_.]+$/;
|
194446
|
+
var TWITTER_REGEX = /^@?([a-zA-Z0-9_]{4,15})$/;
|
194447
|
+
var TWITTER_URL_REGEX = /^https:\/\/(?:twitter\.com|x\.com)\/@?([a-zA-Z0-9_]{4,15})$/;
|
194448
|
+
var GITHUB_USERNAME_REGEX = /^@?([a-zA-Z0-9_.-]+)$/;
|
194449
|
+
var GITHUB_ORG_URL_REGEX = /^https:\/\/github\.com\/orgs\/[a-zA-Z0-9_.-]+$/;
|
194450
|
+
var TELEGRAM_REGEX = /^@?([a-zA-Z0-9_]{5,})$/;
|
194451
|
+
var TELEGRAM_URL_REGEX = /^https:\/\/(?:t\.me|telegram\.me)\/?([a-zA-Z0-9_]{5,})$/;
|
194452
|
+
function validateMastodon(input3, opts) {
|
194453
|
+
const value = validateString(input3, opts);
|
194454
|
+
if (value === void 0)
|
194455
|
+
return void 0;
|
194456
|
+
const match3 = value.match(MASTODON_REGEX);
|
194457
|
+
if (match3 === null)
|
194458
|
+
return validationError(`must be a user ID of the form @username@server e.g. @mystmarkdown@fosstodon.org`, opts);
|
194459
|
+
const username = match3[1];
|
194460
|
+
const host = validateDomain(match3[2], opts);
|
194461
|
+
if (host === void 0)
|
194462
|
+
return void 0;
|
194463
|
+
return `@${username}@${host}`;
|
194464
|
+
}
|
194465
|
+
function validateBluesky(input3, opts) {
|
194466
|
+
const value = validateString(input3, opts);
|
194467
|
+
if (value === void 0)
|
194468
|
+
return void 0;
|
194469
|
+
let match3;
|
194470
|
+
if (match3 = value.match(BLUESKY_REGEX)) {
|
194471
|
+
const domain = validateDomain(match3[1], opts);
|
194472
|
+
if (domain === void 0)
|
194473
|
+
return void 0;
|
194474
|
+
return `@${domain}`;
|
194475
|
+
} else {
|
194476
|
+
const result = validateUrl(value, opts);
|
194477
|
+
if (result === void 0)
|
194478
|
+
return void 0;
|
194479
|
+
match3 = result.match(BLUESKY_URL_REGEX);
|
194480
|
+
if (match3 === null) {
|
194481
|
+
return validationError(`Bluesky profile URL must be a valid URL starting with https://bsky.app/profile/: ${value}`, opts);
|
194482
|
+
}
|
194483
|
+
const domain = validateDomain(match3[1], opts);
|
194484
|
+
if (domain === void 0)
|
194485
|
+
return void 0;
|
194486
|
+
return `@${domain}`;
|
194487
|
+
}
|
194488
|
+
}
|
194489
|
+
function validateTwitter(input3, opts) {
|
194490
|
+
const value = validateString(input3, opts);
|
194491
|
+
if (value === void 0)
|
194492
|
+
return void 0;
|
194493
|
+
let match3;
|
194494
|
+
if (match3 = value.match(TWITTER_URL_REGEX)) {
|
194495
|
+
return match3[1];
|
194496
|
+
} else if (match3 = value.match(TWITTER_REGEX)) {
|
194497
|
+
return match3[1];
|
194498
|
+
} else {
|
194499
|
+
return validationError(`Twitter social identity must be a valid URL starting with https://twitter.com/, https://x.com/, or a valid username: ${value}`, opts);
|
194500
|
+
}
|
194501
|
+
}
|
194502
|
+
function validateTelegram(input3, opts) {
|
194503
|
+
const value = validateString(input3, opts);
|
194504
|
+
if (value === void 0)
|
194505
|
+
return void 0;
|
194506
|
+
let match3;
|
194507
|
+
if (match3 = value.match(TELEGRAM_URL_REGEX)) {
|
194508
|
+
return match3[1];
|
194509
|
+
} else if (match3 = value.match(TELEGRAM_REGEX)) {
|
194510
|
+
return match3[1];
|
194511
|
+
} else {
|
194512
|
+
return validationError(`Telegram social identity must be a valid URL starting with either https://t.me/ or https://telegram.me/, or a valid username: ${value}`, opts);
|
194513
|
+
}
|
194514
|
+
}
|
194515
|
+
function validateYouTube(input3, opts) {
|
194516
|
+
const value = validateString(input3, opts);
|
194517
|
+
if (value === void 0)
|
194518
|
+
return void 0;
|
194519
|
+
if (/^https?:\/\//.test(value)) {
|
194520
|
+
return validateUrl(input3, { ...opts, includes: "youtube.com" });
|
194521
|
+
}
|
194522
|
+
let match3;
|
194523
|
+
if (match3 = value.match(YOUTUBE_REGEX)) {
|
194524
|
+
return match3[1];
|
194525
|
+
} else {
|
194526
|
+
return validationError(`YouTube social identity must be a valid URL starting with https://youtube.com/ or a valid handle: ${value}`, opts);
|
194527
|
+
}
|
194528
|
+
}
|
194529
|
+
function validateGitHub(input3, opts) {
|
194530
|
+
const value = validateString(input3, opts);
|
194531
|
+
if (value === void 0)
|
194532
|
+
return void 0;
|
194533
|
+
let match3;
|
194534
|
+
if (match3 = value.match(GITHUB_USERNAME_REGEX)) {
|
194535
|
+
return match3[1];
|
194536
|
+
} else if (match3 = value.match(GITHUB_USERNAME_REPO_REGEX)) {
|
194537
|
+
return match3[0];
|
194538
|
+
} else if (match3 = value.match(GITHUB_ORG_URL_REGEX)) {
|
194539
|
+
return match3[0];
|
194540
|
+
} else {
|
194541
|
+
return validationError(`GitHub social identity must be a valid username, org/repo, or org URL: ${value}`, opts);
|
194542
|
+
}
|
194543
|
+
}
|
194544
|
+
function validateSocialLinks(input3, opts, output2) {
|
194478
194545
|
const value = output2 ? input3 : validateObjectKeys(input3, { optional: SOCIAL_LINKS_KEYS, alias: SOCIAL_LINKS_ALIASES }, opts);
|
194546
|
+
if (value === void 0)
|
194547
|
+
return void 0;
|
194548
|
+
const result = output2 !== null && output2 !== void 0 ? output2 : {};
|
194479
194549
|
if (defined(value.url)) {
|
194480
|
-
|
194550
|
+
result.url = validateUrl(value.url, incrementOptions("url", opts));
|
194481
194551
|
}
|
194482
194552
|
if (defined(value.github)) {
|
194483
|
-
|
194553
|
+
result.github = validateGitHub(value.github, incrementOptions("github", opts));
|
194484
194554
|
}
|
194485
194555
|
if (defined(value.bluesky)) {
|
194486
|
-
|
194556
|
+
result.bluesky = validateBluesky(value.bluesky, incrementOptions("bluesky", opts));
|
194487
194557
|
}
|
194488
194558
|
if (defined(value.mastodon)) {
|
194489
|
-
|
194559
|
+
result.mastodon = validateMastodon(value.mastodon, incrementOptions("mastodon", opts));
|
194490
194560
|
}
|
194491
194561
|
if (defined(value.linkedin)) {
|
194492
|
-
|
194562
|
+
result.linkedin = validateUrl(value.linkedin, {
|
194563
|
+
...incrementOptions("linkedin", opts),
|
194564
|
+
includes: "linkedin.com"
|
194565
|
+
});
|
194493
194566
|
}
|
194494
194567
|
if (defined(value.threads)) {
|
194495
|
-
|
194568
|
+
result.threads = validateString(value.threads, {
|
194569
|
+
...incrementOptions("threads", opts),
|
194570
|
+
regex: THREADS_REGEX
|
194571
|
+
});
|
194496
194572
|
}
|
194497
194573
|
if (defined(value.twitter)) {
|
194498
|
-
|
194574
|
+
result.twitter = validateTwitter(value.twitter, incrementOptions("twitter", opts));
|
194499
194575
|
}
|
194500
|
-
|
194576
|
+
if (defined(value.telegram)) {
|
194577
|
+
result.telegram = validateTelegram(value.telegram, incrementOptions("telegram", opts));
|
194578
|
+
}
|
194579
|
+
if (defined(value.youtube)) {
|
194580
|
+
result.youtube = validateYouTube(value.youtube, incrementOptions("youtube", opts));
|
194581
|
+
}
|
194582
|
+
if (defined(value.discourse)) {
|
194583
|
+
result.discourse = validateUrl(value.discourse, incrementOptions("discourse", opts));
|
194584
|
+
}
|
194585
|
+
if (defined(value.discord)) {
|
194586
|
+
result.discord = validateUrl(value.discord, {
|
194587
|
+
...incrementOptions("discord", opts),
|
194588
|
+
includes: "discord"
|
194589
|
+
});
|
194590
|
+
}
|
194591
|
+
if (defined(value.slack)) {
|
194592
|
+
result.slack = validateUrl(value.slack, {
|
194593
|
+
...incrementOptions("slack", opts),
|
194594
|
+
includes: "slack.com"
|
194595
|
+
});
|
194596
|
+
}
|
194597
|
+
if (defined(value.facebook)) {
|
194598
|
+
result.facebook = validateUrl(value.facebook, {
|
194599
|
+
...incrementOptions("facebook", opts),
|
194600
|
+
includes: "facebook.com"
|
194601
|
+
});
|
194602
|
+
}
|
194603
|
+
return result;
|
194501
194604
|
}
|
194502
194605
|
|
194503
194606
|
// ../myst-frontmatter/dist/affiliations/validators.js
|
@@ -195102,6 +195205,7 @@ var SITE_FRONTMATTER_KEYS = [
|
|
195102
195205
|
"copyright",
|
195103
195206
|
"options",
|
195104
195207
|
"parts",
|
195208
|
+
"social",
|
195105
195209
|
...PAGE_KNOWN_PARTS
|
195106
195210
|
];
|
195107
195211
|
var FRONTMATTER_ALIASES = {
|
@@ -195131,7 +195235,8 @@ var FRONTMATTER_ALIASES = {
|
|
195131
195235
|
key_points: "keypoints",
|
195132
195236
|
"key-points": "keypoints",
|
195133
195237
|
image: "thumbnail",
|
195134
|
-
identifier: "identifiers"
|
195238
|
+
identifier: "identifiers",
|
195239
|
+
socials: "social"
|
195135
195240
|
};
|
195136
195241
|
|
195137
195242
|
// ../myst-frontmatter/dist/project/types.js
|
@@ -195237,7 +195342,7 @@ function validateFileEntry(entry, opts) {
|
|
195237
195342
|
function validateURLEntry(entry, opts) {
|
195238
195343
|
const intermediate = validateObjectKeys(entry, {
|
195239
195344
|
required: ["url"],
|
195240
|
-
optional: [...COMMON_ENTRY_KEYS, "children"]
|
195345
|
+
optional: [...COMMON_ENTRY_KEYS, "children", "open_in_same_tab"]
|
195241
195346
|
}, opts);
|
195242
195347
|
if (!intermediate) {
|
195243
195348
|
return void 0;
|
@@ -195248,6 +195353,9 @@ function validateURLEntry(entry, opts) {
|
|
195248
195353
|
}
|
195249
195354
|
const commonEntry = validateCommonEntry(intermediate, opts);
|
195250
195355
|
let output2 = { url, ...commonEntry };
|
195356
|
+
if (defined(entry.open_in_same_tab)) {
|
195357
|
+
output2.open_in_same_tab = validateBoolean(entry.open_in_same_tab, incrementOptions("open_in_same_tab", opts));
|
195358
|
+
}
|
195251
195359
|
if (defined(entry.children)) {
|
195252
195360
|
const children = validateList(intermediate.children, incrementOptions("children", opts), (item, ind) => validateEntry(item, incrementOptions(`children.${ind}`, opts)));
|
195253
195361
|
output2 = { children, ...output2 };
|
@@ -199222,6 +199330,9 @@ function validateProjectFrontmatterKeys(value, opts) {
|
|
199222
199330
|
if (defined(value.toc)) {
|
199223
199331
|
output2.toc = validateTOC(value.toc, incrementOptions("toc", opts));
|
199224
199332
|
}
|
199333
|
+
if (defined(value.social)) {
|
199334
|
+
output2.social = validateSocialLinks(value.social, incrementOptions("social", opts));
|
199335
|
+
}
|
199225
199336
|
if (defined(value.requirements)) {
|
199226
199337
|
output2.requirements = validateList(value.requirements, incrementOptions("requirements", opts), (req, index4) => {
|
199227
199338
|
return validateString(req, incrementOptions(`requirements.${index4}`, opts));
|
@@ -221922,6 +222033,10 @@ var defaultHtmlToMdastOptions = {
|
|
221922
222033
|
attrs.title = node3.properties.title;
|
221923
222034
|
if (node3.properties.alt)
|
221924
222035
|
attrs.alt = node3.properties.alt;
|
222036
|
+
if (node3.properties.width)
|
222037
|
+
attrs.width = node3.properties.width;
|
222038
|
+
if (node3.properties.height)
|
222039
|
+
attrs.height = node3.properties.height;
|
221925
222040
|
return h4(node3, "image", attrs);
|
221926
222041
|
},
|
221927
222042
|
video(h4, node3) {
|
@@ -236808,8 +236923,12 @@ var mathPlugin = (opts) => (tree, file) => {
|
|
236808
236923
|
};
|
236809
236924
|
|
236810
236925
|
// ../myst-transforms/dist/mathSimplifications.js
|
236811
|
-
var
|
236926
|
+
var TEXT_REPLACEMENTS = {
|
236812
236927
|
"\\pm": "\xB1",
|
236928
|
+
"\\circ": "\u2218",
|
236929
|
+
"\\degree": "\xB0"
|
236930
|
+
};
|
236931
|
+
var SYM_REPLACEMENTS = {
|
236813
236932
|
"\\star": "\u22C6",
|
236814
236933
|
"\\times": "\xD7",
|
236815
236934
|
"\\alpha": "\u03B1",
|
@@ -236858,33 +236977,38 @@ var REPLACEMENTS = {
|
|
236858
236977
|
"\\neq": "\u2260",
|
236859
236978
|
"\\cdot": "\u2022",
|
236860
236979
|
"\\geq": "\u2265",
|
236861
|
-
"\\leq": "\u2264"
|
236862
|
-
"\\circ": "\u2218"
|
236980
|
+
"\\leq": "\u2264"
|
236863
236981
|
};
|
236864
|
-
function getReplacement(symbol) {
|
236982
|
+
function getReplacement(symbol, options) {
|
236865
236983
|
if (!symbol)
|
236866
236984
|
return void 0;
|
236867
|
-
if (symbol.match(/^([a-zA-
|
236985
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceText) !== false && symbol.match(/^([a-zA-Z]+)$/))
|
236868
236986
|
return symbol;
|
236869
|
-
|
236987
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceNumber) !== false && symbol.match(/^([0-9+-]+)$/))
|
236988
|
+
return symbol;
|
236989
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceText) !== false && TEXT_REPLACEMENTS[symbol])
|
236990
|
+
return TEXT_REPLACEMENTS[symbol];
|
236991
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceSymbol) !== false && SYM_REPLACEMENTS[symbol])
|
236992
|
+
return SYM_REPLACEMENTS[symbol];
|
236993
|
+
return void 0;
|
236870
236994
|
}
|
236871
|
-
function replaceSymbol(node3) {
|
236995
|
+
function replaceSymbol(node3, options) {
|
236872
236996
|
const match3 = node3.value.match(/^(\\[a-zA-Z]+)$/);
|
236873
236997
|
if (!match3)
|
236874
236998
|
return false;
|
236875
|
-
const text7 = getReplacement(match3[1]);
|
236999
|
+
const text7 = getReplacement(match3[1], options);
|
236876
237000
|
if (!text7)
|
236877
237001
|
return false;
|
236878
237002
|
node3.type = "text";
|
236879
237003
|
node3.value = text7;
|
236880
237004
|
return true;
|
236881
237005
|
}
|
236882
|
-
function replaceDirectSubSuperScripts(node3) {
|
237006
|
+
function replaceDirectSubSuperScripts(node3, options) {
|
236883
237007
|
const match3 = node3.value.match(/^(\^|_)(?:(?:\{(\\?[a-zA-Z0-9+-]+)\})|(\\?[a-zA-Z0-9+-]+))$/);
|
236884
237008
|
if (!match3)
|
236885
237009
|
return false;
|
236886
237010
|
const script = match3[1] === "^" ? "superscript" : "subscript";
|
236887
|
-
const value = getReplacement(match3[2] || match3[3]);
|
237011
|
+
const value = getReplacement(match3[2] || match3[3], options);
|
236888
237012
|
if (!value)
|
236889
237013
|
return false;
|
236890
237014
|
if (value === "\u2218" && script === "superscript") {
|
@@ -236892,12 +237016,14 @@ function replaceDirectSubSuperScripts(node3) {
|
|
236892
237016
|
node3.value = "\xB0";
|
236893
237017
|
return true;
|
236894
237018
|
}
|
237019
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceSymbol) === false)
|
237020
|
+
return false;
|
236895
237021
|
node3.type = script;
|
236896
237022
|
node3.children = [{ type: "text", value }];
|
236897
237023
|
delete node3.value;
|
236898
237024
|
return true;
|
236899
237025
|
}
|
236900
|
-
function replaceNumberedSubSuperScripts(node3) {
|
237026
|
+
function replaceNumberedSubSuperScripts(node3, options) {
|
236901
237027
|
const match3 = node3.value.match(/^([+-]?[\d.]+)(\^|_)(?:(?:\{([+-]?[\d.]+)\})|([+-]?[\d.]+))$/);
|
236902
237028
|
if (!match3)
|
236903
237029
|
return false;
|
@@ -236912,7 +237038,7 @@ function replaceNumberedSubSuperScripts(node3) {
|
|
236912
237038
|
delete node3.value;
|
236913
237039
|
return true;
|
236914
237040
|
}
|
236915
|
-
function replaceNumber(node3) {
|
237041
|
+
function replaceNumber(node3, options) {
|
236916
237042
|
const match3 = node3.value.match(/^([+-]?[0-9.]+)$/);
|
236917
237043
|
if (!match3)
|
236918
237044
|
return false;
|
@@ -236923,21 +237049,25 @@ function replaceNumber(node3) {
|
|
236923
237049
|
node3.value = text7;
|
236924
237050
|
return true;
|
236925
237051
|
}
|
236926
|
-
function inlineMathSimplificationTransform(mdast2) {
|
237052
|
+
function inlineMathSimplificationTransform(mdast2, options) {
|
236927
237053
|
const math7 = selectAll("inlineMath", mdast2);
|
236928
237054
|
math7.forEach((node3) => {
|
236929
|
-
if (replaceSymbol(node3))
|
237055
|
+
if (replaceSymbol(node3, options)) {
|
236930
237056
|
return;
|
236931
|
-
|
237057
|
+
}
|
237058
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceScripts) !== false && replaceDirectSubSuperScripts(node3, options)) {
|
236932
237059
|
return;
|
236933
|
-
|
237060
|
+
}
|
237061
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceNumber) !== false && replaceNumberedSubSuperScripts(node3, options)) {
|
236934
237062
|
return;
|
236935
|
-
|
237063
|
+
}
|
237064
|
+
if ((options === null || options === void 0 ? void 0 : options.replaceNumber) !== false && replaceNumber(node3, options)) {
|
236936
237065
|
return;
|
237066
|
+
}
|
236937
237067
|
});
|
236938
237068
|
}
|
236939
|
-
var inlineMathSimplificationPlugin = () => (tree) => {
|
236940
|
-
inlineMathSimplificationTransform(tree);
|
237069
|
+
var inlineMathSimplificationPlugin = (opts) => (tree) => {
|
237070
|
+
inlineMathSimplificationTransform(tree, opts);
|
236941
237071
|
};
|
236942
237072
|
|
236943
237073
|
// ../myst-transforms/dist/blocks.js
|
@@ -237461,7 +237591,7 @@ function formatLinkText(link4) {
|
|
237461
237591
|
if (((_a6 = link4.children) === null || _a6 === void 0 ? void 0 : _a6.length) !== 1 || link4.children[0].type !== "text")
|
237462
237592
|
return;
|
237463
237593
|
const url = link4.children[0].value;
|
237464
|
-
if (url.length < 20 || url.match(/\s/)
|
237594
|
+
if (url.length < 20 || url.match(/\s/))
|
237465
237595
|
return;
|
237466
237596
|
if (url.includes("\u200B"))
|
237467
237597
|
return;
|
@@ -237477,7 +237607,9 @@ function linksTransform(mdast2, file, opts) {
|
|
237477
237607
|
link4.urlSource = link4.url;
|
237478
237608
|
const transform3 = opts.transformers.find((t2) => t2.test(link4.urlSource));
|
237479
237609
|
const result = transform3 === null || transform3 === void 0 ? void 0 : transform3.transform(link4, file);
|
237480
|
-
|
237610
|
+
if (!(transform3 === null || transform3 === void 0 ? void 0 : transform3.formatsText)) {
|
237611
|
+
formatLinkText(link4);
|
237612
|
+
}
|
237481
237613
|
if (!transform3 || result === void 0)
|
237482
237614
|
return;
|
237483
237615
|
if (result) {
|
@@ -237692,6 +237824,7 @@ var WikiTransformer = class {
|
|
237692
237824
|
constructor(opts) {
|
237693
237825
|
var _a6, _b;
|
237694
237826
|
this.protocol = "wiki";
|
237827
|
+
this.formatsText = true;
|
237695
237828
|
this.wikiUrl = removeWiki((_a6 = opts === null || opts === void 0 ? void 0 : opts.url) !== null && _a6 !== void 0 ? _a6 : `https://${(opts === null || opts === void 0 ? void 0 : opts.lang) || DEFAULT_LANGUAGE}.wikipedia.org/`, "/");
|
237696
237829
|
this.lang = (opts === null || opts === void 0 ? void 0 : opts.lang) || ((_b = `${this.wikiUrl}wiki/x`.match(ANY_WIKIPEDIA_ORG)) === null || _b === void 0 ? void 0 : _b[1]) || void 0;
|
237697
237830
|
}
|
@@ -237700,10 +237833,9 @@ var WikiTransformer = class {
|
|
237700
237833
|
return false;
|
237701
237834
|
if (uri.startsWith("wiki:"))
|
237702
237835
|
return true;
|
237703
|
-
if (uri.match(ANY_WIKIPEDIA_ORG))
|
237704
|
-
return
|
237705
|
-
|
237706
|
-
return true;
|
237836
|
+
if (uri.match(ANY_WIKIPEDIA_ORG) || withoutHttp(uri).startsWith(withoutHttp(this.wikiUrl))) {
|
237837
|
+
return !uri.match(/\/w\/index\.php(\?[^/]*)?$/);
|
237838
|
+
}
|
237707
237839
|
return false;
|
237708
237840
|
}
|
237709
237841
|
pageName(uri) {
|
@@ -238871,7 +239003,7 @@ var ReferenceState = class {
|
|
238871
239003
|
this.numbering = fillNumbering((_a6 = opts === null || opts === void 0 ? void 0 : opts.frontmatter) === null || _a6 === void 0 ? void 0 : _a6.numbering, DEFAULT_NUMBERING);
|
238872
239004
|
this.offset = (_d2 = (_c = (_b = this.numbering) === null || _b === void 0 ? void 0 : _b.title) === null || _c === void 0 ? void 0 : _c.offset) !== null && _d2 !== void 0 ? _d2 : 0;
|
238873
239005
|
this.targetCounts = initializeTargetCounts(this.numbering, opts === null || opts === void 0 ? void 0 : opts.previousCounts, this.offset);
|
238874
|
-
if ((((_e = this.numbering.title) === null || _e === void 0 ? void 0 : _e.enabled) || ((_f = this.numbering.all) === null || _f === void 0 ? void 0 : _f.enabled)) && !((_g = opts === null || opts === void 0 ? void 0 : opts.frontmatter) === null || _g === void 0 ? void 0 : _g.content_includes_title) && ((_h = this.numbering[`heading_${this.offset + 1}`]) === null || _h === void 0 ? void 0 : _h.enabled) !== false) {
|
239006
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.hidden) && (((_e = this.numbering.title) === null || _e === void 0 ? void 0 : _e.enabled) || ((_f = this.numbering.all) === null || _f === void 0 ? void 0 : _f.enabled)) && !((_g = opts === null || opts === void 0 ? void 0 : opts.frontmatter) === null || _g === void 0 ? void 0 : _g.content_includes_title) && ((_h = this.numbering[`heading_${this.offset + 1}`]) === null || _h === void 0 ? void 0 : _h.enabled) !== false) {
|
238875
239007
|
this.targetCounts.heading = incrementHeadingCounts2(this.offset + 1, this.targetCounts.heading);
|
238876
239008
|
this.enumerator = formatHeadingEnumerator2(this.targetCounts.heading, (_k = (_j = this.numbering.title) === null || _j === void 0 ? void 0 : _j.enumerator) !== null && _k !== void 0 ? _k : (_l = this.numbering.enumerator) === null || _l === void 0 ? void 0 : _l.enumerator);
|
238877
239009
|
}
|
@@ -238883,11 +239015,11 @@ var ReferenceState = class {
|
|
238883
239015
|
this.dataUrl = opts === null || opts === void 0 ? void 0 : opts.dataUrl;
|
238884
239016
|
this.title = (_p = opts === null || opts === void 0 ? void 0 : opts.frontmatter) === null || _p === void 0 ? void 0 : _p.title;
|
238885
239017
|
}
|
238886
|
-
addTarget(node3) {
|
239018
|
+
addTarget(node3, hidden2) {
|
238887
239019
|
if (!isTargetIdentifierNode(node3))
|
238888
239020
|
return;
|
238889
239021
|
const kind = kindFromNode2(node3);
|
238890
|
-
const numberNode = shouldEnumerateNode(node3, kind, this.numbering, this.offset);
|
239022
|
+
const numberNode = !hidden2 && shouldEnumerateNode(node3, kind, this.numbering, this.offset);
|
238891
239023
|
if (numberNode) {
|
238892
239024
|
this.incrementCount(node3, kind);
|
238893
239025
|
}
|
@@ -239086,7 +239218,7 @@ var enumerateTargetsTransform = (tree, opts) => {
|
|
239086
239218
|
if (!isTargetIdentifierNode(node3))
|
239087
239219
|
return;
|
239088
239220
|
if (node3.identifier || node3.enumerated || ["container", "mathGroup", "math", "heading", "proof"].includes(node3.type)) {
|
239089
|
-
opts.state.addTarget(node3);
|
239221
|
+
opts.state.addTarget(node3, opts === null || opts === void 0 ? void 0 : opts.hidden);
|
239090
239222
|
}
|
239091
239223
|
});
|
239092
239224
|
selectAll("container", tree).filter((container4) => !container4.subcontainer).forEach((parent2) => {
|
@@ -239099,7 +239231,7 @@ var enumerateTargetsTransform = (tree, opts) => {
|
|
239099
239231
|
sub2.label = label;
|
239100
239232
|
sub2.identifier = identifier;
|
239101
239233
|
sub2.implicit = true;
|
239102
|
-
opts.state.addTarget(sub2);
|
239234
|
+
opts.state.addTarget(sub2, opts === null || opts === void 0 ? void 0 : opts.hidden);
|
239103
239235
|
});
|
239104
239236
|
});
|
239105
239237
|
return tree;
|
@@ -280192,8 +280324,8 @@ var _core = require_lib6();
|
|
280192
280324
|
var _index = require_input6();
|
280193
280325
|
var _config = _interopRequireDefault(require_config3());
|
280194
280326
|
var _index2 = _interopRequireDefault(require_output5());
|
280195
|
-
function _interopRequireDefault(
|
280196
|
-
return
|
280327
|
+
function _interopRequireDefault(e2) {
|
280328
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
280197
280329
|
}
|
280198
280330
|
_core.plugins.add(_index.ref, {
|
280199
280331
|
input: _index.formats,
|
@@ -280208,8 +280340,8 @@ var _styles = require_styles2();
|
|
280208
280340
|
var _engines = _interopRequireDefault2(require_engines());
|
280209
280341
|
var _bibliography = _interopRequireDefault2(require_bibliography());
|
280210
280342
|
var _citation = _interopRequireDefault2(require_citation());
|
280211
|
-
function _interopRequireDefault2(
|
280212
|
-
return
|
280343
|
+
function _interopRequireDefault2(e2) {
|
280344
|
+
return e2 && e2.__esModule ? e2 : { default: e2 };
|
280213
280345
|
}
|
280214
280346
|
_core2.plugins.add("@csl", {
|
280215
280347
|
output: {
|
@@ -281732,11 +281864,44 @@ var bibliographyDirective = {
|
|
281732
281864
|
};
|
281733
281865
|
|
281734
281866
|
// ../myst-directives/dist/code.js
|
281735
|
-
function parseEmphasizeLines(emphasizeLinesString) {
|
281867
|
+
function parseEmphasizeLines(data, vfile2, emphasizeLinesString) {
|
281868
|
+
const { node: node3 } = data;
|
281736
281869
|
if (!emphasizeLinesString)
|
281737
281870
|
return void 0;
|
281738
|
-
const
|
281739
|
-
|
281871
|
+
const result = /* @__PURE__ */ new Set();
|
281872
|
+
for (const part of emphasizeLinesString.split(",")) {
|
281873
|
+
const trimmed = part.trim();
|
281874
|
+
const rangeMatch = trimmed.match(/^(\d+)\s*-\s*(\d+)$/);
|
281875
|
+
if (rangeMatch) {
|
281876
|
+
const start = Number(rangeMatch[1]);
|
281877
|
+
const end = Number(rangeMatch[2]);
|
281878
|
+
if (start <= end) {
|
281879
|
+
for (let i2 = start; i2 <= end; i2++) {
|
281880
|
+
result.add(i2);
|
281881
|
+
}
|
281882
|
+
continue;
|
281883
|
+
} else {
|
281884
|
+
fileWarn(vfile2, `Invalid emphasize-lines range "${trimmed}" (start > end)`, {
|
281885
|
+
node: node3,
|
281886
|
+
source: "code-block:options",
|
281887
|
+
ruleId: RuleId.directiveOptionsCorrect
|
281888
|
+
});
|
281889
|
+
continue;
|
281890
|
+
}
|
281891
|
+
}
|
281892
|
+
if (/^\d+$/.test(trimmed)) {
|
281893
|
+
result.add(Number(trimmed));
|
281894
|
+
} else if (trimmed !== "") {
|
281895
|
+
fileWarn(vfile2, `Invalid emphasize-lines value "${trimmed}"`, {
|
281896
|
+
node: node3,
|
281897
|
+
source: "code-block:options",
|
281898
|
+
ruleId: RuleId.directiveOptionsCorrect
|
281899
|
+
});
|
281900
|
+
}
|
281901
|
+
}
|
281902
|
+
if (result.size === 0)
|
281903
|
+
return void 0;
|
281904
|
+
return Array.from(result).sort((a2, b) => a2 - b);
|
281740
281905
|
}
|
281741
281906
|
function getCodeBlockOptions(data, vfile2, defaultFilename) {
|
281742
281907
|
var _a6;
|
@@ -281748,7 +281913,7 @@ function getCodeBlockOptions(data, vfile2, defaultFilename) {
|
|
281748
281913
|
ruleId: RuleId.directiveOptionsCorrect
|
281749
281914
|
});
|
281750
281915
|
}
|
281751
|
-
const emphasizeLines = parseEmphasizeLines(options === null || options === void 0 ? void 0 : options["emphasize-lines"]);
|
281916
|
+
const emphasizeLines = parseEmphasizeLines(data, vfile2, options === null || options === void 0 ? void 0 : options["emphasize-lines"]);
|
281752
281917
|
const numberLines = options === null || options === void 0 ? void 0 : options["number-lines"];
|
281753
281918
|
const showLineNumbers = (options === null || options === void 0 ? void 0 : options.linenos) || (options === null || options === void 0 ? void 0 : options["lineno-start"]) || (options === null || options === void 0 ? void 0 : options["lineno-match"]) || numberLines ? true : void 0;
|
281754
281919
|
let startingLineNumber = numberLines != null && numberLines > 1 ? numberLines : options === null || options === void 0 ? void 0 : options["lineno-start"];
|
@@ -281789,7 +281954,7 @@ var CODE_DIRECTIVE_OPTIONS = {
|
|
281789
281954
|
},
|
281790
281955
|
"emphasize-lines": {
|
281791
281956
|
type: String,
|
281792
|
-
doc: 'Emphasize particular lines (comma-separated numbers), e.g. "3,5"'
|
281957
|
+
doc: 'Emphasize particular lines (comma-separated numbers which can include ranges), e.g. "3,5,7-9"'
|
281793
281958
|
},
|
281794
281959
|
filename: {
|
281795
281960
|
type: String,
|
@@ -289736,7 +289901,7 @@ var import_mime_types = __toESM(require_mime_types(), 1);
|
|
289736
289901
|
var import_node_path16 = __toESM(require("path"), 1);
|
289737
289902
|
|
289738
289903
|
// ../myst-cli/dist/version.js
|
289739
|
-
var version2 = "1.
|
289904
|
+
var version2 = "1.5.0";
|
289740
289905
|
var version_default2 = version2;
|
289741
289906
|
|
289742
289907
|
// ../myst-cli/dist/utils/headers.js
|
@@ -291200,7 +291365,6 @@ function getLocation(file, projectPath) {
|
|
291200
291365
|
}
|
291201
291366
|
async function loadFile(session, file, projectPath, extension, opts) {
|
291202
291367
|
var _a6;
|
291203
|
-
await session.loadPlugins();
|
291204
291368
|
const toc = tic();
|
291205
291369
|
session.store.dispatch(warnings.actions.clearWarnings({ file }));
|
291206
291370
|
const cache = castSession(session);
|
@@ -291660,6 +291824,7 @@ async function resolveProjectConfigPaths(session, path44, projectConfig, resolut
|
|
291660
291824
|
return info;
|
291661
291825
|
}
|
291662
291826
|
}));
|
291827
|
+
await session.loadPlugins(resolvedFields.plugins);
|
291663
291828
|
}
|
291664
291829
|
if (projectConfig.parts) {
|
291665
291830
|
resolvedFields.parts = await loadFrontmatterParts(session, file, "project.parts", { parts: projectConfig.parts }, path44);
|
@@ -298268,8 +298433,11 @@ function pagesFromEntries(session, path44, entries2, pages = [], level = 1, page
|
|
298268
298433
|
pages.push({ file: resolvedFile, level: entryLevel, slug, ...leftover });
|
298269
298434
|
}
|
298270
298435
|
} else if (isURL(entry)) {
|
298271
|
-
|
298272
|
-
|
298436
|
+
pages.push({
|
298437
|
+
url: entry.url,
|
298438
|
+
title: entry.title || entry.url,
|
298439
|
+
level: entryLevel,
|
298440
|
+
open_in_same_tab: entry.open_in_same_tab
|
298273
298441
|
});
|
298274
298442
|
} else {
|
298275
298443
|
entryLevel = level < -1 ? -1 : level;
|
@@ -301618,6 +301786,8 @@ async function manifestPagesFromProject(session, projectPath) {
|
|
301618
301786
|
const cache = castSession(session);
|
301619
301787
|
const pages = await Promise.all(proj.pages.map(async (page) => {
|
301620
301788
|
var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k;
|
301789
|
+
if ("hidden" in page && page.hidden)
|
301790
|
+
return null;
|
301621
301791
|
if ("file" in page) {
|
301622
301792
|
const fileInfo3 = selectors_exports.selectFileInfo(state, page.file);
|
301623
301793
|
const title = fileInfo3.title || fileTitle(page.file);
|
@@ -301647,9 +301817,19 @@ async function manifestPagesFromProject(session, projectPath) {
|
|
301647
301817
|
};
|
301648
301818
|
return projectPage;
|
301649
301819
|
}
|
301820
|
+
if ("url" in page) {
|
301821
|
+
const { title, url, open_in_same_tab, level } = page;
|
301822
|
+
const externalURL = {
|
301823
|
+
title,
|
301824
|
+
url,
|
301825
|
+
open_in_same_tab,
|
301826
|
+
level
|
301827
|
+
};
|
301828
|
+
return externalURL;
|
301829
|
+
}
|
301650
301830
|
return { ...page };
|
301651
301831
|
}));
|
301652
|
-
return pages;
|
301832
|
+
return pages === null || pages === void 0 ? void 0 : pages.filter((p5) => p5 !== null);
|
301653
301833
|
}
|
301654
301834
|
function manifestTitleFromProject(session, projectPath) {
|
301655
301835
|
const state = session.store.getState();
|
@@ -304527,7 +304707,7 @@ async function transformMdast(session, opts) {
|
|
304527
304707
|
const pipe = unified().use(reconstructHtmlPlugin).use(htmlPlugin, { htmlHandlers }).use(basicTransformationsPlugin, {
|
304528
304708
|
parser: (content3) => parseMyst(session, content3, file),
|
304529
304709
|
firstDepth: (titleDepth !== null && titleDepth !== void 0 ? titleDepth : 1) + (frontmatter.content_includes_title ? 0 : 1)
|
304530
|
-
}).use(inlineMathSimplificationPlugin).use(mathPlugin, { macros: frontmatter.math });
|
304710
|
+
}).use(inlineMathSimplificationPlugin, { replaceSymbol: false }).use(mathPlugin, { macros: frontmatter.math });
|
304531
304711
|
(_c = session.plugins) === null || _c === void 0 ? void 0 : _c.transforms.forEach((t2) => {
|
304532
304712
|
if (t2.stage !== "document")
|
304533
304713
|
return;
|
@@ -304990,7 +305170,7 @@ function referenceFileFromPartFile(session, partFile) {
|
|
304990
305170
|
function selectPageReferenceStates(session, pages, opts) {
|
304991
305171
|
const cache = castSession(session);
|
304992
305172
|
let previousCounts;
|
304993
|
-
const pageReferenceStates = pages.map(({ file }) => {
|
305173
|
+
const pageReferenceStates = pages.map(({ file, hidden: hidden2 }) => {
|
304994
305174
|
var _a6, _b;
|
304995
305175
|
const { frontmatter, identifiers, mdast: mdast2, kind } = (_b = (_a6 = cache.$getMdast(file)) === null || _a6 === void 0 ? void 0 : _a6.post) !== null && _b !== void 0 ? _b : {};
|
304996
305176
|
const vfile2 = new VFile();
|
@@ -305000,13 +305180,14 @@ function selectPageReferenceStates(session, pages, opts) {
|
|
305000
305180
|
frontmatter,
|
305001
305181
|
identifiers,
|
305002
305182
|
previousCounts,
|
305003
|
-
vfile: vfile2
|
305183
|
+
vfile: vfile2,
|
305184
|
+
hidden: hidden2
|
305004
305185
|
});
|
305005
305186
|
if (frontmatter && !frontmatter.enumerator) {
|
305006
305187
|
frontmatter.enumerator = state.enumerator;
|
305007
305188
|
}
|
305008
305189
|
if (mdast2)
|
305009
|
-
enumerateTargetsTransform(mdast2, { state });
|
305190
|
+
enumerateTargetsTransform(mdast2, { state, hidden: hidden2 });
|
305010
305191
|
previousCounts = state.targetCounts;
|
305011
305192
|
logMessagesFromVFile(session, vfile2);
|
305012
305193
|
if (state) {
|
@@ -326382,36 +326563,28 @@ ${stderr}
|
|
326382
326563
|
}
|
326383
326564
|
|
326384
326565
|
// ../myst-cli/dist/plugins.js
|
326385
|
-
async function loadPlugins(session) {
|
326386
|
-
|
326387
|
-
const
|
326388
|
-
const projConfig = selectors_exports.selectCurrentProjectConfig(state);
|
326389
|
-
if (projConfig === null || projConfig === void 0 ? void 0 : projConfig.plugins)
|
326390
|
-
configPlugins.push(...projConfig.plugins);
|
326391
|
-
const siteConfig = selectors_exports.selectCurrentSiteConfig(state);
|
326392
|
-
if (siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.projects) {
|
326393
|
-
siteConfig.projects.filter((project) => !!project.path).forEach((project) => {
|
326394
|
-
const siteProjConfig = selectors_exports.selectLocalProjectConfig(state, project.path);
|
326395
|
-
if (siteProjConfig === null || siteProjConfig === void 0 ? void 0 : siteProjConfig.plugins)
|
326396
|
-
configPlugins.push(...siteProjConfig.plugins);
|
326397
|
-
});
|
326398
|
-
}
|
326399
|
-
configPlugins = [...new Map(configPlugins.map((info) => [info.path, info])).values()];
|
326400
|
-
const plugins3 = {
|
326566
|
+
async function loadPlugins(session, plugins3) {
|
326567
|
+
var _a6;
|
326568
|
+
const loadedPlugins = (_a6 = session.plugins) !== null && _a6 !== void 0 ? _a6 : {
|
326401
326569
|
directives: [],
|
326402
326570
|
roles: [],
|
326403
|
-
transforms: []
|
326571
|
+
transforms: [],
|
326572
|
+
paths: []
|
326404
326573
|
};
|
326405
|
-
|
326406
|
-
|
326574
|
+
const newPlugins = [...new Map(plugins3.map((info) => [info.path, info])).values()].filter(
|
326575
|
+
// ...and filter out already loaded plugins
|
326576
|
+
({ path: path44 }) => !loadedPlugins.paths.includes(path44)
|
326577
|
+
);
|
326578
|
+
if (newPlugins.length === 0) {
|
326579
|
+
return loadedPlugins;
|
326407
326580
|
}
|
326408
|
-
session.log.debug(`Loading plugins: "${
|
326409
|
-
const modules = await Promise.all(
|
326410
|
-
var
|
326581
|
+
session.log.debug(`Loading plugins: "${newPlugins.map((info) => `${info.path} (${info.type})`).join('", "')}"`);
|
326582
|
+
const modules = await Promise.all(newPlugins.map(async (info) => {
|
326583
|
+
var _a7, _b;
|
326411
326584
|
const { type: type2, path: path44 } = info;
|
326412
326585
|
switch (type2) {
|
326413
326586
|
case "executable": {
|
326414
|
-
if (!((
|
326587
|
+
if (!((_a7 = import_node_fs44.default.statSync(path44, { throwIfNoEntry: false })) === null || _a7 === void 0 ? void 0 : _a7.isFile())) {
|
326415
326588
|
addWarningForFile(session, path44, `Unknown plugin "${path44}", it must be an executable file`, "error", {
|
326416
326589
|
ruleId: RuleId.pluginLoads
|
326417
326590
|
});
|
@@ -326461,26 +326634,28 @@ ${error === null || error === void 0 ? void 0 : error.stack}
|
|
326461
326634
|
}
|
326462
326635
|
}));
|
326463
326636
|
modules.forEach((pluginLoader) => {
|
326464
|
-
var
|
326637
|
+
var _a7;
|
326465
326638
|
if (!pluginLoader)
|
326466
326639
|
return;
|
326467
326640
|
const plugin5 = pluginLoader.module.default || pluginLoader.module.plugin;
|
326468
326641
|
const directives = plugin5.directives || pluginLoader.module.directives;
|
326469
326642
|
const roles = plugin5.roles || pluginLoader.module.roles;
|
326470
326643
|
const transforms = plugin5.transforms || pluginLoader.module.transforms;
|
326471
|
-
session.log.info(`\u{1F50C} ${(
|
326644
|
+
session.log.info(`\u{1F50C} ${(_a7 = plugin5 === null || plugin5 === void 0 ? void 0 : plugin5.name) !== null && _a7 !== void 0 ? _a7 : "Unnamed Plugin"} (${pluginLoader.path}) loaded: ${plural("%s directive(s)", directives)}, ${plural("%s role(s)", roles)}, ${plural("%s transform(s)", transforms)}`);
|
326472
326645
|
if (directives) {
|
326473
|
-
|
326646
|
+
loadedPlugins.directives.push(...directives);
|
326474
326647
|
}
|
326475
326648
|
if (roles) {
|
326476
|
-
|
326649
|
+
loadedPlugins.roles.push(...roles);
|
326477
326650
|
}
|
326478
326651
|
if (transforms) {
|
326479
|
-
|
326652
|
+
loadedPlugins.transforms.push(...transforms);
|
326480
326653
|
}
|
326654
|
+
loadedPlugins.paths.push(pluginLoader.path);
|
326481
326655
|
});
|
326656
|
+
session.plugins = loadedPlugins;
|
326482
326657
|
session.log.debug("Plugins loaded");
|
326483
|
-
return
|
326658
|
+
return loadedPlugins;
|
326484
326659
|
}
|
326485
326660
|
|
326486
326661
|
// ../myst-cli/dist/session/session.js
|
@@ -333146,11 +333321,8 @@ var Session = class {
|
|
333146
333321
|
logData.done = true;
|
333147
333322
|
return resp;
|
333148
333323
|
}
|
333149
|
-
async loadPlugins() {
|
333150
|
-
|
333151
|
-
return this._pluginPromise;
|
333152
|
-
this._pluginPromise = loadPlugins(this);
|
333153
|
-
this.plugins = await this._pluginPromise;
|
333324
|
+
async loadPlugins(plugins3) {
|
333325
|
+
this.plugins = await loadPlugins(this, plugins3);
|
333154
333326
|
return this.plugins;
|
333155
333327
|
}
|
333156
333328
|
sourcePath() {
|