@clevertask/scribe 0.1.22 → 0.1.24
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/README.md +34 -2
- package/dist/{BarMenu-tPZoiOba.js → BarMenu-DW95OBe1.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.js +2 -2
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/index.js +4 -4
- package/dist/{dist-D31OwZrM.js → dist-_L8dTDsy.js} +1 -1
- package/dist/document-node-capabilities.d.ts +47 -0
- package/dist/document-node-capabilities.d.ts.map +1 -0
- package/dist/document-node-capabilities.js +409 -0
- package/dist/{extension-BMUUYPzc.js → extension-B7i7CZ1Y.js} +1 -1
- package/dist/{html-to-markdown-D7PT8MhP.js → html-to-markdown-CKpceHDk.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{markdown-to-html-ChfR7P_Y.js → markdown-to-html-zj2j0HLf.js} +18 -15
- package/dist/{menus-DLKcWlVX.js → menus-BhM4ctz2.js} +2 -2
- package/dist/{purify.es-DGv0-Lid.js → purify.es-CpMrJENN.js} +277 -277
- package/dist/{schema-extensions-CQTswF0n.js → schema-extensions-ggKYCkRf.js} +397 -372
- package/dist/schema-extensions.js +1 -1
- package/dist/schema.d.ts +2 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +4 -3
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +3 -3
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +10 -10
|
@@ -49099,7 +49099,7 @@ function ja(e, t, n) {
|
|
|
49099
49099
|
}
|
|
49100
49100
|
e.consume();
|
|
49101
49101
|
} else if (C === "\\end") {
|
|
49102
|
-
b(), m.length === 1 && S.type === "styling" && S.body.length === 1 && S.body[0].type === "ordgroup" && S.body[0].body.length === 0 && (h.length > 1 || !u) && h.pop(), _.length < h.length + 1 && _.push([]);
|
|
49102
|
+
b(), m.length === 1 && S.type === "styling" && S.body.length === 1 && S.body[0].type === "ordgroup" && S.body[0].body.length === 0 && (h.length > 1 || !u) && !Array.isArray(v?.[v.length - 1]) && h.pop(), _.length < h.length + 1 && _.push([]);
|
|
49103
49103
|
break;
|
|
49104
49104
|
} else if (C === "\\\\") {
|
|
49105
49105
|
e.consume();
|
|
@@ -50838,6 +50838,31 @@ K({
|
|
|
50838
50838
|
var n = new Y("mpadded", [Z(e.body, t)]), r = e.dy.number + e.dy.unit;
|
|
50839
50839
|
return n.setAttribute("voffset", r), n;
|
|
50840
50840
|
}
|
|
50841
|
+
});
|
|
50842
|
+
var no = (e, t) => ({
|
|
50843
|
+
type: "reflectbox",
|
|
50844
|
+
mode: e.parser.mode,
|
|
50845
|
+
body: t[0]
|
|
50846
|
+
});
|
|
50847
|
+
K({
|
|
50848
|
+
type: "reflectbox",
|
|
50849
|
+
names: ["\\reflectbox"],
|
|
50850
|
+
numArgs: 1,
|
|
50851
|
+
argTypes: ["hbox"],
|
|
50852
|
+
allowedInText: !0,
|
|
50853
|
+
handler: no,
|
|
50854
|
+
htmlBuilder(e, t) {
|
|
50855
|
+
return U(["mord", "reflectbox"], [J(e.body, t)], t);
|
|
50856
|
+
},
|
|
50857
|
+
mathmlBuilder(e, t) {
|
|
50858
|
+
return Z(e.body, t);
|
|
50859
|
+
}
|
|
50860
|
+
}), K({
|
|
50861
|
+
type: "reflectbox",
|
|
50862
|
+
names: ["\\mathreflectbox"],
|
|
50863
|
+
numArgs: 1,
|
|
50864
|
+
argTypes: ["math"],
|
|
50865
|
+
handler: no
|
|
50841
50866
|
}), K({
|
|
50842
50867
|
type: "internal",
|
|
50843
50868
|
names: ["\\relax"],
|
|
@@ -50883,14 +50908,14 @@ K({
|
|
|
50883
50908
|
return i >= 0 ? s.setAttribute("height", O(i)) : (s.setAttribute("height", O(i)), s.setAttribute("depth", O(-i))), s.setAttribute("voffset", O(i)), s;
|
|
50884
50909
|
}
|
|
50885
50910
|
});
|
|
50886
|
-
function
|
|
50911
|
+
function ro(e, t, n) {
|
|
50887
50912
|
for (var r = Ir(e, t, !1), i = t.sizeMultiplier / n.sizeMultiplier, a = 0; a < r.length; a++) {
|
|
50888
50913
|
var o = r[a].classes.indexOf("katex-sizing");
|
|
50889
50914
|
o < 0 ? Array.prototype.push.apply(r[a].classes, t.sizingClasses(n)) : r[a].classes[o + 1] === "reset-size" + t.size && (r[a].classes[o + 1] = "reset-size" + n.size), r[a].height *= i, r[a].depth *= i;
|
|
50890
50915
|
}
|
|
50891
50916
|
return hr(r);
|
|
50892
50917
|
}
|
|
50893
|
-
var
|
|
50918
|
+
var io = [
|
|
50894
50919
|
"\\tiny",
|
|
50895
50920
|
"\\sixptsize",
|
|
50896
50921
|
"\\scriptsize",
|
|
@@ -50905,7 +50930,7 @@ var ro = [
|
|
|
50905
50930
|
];
|
|
50906
50931
|
K({
|
|
50907
50932
|
type: "sizing",
|
|
50908
|
-
names:
|
|
50933
|
+
names: io,
|
|
50909
50934
|
numArgs: 0,
|
|
50910
50935
|
allowedInText: !0,
|
|
50911
50936
|
handler: (e, t) => {
|
|
@@ -50913,13 +50938,13 @@ K({
|
|
|
50913
50938
|
return {
|
|
50914
50939
|
type: "sizing",
|
|
50915
50940
|
mode: i.mode,
|
|
50916
|
-
size:
|
|
50941
|
+
size: io.indexOf(r) + 1,
|
|
50917
50942
|
body: a
|
|
50918
50943
|
};
|
|
50919
50944
|
},
|
|
50920
50945
|
htmlBuilder: (e, t) => {
|
|
50921
50946
|
var n = t.havingSize(e.size);
|
|
50922
|
-
return
|
|
50947
|
+
return ro(e.body, n, t);
|
|
50923
50948
|
},
|
|
50924
50949
|
mathmlBuilder: (e, t) => {
|
|
50925
50950
|
var n = t.havingSize(e.size), r = new Y("mstyle", $r(e.body, n));
|
|
@@ -51032,14 +51057,14 @@ K({
|
|
|
51032
51057
|
return r ? new Y("mroot", [Z(n, t), Z(r, t)]) : new Y("msqrt", [Z(n, t)]);
|
|
51033
51058
|
}
|
|
51034
51059
|
});
|
|
51035
|
-
var
|
|
51060
|
+
var ao = {
|
|
51036
51061
|
display: E.DISPLAY,
|
|
51037
51062
|
text: E.TEXT,
|
|
51038
51063
|
script: E.SCRIPT,
|
|
51039
51064
|
scriptscript: E.SCRIPTSCRIPT
|
|
51040
51065
|
};
|
|
51041
|
-
function
|
|
51042
|
-
return e in
|
|
51066
|
+
function oo(e) {
|
|
51067
|
+
return e in ao;
|
|
51043
51068
|
}
|
|
51044
51069
|
K({
|
|
51045
51070
|
type: "styling",
|
|
@@ -51054,7 +51079,7 @@ K({
|
|
|
51054
51079
|
primitive: !0,
|
|
51055
51080
|
handler(e, t) {
|
|
51056
51081
|
var n = e.breakOnTokenText, r = e.funcName, i = e.parser, a = i.parseExpression(!0, n), o = r.slice(1, r.length - 5);
|
|
51057
|
-
if (!
|
|
51082
|
+
if (!oo(o)) throw Error("Unknown style: " + o);
|
|
51058
51083
|
return {
|
|
51059
51084
|
type: "styling",
|
|
51060
51085
|
mode: i.mode,
|
|
@@ -51063,11 +51088,11 @@ K({
|
|
|
51063
51088
|
};
|
|
51064
51089
|
},
|
|
51065
51090
|
htmlBuilder(e, t) {
|
|
51066
|
-
var n =
|
|
51067
|
-
return e.resetFont && (r = r.withFont("")),
|
|
51091
|
+
var n = ao[e.style], r = t.havingStyle(n);
|
|
51092
|
+
return e.resetFont && (r = r.withFont("")), ro(e.body, r, t);
|
|
51068
51093
|
},
|
|
51069
51094
|
mathmlBuilder(e, t) {
|
|
51070
|
-
var n =
|
|
51095
|
+
var n = ao[e.style], r = t.havingStyle(n);
|
|
51071
51096
|
e.resetFont && (r = r.withFont(""));
|
|
51072
51097
|
var i = new Y("mstyle", $r(e.body, r)), a = {
|
|
51073
51098
|
display: ["0", "true"],
|
|
@@ -51078,14 +51103,14 @@ K({
|
|
|
51078
51103
|
return i.setAttribute("scriptlevel", a[0]), i.setAttribute("displaystyle", a[1]), i;
|
|
51079
51104
|
}
|
|
51080
51105
|
});
|
|
51081
|
-
var
|
|
51106
|
+
var so = function(e, t) {
|
|
51082
51107
|
var n = e.base;
|
|
51083
51108
|
return n ? n.type === "op" ? n.limits && (t.style.size === E.DISPLAY.size || n.alwaysHandleSupSub) ? Za : null : n.type === "operatorname" ? n.alwaysHandleSupSub && (t.style.size === E.DISPLAY.size || n.limits) ? to : null : n.type === "accent" ? ot(n.base) ? Ti : null : n.type === "horizBrace" && !e.sub === n.isOver ? Ka : null : null;
|
|
51084
51109
|
};
|
|
51085
51110
|
Ar({
|
|
51086
51111
|
type: "supsub",
|
|
51087
51112
|
htmlBuilder(e, t) {
|
|
51088
|
-
var n =
|
|
51113
|
+
var n = so(e, t);
|
|
51089
51114
|
if (n) return n(e, t);
|
|
51090
51115
|
var r = e.base, i = e.sup, a = e.sub, o = J(r, t), s, c, l = t.fontMetrics(), u = 0, d = 0, f = r && ot(r);
|
|
51091
51116
|
if (i) {
|
|
@@ -51180,7 +51205,7 @@ Ar({
|
|
|
51180
51205
|
return n;
|
|
51181
51206
|
}
|
|
51182
51207
|
});
|
|
51183
|
-
var
|
|
51208
|
+
var co = {
|
|
51184
51209
|
mi: "italic",
|
|
51185
51210
|
mn: "normal",
|
|
51186
51211
|
mtext: "normal"
|
|
@@ -51192,7 +51217,7 @@ Ar({
|
|
|
51192
51217
|
},
|
|
51193
51218
|
mathmlBuilder(e, t) {
|
|
51194
51219
|
var n = new Y("mi", [Jr(e.text, e.mode, t)]), r = Zr(e, t) || "italic";
|
|
51195
|
-
return r !==
|
|
51220
|
+
return r !== co[n.type] && n.setAttribute("mathvariant", r), n;
|
|
51196
51221
|
}
|
|
51197
51222
|
}), Ar({
|
|
51198
51223
|
type: "textord",
|
|
@@ -51201,10 +51226,10 @@ Ar({
|
|
|
51201
51226
|
},
|
|
51202
51227
|
mathmlBuilder(e, t) {
|
|
51203
51228
|
var n = Jr(e.text, e.mode, t), r = Zr(e, t) || "normal", i = e.mode === "text" ? new Y("mtext", [n]) : /[0-9]/.test(e.text) ? new Y("mn", [n]) : e.text === "\\prime" ? new Y("mo", [n]) : new Y("mi", [n]);
|
|
51204
|
-
return r !==
|
|
51229
|
+
return r !== co[i.type] && i.setAttribute("mathvariant", r), i;
|
|
51205
51230
|
}
|
|
51206
51231
|
});
|
|
51207
|
-
var
|
|
51232
|
+
var lo = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "allowbreak"]]), uo = /* @__PURE__ */ new Map([
|
|
51208
51233
|
[" ", {}],
|
|
51209
51234
|
["\\ ", {}],
|
|
51210
51235
|
["~", { className: "nobreak" }],
|
|
@@ -51214,7 +51239,7 @@ var co = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "al
|
|
|
51214
51239
|
Ar({
|
|
51215
51240
|
type: "spacing",
|
|
51216
51241
|
htmlBuilder(e, t) {
|
|
51217
|
-
var n =
|
|
51242
|
+
var n = uo.get(e.text), r = lo.get(e.text);
|
|
51218
51243
|
if (n) {
|
|
51219
51244
|
var i = n.className || "";
|
|
51220
51245
|
if (e.mode === "text") {
|
|
@@ -51228,13 +51253,13 @@ Ar({
|
|
|
51228
51253
|
},
|
|
51229
51254
|
mathmlBuilder(e, t) {
|
|
51230
51255
|
var n;
|
|
51231
|
-
if (
|
|
51232
|
-
else if (
|
|
51256
|
+
if (uo.has(e.text)) n = new Y("mtext", [new X("\xA0")]);
|
|
51257
|
+
else if (lo.has(e.text)) return new Y("mspace");
|
|
51233
51258
|
else throw new T("Unknown type of space \"" + e.text + "\"");
|
|
51234
51259
|
return n;
|
|
51235
51260
|
}
|
|
51236
51261
|
});
|
|
51237
|
-
var
|
|
51262
|
+
var fo = () => {
|
|
51238
51263
|
var e = new Y("mtd", []);
|
|
51239
51264
|
return e.setAttribute("width", "50%"), e;
|
|
51240
51265
|
};
|
|
@@ -51242,29 +51267,29 @@ Ar({
|
|
|
51242
51267
|
type: "tag",
|
|
51243
51268
|
mathmlBuilder(e, t) {
|
|
51244
51269
|
var n = new Y("mtable", [new Y("mtr", [
|
|
51245
|
-
|
|
51270
|
+
fo(),
|
|
51246
51271
|
new Y("mtd", [ei(e.body, t)]),
|
|
51247
|
-
|
|
51272
|
+
fo(),
|
|
51248
51273
|
new Y("mtd", [ei(e.tag, t)])
|
|
51249
51274
|
])]);
|
|
51250
51275
|
return n.setAttribute("width", "100%"), n;
|
|
51251
51276
|
}
|
|
51252
51277
|
});
|
|
51253
|
-
var
|
|
51278
|
+
var po = {
|
|
51254
51279
|
"\\text": void 0,
|
|
51255
51280
|
"\\textrm": "textrm",
|
|
51256
51281
|
"\\textsf": "textsf",
|
|
51257
51282
|
"\\texttt": "texttt",
|
|
51258
51283
|
"\\textnormal": "textrm"
|
|
51259
|
-
},
|
|
51284
|
+
}, mo = {
|
|
51260
51285
|
"\\textbf": "textbf",
|
|
51261
51286
|
"\\textmd": "textmd"
|
|
51262
|
-
},
|
|
51287
|
+
}, ho = {
|
|
51263
51288
|
"\\textit": "textit",
|
|
51264
51289
|
"\\textup": "textup"
|
|
51265
|
-
},
|
|
51290
|
+
}, go = (e, t) => {
|
|
51266
51291
|
var n = e.font;
|
|
51267
|
-
return n ?
|
|
51292
|
+
return n ? po[n] ? t.withTextFontFamily(po[n]) : mo[n] ? t.withTextFontWeight(mo[n]) : n === "\\emph" ? t.fontShape === "textit" ? t.withTextFontShape("textup") : t.withTextFontShape("textit") : t.withTextFontShape(ho[n]) : t;
|
|
51268
51293
|
};
|
|
51269
51294
|
K({
|
|
51270
51295
|
type: "text",
|
|
@@ -51294,11 +51319,11 @@ K({
|
|
|
51294
51319
|
};
|
|
51295
51320
|
},
|
|
51296
51321
|
htmlBuilder(e, t) {
|
|
51297
|
-
var n =
|
|
51322
|
+
var n = go(e, t);
|
|
51298
51323
|
return U(["mord", "text"], Ir(e.body, n, !0), n);
|
|
51299
51324
|
},
|
|
51300
51325
|
mathmlBuilder(e, t) {
|
|
51301
|
-
var n =
|
|
51326
|
+
var n = go(e, t);
|
|
51302
51327
|
return ei(e.body, n);
|
|
51303
51328
|
}
|
|
51304
51329
|
}), K({
|
|
@@ -51380,20 +51405,20 @@ K({
|
|
|
51380
51405
|
throw new T("\\verb ended by end of line instead of matching delimiter");
|
|
51381
51406
|
},
|
|
51382
51407
|
htmlBuilder(e, t) {
|
|
51383
|
-
for (var n =
|
|
51408
|
+
for (var n = _o(e), r = [], i = t.havingStyle(t.style.text()), a = 0; a < n.length; a++) {
|
|
51384
51409
|
var o = n[a];
|
|
51385
51410
|
o === "~" && (o = "\\textasciitilde"), r.push(ar(o, "Typewriter-Regular", e.mode, i, ["mord", "texttt"]));
|
|
51386
51411
|
}
|
|
51387
51412
|
return U(["mord", "text"].concat(i.sizingClasses(t)), ur(r), i);
|
|
51388
51413
|
},
|
|
51389
51414
|
mathmlBuilder(e, t) {
|
|
51390
|
-
var n = new Y("mtext", [new X(
|
|
51415
|
+
var n = new Y("mtext", [new X(_o(e))]);
|
|
51391
51416
|
return n.setAttribute("mathvariant", "monospace"), n;
|
|
51392
51417
|
}
|
|
51393
51418
|
});
|
|
51394
|
-
var
|
|
51419
|
+
var _o = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), vo = Dr, yo = "[ \r\n ]", bo = "\\\\[a-zA-Z@]+", xo = "\\\\[^\ud800-\udfff]", So = "(" + bo + ")" + yo + "*", Co = "\\\\(\n|[ \r ]+\n?)[ \r ]*", wo = "[̀-ͯ]", To = RegExp(wo + "+$"), Eo = "(" + yo + "+)|" + (Co + "|") + "([!-\\[\\]-‧-豈-]" + (wo + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (wo + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + So) + ("|" + xo + ")"), Do = class {
|
|
51395
51420
|
constructor(e, t) {
|
|
51396
|
-
this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(
|
|
51421
|
+
this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(Eo, "g"), this.catcodes = {
|
|
51397
51422
|
"%": 14,
|
|
51398
51423
|
"~": 13
|
|
51399
51424
|
};
|
|
@@ -51413,7 +51438,7 @@ var go = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), _o = Dr, vo = "[
|
|
|
51413
51438
|
}
|
|
51414
51439
|
return new Ea(r, new Ta(this, t, this.tokenRegex.lastIndex));
|
|
51415
51440
|
}
|
|
51416
|
-
},
|
|
51441
|
+
}, Oo = class {
|
|
51417
51442
|
constructor(e, t) {
|
|
51418
51443
|
e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
|
|
51419
51444
|
}
|
|
@@ -51445,7 +51470,7 @@ var go = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), _o = Dr, vo = "[
|
|
|
51445
51470
|
}
|
|
51446
51471
|
t == null ? delete this.current[e] : this.current[e] = t;
|
|
51447
51472
|
}
|
|
51448
|
-
},
|
|
51473
|
+
}, ko = wa;
|
|
51449
51474
|
$("\\noexpand", function(e) {
|
|
51450
51475
|
var t = e.popToken();
|
|
51451
51476
|
return e.isExpandable(t.text) && (t.noexpand = !0, t.treatAsRelax = !0), {
|
|
@@ -51489,7 +51514,7 @@ $("\\noexpand", function(e) {
|
|
|
51489
51514
|
numArgs: 0
|
|
51490
51515
|
};
|
|
51491
51516
|
});
|
|
51492
|
-
var
|
|
51517
|
+
var Ao = {
|
|
51493
51518
|
0: 0,
|
|
51494
51519
|
1: 1,
|
|
51495
51520
|
2: 2,
|
|
@@ -51523,12 +51548,12 @@ $("\\char", function(e) {
|
|
|
51523
51548
|
else r = t.text.charCodeAt(0);
|
|
51524
51549
|
} else n = 10;
|
|
51525
51550
|
if (n) {
|
|
51526
|
-
if (r =
|
|
51527
|
-
for (var i; (i =
|
|
51551
|
+
if (r = Ao[t.text], r == null || r >= n) throw new T("Invalid base-" + n + " digit " + t.text);
|
|
51552
|
+
for (var i; (i = Ao[e.future().text]) != null && i < n;) r *= n, r += i, e.popToken();
|
|
51528
51553
|
}
|
|
51529
51554
|
return "\\@char{" + r + "}";
|
|
51530
51555
|
});
|
|
51531
|
-
var
|
|
51556
|
+
var jo = (e, t, n, r) => {
|
|
51532
51557
|
var i = e.consumeArg().tokens;
|
|
51533
51558
|
if (i.length !== 1) throw new T("\\newcommand's first argument must be a macro name");
|
|
51534
51559
|
var a = i[0].text, o = e.isDefined(a);
|
|
@@ -51545,7 +51570,7 @@ var Ao = (e, t, n, r) => {
|
|
|
51545
51570
|
numArgs: s
|
|
51546
51571
|
}), "";
|
|
51547
51572
|
};
|
|
51548
|
-
$("\\newcommand", (e) =>
|
|
51573
|
+
$("\\newcommand", (e) => jo(e, !1, !0, !1)), $("\\renewcommand", (e) => jo(e, !0, !1, !1)), $("\\providecommand", (e) => jo(e, !0, !0, !0)), $("\\message", (e) => {
|
|
51549
51574
|
var t = e.consumeArgs(1)[0];
|
|
51550
51575
|
return console.log(t.reverse().map((e) => e.text).join("")), "";
|
|
51551
51576
|
}), $("\\errmessage", (e) => {
|
|
@@ -51553,9 +51578,9 @@ $("\\newcommand", (e) => Ao(e, !1, !0, !1)), $("\\renewcommand", (e) => Ao(e, !0
|
|
|
51553
51578
|
return console.error(t.reverse().map((e) => e.text).join("")), "";
|
|
51554
51579
|
}), $("\\show", (e) => {
|
|
51555
51580
|
var t = e.popToken(), n = t.text;
|
|
51556
|
-
return console.log(t, e.macros.get(n),
|
|
51581
|
+
return console.log(t, e.macros.get(n), vo[n], k.math[n], k.text[n]), "";
|
|
51557
51582
|
}), $("\\bgroup", "{"), $("\\egroup", "}"), $("~", "\\nobreakspace"), $("\\lq", "`"), $("\\rq", "'"), $("\\aa", "\\r a"), $("\\AA", "\\r A"), $("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), $("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), $("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), $("ℬ", "\\mathscr{B}"), $("ℰ", "\\mathscr{E}"), $("ℱ", "\\mathscr{F}"), $("ℋ", "\\mathscr{H}"), $("ℐ", "\\mathscr{I}"), $("ℒ", "\\mathscr{L}"), $("ℳ", "\\mathscr{M}"), $("ℛ", "\\mathscr{R}"), $("ℭ", "\\mathfrak{C}"), $("ℌ", "\\mathfrak{H}"), $("ℨ", "\\mathfrak{Z}"), $("\\Bbbk", "\\Bbb{k}"), $("\\llap", "\\mathllap{\\textrm{#1}}"), $("\\rlap", "\\mathrlap{\\textrm{#1}}"), $("\\clap", "\\mathclap{\\textrm{#1}}"), $("\\mathstrut", "\\vphantom{(}"), $("\\underbar", "\\underline{\\text{#1}}"), $("\\not", "\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char\"338}"), $("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), $("\\ne", "\\neq"), $("≠", "\\neq"), $("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), $("∉", "\\notin"), $("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), $("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), $("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), $("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), $("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), $("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), $("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), $("⟂", "\\perp"), $("‼", "\\mathclose{!\\mkern-0.8mu!}"), $("∌", "\\notni"), $("⌜", "\\ulcorner"), $("⌝", "\\urcorner"), $("⌞", "\\llcorner"), $("⌟", "\\lrcorner"), $("©", "\\copyright"), $("®", "\\textregistered"), $("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"), $("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"), $("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"), $("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"), $("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}"), $("⋮", "\\vdots"), $("\\varGamma", "\\mathit{\\Gamma}"), $("\\varDelta", "\\mathit{\\Delta}"), $("\\varTheta", "\\mathit{\\Theta}"), $("\\varLambda", "\\mathit{\\Lambda}"), $("\\varXi", "\\mathit{\\Xi}"), $("\\varPi", "\\mathit{\\Pi}"), $("\\varSigma", "\\mathit{\\Sigma}"), $("\\varUpsilon", "\\mathit{\\Upsilon}"), $("\\varPhi", "\\mathit{\\Phi}"), $("\\varPsi", "\\mathit{\\Psi}"), $("\\varOmega", "\\mathit{\\Omega}"), $("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), $("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), $("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), $("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), $("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), $("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"), $("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"), $("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
|
|
51558
|
-
var
|
|
51583
|
+
var Mo = {
|
|
51559
51584
|
",": "\\dotsc",
|
|
51560
51585
|
"\\not": "\\dotsb",
|
|
51561
51586
|
"+": "\\dotsb",
|
|
@@ -51603,12 +51628,12 @@ var jo = {
|
|
|
51603
51628
|
"\\iiiint": "\\dotsi",
|
|
51604
51629
|
"\\idotsint": "\\dotsi",
|
|
51605
51630
|
"\\DOTSX": "\\dotsx"
|
|
51606
|
-
},
|
|
51631
|
+
}, No = /* @__PURE__ */ new Set(["bin", "rel"]);
|
|
51607
51632
|
$("\\dots", function(e) {
|
|
51608
51633
|
var t = "\\dotso", n = e.expandAfterFuture().text;
|
|
51609
|
-
return n in
|
|
51634
|
+
return n in Mo ? t = Mo[n] : (n.slice(0, 4) === "\\not" || n in k.math && No.has(k.math[n].group)) && (t = "\\dotsb"), t;
|
|
51610
51635
|
});
|
|
51611
|
-
var
|
|
51636
|
+
var Po = {
|
|
51612
51637
|
")": !0,
|
|
51613
51638
|
"]": !0,
|
|
51614
51639
|
"\\rbrack": !0,
|
|
@@ -51630,19 +51655,19 @@ var No = {
|
|
|
51630
51655
|
",": !0
|
|
51631
51656
|
};
|
|
51632
51657
|
$("\\dotso", function(e) {
|
|
51633
|
-
return e.future().text in
|
|
51658
|
+
return e.future().text in Po ? "\\ldots\\," : "\\ldots";
|
|
51634
51659
|
}), $("\\dotsc", function(e) {
|
|
51635
51660
|
var t = e.future().text;
|
|
51636
|
-
return t in
|
|
51661
|
+
return t in Po && t !== "," ? "\\ldots\\," : "\\ldots";
|
|
51637
51662
|
}), $("\\cdots", function(e) {
|
|
51638
|
-
return e.future().text in
|
|
51663
|
+
return e.future().text in Po ? "\\@cdots\\," : "\\@cdots";
|
|
51639
51664
|
}), $("\\dotsb", "\\cdots"), $("\\dotsm", "\\cdots"), $("\\dotsi", "\\!\\cdots"), $("\\dotsx", "\\ldots\\,"), $("\\DOTSI", "\\relax"), $("\\DOTSB", "\\relax"), $("\\DOTSX", "\\relax"), $("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), $("\\,", "\\tmspace+{3mu}{.1667em}"), $("\\thinspace", "\\,"), $("\\>", "\\mskip{4mu}"), $("\\:", "\\tmspace+{4mu}{.2222em}"), $("\\medspace", "\\:"), $("\\;", "\\tmspace+{5mu}{.2777em}"), $("\\thickspace", "\\;"), $("\\!", "\\tmspace-{3mu}{.1667em}"), $("\\negthinspace", "\\!"), $("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), $("\\negthickspace", "\\tmspace-{5mu}{.277em}"), $("\\enspace", "\\kern.5em "), $("\\enskip", "\\hskip.5em\\relax"), $("\\quad", "\\hskip1em\\relax"), $("\\qquad", "\\hskip2em\\relax"), $("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), $("\\tag@paren", "\\tag@literal{({#1})}"), $("\\tag@literal", (e) => {
|
|
51640
51665
|
if (e.macros.get("\\df@tag")) throw new T("Multiple \\tag");
|
|
51641
51666
|
return "\\gdef\\df@tag{\\text{#1}}";
|
|
51642
51667
|
}), $("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), $("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), $("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), $("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), $("\\newline", "\\\\\\relax"), $("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
|
|
51643
|
-
var
|
|
51644
|
-
$("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" +
|
|
51645
|
-
var
|
|
51668
|
+
var Fo = O(hn["Main-Regular"][84][1] - .7 * hn["Main-Regular"][65][1]);
|
|
51669
|
+
$("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + Fo + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), $("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + Fo + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), $("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), $("\\@hspace", "\\hskip #1\\relax"), $("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), $("\\ordinarycolon", ":"), $("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), $("\\dblcolon", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char\"2237}}"), $("\\coloneqq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2254}}"), $("\\Coloneqq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2237\\char\"3d}}"), $("\\coloneq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"3a\\char\"2212}}"), $("\\Coloneq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"2237\\char\"2212}}"), $("\\eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2255}}"), $("\\Eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"3d\\char\"2237}}"), $("\\eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2239}}"), $("\\Eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"2212\\char\"2237}}"), $("\\colonapprox", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"3a\\char\"2248}}"), $("\\Colonapprox", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"2237\\char\"2248}}"), $("\\colonsim", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"3a\\char\"223c}}"), $("\\Colonsim", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"2237\\char\"223c}}"), $("∷", "\\dblcolon"), $("∹", "\\eqcolon"), $("≔", "\\coloneqq"), $("≕", "\\eqqcolon"), $("⩴", "\\Coloneqq"), $("\\ratio", "\\vcentcolon"), $("\\coloncolon", "\\dblcolon"), $("\\colonequals", "\\coloneqq"), $("\\coloncolonequals", "\\Coloneqq"), $("\\equalscolon", "\\eqqcolon"), $("\\equalscoloncolon", "\\Eqqcolon"), $("\\colonminus", "\\coloneq"), $("\\coloncolonminus", "\\Coloneq"), $("\\minuscolon", "\\eqcolon"), $("\\minuscoloncolon", "\\Eqcolon"), $("\\coloncolonapprox", "\\Colonapprox"), $("\\coloncolonsim", "\\Colonsim"), $("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), $("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), $("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), $("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), $("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), $("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), $("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), $("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), $("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), $("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), $("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), $("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), $("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), $("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), $("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), $("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), $("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), $("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), $("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), $("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), $("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), $("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), $("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), $("\\imath", "\\html@mathml{\\@imath}{ı}"), $("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), $("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), $("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), $("⟦", "\\llbracket"), $("⟧", "\\rrbracket"), $("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), $("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), $("↤", "\\mapsfrom"), $("\\mapsfrom", "\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"), $("⦃", "\\lBrace"), $("⦄", "\\rBrace"), $("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), $("⦵", "\\minuso"), $("\\darr", "\\downarrow"), $("\\dArr", "\\Downarrow"), $("\\Darr", "\\Downarrow"), $("\\lang", "\\langle"), $("\\rang", "\\rangle"), $("\\uarr", "\\uparrow"), $("\\uArr", "\\Uparrow"), $("\\Uarr", "\\Uparrow"), $("\\N", "\\mathbb{N}"), $("\\R", "\\mathbb{R}"), $("\\Z", "\\mathbb{Z}"), $("\\alef", "\\aleph"), $("\\alefsym", "\\aleph"), $("\\Alpha", "\\mathrm{A}"), $("\\Beta", "\\mathrm{B}"), $("\\bull", "\\bullet"), $("\\Chi", "\\mathrm{X}"), $("\\clubs", "\\clubsuit"), $("\\cnums", "\\mathbb{C}"), $("\\Complex", "\\mathbb{C}"), $("\\Dagger", "\\ddagger"), $("\\diamonds", "\\diamondsuit"), $("\\empty", "\\emptyset"), $("\\Epsilon", "\\mathrm{E}"), $("\\Eta", "\\mathrm{H}"), $("\\exist", "\\exists"), $("\\harr", "\\leftrightarrow"), $("\\hArr", "\\Leftrightarrow"), $("\\Harr", "\\Leftrightarrow"), $("\\hearts", "\\heartsuit"), $("\\image", "\\Im"), $("\\infin", "\\infty"), $("\\Iota", "\\mathrm{I}"), $("\\isin", "\\in"), $("\\Kappa", "\\mathrm{K}"), $("\\larr", "\\leftarrow"), $("\\lArr", "\\Leftarrow"), $("\\Larr", "\\Leftarrow"), $("\\lrarr", "\\leftrightarrow"), $("\\lrArr", "\\Leftrightarrow"), $("\\Lrarr", "\\Leftrightarrow"), $("\\Mu", "\\mathrm{M}"), $("\\natnums", "\\mathbb{N}"), $("\\Nu", "\\mathrm{N}"), $("\\Omicron", "\\mathrm{O}"), $("\\plusmn", "\\pm"), $("\\rarr", "\\rightarrow"), $("\\rArr", "\\Rightarrow"), $("\\Rarr", "\\Rightarrow"), $("\\real", "\\Re"), $("\\reals", "\\mathbb{R}"), $("\\Reals", "\\mathbb{R}"), $("\\Rho", "\\mathrm{P}"), $("\\sdot", "\\cdot"), $("\\sect", "\\S"), $("\\spades", "\\spadesuit"), $("\\sub", "\\subset"), $("\\sube", "\\subseteq"), $("\\supe", "\\supseteq"), $("\\Tau", "\\mathrm{T}"), $("\\thetasym", "\\vartheta"), $("\\weierp", "\\wp"), $("\\Zeta", "\\mathrm{Z}"), $("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), $("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), $("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), $("\\bra", "\\mathinner{\\langle{#1}|}"), $("\\ket", "\\mathinner{|{#1}\\rangle}"), $("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), $("\\Bra", "\\left\\langle#1\\right|"), $("\\Ket", "\\left|#1\\right\\rangle");
|
|
51670
|
+
var Io = (e) => (t) => {
|
|
51646
51671
|
var n = t.consumeArg().tokens, r = t.consumeArg().tokens, i = t.consumeArg().tokens, a = t.consumeArg().tokens, o = t.macros.get("|"), s = t.macros.get("\\|");
|
|
51647
51672
|
t.macros.beginGroup();
|
|
51648
51673
|
var c = (t) => (n) => {
|
|
@@ -51664,18 +51689,18 @@ var Fo = (e) => (t) => {
|
|
|
51664
51689
|
numArgs: 0
|
|
51665
51690
|
};
|
|
51666
51691
|
};
|
|
51667
|
-
$("\\bra@ket",
|
|
51668
|
-
var
|
|
51692
|
+
$("\\bra@ket", Io(!1)), $("\\bra@set", Io(!0)), $("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), $("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), $("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), $("\\angln", "{\\angl n}"), $("\\blue", "\\textcolor{##6495ed}{#1}"), $("\\orange", "\\textcolor{##ffa500}{#1}"), $("\\pink", "\\textcolor{##ff00af}{#1}"), $("\\red", "\\textcolor{##df0030}{#1}"), $("\\green", "\\textcolor{##28ae7b}{#1}"), $("\\gray", "\\textcolor{gray}{#1}"), $("\\purple", "\\textcolor{##9d38bd}{#1}"), $("\\blueA", "\\textcolor{##ccfaff}{#1}"), $("\\blueB", "\\textcolor{##80f6ff}{#1}"), $("\\blueC", "\\textcolor{##63d9ea}{#1}"), $("\\blueD", "\\textcolor{##11accd}{#1}"), $("\\blueE", "\\textcolor{##0c7f99}{#1}"), $("\\tealA", "\\textcolor{##94fff5}{#1}"), $("\\tealB", "\\textcolor{##26edd5}{#1}"), $("\\tealC", "\\textcolor{##01d1c1}{#1}"), $("\\tealD", "\\textcolor{##01a995}{#1}"), $("\\tealE", "\\textcolor{##208170}{#1}"), $("\\greenA", "\\textcolor{##b6ffb0}{#1}"), $("\\greenB", "\\textcolor{##8af281}{#1}"), $("\\greenC", "\\textcolor{##74cf70}{#1}"), $("\\greenD", "\\textcolor{##1fab54}{#1}"), $("\\greenE", "\\textcolor{##0d923f}{#1}"), $("\\goldA", "\\textcolor{##ffd0a9}{#1}"), $("\\goldB", "\\textcolor{##ffbb71}{#1}"), $("\\goldC", "\\textcolor{##ff9c39}{#1}"), $("\\goldD", "\\textcolor{##e07d10}{#1}"), $("\\goldE", "\\textcolor{##a75a05}{#1}"), $("\\redA", "\\textcolor{##fca9a9}{#1}"), $("\\redB", "\\textcolor{##ff8482}{#1}"), $("\\redC", "\\textcolor{##f9685d}{#1}"), $("\\redD", "\\textcolor{##e84d39}{#1}"), $("\\redE", "\\textcolor{##bc2612}{#1}"), $("\\maroonA", "\\textcolor{##ffbde0}{#1}"), $("\\maroonB", "\\textcolor{##ff92c6}{#1}"), $("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), $("\\maroonD", "\\textcolor{##ca337c}{#1}"), $("\\maroonE", "\\textcolor{##9e034e}{#1}"), $("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), $("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), $("\\purpleC", "\\textcolor{##aa87ff}{#1}"), $("\\purpleD", "\\textcolor{##7854ab}{#1}"), $("\\purpleE", "\\textcolor{##543b78}{#1}"), $("\\mintA", "\\textcolor{##f5f9e8}{#1}"), $("\\mintB", "\\textcolor{##edf2df}{#1}"), $("\\mintC", "\\textcolor{##e0e5cc}{#1}"), $("\\grayA", "\\textcolor{##f6f7f7}{#1}"), $("\\grayB", "\\textcolor{##f0f1f2}{#1}"), $("\\grayC", "\\textcolor{##e3e5e6}{#1}"), $("\\grayD", "\\textcolor{##d6d8da}{#1}"), $("\\grayE", "\\textcolor{##babec2}{#1}"), $("\\grayF", "\\textcolor{##888d93}{#1}"), $("\\grayG", "\\textcolor{##626569}{#1}"), $("\\grayH", "\\textcolor{##3b3e40}{#1}"), $("\\grayI", "\\textcolor{##21242c}{#1}"), $("\\kaBlue", "\\textcolor{##314453}{#1}"), $("\\kaGreen", "\\textcolor{##71B307}{#1}");
|
|
51693
|
+
var Lo = {
|
|
51669
51694
|
"^": !0,
|
|
51670
51695
|
_: !0,
|
|
51671
51696
|
"\\limits": !0,
|
|
51672
51697
|
"\\nolimits": !0
|
|
51673
|
-
},
|
|
51698
|
+
}, Ro = class {
|
|
51674
51699
|
constructor(e, t, n) {
|
|
51675
|
-
this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new
|
|
51700
|
+
this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new Oo(ko, t.macros), this.mode = n, this.stack = [];
|
|
51676
51701
|
}
|
|
51677
51702
|
feed(e) {
|
|
51678
|
-
this.lexer = new
|
|
51703
|
+
this.lexer = new Do(e, this.settings);
|
|
51679
51704
|
}
|
|
51680
51705
|
switchMode(e) {
|
|
51681
51706
|
this.mode = e;
|
|
@@ -51812,7 +51837,7 @@ var Io = {
|
|
|
51812
51837
|
if (typeof r == "string") {
|
|
51813
51838
|
var i = 0;
|
|
51814
51839
|
if (r.includes("#")) for (var a = r.replace(/##/g, ""); a.includes("#" + (i + 1));) ++i;
|
|
51815
|
-
for (var o = new
|
|
51840
|
+
for (var o = new Do(r, this.settings), s = [], c = o.lex(); c.text !== "EOF";) s.push(c), c = o.lex();
|
|
51816
51841
|
return s.reverse(), {
|
|
51817
51842
|
tokens: s,
|
|
51818
51843
|
numArgs: i
|
|
@@ -51821,13 +51846,13 @@ var Io = {
|
|
|
51821
51846
|
return r;
|
|
51822
51847
|
}
|
|
51823
51848
|
isDefined(e) {
|
|
51824
|
-
return this.macros.has(e) || Object.prototype.hasOwnProperty.call(
|
|
51849
|
+
return this.macros.has(e) || Object.prototype.hasOwnProperty.call(vo, e) || Object.prototype.hasOwnProperty.call(k.math, e) || Object.prototype.hasOwnProperty.call(k.text, e) || Object.prototype.hasOwnProperty.call(Lo, e);
|
|
51825
51850
|
}
|
|
51826
51851
|
isExpandable(e) {
|
|
51827
51852
|
var t = this.macros.get(e);
|
|
51828
|
-
return t == null ? Object.prototype.hasOwnProperty.call(
|
|
51853
|
+
return t == null ? Object.prototype.hasOwnProperty.call(vo, e) && !vo[e].primitive : typeof t == "string" || typeof t == "function" || !t.unexpandable;
|
|
51829
51854
|
}
|
|
51830
|
-
},
|
|
51855
|
+
}, zo = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Bo = Object.freeze({
|
|
51831
51856
|
"₊": "+",
|
|
51832
51857
|
"₋": "-",
|
|
51833
51858
|
"₌": "=",
|
|
@@ -51930,7 +51955,7 @@ var Io = {
|
|
|
51930
51955
|
ᵠ: "ϕ",
|
|
51931
51956
|
ᵡ: "χ",
|
|
51932
51957
|
ᶿ: "θ"
|
|
51933
|
-
}),
|
|
51958
|
+
}), Vo = {
|
|
51934
51959
|
"́": {
|
|
51935
51960
|
text: "\\'",
|
|
51936
51961
|
math: "\\acute"
|
|
@@ -51973,7 +51998,7 @@ var Io = {
|
|
|
51973
51998
|
},
|
|
51974
51999
|
"̋": { text: "\\H" },
|
|
51975
52000
|
"̧": { text: "\\c" }
|
|
51976
|
-
},
|
|
52001
|
+
}, Ho = {
|
|
51977
52002
|
á: "á",
|
|
51978
52003
|
à: "à",
|
|
51979
52004
|
ä: "ä",
|
|
@@ -52318,9 +52343,9 @@ var Io = {
|
|
|
52318
52343
|
Ῠ: "Ῠ",
|
|
52319
52344
|
Ώ: "Ώ",
|
|
52320
52345
|
Ὼ: "Ὼ"
|
|
52321
|
-
},
|
|
52346
|
+
}, Uo = class e {
|
|
52322
52347
|
constructor(e, t) {
|
|
52323
|
-
this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new
|
|
52348
|
+
this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new Ro(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
|
|
52324
52349
|
}
|
|
52325
52350
|
expect(e, t) {
|
|
52326
52351
|
if (t === void 0 && (t = !0), this.fetch().text !== e) throw new T("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
|
|
@@ -52354,7 +52379,7 @@ var Io = {
|
|
|
52354
52379
|
for (var r = [];;) {
|
|
52355
52380
|
this.mode === "math" && this.consumeSpaces();
|
|
52356
52381
|
var i = this.fetch();
|
|
52357
|
-
if (e.endOfExpression.has(i.text) || n && i.text === n || t &&
|
|
52382
|
+
if (e.endOfExpression.has(i.text) || n && i.text === n || t && vo[i.text] && vo[i.text].infix) break;
|
|
52358
52383
|
var a = this.parseAtom(n);
|
|
52359
52384
|
if (!a) break;
|
|
52360
52385
|
a.type !== "internal" && r.push(a);
|
|
@@ -52445,12 +52470,12 @@ var Io = {
|
|
|
52445
52470
|
mode: this.mode,
|
|
52446
52471
|
body: o
|
|
52447
52472
|
};
|
|
52448
|
-
} else if (
|
|
52449
|
-
var s =
|
|
52450
|
-
for (c.push(new Ea(
|
|
52473
|
+
} else if (Bo[i.text]) {
|
|
52474
|
+
var s = zo.test(i.text), c = [];
|
|
52475
|
+
for (c.push(new Ea(Bo[i.text])), this.consume();;) {
|
|
52451
52476
|
var l = this.fetch().text;
|
|
52452
|
-
if (!
|
|
52453
|
-
c.unshift(new Ea(
|
|
52477
|
+
if (!Bo[l] || zo.test(l) !== s) break;
|
|
52478
|
+
c.unshift(new Ea(Bo[l])), this.consume();
|
|
52454
52479
|
}
|
|
52455
52480
|
var u = this.subparse(c);
|
|
52456
52481
|
s ? r = {
|
|
@@ -52483,7 +52508,7 @@ var Io = {
|
|
|
52483
52508
|
} : t;
|
|
52484
52509
|
}
|
|
52485
52510
|
parseFunction(e, t) {
|
|
52486
|
-
var n = this.fetch(), r = n.text, i =
|
|
52511
|
+
var n = this.fetch(), r = n.text, i = vo[r];
|
|
52487
52512
|
if (!i) return null;
|
|
52488
52513
|
if (this.consume(), t && t !== "atom" && !i.allowedInArgument) throw new T("Got function '" + r + "' with no arguments" + (t ? " as " + t : ""), n);
|
|
52489
52514
|
if (this.mode === "text" && !i.allowedInText) throw new T("Can't use function '" + r + "' in text mode", n);
|
|
@@ -52497,7 +52522,7 @@ var Io = {
|
|
|
52497
52522
|
parser: this,
|
|
52498
52523
|
token: r,
|
|
52499
52524
|
breakOnTokenText: i
|
|
52500
|
-
}, o =
|
|
52525
|
+
}, o = vo[e];
|
|
52501
52526
|
if (o && o.handler) return o.handler(a, t, n);
|
|
52502
52527
|
throw new T("No function handler for " + e);
|
|
52503
52528
|
}
|
|
@@ -52637,7 +52662,7 @@ var Io = {
|
|
|
52637
52662
|
body: o,
|
|
52638
52663
|
semisimple: r === "\\begingroup" || void 0
|
|
52639
52664
|
};
|
|
52640
|
-
} else if (i = this.parseFunction(t, e) || this.parseSymbol(), i == null && r[0] === "\\" && !Object.prototype.hasOwnProperty.call(
|
|
52665
|
+
} else if (i = this.parseFunction(t, e) || this.parseSymbol(), i == null && r[0] === "\\" && !Object.prototype.hasOwnProperty.call(Lo, r)) {
|
|
52641
52666
|
if (this.settings.throwOnError) throw new T("Undefined control sequence: " + r, n);
|
|
52642
52667
|
i = this.formatUnsupportedCmd(r), this.consume();
|
|
52643
52668
|
}
|
|
@@ -52686,8 +52711,8 @@ var Io = {
|
|
|
52686
52711
|
star: r
|
|
52687
52712
|
};
|
|
52688
52713
|
}
|
|
52689
|
-
Object.prototype.hasOwnProperty.call(
|
|
52690
|
-
var i =
|
|
52714
|
+
Object.prototype.hasOwnProperty.call(Ho, t[0]) && !k[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + t[0] + "\" used in math mode", e), t = Ho[t[0]] + t.slice(1));
|
|
52715
|
+
var i = To.exec(t);
|
|
52691
52716
|
i && (t = t.substring(0, i.index), t === "i" ? t = "ı" : t === "j" && (t = "ȷ"));
|
|
52692
52717
|
var a;
|
|
52693
52718
|
if (k[this.mode][t]) {
|
|
@@ -52714,8 +52739,8 @@ var Io = {
|
|
|
52714
52739
|
else return null;
|
|
52715
52740
|
if (this.consume(), i) for (var c = 0; c < i[0].length; c++) {
|
|
52716
52741
|
var l = i[0][c];
|
|
52717
|
-
if (!
|
|
52718
|
-
var u =
|
|
52742
|
+
if (!Vo[l]) throw new T("Unknown accent ' " + l + "'", e);
|
|
52743
|
+
var u = Vo[l][this.mode] || Vo[l].text;
|
|
52719
52744
|
if (!u) throw new T("Accent " + l + " unsupported in " + this.mode + " mode", e);
|
|
52720
52745
|
a = {
|
|
52721
52746
|
type: "accent",
|
|
@@ -52730,16 +52755,16 @@ var Io = {
|
|
|
52730
52755
|
return a;
|
|
52731
52756
|
}
|
|
52732
52757
|
};
|
|
52733
|
-
|
|
52758
|
+
Uo.endOfExpression = /* @__PURE__ */ new Set([
|
|
52734
52759
|
"}",
|
|
52735
52760
|
"\\endgroup",
|
|
52736
52761
|
"\\end",
|
|
52737
52762
|
"\\right",
|
|
52738
52763
|
"&"
|
|
52739
52764
|
]);
|
|
52740
|
-
var
|
|
52765
|
+
var Wo = function(e, t) {
|
|
52741
52766
|
if (!(typeof e == "string" || e instanceof String)) throw TypeError("KaTeX can only parse string typed expression");
|
|
52742
|
-
var n = new
|
|
52767
|
+
var n = new Uo(e, t);
|
|
52743
52768
|
delete n.gullet.macros.current["\\df@tag"];
|
|
52744
52769
|
var r = n.parse();
|
|
52745
52770
|
if (delete n.gullet.macros.current["\\current@color"], delete n.gullet.macros.current["\\color"], n.gullet.macros.get("\\df@tag")) {
|
|
@@ -52752,43 +52777,43 @@ var Uo = function(e, t) {
|
|
|
52752
52777
|
}];
|
|
52753
52778
|
}
|
|
52754
52779
|
return r;
|
|
52755
|
-
},
|
|
52780
|
+
}, Go = function(e, t, n) {
|
|
52756
52781
|
t.textContent = "";
|
|
52757
|
-
var r =
|
|
52782
|
+
var r = Yo(e, n).toNode();
|
|
52758
52783
|
t.appendChild(r);
|
|
52759
52784
|
};
|
|
52760
|
-
typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),
|
|
52785
|
+
typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), Go = function() {
|
|
52761
52786
|
throw new T("KaTeX doesn't work in quirks mode.");
|
|
52762
52787
|
});
|
|
52763
|
-
var
|
|
52764
|
-
return
|
|
52765
|
-
},
|
|
52766
|
-
return
|
|
52767
|
-
},
|
|
52788
|
+
var Ko = function(e, t) {
|
|
52789
|
+
return Yo(e, t).toMarkup();
|
|
52790
|
+
}, qo = function(e, t) {
|
|
52791
|
+
return Wo(e, new ft(t));
|
|
52792
|
+
}, Jo = function(e, t, n) {
|
|
52768
52793
|
if (n.throwOnError || !(e instanceof T)) throw e;
|
|
52769
52794
|
var r = U(["katex-error"], [new cn(t)]);
|
|
52770
52795
|
return r.setAttribute("title", e.toString()), r.setAttribute("style", "color:" + n.errorColor), r;
|
|
52771
|
-
},
|
|
52796
|
+
}, Yo = function(e, t) {
|
|
52772
52797
|
var n = new ft(t);
|
|
52773
52798
|
try {
|
|
52774
|
-
return ci(
|
|
52799
|
+
return ci(Wo(e, n), e, n);
|
|
52775
52800
|
} catch (t) {
|
|
52776
|
-
return
|
|
52801
|
+
return Jo(t, e, n);
|
|
52777
52802
|
}
|
|
52778
|
-
},
|
|
52779
|
-
version: "0.18.
|
|
52780
|
-
render:
|
|
52781
|
-
renderToString:
|
|
52803
|
+
}, Xo = {
|
|
52804
|
+
version: "0.18.7",
|
|
52805
|
+
render: Go,
|
|
52806
|
+
renderToString: Ko,
|
|
52782
52807
|
ParseError: T,
|
|
52783
52808
|
SETTINGS_SCHEMA: ct,
|
|
52784
|
-
__parse:
|
|
52785
|
-
__renderToDomTree:
|
|
52809
|
+
__parse: qo,
|
|
52810
|
+
__renderToDomTree: Yo,
|
|
52786
52811
|
__renderToHTMLTree: function(e, t) {
|
|
52787
52812
|
var n = new ft(t);
|
|
52788
52813
|
try {
|
|
52789
|
-
return li(
|
|
52814
|
+
return li(Wo(e, n), e, n);
|
|
52790
52815
|
} catch (t) {
|
|
52791
|
-
return
|
|
52816
|
+
return Jo(t, e, n);
|
|
52792
52817
|
}
|
|
52793
52818
|
},
|
|
52794
52819
|
__setFontMetrics: vn,
|
|
@@ -52803,7 +52828,7 @@ var Go = function(e, t) {
|
|
|
52803
52828
|
PathNode: un,
|
|
52804
52829
|
LineNode: dn
|
|
52805
52830
|
}
|
|
52806
|
-
},
|
|
52831
|
+
}, Zo = g.create({
|
|
52807
52832
|
name: "blockMath",
|
|
52808
52833
|
group: "block",
|
|
52809
52834
|
atom: !0,
|
|
@@ -52893,7 +52918,7 @@ var Go = function(e, t) {
|
|
|
52893
52918
|
r.className = "tiptap-mathematics-render", this.editor.isEditable && r.classList.add("tiptap-mathematics-render--editable"), i.className = "block-math-inner", r.dataset.type = "block-math", r.setAttribute("data-latex", t.attrs.latex), r.appendChild(i);
|
|
52894
52919
|
function a() {
|
|
52895
52920
|
try {
|
|
52896
|
-
|
|
52921
|
+
Xo.render(t.attrs.latex, i, e), r.classList.remove("block-math-error");
|
|
52897
52922
|
} catch {
|
|
52898
52923
|
r.textContent = t.attrs.latex, r.classList.add("block-math-error");
|
|
52899
52924
|
}
|
|
@@ -52911,7 +52936,7 @@ var Go = function(e, t) {
|
|
|
52911
52936
|
};
|
|
52912
52937
|
};
|
|
52913
52938
|
}
|
|
52914
|
-
}),
|
|
52939
|
+
}), Qo = g.create({
|
|
52915
52940
|
name: "inlineMath",
|
|
52916
52941
|
group: "inline",
|
|
52917
52942
|
inline: !0,
|
|
@@ -52992,7 +53017,7 @@ var Go = function(e, t) {
|
|
|
52992
53017
|
r.className = "tiptap-mathematics-render", this.editor.isEditable && r.classList.add("tiptap-mathematics-render--editable"), r.dataset.type = "inline-math", r.setAttribute("data-latex", t.attrs.latex);
|
|
52993
53018
|
function i() {
|
|
52994
53019
|
try {
|
|
52995
|
-
|
|
53020
|
+
Xo.render(t.attrs.latex, r, e), r.classList.remove("inline-math-error");
|
|
52996
53021
|
} catch {
|
|
52997
53022
|
r.textContent = t.attrs.latex, r.classList.add("inline-math-error");
|
|
52998
53023
|
}
|
|
@@ -53010,7 +53035,7 @@ var Go = function(e, t) {
|
|
|
53010
53035
|
};
|
|
53011
53036
|
};
|
|
53012
53037
|
}
|
|
53013
|
-
}),
|
|
53038
|
+
}), $o = w.create({
|
|
53014
53039
|
name: "Mathematics",
|
|
53015
53040
|
addOptions() {
|
|
53016
53041
|
return {
|
|
@@ -53020,15 +53045,15 @@ var Go = function(e, t) {
|
|
|
53020
53045
|
};
|
|
53021
53046
|
},
|
|
53022
53047
|
addExtensions() {
|
|
53023
|
-
return [
|
|
53048
|
+
return [Zo.configure({
|
|
53024
53049
|
...this.options.blockOptions,
|
|
53025
53050
|
katexOptions: this.options.katexOptions
|
|
53026
|
-
}),
|
|
53051
|
+
}), Qo.configure({
|
|
53027
53052
|
...this.options.inlineOptions,
|
|
53028
53053
|
katexOptions: this.options.katexOptions
|
|
53029
53054
|
})];
|
|
53030
53055
|
}
|
|
53031
|
-
}),
|
|
53056
|
+
}), es = "listItem", ts = "textStyle", ns = /^\s*([-+*])\s$/, rs = g.create({
|
|
53032
53057
|
name: "bulletList",
|
|
53033
53058
|
addOptions() {
|
|
53034
53059
|
return {
|
|
@@ -53060,26 +53085,26 @@ var Go = function(e, t) {
|
|
|
53060
53085
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
53061
53086
|
markdownOptions: { indentsContent: !0 },
|
|
53062
53087
|
addCommands() {
|
|
53063
|
-
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
53088
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(es, this.editor.getAttributes(ts)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
53064
53089
|
},
|
|
53065
53090
|
addKeyboardShortcuts() {
|
|
53066
53091
|
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
53067
53092
|
},
|
|
53068
53093
|
addInputRules() {
|
|
53069
53094
|
let e = p({
|
|
53070
|
-
find:
|
|
53095
|
+
find: ns,
|
|
53071
53096
|
type: this.type
|
|
53072
53097
|
});
|
|
53073
53098
|
return (this.options.keepMarks || this.options.keepAttributes) && (e = p({
|
|
53074
|
-
find:
|
|
53099
|
+
find: ns,
|
|
53075
53100
|
type: this.type,
|
|
53076
53101
|
keepMarks: this.options.keepMarks,
|
|
53077
53102
|
keepAttributes: this.options.keepAttributes,
|
|
53078
|
-
getAttributes: () => this.editor.getAttributes(
|
|
53103
|
+
getAttributes: () => this.editor.getAttributes(ts),
|
|
53079
53104
|
editor: this.editor
|
|
53080
53105
|
})), [e];
|
|
53081
53106
|
}
|
|
53082
|
-
}),
|
|
53107
|
+
}), is = (e, t, n) => {
|
|
53083
53108
|
let { selection: r } = e;
|
|
53084
53109
|
if (!r.empty) return null;
|
|
53085
53110
|
let { $from: i } = r;
|
|
@@ -53110,24 +53135,24 @@ var Go = function(e, t) {
|
|
|
53110
53135
|
insertPos: i.after(a),
|
|
53111
53136
|
items: f
|
|
53112
53137
|
};
|
|
53113
|
-
},
|
|
53114
|
-
let i =
|
|
53138
|
+
}, as = (e, t, n, r) => {
|
|
53139
|
+
let i = is(e, n, r);
|
|
53115
53140
|
if (!i) return !1;
|
|
53116
53141
|
let { selection: a } = e, { nestedList: o, nestedListPos: s, insertPos: c, items: l } = i, u = e.tr;
|
|
53117
53142
|
u.delete(s, s + o.nodeSize);
|
|
53118
53143
|
let d = u.mapping.map(c);
|
|
53119
53144
|
return u.insert(d, be.from(l)), u.setSelection(a.map(u.doc, u.mapping)), t && t(u), !0;
|
|
53120
|
-
},
|
|
53145
|
+
}, os = (e, t, n) => as(e.state, e.view.dispatch, t, n), ss = (e, t) => w.create({
|
|
53121
53146
|
name: `${e}BranchingDeleteKeymap`,
|
|
53122
53147
|
priority: 101,
|
|
53123
53148
|
addKeyboardShortcuts() {
|
|
53124
|
-
let n = () =>
|
|
53149
|
+
let n = () => os(this.editor, e, t);
|
|
53125
53150
|
return {
|
|
53126
53151
|
Delete: n,
|
|
53127
53152
|
"Mod-Delete": n
|
|
53128
53153
|
};
|
|
53129
53154
|
}
|
|
53130
|
-
}),
|
|
53155
|
+
}), cs = [
|
|
53131
53156
|
[1e3, "m"],
|
|
53132
53157
|
[900, "cm"],
|
|
53133
53158
|
[500, "d"],
|
|
@@ -53141,20 +53166,20 @@ var Go = function(e, t) {
|
|
|
53141
53166
|
[5, "v"],
|
|
53142
53167
|
[4, "iv"],
|
|
53143
53168
|
[1, "i"]
|
|
53144
|
-
],
|
|
53145
|
-
function
|
|
53169
|
+
], ls = "abcdefghijklmnopqrstuvwxyz", us = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
|
|
53170
|
+
function ds(e) {
|
|
53146
53171
|
let t = e, n = "";
|
|
53147
|
-
for (let [e, r] of
|
|
53172
|
+
for (let [e, r] of cs) for (; t >= e;) n += r, t -= e;
|
|
53148
53173
|
return n;
|
|
53149
53174
|
}
|
|
53150
|
-
function ds(e) {
|
|
53151
|
-
return us(e).toUpperCase();
|
|
53152
|
-
}
|
|
53153
53175
|
function fs(e) {
|
|
53176
|
+
return ds(e).toUpperCase();
|
|
53177
|
+
}
|
|
53178
|
+
function ps(e) {
|
|
53154
53179
|
let t = e.toLowerCase(), n = 0, r = 0;
|
|
53155
53180
|
for (; n < t.length;) {
|
|
53156
53181
|
let e = !1;
|
|
53157
|
-
for (let [i, a] of
|
|
53182
|
+
for (let [i, a] of cs) if (t.startsWith(a, n)) {
|
|
53158
53183
|
r += i, n += a.length, e = !0;
|
|
53159
53184
|
break;
|
|
53160
53185
|
}
|
|
@@ -53162,12 +53187,12 @@ function fs(e) {
|
|
|
53162
53187
|
}
|
|
53163
53188
|
return r;
|
|
53164
53189
|
}
|
|
53165
|
-
function
|
|
53190
|
+
function ms(e) {
|
|
53166
53191
|
if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
|
|
53167
|
-
let t =
|
|
53168
|
-
return t <= 0 ? !1 : (e === e.toLowerCase() ?
|
|
53192
|
+
let t = ps(e);
|
|
53193
|
+
return t <= 0 ? !1 : (e === e.toLowerCase() ? ds(t) : fs(t)) === e;
|
|
53169
53194
|
}
|
|
53170
|
-
function
|
|
53195
|
+
function hs(e) {
|
|
53171
53196
|
let t = e.toLowerCase();
|
|
53172
53197
|
if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
|
|
53173
53198
|
if (t.length === 2) {
|
|
@@ -53176,82 +53201,82 @@ function ms(e) {
|
|
|
53176
53201
|
}
|
|
53177
53202
|
return 0;
|
|
53178
53203
|
}
|
|
53179
|
-
function
|
|
53180
|
-
if (e <= 26) return
|
|
53204
|
+
function gs(e) {
|
|
53205
|
+
if (e <= 26) return ls[e - 1];
|
|
53181
53206
|
let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
|
|
53182
|
-
return t < 0 ?
|
|
53207
|
+
return t < 0 ? ls[n] : ls[t] + ls[n];
|
|
53183
53208
|
}
|
|
53184
|
-
function
|
|
53209
|
+
function _s(e) {
|
|
53185
53210
|
if (e && !/^\d+$/.test(e)) {
|
|
53186
|
-
if (
|
|
53211
|
+
if (ms(e)) return e === e.toLowerCase() ? "i" : "I";
|
|
53187
53212
|
if (/^[a-z]{1,2}$/.test(e)) return "a";
|
|
53188
53213
|
if (/^[A-Z]{1,2}$/.test(e)) return "A";
|
|
53189
53214
|
}
|
|
53190
53215
|
}
|
|
53191
|
-
function
|
|
53216
|
+
function vs(e) {
|
|
53192
53217
|
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
53193
|
-
let t =
|
|
53194
|
-
if (t === "i" || t === "I") return
|
|
53218
|
+
let t = _s(e);
|
|
53219
|
+
if (t === "i" || t === "I") return ps(e);
|
|
53195
53220
|
if (t === "a" || t === "A") {
|
|
53196
|
-
let t =
|
|
53221
|
+
let t = hs(e);
|
|
53197
53222
|
return t > 0 ? t : 1;
|
|
53198
53223
|
}
|
|
53199
53224
|
let n = parseInt(e, 10);
|
|
53200
53225
|
return Number.isNaN(n) ? 1 : n;
|
|
53201
53226
|
}
|
|
53202
|
-
function
|
|
53227
|
+
function ys(e, t) {
|
|
53203
53228
|
if (e === "numeric") return String(t);
|
|
53204
53229
|
switch (e) {
|
|
53205
|
-
case "a": return
|
|
53206
|
-
case "A": return
|
|
53207
|
-
case "i": return
|
|
53208
|
-
case "I": return
|
|
53230
|
+
case "a": return gs(t);
|
|
53231
|
+
case "A": return gs(t).toUpperCase();
|
|
53232
|
+
case "i": return ds(t);
|
|
53233
|
+
case "I": return fs(t);
|
|
53209
53234
|
default: return String(t);
|
|
53210
53235
|
}
|
|
53211
53236
|
}
|
|
53212
|
-
function
|
|
53237
|
+
function bs(e) {
|
|
53213
53238
|
if (e.length === 0) return !1;
|
|
53214
|
-
let t =
|
|
53239
|
+
let t = _s(e[0]) ?? "numeric", n = vs(e[0]);
|
|
53215
53240
|
if (n < 1) return !1;
|
|
53216
53241
|
for (let r = 0; r < e.length; r++) {
|
|
53217
|
-
let i =
|
|
53242
|
+
let i = ys(t, n + r);
|
|
53218
53243
|
if (e[r] !== i) return !1;
|
|
53219
53244
|
}
|
|
53220
53245
|
return !0;
|
|
53221
53246
|
}
|
|
53222
|
-
function
|
|
53247
|
+
function xs(e) {
|
|
53223
53248
|
return {
|
|
53224
|
-
type:
|
|
53225
|
-
start:
|
|
53249
|
+
type: _s(e),
|
|
53250
|
+
start: vs(e)
|
|
53226
53251
|
};
|
|
53227
53252
|
}
|
|
53228
|
-
function
|
|
53229
|
-
let { type: t, start: n } =
|
|
53253
|
+
function Ss(e) {
|
|
53254
|
+
let { type: t, start: n } = xs(e), r = {};
|
|
53230
53255
|
return t && (r.type = t), n !== 1 && (r.start = n), r;
|
|
53231
53256
|
}
|
|
53232
|
-
function
|
|
53257
|
+
function Cs(e, t, n = ". ") {
|
|
53233
53258
|
let r = t + 1;
|
|
53234
53259
|
if (!e || e === "1") return `${r}${n}`;
|
|
53235
53260
|
switch (e) {
|
|
53236
|
-
case "a": return `${
|
|
53237
|
-
case "A": return `${
|
|
53238
|
-
case "i": return `${
|
|
53239
|
-
case "I": return `${
|
|
53261
|
+
case "a": return `${gs(r)}${n}`;
|
|
53262
|
+
case "A": return `${gs(r).toUpperCase()}${n}`;
|
|
53263
|
+
case "i": return `${ds(r)}${n}`;
|
|
53264
|
+
case "I": return `${fs(r)}${n}`;
|
|
53240
53265
|
default: return `${r}${n}`;
|
|
53241
53266
|
}
|
|
53242
53267
|
}
|
|
53243
|
-
function
|
|
53268
|
+
function ws(e) {
|
|
53244
53269
|
let t = e.tokens?.[0];
|
|
53245
53270
|
return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
|
|
53246
53271
|
}
|
|
53247
|
-
function
|
|
53272
|
+
function Ts(e, t) {
|
|
53248
53273
|
return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
|
|
53249
53274
|
type: "text",
|
|
53250
53275
|
raw: e,
|
|
53251
53276
|
text: e
|
|
53252
53277
|
}]);
|
|
53253
53278
|
}
|
|
53254
|
-
var
|
|
53279
|
+
var Es = g.create({
|
|
53255
53280
|
name: "listItem",
|
|
53256
53281
|
addOptions() {
|
|
53257
53282
|
return {
|
|
@@ -53277,11 +53302,11 @@ var Ts = g.create({
|
|
|
53277
53302
|
if (e.type !== "list_item") return [];
|
|
53278
53303
|
let n = t.parseBlockChildren ?? t.parseChildren, r = [];
|
|
53279
53304
|
if (e.tokens && e.tokens.length > 0) {
|
|
53280
|
-
if (
|
|
53305
|
+
if (ws(e)) return {
|
|
53281
53306
|
type: "listItem",
|
|
53282
53307
|
content: [{
|
|
53283
53308
|
type: "paragraph",
|
|
53284
|
-
content:
|
|
53309
|
+
content: Ts(e.text || "", t)
|
|
53285
53310
|
}]
|
|
53286
53311
|
};
|
|
53287
53312
|
if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
|
|
@@ -53311,12 +53336,12 @@ var Ts = g.create({
|
|
|
53311
53336
|
if (e.parentType === "orderedList") {
|
|
53312
53337
|
var t, n;
|
|
53313
53338
|
let r = ((t = e.meta) == null || (t = t.parentAttrs) == null ? void 0 : t.start) || 1;
|
|
53314
|
-
return
|
|
53339
|
+
return Cs((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
|
|
53315
53340
|
}
|
|
53316
53341
|
return "- ";
|
|
53317
53342
|
}, r, { alignNestedToPrefix: r?.parentType === "orderedList" }),
|
|
53318
53343
|
addExtensions() {
|
|
53319
|
-
return [
|
|
53344
|
+
return [ss(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
|
|
53320
53345
|
},
|
|
53321
53346
|
addKeyboardShortcuts() {
|
|
53322
53347
|
return {
|
|
@@ -53325,25 +53350,25 @@ var Ts = g.create({
|
|
|
53325
53350
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
53326
53351
|
};
|
|
53327
53352
|
}
|
|
53328
|
-
}),
|
|
53353
|
+
}), Ds = (e, t) => {
|
|
53329
53354
|
let { $from: n } = t.selection, r = se(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
53330
53355
|
for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
|
|
53331
53356
|
return s === null ? null : {
|
|
53332
53357
|
$pos: t.doc.resolve(o),
|
|
53333
53358
|
depth: s
|
|
53334
53359
|
};
|
|
53335
|
-
},
|
|
53336
|
-
let n =
|
|
53360
|
+
}, Os = (e, t) => {
|
|
53361
|
+
let n = Ds(e, t);
|
|
53337
53362
|
if (!n) return !1;
|
|
53338
53363
|
let [, r] = _(t, e, n.$pos.pos + 4);
|
|
53339
53364
|
return r;
|
|
53340
|
-
},
|
|
53365
|
+
}, ks = (e, t, n) => {
|
|
53341
53366
|
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
53342
53367
|
return !(!a || !n.includes(a.type.name));
|
|
53343
|
-
},
|
|
53368
|
+
}, As = (t, n, r) => {
|
|
53344
53369
|
if (t.commands.undoInputRule()) return !0;
|
|
53345
53370
|
if (t.state.selection.from !== t.state.selection.to) return !1;
|
|
53346
|
-
if (!e(t.state, n) &&
|
|
53371
|
+
if (!e(t.state, n) && ks(t.state, n, r)) {
|
|
53347
53372
|
let { $anchor: e } = t.state.selection, r = t.state.doc.resolve(e.before() - 1), i = [];
|
|
53348
53373
|
r.node().descendants((e, t) => {
|
|
53349
53374
|
e.type.name === n && i.push({
|
|
@@ -53362,17 +53387,17 @@ var Ts = g.create({
|
|
|
53362
53387
|
if (!e(t.state, n) || !l(t.state)) return !1;
|
|
53363
53388
|
let { $from: i } = t.state.selection, a = i.depth - 1;
|
|
53364
53389
|
return i.node(a).type !== t.schema.nodes[n] || i.index(a) !== 0 ? !1 : t.chain().liftListItem(n).run();
|
|
53365
|
-
}, As = (e, t) => {
|
|
53366
|
-
let n = Ds(e, t), r = Es(e, t);
|
|
53367
|
-
return !r || !n ? !1 : n > r.depth;
|
|
53368
53390
|
}, js = (e, t) => {
|
|
53369
|
-
let n =
|
|
53391
|
+
let n = Os(e, t), r = Ds(e, t);
|
|
53392
|
+
return !r || !n ? !1 : n > r.depth;
|
|
53393
|
+
}, Ms = (e, t) => {
|
|
53394
|
+
let n = Os(e, t), r = Ds(e, t);
|
|
53370
53395
|
return !r || !n ? !1 : n < r.depth;
|
|
53371
|
-
},
|
|
53396
|
+
}, Ns = (t, n) => {
|
|
53372
53397
|
if (!e(t.state, n) || !r(t.state, n)) return !1;
|
|
53373
53398
|
let { selection: i } = t.state, { $from: a, $to: o } = i;
|
|
53374
|
-
return !i.empty && a.sameParent(o) ? !1 :
|
|
53375
|
-
},
|
|
53399
|
+
return !i.empty && a.sameParent(o) ? !1 : js(n, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(n).joinBackward().run() : Ms(n, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
|
|
53400
|
+
}, Ps = (t, n, r) => {
|
|
53376
53401
|
let { state: i } = t, { selection: a } = i;
|
|
53377
53402
|
if (!a.empty) return !1;
|
|
53378
53403
|
let { $from: o } = a;
|
|
@@ -53385,7 +53410,7 @@ var Ts = g.create({
|
|
|
53385
53410
|
if (!c.canReplace(c.childCount, c.childCount, be.from(l))) return !1;
|
|
53386
53411
|
let u = o.before(), d = o.after(), p = u - 2;
|
|
53387
53412
|
return t.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(u, d).insert(p, be.from(l)), e.setSelection(ye.create(e.doc, p + 1)), e.scrollIntoView()), !0));
|
|
53388
|
-
},
|
|
53413
|
+
}, Fs = w.create({
|
|
53389
53414
|
name: "listKeymap",
|
|
53390
53415
|
addOptions() {
|
|
53391
53416
|
return { listTypes: [{
|
|
@@ -53401,51 +53426,51 @@ var Ts = g.create({
|
|
|
53401
53426
|
Delete: ({ editor: e }) => {
|
|
53402
53427
|
let t = !1;
|
|
53403
53428
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
53404
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53429
|
+
e.state.schema.nodes[n] !== void 0 && Ns(e, n) && (t = !0);
|
|
53405
53430
|
}), t;
|
|
53406
53431
|
},
|
|
53407
53432
|
"Mod-Delete": ({ editor: e }) => {
|
|
53408
53433
|
let t = !1;
|
|
53409
53434
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
53410
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53435
|
+
e.state.schema.nodes[n] !== void 0 && Ns(e, n) && (t = !0);
|
|
53411
53436
|
}), t;
|
|
53412
53437
|
},
|
|
53413
53438
|
Backspace: ({ editor: e }) => {
|
|
53414
53439
|
let t = !1;
|
|
53415
53440
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
53416
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53441
|
+
e.state.schema.nodes[n] !== void 0 && As(e, n, r) && (t = !0);
|
|
53417
53442
|
}), t;
|
|
53418
53443
|
},
|
|
53419
53444
|
"Mod-Backspace": ({ editor: e }) => {
|
|
53420
53445
|
let t = !1;
|
|
53421
53446
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
53422
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
53447
|
+
e.state.schema.nodes[n] !== void 0 && As(e, n, r) && (t = !0);
|
|
53423
53448
|
}), t;
|
|
53424
53449
|
},
|
|
53425
53450
|
Tab: ({ editor: e }) => {
|
|
53426
|
-
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 &&
|
|
53451
|
+
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && Ps(e, t, n)) return !0;
|
|
53427
53452
|
return !1;
|
|
53428
53453
|
}
|
|
53429
53454
|
};
|
|
53430
53455
|
}
|
|
53431
|
-
}),
|
|
53456
|
+
}), Is = RegExp(`^(\\s*)(${us})([.)])\\s+(.*)$`), Ls = /^\s/, Rs = {
|
|
53432
53457
|
heading: /^#{1,6}(?:\s|$)/,
|
|
53433
53458
|
bulletItem: /^[-+*]\s+/,
|
|
53434
53459
|
codeFence: /^(?:```|~~~)/,
|
|
53435
53460
|
blockMath: /^\$\$/,
|
|
53436
53461
|
thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
|
|
53437
53462
|
};
|
|
53438
|
-
function Rs(e) {
|
|
53439
|
-
return Fs.test(e.trimStart());
|
|
53440
|
-
}
|
|
53441
53463
|
function zs(e) {
|
|
53442
|
-
|
|
53443
|
-
return Ls.bulletItem.test(t) || Rs(t) || Ls.heading.test(t) || Ls.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || Ls.codeFence.test(t) || Ls.blockMath.test(t);
|
|
53464
|
+
return Is.test(e.trimStart());
|
|
53444
53465
|
}
|
|
53445
53466
|
function Bs(e) {
|
|
53446
|
-
|
|
53467
|
+
let t = e.trimStart();
|
|
53468
|
+
return Rs.bulletItem.test(t) || zs(t) || Rs.heading.test(t) || Rs.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || Rs.codeFence.test(t) || Rs.blockMath.test(t);
|
|
53447
53469
|
}
|
|
53448
53470
|
function Vs(e) {
|
|
53471
|
+
return Object.values(Rs).some((t) => t.test(e));
|
|
53472
|
+
}
|
|
53473
|
+
function Hs(e) {
|
|
53449
53474
|
let t = [], n = [], r = !1;
|
|
53450
53475
|
return e.forEach((e) => {
|
|
53451
53476
|
if (r) {
|
|
@@ -53456,7 +53481,7 @@ function Vs(e) {
|
|
|
53456
53481
|
r = !0, n.push(e);
|
|
53457
53482
|
return;
|
|
53458
53483
|
}
|
|
53459
|
-
if (t.length > 0 &&
|
|
53484
|
+
if (t.length > 0 && Bs(e)) {
|
|
53460
53485
|
r = !0, n.push(e);
|
|
53461
53486
|
return;
|
|
53462
53487
|
}
|
|
@@ -53466,21 +53491,21 @@ function Vs(e) {
|
|
|
53466
53491
|
blockLines: n
|
|
53467
53492
|
};
|
|
53468
53493
|
}
|
|
53469
|
-
function
|
|
53494
|
+
function Us(e) {
|
|
53470
53495
|
let t = [], n = 0, r = 0;
|
|
53471
53496
|
for (; n < e.length;) {
|
|
53472
|
-
let i = e[n], a = i.match(
|
|
53497
|
+
let i = e[n], a = i.match(Is);
|
|
53473
53498
|
if (!a) break;
|
|
53474
|
-
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ?
|
|
53499
|
+
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? _s(s) : void 0, p = isNaN(d) ? vs(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
|
|
53475
53500
|
for (; h < e.length;) {
|
|
53476
53501
|
let t = e[h];
|
|
53477
|
-
if (t.match(
|
|
53502
|
+
if (t.match(Is)) break;
|
|
53478
53503
|
if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
|
|
53479
|
-
else if (t.match(
|
|
53504
|
+
else if (t.match(Ls)) {
|
|
53480
53505
|
let e = t.length - t.trimStart().length, n = u + s.length + 1;
|
|
53481
53506
|
g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
|
|
53482
53507
|
} else {
|
|
53483
|
-
if (_ ||
|
|
53508
|
+
if (_ || Vs(t)) break;
|
|
53484
53509
|
g.push(t), m.push(t), h += 1;
|
|
53485
53510
|
}
|
|
53486
53511
|
}
|
|
@@ -53495,22 +53520,22 @@ function Hs(e) {
|
|
|
53495
53520
|
}
|
|
53496
53521
|
return [t, r];
|
|
53497
53522
|
}
|
|
53498
|
-
var
|
|
53499
|
-
function
|
|
53523
|
+
var Ws = RegExp(`^(${us})([.)])\\s+(.+)$`);
|
|
53524
|
+
function Gs(e) {
|
|
53500
53525
|
let t = e.split("\n").filter((e) => e.trim().length > 0);
|
|
53501
53526
|
if (t.length === 0) return null;
|
|
53502
53527
|
let n = [];
|
|
53503
53528
|
for (let e of t) {
|
|
53504
|
-
let t = e.trim().match(
|
|
53529
|
+
let t = e.trim().match(Ws);
|
|
53505
53530
|
if (!t) return null;
|
|
53506
53531
|
n.push({
|
|
53507
53532
|
marker: t[1],
|
|
53508
53533
|
content: t[3]
|
|
53509
53534
|
});
|
|
53510
53535
|
}
|
|
53511
|
-
return
|
|
53536
|
+
return bs(n.map((e) => e.marker)) ? {
|
|
53512
53537
|
type: "orderedList",
|
|
53513
|
-
attrs:
|
|
53538
|
+
attrs: Ss(n[0].marker),
|
|
53514
53539
|
content: n.map((e) => ({
|
|
53515
53540
|
type: "listItem",
|
|
53516
53541
|
content: [{
|
|
@@ -53523,12 +53548,12 @@ function Ws(e) {
|
|
|
53523
53548
|
}))
|
|
53524
53549
|
} : null;
|
|
53525
53550
|
}
|
|
53526
|
-
function
|
|
53551
|
+
function Ks(e, t, n) {
|
|
53527
53552
|
let r = [], i = 0;
|
|
53528
53553
|
for (; i < e.length;) {
|
|
53529
53554
|
let a = e[i];
|
|
53530
53555
|
if (a.indent === t) {
|
|
53531
|
-
let { paragraphLines: o, blockLines: s } =
|
|
53556
|
+
let { paragraphLines: o, blockLines: s } = Hs(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
53532
53557
|
c && l.push({
|
|
53533
53558
|
type: "paragraph",
|
|
53534
53559
|
raw: c,
|
|
@@ -53542,7 +53567,7 @@ function Gs(e, t, n) {
|
|
|
53542
53567
|
let d = i + 1, f = [];
|
|
53543
53568
|
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
53544
53569
|
if (f.length > 0) {
|
|
53545
|
-
let e =
|
|
53570
|
+
let e = Ks(f, Math.min(...f.map((e) => e.indent)), n);
|
|
53546
53571
|
l.push({
|
|
53547
53572
|
type: "list",
|
|
53548
53573
|
ordered: !0,
|
|
@@ -53561,7 +53586,7 @@ function Gs(e, t, n) {
|
|
|
53561
53586
|
}
|
|
53562
53587
|
return r;
|
|
53563
53588
|
}
|
|
53564
|
-
function
|
|
53589
|
+
function qs(e, t) {
|
|
53565
53590
|
return e.map((e) => {
|
|
53566
53591
|
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
53567
53592
|
let n = [];
|
|
@@ -53583,8 +53608,8 @@ function Ks(e, t) {
|
|
|
53583
53608
|
};
|
|
53584
53609
|
});
|
|
53585
53610
|
}
|
|
53586
|
-
var
|
|
53587
|
-
function
|
|
53611
|
+
var Js = "listItem", Ys = "textStyle", Xs = /^(\d+)\.\s$/;
|
|
53612
|
+
function Zs(e) {
|
|
53588
53613
|
let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
|
|
53589
53614
|
if (!t) return null;
|
|
53590
53615
|
switch (t[1].trim().toLowerCase()) {
|
|
@@ -53597,7 +53622,7 @@ function Xs(e) {
|
|
|
53597
53622
|
default: return null;
|
|
53598
53623
|
}
|
|
53599
53624
|
}
|
|
53600
|
-
var
|
|
53625
|
+
var Qs = g.create({
|
|
53601
53626
|
name: "orderedList",
|
|
53602
53627
|
addOptions() {
|
|
53603
53628
|
return {
|
|
@@ -53624,14 +53649,14 @@ var Zs = g.create({
|
|
|
53624
53649
|
if (t) return t;
|
|
53625
53650
|
let n = e.getAttribute("style");
|
|
53626
53651
|
if (n) {
|
|
53627
|
-
let e =
|
|
53652
|
+
let e = Zs(n);
|
|
53628
53653
|
if (e) return e;
|
|
53629
53654
|
}
|
|
53630
53655
|
let r = e.querySelector("li");
|
|
53631
53656
|
if (r) {
|
|
53632
53657
|
let e = r.getAttribute("style");
|
|
53633
53658
|
if (e) {
|
|
53634
|
-
let t =
|
|
53659
|
+
let t = Zs(e);
|
|
53635
53660
|
if (t) return t;
|
|
53636
53661
|
}
|
|
53637
53662
|
}
|
|
@@ -53654,7 +53679,7 @@ var Zs = g.create({
|
|
|
53654
53679
|
markdownTokenName: "list",
|
|
53655
53680
|
parseMarkdown: (e, t) => {
|
|
53656
53681
|
if (e.type !== "list" || !e.ordered) return [];
|
|
53657
|
-
let n = e.start || 1, r = e.typeMarker, i = e.items ?
|
|
53682
|
+
let n = e.start || 1, r = e.typeMarker, i = e.items ? qs(e.items, t) : [], a = {};
|
|
53658
53683
|
return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
|
|
53659
53684
|
type: "orderedList",
|
|
53660
53685
|
attrs: a,
|
|
@@ -53670,9 +53695,9 @@ var Zs = g.create({
|
|
|
53670
53695
|
level: "block",
|
|
53671
53696
|
start: () => -1,
|
|
53672
53697
|
tokenize: (e, t, n) => {
|
|
53673
|
-
let r = e.split("\n"), [i, a] =
|
|
53698
|
+
let r = e.split("\n"), [i, a] = Us(r);
|
|
53674
53699
|
if (i.length === 0) return;
|
|
53675
|
-
let o =
|
|
53700
|
+
let o = Ks(i, i[0].indent, n);
|
|
53676
53701
|
if (o.length !== 0) return {
|
|
53677
53702
|
type: "list",
|
|
53678
53703
|
ordered: !0,
|
|
@@ -53685,7 +53710,7 @@ var Zs = g.create({
|
|
|
53685
53710
|
},
|
|
53686
53711
|
markdownOptions: { indentsContent: !0 },
|
|
53687
53712
|
addCommands() {
|
|
53688
|
-
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
53713
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Js, this.editor.getAttributes(Ys)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
53689
53714
|
},
|
|
53690
53715
|
addKeyboardShortcuts() {
|
|
53691
53716
|
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
@@ -53695,7 +53720,7 @@ var Zs = g.create({
|
|
|
53695
53720
|
if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
|
|
53696
53721
|
let n = t.clipboardData?.getData("text/plain");
|
|
53697
53722
|
if (!n) return !1;
|
|
53698
|
-
let r =
|
|
53723
|
+
let r = Gs(n);
|
|
53699
53724
|
if (!r) return !1;
|
|
53700
53725
|
try {
|
|
53701
53726
|
let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
|
|
@@ -53707,28 +53732,28 @@ var Zs = g.create({
|
|
|
53707
53732
|
},
|
|
53708
53733
|
addInputRules() {
|
|
53709
53734
|
let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = p({
|
|
53710
|
-
find:
|
|
53735
|
+
find: Xs,
|
|
53711
53736
|
type: this.type,
|
|
53712
53737
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
53713
53738
|
joinPredicate: e
|
|
53714
53739
|
});
|
|
53715
53740
|
return (this.options.keepMarks || this.options.keepAttributes) && (t = p({
|
|
53716
|
-
find:
|
|
53741
|
+
find: Xs,
|
|
53717
53742
|
type: this.type,
|
|
53718
53743
|
keepMarks: this.options.keepMarks,
|
|
53719
53744
|
keepAttributes: this.options.keepAttributes,
|
|
53720
53745
|
getAttributes: (e) => ({
|
|
53721
53746
|
start: +e[1],
|
|
53722
|
-
...this.editor.getAttributes(
|
|
53747
|
+
...this.editor.getAttributes(Ys)
|
|
53723
53748
|
}),
|
|
53724
53749
|
joinPredicate: e,
|
|
53725
53750
|
editor: this.editor
|
|
53726
53751
|
})), [t];
|
|
53727
53752
|
}
|
|
53728
|
-
}),
|
|
53753
|
+
}), $s = /^\s*(\[([( |x])?\])\s$/, ec = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", tc = (e, t, n) => {
|
|
53729
53754
|
var r;
|
|
53730
53755
|
return (n == null || (r = n.checkboxLabel) == null ? void 0 : r.call(n, e, t)) || `Task item checkbox for ${e.textContent || "empty task item"}`;
|
|
53731
|
-
},
|
|
53756
|
+
}, nc = g.create({
|
|
53732
53757
|
name: "taskItem",
|
|
53733
53758
|
addOptions() {
|
|
53734
53759
|
return {
|
|
@@ -53788,7 +53813,7 @@ var Zs = g.create({
|
|
|
53788
53813
|
return t(e, n, r);
|
|
53789
53814
|
},
|
|
53790
53815
|
addExtensions() {
|
|
53791
|
-
return this.options.nested ? [
|
|
53816
|
+
return this.options.nested ? [ss(this.name, [this.options.taskListTypeName])] : [];
|
|
53792
53817
|
},
|
|
53793
53818
|
addKeyboardShortcuts() {
|
|
53794
53819
|
let e = {
|
|
@@ -53803,9 +53828,9 @@ var Zs = g.create({
|
|
|
53803
53828
|
addNodeView() {
|
|
53804
53829
|
return ({ node: e, HTMLAttributes: t, getPos: r, editor: i }) => {
|
|
53805
53830
|
let a = document.createElement("li"), o = document.createElement("label"), s = document.createElement("span"), c = document.createElement("input"), l = document.createElement("div");
|
|
53806
|
-
s.style.cssText =
|
|
53831
|
+
s.style.cssText = ec;
|
|
53807
53832
|
let u = (e) => {
|
|
53808
|
-
let t =
|
|
53833
|
+
let t = tc(e, e.attrs.checked, this.options.a11y);
|
|
53809
53834
|
c.setAttribute("aria-label", t), s.textContent = t;
|
|
53810
53835
|
};
|
|
53811
53836
|
u(e), o.contentEditable = "false", c.type = "checkbox", c.addEventListener("mousedown", (e) => e.preventDefault()), c.addEventListener("change", (t) => {
|
|
@@ -53847,12 +53872,12 @@ var Zs = g.create({
|
|
|
53847
53872
|
},
|
|
53848
53873
|
addInputRules() {
|
|
53849
53874
|
return [p({
|
|
53850
|
-
find:
|
|
53875
|
+
find: $s,
|
|
53851
53876
|
type: this.type,
|
|
53852
53877
|
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
53853
53878
|
})];
|
|
53854
53879
|
}
|
|
53855
|
-
}),
|
|
53880
|
+
}), rc = g.create({
|
|
53856
53881
|
name: "taskList",
|
|
53857
53882
|
addOptions() {
|
|
53858
53883
|
return {
|
|
@@ -53954,78 +53979,78 @@ w.create({
|
|
|
53954
53979
|
name: "listKit",
|
|
53955
53980
|
addExtensions() {
|
|
53956
53981
|
let e = [];
|
|
53957
|
-
return this.options.bulletList !== !1 && e.push(
|
|
53982
|
+
return this.options.bulletList !== !1 && e.push(rs.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(Es.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Fs.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Qs.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(nc.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(rc.configure(this.options.taskList)), e;
|
|
53958
53983
|
}
|
|
53959
53984
|
});
|
|
53960
53985
|
//#endregion
|
|
53961
53986
|
//#region node_modules/.pnpm/@tiptap+extension-task-item@3.31.3_@tiptap+extension-list@3.31.3_@tiptap+core@3.31.3_@t_57c8db10f93f71c9bed458e47d8da805/node_modules/@tiptap/extension-task-item/dist/index.js
|
|
53962
|
-
var
|
|
53987
|
+
var ic = nc, ac = rc, oc = (e) => m({
|
|
53963
53988
|
find: /--$/,
|
|
53964
53989
|
replace: e ?? "—"
|
|
53965
|
-
}),
|
|
53990
|
+
}), sc = (e) => m({
|
|
53966
53991
|
find: /\.\.\.$/,
|
|
53967
53992
|
replace: e ?? "…"
|
|
53968
|
-
}),
|
|
53993
|
+
}), cc = (e) => m({
|
|
53969
53994
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
|
|
53970
53995
|
replace: e ?? "“"
|
|
53971
|
-
}),
|
|
53996
|
+
}), lc = (e) => m({
|
|
53972
53997
|
find: /"$/,
|
|
53973
53998
|
replace: e ?? "”"
|
|
53974
|
-
}),
|
|
53999
|
+
}), uc = (e) => m({
|
|
53975
54000
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
|
|
53976
54001
|
replace: e ?? "‘"
|
|
53977
|
-
}),
|
|
54002
|
+
}), dc = (e) => m({
|
|
53978
54003
|
find: /'$/,
|
|
53979
54004
|
replace: e ?? "’"
|
|
53980
|
-
}),
|
|
54005
|
+
}), fc = (e) => m({
|
|
53981
54006
|
find: /<-$/,
|
|
53982
54007
|
replace: e ?? "←"
|
|
53983
|
-
}),
|
|
54008
|
+
}), pc = (e) => m({
|
|
53984
54009
|
find: /->$/,
|
|
53985
54010
|
replace: e ?? "→"
|
|
53986
|
-
}),
|
|
54011
|
+
}), mc = (e) => m({
|
|
53987
54012
|
find: /\(c\)$/,
|
|
53988
54013
|
replace: e ?? "©"
|
|
53989
|
-
}),
|
|
54014
|
+
}), hc = (e) => m({
|
|
53990
54015
|
find: /\(tm\)$/,
|
|
53991
54016
|
replace: e ?? "™"
|
|
53992
|
-
}),
|
|
54017
|
+
}), gc = (e) => m({
|
|
53993
54018
|
find: /\(sm\)$/,
|
|
53994
54019
|
replace: e ?? "℠"
|
|
53995
|
-
}),
|
|
54020
|
+
}), _c = (e) => m({
|
|
53996
54021
|
find: /\(r\)$/,
|
|
53997
54022
|
replace: e ?? "®"
|
|
53998
|
-
}),
|
|
54023
|
+
}), vc = (e) => m({
|
|
53999
54024
|
find: /(?:^|\s)(1\/2)\s$/,
|
|
54000
54025
|
replace: e ?? "½"
|
|
54001
|
-
}),
|
|
54026
|
+
}), yc = (e) => m({
|
|
54002
54027
|
find: /\+\/-$/,
|
|
54003
54028
|
replace: e ?? "±"
|
|
54004
|
-
}),
|
|
54029
|
+
}), bc = (e) => m({
|
|
54005
54030
|
find: /!=$/,
|
|
54006
54031
|
replace: e ?? "≠"
|
|
54007
|
-
}),
|
|
54032
|
+
}), xc = (e) => m({
|
|
54008
54033
|
find: /<<$/,
|
|
54009
54034
|
replace: e ?? "«"
|
|
54010
|
-
}),
|
|
54035
|
+
}), Sc = (e) => m({
|
|
54011
54036
|
find: />>$/,
|
|
54012
54037
|
replace: e ?? "»"
|
|
54013
|
-
}),
|
|
54038
|
+
}), Cc = (e) => m({
|
|
54014
54039
|
find: /\d+\s?([*x])\s?\d+$/,
|
|
54015
54040
|
replace: e ?? "×"
|
|
54016
|
-
}),
|
|
54041
|
+
}), wc = (e) => m({
|
|
54017
54042
|
find: /\^2$/,
|
|
54018
54043
|
replace: e ?? "²"
|
|
54019
|
-
}),
|
|
54044
|
+
}), Tc = (e) => m({
|
|
54020
54045
|
find: /\^3$/,
|
|
54021
54046
|
replace: e ?? "³"
|
|
54022
|
-
}),
|
|
54047
|
+
}), Ec = (e) => m({
|
|
54023
54048
|
find: /(?:^|\s)(1\/4)\s$/,
|
|
54024
54049
|
replace: e ?? "¼"
|
|
54025
|
-
}),
|
|
54050
|
+
}), Dc = (e) => m({
|
|
54026
54051
|
find: /(?:^|\s)(3\/4)\s$/,
|
|
54027
54052
|
replace: e ?? "¾"
|
|
54028
|
-
}),
|
|
54053
|
+
}), Oc = w.create({
|
|
54029
54054
|
name: "typography",
|
|
54030
54055
|
addOptions() {
|
|
54031
54056
|
return {
|
|
@@ -54055,58 +54080,58 @@ var rc = tc, ic = nc, ac = (e) => m({
|
|
|
54055
54080
|
},
|
|
54056
54081
|
addInputRules() {
|
|
54057
54082
|
let e = [];
|
|
54058
|
-
this.options.emDash !== !1 && e.push(
|
|
54083
|
+
this.options.emDash !== !1 && e.push(oc(this.options.emDash)), this.options.ellipsis !== !1 && e.push(sc(this.options.ellipsis));
|
|
54059
54084
|
let t = this.editor.options.textDirection === "rtl";
|
|
54060
54085
|
if (this.options.doubleQuotes?.rtl) {
|
|
54061
54086
|
let { open: t, close: n } = this.options.doubleQuotes.rtl;
|
|
54062
|
-
e.push(
|
|
54063
|
-
} else t ? (e.push(
|
|
54087
|
+
e.push(cc(t)), e.push(lc(n));
|
|
54088
|
+
} else t ? (e.push(cc("”")), e.push(lc("“"))) : (this.options.openDoubleQuote !== !1 && e.push(cc(this.options.openDoubleQuote)), this.options.closeDoubleQuote !== !1 && e.push(lc(this.options.closeDoubleQuote)));
|
|
54064
54089
|
if (this.options.singleQuotes?.rtl) {
|
|
54065
54090
|
let { open: t, close: n } = this.options.singleQuotes.rtl;
|
|
54066
|
-
e.push(
|
|
54067
|
-
} else t ? (e.push(
|
|
54068
|
-
return this.options.leftArrow !== !1 && e.push(
|
|
54091
|
+
e.push(uc(t)), e.push(dc(n));
|
|
54092
|
+
} else t ? (e.push(uc("’")), e.push(dc("‘"))) : (this.options.openSingleQuote !== !1 && e.push(uc(this.options.openSingleQuote)), this.options.closeSingleQuote !== !1 && e.push(dc(this.options.closeSingleQuote)));
|
|
54093
|
+
return this.options.leftArrow !== !1 && e.push(fc(this.options.leftArrow)), this.options.rightArrow !== !1 && e.push(pc(this.options.rightArrow)), this.options.copyright !== !1 && e.push(mc(this.options.copyright)), this.options.trademark !== !1 && e.push(hc(this.options.trademark)), this.options.servicemark !== !1 && e.push(gc(this.options.servicemark)), this.options.registeredTrademark !== !1 && e.push(_c(this.options.registeredTrademark)), this.options.oneHalf !== !1 && e.push(vc(this.options.oneHalf)), this.options.plusMinus !== !1 && e.push(yc(this.options.plusMinus)), this.options.notEqual !== !1 && e.push(bc(this.options.notEqual)), this.options.laquo !== !1 && e.push(xc(this.options.laquo)), this.options.raquo !== !1 && e.push(Sc(this.options.raquo)), this.options.multiplication !== !1 && e.push(Cc(this.options.multiplication)), this.options.superscriptTwo !== !1 && e.push(wc(this.options.superscriptTwo)), this.options.superscriptThree !== !1 && e.push(Tc(this.options.superscriptThree)), this.options.oneQuarter !== !1 && e.push(Ec(this.options.oneQuarter)), this.options.threeQuarters !== !1 && e.push(Dc(this.options.threeQuarters)), e;
|
|
54069
54094
|
}
|
|
54070
|
-
}),
|
|
54071
|
-
function Ac(e) {
|
|
54072
|
-
let t = e;
|
|
54073
|
-
return Oc.add(t), t;
|
|
54074
|
-
}
|
|
54095
|
+
}), kc = /* @__PURE__ */ new WeakSet(), Ac = /* @__PURE__ */ new WeakSet();
|
|
54075
54096
|
function jc(e) {
|
|
54076
|
-
|
|
54097
|
+
let t = e;
|
|
54098
|
+
return kc.add(t), t;
|
|
54077
54099
|
}
|
|
54078
54100
|
function Mc(e) {
|
|
54079
|
-
return
|
|
54101
|
+
return Array.isArray(e) && kc.has(e);
|
|
54102
|
+
}
|
|
54103
|
+
function Nc(e) {
|
|
54104
|
+
return e.flatMap((e) => e == null ? [] : Array.isArray(e) && Ac.has(e) && !Mc(e) ? Nc(e) : [e]);
|
|
54080
54105
|
}
|
|
54081
|
-
function
|
|
54106
|
+
function Pc(e, t) {
|
|
54082
54107
|
if (e === "slot") return 0;
|
|
54083
54108
|
if (e instanceof Function) {
|
|
54084
54109
|
let n = e(t);
|
|
54085
|
-
return Array.isArray(n) && !
|
|
54110
|
+
return Array.isArray(n) && !Mc(n) && !Ac.has(n) ? jc(n) : n;
|
|
54086
54111
|
}
|
|
54087
54112
|
let { children: n, ...r } = t ?? {};
|
|
54088
54113
|
if (e === "svg") throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
|
|
54089
54114
|
if (Array.isArray(n)) {
|
|
54090
|
-
if (
|
|
54115
|
+
if (Mc(n)) return jc([
|
|
54091
54116
|
e,
|
|
54092
54117
|
r,
|
|
54093
54118
|
n
|
|
54094
54119
|
]);
|
|
54095
|
-
if (n.length === 0) return
|
|
54096
|
-
let t =
|
|
54097
|
-
return t.length === 0 ?
|
|
54120
|
+
if (n.length === 0) return jc([e, r]);
|
|
54121
|
+
let t = Nc(n);
|
|
54122
|
+
return t.length === 0 ? jc([e, r]) : jc([
|
|
54098
54123
|
e,
|
|
54099
54124
|
r,
|
|
54100
54125
|
...t
|
|
54101
54126
|
]);
|
|
54102
54127
|
}
|
|
54103
|
-
return
|
|
54128
|
+
return jc(n == null ? [e, r] : [
|
|
54104
54129
|
e,
|
|
54105
54130
|
r,
|
|
54106
54131
|
n
|
|
54107
54132
|
]);
|
|
54108
54133
|
}
|
|
54109
|
-
var
|
|
54134
|
+
var Fc = (e, t) => Pc(e, t), Ic = (e, t) => {
|
|
54110
54135
|
let { state: n } = e, { selection: r } = n;
|
|
54111
54136
|
if (!r.empty) return !1;
|
|
54112
54137
|
let { $from: i } = r;
|
|
@@ -54124,7 +54149,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54124
54149
|
let n = i.parent.content, r = new xe(n, 0, 0);
|
|
54125
54150
|
return e.replace(l, i.after(), r), e.setSelection(ye.create(e.doc, l + n.size)), e.scrollIntoView(), t(e), !0;
|
|
54126
54151
|
});
|
|
54127
|
-
},
|
|
54152
|
+
}, Lc = /^\s*>\s$/, Rc = g.create({
|
|
54128
54153
|
name: "blockquote",
|
|
54129
54154
|
addOptions() {
|
|
54130
54155
|
return { HTMLAttributes: {} };
|
|
@@ -54136,9 +54161,9 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54136
54161
|
return [{ tag: "blockquote" }];
|
|
54137
54162
|
},
|
|
54138
54163
|
renderHTML({ HTMLAttributes: e }) {
|
|
54139
|
-
return /* @__PURE__ */
|
|
54164
|
+
return /* @__PURE__ */ Fc("blockquote", {
|
|
54140
54165
|
...o(this.options.HTMLAttributes, e),
|
|
54141
|
-
children: /* @__PURE__ */
|
|
54166
|
+
children: /* @__PURE__ */ Fc("slot", {})
|
|
54142
54167
|
});
|
|
54143
54168
|
},
|
|
54144
54169
|
parseMarkdown: (e, t) => {
|
|
@@ -54163,16 +54188,16 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54163
54188
|
addKeyboardShortcuts() {
|
|
54164
54189
|
return {
|
|
54165
54190
|
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
|
|
54166
|
-
Backspace: () =>
|
|
54191
|
+
Backspace: () => Ic(this.editor, this.type)
|
|
54167
54192
|
};
|
|
54168
54193
|
},
|
|
54169
54194
|
addInputRules() {
|
|
54170
54195
|
return [p({
|
|
54171
|
-
find:
|
|
54196
|
+
find: Lc,
|
|
54172
54197
|
type: this.type
|
|
54173
54198
|
})];
|
|
54174
54199
|
}
|
|
54175
|
-
}),
|
|
54200
|
+
}), zc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Bc = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Vc = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Hc = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Uc = S.create({
|
|
54176
54201
|
name: "bold",
|
|
54177
54202
|
addOptions() {
|
|
54178
54203
|
return { HTMLAttributes: {} };
|
|
@@ -54195,9 +54220,9 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54195
54220
|
];
|
|
54196
54221
|
},
|
|
54197
54222
|
renderHTML({ HTMLAttributes: e }) {
|
|
54198
|
-
return /* @__PURE__ */
|
|
54223
|
+
return /* @__PURE__ */ Fc("strong", {
|
|
54199
54224
|
...o(this.options.HTMLAttributes, e),
|
|
54200
|
-
children: /* @__PURE__ */
|
|
54225
|
+
children: /* @__PURE__ */ Fc("slot", {})
|
|
54201
54226
|
});
|
|
54202
54227
|
},
|
|
54203
54228
|
markdownTokenName: "strong",
|
|
@@ -54222,23 +54247,23 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54222
54247
|
},
|
|
54223
54248
|
addInputRules() {
|
|
54224
54249
|
return [u({
|
|
54225
|
-
find:
|
|
54250
|
+
find: zc,
|
|
54226
54251
|
type: this.type
|
|
54227
54252
|
}), u({
|
|
54228
|
-
find:
|
|
54253
|
+
find: Vc,
|
|
54229
54254
|
type: this.type
|
|
54230
54255
|
})];
|
|
54231
54256
|
},
|
|
54232
54257
|
addPasteRules() {
|
|
54233
54258
|
return [i({
|
|
54234
|
-
find:
|
|
54259
|
+
find: Bc,
|
|
54235
54260
|
type: this.type
|
|
54236
54261
|
}), i({
|
|
54237
|
-
find:
|
|
54262
|
+
find: Hc,
|
|
54238
54263
|
type: this.type
|
|
54239
54264
|
})];
|
|
54240
54265
|
}
|
|
54241
|
-
}),
|
|
54266
|
+
}), Wc = 4, Gc = /^```([a-z]+)?[\s\n]$/, Kc = /^~~~([a-z]+)?[\s\n]$/, qc = g.create({
|
|
54242
54267
|
name: "codeBlock",
|
|
54243
54268
|
addOptions() {
|
|
54244
54269
|
return {
|
|
@@ -54248,7 +54273,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54248
54273
|
exitOnArrowUp: !0,
|
|
54249
54274
|
defaultLanguage: null,
|
|
54250
54275
|
enableTabIndentation: !1,
|
|
54251
|
-
tabSize:
|
|
54276
|
+
tabSize: Wc,
|
|
54252
54277
|
HTMLAttributes: {}
|
|
54253
54278
|
};
|
|
54254
54279
|
},
|
|
@@ -54309,7 +54334,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54309
54334
|
},
|
|
54310
54335
|
Tab: ({ editor: e }) => {
|
|
54311
54336
|
if (!this.options.enableTabIndentation) return !1;
|
|
54312
|
-
let t = this.options.tabSize ??
|
|
54337
|
+
let t = this.options.tabSize ?? Wc, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
54313
54338
|
if (i.parent.type !== this.type) return !1;
|
|
54314
54339
|
let o = " ".repeat(t);
|
|
54315
54340
|
return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
|
|
@@ -54319,7 +54344,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54319
54344
|
},
|
|
54320
54345
|
"Shift-Tab": ({ editor: e }) => {
|
|
54321
54346
|
if (!this.options.enableTabIndentation) return !1;
|
|
54322
|
-
let t = this.options.tabSize ??
|
|
54347
|
+
let t = this.options.tabSize ?? Wc, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
54323
54348
|
return i.parent.type === this.type ? a ? e.commands.command(({ tr: e }) => {
|
|
54324
54349
|
let { pos: r } = i, a = i.start(), o = i.end(), s = n.doc.textBetween(a, o, "\n", "\n").split("\n"), c = 0, l = 0, u = r - a;
|
|
54325
54350
|
for (let e = 0; e < s.length; e += 1) {
|
|
@@ -54367,11 +54392,11 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54367
54392
|
},
|
|
54368
54393
|
addInputRules() {
|
|
54369
54394
|
return [a({
|
|
54370
|
-
find:
|
|
54395
|
+
find: Gc,
|
|
54371
54396
|
type: this.type,
|
|
54372
54397
|
getAttributes: (e) => ({ language: e[1] })
|
|
54373
54398
|
}), a({
|
|
54374
|
-
find:
|
|
54399
|
+
find: Kc,
|
|
54375
54400
|
type: this.type,
|
|
54376
54401
|
getAttributes: (e) => ({ language: e[1] })
|
|
54377
54402
|
})];
|
|
@@ -54388,12 +54413,12 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54388
54413
|
} }
|
|
54389
54414
|
})];
|
|
54390
54415
|
}
|
|
54391
|
-
}),
|
|
54416
|
+
}), Jc = g.create({
|
|
54392
54417
|
name: "doc",
|
|
54393
54418
|
topNode: !0,
|
|
54394
54419
|
content: "block+",
|
|
54395
54420
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
|
|
54396
|
-
}),
|
|
54421
|
+
}), Yc = g.create({
|
|
54397
54422
|
name: "hardBreak",
|
|
54398
54423
|
markdownTokenName: "br",
|
|
54399
54424
|
addOptions() {
|
|
@@ -54437,7 +54462,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54437
54462
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
54438
54463
|
};
|
|
54439
54464
|
}
|
|
54440
|
-
}),
|
|
54465
|
+
}), Xc = g.create({
|
|
54441
54466
|
name: "heading",
|
|
54442
54467
|
addOptions() {
|
|
54443
54468
|
return {
|
|
@@ -54498,7 +54523,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54498
54523
|
getAttributes: { level: e }
|
|
54499
54524
|
}));
|
|
54500
54525
|
}
|
|
54501
|
-
}),
|
|
54526
|
+
}), Zc = g.create({
|
|
54502
54527
|
name: "horizontalRule",
|
|
54503
54528
|
addOptions() {
|
|
54504
54529
|
return {
|
|
@@ -54540,7 +54565,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54540
54565
|
type: this.type
|
|
54541
54566
|
})];
|
|
54542
54567
|
}
|
|
54543
|
-
}),
|
|
54568
|
+
}), Qc = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, $c = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, el = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, tl = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, nl = S.create({
|
|
54544
54569
|
name: "italic",
|
|
54545
54570
|
addOptions() {
|
|
54546
54571
|
return { HTMLAttributes: {} };
|
|
@@ -54588,23 +54613,23 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54588
54613
|
},
|
|
54589
54614
|
addInputRules() {
|
|
54590
54615
|
return [u({
|
|
54591
|
-
find:
|
|
54616
|
+
find: Qc,
|
|
54592
54617
|
type: this.type
|
|
54593
54618
|
}), u({
|
|
54594
|
-
find:
|
|
54619
|
+
find: el,
|
|
54595
54620
|
type: this.type
|
|
54596
54621
|
})];
|
|
54597
54622
|
},
|
|
54598
54623
|
addPasteRules() {
|
|
54599
54624
|
return [i({
|
|
54600
|
-
find:
|
|
54625
|
+
find: $c,
|
|
54601
54626
|
type: this.type
|
|
54602
54627
|
}), i({
|
|
54603
|
-
find:
|
|
54628
|
+
find: tl,
|
|
54604
54629
|
type: this.type
|
|
54605
54630
|
})];
|
|
54606
54631
|
}
|
|
54607
|
-
}),
|
|
54632
|
+
}), rl = " ", il = "\xA0", al = g.create({
|
|
54608
54633
|
name: "paragraph",
|
|
54609
54634
|
priority: 1e3,
|
|
54610
54635
|
addOptions() {
|
|
@@ -54626,7 +54651,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54626
54651
|
let n = e.tokens || [];
|
|
54627
54652
|
if (n.length === 1 && n[0].type === "image") return t.parseChildren([n[0]]);
|
|
54628
54653
|
let r = t.parseInline(n);
|
|
54629
|
-
return n.length === 1 && n[0].type === "text" && (n[0].raw ===
|
|
54654
|
+
return n.length === 1 && n[0].type === "text" && (n[0].raw === rl || n[0].text === rl || n[0].raw === il || n[0].text === il) && r.length === 1 && r[0].type === "text" && (r[0].text === rl || r[0].text === il) ? t.createNode("paragraph", void 0, []) : t.createNode("paragraph", void 0, r);
|
|
54630
54655
|
},
|
|
54631
54656
|
renderMarkdown: (e, t, n) => {
|
|
54632
54657
|
if (!e) return "";
|
|
@@ -54634,7 +54659,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54634
54659
|
if (r.length === 0) {
|
|
54635
54660
|
var i, a;
|
|
54636
54661
|
let e = Array.isArray(n == null || (i = n.previousNode) == null ? void 0 : i.content) ? n.previousNode.content : [];
|
|
54637
|
-
return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ?
|
|
54662
|
+
return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ? rl : "";
|
|
54638
54663
|
}
|
|
54639
54664
|
return t.renderChildren(r);
|
|
54640
54665
|
},
|
|
@@ -54644,7 +54669,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54644
54669
|
addKeyboardShortcuts() {
|
|
54645
54670
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
54646
54671
|
}
|
|
54647
|
-
}),
|
|
54672
|
+
}), ol = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, sl = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, cl = S.create({
|
|
54648
54673
|
name: "strike",
|
|
54649
54674
|
addOptions() {
|
|
54650
54675
|
return { HTMLAttributes: {} };
|
|
@@ -54683,17 +54708,17 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54683
54708
|
},
|
|
54684
54709
|
addInputRules() {
|
|
54685
54710
|
return [u({
|
|
54686
|
-
find:
|
|
54711
|
+
find: ol,
|
|
54687
54712
|
type: this.type
|
|
54688
54713
|
})];
|
|
54689
54714
|
},
|
|
54690
54715
|
addPasteRules() {
|
|
54691
54716
|
return [i({
|
|
54692
|
-
find:
|
|
54717
|
+
find: sl,
|
|
54693
54718
|
type: this.type
|
|
54694
54719
|
})];
|
|
54695
54720
|
}
|
|
54696
|
-
}),
|
|
54721
|
+
}), ll = g.create({
|
|
54697
54722
|
name: "text",
|
|
54698
54723
|
group: "inline",
|
|
54699
54724
|
parseMarkdown: (e) => ({
|
|
@@ -54701,7 +54726,7 @@ var Pc = (e, t) => Nc(e, t), Fc = (e, t) => {
|
|
|
54701
54726
|
text: e.text || ""
|
|
54702
54727
|
}),
|
|
54703
54728
|
renderMarkdown: (e) => e.text || ""
|
|
54704
|
-
}),
|
|
54729
|
+
}), ul = S.create({
|
|
54705
54730
|
name: "underline",
|
|
54706
54731
|
addOptions() {
|
|
54707
54732
|
return { HTMLAttributes: {} };
|
|
@@ -54820,7 +54845,7 @@ w.create({
|
|
|
54820
54845
|
})];
|
|
54821
54846
|
}
|
|
54822
54847
|
});
|
|
54823
|
-
var
|
|
54848
|
+
var dl = w.create({
|
|
54824
54849
|
name: "dropCursor",
|
|
54825
54850
|
addOptions() {
|
|
54826
54851
|
return {
|
|
@@ -54832,7 +54857,7 @@ var ul = w.create({
|
|
|
54832
54857
|
addProseMirrorPlugins() {
|
|
54833
54858
|
return [we(this.options)];
|
|
54834
54859
|
}
|
|
54835
|
-
}),
|
|
54860
|
+
}), fl = w.create({
|
|
54836
54861
|
name: "focus",
|
|
54837
54862
|
addOptions() {
|
|
54838
54863
|
return {
|
|
@@ -54862,7 +54887,7 @@ var ul = w.create({
|
|
|
54862
54887
|
} }
|
|
54863
54888
|
})];
|
|
54864
54889
|
}
|
|
54865
|
-
}),
|
|
54890
|
+
}), pl = w.create({
|
|
54866
54891
|
name: "gapCursor",
|
|
54867
54892
|
addProseMirrorPlugins() {
|
|
54868
54893
|
return [Te()];
|
|
@@ -54875,8 +54900,8 @@ var ul = w.create({
|
|
|
54875
54900
|
};
|
|
54876
54901
|
return { allowGapCursor: te(h(e, "allowGapCursor", t)) ?? null };
|
|
54877
54902
|
}
|
|
54878
|
-
}),
|
|
54879
|
-
function
|
|
54903
|
+
}), ml = "placeholder", hl = new _e("tiptap__placeholder");
|
|
54904
|
+
function gl(e) {
|
|
54880
54905
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
54881
54906
|
return o && u.push(l), Se.node(i, i + a.nodeSize, {
|
|
54882
54907
|
class: u.join(" "),
|
|
@@ -54888,14 +54913,14 @@ function hl(e) {
|
|
|
54888
54913
|
}) : n
|
|
54889
54914
|
});
|
|
54890
54915
|
}
|
|
54891
|
-
function
|
|
54916
|
+
function _l(e, t) {
|
|
54892
54917
|
return typeof e == "function" ? e(t) : e;
|
|
54893
54918
|
}
|
|
54894
|
-
function
|
|
54919
|
+
function vl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
54895
54920
|
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
54896
54921
|
return r.nodesBetween(a, o, (r, i) => {
|
|
54897
54922
|
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && C(r);
|
|
54898
|
-
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(
|
|
54923
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(gl({
|
|
54899
54924
|
editor: e,
|
|
54900
54925
|
isEmptyDoc: l,
|
|
54901
54926
|
dataAttribute: n,
|
|
@@ -54903,7 +54928,7 @@ function _l({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
54903
54928
|
placeholder: t.placeholder,
|
|
54904
54929
|
classes: {
|
|
54905
54930
|
emptyEditor: t.emptyEditorClass,
|
|
54906
|
-
emptyNode:
|
|
54931
|
+
emptyNode: _l(t.emptyNodeClass, {
|
|
54907
54932
|
editor: e,
|
|
54908
54933
|
node: r,
|
|
54909
54934
|
pos: i,
|
|
@@ -54915,14 +54940,14 @@ function _l({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
54915
54940
|
})), t.includeChildren;
|
|
54916
54941
|
}), c;
|
|
54917
54942
|
}
|
|
54918
|
-
function
|
|
54943
|
+
function yl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
54919
54944
|
if (!e.isEditable && t.showOnlyWhenEditable) return null;
|
|
54920
54945
|
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
54921
54946
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
54922
54947
|
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
54923
54948
|
if (c && c.type.isTextblock && C(c)) {
|
|
54924
54949
|
let r = a >= l && a <= l + c.nodeSize;
|
|
54925
|
-
o.push(
|
|
54950
|
+
o.push(gl({
|
|
54926
54951
|
editor: e,
|
|
54927
54952
|
isEmptyDoc: s,
|
|
54928
54953
|
dataAttribute: n,
|
|
@@ -54930,7 +54955,7 @@ function vl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
54930
54955
|
placeholder: t.placeholder,
|
|
54931
54956
|
classes: {
|
|
54932
54957
|
emptyEditor: t.emptyEditorClass,
|
|
54933
|
-
emptyNode:
|
|
54958
|
+
emptyNode: _l(t.emptyNodeClass, {
|
|
54934
54959
|
editor: e,
|
|
54935
54960
|
node: c,
|
|
54936
54961
|
pos: l,
|
|
@@ -54941,7 +54966,7 @@ function vl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
54941
54966
|
pos: l
|
|
54942
54967
|
}));
|
|
54943
54968
|
}
|
|
54944
|
-
} else o.push(...
|
|
54969
|
+
} else o.push(...vl({
|
|
54945
54970
|
editor: e,
|
|
54946
54971
|
options: t,
|
|
54947
54972
|
dataAttribute: n,
|
|
@@ -54952,7 +54977,7 @@ function vl({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
54952
54977
|
}));
|
|
54953
54978
|
return Ce.create(r, o);
|
|
54954
54979
|
}
|
|
54955
|
-
function
|
|
54980
|
+
function bl(e, t) {
|
|
54956
54981
|
let n = e.resolve(t);
|
|
54957
54982
|
if (n.depth === 0) {
|
|
54958
54983
|
let e = n.nodeAfter ?? n.nodeBefore;
|
|
@@ -54972,13 +54997,13 @@ function yl(e, t) {
|
|
|
54972
54997
|
to: r + n.node(1).nodeSize
|
|
54973
54998
|
};
|
|
54974
54999
|
}
|
|
54975
|
-
function
|
|
55000
|
+
function xl(e, t) {
|
|
54976
55001
|
return {
|
|
54977
55002
|
from: Math.max(0, t.from - 1),
|
|
54978
55003
|
to: Math.min(e.content.size, t.to - 1)
|
|
54979
55004
|
};
|
|
54980
55005
|
}
|
|
54981
|
-
function
|
|
55006
|
+
function Sl(e, t, n) {
|
|
54982
55007
|
let r = [];
|
|
54983
55008
|
return e.forEach((e, i) => {
|
|
54984
55009
|
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
@@ -54988,7 +55013,7 @@ function xl(e, t, n) {
|
|
|
54988
55013
|
});
|
|
54989
55014
|
}), r;
|
|
54990
55015
|
}
|
|
54991
|
-
function
|
|
55016
|
+
function Cl(e) {
|
|
54992
55017
|
if (e.length === 0) return [];
|
|
54993
55018
|
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
54994
55019
|
for (let e = 1; e < t.length; e += 1) {
|
|
@@ -54997,31 +55022,31 @@ function Sl(e) {
|
|
|
54997
55022
|
}
|
|
54998
55023
|
return n;
|
|
54999
55024
|
}
|
|
55000
|
-
function
|
|
55001
|
-
let n =
|
|
55002
|
-
return n.push(
|
|
55025
|
+
function wl(e, t) {
|
|
55026
|
+
let n = Sl(e, t.from, t.to);
|
|
55027
|
+
return n.push(xl(e, bl(e, t.from))), t.to > t.from ? n.push(xl(e, bl(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(xl(e, bl(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
55003
55028
|
}
|
|
55004
|
-
function
|
|
55029
|
+
function Tl(e, t, n) {
|
|
55005
55030
|
let r = [];
|
|
55006
55031
|
if (e.docChanged) {
|
|
55007
55032
|
let t = x(e);
|
|
55008
|
-
for (let e of t) r.push(...
|
|
55033
|
+
for (let e of t) r.push(...wl(n.doc, e.newRange));
|
|
55009
55034
|
}
|
|
55010
|
-
return e.selectionSet && (r.push(
|
|
55035
|
+
return e.selectionSet && (r.push(xl(n.doc, bl(n.doc, e.mapping.map(t.selection.anchor)))), r.push(xl(n.doc, bl(n.doc, n.selection.anchor)))), Cl(r);
|
|
55011
55036
|
}
|
|
55012
|
-
function
|
|
55037
|
+
function El(e, t, n) {
|
|
55013
55038
|
let r = Math.max(0, Math.min(e, n.content.size));
|
|
55014
55039
|
return {
|
|
55015
55040
|
from: r,
|
|
55016
55041
|
to: Math.max(r, Math.min(t, n.content.size))
|
|
55017
55042
|
};
|
|
55018
55043
|
}
|
|
55019
|
-
function
|
|
55044
|
+
function Dl({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
55020
55045
|
let s = e;
|
|
55021
55046
|
for (let e of t) {
|
|
55022
|
-
let { from: t, to: c } =
|
|
55047
|
+
let { from: t, to: c } = El(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
55023
55048
|
l.length && (s = s.remove(l));
|
|
55024
|
-
let u =
|
|
55049
|
+
let u = vl({
|
|
55025
55050
|
editor: n,
|
|
55026
55051
|
options: r,
|
|
55027
55052
|
dataAttribute: i,
|
|
@@ -55034,10 +55059,10 @@ function El({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i
|
|
|
55034
55059
|
}
|
|
55035
55060
|
return s;
|
|
55036
55061
|
}
|
|
55037
|
-
function
|
|
55062
|
+
function Ol({ editor: e, options: t, dataAttribute: n }) {
|
|
55038
55063
|
return {
|
|
55039
55064
|
init(r, i) {
|
|
55040
|
-
return
|
|
55065
|
+
return yl({
|
|
55041
55066
|
editor: e,
|
|
55042
55067
|
options: t,
|
|
55043
55068
|
dataAttribute: n,
|
|
@@ -55046,9 +55071,9 @@ function Dl({ editor: e, options: t, dataAttribute: n }) {
|
|
|
55046
55071
|
}) ?? Ce.empty;
|
|
55047
55072
|
},
|
|
55048
55073
|
apply(r, i, a, o) {
|
|
55049
|
-
return !r.docChanged && !r.selectionSet ? i :
|
|
55074
|
+
return !r.docChanged && !r.selectionSet ? i : Dl({
|
|
55050
55075
|
decorations: i.map(r.mapping, r.doc),
|
|
55051
|
-
ranges:
|
|
55076
|
+
ranges: Tl(r, a, o),
|
|
55052
55077
|
editor: e,
|
|
55053
55078
|
options: t,
|
|
55054
55079
|
dataAttribute: n,
|
|
@@ -55058,34 +55083,34 @@ function Dl({ editor: e, options: t, dataAttribute: n }) {
|
|
|
55058
55083
|
}
|
|
55059
55084
|
};
|
|
55060
55085
|
}
|
|
55061
|
-
function
|
|
55086
|
+
function kl(e) {
|
|
55062
55087
|
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
55063
55088
|
}
|
|
55064
|
-
function
|
|
55065
|
-
let n = t.dataAttribute ? `data-${
|
|
55089
|
+
function Al({ editor: e, options: t }) {
|
|
55090
|
+
let n = t.dataAttribute ? `data-${kl(t.dataAttribute)}` : `data-${ml}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
55066
55091
|
return new ge({
|
|
55067
|
-
key:
|
|
55068
|
-
...r ? {} : { state:
|
|
55092
|
+
key: hl,
|
|
55093
|
+
...r ? {} : { state: Ol({
|
|
55069
55094
|
editor: e,
|
|
55070
55095
|
options: t,
|
|
55071
55096
|
dataAttribute: n
|
|
55072
55097
|
}) },
|
|
55073
|
-
props: { decorations: r ? ({ doc: r, selection: i }) =>
|
|
55098
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => yl({
|
|
55074
55099
|
editor: e,
|
|
55075
55100
|
options: t,
|
|
55076
55101
|
dataAttribute: n,
|
|
55077
55102
|
doc: r,
|
|
55078
55103
|
selection: i
|
|
55079
|
-
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Ce.empty :
|
|
55104
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Ce.empty : hl.getState(n) ?? Ce.empty }
|
|
55080
55105
|
});
|
|
55081
55106
|
}
|
|
55082
|
-
var
|
|
55107
|
+
var jl = w.create({
|
|
55083
55108
|
name: "placeholder",
|
|
55084
55109
|
addOptions() {
|
|
55085
55110
|
return {
|
|
55086
55111
|
emptyEditorClass: "is-editor-empty",
|
|
55087
55112
|
emptyNodeClass: "is-empty",
|
|
55088
|
-
dataAttribute:
|
|
55113
|
+
dataAttribute: ml,
|
|
55089
55114
|
placeholder: "Write something …",
|
|
55090
55115
|
showOnlyWhenEditable: !0,
|
|
55091
55116
|
showOnlyCurrent: !0,
|
|
@@ -55093,23 +55118,23 @@ var Al = w.create({
|
|
|
55093
55118
|
};
|
|
55094
55119
|
},
|
|
55095
55120
|
addProseMirrorPlugins() {
|
|
55096
|
-
return [
|
|
55121
|
+
return [Al({
|
|
55097
55122
|
editor: this.editor,
|
|
55098
55123
|
options: this.options
|
|
55099
55124
|
})];
|
|
55100
55125
|
}
|
|
55101
55126
|
});
|
|
55102
|
-
function
|
|
55127
|
+
function Ml(e, t) {
|
|
55103
55128
|
return !e.selection.empty && !c(e.selection) && t.isEditable;
|
|
55104
55129
|
}
|
|
55105
|
-
function
|
|
55106
|
-
return
|
|
55130
|
+
function Nl(e, t) {
|
|
55131
|
+
return Ml(e, t) && !t.isFocused && !t.view.dragging;
|
|
55107
55132
|
}
|
|
55108
|
-
function
|
|
55133
|
+
function Pl() {
|
|
55109
55134
|
var e;
|
|
55110
55135
|
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
55111
55136
|
}
|
|
55112
|
-
function
|
|
55137
|
+
function Fl(e) {
|
|
55113
55138
|
e.focus();
|
|
55114
55139
|
}
|
|
55115
55140
|
w.create({
|
|
@@ -55123,15 +55148,15 @@ w.create({
|
|
|
55123
55148
|
key: new _e("selection"),
|
|
55124
55149
|
props: {
|
|
55125
55150
|
decorations(n) {
|
|
55126
|
-
return
|
|
55151
|
+
return Nl(n, e) ? Ce.create(n.doc, [Se.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
55127
55152
|
},
|
|
55128
55153
|
handleDOMEvents: {
|
|
55129
55154
|
blur(t) {
|
|
55130
|
-
return
|
|
55155
|
+
return Ml(t.state, e) && Pl(), !1;
|
|
55131
55156
|
},
|
|
55132
55157
|
focus(t) {
|
|
55133
|
-
return
|
|
55134
|
-
!e.isDestroyed && t.hasFocus() &&
|
|
55158
|
+
return Ml(t.state, e) && requestAnimationFrame(() => {
|
|
55159
|
+
!e.isDestroyed && t.hasFocus() && Fl(t);
|
|
55135
55160
|
}), !1;
|
|
55136
55161
|
}
|
|
55137
55162
|
}
|
|
@@ -55139,10 +55164,10 @@ w.create({
|
|
|
55139
55164
|
})];
|
|
55140
55165
|
}
|
|
55141
55166
|
});
|
|
55142
|
-
function
|
|
55167
|
+
function Il({ types: e, node: t }) {
|
|
55143
55168
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
55144
55169
|
}
|
|
55145
|
-
var
|
|
55170
|
+
var Ll = w.create({
|
|
55146
55171
|
name: "trailingNode",
|
|
55147
55172
|
addOptions() {
|
|
55148
55173
|
return {
|
|
@@ -55161,7 +55186,7 @@ var Il = w.create({
|
|
|
55161
55186
|
state: {
|
|
55162
55187
|
init: (e, t) => {
|
|
55163
55188
|
let r = t.tr.doc.lastChild;
|
|
55164
|
-
return !
|
|
55189
|
+
return !Il({
|
|
55165
55190
|
node: r,
|
|
55166
55191
|
types: n
|
|
55167
55192
|
});
|
|
@@ -55169,7 +55194,7 @@ var Il = w.create({
|
|
|
55169
55194
|
apply: (e, t) => {
|
|
55170
55195
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
55171
55196
|
let r = e.doc.lastChild;
|
|
55172
|
-
return !
|
|
55197
|
+
return !Il({
|
|
55173
55198
|
node: r,
|
|
55174
55199
|
types: n
|
|
55175
55200
|
});
|
|
@@ -55177,7 +55202,7 @@ var Il = w.create({
|
|
|
55177
55202
|
}
|
|
55178
55203
|
})];
|
|
55179
55204
|
}
|
|
55180
|
-
}),
|
|
55205
|
+
}), Rl = w.create({
|
|
55181
55206
|
name: "undoRedo",
|
|
55182
55207
|
addOptions() {
|
|
55183
55208
|
return {
|
|
@@ -55203,14 +55228,14 @@ var Il = w.create({
|
|
|
55203
55228
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
55204
55229
|
};
|
|
55205
55230
|
}
|
|
55206
|
-
}),
|
|
55231
|
+
}), zl = w.create({
|
|
55207
55232
|
name: "starterKit",
|
|
55208
55233
|
addExtensions() {
|
|
55209
55234
|
let e = [];
|
|
55210
|
-
return this.options.bold !== !1 && e.push(
|
|
55235
|
+
return this.options.bold !== !1 && e.push(Uc.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(Rc.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(rs.configure(this.options.bulletList)), this.options.code !== !1 && e.push(je.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(qc.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(Jc.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(dl.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(pl.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(Yc.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(Xc.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Rl.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(Zc.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(nl.configure(this.options.italic)), this.options.listItem !== !1 && e.push(Es.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Fs.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(de.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Qs.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(al.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(cl.configure(this.options.strike)), this.options.text !== !1 && e.push(ll.configure(this.options.text)), this.options.underline !== !1 && e.push(ul.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Ll.configure(this.options?.trailingNode)), e;
|
|
55211
55236
|
}
|
|
55212
|
-
}),
|
|
55213
|
-
starterKit:
|
|
55237
|
+
}), Bl = Me.extend({ excludes: "code" }), Vl = ({ enableUndoRedo: e } = {}) => ({
|
|
55238
|
+
starterKit: zl.configure({
|
|
55214
55239
|
dropcursor: {
|
|
55215
55240
|
width: 4,
|
|
55216
55241
|
color: "#ebf6fe"
|
|
@@ -55219,11 +55244,11 @@ var Il = w.create({
|
|
|
55219
55244
|
link: !1,
|
|
55220
55245
|
...e === !1 ? { undoRedo: !1 } : {}
|
|
55221
55246
|
}),
|
|
55222
|
-
code:
|
|
55247
|
+
code: Bl,
|
|
55223
55248
|
externalLinkPreview: me,
|
|
55224
55249
|
callout: pe,
|
|
55225
|
-
taskList:
|
|
55226
|
-
taskItem:
|
|
55250
|
+
taskList: ac.configure({ HTMLAttributes: { class: "scribe-task-list" } }),
|
|
55251
|
+
taskItem: ic.configure({ nested: !0 }),
|
|
55227
55252
|
tableKit: le.configure({ table: !1 }),
|
|
55228
55253
|
table: ue,
|
|
55229
55254
|
highlight: Xe,
|
|
@@ -55237,8 +55262,8 @@ var Il = w.create({
|
|
|
55237
55262
|
emojis: ze,
|
|
55238
55263
|
enableEmoticons: !0
|
|
55239
55264
|
}),
|
|
55240
|
-
mathematics:
|
|
55241
|
-
typography:
|
|
55265
|
+
mathematics: $o,
|
|
55266
|
+
typography: Oc
|
|
55242
55267
|
});
|
|
55243
55268
|
//#endregion
|
|
55244
|
-
export {
|
|
55269
|
+
export { fl as n, jl as r, Vl as t };
|