zt-react-milkdown 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +88 -36
- package/dist/index.mjs +24636 -4871
- package/dist/src/core/createEditor.d.ts +42 -3
- package/dist/src/core/createEditor.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/plugins/custom/block-transform/block-transform.d.ts.map +1 -1
- package/dist/src/plugins/custom/image/image-resizable-schema.d.ts +3 -3
- package/dist/src/plugins/custom/image/image-resizable-schema.d.ts.map +1 -1
- package/dist/src/plugins/custom/slash-menu/slash-menu-commands.d.ts.map +1 -1
- package/dist/src/plugins/custom/slash-menu/slash-menu.d.ts +1 -1
- package/dist/src/plugins/custom/slash-menu/slash-menu.d.ts.map +1 -1
- package/dist/src/react/components/MilkdownEditor.d.ts.map +1 -1
- package/dist/src/react/hooks/useMilkdownEditor.d.ts +1 -3
- package/dist/src/react/hooks/useMilkdownEditor.d.ts.map +1 -1
- package/dist/src/types/editor.d.ts +0 -34
- package/dist/src/types/editor.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/commands-BJpevWrH.js +0 -409
- package/dist/commands-BmZHd6RL.js +0 -2
- package/dist/commands-CM7IuhpT.cjs +0 -2
- package/dist/commands-f4yOm8DQ.cjs +0 -1
- package/dist/debounce-C_TNzOFT.cjs +0 -1
- package/dist/debounce-Z8-khnlZ.js +0 -118
- package/dist/dist-BjfIurm0.js +0 -1584
- package/dist/dist-CLTsQjPD.js +0 -3500
- package/dist/dist-D7LE16E1.cjs +0 -1
- package/dist/dist-DQnWlYyo.cjs +0 -5
- package/dist/floating-ui.dom-B_oXwL6O.cjs +0 -1
- package/dist/floating-ui.dom-Cm9Ov61_.js +0 -883
- package/dist/lib-5lx86j_L.js +0 -21
- package/dist/lib-72N1aRae.js +0 -1884
- package/dist/lib-BIxqp3lX.js +0 -387
- package/dist/lib-BLTQkf4j.cjs +0 -39
- package/dist/lib-BzlEyehQ.cjs +0 -5
- package/dist/lib-C61-3fwS.cjs +0 -1
- package/dist/lib-C82poHMJ.cjs +0 -1
- package/dist/lib-CDhjYvDm.js +0 -74
- package/dist/lib-CHQUpMrL.cjs +0 -3
- package/dist/lib-CYWwNE4c.js +0 -8673
- package/dist/lib-Cixz93sP.js +0 -2222
- package/dist/lib-CqJFV3ME.cjs +0 -1
- package/dist/lib-D7VWCO2M.cjs +0 -4
- package/dist/lib-DaPs62nF.js +0 -28
- package/dist/lib-Dka_BhhQ.cjs +0 -1
- package/dist/lib-DrllUeuK.cjs +0 -1
- package/dist/lib-wpjVX5Vf.js +0 -80
- package/dist/lib-z6CKD87x.js +0 -331
- package/dist/schema-list-CFEw5DQ8.cjs +0 -1
- package/dist/schema-list-CiFfAlj-.js +0 -110
- package/dist/state-BC1dqWPQ.cjs +0 -1
- package/dist/state-BvRk9kiK.cjs +0 -0
- package/dist/state-BvRk9kiK.js +0 -0
- package/dist/state-rTW_1XVf.js +0 -3
package/dist/lib-Cixz93sP.js
DELETED
|
@@ -1,2222 +0,0 @@
|
|
|
1
|
-
import { H as e, J as t, L as n, M as r, P as i, Q as a, R as o, W as s, Z as c, at as l, ct as u, dt as d, et as f, ft as p, it as m, j as h, lt as g, mt as _, nt as v, ot as ee, pt as te, rt as y, s as b, st as x, tt as S, ut as C, vt as w } from "./lib-CYWwNE4c.js";
|
|
2
|
-
import { A as T, a as E, c as ne, i as re, o as ie, w as D } from "./dist-CLTsQjPD.js";
|
|
3
|
-
import { O as ae } from "./commands-BJpevWrH.js";
|
|
4
|
-
import { a as oe, c as O, d as se, i as ce, l as le, p as ue, r as de, t as k, u as A } from "./lib-BIxqp3lX.js";
|
|
5
|
-
import { i as fe, r as pe } from "./lib-72N1aRae.js";
|
|
6
|
-
import { _ as me, c as he, d as ge, f as _e, g as ve, h as ye, i as be, l as xe, m as Se, n as j, p as Ce, r as we, s as Te, t as M, u as Ee, v as De, y as Oe } from "./dist-BjfIurm0.js";
|
|
7
|
-
//#region node_modules/.pnpm/prosemirror-safari-ime-span@1.0.2/node_modules/prosemirror-safari-ime-span/dist/index.js
|
|
8
|
-
var N = typeof navigator < "u" ? navigator : null, ke = N && N.userAgent || "", Ae = /Edge\/(\d+)/.exec(ke), je = /MSIE \d/.exec(ke), Me = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ke), Ne = !(je || Me || Ae) && !!N && /Apple Computer/.test(N.vendor), Pe = new E("safari-ime-span"), Fe = !1, Ie = {
|
|
9
|
-
key: Pe,
|
|
10
|
-
props: {
|
|
11
|
-
decorations: Le,
|
|
12
|
-
handleDOMEvents: {
|
|
13
|
-
compositionstart: () => {
|
|
14
|
-
Fe = !0;
|
|
15
|
-
},
|
|
16
|
-
compositionend: () => {
|
|
17
|
-
Fe = !1;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function Le(e) {
|
|
23
|
-
let { $from: t, $to: n, to: i } = e.selection;
|
|
24
|
-
if (Fe && t.sameParent(n)) {
|
|
25
|
-
let t = h.widget(i, Re, {
|
|
26
|
-
ignoreSelection: !0,
|
|
27
|
-
key: "safari-ime-span"
|
|
28
|
-
});
|
|
29
|
-
return r.create(e.doc, [t]);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function Re(e) {
|
|
33
|
-
let t = e.dom.ownerDocument.createElement("span");
|
|
34
|
-
return t.className = "ProseMirror-safari-ime-span", t;
|
|
35
|
-
}
|
|
36
|
-
var ze = new re(Ne ? Ie : { key: Pe });
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
|
|
39
|
-
function Be(e, t) {
|
|
40
|
-
let n = String(e);
|
|
41
|
-
if (typeof t != "string") throw TypeError("Expected character");
|
|
42
|
-
let r = 0, i = n.indexOf(t);
|
|
43
|
-
for (; i !== -1;) r++, i = n.indexOf(t, i + t.length);
|
|
44
|
-
return r;
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
48
|
-
function Ve(e) {
|
|
49
|
-
if (typeof e != "string") throw TypeError("Expected a string");
|
|
50
|
-
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
|
|
54
|
-
function He(e, t, n) {
|
|
55
|
-
let r = a((n || {}).ignore || []), i = Ue(t), o = -1;
|
|
56
|
-
for (; ++o < i.length;) c(e, "text", s);
|
|
57
|
-
function s(e, t) {
|
|
58
|
-
let n = -1, i;
|
|
59
|
-
for (; ++n < t.length;) {
|
|
60
|
-
let e = t[n], a = i ? i.children : void 0;
|
|
61
|
-
if (r(e, a ? a.indexOf(e) : void 0, i)) return;
|
|
62
|
-
i = e;
|
|
63
|
-
}
|
|
64
|
-
if (i) return l(e, t);
|
|
65
|
-
}
|
|
66
|
-
function l(e, t) {
|
|
67
|
-
let n = t[t.length - 1], r = i[o][0], a = i[o][1], s = 0, c = n.children.indexOf(e), l = !1, u = [];
|
|
68
|
-
r.lastIndex = 0;
|
|
69
|
-
let d = r.exec(e.value);
|
|
70
|
-
for (; d;) {
|
|
71
|
-
let n = d.index, i = {
|
|
72
|
-
index: d.index,
|
|
73
|
-
input: d.input,
|
|
74
|
-
stack: [...t, e]
|
|
75
|
-
}, o = a(...d, i);
|
|
76
|
-
if (typeof o == "string" && (o = o.length > 0 ? {
|
|
77
|
-
type: "text",
|
|
78
|
-
value: o
|
|
79
|
-
} : void 0), o === !1 ? r.lastIndex = n + 1 : (s !== n && u.push({
|
|
80
|
-
type: "text",
|
|
81
|
-
value: e.value.slice(s, n)
|
|
82
|
-
}), Array.isArray(o) ? u.push(...o) : o && u.push(o), s = n + d[0].length, l = !0), !r.global) break;
|
|
83
|
-
d = r.exec(e.value);
|
|
84
|
-
}
|
|
85
|
-
return l ? (s < e.value.length && u.push({
|
|
86
|
-
type: "text",
|
|
87
|
-
value: e.value.slice(s)
|
|
88
|
-
}), n.children.splice(c, 1, ...u)) : u = [e], c + u.length;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function Ue(e) {
|
|
92
|
-
let t = [];
|
|
93
|
-
if (!Array.isArray(e)) throw TypeError("Expected find and replace tuple or list of tuples");
|
|
94
|
-
let n = !e[0] || Array.isArray(e[0]) ? e : [e], r = -1;
|
|
95
|
-
for (; ++r < n.length;) {
|
|
96
|
-
let e = n[r];
|
|
97
|
-
t.push([We(e[0]), Ge(e[1])]);
|
|
98
|
-
}
|
|
99
|
-
return t;
|
|
100
|
-
}
|
|
101
|
-
function We(e) {
|
|
102
|
-
return typeof e == "string" ? new RegExp(Ve(e), "g") : e;
|
|
103
|
-
}
|
|
104
|
-
function Ge(e) {
|
|
105
|
-
return typeof e == "function" ? e : function() {
|
|
106
|
-
return e;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
111
|
-
var Ke = "phrasing", qe = [
|
|
112
|
-
"autolink",
|
|
113
|
-
"link",
|
|
114
|
-
"image",
|
|
115
|
-
"label"
|
|
116
|
-
];
|
|
117
|
-
function Je() {
|
|
118
|
-
return {
|
|
119
|
-
transforms: [nt],
|
|
120
|
-
enter: {
|
|
121
|
-
literalAutolink: Xe,
|
|
122
|
-
literalAutolinkEmail: Ze,
|
|
123
|
-
literalAutolinkHttp: Ze,
|
|
124
|
-
literalAutolinkWww: Ze
|
|
125
|
-
},
|
|
126
|
-
exit: {
|
|
127
|
-
literalAutolink: tt,
|
|
128
|
-
literalAutolinkEmail: et,
|
|
129
|
-
literalAutolinkHttp: Qe,
|
|
130
|
-
literalAutolinkWww: $e
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function Ye() {
|
|
135
|
-
return { unsafe: [
|
|
136
|
-
{
|
|
137
|
-
character: "@",
|
|
138
|
-
before: "[+\\-.\\w]",
|
|
139
|
-
after: "[\\-.\\w]",
|
|
140
|
-
inConstruct: Ke,
|
|
141
|
-
notInConstruct: qe
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
character: ".",
|
|
145
|
-
before: "[Ww]",
|
|
146
|
-
after: "[\\-.\\w]",
|
|
147
|
-
inConstruct: Ke,
|
|
148
|
-
notInConstruct: qe
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
character: ":",
|
|
152
|
-
before: "[ps]",
|
|
153
|
-
after: "\\/",
|
|
154
|
-
inConstruct: Ke,
|
|
155
|
-
notInConstruct: qe
|
|
156
|
-
}
|
|
157
|
-
] };
|
|
158
|
-
}
|
|
159
|
-
function Xe(e) {
|
|
160
|
-
this.enter({
|
|
161
|
-
type: "link",
|
|
162
|
-
title: null,
|
|
163
|
-
url: "",
|
|
164
|
-
children: []
|
|
165
|
-
}, e);
|
|
166
|
-
}
|
|
167
|
-
function Ze(e) {
|
|
168
|
-
this.config.enter.autolinkProtocol.call(this, e);
|
|
169
|
-
}
|
|
170
|
-
function Qe(e) {
|
|
171
|
-
this.config.exit.autolinkProtocol.call(this, e);
|
|
172
|
-
}
|
|
173
|
-
function $e(e) {
|
|
174
|
-
this.config.exit.data.call(this, e);
|
|
175
|
-
let t = this.stack[this.stack.length - 1];
|
|
176
|
-
t.type, t.url = "http://" + this.sliceSerialize(e);
|
|
177
|
-
}
|
|
178
|
-
function et(e) {
|
|
179
|
-
this.config.exit.autolinkEmail.call(this, e);
|
|
180
|
-
}
|
|
181
|
-
function tt(e) {
|
|
182
|
-
this.exit(e);
|
|
183
|
-
}
|
|
184
|
-
function nt(e) {
|
|
185
|
-
He(e, [[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, rt], [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, it]], { ignore: ["link", "linkReference"] });
|
|
186
|
-
}
|
|
187
|
-
function rt(e, t, n, r, i) {
|
|
188
|
-
let a = "";
|
|
189
|
-
if (!st(i) || (/^w/i.test(t) && (n = t + n, t = "", a = "http://"), !at(n))) return !1;
|
|
190
|
-
let o = ot(n + r);
|
|
191
|
-
if (!o[0]) return !1;
|
|
192
|
-
let s = {
|
|
193
|
-
type: "link",
|
|
194
|
-
title: null,
|
|
195
|
-
url: a + t + o[0],
|
|
196
|
-
children: [{
|
|
197
|
-
type: "text",
|
|
198
|
-
value: t + o[0]
|
|
199
|
-
}]
|
|
200
|
-
};
|
|
201
|
-
return o[1] ? [s, {
|
|
202
|
-
type: "text",
|
|
203
|
-
value: o[1]
|
|
204
|
-
}] : s;
|
|
205
|
-
}
|
|
206
|
-
function it(e, t, n, r) {
|
|
207
|
-
return !st(r, !0) || /[-\d_]$/.test(n) ? !1 : {
|
|
208
|
-
type: "link",
|
|
209
|
-
title: null,
|
|
210
|
-
url: "mailto:" + t + "@" + n,
|
|
211
|
-
children: [{
|
|
212
|
-
type: "text",
|
|
213
|
-
value: t + "@" + n
|
|
214
|
-
}]
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
function at(e) {
|
|
218
|
-
let t = e.split(".");
|
|
219
|
-
return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
|
|
220
|
-
}
|
|
221
|
-
function ot(e) {
|
|
222
|
-
let t = /[!"&'),.:;<>?\]}]+$/.exec(e);
|
|
223
|
-
if (!t) return [e, void 0];
|
|
224
|
-
e = e.slice(0, t.index);
|
|
225
|
-
let n = t[0], r = n.indexOf(")"), i = Be(e, "("), a = Be(e, ")");
|
|
226
|
-
for (; r !== -1 && i > a;) e += n.slice(0, r + 1), n = n.slice(r + 1), r = n.indexOf(")"), a++;
|
|
227
|
-
return [e, n];
|
|
228
|
-
}
|
|
229
|
-
function st(e, t) {
|
|
230
|
-
let n = e.input.charCodeAt(e.index - 1);
|
|
231
|
-
return (e.index === 0 || d(n) || C(n)) && (!t || n !== 47);
|
|
232
|
-
}
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
235
|
-
_t.peek = gt;
|
|
236
|
-
function ct() {
|
|
237
|
-
this.buffer();
|
|
238
|
-
}
|
|
239
|
-
function lt(e) {
|
|
240
|
-
this.enter({
|
|
241
|
-
type: "footnoteReference",
|
|
242
|
-
identifier: "",
|
|
243
|
-
label: ""
|
|
244
|
-
}, e);
|
|
245
|
-
}
|
|
246
|
-
function ut() {
|
|
247
|
-
this.buffer();
|
|
248
|
-
}
|
|
249
|
-
function dt(e) {
|
|
250
|
-
this.enter({
|
|
251
|
-
type: "footnoteDefinition",
|
|
252
|
-
identifier: "",
|
|
253
|
-
label: "",
|
|
254
|
-
children: []
|
|
255
|
-
}, e);
|
|
256
|
-
}
|
|
257
|
-
function ft(e) {
|
|
258
|
-
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
259
|
-
n.type, n.identifier = p(this.sliceSerialize(e)).toLowerCase(), n.label = t;
|
|
260
|
-
}
|
|
261
|
-
function pt(e) {
|
|
262
|
-
this.exit(e);
|
|
263
|
-
}
|
|
264
|
-
function mt(e) {
|
|
265
|
-
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
266
|
-
n.type, n.identifier = p(this.sliceSerialize(e)).toLowerCase(), n.label = t;
|
|
267
|
-
}
|
|
268
|
-
function ht(e) {
|
|
269
|
-
this.exit(e);
|
|
270
|
-
}
|
|
271
|
-
function gt() {
|
|
272
|
-
return "[";
|
|
273
|
-
}
|
|
274
|
-
function _t(e, t, n, r) {
|
|
275
|
-
let i = n.createTracker(r), a = i.move("[^"), o = n.enter("footnoteReference"), s = n.enter("reference");
|
|
276
|
-
return a += i.move(n.safe(n.associationId(e), {
|
|
277
|
-
after: "]",
|
|
278
|
-
before: a
|
|
279
|
-
})), s(), o(), a += i.move("]"), a;
|
|
280
|
-
}
|
|
281
|
-
function vt() {
|
|
282
|
-
return {
|
|
283
|
-
enter: {
|
|
284
|
-
gfmFootnoteCallString: ct,
|
|
285
|
-
gfmFootnoteCall: lt,
|
|
286
|
-
gfmFootnoteDefinitionLabelString: ut,
|
|
287
|
-
gfmFootnoteDefinition: dt
|
|
288
|
-
},
|
|
289
|
-
exit: {
|
|
290
|
-
gfmFootnoteCallString: ft,
|
|
291
|
-
gfmFootnoteCall: pt,
|
|
292
|
-
gfmFootnoteDefinitionLabelString: mt,
|
|
293
|
-
gfmFootnoteDefinition: ht
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
function yt(e) {
|
|
298
|
-
let t = !1;
|
|
299
|
-
return e && e.firstLineBlank && (t = !0), {
|
|
300
|
-
handlers: {
|
|
301
|
-
footnoteDefinition: n,
|
|
302
|
-
footnoteReference: _t
|
|
303
|
-
},
|
|
304
|
-
unsafe: [{
|
|
305
|
-
character: "[",
|
|
306
|
-
inConstruct: [
|
|
307
|
-
"label",
|
|
308
|
-
"phrasing",
|
|
309
|
-
"reference"
|
|
310
|
-
]
|
|
311
|
-
}]
|
|
312
|
-
};
|
|
313
|
-
function n(e, n, r, i) {
|
|
314
|
-
let a = r.createTracker(i), o = a.move("[^"), s = r.enter("footnoteDefinition"), c = r.enter("label");
|
|
315
|
-
return o += a.move(r.safe(r.associationId(e), {
|
|
316
|
-
before: o,
|
|
317
|
-
after: "]"
|
|
318
|
-
})), c(), o += a.move("]:"), e.children && e.children.length > 0 && (a.shift(4), o += a.move((t ? "\n" : " ") + r.indentLines(r.containerFlow(e, a.current()), t ? xt : bt))), s(), o;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
function bt(e, t, n) {
|
|
322
|
-
return t === 0 ? e : xt(e, t, n);
|
|
323
|
-
}
|
|
324
|
-
function xt(e, t, n) {
|
|
325
|
-
return (n ? "" : " ") + e;
|
|
326
|
-
}
|
|
327
|
-
//#endregion
|
|
328
|
-
//#region node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
329
|
-
var St = [
|
|
330
|
-
"autolink",
|
|
331
|
-
"destinationLiteral",
|
|
332
|
-
"destinationRaw",
|
|
333
|
-
"reference",
|
|
334
|
-
"titleQuote",
|
|
335
|
-
"titleApostrophe"
|
|
336
|
-
];
|
|
337
|
-
Dt.peek = Ot;
|
|
338
|
-
function Ct() {
|
|
339
|
-
return {
|
|
340
|
-
canContainEols: ["delete"],
|
|
341
|
-
enter: { strikethrough: Tt },
|
|
342
|
-
exit: { strikethrough: Et }
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
function wt() {
|
|
346
|
-
return {
|
|
347
|
-
unsafe: [{
|
|
348
|
-
character: "~",
|
|
349
|
-
inConstruct: "phrasing",
|
|
350
|
-
notInConstruct: St
|
|
351
|
-
}],
|
|
352
|
-
handlers: { delete: Dt }
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
function Tt(e) {
|
|
356
|
-
this.enter({
|
|
357
|
-
type: "delete",
|
|
358
|
-
children: []
|
|
359
|
-
}, e);
|
|
360
|
-
}
|
|
361
|
-
function Et(e) {
|
|
362
|
-
this.exit(e);
|
|
363
|
-
}
|
|
364
|
-
function Dt(e, t, n, r) {
|
|
365
|
-
let i = n.createTracker(r), a = n.enter("strikethrough"), o = i.move("~~");
|
|
366
|
-
return o += n.containerPhrasing(e, {
|
|
367
|
-
...i.current(),
|
|
368
|
-
before: o,
|
|
369
|
-
after: "~"
|
|
370
|
-
}), o += i.move("~~"), a(), o;
|
|
371
|
-
}
|
|
372
|
-
function Ot() {
|
|
373
|
-
return "~";
|
|
374
|
-
}
|
|
375
|
-
//#endregion
|
|
376
|
-
//#region node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
|
|
377
|
-
function kt(e) {
|
|
378
|
-
return e.length;
|
|
379
|
-
}
|
|
380
|
-
function At(e, t) {
|
|
381
|
-
let n = t || {}, r = (n.align || []).concat(), i = n.stringLength || kt, a = [], o = [], s = [], c = [], l = 0, u = -1;
|
|
382
|
-
for (; ++u < e.length;) {
|
|
383
|
-
let t = [], r = [], a = -1;
|
|
384
|
-
for (e[u].length > l && (l = e[u].length); ++a < e[u].length;) {
|
|
385
|
-
let o = jt(e[u][a]);
|
|
386
|
-
if (n.alignDelimiters !== !1) {
|
|
387
|
-
let e = i(o);
|
|
388
|
-
r[a] = e, (c[a] === void 0 || e > c[a]) && (c[a] = e);
|
|
389
|
-
}
|
|
390
|
-
t.push(o);
|
|
391
|
-
}
|
|
392
|
-
o[u] = t, s[u] = r;
|
|
393
|
-
}
|
|
394
|
-
let d = -1;
|
|
395
|
-
if (typeof r == "object" && "length" in r) for (; ++d < l;) a[d] = Mt(r[d]);
|
|
396
|
-
else {
|
|
397
|
-
let e = Mt(r);
|
|
398
|
-
for (; ++d < l;) a[d] = e;
|
|
399
|
-
}
|
|
400
|
-
d = -1;
|
|
401
|
-
let f = [], p = [];
|
|
402
|
-
for (; ++d < l;) {
|
|
403
|
-
let e = a[d], t = "", r = "";
|
|
404
|
-
e === 99 ? (t = ":", r = ":") : e === 108 ? t = ":" : e === 114 && (r = ":");
|
|
405
|
-
let i = n.alignDelimiters === !1 ? 1 : Math.max(1, c[d] - t.length - r.length), o = t + "-".repeat(i) + r;
|
|
406
|
-
n.alignDelimiters !== !1 && (i = t.length + i + r.length, i > c[d] && (c[d] = i), p[d] = i), f[d] = o;
|
|
407
|
-
}
|
|
408
|
-
o.splice(1, 0, f), s.splice(1, 0, p), u = -1;
|
|
409
|
-
let m = [];
|
|
410
|
-
for (; ++u < o.length;) {
|
|
411
|
-
let e = o[u], t = s[u];
|
|
412
|
-
d = -1;
|
|
413
|
-
let r = [];
|
|
414
|
-
for (; ++d < l;) {
|
|
415
|
-
let i = e[d] || "", o = "", s = "";
|
|
416
|
-
if (n.alignDelimiters !== !1) {
|
|
417
|
-
let e = c[d] - (t[d] || 0), n = a[d];
|
|
418
|
-
n === 114 ? o = " ".repeat(e) : n === 99 ? e % 2 ? (o = " ".repeat(e / 2 + .5), s = " ".repeat(e / 2 - .5)) : (o = " ".repeat(e / 2), s = o) : s = " ".repeat(e);
|
|
419
|
-
}
|
|
420
|
-
n.delimiterStart !== !1 && !d && r.push("|"), n.padding !== !1 && !(n.alignDelimiters === !1 && i === "") && (n.delimiterStart !== !1 || d) && r.push(" "), n.alignDelimiters !== !1 && r.push(o), r.push(i), n.alignDelimiters !== !1 && r.push(s), n.padding !== !1 && r.push(" "), (n.delimiterEnd !== !1 || d !== l - 1) && r.push("|");
|
|
421
|
-
}
|
|
422
|
-
m.push(n.delimiterEnd === !1 ? r.join("").replace(/ +$/, "") : r.join(""));
|
|
423
|
-
}
|
|
424
|
-
return m.join("\n");
|
|
425
|
-
}
|
|
426
|
-
function jt(e) {
|
|
427
|
-
return e == null ? "" : String(e);
|
|
428
|
-
}
|
|
429
|
-
function Mt(e) {
|
|
430
|
-
let t = typeof e == "string" ? e.codePointAt(0) : 0;
|
|
431
|
-
return t === 67 || t === 99 ? 99 : t === 76 || t === 108 ? 108 : t === 82 || t === 114 ? 114 : 0;
|
|
432
|
-
}
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
|
|
435
|
-
function Nt() {
|
|
436
|
-
return {
|
|
437
|
-
enter: {
|
|
438
|
-
table: Pt,
|
|
439
|
-
tableData: Rt,
|
|
440
|
-
tableHeader: Rt,
|
|
441
|
-
tableRow: It
|
|
442
|
-
},
|
|
443
|
-
exit: {
|
|
444
|
-
codeText: zt,
|
|
445
|
-
table: Ft,
|
|
446
|
-
tableData: Lt,
|
|
447
|
-
tableHeader: Lt,
|
|
448
|
-
tableRow: Lt
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
function Pt(e) {
|
|
453
|
-
let t = e._align;
|
|
454
|
-
this.enter({
|
|
455
|
-
type: "table",
|
|
456
|
-
align: t.map(function(e) {
|
|
457
|
-
return e === "none" ? null : e;
|
|
458
|
-
}),
|
|
459
|
-
children: []
|
|
460
|
-
}, e), this.data.inTable = !0;
|
|
461
|
-
}
|
|
462
|
-
function Ft(e) {
|
|
463
|
-
this.exit(e), this.data.inTable = void 0;
|
|
464
|
-
}
|
|
465
|
-
function It(e) {
|
|
466
|
-
this.enter({
|
|
467
|
-
type: "tableRow",
|
|
468
|
-
children: []
|
|
469
|
-
}, e);
|
|
470
|
-
}
|
|
471
|
-
function Lt(e) {
|
|
472
|
-
this.exit(e);
|
|
473
|
-
}
|
|
474
|
-
function Rt(e) {
|
|
475
|
-
this.enter({
|
|
476
|
-
type: "tableCell",
|
|
477
|
-
children: []
|
|
478
|
-
}, e);
|
|
479
|
-
}
|
|
480
|
-
function zt(e) {
|
|
481
|
-
let t = this.resume();
|
|
482
|
-
this.data.inTable && (t = t.replace(/\\([\\|])/g, Bt));
|
|
483
|
-
let n = this.stack[this.stack.length - 1];
|
|
484
|
-
n.type, n.value = t, this.exit(e);
|
|
485
|
-
}
|
|
486
|
-
function Bt(e, t) {
|
|
487
|
-
return t === "|" ? t : e;
|
|
488
|
-
}
|
|
489
|
-
function Vt(e) {
|
|
490
|
-
let n = e || {}, r = n.tableCellPadding, i = n.tablePipeAlign, a = n.stringLength, o = r ? " " : "|";
|
|
491
|
-
return {
|
|
492
|
-
unsafe: [
|
|
493
|
-
{
|
|
494
|
-
character: "\r",
|
|
495
|
-
inConstruct: "tableCell"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
character: "\n",
|
|
499
|
-
inConstruct: "tableCell"
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
atBreak: !0,
|
|
503
|
-
character: "|",
|
|
504
|
-
after: "[ :-]"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
character: "|",
|
|
508
|
-
inConstruct: "tableCell"
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
atBreak: !0,
|
|
512
|
-
character: ":",
|
|
513
|
-
after: "-"
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
atBreak: !0,
|
|
517
|
-
character: "-",
|
|
518
|
-
after: "[:|-]"
|
|
519
|
-
}
|
|
520
|
-
],
|
|
521
|
-
handlers: {
|
|
522
|
-
inlineCode: p,
|
|
523
|
-
table: s,
|
|
524
|
-
tableCell: l,
|
|
525
|
-
tableRow: c
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
|
-
function s(e, t, n, r) {
|
|
529
|
-
return u(d(e, n, r), e.align);
|
|
530
|
-
}
|
|
531
|
-
function c(e, t, n, r) {
|
|
532
|
-
let i = u([f(e, n, r)]);
|
|
533
|
-
return i.slice(0, i.indexOf("\n"));
|
|
534
|
-
}
|
|
535
|
-
function l(e, t, n, r) {
|
|
536
|
-
let i = n.enter("tableCell"), a = n.enter("phrasing"), s = n.containerPhrasing(e, {
|
|
537
|
-
...r,
|
|
538
|
-
before: o,
|
|
539
|
-
after: o
|
|
540
|
-
});
|
|
541
|
-
return a(), i(), s;
|
|
542
|
-
}
|
|
543
|
-
function u(e, t) {
|
|
544
|
-
return At(e, {
|
|
545
|
-
align: t,
|
|
546
|
-
alignDelimiters: i,
|
|
547
|
-
padding: r,
|
|
548
|
-
stringLength: a
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
function d(e, t, n) {
|
|
552
|
-
let r = e.children, i = -1, a = [], o = t.enter("table");
|
|
553
|
-
for (; ++i < r.length;) a[i] = f(r[i], t, n);
|
|
554
|
-
return o(), a;
|
|
555
|
-
}
|
|
556
|
-
function f(e, t, n) {
|
|
557
|
-
let r = e.children, i = -1, a = [], o = t.enter("tableRow");
|
|
558
|
-
for (; ++i < r.length;) a[i] = l(r[i], e, t, n);
|
|
559
|
-
return o(), a;
|
|
560
|
-
}
|
|
561
|
-
function p(e, n, r) {
|
|
562
|
-
let i = t.inlineCode(e, n, r);
|
|
563
|
-
return r.stack.includes("tableCell") && (i = i.replace(/\|/g, "\\$&")), i;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
568
|
-
function Ht() {
|
|
569
|
-
return { exit: {
|
|
570
|
-
taskListCheckValueChecked: Wt,
|
|
571
|
-
taskListCheckValueUnchecked: Wt,
|
|
572
|
-
paragraph: Gt
|
|
573
|
-
} };
|
|
574
|
-
}
|
|
575
|
-
function Ut() {
|
|
576
|
-
return {
|
|
577
|
-
unsafe: [{
|
|
578
|
-
atBreak: !0,
|
|
579
|
-
character: "-",
|
|
580
|
-
after: "[:|-]"
|
|
581
|
-
}],
|
|
582
|
-
handlers: { listItem: Kt }
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
function Wt(e) {
|
|
586
|
-
let t = this.stack[this.stack.length - 2];
|
|
587
|
-
t.type, t.checked = e.type === "taskListCheckValueChecked";
|
|
588
|
-
}
|
|
589
|
-
function Gt(e) {
|
|
590
|
-
let t = this.stack[this.stack.length - 2];
|
|
591
|
-
if (t && t.type === "listItem" && typeof t.checked == "boolean") {
|
|
592
|
-
let e = this.stack[this.stack.length - 1];
|
|
593
|
-
e.type;
|
|
594
|
-
let n = e.children[0];
|
|
595
|
-
if (n && n.type === "text") {
|
|
596
|
-
let r = t.children, i = -1, a;
|
|
597
|
-
for (; ++i < r.length;) {
|
|
598
|
-
let e = r[i];
|
|
599
|
-
if (e.type === "paragraph") {
|
|
600
|
-
a = e;
|
|
601
|
-
break;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
a === e && (n.value = n.value.slice(1), n.value.length === 0 ? e.children.shift() : e.position && n.position && typeof n.position.start.offset == "number" && (n.position.start.column++, n.position.start.offset++, e.position.start = Object.assign({}, n.position.start)));
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
this.exit(e);
|
|
608
|
-
}
|
|
609
|
-
function Kt(e, n, r, i) {
|
|
610
|
-
let a = e.children[0], o = typeof e.checked == "boolean" && a && a.type === "paragraph", s = "[" + (e.checked ? "x" : " ") + "] ", c = r.createTracker(i);
|
|
611
|
-
o && c.move(s);
|
|
612
|
-
let l = t.listItem(e, n, r, {
|
|
613
|
-
...i,
|
|
614
|
-
...c.current()
|
|
615
|
-
});
|
|
616
|
-
return o && (l = l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, u)), l;
|
|
617
|
-
function u(e) {
|
|
618
|
-
return e + s;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
//#endregion
|
|
622
|
-
//#region node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
|
|
623
|
-
function qt() {
|
|
624
|
-
return [
|
|
625
|
-
Je(),
|
|
626
|
-
vt(),
|
|
627
|
-
Ct(),
|
|
628
|
-
Nt(),
|
|
629
|
-
Ht()
|
|
630
|
-
];
|
|
631
|
-
}
|
|
632
|
-
function Jt(e) {
|
|
633
|
-
return { extensions: [
|
|
634
|
-
Ye(),
|
|
635
|
-
yt(e),
|
|
636
|
-
wt(),
|
|
637
|
-
Vt(e),
|
|
638
|
-
Ut()
|
|
639
|
-
] };
|
|
640
|
-
}
|
|
641
|
-
//#endregion
|
|
642
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
|
|
643
|
-
var Yt = {
|
|
644
|
-
tokenize: sn,
|
|
645
|
-
partial: !0
|
|
646
|
-
}, Xt = {
|
|
647
|
-
tokenize: cn,
|
|
648
|
-
partial: !0
|
|
649
|
-
}, Zt = {
|
|
650
|
-
tokenize: ln,
|
|
651
|
-
partial: !0
|
|
652
|
-
}, Qt = {
|
|
653
|
-
tokenize: un,
|
|
654
|
-
partial: !0
|
|
655
|
-
}, $t = {
|
|
656
|
-
tokenize: dn,
|
|
657
|
-
partial: !0
|
|
658
|
-
}, en = {
|
|
659
|
-
name: "wwwAutolink",
|
|
660
|
-
tokenize: an,
|
|
661
|
-
previous: fn
|
|
662
|
-
}, tn = {
|
|
663
|
-
name: "protocolAutolink",
|
|
664
|
-
tokenize: on,
|
|
665
|
-
previous: pn
|
|
666
|
-
}, P = {
|
|
667
|
-
name: "emailAutolink",
|
|
668
|
-
tokenize: rn,
|
|
669
|
-
previous: mn
|
|
670
|
-
}, F = {};
|
|
671
|
-
function nn() {
|
|
672
|
-
return { text: F };
|
|
673
|
-
}
|
|
674
|
-
for (var I = 48; I < 123;) F[I] = P, I++, I === 58 ? I = 65 : I === 91 && (I = 97);
|
|
675
|
-
F[43] = P, F[45] = P, F[46] = P, F[95] = P, F[72] = [P, tn], F[104] = [P, tn], F[87] = [P, en], F[119] = [P, en];
|
|
676
|
-
function rn(e, t, n) {
|
|
677
|
-
let r = this, i, a;
|
|
678
|
-
return o;
|
|
679
|
-
function o(t) {
|
|
680
|
-
return !hn(t) || !mn.call(r, r.previous) || gn(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), s(t));
|
|
681
|
-
}
|
|
682
|
-
function s(t) {
|
|
683
|
-
return hn(t) ? (e.consume(t), s) : t === 64 ? (e.consume(t), c) : n(t);
|
|
684
|
-
}
|
|
685
|
-
function c(t) {
|
|
686
|
-
return t === 46 ? e.check($t, d, u)(t) : t === 45 || t === 95 || l(t) ? (a = !0, e.consume(t), c) : d(t);
|
|
687
|
-
}
|
|
688
|
-
function u(t) {
|
|
689
|
-
return e.consume(t), i = !0, c;
|
|
690
|
-
}
|
|
691
|
-
function d(o) {
|
|
692
|
-
return a && i && m(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(o)) : n(o);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
function an(e, t, n) {
|
|
696
|
-
let r = this;
|
|
697
|
-
return i;
|
|
698
|
-
function i(t) {
|
|
699
|
-
return t !== 87 && t !== 119 || !fn.call(r, r.previous) || gn(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(Yt, e.attempt(Xt, e.attempt(Zt, a), n), n)(t));
|
|
700
|
-
}
|
|
701
|
-
function a(n) {
|
|
702
|
-
return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(n);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
function on(e, t, n) {
|
|
706
|
-
let r = this, i = "", a = !1;
|
|
707
|
-
return o;
|
|
708
|
-
function o(t) {
|
|
709
|
-
return (t === 72 || t === 104) && pn.call(r, r.previous) && !gn(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), i += String.fromCodePoint(t), e.consume(t), s) : n(t);
|
|
710
|
-
}
|
|
711
|
-
function s(t) {
|
|
712
|
-
if (m(t) && i.length < 5) return i += String.fromCodePoint(t), e.consume(t), s;
|
|
713
|
-
if (t === 58) {
|
|
714
|
-
let n = i.toLowerCase();
|
|
715
|
-
if (n === "http" || n === "https") return e.consume(t), c;
|
|
716
|
-
}
|
|
717
|
-
return n(t);
|
|
718
|
-
}
|
|
719
|
-
function c(t) {
|
|
720
|
-
return t === 47 ? (e.consume(t), a ? l : (a = !0, c)) : n(t);
|
|
721
|
-
}
|
|
722
|
-
function l(t) {
|
|
723
|
-
return t === null || ee(t) || u(t) || d(t) || C(t) ? n(t) : e.attempt(Xt, e.attempt(Zt, f), n)(t);
|
|
724
|
-
}
|
|
725
|
-
function f(n) {
|
|
726
|
-
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(n);
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
function sn(e, t, n) {
|
|
730
|
-
let r = 0;
|
|
731
|
-
return i;
|
|
732
|
-
function i(t) {
|
|
733
|
-
return (t === 87 || t === 119) && r < 3 ? (r++, e.consume(t), i) : t === 46 && r === 3 ? (e.consume(t), a) : n(t);
|
|
734
|
-
}
|
|
735
|
-
function a(e) {
|
|
736
|
-
return e === null ? n(e) : t(e);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
function cn(e, t, n) {
|
|
740
|
-
let r, i, a;
|
|
741
|
-
return o;
|
|
742
|
-
function o(t) {
|
|
743
|
-
return t === 46 || t === 95 ? e.check(Qt, c, s)(t) : t === null || u(t) || d(t) || t !== 45 && C(t) ? c(t) : (a = !0, e.consume(t), o);
|
|
744
|
-
}
|
|
745
|
-
function s(t) {
|
|
746
|
-
return t === 95 ? r = !0 : (i = r, r = void 0), e.consume(t), o;
|
|
747
|
-
}
|
|
748
|
-
function c(e) {
|
|
749
|
-
return i || r || !a ? n(e) : t(e);
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
function ln(e, t) {
|
|
753
|
-
let n = 0, r = 0;
|
|
754
|
-
return i;
|
|
755
|
-
function i(o) {
|
|
756
|
-
return o === 40 ? (n++, e.consume(o), i) : o === 41 && r < n ? a(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(Qt, t, a)(o) : o === null || u(o) || d(o) ? t(o) : (e.consume(o), i);
|
|
757
|
-
}
|
|
758
|
-
function a(t) {
|
|
759
|
-
return t === 41 && r++, e.consume(t), i;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
function un(e, t, n) {
|
|
763
|
-
return r;
|
|
764
|
-
function r(o) {
|
|
765
|
-
return o === 33 || o === 34 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 63 || o === 95 || o === 126 ? (e.consume(o), r) : o === 38 ? (e.consume(o), a) : o === 93 ? (e.consume(o), i) : o === 60 || o === null || u(o) || d(o) ? t(o) : n(o);
|
|
766
|
-
}
|
|
767
|
-
function i(e) {
|
|
768
|
-
return e === null || e === 40 || e === 91 || u(e) || d(e) ? t(e) : r(e);
|
|
769
|
-
}
|
|
770
|
-
function a(e) {
|
|
771
|
-
return m(e) ? o(e) : n(e);
|
|
772
|
-
}
|
|
773
|
-
function o(t) {
|
|
774
|
-
return t === 59 ? (e.consume(t), r) : m(t) ? (e.consume(t), o) : n(t);
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
function dn(e, t, n) {
|
|
778
|
-
return r;
|
|
779
|
-
function r(t) {
|
|
780
|
-
return e.consume(t), i;
|
|
781
|
-
}
|
|
782
|
-
function i(e) {
|
|
783
|
-
return l(e) ? n(e) : t(e);
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
function fn(e) {
|
|
787
|
-
return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || u(e);
|
|
788
|
-
}
|
|
789
|
-
function pn(e) {
|
|
790
|
-
return !m(e);
|
|
791
|
-
}
|
|
792
|
-
function mn(e) {
|
|
793
|
-
return !(e === 47 || hn(e));
|
|
794
|
-
}
|
|
795
|
-
function hn(e) {
|
|
796
|
-
return e === 43 || e === 45 || e === 46 || e === 95 || l(e);
|
|
797
|
-
}
|
|
798
|
-
function gn(e) {
|
|
799
|
-
let t = e.length, n = !1;
|
|
800
|
-
for (; t--;) {
|
|
801
|
-
let r = e[t][1];
|
|
802
|
-
if ((r.type === "labelLink" || r.type === "labelImage") && !r._balanced) {
|
|
803
|
-
n = !0;
|
|
804
|
-
break;
|
|
805
|
-
}
|
|
806
|
-
if (r._gfmAutolinkLiteralWalkedInto) {
|
|
807
|
-
n = !1;
|
|
808
|
-
break;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
return e.length > 0 && !n && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), n;
|
|
812
|
-
}
|
|
813
|
-
//#endregion
|
|
814
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.js
|
|
815
|
-
var _n = {
|
|
816
|
-
tokenize: Tn,
|
|
817
|
-
partial: !0
|
|
818
|
-
};
|
|
819
|
-
function vn() {
|
|
820
|
-
return {
|
|
821
|
-
document: { 91: {
|
|
822
|
-
name: "gfmFootnoteDefinition",
|
|
823
|
-
tokenize: Sn,
|
|
824
|
-
continuation: { tokenize: Cn },
|
|
825
|
-
exit: wn
|
|
826
|
-
} },
|
|
827
|
-
text: {
|
|
828
|
-
91: {
|
|
829
|
-
name: "gfmFootnoteCall",
|
|
830
|
-
tokenize: xn
|
|
831
|
-
},
|
|
832
|
-
93: {
|
|
833
|
-
name: "gfmPotentialFootnoteCall",
|
|
834
|
-
add: "after",
|
|
835
|
-
tokenize: yn,
|
|
836
|
-
resolveTo: bn
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
function yn(e, t, n) {
|
|
842
|
-
let r = this, i = r.events.length, a = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), o;
|
|
843
|
-
for (; i--;) {
|
|
844
|
-
let e = r.events[i][1];
|
|
845
|
-
if (e.type === "labelImage") {
|
|
846
|
-
o = e;
|
|
847
|
-
break;
|
|
848
|
-
}
|
|
849
|
-
if (e.type === "gfmFootnoteCall" || e.type === "labelLink" || e.type === "label" || e.type === "image" || e.type === "link") break;
|
|
850
|
-
}
|
|
851
|
-
return s;
|
|
852
|
-
function s(i) {
|
|
853
|
-
if (!o || !o._balanced) return n(i);
|
|
854
|
-
let s = p(r.sliceSerialize({
|
|
855
|
-
start: o.end,
|
|
856
|
-
end: r.now()
|
|
857
|
-
}));
|
|
858
|
-
return s.codePointAt(0) !== 94 || !a.includes(s.slice(1)) ? n(i) : (e.enter("gfmFootnoteCallLabelMarker"), e.consume(i), e.exit("gfmFootnoteCallLabelMarker"), t(i));
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
function bn(e, t) {
|
|
862
|
-
let n = e.length;
|
|
863
|
-
for (; n--;) if (e[n][1].type === "labelImage" && e[n][0] === "enter") {
|
|
864
|
-
e[n][1];
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
867
|
-
e[n + 1][1].type = "data", e[n + 3][1].type = "gfmFootnoteCallLabelMarker";
|
|
868
|
-
let r = {
|
|
869
|
-
type: "gfmFootnoteCall",
|
|
870
|
-
start: Object.assign({}, e[n + 3][1].start),
|
|
871
|
-
end: Object.assign({}, e[e.length - 1][1].end)
|
|
872
|
-
}, i = {
|
|
873
|
-
type: "gfmFootnoteCallMarker",
|
|
874
|
-
start: Object.assign({}, e[n + 3][1].end),
|
|
875
|
-
end: Object.assign({}, e[n + 3][1].end)
|
|
876
|
-
};
|
|
877
|
-
i.end.column++, i.end.offset++, i.end._bufferIndex++;
|
|
878
|
-
let a = {
|
|
879
|
-
type: "gfmFootnoteCallString",
|
|
880
|
-
start: Object.assign({}, i.end),
|
|
881
|
-
end: Object.assign({}, e[e.length - 1][1].start)
|
|
882
|
-
}, o = {
|
|
883
|
-
type: "chunkString",
|
|
884
|
-
contentType: "string",
|
|
885
|
-
start: Object.assign({}, a.start),
|
|
886
|
-
end: Object.assign({}, a.end)
|
|
887
|
-
}, s = [
|
|
888
|
-
e[n + 1],
|
|
889
|
-
e[n + 2],
|
|
890
|
-
[
|
|
891
|
-
"enter",
|
|
892
|
-
r,
|
|
893
|
-
t
|
|
894
|
-
],
|
|
895
|
-
e[n + 3],
|
|
896
|
-
e[n + 4],
|
|
897
|
-
[
|
|
898
|
-
"enter",
|
|
899
|
-
i,
|
|
900
|
-
t
|
|
901
|
-
],
|
|
902
|
-
[
|
|
903
|
-
"exit",
|
|
904
|
-
i,
|
|
905
|
-
t
|
|
906
|
-
],
|
|
907
|
-
[
|
|
908
|
-
"enter",
|
|
909
|
-
a,
|
|
910
|
-
t
|
|
911
|
-
],
|
|
912
|
-
[
|
|
913
|
-
"enter",
|
|
914
|
-
o,
|
|
915
|
-
t
|
|
916
|
-
],
|
|
917
|
-
[
|
|
918
|
-
"exit",
|
|
919
|
-
o,
|
|
920
|
-
t
|
|
921
|
-
],
|
|
922
|
-
[
|
|
923
|
-
"exit",
|
|
924
|
-
a,
|
|
925
|
-
t
|
|
926
|
-
],
|
|
927
|
-
e[e.length - 2],
|
|
928
|
-
e[e.length - 1],
|
|
929
|
-
[
|
|
930
|
-
"exit",
|
|
931
|
-
r,
|
|
932
|
-
t
|
|
933
|
-
]
|
|
934
|
-
];
|
|
935
|
-
return e.splice(n, e.length - n + 1, ...s), e;
|
|
936
|
-
}
|
|
937
|
-
function xn(e, t, n) {
|
|
938
|
-
let r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), a = 0, o;
|
|
939
|
-
return s;
|
|
940
|
-
function s(t) {
|
|
941
|
-
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(t), e.exit("gfmFootnoteCallLabelMarker"), c;
|
|
942
|
-
}
|
|
943
|
-
function c(t) {
|
|
944
|
-
return t === 94 ? (e.enter("gfmFootnoteCallMarker"), e.consume(t), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", l) : n(t);
|
|
945
|
-
}
|
|
946
|
-
function l(s) {
|
|
947
|
-
if (a > 999 || s === 93 && !o || s === null || s === 91 || u(s)) return n(s);
|
|
948
|
-
if (s === 93) {
|
|
949
|
-
e.exit("chunkString");
|
|
950
|
-
let a = e.exit("gfmFootnoteCallString");
|
|
951
|
-
return i.includes(p(r.sliceSerialize(a))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(s), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(s);
|
|
952
|
-
}
|
|
953
|
-
return u(s) || (o = !0), a++, e.consume(s), s === 92 ? d : l;
|
|
954
|
-
}
|
|
955
|
-
function d(t) {
|
|
956
|
-
return t === 91 || t === 92 || t === 93 ? (e.consume(t), a++, l) : l(t);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
function Sn(e, t, n) {
|
|
960
|
-
let r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), a, o = 0, s;
|
|
961
|
-
return c;
|
|
962
|
-
function c(t) {
|
|
963
|
-
return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), l;
|
|
964
|
-
}
|
|
965
|
-
function l(t) {
|
|
966
|
-
return t === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", d) : n(t);
|
|
967
|
-
}
|
|
968
|
-
function d(t) {
|
|
969
|
-
if (o > 999 || t === 93 && !s || t === null || t === 91 || u(t)) return n(t);
|
|
970
|
-
if (t === 93) {
|
|
971
|
-
e.exit("chunkString");
|
|
972
|
-
let n = e.exit("gfmFootnoteDefinitionLabelString");
|
|
973
|
-
return a = p(r.sliceSerialize(n)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), m;
|
|
974
|
-
}
|
|
975
|
-
return u(t) || (s = !0), o++, e.consume(t), t === 92 ? f : d;
|
|
976
|
-
}
|
|
977
|
-
function f(t) {
|
|
978
|
-
return t === 91 || t === 92 || t === 93 ? (e.consume(t), o++, d) : d(t);
|
|
979
|
-
}
|
|
980
|
-
function m(t) {
|
|
981
|
-
return t === 58 ? (e.enter("definitionMarker"), e.consume(t), e.exit("definitionMarker"), i.includes(a) || i.push(a), y(e, h, "gfmFootnoteDefinitionWhitespace")) : n(t);
|
|
982
|
-
}
|
|
983
|
-
function h(e) {
|
|
984
|
-
return t(e);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
function Cn(e, t, n) {
|
|
988
|
-
return e.check(f, t, e.attempt(_n, t, n));
|
|
989
|
-
}
|
|
990
|
-
function wn(e) {
|
|
991
|
-
e.exit("gfmFootnoteDefinition");
|
|
992
|
-
}
|
|
993
|
-
function Tn(e, t, n) {
|
|
994
|
-
let r = this;
|
|
995
|
-
return y(e, i, "gfmFootnoteDefinitionIndent", 5);
|
|
996
|
-
function i(e) {
|
|
997
|
-
let i = r.events[r.events.length - 1];
|
|
998
|
-
return i && i[1].type === "gfmFootnoteDefinitionIndent" && i[2].sliceSerialize(i[1], !0).length === 4 ? t(e) : n(e);
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
//#endregion
|
|
1002
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
1003
|
-
function En(e) {
|
|
1004
|
-
let t = (e || {}).singleTilde, n = {
|
|
1005
|
-
name: "strikethrough",
|
|
1006
|
-
tokenize: i,
|
|
1007
|
-
resolveAll: r
|
|
1008
|
-
};
|
|
1009
|
-
return t ??= !0, {
|
|
1010
|
-
text: { 126: n },
|
|
1011
|
-
insideSpan: { null: [n] },
|
|
1012
|
-
attentionMarkers: { null: [126] }
|
|
1013
|
-
};
|
|
1014
|
-
function r(e, t) {
|
|
1015
|
-
let n = -1;
|
|
1016
|
-
for (; ++n < e.length;) if (e[n][0] === "enter" && e[n][1].type === "strikethroughSequenceTemporary" && e[n][1]._close) {
|
|
1017
|
-
let r = n;
|
|
1018
|
-
for (; r--;) if (e[r][0] === "exit" && e[r][1].type === "strikethroughSequenceTemporary" && e[r][1]._open && e[n][1].end.offset - e[n][1].start.offset === e[r][1].end.offset - e[r][1].start.offset) {
|
|
1019
|
-
e[n][1].type = "strikethroughSequence", e[r][1].type = "strikethroughSequence";
|
|
1020
|
-
let i = {
|
|
1021
|
-
type: "strikethrough",
|
|
1022
|
-
start: Object.assign({}, e[r][1].start),
|
|
1023
|
-
end: Object.assign({}, e[n][1].end)
|
|
1024
|
-
}, a = {
|
|
1025
|
-
type: "strikethroughText",
|
|
1026
|
-
start: Object.assign({}, e[r][1].end),
|
|
1027
|
-
end: Object.assign({}, e[n][1].start)
|
|
1028
|
-
}, o = [
|
|
1029
|
-
[
|
|
1030
|
-
"enter",
|
|
1031
|
-
i,
|
|
1032
|
-
t
|
|
1033
|
-
],
|
|
1034
|
-
[
|
|
1035
|
-
"enter",
|
|
1036
|
-
e[r][1],
|
|
1037
|
-
t
|
|
1038
|
-
],
|
|
1039
|
-
[
|
|
1040
|
-
"exit",
|
|
1041
|
-
e[r][1],
|
|
1042
|
-
t
|
|
1043
|
-
],
|
|
1044
|
-
[
|
|
1045
|
-
"enter",
|
|
1046
|
-
a,
|
|
1047
|
-
t
|
|
1048
|
-
]
|
|
1049
|
-
], s = t.parser.constructs.insideSpan.null;
|
|
1050
|
-
s && _(o, o.length, 0, S(s, e.slice(r + 1, n), t)), _(o, o.length, 0, [
|
|
1051
|
-
[
|
|
1052
|
-
"exit",
|
|
1053
|
-
a,
|
|
1054
|
-
t
|
|
1055
|
-
],
|
|
1056
|
-
[
|
|
1057
|
-
"enter",
|
|
1058
|
-
e[n][1],
|
|
1059
|
-
t
|
|
1060
|
-
],
|
|
1061
|
-
[
|
|
1062
|
-
"exit",
|
|
1063
|
-
e[n][1],
|
|
1064
|
-
t
|
|
1065
|
-
],
|
|
1066
|
-
[
|
|
1067
|
-
"exit",
|
|
1068
|
-
i,
|
|
1069
|
-
t
|
|
1070
|
-
]
|
|
1071
|
-
]), _(e, r - 1, n - r + 3, o), n = r + o.length - 2;
|
|
1072
|
-
break;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
for (n = -1; ++n < e.length;) e[n][1].type === "strikethroughSequenceTemporary" && (e[n][1].type = "data");
|
|
1076
|
-
return e;
|
|
1077
|
-
}
|
|
1078
|
-
function i(e, n, r) {
|
|
1079
|
-
let i = this.previous, a = this.events, o = 0;
|
|
1080
|
-
return s;
|
|
1081
|
-
function s(t) {
|
|
1082
|
-
return i === 126 && a[a.length - 1][1].type !== "characterEscape" ? r(t) : (e.enter("strikethroughSequenceTemporary"), c(t));
|
|
1083
|
-
}
|
|
1084
|
-
function c(a) {
|
|
1085
|
-
let s = v(i);
|
|
1086
|
-
if (a === 126) return o > 1 ? r(a) : (e.consume(a), o++, c);
|
|
1087
|
-
if (o < 2 && !t) return r(a);
|
|
1088
|
-
let l = e.exit("strikethroughSequenceTemporary"), u = v(a);
|
|
1089
|
-
return l._open = !u || u === 2 && !!s, l._close = !s || s === 2 && !!u, n(a);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
//#endregion
|
|
1094
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
1095
|
-
var Dn = class {
|
|
1096
|
-
constructor() {
|
|
1097
|
-
this.map = [];
|
|
1098
|
-
}
|
|
1099
|
-
add(e, t, n) {
|
|
1100
|
-
On(this, e, t, n);
|
|
1101
|
-
}
|
|
1102
|
-
consume(e) {
|
|
1103
|
-
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
1104
|
-
if (this.map.sort(function(e, t) {
|
|
1105
|
-
return e[0] - t[0];
|
|
1106
|
-
}), this.map.length === 0) return;
|
|
1107
|
-
let t = this.map.length, n = [];
|
|
1108
|
-
for (; t > 0;) --t, n.push(e.slice(this.map[t][0] + this.map[t][1]), this.map[t][2]), e.length = this.map[t][0];
|
|
1109
|
-
n.push(e.slice()), e.length = 0;
|
|
1110
|
-
let r = n.pop();
|
|
1111
|
-
for (; r;) {
|
|
1112
|
-
for (let t of r) e.push(t);
|
|
1113
|
-
r = n.pop();
|
|
1114
|
-
}
|
|
1115
|
-
this.map.length = 0;
|
|
1116
|
-
}
|
|
1117
|
-
};
|
|
1118
|
-
function On(e, t, n, r) {
|
|
1119
|
-
let i = 0;
|
|
1120
|
-
if (!(n === 0 && r.length === 0)) {
|
|
1121
|
-
for (; i < e.map.length;) {
|
|
1122
|
-
if (e.map[i][0] === t) {
|
|
1123
|
-
e.map[i][1] += n, e.map[i][2].push(...r);
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
i += 1;
|
|
1127
|
-
}
|
|
1128
|
-
e.map.push([
|
|
1129
|
-
t,
|
|
1130
|
-
n,
|
|
1131
|
-
r
|
|
1132
|
-
]);
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
//#endregion
|
|
1136
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.js
|
|
1137
|
-
function kn(e, t) {
|
|
1138
|
-
let n = !1, r = [];
|
|
1139
|
-
for (; t < e.length;) {
|
|
1140
|
-
let i = e[t];
|
|
1141
|
-
if (n) {
|
|
1142
|
-
if (i[0] === "enter") i[1].type === "tableContent" && r.push(e[t + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
|
|
1143
|
-
else if (i[1].type === "tableContent") {
|
|
1144
|
-
if (e[t - 1][1].type === "tableDelimiterMarker") {
|
|
1145
|
-
let e = r.length - 1;
|
|
1146
|
-
r[e] = r[e] === "left" ? "center" : "right";
|
|
1147
|
-
}
|
|
1148
|
-
} else if (i[1].type === "tableDelimiterRow") break;
|
|
1149
|
-
} else i[0] === "enter" && i[1].type === "tableDelimiterRow" && (n = !0);
|
|
1150
|
-
t += 1;
|
|
1151
|
-
}
|
|
1152
|
-
return r;
|
|
1153
|
-
}
|
|
1154
|
-
//#endregion
|
|
1155
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.js
|
|
1156
|
-
function An() {
|
|
1157
|
-
return { flow: { null: {
|
|
1158
|
-
name: "table",
|
|
1159
|
-
tokenize: jn,
|
|
1160
|
-
resolveAll: Mn
|
|
1161
|
-
} } };
|
|
1162
|
-
}
|
|
1163
|
-
function jn(e, t, n) {
|
|
1164
|
-
let r = this, i = 0, a = 0, o;
|
|
1165
|
-
return s;
|
|
1166
|
-
function s(e) {
|
|
1167
|
-
let t = r.events.length - 1;
|
|
1168
|
-
for (; t > -1;) {
|
|
1169
|
-
let e = r.events[t][1].type;
|
|
1170
|
-
if (e === "lineEnding" || e === "linePrefix") t--;
|
|
1171
|
-
else break;
|
|
1172
|
-
}
|
|
1173
|
-
let i = t > -1 ? r.events[t][1].type : null, a = i === "tableHead" || i === "tableRow" ? w : c;
|
|
1174
|
-
return a === w && r.parser.lazy[r.now().line] ? n(e) : a(e);
|
|
1175
|
-
}
|
|
1176
|
-
function c(t) {
|
|
1177
|
-
return e.enter("tableHead"), e.enter("tableRow"), l(t);
|
|
1178
|
-
}
|
|
1179
|
-
function l(e) {
|
|
1180
|
-
return e === 124 ? d(e) : (o = !0, a += 1, d(e));
|
|
1181
|
-
}
|
|
1182
|
-
function d(t) {
|
|
1183
|
-
return t === null ? n(t) : x(t) ? a > 1 ? (a = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), m) : n(t) : g(t) ? y(e, d, "whitespace")(t) : (a += 1, o && (o = !1, i += 1), t === 124 ? (e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), o = !0, d) : (e.enter("data"), f(t)));
|
|
1184
|
-
}
|
|
1185
|
-
function f(t) {
|
|
1186
|
-
return t === null || t === 124 || u(t) ? (e.exit("data"), d(t)) : (e.consume(t), t === 92 ? p : f);
|
|
1187
|
-
}
|
|
1188
|
-
function p(t) {
|
|
1189
|
-
return t === 92 || t === 124 ? (e.consume(t), f) : f(t);
|
|
1190
|
-
}
|
|
1191
|
-
function m(t) {
|
|
1192
|
-
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(t) : (e.enter("tableDelimiterRow"), o = !1, g(t) ? y(e, h, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : h(t));
|
|
1193
|
-
}
|
|
1194
|
-
function h(t) {
|
|
1195
|
-
return t === 45 || t === 58 ? v(t) : t === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), _) : C(t);
|
|
1196
|
-
}
|
|
1197
|
-
function _(t) {
|
|
1198
|
-
return g(t) ? y(e, v, "whitespace")(t) : v(t);
|
|
1199
|
-
}
|
|
1200
|
-
function v(t) {
|
|
1201
|
-
return t === 58 ? (a += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), ee) : t === 45 ? (a += 1, ee(t)) : t === null || x(t) ? S(t) : C(t);
|
|
1202
|
-
}
|
|
1203
|
-
function ee(t) {
|
|
1204
|
-
return t === 45 ? (e.enter("tableDelimiterFiller"), te(t)) : C(t);
|
|
1205
|
-
}
|
|
1206
|
-
function te(t) {
|
|
1207
|
-
return t === 45 ? (e.consume(t), te) : t === 58 ? (o = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), b) : (e.exit("tableDelimiterFiller"), b(t));
|
|
1208
|
-
}
|
|
1209
|
-
function b(t) {
|
|
1210
|
-
return g(t) ? y(e, S, "whitespace")(t) : S(t);
|
|
1211
|
-
}
|
|
1212
|
-
function S(n) {
|
|
1213
|
-
return n === 124 ? h(n) : n === null || x(n) ? !o || i !== a ? C(n) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(n)) : C(n);
|
|
1214
|
-
}
|
|
1215
|
-
function C(e) {
|
|
1216
|
-
return n(e);
|
|
1217
|
-
}
|
|
1218
|
-
function w(t) {
|
|
1219
|
-
return e.enter("tableRow"), T(t);
|
|
1220
|
-
}
|
|
1221
|
-
function T(n) {
|
|
1222
|
-
return n === 124 ? (e.enter("tableCellDivider"), e.consume(n), e.exit("tableCellDivider"), T) : n === null || x(n) ? (e.exit("tableRow"), t(n)) : g(n) ? y(e, T, "whitespace")(n) : (e.enter("data"), E(n));
|
|
1223
|
-
}
|
|
1224
|
-
function E(t) {
|
|
1225
|
-
return t === null || t === 124 || u(t) ? (e.exit("data"), T(t)) : (e.consume(t), t === 92 ? ne : E);
|
|
1226
|
-
}
|
|
1227
|
-
function ne(t) {
|
|
1228
|
-
return t === 92 || t === 124 ? (e.consume(t), E) : E(t);
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
function Mn(e, t) {
|
|
1232
|
-
let n = -1, r = !0, i = 0, a = [
|
|
1233
|
-
0,
|
|
1234
|
-
0,
|
|
1235
|
-
0,
|
|
1236
|
-
0
|
|
1237
|
-
], o = [
|
|
1238
|
-
0,
|
|
1239
|
-
0,
|
|
1240
|
-
0,
|
|
1241
|
-
0
|
|
1242
|
-
], s = !1, c = 0, l, u, d, f = new Dn();
|
|
1243
|
-
for (; ++n < e.length;) {
|
|
1244
|
-
let p = e[n], m = p[1];
|
|
1245
|
-
p[0] === "enter" ? m.type === "tableHead" ? (s = !1, c !== 0 && (Nn(f, t, c, l, u), u = void 0, c = 0), l = {
|
|
1246
|
-
type: "table",
|
|
1247
|
-
start: Object.assign({}, m.start),
|
|
1248
|
-
end: Object.assign({}, m.end)
|
|
1249
|
-
}, f.add(n, 0, [[
|
|
1250
|
-
"enter",
|
|
1251
|
-
l,
|
|
1252
|
-
t
|
|
1253
|
-
]])) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (r = !0, d = void 0, a = [
|
|
1254
|
-
0,
|
|
1255
|
-
0,
|
|
1256
|
-
0,
|
|
1257
|
-
0
|
|
1258
|
-
], o = [
|
|
1259
|
-
0,
|
|
1260
|
-
n + 1,
|
|
1261
|
-
0,
|
|
1262
|
-
0
|
|
1263
|
-
], s && (s = !1, u = {
|
|
1264
|
-
type: "tableBody",
|
|
1265
|
-
start: Object.assign({}, m.start),
|
|
1266
|
-
end: Object.assign({}, m.end)
|
|
1267
|
-
}, f.add(n, 0, [[
|
|
1268
|
-
"enter",
|
|
1269
|
-
u,
|
|
1270
|
-
t
|
|
1271
|
-
]])), i = m.type === "tableDelimiterRow" ? 2 : u ? 3 : 1) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") ? (r = !1, o[2] === 0 && (a[1] !== 0 && (o[0] = o[1], d = L(f, t, a, i, void 0, d), a = [
|
|
1272
|
-
0,
|
|
1273
|
-
0,
|
|
1274
|
-
0,
|
|
1275
|
-
0
|
|
1276
|
-
]), o[2] = n)) : m.type === "tableCellDivider" && (r ? r = !1 : (a[1] !== 0 && (o[0] = o[1], d = L(f, t, a, i, void 0, d)), a = o, o = [
|
|
1277
|
-
a[1],
|
|
1278
|
-
n,
|
|
1279
|
-
0,
|
|
1280
|
-
0
|
|
1281
|
-
])) : m.type === "tableHead" ? (s = !0, c = n) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (c = n, a[1] === 0 ? o[1] !== 0 && (d = L(f, t, o, i, n, d)) : (o[0] = o[1], d = L(f, t, a, i, n, d)), i = 0) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") && (o[3] = n);
|
|
1282
|
-
}
|
|
1283
|
-
for (c !== 0 && Nn(f, t, c, l, u), f.consume(t.events), n = -1; ++n < t.events.length;) {
|
|
1284
|
-
let e = t.events[n];
|
|
1285
|
-
e[0] === "enter" && e[1].type === "table" && (e[1]._align = kn(t.events, n));
|
|
1286
|
-
}
|
|
1287
|
-
return e;
|
|
1288
|
-
}
|
|
1289
|
-
function L(e, t, n, r, i, a) {
|
|
1290
|
-
let o = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData";
|
|
1291
|
-
n[0] !== 0 && (a.end = Object.assign({}, R(t.events, n[0])), e.add(n[0], 0, [[
|
|
1292
|
-
"exit",
|
|
1293
|
-
a,
|
|
1294
|
-
t
|
|
1295
|
-
]]));
|
|
1296
|
-
let s = R(t.events, n[1]);
|
|
1297
|
-
if (a = {
|
|
1298
|
-
type: o,
|
|
1299
|
-
start: Object.assign({}, s),
|
|
1300
|
-
end: Object.assign({}, s)
|
|
1301
|
-
}, e.add(n[1], 0, [[
|
|
1302
|
-
"enter",
|
|
1303
|
-
a,
|
|
1304
|
-
t
|
|
1305
|
-
]]), n[2] !== 0) {
|
|
1306
|
-
let i = R(t.events, n[2]), a = R(t.events, n[3]), o = {
|
|
1307
|
-
type: "tableContent",
|
|
1308
|
-
start: Object.assign({}, i),
|
|
1309
|
-
end: Object.assign({}, a)
|
|
1310
|
-
};
|
|
1311
|
-
if (e.add(n[2], 0, [[
|
|
1312
|
-
"enter",
|
|
1313
|
-
o,
|
|
1314
|
-
t
|
|
1315
|
-
]]), r !== 2) {
|
|
1316
|
-
let r = t.events[n[2]], i = t.events[n[3]];
|
|
1317
|
-
if (r[1].end = Object.assign({}, i[1].end), r[1].type = "chunkText", r[1].contentType = "text", n[3] > n[2] + 1) {
|
|
1318
|
-
let t = n[2] + 1, r = n[3] - n[2] - 1;
|
|
1319
|
-
e.add(t, r, []);
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
e.add(n[3] + 1, 0, [[
|
|
1323
|
-
"exit",
|
|
1324
|
-
o,
|
|
1325
|
-
t
|
|
1326
|
-
]]);
|
|
1327
|
-
}
|
|
1328
|
-
return i !== void 0 && (a.end = Object.assign({}, R(t.events, i)), e.add(i, 0, [[
|
|
1329
|
-
"exit",
|
|
1330
|
-
a,
|
|
1331
|
-
t
|
|
1332
|
-
]]), a = void 0), a;
|
|
1333
|
-
}
|
|
1334
|
-
function Nn(e, t, n, r, i) {
|
|
1335
|
-
let a = [], o = R(t.events, n);
|
|
1336
|
-
i && (i.end = Object.assign({}, o), a.push([
|
|
1337
|
-
"exit",
|
|
1338
|
-
i,
|
|
1339
|
-
t
|
|
1340
|
-
])), r.end = Object.assign({}, o), a.push([
|
|
1341
|
-
"exit",
|
|
1342
|
-
r,
|
|
1343
|
-
t
|
|
1344
|
-
]), e.add(n + 1, 0, a);
|
|
1345
|
-
}
|
|
1346
|
-
function R(e, t) {
|
|
1347
|
-
let n = e[t], r = n[0] === "enter" ? "start" : "end";
|
|
1348
|
-
return n[1][r];
|
|
1349
|
-
}
|
|
1350
|
-
//#endregion
|
|
1351
|
-
//#region node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
|
|
1352
|
-
var Pn = {
|
|
1353
|
-
name: "tasklistCheck",
|
|
1354
|
-
tokenize: In
|
|
1355
|
-
};
|
|
1356
|
-
function Fn() {
|
|
1357
|
-
return { text: { 91: Pn } };
|
|
1358
|
-
}
|
|
1359
|
-
function In(e, t, n) {
|
|
1360
|
-
let r = this;
|
|
1361
|
-
return i;
|
|
1362
|
-
function i(t) {
|
|
1363
|
-
return r.previous !== null || !r._gfmTasklistFirstContentOfListItem ? n(t) : (e.enter("taskListCheck"), e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), a);
|
|
1364
|
-
}
|
|
1365
|
-
function a(t) {
|
|
1366
|
-
return u(t) ? (e.enter("taskListCheckValueUnchecked"), e.consume(t), e.exit("taskListCheckValueUnchecked"), o) : t === 88 || t === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(t), e.exit("taskListCheckValueChecked"), o) : n(t);
|
|
1367
|
-
}
|
|
1368
|
-
function o(t) {
|
|
1369
|
-
return t === 93 ? (e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), s) : n(t);
|
|
1370
|
-
}
|
|
1371
|
-
function s(r) {
|
|
1372
|
-
return x(r) ? t(r) : g(r) ? e.check({ tokenize: Ln }, t, n)(r) : n(r);
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
function Ln(e, t, n) {
|
|
1376
|
-
return y(e, r, "whitespace");
|
|
1377
|
-
function r(e) {
|
|
1378
|
-
return e === null ? n(e) : t(e);
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
//#endregion
|
|
1382
|
-
//#region node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
|
|
1383
|
-
function Rn(e) {
|
|
1384
|
-
return te([
|
|
1385
|
-
nn(),
|
|
1386
|
-
vn(),
|
|
1387
|
-
En(e),
|
|
1388
|
-
An(),
|
|
1389
|
-
Fn()
|
|
1390
|
-
]);
|
|
1391
|
-
}
|
|
1392
|
-
//#endregion
|
|
1393
|
-
//#region node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
|
|
1394
|
-
var zn = {};
|
|
1395
|
-
function Bn(e) {
|
|
1396
|
-
let t = this, n = e || zn, r = t.data(), i = r.micromarkExtensions ||= [], a = r.fromMarkdownExtensions ||= [], o = r.toMarkdownExtensions ||= [];
|
|
1397
|
-
i.push(Rn(n)), a.push(qt()), o.push(Jt(n));
|
|
1398
|
-
}
|
|
1399
|
-
//#endregion
|
|
1400
|
-
//#region node_modules/.pnpm/@milkdown+preset-gfm@7.21.1/node_modules/@milkdown/preset-gfm/lib/index.js
|
|
1401
|
-
function z(e, t) {
|
|
1402
|
-
return Object.assign(e, { meta: {
|
|
1403
|
-
package: "@milkdown/preset-gfm",
|
|
1404
|
-
...t
|
|
1405
|
-
} }), e;
|
|
1406
|
-
}
|
|
1407
|
-
var B = ce("strike_through");
|
|
1408
|
-
z(B, {
|
|
1409
|
-
displayName: "Attr<strikethrough>",
|
|
1410
|
-
group: "Strikethrough"
|
|
1411
|
-
});
|
|
1412
|
-
var V = oe("strike_through", (e) => ({
|
|
1413
|
-
parseDOM: [{ tag: "del" }, {
|
|
1414
|
-
style: "text-decoration",
|
|
1415
|
-
getAttrs: (e) => e === "line-through"
|
|
1416
|
-
}],
|
|
1417
|
-
toDOM: (t) => ["del", e.get(B.key)(t)],
|
|
1418
|
-
parseMarkdown: {
|
|
1419
|
-
match: (e) => e.type === "delete",
|
|
1420
|
-
runner: (e, t, n) => {
|
|
1421
|
-
e.openMark(n), e.next(t.children), e.closeMark(n);
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
|
-
toMarkdown: {
|
|
1425
|
-
match: (e) => e.type.name === "strike_through",
|
|
1426
|
-
runner: (e, t) => {
|
|
1427
|
-
e.withMark(t, "delete");
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
}));
|
|
1431
|
-
z(V.mark, {
|
|
1432
|
-
displayName: "MarkSchema<strikethrough>",
|
|
1433
|
-
group: "Strikethrough"
|
|
1434
|
-
}), z(V.ctx, {
|
|
1435
|
-
displayName: "MarkSchemaCtx<strikethrough>",
|
|
1436
|
-
group: "Strikethrough"
|
|
1437
|
-
});
|
|
1438
|
-
var H = k("ToggleStrikeThrough", (e) => () => ae(V.type(e)));
|
|
1439
|
-
z(H, {
|
|
1440
|
-
displayName: "Command<ToggleStrikethrough>",
|
|
1441
|
-
group: "Strikethrough"
|
|
1442
|
-
});
|
|
1443
|
-
var Vn = de((t) => e(/(?<![\w:/])(~{1,2})(.+?)\1(?!\w|\/)/, V.type(t)));
|
|
1444
|
-
z(Vn, {
|
|
1445
|
-
displayName: "InputRule<strikethrough>",
|
|
1446
|
-
group: "Strikethrough"
|
|
1447
|
-
});
|
|
1448
|
-
var U = ue("strikeThroughKeymap", { ToggleStrikethrough: {
|
|
1449
|
-
shortcuts: "Mod-Alt-x",
|
|
1450
|
-
command: (e) => {
|
|
1451
|
-
let t = e.get(b);
|
|
1452
|
-
return () => t.call(H.key);
|
|
1453
|
-
}
|
|
1454
|
-
} });
|
|
1455
|
-
z(U.ctx, {
|
|
1456
|
-
displayName: "KeymapCtx<strikethrough>",
|
|
1457
|
-
group: "Strikethrough"
|
|
1458
|
-
}), z(U.shortcuts, {
|
|
1459
|
-
displayName: "Keymap<strikethrough>",
|
|
1460
|
-
group: "Strikethrough"
|
|
1461
|
-
});
|
|
1462
|
-
var W = Oe({
|
|
1463
|
-
tableGroup: "block",
|
|
1464
|
-
cellContent: "paragraph",
|
|
1465
|
-
cellAttributes: { alignment: {
|
|
1466
|
-
default: "left",
|
|
1467
|
-
getFromDOM: (e) => e.style.textAlign || "left",
|
|
1468
|
-
setDOMAttr: (e, t) => {
|
|
1469
|
-
t.style = `text-align: ${e || "left"}`;
|
|
1470
|
-
}
|
|
1471
|
-
} }
|
|
1472
|
-
}), G = O("table", () => ({
|
|
1473
|
-
...W.table,
|
|
1474
|
-
content: "table_header_row table_row+",
|
|
1475
|
-
disableDropCursor: !0,
|
|
1476
|
-
parseMarkdown: {
|
|
1477
|
-
match: (e) => e.type === "table",
|
|
1478
|
-
runner: (e, t, n) => {
|
|
1479
|
-
let r = t.align, i = t.children.map((e, t) => ({
|
|
1480
|
-
...e,
|
|
1481
|
-
align: r,
|
|
1482
|
-
isHeader: t === 0
|
|
1483
|
-
}));
|
|
1484
|
-
e.openNode(n), e.next(i), e.closeNode();
|
|
1485
|
-
}
|
|
1486
|
-
},
|
|
1487
|
-
toMarkdown: {
|
|
1488
|
-
match: (e) => e.type.name === "table",
|
|
1489
|
-
runner: (e, t) => {
|
|
1490
|
-
let n = t.content.firstChild?.content;
|
|
1491
|
-
if (!n) return;
|
|
1492
|
-
let r = [];
|
|
1493
|
-
n.forEach((e) => {
|
|
1494
|
-
r.push(e.attrs.alignment);
|
|
1495
|
-
}), e.openNode("table", void 0, { align: r }), e.next(t.content), e.closeNode();
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}));
|
|
1499
|
-
z(G.node, {
|
|
1500
|
-
displayName: "NodeSchema<table>",
|
|
1501
|
-
group: "Table"
|
|
1502
|
-
}), z(G.ctx, {
|
|
1503
|
-
displayName: "NodeSchemaCtx<table>",
|
|
1504
|
-
group: "Table"
|
|
1505
|
-
});
|
|
1506
|
-
var K = O("table_header_row", () => ({
|
|
1507
|
-
...W.table_row,
|
|
1508
|
-
disableDropCursor: !0,
|
|
1509
|
-
content: "(table_header)*",
|
|
1510
|
-
parseDOM: [{ tag: "tr[data-is-header]" }, {
|
|
1511
|
-
tag: "tr",
|
|
1512
|
-
getAttrs: (e) => e instanceof HTMLElement && e.querySelector("th") ? {} : !1
|
|
1513
|
-
}],
|
|
1514
|
-
toDOM() {
|
|
1515
|
-
return [
|
|
1516
|
-
"tr",
|
|
1517
|
-
{ "data-is-header": !0 },
|
|
1518
|
-
0
|
|
1519
|
-
];
|
|
1520
|
-
},
|
|
1521
|
-
parseMarkdown: {
|
|
1522
|
-
match: (e) => !!(e.type === "tableRow" && e.isHeader),
|
|
1523
|
-
runner: (e, t, n) => {
|
|
1524
|
-
let r = t.align, i = t.children.map((e, n) => ({
|
|
1525
|
-
...e,
|
|
1526
|
-
align: r[n],
|
|
1527
|
-
isHeader: t.isHeader
|
|
1528
|
-
}));
|
|
1529
|
-
e.openNode(n), e.next(i), e.closeNode();
|
|
1530
|
-
}
|
|
1531
|
-
},
|
|
1532
|
-
toMarkdown: {
|
|
1533
|
-
match: (e) => e.type.name === "table_header_row",
|
|
1534
|
-
runner: (e, t) => {
|
|
1535
|
-
t.content.size !== 0 && (e.openNode("tableRow", void 0, { isHeader: !0 }), e.next(t.content), e.closeNode());
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
}));
|
|
1539
|
-
z(K.node, {
|
|
1540
|
-
displayName: "NodeSchema<tableHeaderRow>",
|
|
1541
|
-
group: "Table"
|
|
1542
|
-
}), z(K.ctx, {
|
|
1543
|
-
displayName: "NodeSchemaCtx<tableHeaderRow>",
|
|
1544
|
-
group: "Table"
|
|
1545
|
-
});
|
|
1546
|
-
var q = O("table_row", () => ({
|
|
1547
|
-
...W.table_row,
|
|
1548
|
-
disableDropCursor: !0,
|
|
1549
|
-
content: "(table_cell)*",
|
|
1550
|
-
parseMarkdown: {
|
|
1551
|
-
match: (e) => e.type === "tableRow",
|
|
1552
|
-
runner: (e, t, n) => {
|
|
1553
|
-
let r = t.align, i = t.children.map((e, t) => ({
|
|
1554
|
-
...e,
|
|
1555
|
-
align: r[t]
|
|
1556
|
-
}));
|
|
1557
|
-
e.openNode(n), e.next(i), e.closeNode();
|
|
1558
|
-
}
|
|
1559
|
-
},
|
|
1560
|
-
toMarkdown: {
|
|
1561
|
-
match: (e) => e.type.name === "table_row",
|
|
1562
|
-
runner: (e, t) => {
|
|
1563
|
-
t.content.size !== 0 && (e.openNode("tableRow"), e.next(t.content), e.closeNode());
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
}));
|
|
1567
|
-
z(q.node, {
|
|
1568
|
-
displayName: "NodeSchema<tableRow>",
|
|
1569
|
-
group: "Table"
|
|
1570
|
-
}), z(q.ctx, {
|
|
1571
|
-
displayName: "NodeSchemaCtx<tableRow>",
|
|
1572
|
-
group: "Table"
|
|
1573
|
-
});
|
|
1574
|
-
var J = O("table_cell", () => ({
|
|
1575
|
-
...W.table_cell,
|
|
1576
|
-
disableDropCursor: !0,
|
|
1577
|
-
parseMarkdown: {
|
|
1578
|
-
match: (e) => e.type === "tableCell" && !e.isHeader,
|
|
1579
|
-
runner: (e, t, n) => {
|
|
1580
|
-
let r = t.align;
|
|
1581
|
-
e.openNode(n, { alignment: r }).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode();
|
|
1582
|
-
}
|
|
1583
|
-
},
|
|
1584
|
-
toMarkdown: {
|
|
1585
|
-
match: (e) => e.type.name === "table_cell",
|
|
1586
|
-
runner: (e, t) => {
|
|
1587
|
-
e.openNode("tableCell").next(t.content).closeNode();
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
}));
|
|
1591
|
-
z(J.node, {
|
|
1592
|
-
displayName: "NodeSchema<tableCell>",
|
|
1593
|
-
group: "Table"
|
|
1594
|
-
}), z(J.ctx, {
|
|
1595
|
-
displayName: "NodeSchemaCtx<tableCell>",
|
|
1596
|
-
group: "Table"
|
|
1597
|
-
});
|
|
1598
|
-
var Y = O("table_header", () => ({
|
|
1599
|
-
...W.table_header,
|
|
1600
|
-
disableDropCursor: !0,
|
|
1601
|
-
parseMarkdown: {
|
|
1602
|
-
match: (e) => e.type === "tableCell" && !!e.isHeader,
|
|
1603
|
-
runner: (e, t, n) => {
|
|
1604
|
-
let r = t.align;
|
|
1605
|
-
e.openNode(n, { alignment: r }), e.openNode(e.schema.nodes.paragraph), e.next(t.children), e.closeNode(), e.closeNode();
|
|
1606
|
-
}
|
|
1607
|
-
},
|
|
1608
|
-
toMarkdown: {
|
|
1609
|
-
match: (e) => e.type.name === "table_header",
|
|
1610
|
-
runner: (e, t) => {
|
|
1611
|
-
e.openNode("tableCell"), e.next(t.content), e.closeNode();
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
}));
|
|
1615
|
-
z(Y.node, {
|
|
1616
|
-
displayName: "NodeSchema<tableHeader>",
|
|
1617
|
-
group: "Table"
|
|
1618
|
-
}), z(Y.ctx, {
|
|
1619
|
-
displayName: "NodeSchemaCtx<tableHeader>",
|
|
1620
|
-
group: "Table"
|
|
1621
|
-
});
|
|
1622
|
-
function Hn(e, t = 3, n = 3) {
|
|
1623
|
-
let r = Array(n).fill(0).map(() => J.type(e).createAndFill()), i = Array(n).fill(0).map(() => Y.type(e).createAndFill()), a = Array(t).fill(0).map((t, n) => n === 0 ? K.type(e).create(null, i) : q.type(e).create(null, r));
|
|
1624
|
-
return G.type(e).create(null, a);
|
|
1625
|
-
}
|
|
1626
|
-
function Un(e, t) {
|
|
1627
|
-
let n = ge(t.$from);
|
|
1628
|
-
if (!n) return;
|
|
1629
|
-
let r = j.get(n.node);
|
|
1630
|
-
return (Array.isArray(e) ? e : [e]).filter((e) => e >= 0 && e <= r.width - 1).flatMap((e) => r.cellsInRect({
|
|
1631
|
-
left: e,
|
|
1632
|
-
right: e + 1,
|
|
1633
|
-
top: 0,
|
|
1634
|
-
bottom: r.height
|
|
1635
|
-
}).map((e) => {
|
|
1636
|
-
let t = n.node.nodeAt(e), r = e + n.start;
|
|
1637
|
-
return {
|
|
1638
|
-
pos: r,
|
|
1639
|
-
start: r + 1,
|
|
1640
|
-
node: t,
|
|
1641
|
-
depth: n.depth + 2
|
|
1642
|
-
};
|
|
1643
|
-
}));
|
|
1644
|
-
}
|
|
1645
|
-
function Wn(e, t) {
|
|
1646
|
-
let n = ge(t.$from);
|
|
1647
|
-
if (!n) return;
|
|
1648
|
-
let r = j.get(n.node);
|
|
1649
|
-
return (Array.isArray(e) ? e : [e]).filter((e) => e >= 0 && e <= r.height - 1).flatMap((e) => r.cellsInRect({
|
|
1650
|
-
left: 0,
|
|
1651
|
-
right: r.width,
|
|
1652
|
-
top: e,
|
|
1653
|
-
bottom: e + 1
|
|
1654
|
-
}).map((e) => {
|
|
1655
|
-
let t = n.node.nodeAt(e), r = e + n.start;
|
|
1656
|
-
return {
|
|
1657
|
-
pos: r,
|
|
1658
|
-
start: r + 1,
|
|
1659
|
-
node: t,
|
|
1660
|
-
depth: n.depth + 2
|
|
1661
|
-
};
|
|
1662
|
-
}));
|
|
1663
|
-
}
|
|
1664
|
-
function Gn(e) {
|
|
1665
|
-
return (t, r) => (a) => {
|
|
1666
|
-
r ??= a.selection.from;
|
|
1667
|
-
let o = a.doc.resolve(r), s = n((e) => e.type.name === "table")(o), c = s ? {
|
|
1668
|
-
node: s.node,
|
|
1669
|
-
from: s.start
|
|
1670
|
-
} : void 0, l = e === "row";
|
|
1671
|
-
if (c) {
|
|
1672
|
-
let e = j.get(c.node);
|
|
1673
|
-
if (t >= 0 && t < (l ? e.height : e.width)) {
|
|
1674
|
-
let n = e.positionAt(l ? t : e.height - 1, l ? e.width - 1 : t, c.node), r = a.doc.resolve(c.from + n), o = l ? M.rowSelection : M.colSelection, s = e.positionAt(l ? t : 0, l ? 0 : t, c.node), u = a.doc.resolve(c.from + s);
|
|
1675
|
-
return i(a.setSelection(o(r, u)));
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
return a;
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
var Kn = Gn("row"), qn = Gn("col");
|
|
1682
|
-
function Jn(e, t, { map: n, tableStart: r, table: i }, a) {
|
|
1683
|
-
let o = Array(a).fill(0).reduce((e, t, n) => e + i.child(n).nodeSize, r), s = Array(n.width).fill(0).map((t, r) => {
|
|
1684
|
-
let a = i.nodeAt(n.map[r]);
|
|
1685
|
-
return J.type(e).createAndFill({ alignment: a?.attrs.alignment });
|
|
1686
|
-
});
|
|
1687
|
-
return t.insert(o, q.type(e).create(null, s)), t;
|
|
1688
|
-
}
|
|
1689
|
-
function Yn(e) {
|
|
1690
|
-
let t = ge(e.$from);
|
|
1691
|
-
if (!t) return;
|
|
1692
|
-
let n = j.get(t.node);
|
|
1693
|
-
return n.cellsInRect({
|
|
1694
|
-
left: 0,
|
|
1695
|
-
right: n.width,
|
|
1696
|
-
top: 0,
|
|
1697
|
-
bottom: n.height
|
|
1698
|
-
}).map((e) => {
|
|
1699
|
-
let n = t.node.nodeAt(e), r = e + t.start;
|
|
1700
|
-
return {
|
|
1701
|
-
pos: r,
|
|
1702
|
-
start: r + 1,
|
|
1703
|
-
node: n
|
|
1704
|
-
};
|
|
1705
|
-
});
|
|
1706
|
-
}
|
|
1707
|
-
function Xn(e) {
|
|
1708
|
-
let t = Yn(e.selection);
|
|
1709
|
-
if (t && t[0]) {
|
|
1710
|
-
let n = e.doc.resolve(t[0].pos), r = t[t.length - 1];
|
|
1711
|
-
if (r) {
|
|
1712
|
-
let t = e.doc.resolve(r.pos);
|
|
1713
|
-
return i(e.setSelection(new M(t, n)));
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
return e;
|
|
1717
|
-
}
|
|
1718
|
-
var X = k("GoToPrevTableCell", () => () => _e(-1));
|
|
1719
|
-
z(X, {
|
|
1720
|
-
displayName: "Command<goToPrevTableCellCommand>",
|
|
1721
|
-
group: "Table"
|
|
1722
|
-
});
|
|
1723
|
-
var Z = k("GoToNextTableCell", () => () => _e(1));
|
|
1724
|
-
z(Z, {
|
|
1725
|
-
displayName: "Command<goToNextTableCellCommand>",
|
|
1726
|
-
group: "Table"
|
|
1727
|
-
});
|
|
1728
|
-
var Q = k("ExitTable", (e) => () => (t, n) => {
|
|
1729
|
-
if (!Ce(t)) return !1;
|
|
1730
|
-
let { $head: r } = t.selection, i = o(r, G.type(e));
|
|
1731
|
-
if (!i) return !1;
|
|
1732
|
-
let { to: a } = i, s = t.tr.replaceWith(a, a, fe.type(e).createAndFill());
|
|
1733
|
-
return s.setSelection(ie.near(s.doc.resolve(a), 1)).scrollIntoView(), n?.(s), !0;
|
|
1734
|
-
});
|
|
1735
|
-
z(Q, {
|
|
1736
|
-
displayName: "Command<breakTableCommand>",
|
|
1737
|
-
group: "Table"
|
|
1738
|
-
});
|
|
1739
|
-
var Zn = k("InsertTable", (e) => ({ row: t, col: n } = {}) => (r, i) => {
|
|
1740
|
-
let { selection: a, tr: o } = r, { from: s } = a, c = Hn(e, t, n), l = o.replaceSelectionWith(c), u = ie.findFrom(l.doc.resolve(s), 1, !0);
|
|
1741
|
-
return u && l.setSelection(u), i?.(l), !0;
|
|
1742
|
-
});
|
|
1743
|
-
z(Zn, {
|
|
1744
|
-
displayName: "Command<insertTableCommand>",
|
|
1745
|
-
group: "Table"
|
|
1746
|
-
});
|
|
1747
|
-
var Qn = k("MoveRow", () => ({ from: e, to: t, pos: n } = {}) => ye({
|
|
1748
|
-
from: e ?? 0,
|
|
1749
|
-
to: t ?? 0,
|
|
1750
|
-
pos: n
|
|
1751
|
-
}));
|
|
1752
|
-
z(Qn, {
|
|
1753
|
-
displayName: "Command<moveRowCommand>",
|
|
1754
|
-
group: "Table"
|
|
1755
|
-
});
|
|
1756
|
-
var $n = k("MoveCol", () => ({ from: e, to: t, pos: n } = {}) => Se({
|
|
1757
|
-
from: e ?? 0,
|
|
1758
|
-
to: t ?? 0,
|
|
1759
|
-
pos: n
|
|
1760
|
-
}));
|
|
1761
|
-
z($n, {
|
|
1762
|
-
displayName: "Command<moveColCommand>",
|
|
1763
|
-
group: "Table"
|
|
1764
|
-
});
|
|
1765
|
-
var er = k("SelectRow", () => (e = { index: 0 }) => (t, n) => {
|
|
1766
|
-
let { tr: r } = t;
|
|
1767
|
-
return !!n?.(Kn(e.index, e.pos)(r));
|
|
1768
|
-
});
|
|
1769
|
-
z(er, {
|
|
1770
|
-
displayName: "Command<selectRowCommand>",
|
|
1771
|
-
group: "Table"
|
|
1772
|
-
});
|
|
1773
|
-
var tr = k("SelectCol", () => (e = { index: 0 }) => (t, n) => {
|
|
1774
|
-
let { tr: r } = t;
|
|
1775
|
-
return !!n?.(qn(e.index, e.pos)(r));
|
|
1776
|
-
});
|
|
1777
|
-
z(tr, {
|
|
1778
|
-
displayName: "Command<selectColCommand>",
|
|
1779
|
-
group: "Table"
|
|
1780
|
-
});
|
|
1781
|
-
var nr = k("SelectTable", () => () => (e, t) => {
|
|
1782
|
-
let { tr: n } = e;
|
|
1783
|
-
return !!t?.(Xn(n));
|
|
1784
|
-
});
|
|
1785
|
-
z(nr, {
|
|
1786
|
-
displayName: "Command<selectTableCommand>",
|
|
1787
|
-
group: "Table"
|
|
1788
|
-
});
|
|
1789
|
-
var rr = k("DeleteSelectedCells", () => () => (e, t) => {
|
|
1790
|
-
let { selection: n } = e;
|
|
1791
|
-
if (!(n instanceof M)) return !1;
|
|
1792
|
-
let r = n.isRowSelection(), i = n.isColSelection();
|
|
1793
|
-
return r && i ? Ee(e, t) : i ? he(e, t) : xe(e, t);
|
|
1794
|
-
});
|
|
1795
|
-
z(rr, {
|
|
1796
|
-
displayName: "Command<deleteSelectedCellsCommand>",
|
|
1797
|
-
group: "Table"
|
|
1798
|
-
});
|
|
1799
|
-
var ir = k("AddColBefore", () => () => be);
|
|
1800
|
-
z(ir, {
|
|
1801
|
-
displayName: "Command<addColBeforeCommand>",
|
|
1802
|
-
group: "Table"
|
|
1803
|
-
});
|
|
1804
|
-
var ar = k("AddColAfter", () => () => we);
|
|
1805
|
-
z(ar, {
|
|
1806
|
-
displayName: "Command<addColAfterCommand>",
|
|
1807
|
-
group: "Table"
|
|
1808
|
-
});
|
|
1809
|
-
var or = k("AddRowBefore", (e) => () => (t, n) => {
|
|
1810
|
-
if (!Ce(t)) return !1;
|
|
1811
|
-
if (n) {
|
|
1812
|
-
let r = ve(t);
|
|
1813
|
-
n(Jn(e, t.tr, r, r.top));
|
|
1814
|
-
}
|
|
1815
|
-
return !0;
|
|
1816
|
-
});
|
|
1817
|
-
z(or, {
|
|
1818
|
-
displayName: "Command<addRowBeforeCommand>",
|
|
1819
|
-
group: "Table"
|
|
1820
|
-
});
|
|
1821
|
-
var sr = k("AddRowAfter", (e) => () => (t, n) => {
|
|
1822
|
-
if (!Ce(t)) return !1;
|
|
1823
|
-
if (n) {
|
|
1824
|
-
let r = ve(t);
|
|
1825
|
-
n(Jn(e, t.tr, r, r.bottom));
|
|
1826
|
-
}
|
|
1827
|
-
return !0;
|
|
1828
|
-
});
|
|
1829
|
-
z(sr, {
|
|
1830
|
-
displayName: "Command<addRowAfterCommand>",
|
|
1831
|
-
group: "Table"
|
|
1832
|
-
});
|
|
1833
|
-
var cr = k("SetAlign", () => (e = "left") => me("alignment", e));
|
|
1834
|
-
z(cr, {
|
|
1835
|
-
displayName: "Command<setAlignCommand>",
|
|
1836
|
-
group: "Table"
|
|
1837
|
-
});
|
|
1838
|
-
var lr = de((e) => new s(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/, (t, n, r, i) => {
|
|
1839
|
-
let a = t.doc.resolve(r);
|
|
1840
|
-
if (!a.node(-1).canReplaceWith(a.index(-1), a.indexAfter(-1), G.type(e))) return null;
|
|
1841
|
-
let o = Hn(e, Math.max(Number(n.groups?.row ?? 0), 2), Number(n.groups?.col)), s = t.tr.replaceRangeWith(r, i, o);
|
|
1842
|
-
return s.setSelection(ne.create(s.doc, r + 3)).scrollIntoView();
|
|
1843
|
-
}));
|
|
1844
|
-
z(lr, {
|
|
1845
|
-
displayName: "InputRule<insertTableInputRule>",
|
|
1846
|
-
group: "Table"
|
|
1847
|
-
});
|
|
1848
|
-
var ur = le((e) => ({ run: (t, n, r) => {
|
|
1849
|
-
if (r) return t;
|
|
1850
|
-
function i(t) {
|
|
1851
|
-
let n = t.childCount, r = t.lastChild?.childCount ?? 0;
|
|
1852
|
-
if (n === 0 || r === 0) return fe.type(e).create();
|
|
1853
|
-
let i = t.firstChild;
|
|
1854
|
-
if (!(r > 0 && i && i.childCount === 0)) return t;
|
|
1855
|
-
if (n >= 3) {
|
|
1856
|
-
let r = t.child(1), a = [];
|
|
1857
|
-
for (let t = 0; t < r.childCount; t++) {
|
|
1858
|
-
let n = r.child(t);
|
|
1859
|
-
a.push(Y.type(e).create(n.attrs, n.content, n.marks));
|
|
1860
|
-
}
|
|
1861
|
-
let o = i.type.create(i.attrs, a), s = [];
|
|
1862
|
-
for (let e = 2; e < n; e++) s.push(t.child(e));
|
|
1863
|
-
return t.type.create(t.attrs, [o, ...s]);
|
|
1864
|
-
}
|
|
1865
|
-
let a = Array(r).fill(0).map(() => Y.type(e).createAndFill()), o = new T(D.from(a), 0, 0), s = i.replace(0, 0, o);
|
|
1866
|
-
return t.replace(0, i.nodeSize, new T(D.from(s), 0, 0));
|
|
1867
|
-
}
|
|
1868
|
-
function a(t) {
|
|
1869
|
-
let n = q.type(e), r = [], a = [], o = !1;
|
|
1870
|
-
function s() {
|
|
1871
|
-
if (a.length === 0) return;
|
|
1872
|
-
let t = K.type(e).createAndFill(), n = G.type(e).create(null, [t, ...a]);
|
|
1873
|
-
r.push(i(n)), a = [];
|
|
1874
|
-
}
|
|
1875
|
-
return t.forEach((e) => {
|
|
1876
|
-
e.type === n ? (o = !0, a.push(e)) : (s(), r.push(e));
|
|
1877
|
-
}), s(), o ? D.from(r) : t;
|
|
1878
|
-
}
|
|
1879
|
-
function o(t) {
|
|
1880
|
-
let n = a(t), r = n !== t, s = [];
|
|
1881
|
-
return n.forEach((t) => {
|
|
1882
|
-
if (t.type === G.type(e)) {
|
|
1883
|
-
let e = i(t);
|
|
1884
|
-
e !== t && (r = !0), s.push(e);
|
|
1885
|
-
} else if (t.childCount > 0) {
|
|
1886
|
-
let e = o(t.content);
|
|
1887
|
-
e === t.content ? s.push(t) : (r = !0, s.push(t.copy(e)));
|
|
1888
|
-
} else s.push(t);
|
|
1889
|
-
}), r ? D.from(s) : t;
|
|
1890
|
-
}
|
|
1891
|
-
function s(t) {
|
|
1892
|
-
let n = [], r = [];
|
|
1893
|
-
t.forEach((e) => r.push(e));
|
|
1894
|
-
for (let t = 0; t < r.length; t++) {
|
|
1895
|
-
let i = r[t], a = r[t + 1];
|
|
1896
|
-
i.type === fe.type(e) && i.content.size === 0 && a && a.type === G.type(e) || n.push(i);
|
|
1897
|
-
}
|
|
1898
|
-
return n.length < r.length ? D.from(n) : t;
|
|
1899
|
-
}
|
|
1900
|
-
let c = o(t.content);
|
|
1901
|
-
return c = s(c), new T(D.from(c), t.openStart, t.openEnd);
|
|
1902
|
-
} }));
|
|
1903
|
-
z(ur, {
|
|
1904
|
-
displayName: "PasteRule<table>",
|
|
1905
|
-
group: "Table"
|
|
1906
|
-
});
|
|
1907
|
-
var $ = ue("tableKeymap", {
|
|
1908
|
-
NextCell: {
|
|
1909
|
-
priority: 100,
|
|
1910
|
-
shortcuts: ["Mod-]", "Tab"],
|
|
1911
|
-
command: (e) => {
|
|
1912
|
-
let t = e.get(b);
|
|
1913
|
-
return () => t.call(Z.key);
|
|
1914
|
-
}
|
|
1915
|
-
},
|
|
1916
|
-
PrevCell: {
|
|
1917
|
-
shortcuts: ["Mod-[", "Shift-Tab"],
|
|
1918
|
-
command: (e) => {
|
|
1919
|
-
let t = e.get(b);
|
|
1920
|
-
return () => t.call(X.key);
|
|
1921
|
-
}
|
|
1922
|
-
},
|
|
1923
|
-
ExitTable: {
|
|
1924
|
-
shortcuts: ["Mod-Enter", "Enter"],
|
|
1925
|
-
command: (e) => {
|
|
1926
|
-
let t = e.get(b);
|
|
1927
|
-
return () => t.call(Q.key);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
});
|
|
1931
|
-
z($.ctx, {
|
|
1932
|
-
displayName: "KeymapCtx<table>",
|
|
1933
|
-
group: "Table"
|
|
1934
|
-
}), z($.shortcuts, {
|
|
1935
|
-
displayName: "Keymap<table>",
|
|
1936
|
-
group: "Table"
|
|
1937
|
-
});
|
|
1938
|
-
var dr = "footnote_definition", fr = "footnoteDefinition", pr = O("footnote_definition", () => ({
|
|
1939
|
-
group: "block",
|
|
1940
|
-
content: "block+",
|
|
1941
|
-
defining: !0,
|
|
1942
|
-
attrs: { label: {
|
|
1943
|
-
default: "",
|
|
1944
|
-
validate: "string"
|
|
1945
|
-
} },
|
|
1946
|
-
parseDOM: [{
|
|
1947
|
-
tag: `dl[data-type="${dr}"]`,
|
|
1948
|
-
getAttrs: (e) => {
|
|
1949
|
-
if (!(e instanceof HTMLElement)) throw w(e);
|
|
1950
|
-
return { label: e.dataset.label };
|
|
1951
|
-
},
|
|
1952
|
-
contentElement: "dd"
|
|
1953
|
-
}],
|
|
1954
|
-
toDOM: (e) => {
|
|
1955
|
-
let t = e.attrs.label;
|
|
1956
|
-
return [
|
|
1957
|
-
"dl",
|
|
1958
|
-
{
|
|
1959
|
-
"data-label": t,
|
|
1960
|
-
"data-type": dr
|
|
1961
|
-
},
|
|
1962
|
-
["dt", t],
|
|
1963
|
-
["dd", 0]
|
|
1964
|
-
];
|
|
1965
|
-
},
|
|
1966
|
-
parseMarkdown: {
|
|
1967
|
-
match: ({ type: e }) => e === fr,
|
|
1968
|
-
runner: (e, t, n) => {
|
|
1969
|
-
e.openNode(n, { label: t.label }).next(t.children).closeNode();
|
|
1970
|
-
}
|
|
1971
|
-
},
|
|
1972
|
-
toMarkdown: {
|
|
1973
|
-
match: (e) => e.type.name === dr,
|
|
1974
|
-
runner: (e, t) => {
|
|
1975
|
-
e.openNode(fr, void 0, {
|
|
1976
|
-
label: t.attrs.label,
|
|
1977
|
-
identifier: t.attrs.label
|
|
1978
|
-
}).next(t.content).closeNode();
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
}));
|
|
1982
|
-
z(pr.ctx, {
|
|
1983
|
-
displayName: "NodeSchemaCtx<footnodeDef>",
|
|
1984
|
-
group: "footnote"
|
|
1985
|
-
}), z(pr.node, {
|
|
1986
|
-
displayName: "NodeSchema<footnodeDef>",
|
|
1987
|
-
group: "footnote"
|
|
1988
|
-
});
|
|
1989
|
-
var mr = "footnote_reference", hr = O("footnote_reference", () => ({
|
|
1990
|
-
group: "inline",
|
|
1991
|
-
inline: !0,
|
|
1992
|
-
atom: !0,
|
|
1993
|
-
attrs: { label: {
|
|
1994
|
-
default: "",
|
|
1995
|
-
validate: "string"
|
|
1996
|
-
} },
|
|
1997
|
-
parseDOM: [{
|
|
1998
|
-
tag: `sup[data-type="${mr}"]`,
|
|
1999
|
-
getAttrs: (e) => {
|
|
2000
|
-
if (!(e instanceof HTMLElement)) throw w(e);
|
|
2001
|
-
return { label: e.dataset.label };
|
|
2002
|
-
}
|
|
2003
|
-
}],
|
|
2004
|
-
toDOM: (e) => {
|
|
2005
|
-
let t = e.attrs.label;
|
|
2006
|
-
return [
|
|
2007
|
-
"sup",
|
|
2008
|
-
{
|
|
2009
|
-
"data-label": t,
|
|
2010
|
-
"data-type": mr
|
|
2011
|
-
},
|
|
2012
|
-
t
|
|
2013
|
-
];
|
|
2014
|
-
},
|
|
2015
|
-
parseMarkdown: {
|
|
2016
|
-
match: ({ type: e }) => e === "footnoteReference",
|
|
2017
|
-
runner: (e, t, n) => {
|
|
2018
|
-
e.addNode(n, { label: t.label });
|
|
2019
|
-
}
|
|
2020
|
-
},
|
|
2021
|
-
toMarkdown: {
|
|
2022
|
-
match: (e) => e.type.name === mr,
|
|
2023
|
-
runner: (e, t) => {
|
|
2024
|
-
e.addNode("footnoteReference", void 0, void 0, {
|
|
2025
|
-
label: t.attrs.label,
|
|
2026
|
-
identifier: t.attrs.label
|
|
2027
|
-
});
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
}));
|
|
2031
|
-
z(hr.ctx, {
|
|
2032
|
-
displayName: "NodeSchemaCtx<footnodeRef>",
|
|
2033
|
-
group: "footnote"
|
|
2034
|
-
}), z(hr.node, {
|
|
2035
|
-
displayName: "NodeSchema<footnodeRef>",
|
|
2036
|
-
group: "footnote"
|
|
2037
|
-
});
|
|
2038
|
-
var gr = pe.extendSchema((e) => (t) => {
|
|
2039
|
-
let n = e(t);
|
|
2040
|
-
return {
|
|
2041
|
-
...n,
|
|
2042
|
-
attrs: {
|
|
2043
|
-
...n.attrs,
|
|
2044
|
-
checked: {
|
|
2045
|
-
default: null,
|
|
2046
|
-
validate: "boolean|null"
|
|
2047
|
-
}
|
|
2048
|
-
},
|
|
2049
|
-
parseDOM: [{
|
|
2050
|
-
tag: "li[data-item-type=\"task\"]",
|
|
2051
|
-
getAttrs: (e) => {
|
|
2052
|
-
if (!(e instanceof HTMLElement)) throw w(e);
|
|
2053
|
-
return {
|
|
2054
|
-
label: e.dataset.label,
|
|
2055
|
-
listType: e.dataset.listType,
|
|
2056
|
-
spread: e.dataset.spread,
|
|
2057
|
-
checked: e.dataset.checked ? e.dataset.checked === "true" : null
|
|
2058
|
-
};
|
|
2059
|
-
}
|
|
2060
|
-
}, ...n?.parseDOM || []],
|
|
2061
|
-
toDOM: (e) => n.toDOM && e.attrs.checked == null ? n.toDOM(e) : [
|
|
2062
|
-
"li",
|
|
2063
|
-
{
|
|
2064
|
-
"data-item-type": "task",
|
|
2065
|
-
"data-label": e.attrs.label,
|
|
2066
|
-
"data-list-type": e.attrs.listType,
|
|
2067
|
-
"data-spread": e.attrs.spread,
|
|
2068
|
-
"data-checked": e.attrs.checked
|
|
2069
|
-
},
|
|
2070
|
-
0
|
|
2071
|
-
],
|
|
2072
|
-
parseMarkdown: {
|
|
2073
|
-
match: ({ type: e }) => e === "listItem",
|
|
2074
|
-
runner: (e, t, r) => {
|
|
2075
|
-
if (t.checked == null) {
|
|
2076
|
-
n.parseMarkdown.runner(e, t, r);
|
|
2077
|
-
return;
|
|
2078
|
-
}
|
|
2079
|
-
let i = t.label == null ? "•" : `${t.label}.`, a = t.checked == null ? null : !!t.checked, o = t.label == null ? "bullet" : "ordered", s = t.spread == null ? "true" : `${t.spread}`;
|
|
2080
|
-
e.openNode(r, {
|
|
2081
|
-
label: i,
|
|
2082
|
-
listType: o,
|
|
2083
|
-
spread: s,
|
|
2084
|
-
checked: a
|
|
2085
|
-
}), e.next(t.children), e.closeNode();
|
|
2086
|
-
}
|
|
2087
|
-
},
|
|
2088
|
-
toMarkdown: {
|
|
2089
|
-
match: (e) => e.type.name === "list_item",
|
|
2090
|
-
runner: (e, t) => {
|
|
2091
|
-
if (t.attrs.checked == null) {
|
|
2092
|
-
n.toMarkdown.runner(e, t);
|
|
2093
|
-
return;
|
|
2094
|
-
}
|
|
2095
|
-
let r = t.attrs.label, i = t.attrs.listType, a = t.attrs.spread === "true", o = t.attrs.checked;
|
|
2096
|
-
e.openNode("listItem", void 0, {
|
|
2097
|
-
label: r,
|
|
2098
|
-
listType: i,
|
|
2099
|
-
spread: a,
|
|
2100
|
-
checked: o
|
|
2101
|
-
}), e.next(t.content), e.closeNode();
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
};
|
|
2105
|
-
});
|
|
2106
|
-
z(gr.node, {
|
|
2107
|
-
displayName: "NodeSchema<taskListItem>",
|
|
2108
|
-
group: "ListItem"
|
|
2109
|
-
}), z(gr.ctx, {
|
|
2110
|
-
displayName: "NodeSchemaCtx<taskListItem>",
|
|
2111
|
-
group: "ListItem"
|
|
2112
|
-
});
|
|
2113
|
-
var _r = de(() => new s(/^\[(?<checked>\s|x)\]\s$/, (e, t, n, r) => {
|
|
2114
|
-
let i = e.doc.resolve(n), a = 0, o = i.node(a);
|
|
2115
|
-
for (; o && o.type.name !== "list_item";) a--, o = i.node(a);
|
|
2116
|
-
if (!o || o.attrs.checked != null) return null;
|
|
2117
|
-
let s = t.groups?.checked === "x", c = i.before(a), l = e.tr;
|
|
2118
|
-
return l.deleteRange(n, r).setNodeMarkup(c, void 0, {
|
|
2119
|
-
...o.attrs,
|
|
2120
|
-
checked: s
|
|
2121
|
-
}), l;
|
|
2122
|
-
}));
|
|
2123
|
-
z(_r, {
|
|
2124
|
-
displayName: "InputRule<wrapInTaskListInputRule>",
|
|
2125
|
-
group: "ListItem"
|
|
2126
|
-
});
|
|
2127
|
-
var vr = [U, $].flat(), yr = [lr, _r], br = [Vn], xr = [ur], Sr = A(() => ze);
|
|
2128
|
-
z(Sr, {
|
|
2129
|
-
displayName: "Prose<autoInsertSpanPlugin>",
|
|
2130
|
-
group: "Prose"
|
|
2131
|
-
});
|
|
2132
|
-
var Cr = A(() => Te({}));
|
|
2133
|
-
z(Cr, {
|
|
2134
|
-
displayName: "Prose<columnResizingPlugin>",
|
|
2135
|
-
group: "Prose"
|
|
2136
|
-
});
|
|
2137
|
-
var wr = A(() => De({ allowTableNodeSelection: !0 }));
|
|
2138
|
-
z(wr, {
|
|
2139
|
-
displayName: "Prose<tableEditingPlugin>",
|
|
2140
|
-
group: "Prose"
|
|
2141
|
-
});
|
|
2142
|
-
var Tr = se("remarkGFM", () => Bn);
|
|
2143
|
-
z(Tr.plugin, {
|
|
2144
|
-
displayName: "Remark<remarkGFMPlugin>",
|
|
2145
|
-
group: "Remark"
|
|
2146
|
-
}), z(Tr.options, {
|
|
2147
|
-
displayName: "RemarkConfig<remarkGFMPlugin>",
|
|
2148
|
-
group: "Remark"
|
|
2149
|
-
});
|
|
2150
|
-
var Er = new E("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");
|
|
2151
|
-
function Dr(e, t) {
|
|
2152
|
-
let n = 0;
|
|
2153
|
-
return t.forEach((t, r, i) => {
|
|
2154
|
-
t === e && (n = i);
|
|
2155
|
-
}), n;
|
|
2156
|
-
}
|
|
2157
|
-
var Or = A(() => new re({
|
|
2158
|
-
key: Er,
|
|
2159
|
-
appendTransaction: (e, t, n) => {
|
|
2160
|
-
let r;
|
|
2161
|
-
return t.doc !== n.doc && n.doc.descendants((e, t) => {
|
|
2162
|
-
if (r ||= n.tr, e.type.name !== "table_cell") return;
|
|
2163
|
-
let i = n.doc.resolve(t), a = i.node(i.depth), o = i.node(i.depth - 1).firstChild;
|
|
2164
|
-
if (!o) return;
|
|
2165
|
-
let s = Dr(e, a), c = o.maybeChild(s);
|
|
2166
|
-
if (!c) return;
|
|
2167
|
-
let l = c.attrs.alignment;
|
|
2168
|
-
l !== e.attrs.alignment && r.setNodeMarkup(t, void 0, {
|
|
2169
|
-
...e.attrs,
|
|
2170
|
-
alignment: l
|
|
2171
|
-
});
|
|
2172
|
-
}), r;
|
|
2173
|
-
}
|
|
2174
|
-
}));
|
|
2175
|
-
z(Or, {
|
|
2176
|
-
displayName: "Prose<keepTableAlignPlugin>",
|
|
2177
|
-
group: "Prose"
|
|
2178
|
-
});
|
|
2179
|
-
var kr = [
|
|
2180
|
-
Or,
|
|
2181
|
-
Sr,
|
|
2182
|
-
Tr,
|
|
2183
|
-
wr
|
|
2184
|
-
].flat(), Ar = [
|
|
2185
|
-
gr,
|
|
2186
|
-
G,
|
|
2187
|
-
K,
|
|
2188
|
-
q,
|
|
2189
|
-
Y,
|
|
2190
|
-
J,
|
|
2191
|
-
pr,
|
|
2192
|
-
hr,
|
|
2193
|
-
B,
|
|
2194
|
-
V
|
|
2195
|
-
].flat(), jr = [
|
|
2196
|
-
Z,
|
|
2197
|
-
X,
|
|
2198
|
-
Q,
|
|
2199
|
-
Zn,
|
|
2200
|
-
Qn,
|
|
2201
|
-
$n,
|
|
2202
|
-
er,
|
|
2203
|
-
tr,
|
|
2204
|
-
nr,
|
|
2205
|
-
rr,
|
|
2206
|
-
or,
|
|
2207
|
-
sr,
|
|
2208
|
-
ir,
|
|
2209
|
-
ar,
|
|
2210
|
-
cr,
|
|
2211
|
-
H
|
|
2212
|
-
], Mr = [
|
|
2213
|
-
Ar,
|
|
2214
|
-
yr,
|
|
2215
|
-
xr,
|
|
2216
|
-
br,
|
|
2217
|
-
vr,
|
|
2218
|
-
jr,
|
|
2219
|
-
kr
|
|
2220
|
-
].flat();
|
|
2221
|
-
//#endregion
|
|
2222
|
-
export { ar as addColAfterCommand, ir as addColBeforeCommand, sr as addRowAfterCommand, or as addRowBeforeCommand, Jn as addRowWithAlignment, Sr as autoInsertSpanPlugin, Cr as columnResizingPlugin, jr as commands, Hn as createTable, rr as deleteSelectedCellsCommand, Q as exitTable, gr as extendListItemSchemaForTask, pr as footnoteDefinitionSchema, hr as footnoteReferenceSchema, Yn as getAllCellsInTable, Un as getCellsInCol, Wn as getCellsInRow, Mr as gfm, Z as goToNextTableCellCommand, X as goToPrevTableCellCommand, yr as inputRules, Zn as insertTableCommand, lr as insertTableInputRule, Or as keepTableAlignPlugin, vr as keymap, br as markInputRules, $n as moveColCommand, Qn as moveRowCommand, xr as pasteRules, kr as plugins, Tr as remarkGFMPlugin, Ar as schema, qn as selectCol, tr as selectColCommand, Gn as selectLine, Kn as selectRow, er as selectRowCommand, Xn as selectTable, nr as selectTableCommand, cr as setAlignCommand, B as strikethroughAttr, Vn as strikethroughInputRule, U as strikethroughKeymap, V as strikethroughSchema, J as tableCellSchema, wr as tableEditingPlugin, K as tableHeaderRowSchema, Y as tableHeaderSchema, $ as tableKeymap, ur as tablePasteRule, q as tableRowSchema, G as tableSchema, H as toggleStrikethroughCommand, _r as wrapInTaskListInputRule };
|