@duskmoon-dev/el-markdown 0.7.1 → 0.8.1
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/cjs/index.js +833 -813
- package/dist/cjs/index.js.map +10 -10
- package/dist/cjs/register.js +833 -813
- package/dist/cjs/register.js.map +10 -10
- package/dist/esm/index.js +824 -807
- package/dist/esm/index.js.map +10 -10
- package/dist/esm/register.js +824 -807
- package/dist/esm/register.js.map +10 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
|
|
@@ -8613,28 +8634,6 @@ function toAlignment(value) {
|
|
|
8613
8634
|
const code = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
8614
8635
|
return code === 67 || code === 99 ? 99 : code === 76 || code === 108 ? 108 : code === 82 || code === 114 ? 114 : 0;
|
|
8615
8636
|
}
|
|
8616
|
-
|
|
8617
|
-
// ../../node_modules/.bun/zwitch@2.0.4/node_modules/zwitch/index.js
|
|
8618
|
-
var own3 = {}.hasOwnProperty;
|
|
8619
|
-
function zwitch(key, options) {
|
|
8620
|
-
const settings = options || {};
|
|
8621
|
-
function one2(value, ...parameters) {
|
|
8622
|
-
let fn = one2.invalid;
|
|
8623
|
-
const handlers = one2.handlers;
|
|
8624
|
-
if (value && own3.call(value, key)) {
|
|
8625
|
-
const id = String(value[key]);
|
|
8626
|
-
fn = own3.call(handlers, id) ? handlers[id] : one2.unknown;
|
|
8627
|
-
}
|
|
8628
|
-
if (fn) {
|
|
8629
|
-
return fn.call(this, value, ...parameters);
|
|
8630
|
-
}
|
|
8631
|
-
}
|
|
8632
|
-
one2.handlers = settings.handlers || {};
|
|
8633
|
-
one2.invalid = settings.invalid;
|
|
8634
|
-
one2.unknown = settings.unknown;
|
|
8635
|
-
return one2;
|
|
8636
|
-
}
|
|
8637
|
-
|
|
8638
8637
|
// ../../node_modules/.bun/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
|
|
8639
8638
|
function blockquote(node2, _, state, info) {
|
|
8640
8639
|
const exit2 = state.enter("blockquote");
|
|
@@ -10889,364 +10888,328 @@ function remarkGfm(options) {
|
|
|
10889
10888
|
fromMarkdownExtensions.push(gfmFromMarkdown());
|
|
10890
10889
|
toMarkdownExtensions.push(gfmToMarkdown(settings));
|
|
10891
10890
|
}
|
|
10892
|
-
// ../../node_modules/.bun
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/break.js
|
|
10905
|
-
function hardBreak2(state, node2) {
|
|
10906
|
-
const result = { type: "element", tagName: "br", properties: {}, children: [] };
|
|
10907
|
-
state.patch(node2, result);
|
|
10908
|
-
return [state.applyData(node2, result), { type: "text", value: `
|
|
10909
|
-
` }];
|
|
10910
|
-
}
|
|
10911
|
-
|
|
10912
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/code.js
|
|
10913
|
-
function code3(state, node2) {
|
|
10914
|
-
const value = node2.value ? node2.value + `
|
|
10915
|
-
` : "";
|
|
10916
|
-
const properties = {};
|
|
10917
|
-
const language = node2.lang ? node2.lang.split(/\s+/) : [];
|
|
10918
|
-
if (language.length > 0) {
|
|
10919
|
-
properties.className = ["language-" + language[0]];
|
|
10920
|
-
}
|
|
10921
|
-
let result = {
|
|
10922
|
-
type: "element",
|
|
10923
|
-
tagName: "code",
|
|
10924
|
-
properties,
|
|
10925
|
-
children: [{ type: "text", value }]
|
|
10926
|
-
};
|
|
10927
|
-
if (node2.meta) {
|
|
10928
|
-
result.data = { meta: node2.meta };
|
|
10929
|
-
}
|
|
10930
|
-
state.patch(node2, result);
|
|
10931
|
-
result = state.applyData(node2, result);
|
|
10932
|
-
result = { type: "element", tagName: "pre", properties: {}, children: [result] };
|
|
10933
|
-
state.patch(node2, result);
|
|
10934
|
-
return result;
|
|
10935
|
-
}
|
|
10891
|
+
// ../../node_modules/.bun/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.js
|
|
10892
|
+
var VOID = -1;
|
|
10893
|
+
var PRIMITIVE = 0;
|
|
10894
|
+
var ARRAY = 1;
|
|
10895
|
+
var OBJECT = 2;
|
|
10896
|
+
var DATE = 3;
|
|
10897
|
+
var REGEXP = 4;
|
|
10898
|
+
var MAP = 5;
|
|
10899
|
+
var SET = 6;
|
|
10900
|
+
var ERROR = 7;
|
|
10901
|
+
var BIGINT = 8;
|
|
10936
10902
|
|
|
10937
|
-
// ../../node_modules/.bun
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
children: state.all(node2)
|
|
10903
|
+
// ../../node_modules/.bun/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
10904
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
10905
|
+
var deserializer = ($, _) => {
|
|
10906
|
+
const as = (out, index2) => {
|
|
10907
|
+
$.set(index2, out);
|
|
10908
|
+
return out;
|
|
10944
10909
|
};
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10910
|
+
const unpair = (index2) => {
|
|
10911
|
+
if ($.has(index2))
|
|
10912
|
+
return $.get(index2);
|
|
10913
|
+
const [type, value] = _[index2];
|
|
10914
|
+
switch (type) {
|
|
10915
|
+
case PRIMITIVE:
|
|
10916
|
+
case VOID:
|
|
10917
|
+
return as(value, index2);
|
|
10918
|
+
case ARRAY: {
|
|
10919
|
+
const arr = as([], index2);
|
|
10920
|
+
for (const index3 of value)
|
|
10921
|
+
arr.push(unpair(index3));
|
|
10922
|
+
return arr;
|
|
10923
|
+
}
|
|
10924
|
+
case OBJECT: {
|
|
10925
|
+
const object = as({}, index2);
|
|
10926
|
+
for (const [key, index3] of value)
|
|
10927
|
+
object[unpair(key)] = unpair(index3);
|
|
10928
|
+
return object;
|
|
10929
|
+
}
|
|
10930
|
+
case DATE:
|
|
10931
|
+
return as(new Date(value), index2);
|
|
10932
|
+
case REGEXP: {
|
|
10933
|
+
const { source, flags } = value;
|
|
10934
|
+
return as(new RegExp(source, flags), index2);
|
|
10935
|
+
}
|
|
10936
|
+
case MAP: {
|
|
10937
|
+
const map3 = as(new Map, index2);
|
|
10938
|
+
for (const [key, index3] of value)
|
|
10939
|
+
map3.set(unpair(key), unpair(index3));
|
|
10940
|
+
return map3;
|
|
10941
|
+
}
|
|
10942
|
+
case SET: {
|
|
10943
|
+
const set = as(new Set, index2);
|
|
10944
|
+
for (const index3 of value)
|
|
10945
|
+
set.add(unpair(index3));
|
|
10946
|
+
return set;
|
|
10947
|
+
}
|
|
10948
|
+
case ERROR: {
|
|
10949
|
+
const { name, message } = value;
|
|
10950
|
+
return as(new env[name](message), index2);
|
|
10951
|
+
}
|
|
10952
|
+
case BIGINT:
|
|
10953
|
+
return as(BigInt(value), index2);
|
|
10954
|
+
case "BigInt":
|
|
10955
|
+
return as(Object(BigInt(value)), index2);
|
|
10956
|
+
case "ArrayBuffer":
|
|
10957
|
+
return as(new Uint8Array(value).buffer, value);
|
|
10958
|
+
case "DataView": {
|
|
10959
|
+
const { buffer } = new Uint8Array(value);
|
|
10960
|
+
return as(new DataView(buffer), value);
|
|
10961
|
+
}
|
|
10962
|
+
}
|
|
10963
|
+
return as(new env[type](value), index2);
|
|
10956
10964
|
};
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10965
|
+
return unpair;
|
|
10966
|
+
};
|
|
10967
|
+
var deserialize = (serialized) => deserializer(new Map, serialized)(0);
|
|
10960
10968
|
|
|
10961
|
-
// ../../node_modules/.bun
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
const
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10969
|
+
// ../../node_modules/.bun/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
10970
|
+
var EMPTY = "";
|
|
10971
|
+
var { toString: toString2 } = {};
|
|
10972
|
+
var { keys } = Object;
|
|
10973
|
+
var typeOf = (value) => {
|
|
10974
|
+
const type = typeof value;
|
|
10975
|
+
if (type !== "object" || !value)
|
|
10976
|
+
return [PRIMITIVE, type];
|
|
10977
|
+
const asString = toString2.call(value).slice(8, -1);
|
|
10978
|
+
switch (asString) {
|
|
10979
|
+
case "Array":
|
|
10980
|
+
return [ARRAY, EMPTY];
|
|
10981
|
+
case "Object":
|
|
10982
|
+
return [OBJECT, EMPTY];
|
|
10983
|
+
case "Date":
|
|
10984
|
+
return [DATE, EMPTY];
|
|
10985
|
+
case "RegExp":
|
|
10986
|
+
return [REGEXP, EMPTY];
|
|
10987
|
+
case "Map":
|
|
10988
|
+
return [MAP, EMPTY];
|
|
10989
|
+
case "Set":
|
|
10990
|
+
return [SET, EMPTY];
|
|
10991
|
+
case "DataView":
|
|
10992
|
+
return [ARRAY, asString];
|
|
10975
10993
|
}
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
};
|
|
10989
|
-
state.patch(node2, link2);
|
|
10990
|
-
const sup = {
|
|
10991
|
-
type: "element",
|
|
10992
|
-
tagName: "sup",
|
|
10993
|
-
properties: {},
|
|
10994
|
-
children: [link2]
|
|
10995
|
-
};
|
|
10996
|
-
state.patch(node2, sup);
|
|
10997
|
-
return state.applyData(node2, sup);
|
|
10998
|
-
}
|
|
10999
|
-
|
|
11000
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/heading.js
|
|
11001
|
-
function heading2(state, node2) {
|
|
11002
|
-
const result = {
|
|
11003
|
-
type: "element",
|
|
11004
|
-
tagName: "h" + node2.depth,
|
|
11005
|
-
properties: {},
|
|
11006
|
-
children: state.all(node2)
|
|
10994
|
+
if (asString.includes("Array"))
|
|
10995
|
+
return [ARRAY, asString];
|
|
10996
|
+
if (asString.includes("Error"))
|
|
10997
|
+
return [ERROR, asString];
|
|
10998
|
+
return [OBJECT, asString];
|
|
10999
|
+
};
|
|
11000
|
+
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
11001
|
+
var serializer = (strict, json, $, _) => {
|
|
11002
|
+
const as = (out, value) => {
|
|
11003
|
+
const index2 = _.push(out) - 1;
|
|
11004
|
+
$.set(value, index2);
|
|
11005
|
+
return index2;
|
|
11007
11006
|
};
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11007
|
+
const pair = (value) => {
|
|
11008
|
+
if ($.has(value))
|
|
11009
|
+
return $.get(value);
|
|
11010
|
+
let [TYPE, type] = typeOf(value);
|
|
11011
|
+
switch (TYPE) {
|
|
11012
|
+
case PRIMITIVE: {
|
|
11013
|
+
let entry = value;
|
|
11014
|
+
switch (type) {
|
|
11015
|
+
case "bigint":
|
|
11016
|
+
TYPE = BIGINT;
|
|
11017
|
+
entry = value.toString();
|
|
11018
|
+
break;
|
|
11019
|
+
case "function":
|
|
11020
|
+
case "symbol":
|
|
11021
|
+
if (strict)
|
|
11022
|
+
throw new TypeError("unable to serialize " + type);
|
|
11023
|
+
entry = null;
|
|
11024
|
+
break;
|
|
11025
|
+
case "undefined":
|
|
11026
|
+
return as([VOID], value);
|
|
11027
|
+
}
|
|
11028
|
+
return as([TYPE, entry], value);
|
|
11029
|
+
}
|
|
11030
|
+
case ARRAY: {
|
|
11031
|
+
if (type) {
|
|
11032
|
+
let spread = value;
|
|
11033
|
+
if (type === "DataView") {
|
|
11034
|
+
spread = new Uint8Array(value.buffer);
|
|
11035
|
+
} else if (type === "ArrayBuffer") {
|
|
11036
|
+
spread = new Uint8Array(value);
|
|
11037
|
+
}
|
|
11038
|
+
return as([type, [...spread]], value);
|
|
11039
|
+
}
|
|
11040
|
+
const arr = [];
|
|
11041
|
+
const index2 = as([TYPE, arr], value);
|
|
11042
|
+
for (const entry of value)
|
|
11043
|
+
arr.push(pair(entry));
|
|
11044
|
+
return index2;
|
|
11045
|
+
}
|
|
11046
|
+
case OBJECT: {
|
|
11047
|
+
if (type) {
|
|
11048
|
+
switch (type) {
|
|
11049
|
+
case "BigInt":
|
|
11050
|
+
return as([type, value.toString()], value);
|
|
11051
|
+
case "Boolean":
|
|
11052
|
+
case "Number":
|
|
11053
|
+
case "String":
|
|
11054
|
+
return as([type, value.valueOf()], value);
|
|
11055
|
+
}
|
|
11056
|
+
}
|
|
11057
|
+
if (json && "toJSON" in value)
|
|
11058
|
+
return pair(value.toJSON());
|
|
11059
|
+
const entries = [];
|
|
11060
|
+
const index2 = as([TYPE, entries], value);
|
|
11061
|
+
for (const key of keys(value)) {
|
|
11062
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
11063
|
+
entries.push([pair(key), pair(value[key])]);
|
|
11064
|
+
}
|
|
11065
|
+
return index2;
|
|
11066
|
+
}
|
|
11067
|
+
case DATE:
|
|
11068
|
+
return as([TYPE, value.toISOString()], value);
|
|
11069
|
+
case REGEXP: {
|
|
11070
|
+
const { source, flags } = value;
|
|
11071
|
+
return as([TYPE, { source, flags }], value);
|
|
11072
|
+
}
|
|
11073
|
+
case MAP: {
|
|
11074
|
+
const entries = [];
|
|
11075
|
+
const index2 = as([TYPE, entries], value);
|
|
11076
|
+
for (const [key, entry] of value) {
|
|
11077
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
11078
|
+
entries.push([pair(key), pair(entry)]);
|
|
11079
|
+
}
|
|
11080
|
+
return index2;
|
|
11081
|
+
}
|
|
11082
|
+
case SET: {
|
|
11083
|
+
const entries = [];
|
|
11084
|
+
const index2 = as([TYPE, entries], value);
|
|
11085
|
+
for (const entry of value) {
|
|
11086
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
11087
|
+
entries.push(pair(entry));
|
|
11088
|
+
}
|
|
11089
|
+
return index2;
|
|
11090
|
+
}
|
|
11091
|
+
}
|
|
11092
|
+
const { message } = value;
|
|
11093
|
+
return as([TYPE, { name: type, message }], value);
|
|
11094
|
+
};
|
|
11095
|
+
return pair;
|
|
11096
|
+
};
|
|
11097
|
+
var serialize2 = (value, { json, lossy } = {}) => {
|
|
11098
|
+
const _ = [];
|
|
11099
|
+
return serializer(!(json || lossy), !!json, new Map, _)(value), _;
|
|
11100
|
+
};
|
|
11021
11101
|
|
|
11022
|
-
// ../../node_modules/.bun
|
|
11023
|
-
function
|
|
11024
|
-
const subtype = node2.referenceType;
|
|
11025
|
-
let suffix = "]";
|
|
11026
|
-
if (subtype === "collapsed") {
|
|
11027
|
-
suffix += "[]";
|
|
11028
|
-
} else if (subtype === "full") {
|
|
11029
|
-
suffix += "[" + (node2.label || node2.identifier) + "]";
|
|
11030
|
-
}
|
|
11031
|
-
if (node2.type === "imageReference") {
|
|
11032
|
-
return [{ type: "text", value: "![" + node2.alt + suffix }];
|
|
11033
|
-
}
|
|
11034
|
-
const contents = state.all(node2);
|
|
11035
|
-
const head = contents[0];
|
|
11036
|
-
if (head && head.type === "text") {
|
|
11037
|
-
head.value = "[" + head.value;
|
|
11038
|
-
} else {
|
|
11039
|
-
contents.unshift({ type: "text", value: "[" });
|
|
11040
|
-
}
|
|
11041
|
-
const tail = contents[contents.length - 1];
|
|
11042
|
-
if (tail && tail.type === "text") {
|
|
11043
|
-
tail.value += suffix;
|
|
11044
|
-
} else {
|
|
11045
|
-
contents.push({ type: "text", value: suffix });
|
|
11046
|
-
}
|
|
11047
|
-
return contents;
|
|
11048
|
-
}
|
|
11102
|
+
// ../../node_modules/.bun/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.js
|
|
11103
|
+
var esm_default = typeof structuredClone === "function" ? (any, options) => options && (("json" in options) || ("lossy" in options)) ? deserialize(serialize2(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize2(any, options));
|
|
11049
11104
|
|
|
11050
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/
|
|
11051
|
-
function
|
|
11052
|
-
const
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11105
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/footer.js
|
|
11106
|
+
function defaultFootnoteBackContent(_, rereferenceIndex) {
|
|
11107
|
+
const result = [{ type: "text", value: "↩" }];
|
|
11108
|
+
if (rereferenceIndex > 1) {
|
|
11109
|
+
result.push({
|
|
11110
|
+
type: "element",
|
|
11111
|
+
tagName: "sup",
|
|
11112
|
+
properties: {},
|
|
11113
|
+
children: [{ type: "text", value: String(rereferenceIndex) }]
|
|
11114
|
+
});
|
|
11060
11115
|
}
|
|
11061
|
-
|
|
11062
|
-
state.patch(node2, result);
|
|
11063
|
-
return state.applyData(node2, result);
|
|
11116
|
+
return result;
|
|
11064
11117
|
}
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
function image2(state, node2) {
|
|
11068
|
-
const properties = { src: normalizeUri(node2.url) };
|
|
11069
|
-
if (node2.alt !== null && node2.alt !== undefined) {
|
|
11070
|
-
properties.alt = node2.alt;
|
|
11071
|
-
}
|
|
11072
|
-
if (node2.title !== null && node2.title !== undefined) {
|
|
11073
|
-
properties.title = node2.title;
|
|
11074
|
-
}
|
|
11075
|
-
const result = { type: "element", tagName: "img", properties, children: [] };
|
|
11076
|
-
state.patch(node2, result);
|
|
11077
|
-
return state.applyData(node2, result);
|
|
11118
|
+
function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
|
|
11119
|
+
return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : "");
|
|
11078
11120
|
}
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
const
|
|
11083
|
-
state.
|
|
11084
|
-
const
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
properties: {},
|
|
11088
|
-
children: [text5]
|
|
11121
|
+
function footer(state) {
|
|
11122
|
+
const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
|
|
11123
|
+
const footnoteBackContent = state.options.footnoteBackContent || defaultFootnoteBackContent;
|
|
11124
|
+
const footnoteBackLabel = state.options.footnoteBackLabel || defaultFootnoteBackLabel;
|
|
11125
|
+
const footnoteLabel = state.options.footnoteLabel || "Footnotes";
|
|
11126
|
+
const footnoteLabelTagName = state.options.footnoteLabelTagName || "h2";
|
|
11127
|
+
const footnoteLabelProperties = state.options.footnoteLabelProperties || {
|
|
11128
|
+
className: ["sr-only"]
|
|
11089
11129
|
};
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11130
|
+
const listItems = [];
|
|
11131
|
+
let referenceIndex = -1;
|
|
11132
|
+
while (++referenceIndex < state.footnoteOrder.length) {
|
|
11133
|
+
const definition3 = state.footnoteById.get(state.footnoteOrder[referenceIndex]);
|
|
11134
|
+
if (!definition3) {
|
|
11135
|
+
continue;
|
|
11136
|
+
}
|
|
11137
|
+
const content3 = state.all(definition3);
|
|
11138
|
+
const id = String(definition3.identifier).toUpperCase();
|
|
11139
|
+
const safeId = normalizeUri(id.toLowerCase());
|
|
11140
|
+
let rereferenceIndex = 0;
|
|
11141
|
+
const backReferences = [];
|
|
11142
|
+
const counts = state.footnoteCounts.get(id);
|
|
11143
|
+
while (counts !== undefined && ++rereferenceIndex <= counts) {
|
|
11144
|
+
if (backReferences.length > 0) {
|
|
11145
|
+
backReferences.push({ type: "text", value: " " });
|
|
11146
|
+
}
|
|
11147
|
+
let children = typeof footnoteBackContent === "string" ? footnoteBackContent : footnoteBackContent(referenceIndex, rereferenceIndex);
|
|
11148
|
+
if (typeof children === "string") {
|
|
11149
|
+
children = { type: "text", value: children };
|
|
11150
|
+
}
|
|
11151
|
+
backReferences.push({
|
|
11152
|
+
type: "element",
|
|
11153
|
+
tagName: "a",
|
|
11154
|
+
properties: {
|
|
11155
|
+
href: "#" + clobberPrefix + "fnref-" + safeId + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""),
|
|
11156
|
+
dataFootnoteBackref: "",
|
|
11157
|
+
ariaLabel: typeof footnoteBackLabel === "string" ? footnoteBackLabel : footnoteBackLabel(referenceIndex, rereferenceIndex),
|
|
11158
|
+
className: ["data-footnote-backref"]
|
|
11159
|
+
},
|
|
11160
|
+
children: Array.isArray(children) ? children : [children]
|
|
11161
|
+
});
|
|
11162
|
+
}
|
|
11163
|
+
const tail = content3[content3.length - 1];
|
|
11164
|
+
if (tail && tail.type === "element" && tail.tagName === "p") {
|
|
11165
|
+
const tailTail = tail.children[tail.children.length - 1];
|
|
11166
|
+
if (tailTail && tailTail.type === "text") {
|
|
11167
|
+
tailTail.value += " ";
|
|
11168
|
+
} else {
|
|
11169
|
+
tail.children.push({ type: "text", value: " " });
|
|
11170
|
+
}
|
|
11171
|
+
tail.children.push(...backReferences);
|
|
11172
|
+
} else {
|
|
11173
|
+
content3.push(...backReferences);
|
|
11174
|
+
}
|
|
11175
|
+
const listItem2 = {
|
|
11176
|
+
type: "element",
|
|
11177
|
+
tagName: "li",
|
|
11178
|
+
properties: { id: clobberPrefix + "fn-" + safeId },
|
|
11179
|
+
children: state.wrap(content3, true)
|
|
11180
|
+
};
|
|
11181
|
+
state.patch(definition3, listItem2);
|
|
11182
|
+
listItems.push(listItem2);
|
|
11100
11183
|
}
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
properties.title = definition3.title;
|
|
11184
|
+
if (listItems.length === 0) {
|
|
11185
|
+
return;
|
|
11104
11186
|
}
|
|
11105
|
-
|
|
11187
|
+
return {
|
|
11106
11188
|
type: "element",
|
|
11107
|
-
tagName: "
|
|
11108
|
-
properties,
|
|
11109
|
-
children:
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list-item.js
|
|
11132
|
-
function listItem2(state, node2, parent) {
|
|
11133
|
-
const results = state.all(node2);
|
|
11134
|
-
const loose = parent ? listLoose(parent) : listItemLoose(node2);
|
|
11135
|
-
const properties = {};
|
|
11136
|
-
const children = [];
|
|
11137
|
-
if (typeof node2.checked === "boolean") {
|
|
11138
|
-
const head = results[0];
|
|
11139
|
-
let paragraph2;
|
|
11140
|
-
if (head && head.type === "element" && head.tagName === "p") {
|
|
11141
|
-
paragraph2 = head;
|
|
11142
|
-
} else {
|
|
11143
|
-
paragraph2 = { type: "element", tagName: "p", properties: {}, children: [] };
|
|
11144
|
-
results.unshift(paragraph2);
|
|
11145
|
-
}
|
|
11146
|
-
if (paragraph2.children.length > 0) {
|
|
11147
|
-
paragraph2.children.unshift({ type: "text", value: " " });
|
|
11148
|
-
}
|
|
11149
|
-
paragraph2.children.unshift({
|
|
11150
|
-
type: "element",
|
|
11151
|
-
tagName: "input",
|
|
11152
|
-
properties: { type: "checkbox", checked: node2.checked, disabled: true },
|
|
11153
|
-
children: []
|
|
11154
|
-
});
|
|
11155
|
-
properties.className = ["task-list-item"];
|
|
11156
|
-
}
|
|
11157
|
-
let index2 = -1;
|
|
11158
|
-
while (++index2 < results.length) {
|
|
11159
|
-
const child = results[index2];
|
|
11160
|
-
if (loose || index2 !== 0 || child.type !== "element" || child.tagName !== "p") {
|
|
11161
|
-
children.push({ type: "text", value: `
|
|
11162
|
-
` });
|
|
11163
|
-
}
|
|
11164
|
-
if (child.type === "element" && child.tagName === "p" && !loose) {
|
|
11165
|
-
children.push(...child.children);
|
|
11166
|
-
} else {
|
|
11167
|
-
children.push(child);
|
|
11168
|
-
}
|
|
11169
|
-
}
|
|
11170
|
-
const tail = results[results.length - 1];
|
|
11171
|
-
if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) {
|
|
11172
|
-
children.push({ type: "text", value: `
|
|
11173
|
-
` });
|
|
11174
|
-
}
|
|
11175
|
-
const result = { type: "element", tagName: "li", properties, children };
|
|
11176
|
-
state.patch(node2, result);
|
|
11177
|
-
return state.applyData(node2, result);
|
|
11178
|
-
}
|
|
11179
|
-
function listLoose(node2) {
|
|
11180
|
-
let loose = false;
|
|
11181
|
-
if (node2.type === "list") {
|
|
11182
|
-
loose = node2.spread || false;
|
|
11183
|
-
const children = node2.children;
|
|
11184
|
-
let index2 = -1;
|
|
11185
|
-
while (!loose && ++index2 < children.length) {
|
|
11186
|
-
loose = listItemLoose(children[index2]);
|
|
11187
|
-
}
|
|
11188
|
-
}
|
|
11189
|
-
return loose;
|
|
11190
|
-
}
|
|
11191
|
-
function listItemLoose(node2) {
|
|
11192
|
-
const spread = node2.spread;
|
|
11193
|
-
return spread === null || spread === undefined ? node2.children.length > 1 : spread;
|
|
11194
|
-
}
|
|
11195
|
-
|
|
11196
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list.js
|
|
11197
|
-
function list3(state, node2) {
|
|
11198
|
-
const properties = {};
|
|
11199
|
-
const results = state.all(node2);
|
|
11200
|
-
let index2 = -1;
|
|
11201
|
-
if (typeof node2.start === "number" && node2.start !== 1) {
|
|
11202
|
-
properties.start = node2.start;
|
|
11203
|
-
}
|
|
11204
|
-
while (++index2 < results.length) {
|
|
11205
|
-
const child = results[index2];
|
|
11206
|
-
if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
|
|
11207
|
-
properties.className = ["contains-task-list"];
|
|
11208
|
-
break;
|
|
11209
|
-
}
|
|
11210
|
-
}
|
|
11211
|
-
const result = {
|
|
11212
|
-
type: "element",
|
|
11213
|
-
tagName: node2.ordered ? "ol" : "ul",
|
|
11214
|
-
properties,
|
|
11215
|
-
children: state.wrap(results, true)
|
|
11216
|
-
};
|
|
11217
|
-
state.patch(node2, result);
|
|
11218
|
-
return state.applyData(node2, result);
|
|
11219
|
-
}
|
|
11220
|
-
|
|
11221
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
|
|
11222
|
-
function paragraph2(state, node2) {
|
|
11223
|
-
const result = {
|
|
11224
|
-
type: "element",
|
|
11225
|
-
tagName: "p",
|
|
11226
|
-
properties: {},
|
|
11227
|
-
children: state.all(node2)
|
|
11228
|
-
};
|
|
11229
|
-
state.patch(node2, result);
|
|
11230
|
-
return state.applyData(node2, result);
|
|
11231
|
-
}
|
|
11232
|
-
|
|
11233
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/root.js
|
|
11234
|
-
function root2(state, node2) {
|
|
11235
|
-
const result = { type: "root", children: state.wrap(state.all(node2)) };
|
|
11236
|
-
state.patch(node2, result);
|
|
11237
|
-
return state.applyData(node2, result);
|
|
11238
|
-
}
|
|
11239
|
-
|
|
11240
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/strong.js
|
|
11241
|
-
function strong2(state, node2) {
|
|
11242
|
-
const result = {
|
|
11243
|
-
type: "element",
|
|
11244
|
-
tagName: "strong",
|
|
11245
|
-
properties: {},
|
|
11246
|
-
children: state.all(node2)
|
|
11189
|
+
tagName: "section",
|
|
11190
|
+
properties: { dataFootnotes: true, className: ["footnotes"] },
|
|
11191
|
+
children: [
|
|
11192
|
+
{
|
|
11193
|
+
type: "element",
|
|
11194
|
+
tagName: footnoteLabelTagName,
|
|
11195
|
+
properties: {
|
|
11196
|
+
...esm_default(footnoteLabelProperties),
|
|
11197
|
+
id: "footnote-label"
|
|
11198
|
+
},
|
|
11199
|
+
children: [{ type: "text", value: footnoteLabel }]
|
|
11200
|
+
},
|
|
11201
|
+
{ type: "text", value: `
|
|
11202
|
+
` },
|
|
11203
|
+
{
|
|
11204
|
+
type: "element",
|
|
11205
|
+
tagName: "ol",
|
|
11206
|
+
properties: {},
|
|
11207
|
+
children: state.wrap(listItems, true)
|
|
11208
|
+
},
|
|
11209
|
+
{ type: "text", value: `
|
|
11210
|
+
` }
|
|
11211
|
+
]
|
|
11247
11212
|
};
|
|
11248
|
-
state.patch(node2, result);
|
|
11249
|
-
return state.applyData(node2, result);
|
|
11250
11213
|
}
|
|
11251
11214
|
|
|
11252
11215
|
// ../../node_modules/.bun/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js
|
|
@@ -11272,83 +11235,56 @@ function position2(node2) {
|
|
|
11272
11235
|
return { start, end };
|
|
11273
11236
|
}
|
|
11274
11237
|
}
|
|
11275
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11276
|
-
function
|
|
11277
|
-
const rows = state.all(node2);
|
|
11278
|
-
const firstRow = rows.shift();
|
|
11279
|
-
const tableContent = [];
|
|
11280
|
-
if (firstRow) {
|
|
11281
|
-
const head = {
|
|
11282
|
-
type: "element",
|
|
11283
|
-
tagName: "thead",
|
|
11284
|
-
properties: {},
|
|
11285
|
-
children: state.wrap([firstRow], true)
|
|
11286
|
-
};
|
|
11287
|
-
state.patch(node2.children[0], head);
|
|
11288
|
-
tableContent.push(head);
|
|
11289
|
-
}
|
|
11290
|
-
if (rows.length > 0) {
|
|
11291
|
-
const body = {
|
|
11292
|
-
type: "element",
|
|
11293
|
-
tagName: "tbody",
|
|
11294
|
-
properties: {},
|
|
11295
|
-
children: state.wrap(rows, true)
|
|
11296
|
-
};
|
|
11297
|
-
const start = pointStart(node2.children[1]);
|
|
11298
|
-
const end = pointEnd(node2.children[node2.children.length - 1]);
|
|
11299
|
-
if (start && end)
|
|
11300
|
-
body.position = { start, end };
|
|
11301
|
-
tableContent.push(body);
|
|
11302
|
-
}
|
|
11238
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
|
|
11239
|
+
function blockquote2(state, node2) {
|
|
11303
11240
|
const result = {
|
|
11304
11241
|
type: "element",
|
|
11305
|
-
tagName: "
|
|
11242
|
+
tagName: "blockquote",
|
|
11306
11243
|
properties: {},
|
|
11307
|
-
children: state.wrap(
|
|
11244
|
+
children: state.wrap(state.all(node2), true)
|
|
11308
11245
|
};
|
|
11309
11246
|
state.patch(node2, result);
|
|
11310
11247
|
return state.applyData(node2, result);
|
|
11311
11248
|
}
|
|
11312
11249
|
|
|
11313
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11314
|
-
function
|
|
11315
|
-
const
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
let result2 = { type: "element", tagName, properties, children: [] };
|
|
11330
|
-
if (cell) {
|
|
11331
|
-
result2.children = state.all(cell);
|
|
11332
|
-
state.patch(cell, result2);
|
|
11333
|
-
result2 = state.applyData(cell, result2);
|
|
11334
|
-
}
|
|
11335
|
-
cells.push(result2);
|
|
11250
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/break.js
|
|
11251
|
+
function hardBreak2(state, node2) {
|
|
11252
|
+
const result = { type: "element", tagName: "br", properties: {}, children: [] };
|
|
11253
|
+
state.patch(node2, result);
|
|
11254
|
+
return [state.applyData(node2, result), { type: "text", value: `
|
|
11255
|
+
` }];
|
|
11256
|
+
}
|
|
11257
|
+
|
|
11258
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/code.js
|
|
11259
|
+
function code3(state, node2) {
|
|
11260
|
+
const value = node2.value ? node2.value + `
|
|
11261
|
+
` : "";
|
|
11262
|
+
const properties = {};
|
|
11263
|
+
const language = node2.lang ? node2.lang.split(/\s+/) : [];
|
|
11264
|
+
if (language.length > 0) {
|
|
11265
|
+
properties.className = ["language-" + language[0]];
|
|
11336
11266
|
}
|
|
11337
|
-
|
|
11267
|
+
let result = {
|
|
11338
11268
|
type: "element",
|
|
11339
|
-
tagName: "
|
|
11340
|
-
properties
|
|
11341
|
-
children:
|
|
11269
|
+
tagName: "code",
|
|
11270
|
+
properties,
|
|
11271
|
+
children: [{ type: "text", value }]
|
|
11342
11272
|
};
|
|
11273
|
+
if (node2.meta) {
|
|
11274
|
+
result.data = { meta: node2.meta };
|
|
11275
|
+
}
|
|
11343
11276
|
state.patch(node2, result);
|
|
11344
|
-
|
|
11277
|
+
result = state.applyData(node2, result);
|
|
11278
|
+
result = { type: "element", tagName: "pre", properties: {}, children: [result] };
|
|
11279
|
+
state.patch(node2, result);
|
|
11280
|
+
return result;
|
|
11345
11281
|
}
|
|
11346
11282
|
|
|
11347
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11348
|
-
function
|
|
11283
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/delete.js
|
|
11284
|
+
function strikethrough(state, node2) {
|
|
11349
11285
|
const result = {
|
|
11350
11286
|
type: "element",
|
|
11351
|
-
tagName: "
|
|
11287
|
+
tagName: "del",
|
|
11352
11288
|
properties: {},
|
|
11353
11289
|
children: state.all(node2)
|
|
11354
11290
|
};
|
|
@@ -11356,422 +11292,485 @@ function tableCell(state, node2) {
|
|
|
11356
11292
|
return state.applyData(node2, result);
|
|
11357
11293
|
}
|
|
11358
11294
|
|
|
11359
|
-
// ../../node_modules/.bun/
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11295
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
|
|
11296
|
+
function emphasis2(state, node2) {
|
|
11297
|
+
const result = {
|
|
11298
|
+
type: "element",
|
|
11299
|
+
tagName: "em",
|
|
11300
|
+
properties: {},
|
|
11301
|
+
children: state.all(node2)
|
|
11302
|
+
};
|
|
11303
|
+
state.patch(node2, result);
|
|
11304
|
+
return state.applyData(node2, result);
|
|
11305
|
+
}
|
|
11306
|
+
|
|
11307
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
|
|
11308
|
+
function footnoteReference2(state, node2) {
|
|
11309
|
+
const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
|
|
11310
|
+
const id = String(node2.identifier).toUpperCase();
|
|
11311
|
+
const safeId = normalizeUri(id.toLowerCase());
|
|
11312
|
+
const index2 = state.footnoteOrder.indexOf(id);
|
|
11313
|
+
let counter;
|
|
11314
|
+
let reuseCounter = state.footnoteCounts.get(id);
|
|
11315
|
+
if (reuseCounter === undefined) {
|
|
11316
|
+
reuseCounter = 0;
|
|
11317
|
+
state.footnoteOrder.push(id);
|
|
11318
|
+
counter = state.footnoteOrder.length;
|
|
11319
|
+
} else {
|
|
11320
|
+
counter = index2 + 1;
|
|
11372
11321
|
}
|
|
11373
|
-
|
|
11374
|
-
|
|
11322
|
+
reuseCounter += 1;
|
|
11323
|
+
state.footnoteCounts.set(id, reuseCounter);
|
|
11324
|
+
const link2 = {
|
|
11325
|
+
type: "element",
|
|
11326
|
+
tagName: "a",
|
|
11327
|
+
properties: {
|
|
11328
|
+
href: "#" + clobberPrefix + "fn-" + safeId,
|
|
11329
|
+
id: clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
|
|
11330
|
+
dataFootnoteRef: true,
|
|
11331
|
+
ariaDescribedBy: ["footnote-label"]
|
|
11332
|
+
},
|
|
11333
|
+
children: [{ type: "text", value: String(counter) }]
|
|
11334
|
+
};
|
|
11335
|
+
state.patch(node2, link2);
|
|
11336
|
+
const sup = {
|
|
11337
|
+
type: "element",
|
|
11338
|
+
tagName: "sup",
|
|
11339
|
+
properties: {},
|
|
11340
|
+
children: [link2]
|
|
11341
|
+
};
|
|
11342
|
+
state.patch(node2, sup);
|
|
11343
|
+
return state.applyData(node2, sup);
|
|
11375
11344
|
}
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11345
|
+
|
|
11346
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/heading.js
|
|
11347
|
+
function heading2(state, node2) {
|
|
11348
|
+
const result = {
|
|
11349
|
+
type: "element",
|
|
11350
|
+
tagName: "h" + node2.depth,
|
|
11351
|
+
properties: {},
|
|
11352
|
+
children: state.all(node2)
|
|
11353
|
+
};
|
|
11354
|
+
state.patch(node2, result);
|
|
11355
|
+
return state.applyData(node2, result);
|
|
11356
|
+
}
|
|
11357
|
+
|
|
11358
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/html.js
|
|
11359
|
+
function html2(state, node2) {
|
|
11360
|
+
if (state.options.allowDangerousHtml) {
|
|
11361
|
+
const result = { type: "raw", value: node2.value };
|
|
11362
|
+
state.patch(node2, result);
|
|
11363
|
+
return state.applyData(node2, result);
|
|
11385
11364
|
}
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11365
|
+
return;
|
|
11366
|
+
}
|
|
11367
|
+
|
|
11368
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/revert.js
|
|
11369
|
+
function revert(state, node2) {
|
|
11370
|
+
const subtype = node2.referenceType;
|
|
11371
|
+
let suffix = "]";
|
|
11372
|
+
if (subtype === "collapsed") {
|
|
11373
|
+
suffix += "[]";
|
|
11374
|
+
} else if (subtype === "full") {
|
|
11375
|
+
suffix += "[" + (node2.label || node2.identifier) + "]";
|
|
11392
11376
|
}
|
|
11393
|
-
|
|
11377
|
+
if (node2.type === "imageReference") {
|
|
11378
|
+
return [{ type: "text", value: "![" + node2.alt + suffix }];
|
|
11379
|
+
}
|
|
11380
|
+
const contents = state.all(node2);
|
|
11381
|
+
const head = contents[0];
|
|
11382
|
+
if (head && head.type === "text") {
|
|
11383
|
+
head.value = "[" + head.value;
|
|
11384
|
+
} else {
|
|
11385
|
+
contents.unshift({ type: "text", value: "[" });
|
|
11386
|
+
}
|
|
11387
|
+
const tail = contents[contents.length - 1];
|
|
11388
|
+
if (tail && tail.type === "text") {
|
|
11389
|
+
tail.value += suffix;
|
|
11390
|
+
} else {
|
|
11391
|
+
contents.push({ type: "text", value: suffix });
|
|
11392
|
+
}
|
|
11393
|
+
return contents;
|
|
11394
11394
|
}
|
|
11395
11395
|
|
|
11396
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11397
|
-
function
|
|
11398
|
-
const
|
|
11396
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
|
|
11397
|
+
function imageReference2(state, node2) {
|
|
11398
|
+
const id = String(node2.identifier).toUpperCase();
|
|
11399
|
+
const definition3 = state.definitionById.get(id);
|
|
11400
|
+
if (!definition3) {
|
|
11401
|
+
return revert(state, node2);
|
|
11402
|
+
}
|
|
11403
|
+
const properties = { src: normalizeUri(definition3.url || ""), alt: node2.alt };
|
|
11404
|
+
if (definition3.title !== null && definition3.title !== undefined) {
|
|
11405
|
+
properties.title = definition3.title;
|
|
11406
|
+
}
|
|
11407
|
+
const result = { type: "element", tagName: "img", properties, children: [] };
|
|
11399
11408
|
state.patch(node2, result);
|
|
11400
11409
|
return state.applyData(node2, result);
|
|
11401
11410
|
}
|
|
11402
11411
|
|
|
11403
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11404
|
-
function
|
|
11412
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/image.js
|
|
11413
|
+
function image2(state, node2) {
|
|
11414
|
+
const properties = { src: normalizeUri(node2.url) };
|
|
11415
|
+
if (node2.alt !== null && node2.alt !== undefined) {
|
|
11416
|
+
properties.alt = node2.alt;
|
|
11417
|
+
}
|
|
11418
|
+
if (node2.title !== null && node2.title !== undefined) {
|
|
11419
|
+
properties.title = node2.title;
|
|
11420
|
+
}
|
|
11421
|
+
const result = { type: "element", tagName: "img", properties, children: [] };
|
|
11422
|
+
state.patch(node2, result);
|
|
11423
|
+
return state.applyData(node2, result);
|
|
11424
|
+
}
|
|
11425
|
+
|
|
11426
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
|
|
11427
|
+
function inlineCode2(state, node2) {
|
|
11428
|
+
const text5 = { type: "text", value: node2.value.replace(/\r?\n|\r/g, " ") };
|
|
11429
|
+
state.patch(node2, text5);
|
|
11405
11430
|
const result = {
|
|
11406
11431
|
type: "element",
|
|
11407
|
-
tagName: "
|
|
11432
|
+
tagName: "code",
|
|
11408
11433
|
properties: {},
|
|
11409
|
-
children: []
|
|
11434
|
+
children: [text5]
|
|
11410
11435
|
};
|
|
11411
11436
|
state.patch(node2, result);
|
|
11412
11437
|
return state.applyData(node2, result);
|
|
11413
11438
|
}
|
|
11414
11439
|
|
|
11415
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
strong: strong2,
|
|
11435
|
-
table,
|
|
11436
|
-
tableCell,
|
|
11437
|
-
tableRow,
|
|
11438
|
-
text: text5,
|
|
11439
|
-
thematicBreak: thematicBreak3,
|
|
11440
|
-
toml: ignore,
|
|
11441
|
-
yaml: ignore,
|
|
11442
|
-
definition: ignore,
|
|
11443
|
-
footnoteDefinition: ignore
|
|
11444
|
-
};
|
|
11445
|
-
function ignore() {
|
|
11446
|
-
return;
|
|
11440
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
|
|
11441
|
+
function linkReference2(state, node2) {
|
|
11442
|
+
const id = String(node2.identifier).toUpperCase();
|
|
11443
|
+
const definition3 = state.definitionById.get(id);
|
|
11444
|
+
if (!definition3) {
|
|
11445
|
+
return revert(state, node2);
|
|
11446
|
+
}
|
|
11447
|
+
const properties = { href: normalizeUri(definition3.url || "") };
|
|
11448
|
+
if (definition3.title !== null && definition3.title !== undefined) {
|
|
11449
|
+
properties.title = definition3.title;
|
|
11450
|
+
}
|
|
11451
|
+
const result = {
|
|
11452
|
+
type: "element",
|
|
11453
|
+
tagName: "a",
|
|
11454
|
+
properties,
|
|
11455
|
+
children: state.all(node2)
|
|
11456
|
+
};
|
|
11457
|
+
state.patch(node2, result);
|
|
11458
|
+
return state.applyData(node2, result);
|
|
11447
11459
|
}
|
|
11448
11460
|
|
|
11449
|
-
// ../../node_modules/.bun
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
// ../../node_modules/.bun/@ungap+structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
11462
|
-
var env = typeof self === "object" ? self : globalThis;
|
|
11463
|
-
var deserializer = ($, _) => {
|
|
11464
|
-
const as = (out, index2) => {
|
|
11465
|
-
$.set(index2, out);
|
|
11466
|
-
return out;
|
|
11461
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/link.js
|
|
11462
|
+
function link2(state, node2) {
|
|
11463
|
+
const properties = { href: normalizeUri(node2.url) };
|
|
11464
|
+
if (node2.title !== null && node2.title !== undefined) {
|
|
11465
|
+
properties.title = node2.title;
|
|
11466
|
+
}
|
|
11467
|
+
const result = {
|
|
11468
|
+
type: "element",
|
|
11469
|
+
tagName: "a",
|
|
11470
|
+
properties,
|
|
11471
|
+
children: state.all(node2)
|
|
11467
11472
|
};
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
return object;
|
|
11487
|
-
}
|
|
11488
|
-
case DATE:
|
|
11489
|
-
return as(new Date(value), index2);
|
|
11490
|
-
case REGEXP: {
|
|
11491
|
-
const { source, flags } = value;
|
|
11492
|
-
return as(new RegExp(source, flags), index2);
|
|
11493
|
-
}
|
|
11494
|
-
case MAP: {
|
|
11495
|
-
const map3 = as(new Map, index2);
|
|
11496
|
-
for (const [key, index3] of value)
|
|
11497
|
-
map3.set(unpair(key), unpair(index3));
|
|
11498
|
-
return map3;
|
|
11499
|
-
}
|
|
11500
|
-
case SET: {
|
|
11501
|
-
const set = as(new Set, index2);
|
|
11502
|
-
for (const index3 of value)
|
|
11503
|
-
set.add(unpair(index3));
|
|
11504
|
-
return set;
|
|
11505
|
-
}
|
|
11506
|
-
case ERROR: {
|
|
11507
|
-
const { name, message } = value;
|
|
11508
|
-
return as(new env[name](message), index2);
|
|
11509
|
-
}
|
|
11510
|
-
case BIGINT:
|
|
11511
|
-
return as(BigInt(value), index2);
|
|
11512
|
-
case "BigInt":
|
|
11513
|
-
return as(Object(BigInt(value)), index2);
|
|
11514
|
-
case "ArrayBuffer":
|
|
11515
|
-
return as(new Uint8Array(value).buffer, value);
|
|
11516
|
-
case "DataView": {
|
|
11517
|
-
const { buffer } = new Uint8Array(value);
|
|
11518
|
-
return as(new DataView(buffer), value);
|
|
11519
|
-
}
|
|
11473
|
+
state.patch(node2, result);
|
|
11474
|
+
return state.applyData(node2, result);
|
|
11475
|
+
}
|
|
11476
|
+
|
|
11477
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list-item.js
|
|
11478
|
+
function listItem2(state, node2, parent) {
|
|
11479
|
+
const results = state.all(node2);
|
|
11480
|
+
const loose = parent ? listLoose(parent) : listItemLoose(node2);
|
|
11481
|
+
const properties = {};
|
|
11482
|
+
const children = [];
|
|
11483
|
+
if (typeof node2.checked === "boolean") {
|
|
11484
|
+
const head = results[0];
|
|
11485
|
+
let paragraph2;
|
|
11486
|
+
if (head && head.type === "element" && head.tagName === "p") {
|
|
11487
|
+
paragraph2 = head;
|
|
11488
|
+
} else {
|
|
11489
|
+
paragraph2 = { type: "element", tagName: "p", properties: {}, children: [] };
|
|
11490
|
+
results.unshift(paragraph2);
|
|
11520
11491
|
}
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11492
|
+
if (paragraph2.children.length > 0) {
|
|
11493
|
+
paragraph2.children.unshift({ type: "text", value: " " });
|
|
11494
|
+
}
|
|
11495
|
+
paragraph2.children.unshift({
|
|
11496
|
+
type: "element",
|
|
11497
|
+
tagName: "input",
|
|
11498
|
+
properties: { type: "checkbox", checked: node2.checked, disabled: true },
|
|
11499
|
+
children: []
|
|
11500
|
+
});
|
|
11501
|
+
properties.className = ["task-list-item"];
|
|
11502
|
+
}
|
|
11503
|
+
let index2 = -1;
|
|
11504
|
+
while (++index2 < results.length) {
|
|
11505
|
+
const child = results[index2];
|
|
11506
|
+
if (loose || index2 !== 0 || child.type !== "element" || child.tagName !== "p") {
|
|
11507
|
+
children.push({ type: "text", value: `
|
|
11508
|
+
` });
|
|
11509
|
+
}
|
|
11510
|
+
if (child.type === "element" && child.tagName === "p" && !loose) {
|
|
11511
|
+
children.push(...child.children);
|
|
11512
|
+
} else {
|
|
11513
|
+
children.push(child);
|
|
11514
|
+
}
|
|
11515
|
+
}
|
|
11516
|
+
const tail = results[results.length - 1];
|
|
11517
|
+
if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) {
|
|
11518
|
+
children.push({ type: "text", value: `
|
|
11519
|
+
` });
|
|
11520
|
+
}
|
|
11521
|
+
const result = { type: "element", tagName: "li", properties, children };
|
|
11522
|
+
state.patch(node2, result);
|
|
11523
|
+
return state.applyData(node2, result);
|
|
11524
|
+
}
|
|
11525
|
+
function listLoose(node2) {
|
|
11526
|
+
let loose = false;
|
|
11527
|
+
if (node2.type === "list") {
|
|
11528
|
+
loose = node2.spread || false;
|
|
11529
|
+
const children = node2.children;
|
|
11530
|
+
let index2 = -1;
|
|
11531
|
+
while (!loose && ++index2 < children.length) {
|
|
11532
|
+
loose = listItemLoose(children[index2]);
|
|
11533
|
+
}
|
|
11534
|
+
}
|
|
11535
|
+
return loose;
|
|
11536
|
+
}
|
|
11537
|
+
function listItemLoose(node2) {
|
|
11538
|
+
const spread = node2.spread;
|
|
11539
|
+
return spread === null || spread === undefined ? node2.children.length > 1 : spread;
|
|
11540
|
+
}
|
|
11526
11541
|
|
|
11527
|
-
// ../../node_modules/.bun
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
return [PRIMITIVE, type];
|
|
11535
|
-
const asString = toString2.call(value).slice(8, -1);
|
|
11536
|
-
switch (asString) {
|
|
11537
|
-
case "Array":
|
|
11538
|
-
return [ARRAY, EMPTY];
|
|
11539
|
-
case "Object":
|
|
11540
|
-
return [OBJECT, EMPTY];
|
|
11541
|
-
case "Date":
|
|
11542
|
-
return [DATE, EMPTY];
|
|
11543
|
-
case "RegExp":
|
|
11544
|
-
return [REGEXP, EMPTY];
|
|
11545
|
-
case "Map":
|
|
11546
|
-
return [MAP, EMPTY];
|
|
11547
|
-
case "Set":
|
|
11548
|
-
return [SET, EMPTY];
|
|
11549
|
-
case "DataView":
|
|
11550
|
-
return [ARRAY, asString];
|
|
11542
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/list.js
|
|
11543
|
+
function list3(state, node2) {
|
|
11544
|
+
const properties = {};
|
|
11545
|
+
const results = state.all(node2);
|
|
11546
|
+
let index2 = -1;
|
|
11547
|
+
if (typeof node2.start === "number" && node2.start !== 1) {
|
|
11548
|
+
properties.start = node2.start;
|
|
11551
11549
|
}
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
};
|
|
11558
|
-
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
11559
|
-
var serializer = (strict, json, $, _) => {
|
|
11560
|
-
const as = (out, value) => {
|
|
11561
|
-
const index2 = _.push(out) - 1;
|
|
11562
|
-
$.set(value, index2);
|
|
11563
|
-
return index2;
|
|
11564
|
-
};
|
|
11565
|
-
const pair = (value) => {
|
|
11566
|
-
if ($.has(value))
|
|
11567
|
-
return $.get(value);
|
|
11568
|
-
let [TYPE, type] = typeOf(value);
|
|
11569
|
-
switch (TYPE) {
|
|
11570
|
-
case PRIMITIVE: {
|
|
11571
|
-
let entry = value;
|
|
11572
|
-
switch (type) {
|
|
11573
|
-
case "bigint":
|
|
11574
|
-
TYPE = BIGINT;
|
|
11575
|
-
entry = value.toString();
|
|
11576
|
-
break;
|
|
11577
|
-
case "function":
|
|
11578
|
-
case "symbol":
|
|
11579
|
-
if (strict)
|
|
11580
|
-
throw new TypeError("unable to serialize " + type);
|
|
11581
|
-
entry = null;
|
|
11582
|
-
break;
|
|
11583
|
-
case "undefined":
|
|
11584
|
-
return as([VOID], value);
|
|
11585
|
-
}
|
|
11586
|
-
return as([TYPE, entry], value);
|
|
11587
|
-
}
|
|
11588
|
-
case ARRAY: {
|
|
11589
|
-
if (type) {
|
|
11590
|
-
let spread = value;
|
|
11591
|
-
if (type === "DataView") {
|
|
11592
|
-
spread = new Uint8Array(value.buffer);
|
|
11593
|
-
} else if (type === "ArrayBuffer") {
|
|
11594
|
-
spread = new Uint8Array(value);
|
|
11595
|
-
}
|
|
11596
|
-
return as([type, [...spread]], value);
|
|
11597
|
-
}
|
|
11598
|
-
const arr = [];
|
|
11599
|
-
const index2 = as([TYPE, arr], value);
|
|
11600
|
-
for (const entry of value)
|
|
11601
|
-
arr.push(pair(entry));
|
|
11602
|
-
return index2;
|
|
11603
|
-
}
|
|
11604
|
-
case OBJECT: {
|
|
11605
|
-
if (type) {
|
|
11606
|
-
switch (type) {
|
|
11607
|
-
case "BigInt":
|
|
11608
|
-
return as([type, value.toString()], value);
|
|
11609
|
-
case "Boolean":
|
|
11610
|
-
case "Number":
|
|
11611
|
-
case "String":
|
|
11612
|
-
return as([type, value.valueOf()], value);
|
|
11613
|
-
}
|
|
11614
|
-
}
|
|
11615
|
-
if (json && "toJSON" in value)
|
|
11616
|
-
return pair(value.toJSON());
|
|
11617
|
-
const entries = [];
|
|
11618
|
-
const index2 = as([TYPE, entries], value);
|
|
11619
|
-
for (const key of keys(value)) {
|
|
11620
|
-
if (strict || !shouldSkip(typeOf(value[key])))
|
|
11621
|
-
entries.push([pair(key), pair(value[key])]);
|
|
11622
|
-
}
|
|
11623
|
-
return index2;
|
|
11624
|
-
}
|
|
11625
|
-
case DATE:
|
|
11626
|
-
return as([TYPE, value.toISOString()], value);
|
|
11627
|
-
case REGEXP: {
|
|
11628
|
-
const { source, flags } = value;
|
|
11629
|
-
return as([TYPE, { source, flags }], value);
|
|
11630
|
-
}
|
|
11631
|
-
case MAP: {
|
|
11632
|
-
const entries = [];
|
|
11633
|
-
const index2 = as([TYPE, entries], value);
|
|
11634
|
-
for (const [key, entry] of value) {
|
|
11635
|
-
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
11636
|
-
entries.push([pair(key), pair(entry)]);
|
|
11637
|
-
}
|
|
11638
|
-
return index2;
|
|
11639
|
-
}
|
|
11640
|
-
case SET: {
|
|
11641
|
-
const entries = [];
|
|
11642
|
-
const index2 = as([TYPE, entries], value);
|
|
11643
|
-
for (const entry of value) {
|
|
11644
|
-
if (strict || !shouldSkip(typeOf(entry)))
|
|
11645
|
-
entries.push(pair(entry));
|
|
11646
|
-
}
|
|
11647
|
-
return index2;
|
|
11648
|
-
}
|
|
11550
|
+
while (++index2 < results.length) {
|
|
11551
|
+
const child = results[index2];
|
|
11552
|
+
if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
|
|
11553
|
+
properties.className = ["contains-task-list"];
|
|
11554
|
+
break;
|
|
11649
11555
|
}
|
|
11650
|
-
|
|
11651
|
-
|
|
11556
|
+
}
|
|
11557
|
+
const result = {
|
|
11558
|
+
type: "element",
|
|
11559
|
+
tagName: node2.ordered ? "ol" : "ul",
|
|
11560
|
+
properties,
|
|
11561
|
+
children: state.wrap(results, true)
|
|
11652
11562
|
};
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
const _ = [];
|
|
11657
|
-
return serializer(!(json || lossy), !!json, new Map, _)(value), _;
|
|
11658
|
-
};
|
|
11563
|
+
state.patch(node2, result);
|
|
11564
|
+
return state.applyData(node2, result);
|
|
11565
|
+
}
|
|
11659
11566
|
|
|
11660
|
-
// ../../node_modules/.bun
|
|
11661
|
-
|
|
11567
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
|
|
11568
|
+
function paragraph2(state, node2) {
|
|
11569
|
+
const result = {
|
|
11570
|
+
type: "element",
|
|
11571
|
+
tagName: "p",
|
|
11572
|
+
properties: {},
|
|
11573
|
+
children: state.all(node2)
|
|
11574
|
+
};
|
|
11575
|
+
state.patch(node2, result);
|
|
11576
|
+
return state.applyData(node2, result);
|
|
11577
|
+
}
|
|
11662
11578
|
|
|
11663
|
-
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/
|
|
11664
|
-
function
|
|
11665
|
-
const result =
|
|
11666
|
-
|
|
11667
|
-
|
|
11579
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/root.js
|
|
11580
|
+
function root2(state, node2) {
|
|
11581
|
+
const result = { type: "root", children: state.wrap(state.all(node2)) };
|
|
11582
|
+
state.patch(node2, result);
|
|
11583
|
+
return state.applyData(node2, result);
|
|
11584
|
+
}
|
|
11585
|
+
|
|
11586
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/strong.js
|
|
11587
|
+
function strong2(state, node2) {
|
|
11588
|
+
const result = {
|
|
11589
|
+
type: "element",
|
|
11590
|
+
tagName: "strong",
|
|
11591
|
+
properties: {},
|
|
11592
|
+
children: state.all(node2)
|
|
11593
|
+
};
|
|
11594
|
+
state.patch(node2, result);
|
|
11595
|
+
return state.applyData(node2, result);
|
|
11596
|
+
}
|
|
11597
|
+
|
|
11598
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table.js
|
|
11599
|
+
function table(state, node2) {
|
|
11600
|
+
const rows = state.all(node2);
|
|
11601
|
+
const firstRow = rows.shift();
|
|
11602
|
+
const tableContent = [];
|
|
11603
|
+
if (firstRow) {
|
|
11604
|
+
const head = {
|
|
11605
|
+
type: "element",
|
|
11606
|
+
tagName: "thead",
|
|
11607
|
+
properties: {},
|
|
11608
|
+
children: state.wrap([firstRow], true)
|
|
11609
|
+
};
|
|
11610
|
+
state.patch(node2.children[0], head);
|
|
11611
|
+
tableContent.push(head);
|
|
11612
|
+
}
|
|
11613
|
+
if (rows.length > 0) {
|
|
11614
|
+
const body = {
|
|
11668
11615
|
type: "element",
|
|
11669
|
-
tagName: "
|
|
11616
|
+
tagName: "tbody",
|
|
11670
11617
|
properties: {},
|
|
11671
|
-
children:
|
|
11672
|
-
}
|
|
11618
|
+
children: state.wrap(rows, true)
|
|
11619
|
+
};
|
|
11620
|
+
const start = pointStart(node2.children[1]);
|
|
11621
|
+
const end = pointEnd(node2.children[node2.children.length - 1]);
|
|
11622
|
+
if (start && end)
|
|
11623
|
+
body.position = { start, end };
|
|
11624
|
+
tableContent.push(body);
|
|
11673
11625
|
}
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
function footer(state) {
|
|
11680
|
-
const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
|
|
11681
|
-
const footnoteBackContent = state.options.footnoteBackContent || defaultFootnoteBackContent;
|
|
11682
|
-
const footnoteBackLabel = state.options.footnoteBackLabel || defaultFootnoteBackLabel;
|
|
11683
|
-
const footnoteLabel = state.options.footnoteLabel || "Footnotes";
|
|
11684
|
-
const footnoteLabelTagName = state.options.footnoteLabelTagName || "h2";
|
|
11685
|
-
const footnoteLabelProperties = state.options.footnoteLabelProperties || {
|
|
11686
|
-
className: ["sr-only"]
|
|
11626
|
+
const result = {
|
|
11627
|
+
type: "element",
|
|
11628
|
+
tagName: "table",
|
|
11629
|
+
properties: {},
|
|
11630
|
+
children: state.wrap(tableContent, true)
|
|
11687
11631
|
};
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11632
|
+
state.patch(node2, result);
|
|
11633
|
+
return state.applyData(node2, result);
|
|
11634
|
+
}
|
|
11635
|
+
|
|
11636
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table-row.js
|
|
11637
|
+
function tableRow(state, node2, parent) {
|
|
11638
|
+
const siblings = parent ? parent.children : undefined;
|
|
11639
|
+
const rowIndex = siblings ? siblings.indexOf(node2) : 1;
|
|
11640
|
+
const tagName = rowIndex === 0 ? "th" : "td";
|
|
11641
|
+
const align = parent && parent.type === "table" ? parent.align : undefined;
|
|
11642
|
+
const length = align ? align.length : node2.children.length;
|
|
11643
|
+
let cellIndex = -1;
|
|
11644
|
+
const cells = [];
|
|
11645
|
+
while (++cellIndex < length) {
|
|
11646
|
+
const cell = node2.children[cellIndex];
|
|
11647
|
+
const properties = {};
|
|
11648
|
+
const alignValue = align ? align[cellIndex] : undefined;
|
|
11649
|
+
if (alignValue) {
|
|
11650
|
+
properties.align = alignValue;
|
|
11694
11651
|
}
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
const counts = state.footnoteCounts.get(id);
|
|
11701
|
-
while (counts !== undefined && ++rereferenceIndex <= counts) {
|
|
11702
|
-
if (backReferences.length > 0) {
|
|
11703
|
-
backReferences.push({ type: "text", value: " " });
|
|
11704
|
-
}
|
|
11705
|
-
let children = typeof footnoteBackContent === "string" ? footnoteBackContent : footnoteBackContent(referenceIndex, rereferenceIndex);
|
|
11706
|
-
if (typeof children === "string") {
|
|
11707
|
-
children = { type: "text", value: children };
|
|
11708
|
-
}
|
|
11709
|
-
backReferences.push({
|
|
11710
|
-
type: "element",
|
|
11711
|
-
tagName: "a",
|
|
11712
|
-
properties: {
|
|
11713
|
-
href: "#" + clobberPrefix + "fnref-" + safeId + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""),
|
|
11714
|
-
dataFootnoteBackref: "",
|
|
11715
|
-
ariaLabel: typeof footnoteBackLabel === "string" ? footnoteBackLabel : footnoteBackLabel(referenceIndex, rereferenceIndex),
|
|
11716
|
-
className: ["data-footnote-backref"]
|
|
11717
|
-
},
|
|
11718
|
-
children: Array.isArray(children) ? children : [children]
|
|
11719
|
-
});
|
|
11652
|
+
let result2 = { type: "element", tagName, properties, children: [] };
|
|
11653
|
+
if (cell) {
|
|
11654
|
+
result2.children = state.all(cell);
|
|
11655
|
+
state.patch(cell, result2);
|
|
11656
|
+
result2 = state.applyData(cell, result2);
|
|
11720
11657
|
}
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11658
|
+
cells.push(result2);
|
|
11659
|
+
}
|
|
11660
|
+
const result = {
|
|
11661
|
+
type: "element",
|
|
11662
|
+
tagName: "tr",
|
|
11663
|
+
properties: {},
|
|
11664
|
+
children: state.wrap(cells, true)
|
|
11665
|
+
};
|
|
11666
|
+
state.patch(node2, result);
|
|
11667
|
+
return state.applyData(node2, result);
|
|
11668
|
+
}
|
|
11669
|
+
|
|
11670
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
|
|
11671
|
+
function tableCell(state, node2) {
|
|
11672
|
+
const result = {
|
|
11673
|
+
type: "element",
|
|
11674
|
+
tagName: "td",
|
|
11675
|
+
properties: {},
|
|
11676
|
+
children: state.all(node2)
|
|
11677
|
+
};
|
|
11678
|
+
state.patch(node2, result);
|
|
11679
|
+
return state.applyData(node2, result);
|
|
11680
|
+
}
|
|
11681
|
+
|
|
11682
|
+
// ../../node_modules/.bun/trim-lines@3.0.1/node_modules/trim-lines/index.js
|
|
11683
|
+
var tab = 9;
|
|
11684
|
+
var space = 32;
|
|
11685
|
+
function trimLines(value) {
|
|
11686
|
+
const source = String(value);
|
|
11687
|
+
const search2 = /\r?\n|\r/g;
|
|
11688
|
+
let match = search2.exec(source);
|
|
11689
|
+
let last = 0;
|
|
11690
|
+
const lines = [];
|
|
11691
|
+
while (match) {
|
|
11692
|
+
lines.push(trimLine(source.slice(last, match.index), last > 0, true), match[0]);
|
|
11693
|
+
last = match.index + match[0].length;
|
|
11694
|
+
match = search2.exec(source);
|
|
11695
|
+
}
|
|
11696
|
+
lines.push(trimLine(source.slice(last), last > 0, false));
|
|
11697
|
+
return lines.join("");
|
|
11698
|
+
}
|
|
11699
|
+
function trimLine(value, start, end) {
|
|
11700
|
+
let startIndex = 0;
|
|
11701
|
+
let endIndex = value.length;
|
|
11702
|
+
if (start) {
|
|
11703
|
+
let code4 = value.codePointAt(startIndex);
|
|
11704
|
+
while (code4 === tab || code4 === space) {
|
|
11705
|
+
startIndex++;
|
|
11706
|
+
code4 = value.codePointAt(startIndex);
|
|
11732
11707
|
}
|
|
11733
|
-
const listItem3 = {
|
|
11734
|
-
type: "element",
|
|
11735
|
-
tagName: "li",
|
|
11736
|
-
properties: { id: clobberPrefix + "fn-" + safeId },
|
|
11737
|
-
children: state.wrap(content3, true)
|
|
11738
|
-
};
|
|
11739
|
-
state.patch(definition3, listItem3);
|
|
11740
|
-
listItems.push(listItem3);
|
|
11741
11708
|
}
|
|
11742
|
-
if (
|
|
11743
|
-
|
|
11709
|
+
if (end) {
|
|
11710
|
+
let code4 = value.codePointAt(endIndex - 1);
|
|
11711
|
+
while (code4 === tab || code4 === space) {
|
|
11712
|
+
endIndex--;
|
|
11713
|
+
code4 = value.codePointAt(endIndex - 1);
|
|
11714
|
+
}
|
|
11744
11715
|
}
|
|
11745
|
-
return
|
|
11716
|
+
return endIndex > startIndex ? value.slice(startIndex, endIndex) : "";
|
|
11717
|
+
}
|
|
11718
|
+
|
|
11719
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/text.js
|
|
11720
|
+
function text5(state, node2) {
|
|
11721
|
+
const result = { type: "text", value: trimLines(String(node2.value)) };
|
|
11722
|
+
state.patch(node2, result);
|
|
11723
|
+
return state.applyData(node2, result);
|
|
11724
|
+
}
|
|
11725
|
+
|
|
11726
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
|
|
11727
|
+
function thematicBreak3(state, node2) {
|
|
11728
|
+
const result = {
|
|
11746
11729
|
type: "element",
|
|
11747
|
-
tagName: "
|
|
11748
|
-
properties: {
|
|
11749
|
-
children: [
|
|
11750
|
-
{
|
|
11751
|
-
type: "element",
|
|
11752
|
-
tagName: footnoteLabelTagName,
|
|
11753
|
-
properties: {
|
|
11754
|
-
...esm_default(footnoteLabelProperties),
|
|
11755
|
-
id: "footnote-label"
|
|
11756
|
-
},
|
|
11757
|
-
children: [{ type: "text", value: footnoteLabel }]
|
|
11758
|
-
},
|
|
11759
|
-
{ type: "text", value: `
|
|
11760
|
-
` },
|
|
11761
|
-
{
|
|
11762
|
-
type: "element",
|
|
11763
|
-
tagName: "ol",
|
|
11764
|
-
properties: {},
|
|
11765
|
-
children: state.wrap(listItems, true)
|
|
11766
|
-
},
|
|
11767
|
-
{ type: "text", value: `
|
|
11768
|
-
` }
|
|
11769
|
-
]
|
|
11730
|
+
tagName: "hr",
|
|
11731
|
+
properties: {},
|
|
11732
|
+
children: []
|
|
11770
11733
|
};
|
|
11734
|
+
state.patch(node2, result);
|
|
11735
|
+
return state.applyData(node2, result);
|
|
11736
|
+
}
|
|
11737
|
+
|
|
11738
|
+
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/handlers/index.js
|
|
11739
|
+
var handlers = {
|
|
11740
|
+
blockquote: blockquote2,
|
|
11741
|
+
break: hardBreak2,
|
|
11742
|
+
code: code3,
|
|
11743
|
+
delete: strikethrough,
|
|
11744
|
+
emphasis: emphasis2,
|
|
11745
|
+
footnoteReference: footnoteReference2,
|
|
11746
|
+
heading: heading2,
|
|
11747
|
+
html: html2,
|
|
11748
|
+
imageReference: imageReference2,
|
|
11749
|
+
image: image2,
|
|
11750
|
+
inlineCode: inlineCode2,
|
|
11751
|
+
linkReference: linkReference2,
|
|
11752
|
+
link: link2,
|
|
11753
|
+
listItem: listItem2,
|
|
11754
|
+
list: list3,
|
|
11755
|
+
paragraph: paragraph2,
|
|
11756
|
+
root: root2,
|
|
11757
|
+
strong: strong2,
|
|
11758
|
+
table,
|
|
11759
|
+
tableCell,
|
|
11760
|
+
tableRow,
|
|
11761
|
+
text: text5,
|
|
11762
|
+
thematicBreak: thematicBreak3,
|
|
11763
|
+
toml: ignore,
|
|
11764
|
+
yaml: ignore,
|
|
11765
|
+
definition: ignore,
|
|
11766
|
+
footnoteDefinition: ignore
|
|
11767
|
+
};
|
|
11768
|
+
function ignore() {
|
|
11769
|
+
return;
|
|
11771
11770
|
}
|
|
11772
11771
|
|
|
11773
11772
|
// ../../node_modules/.bun/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/lib/state.js
|
|
11774
|
-
var
|
|
11773
|
+
var own3 = {}.hasOwnProperty;
|
|
11775
11774
|
var emptyOptions3 = {};
|
|
11776
11775
|
function createState(tree, options) {
|
|
11777
11776
|
const settings = options || emptyOptions3;
|
|
@@ -11805,7 +11804,7 @@ function createState(tree, options) {
|
|
|
11805
11804
|
function one2(node2, parent) {
|
|
11806
11805
|
const type = node2.type;
|
|
11807
11806
|
const handle2 = state.handlers[type];
|
|
11808
|
-
if (
|
|
11807
|
+
if (own3.call(state.handlers, type) && handle2) {
|
|
11809
11808
|
return handle2(state, node2, parent);
|
|
11810
11809
|
}
|
|
11811
11810
|
if (state.options.passThrough && state.options.passThrough.includes(type)) {
|
|
@@ -11879,7 +11878,7 @@ function applyData(from, to) {
|
|
|
11879
11878
|
}
|
|
11880
11879
|
function defaultUnknownHandler(state, node2) {
|
|
11881
11880
|
const data = node2.data || {};
|
|
11882
|
-
const result = "value" in node2 && !(
|
|
11881
|
+
const result = "value" in node2 && !(own3.call(data, "hProperties") || own3.call(data, "hChildren")) ? { type: "text", value: node2.value } : {
|
|
11883
11882
|
type: "element",
|
|
11884
11883
|
tagName: "div",
|
|
11885
11884
|
properties: {},
|
|
@@ -25995,6 +25994,27 @@ function camelcase($0) {
|
|
|
25995
25994
|
var html4 = merge([aria, html3, xlink, xmlns, xml2], "html");
|
|
25996
25995
|
var svg2 = merge([aria, svg, xlink, xmlns, xml2], "svg");
|
|
25997
25996
|
|
|
25997
|
+
// ../../node_modules/.bun/zwitch@2.0.4/node_modules/zwitch/index.js
|
|
25998
|
+
var own4 = {}.hasOwnProperty;
|
|
25999
|
+
function zwitch(key, options) {
|
|
26000
|
+
const settings = options || {};
|
|
26001
|
+
function one2(value, ...parameters) {
|
|
26002
|
+
let fn = one2.invalid;
|
|
26003
|
+
const handlers3 = one2.handlers;
|
|
26004
|
+
if (value && own4.call(value, key)) {
|
|
26005
|
+
const id = String(value[key]);
|
|
26006
|
+
fn = own4.call(handlers3, id) ? handlers3[id] : one2.unknown;
|
|
26007
|
+
}
|
|
26008
|
+
if (fn) {
|
|
26009
|
+
return fn.call(this, value, ...parameters);
|
|
26010
|
+
}
|
|
26011
|
+
}
|
|
26012
|
+
one2.handlers = settings.handlers || {};
|
|
26013
|
+
one2.invalid = settings.invalid;
|
|
26014
|
+
one2.unknown = settings.unknown;
|
|
26015
|
+
return one2;
|
|
26016
|
+
}
|
|
26017
|
+
|
|
25998
26018
|
// ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
|
|
25999
26019
|
var defaultSubsetRegex = /["&'<>`]/g;
|
|
26000
26020
|
var surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
@@ -26529,10 +26549,10 @@ function siblings(increment2) {
|
|
|
26529
26549
|
|
|
26530
26550
|
// ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
|
|
26531
26551
|
var own6 = {}.hasOwnProperty;
|
|
26532
|
-
function omission(
|
|
26552
|
+
function omission(handlers3) {
|
|
26533
26553
|
return omit;
|
|
26534
26554
|
function omit(node2, index2, parent) {
|
|
26535
|
-
return own6.call(
|
|
26555
|
+
return own6.call(handlers3, node2.tagName) && handlers3[node2.tagName](node2, index2, parent);
|
|
26536
26556
|
}
|
|
26537
26557
|
}
|
|
26538
26558
|
|
|
@@ -27626,5 +27646,5 @@ function register() {
|
|
|
27626
27646
|
}
|
|
27627
27647
|
}
|
|
27628
27648
|
|
|
27629
|
-
//# debugId=
|
|
27649
|
+
//# debugId=11B624C39B29BF5664756E2164756E21
|
|
27630
27650
|
//# sourceMappingURL=index.js.map
|