eddyter 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{generateDocxThumbnail-BeH7SNAr.js → generateDocxThumbnail-kvUzj-72.js} +1 -1
- package/dist/{generatePdfThumbnail-CJxW0G8e.js → generatePdfThumbnail-n9mJQXLd.js} +1 -1
- package/dist/{generateXlsxThumbnail-DyRikb2K.js → generateXlsxThumbnail-Dmj571Qe.js} +1 -1
- package/dist/{html2pdf.bundle.min-C6p5g5F8.js → html2pdf.bundle.min-DO9nUvFt.js} +1 -1
- package/dist/{index-XFLcBXFz.js → index-BFVJDNlm.js} +4 -4
- package/dist/{index-TGGbJHQ1.js → index-Bvb6NDBM.js} +213 -207
- package/dist/{index-CXbW2YzF.js → index-DdnH-eml.js} +1 -1
- package/dist/{index-oZCQTqYq.js → index-qeSJbu9B.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import { RichTextPlugin as aL } from "@lexical/react/LexicalRichTextPlugin";
|
|
|
18
18
|
import { TablePlugin as sL } from "@lexical/react/LexicalTablePlugin";
|
|
19
19
|
import { $isTableCellNode as $t, $createTableRowNode as lL, $createTableNode as cL, TableCellHeaderStates as er, $createTableCellNode as OL, TableNode as O$, TableCellNode as az, TableRowNode as dL, $createTableNodeWithDimensions as uL, $isTableRowNode as en, $isTableNode as xi, $isTableSelection as vo, $getTableCellNodeFromLexicalNode as Rm, $getTableNodeFromLexicalNodeOrThrow as dr, getTableElement as pO, getTableObserverFromTableElement as Cm, $getTableRowIndexFromTableCellNode as Rl, $getNodeTriplet as Em, $insertTableRow__EXPERIMENTAL as sz, $getTableColumnIndexFromTableCellNode as Q0, $insertTableColumn__EXPERIMENTAL as lz, $deleteTableRow__EXPERIMENTAL as fL, $deleteTableColumn__EXPERIMENTAL as hL, $unmergeCell as pL, $computeTableMapSkipCellCheck as eT, getDOMCellFromTarget as mL, $getTableAndElementByKey as m1 } from "@lexical/table";
|
|
20
20
|
import { mergeRegister as Ri, $wrapNodeInElement as Vu, $findMatchingParent as Ur, $getNearestNodeOfType as Qx, $getNearestBlockElementAncestorOrThrow as gL, $insertNodeToNearestRoot as tT, $isEditorIsNestedEditor as $L, mediaFileReader as QL, isMimeType as rT, calculateZoomLevel as b0, CAN_USE_DOM as bL } from "@lexical/utils";
|
|
21
|
-
import { createCommand as Qr, DecoratorNode as ro, createEditor as bx, $applyNodeReplacement as cc, $insertNodes as Fi, $isRootOrShadowRoot as Es, $createParagraphNode as ot, COMMAND_PRIORITY_EDITOR as ls, $isRangeSelection as $e, $setSelection as ga, $createRangeSelection as yx, $getSelection as he, $getRoot as Dt, COMMAND_PRIORITY_LOW as lr, $getNearestNodeFromDOMNode as Jo, isHTMLElement as Sx, TextNode as cz, $createTextNode as vt, PASTE_COMMAND as Oz, ParagraphNode as gu, COMMAND_PRIORITY_HIGH as Po, $isTextNode as
|
|
21
|
+
import { createCommand as Qr, DecoratorNode as ro, createEditor as bx, $applyNodeReplacement as cc, $insertNodes as Fi, $isRootOrShadowRoot as Es, $createParagraphNode as ot, COMMAND_PRIORITY_EDITOR as ls, $isRangeSelection as $e, $setSelection as ga, $createRangeSelection as yx, $getSelection as he, $getRoot as Dt, COMMAND_PRIORITY_LOW as lr, $getNearestNodeFromDOMNode as Jo, isHTMLElement as Sx, TextNode as cz, $createTextNode as vt, PASTE_COMMAND as Oz, ParagraphNode as gu, COMMAND_PRIORITY_HIGH as Po, $isTextNode as Vt, $createLineBreakNode as y0, $getNodeByKey as Et, $isNodeSelection as d$, CLICK_COMMAND as dz, KEY_DELETE_COMMAND as yL, KEY_BACKSPACE_COMMAND as uz, $isParagraphNode as Oc, $isElementNode as Nn, FORMAT_TEXT_COMMAND as tn, FORMAT_ELEMENT_COMMAND as Nu, KEY_DOWN_COMMAND as wx, COMMAND_PRIORITY_CRITICAL as el, CAN_UNDO_COMMAND as SL, CAN_REDO_COMMAND as wL, SELECTION_CHANGE_COMMAND as dc, UNDO_COMMAND as zm, REDO_COMMAND as S0, KEY_SPACE_COMMAND as xL, $isLineBreakNode as Fp, KEY_ARROW_DOWN_COMMAND as fz, KEY_ARROW_UP_COMMAND as hz, KEY_ESCAPE_COMMAND as u$, KEY_TAB_COMMAND as pz, KEY_ENTER_COMMAND as xx, $createNodeSelection as qm, getDOMSelection as f$, KEY_ARROW_LEFT_COMMAND as vL, KEY_ARROW_RIGHT_COMMAND as PL, isDOMNode as kL, $isDecoratorNode as TL } from "lexical";
|
|
22
22
|
import { $isCodeNode as oi, CodeNode as vx, normalizeCodeLang as _L, getLanguageFriendlyName as XL, $createCodeNode as jn, CodeHighlightNode as RL, CODE_LANGUAGE_MAP as mz, registerCodeHighlighting as CL, $isCodeHighlightNode as EL } from "@lexical/code";
|
|
23
23
|
import { $createLinkNode as Hp, LinkNode as zL, $isLinkNode as kr, TOGGLE_LINK_COMMAND as Ai, $isAutoLinkNode as w0 } from "@lexical/link";
|
|
24
24
|
import { $createListNode as ja, $createListItemNode as zs, $isListNode as h$, $isListItemNode as Zm, ListNode as p$, ListItemNode as qL, INSERT_ORDERED_LIST_COMMAND as m$, REMOVE_LIST_COMMAND as Ma, INSERT_CHECK_LIST_COMMAND as Vf, INSERT_UNORDERED_LIST_COMMAND as g$ } from "@lexical/list";
|
|
@@ -964,7 +964,7 @@ function uj(t) {
|
|
|
964
964
|
}
|
|
965
965
|
const Wn = Qr(
|
|
966
966
|
"AI_ACTION_COMMAND"
|
|
967
|
-
), _z = Qr(), fj = Pt.lazy(() => import("./index-
|
|
967
|
+
), _z = Qr(), fj = Pt.lazy(() => import("./index-DdnH-eml.js"));
|
|
968
968
|
function hj(t) {
|
|
969
969
|
return t.parentElement != null && t.parentElement.tagName === "LI" && t.previousSibling === null && t.getAttribute("aria-roledescription") === "checkbox";
|
|
970
970
|
}
|
|
@@ -12834,7 +12834,7 @@ function e7(t) {
|
|
|
12834
12834
|
function d_(t) {
|
|
12835
12835
|
return t < 65536 ? 1 : 2;
|
|
12836
12836
|
}
|
|
12837
|
-
class
|
|
12837
|
+
class Wt {
|
|
12838
12838
|
/**
|
|
12839
12839
|
Get the line description around the given position.
|
|
12840
12840
|
*/
|
|
@@ -12966,10 +12966,10 @@ class Vt {
|
|
|
12966
12966
|
static of(e) {
|
|
12967
12967
|
if (e.length == 0)
|
|
12968
12968
|
throw new RangeError("A document must have at least one line");
|
|
12969
|
-
return e.length == 1 && !e[0] ?
|
|
12969
|
+
return e.length == 1 && !e[0] ? Wt.empty : e.length <= 32 ? new Er(e) : ta.from(Er.split(e, []));
|
|
12970
12970
|
}
|
|
12971
12971
|
}
|
|
12972
|
-
class Er extends
|
|
12972
|
+
class Er extends Wt {
|
|
12973
12973
|
constructor(e, r = PJ(e)) {
|
|
12974
12974
|
super(), this.text = e, this.length = r;
|
|
12975
12975
|
}
|
|
@@ -13031,7 +13031,7 @@ class Er extends Vt {
|
|
|
13031
13031
|
return i > -1 && r.push(new Er(n, i)), r;
|
|
13032
13032
|
}
|
|
13033
13033
|
}
|
|
13034
|
-
class ta extends
|
|
13034
|
+
class ta extends Wt {
|
|
13035
13035
|
constructor(e, r) {
|
|
13036
13036
|
super(), this.children = e, this.length = r, this.lines = 0;
|
|
13037
13037
|
for (let n of e)
|
|
@@ -13129,7 +13129,7 @@ class ta extends Vt {
|
|
|
13129
13129
|
return f(), s.length == 1 ? s[0] : new ta(s, r);
|
|
13130
13130
|
}
|
|
13131
13131
|
}
|
|
13132
|
-
|
|
13132
|
+
Wt.empty = /* @__PURE__ */ new Er([""], 0);
|
|
13133
13133
|
function PJ(t) {
|
|
13134
13134
|
let e = -1;
|
|
13135
13135
|
for (let r of t)
|
|
@@ -13209,7 +13209,7 @@ class r7 {
|
|
|
13209
13209
|
return !1;
|
|
13210
13210
|
}
|
|
13211
13211
|
}
|
|
13212
|
-
typeof Symbol < "u" && (
|
|
13212
|
+
typeof Symbol < "u" && (Wt.prototype[Symbol.iterator] = function() {
|
|
13213
13213
|
return this.iter();
|
|
13214
13214
|
}, Qu.prototype[Symbol.iterator] = t7.prototype[Symbol.iterator] = r7.prototype[Symbol.iterator] = function() {
|
|
13215
13215
|
return this;
|
|
@@ -13447,8 +13447,8 @@ class jr extends ha {
|
|
|
13447
13447
|
r[i] = s, r[i + 1] = a;
|
|
13448
13448
|
let l = i >> 1;
|
|
13449
13449
|
for (; n.length < l; )
|
|
13450
|
-
n.push(
|
|
13451
|
-
n.push(a ? e.slice(o, o + a) :
|
|
13450
|
+
n.push(Wt.empty);
|
|
13451
|
+
n.push(a ? e.slice(o, o + a) : Wt.empty);
|
|
13452
13452
|
}
|
|
13453
13453
|
o += a;
|
|
13454
13454
|
}
|
|
@@ -13563,7 +13563,7 @@ class jr extends ha {
|
|
|
13563
13563
|
let { from: u, to: f = u, insert: h } = d;
|
|
13564
13564
|
if (u > f || u < 0 || f > r)
|
|
13565
13565
|
throw new RangeError(`Invalid change range ${u} to ${f} (in doc of length ${r})`);
|
|
13566
|
-
let p = h ? typeof h == "string" ?
|
|
13566
|
+
let p = h ? typeof h == "string" ? Wt.of(h.split(n || F0)) : h : Wt.empty, g = p.length;
|
|
13567
13567
|
if (u == f && g == 0)
|
|
13568
13568
|
return;
|
|
13569
13569
|
u < a && l(), u > a && vn(i, u - a, -1), vn(i, f - u, g), Ts(o, i, p), a = f;
|
|
@@ -13596,8 +13596,8 @@ class jr extends ha {
|
|
|
13596
13596
|
r.push(o[0], 0);
|
|
13597
13597
|
else {
|
|
13598
13598
|
for (; n.length < i; )
|
|
13599
|
-
n.push(
|
|
13600
|
-
n[i] =
|
|
13599
|
+
n.push(Wt.empty);
|
|
13600
|
+
n[i] = Wt.of(o.slice(1)), r.push(o[0], n[i].length);
|
|
13601
13601
|
}
|
|
13602
13602
|
}
|
|
13603
13603
|
}
|
|
@@ -13624,7 +13624,7 @@ function Ts(t, e, r) {
|
|
|
13624
13624
|
t[t.length - 1] = t[t.length - 1].append(r);
|
|
13625
13625
|
else {
|
|
13626
13626
|
for (; t.length < n; )
|
|
13627
|
-
t.push(
|
|
13627
|
+
t.push(Wt.empty);
|
|
13628
13628
|
t.push(r);
|
|
13629
13629
|
}
|
|
13630
13630
|
}
|
|
@@ -13635,7 +13635,7 @@ function H0(t, e, r) {
|
|
|
13635
13635
|
if (l < 0)
|
|
13636
13636
|
i += s, o += s;
|
|
13637
13637
|
else {
|
|
13638
|
-
let c = i, d = o, u =
|
|
13638
|
+
let c = i, d = o, u = Wt.empty;
|
|
13639
13639
|
for (; c += s, d += l, l && n && (u = u.append(n[a - 2 >> 1])), !(r || a == t.sections.length || t.sections[a + 1] < 0); )
|
|
13640
13640
|
s = t.sections[a++], l = t.sections[a++];
|
|
13641
13641
|
e(i, c, o, d, u), i = c, o = d;
|
|
@@ -13715,11 +13715,11 @@ class Ju {
|
|
|
13715
13715
|
}
|
|
13716
13716
|
get text() {
|
|
13717
13717
|
let { inserted: e } = this.set, r = this.i - 2 >> 1;
|
|
13718
|
-
return r >= e.length ?
|
|
13718
|
+
return r >= e.length ? Wt.empty : e[r];
|
|
13719
13719
|
}
|
|
13720
13720
|
textBit(e) {
|
|
13721
13721
|
let { inserted: r } = this.set, n = this.i - 2 >> 1;
|
|
13722
|
-
return n >= r.length && !e ?
|
|
13722
|
+
return n >= r.length && !e ? Wt.empty : r[n].slice(this.off, e == null ? void 0 : this.off + e);
|
|
13723
13723
|
}
|
|
13724
13724
|
forward(e) {
|
|
13725
13725
|
e == this.len ? this.next() : (this.len -= e, this.off += e);
|
|
@@ -14672,7 +14672,7 @@ class Ct {
|
|
|
14672
14672
|
[`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
|
|
14673
14673
|
*/
|
|
14674
14674
|
toText(e) {
|
|
14675
|
-
return
|
|
14675
|
+
return Wt.of(e.split(this.facet(Ct.lineSeparator) || F0));
|
|
14676
14676
|
}
|
|
14677
14677
|
/**
|
|
14678
14678
|
Return the given range of the document as a string.
|
|
@@ -14734,7 +14734,7 @@ class Ct {
|
|
|
14734
14734
|
transactions.
|
|
14735
14735
|
*/
|
|
14736
14736
|
static create(e = {}) {
|
|
14737
|
-
let r = tg.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof
|
|
14737
|
+
let r = tg.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof Wt ? e.doc : Wt.of((e.doc || "").split(r.staticFacet(Ct.lineSeparator) || F0)), i = e.selection ? e.selection instanceof ue ? e.selection : ue.single(e.selection.anchor, e.selection.head) : ue.single(0);
|
|
14738
14738
|
return i7(i, n.length), r.staticFacet(tS) || (i = i.asSingle()), new Ct(r, n, i, r.dynamicSlots.map(() => null), (o, a) => a.create(o), null);
|
|
14739
14739
|
}
|
|
14740
14740
|
/**
|
|
@@ -17141,10 +17141,10 @@ class Bl extends Tr {
|
|
|
17141
17141
|
}
|
|
17142
17142
|
get overrideDOMText() {
|
|
17143
17143
|
if (!this.length)
|
|
17144
|
-
return
|
|
17144
|
+
return Wt.empty;
|
|
17145
17145
|
let { root: e } = this;
|
|
17146
17146
|
if (!e)
|
|
17147
|
-
return
|
|
17147
|
+
return Wt.empty;
|
|
17148
17148
|
let r = this.posAtStart;
|
|
17149
17149
|
return e.view.state.doc.slice(r, r + this.length);
|
|
17150
17150
|
}
|
|
@@ -17164,7 +17164,7 @@ class ag extends Tr {
|
|
|
17164
17164
|
return !0;
|
|
17165
17165
|
}
|
|
17166
17166
|
get overrideDOMText() {
|
|
17167
|
-
return
|
|
17167
|
+
return Wt.empty;
|
|
17168
17168
|
}
|
|
17169
17169
|
coordsIn(e) {
|
|
17170
17170
|
return this.dom.getBoundingClientRect();
|
|
@@ -18503,22 +18503,22 @@ function G7(t, e) {
|
|
|
18503
18503
|
!o.empty && o.from >= s && o.to <= l && (e.typeOver || u != e.text) && u.slice(0, o.from - s) == e.text.slice(0, o.from - s) && u.slice(o.to - s) == e.text.slice(f = e.text.length - (u.length - (o.to - s))) ? r = {
|
|
18504
18504
|
from: o.from,
|
|
18505
18505
|
to: o.to,
|
|
18506
|
-
insert:
|
|
18506
|
+
insert: Wt.of(e.text.slice(o.from - s, f).split(Ac))
|
|
18507
18507
|
} : (h = B7(u, e.text, c - s, d)) && (Ze.chrome && a == 13 && h.toB == h.from + 2 && e.text.slice(h.from, h.toB) == Ac + Ac && h.toB--, r = {
|
|
18508
18508
|
from: s + h.from,
|
|
18509
18509
|
to: s + h.toA,
|
|
18510
|
-
insert:
|
|
18510
|
+
insert: Wt.of(e.text.slice(h.from, h.toB).split(Ac))
|
|
18511
18511
|
});
|
|
18512
18512
|
} else
|
|
18513
18513
|
n && (!t.hasFocus && i.facet(Va) || lg(n, o)) && (n = null);
|
|
18514
18514
|
if (!r && !n)
|
|
18515
18515
|
return !1;
|
|
18516
|
-
if ((Ze.mac || Ze.android) && r && r.from == r.to && r.from == o.head - 1 && /^\. ?$/.test(r.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (n && r.insert.length == 2 && (n = ue.single(n.main.anchor - 1, n.main.head - 1)), r = { from: r.from, to: r.to, insert:
|
|
18516
|
+
if ((Ze.mac || Ze.android) && r && r.from == r.to && r.from == o.head - 1 && /^\. ?$/.test(r.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (n && r.insert.length == 2 && (n = ue.single(n.main.anchor - 1, n.main.head - 1)), r = { from: r.from, to: r.to, insert: Wt.of([r.insert.toString().replace(".", " ")]) }) : i.doc.lineAt(o.from).to < o.to && t.docView.lineHasWidget(o.to) && t.inputState.insertingTextAt > Date.now() - 50 ? r = {
|
|
18517
18517
|
from: o.from,
|
|
18518
18518
|
to: o.to,
|
|
18519
18519
|
insert: i.toText(t.inputState.insertingText)
|
|
18520
18520
|
} : Ze.chrome && r && r.from == r.to && r.from == o.head && r.insert.toString() == `
|
|
18521
|
-
` && t.lineWrapping && (n && (n = ue.single(n.main.anchor - 1, n.main.head - 1)), r = { from: o.from, to: o.to, insert:
|
|
18521
|
+
` && t.lineWrapping && (n && (n = ue.single(n.main.anchor - 1, n.main.head - 1)), r = { from: o.from, to: o.to, insert: Wt.of([" "]) }), r)
|
|
18522
18522
|
return Ev(t, r, n, a);
|
|
18523
18523
|
if (n && !lg(n, o)) {
|
|
18524
18524
|
let s = !1, l = "select";
|
|
@@ -19090,7 +19090,7 @@ function W_() {
|
|
|
19090
19090
|
}
|
|
19091
19091
|
class ste {
|
|
19092
19092
|
constructor(e) {
|
|
19093
|
-
this.lineWrapping = e, this.doc =
|
|
19093
|
+
this.lineWrapping = e, this.doc = Wt.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30;
|
|
19094
19094
|
}
|
|
19095
19095
|
heightForGap(e, r) {
|
|
19096
19096
|
let n = this.doc.lineAt(r).number - this.doc.lineAt(e).number + 1;
|
|
@@ -19621,7 +19621,7 @@ class N_ {
|
|
|
19621
19621
|
constructor(e, r) {
|
|
19622
19622
|
this.view = e, this.state = r, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scaleX = 1, this.scaleY = 1, this.scrollOffset = 0, this.scrolledToBottom = !1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = A_, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = or.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
|
|
19623
19623
|
let n = r.facet(Xv).some((i) => typeof i != "function" && i.class == "cm-lineWrapping");
|
|
19624
|
-
this.heightOracle = new ste(n), this.stateDeco = I_(r), this.heightMap = Mn.empty().applyChanges(this.stateDeco,
|
|
19624
|
+
this.heightOracle = new ste(n), this.stateDeco = I_(r), this.heightMap = Mn.empty().applyChanges(this.stateDeco, Wt.empty, this.heightOracle.setDoc(r.doc), [new ji(0, 0, 0, r.doc.length)]);
|
|
19625
19625
|
for (let i = 0; i < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); i++)
|
|
19626
19626
|
;
|
|
19627
19627
|
this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ke.set(this.lineGaps.map((i) => i.draw(this, !1))), this.scrollParent = e.scrollDOM, this.computeVisibleRanges();
|
|
@@ -19688,7 +19688,7 @@ class N_ {
|
|
|
19688
19688
|
m > 0 && Q > 0 ? d = Math.max(m, Q) : m < 0 && Q < 0 && (d = Math.min(m, Q)), W_();
|
|
19689
19689
|
for (let P of this.viewports) {
|
|
19690
19690
|
let x = P.from == this.viewport.from ? v : e.docView.measureVisibleLineHeights(P);
|
|
19691
|
-
this.heightMap = (a ? Mn.empty().applyChanges(this.stateDeco,
|
|
19691
|
+
this.heightMap = (a ? Mn.empty().applyChanges(this.stateDeco, Wt.empty, this.heightOracle, [new ji(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new lte(P.from, x));
|
|
19692
19692
|
}
|
|
19693
19693
|
xO && (c |= 2);
|
|
19694
19694
|
}
|
|
@@ -20512,10 +20512,10 @@ class xte {
|
|
|
20512
20512
|
let u = {
|
|
20513
20513
|
from: d.from + s,
|
|
20514
20514
|
to: d.toA + s,
|
|
20515
|
-
insert:
|
|
20515
|
+
insert: Wt.of(n.text.slice(d.from, d.toB).split(`
|
|
20516
20516
|
`))
|
|
20517
20517
|
};
|
|
20518
|
-
if ((Ze.mac || Ze.android) && u.from == a - 1 && /^\. ?$/.test(n.text) && e.contentDOM.getAttribute("autocorrect") == "off" && (u = { from: s, to: l, insert:
|
|
20518
|
+
if ((Ze.mac || Ze.android) && u.from == a - 1 && /^\. ?$/.test(n.text) && e.contentDOM.getAttribute("autocorrect") == "off" && (u = { from: s, to: l, insert: Wt.of([n.text.replace(".", " ")]) }), this.pendingContextChange = u, !e.state.readOnly) {
|
|
20519
20519
|
let f = this.to - this.from + (u.to - u.from + u.insert.length);
|
|
20520
20520
|
Ev(e, u, ue.single(this.toEditorPos(n.selectionStart, f), this.toEditorPos(n.selectionEnd, f)));
|
|
20521
20521
|
}
|
|
@@ -25417,7 +25417,7 @@ class Pi {
|
|
|
25417
25417
|
*/
|
|
25418
25418
|
constructor(e, r, n = [], i = "") {
|
|
25419
25419
|
this.data = e, this.name = i, Ct.prototype.hasOwnProperty("tree") || Object.defineProperty(Ct.prototype, "tree", { get() {
|
|
25420
|
-
return
|
|
25420
|
+
return qt(this);
|
|
25421
25421
|
} }), this.parser = r, this.extension = [
|
|
25422
25422
|
Bs.of(this),
|
|
25423
25423
|
Ct.languageData.of((o, a, s) => {
|
|
@@ -25479,7 +25479,7 @@ class Pi {
|
|
|
25479
25479
|
c instanceof kt && i(c, o.positions[l] + a);
|
|
25480
25480
|
}
|
|
25481
25481
|
};
|
|
25482
|
-
return i(
|
|
25482
|
+
return i(qt(e), 0), n;
|
|
25483
25483
|
}
|
|
25484
25484
|
/**
|
|
25485
25485
|
Indicates whether this language allows nested languages. The
|
|
@@ -25491,7 +25491,7 @@ class Pi {
|
|
|
25491
25491
|
}
|
|
25492
25492
|
Pi.setState = /* @__PURE__ */ ht.define();
|
|
25493
25493
|
function QX(t, e, r) {
|
|
25494
|
-
let n = t.facet(Bs), i =
|
|
25494
|
+
let n = t.facet(Bs), i = qt(t).topNode;
|
|
25495
25495
|
if (!n || n.allowsNesting)
|
|
25496
25496
|
for (let o = i; o; o = o.enter(e, r, jt.ExcludeBuffers | jt.EnterBracketed))
|
|
25497
25497
|
o.type.isTop && (i = o);
|
|
@@ -25521,7 +25521,7 @@ class mr extends Pi {
|
|
|
25521
25521
|
return this.parser.hasWrappers();
|
|
25522
25522
|
}
|
|
25523
25523
|
}
|
|
25524
|
-
function
|
|
25524
|
+
function qt(t) {
|
|
25525
25525
|
let e = t.field(Pi.state, !1);
|
|
25526
25526
|
return e ? e.tree : kt.empty;
|
|
25527
25527
|
}
|
|
@@ -25910,7 +25910,7 @@ function Iv(t, e) {
|
|
|
25910
25910
|
if (i !== void 0)
|
|
25911
25911
|
return i;
|
|
25912
25912
|
}
|
|
25913
|
-
let r =
|
|
25913
|
+
let r = qt(t.state);
|
|
25914
25914
|
return r.length >= e ? ine(t, r, e) : null;
|
|
25915
25915
|
}
|
|
25916
25916
|
class oQ {
|
|
@@ -26145,7 +26145,7 @@ function Dn(t) {
|
|
|
26145
26145
|
return e && e.to < r.from ? { from: e.to, to: r.type.isError ? t.to : r.from } : null;
|
|
26146
26146
|
}
|
|
26147
26147
|
function une(t, e, r) {
|
|
26148
|
-
let n =
|
|
26148
|
+
let n = qt(t);
|
|
26149
26149
|
if (n.length < r)
|
|
26150
26150
|
return null;
|
|
26151
26151
|
let i = n.resolveStack(r, 1), o = null;
|
|
@@ -26356,7 +26356,7 @@ function wne(t = {}) {
|
|
|
26356
26356
|
this.from = a.viewport.from, this.markers = this.buildMarkers(a);
|
|
26357
26357
|
}
|
|
26358
26358
|
update(a) {
|
|
26359
|
-
(a.docChanged || a.viewportChanged || a.startState.facet(Bs) != a.state.facet(Bs) || a.startState.field(Kl, !1) != a.state.field(Kl, !1) ||
|
|
26359
|
+
(a.docChanged || a.viewportChanged || a.startState.facet(Bs) != a.state.facet(Bs) || a.startState.field(Kl, !1) != a.state.field(Kl, !1) || qt(a.startState) != qt(a.state) || e.foldingChanged(a)) && (this.markers = this.buildMarkers(a.view));
|
|
26360
26360
|
}
|
|
26361
26361
|
buildMarkers(a) {
|
|
26362
26362
|
let s = new Ja();
|
|
@@ -26459,10 +26459,10 @@ function WU(t, e) {
|
|
|
26459
26459
|
}
|
|
26460
26460
|
class vne {
|
|
26461
26461
|
constructor(e) {
|
|
26462
|
-
this.markCache = /* @__PURE__ */ Object.create(null), this.tree =
|
|
26462
|
+
this.markCache = /* @__PURE__ */ Object.create(null), this.tree = qt(e.state), this.decorations = this.buildDeco(e, eb(e.state)), this.decoratedTo = e.viewport.to;
|
|
26463
26463
|
}
|
|
26464
26464
|
update(e) {
|
|
26465
|
-
let r =
|
|
26465
|
+
let r = qt(e.state), n = eb(e.state), i = n != eb(e.startState), { viewport: o } = e.view, a = e.changes.mapPos(this.decoratedTo, 1);
|
|
26466
26466
|
r.length < o.to && !i && r.type == this.tree.type && a >= o.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = a) : (r != this.tree || e.viewportChanged || i) && (this.tree = r, this.decorations = this.buildDeco(e.view, n), this.decoratedTo = o.to);
|
|
26467
26467
|
}
|
|
26468
26468
|
buildDeco(e, r) {
|
|
@@ -26616,7 +26616,7 @@ function ZS(t) {
|
|
|
26616
26616
|
return e ? e(t.node) : t;
|
|
26617
26617
|
}
|
|
26618
26618
|
function ca(t, e, r, n = {}) {
|
|
26619
|
-
let i = n.maxScanDistance || VU, o = n.brackets || NU, a =
|
|
26619
|
+
let i = n.maxScanDistance || VU, o = n.brackets || NU, a = qt(t), s = a.resolveInner(e, r);
|
|
26620
26620
|
for (let l = s; l; l = l.parent) {
|
|
26621
26621
|
let c = qS(l.type, r, o);
|
|
26622
26622
|
if (c && l.from < l.to) {
|
|
@@ -27421,7 +27421,7 @@ function die(t, e, r) {
|
|
|
27421
27421
|
return n && (n > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
|
|
27422
27422
|
}
|
|
27423
27423
|
function OQ(t, e, r) {
|
|
27424
|
-
let n =
|
|
27424
|
+
let n = qt(t).resolveInner(e.head), i = r ? Ot.closedBy : Ot.openedBy;
|
|
27425
27425
|
for (let l = e.head; ; ) {
|
|
27426
27426
|
let c = r ? n.childAfter(l) : n.childBefore(l);
|
|
27427
27427
|
if (!c)
|
|
@@ -27518,7 +27518,7 @@ const _X = (t) => gW(t, !1), XX = (t) => gW(t, !0), Pie = (t) => oo(t, (e) => nl
|
|
|
27518
27518
|
return e(t.update({ selection: ue.create(r), userEvent: "select" })), !0;
|
|
27519
27519
|
}, zie = ({ state: t, dispatch: e }) => {
|
|
27520
27520
|
let r = Od(t.selection, (n) => {
|
|
27521
|
-
let i =
|
|
27521
|
+
let i = qt(t), o = i.resolveStack(n.from, 1);
|
|
27522
27522
|
if (n.empty) {
|
|
27523
27523
|
let a = i.resolveStack(n.from, -1);
|
|
27524
27524
|
a.node.from >= o.node.from && a.node.to <= o.node.to && (o = a);
|
|
@@ -27619,7 +27619,7 @@ const QW = (t, e, r) => nh(t, (n) => {
|
|
|
27619
27619
|
if (t.readOnly)
|
|
27620
27620
|
return !1;
|
|
27621
27621
|
let r = t.changeByRange((n) => ({
|
|
27622
|
-
changes: { from: n.from, to: n.to, insert:
|
|
27622
|
+
changes: { from: n.from, to: n.to, insert: Wt.of(["", ""]) },
|
|
27623
27623
|
range: ue.cursor(n.from)
|
|
27624
27624
|
}));
|
|
27625
27625
|
return e(t.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
@@ -27706,7 +27706,7 @@ const Mie = ({ state: t, dispatch: e }) => xW(t, e, !1), Die = ({ state: t, disp
|
|
|
27706
27706
|
function Bie(t, e) {
|
|
27707
27707
|
if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
|
|
27708
27708
|
return { from: e, to: e };
|
|
27709
|
-
let r =
|
|
27709
|
+
let r = qt(t).resolveInner(e), n = r.childBefore(e), i = r.childAfter(e), o;
|
|
27710
27710
|
return n && i && n.to <= e && i.from >= e && (o = n.type.prop(Ot.closedBy)) && o.indexOf(i.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(n.to, i.from)) ? { from: n.to, to: i.from } : null;
|
|
27711
27711
|
}
|
|
27712
27712
|
const qX = /* @__PURE__ */ vW(!1), Fie = /* @__PURE__ */ vW(!0);
|
|
@@ -27723,7 +27723,7 @@ function vW(t) {
|
|
|
27723
27723
|
l ? { from: o, to: a } = l : o > s.from && o < s.from + 100 && !/\S/.test(s.text.slice(0, o)) && (o = s.from);
|
|
27724
27724
|
let u = ["", df(e, d)];
|
|
27725
27725
|
return l && u.push(df(e, c.lineIndent(s.from, -1))), {
|
|
27726
|
-
changes: { from: o, to: a, insert:
|
|
27726
|
+
changes: { from: o, to: a, insert: Wt.of(u) },
|
|
27727
27727
|
range: ue.cursor(o + 1 + u[1].length)
|
|
27728
27728
|
};
|
|
27729
27729
|
});
|
|
@@ -28665,7 +28665,7 @@ class tP {
|
|
|
28665
28665
|
token before `this.pos`.
|
|
28666
28666
|
*/
|
|
28667
28667
|
tokenBefore(e) {
|
|
28668
|
-
let r =
|
|
28668
|
+
let r = qt(this.state).resolveInner(this.pos, -1);
|
|
28669
28669
|
for (; r && e.indexOf(r.name) < 0; )
|
|
28670
28670
|
r = r.parent;
|
|
28671
28671
|
return r ? {
|
|
@@ -28730,7 +28730,7 @@ function ud(t) {
|
|
|
28730
28730
|
}
|
|
28731
28731
|
function oh(t, e) {
|
|
28732
28732
|
return (r) => {
|
|
28733
|
-
for (let n =
|
|
28733
|
+
for (let n = qt(r.state).resolveInner(r.pos, -1); n; n = n.parent) {
|
|
28734
28734
|
if (t.indexOf(n.name) > -1)
|
|
28735
28735
|
return null;
|
|
28736
28736
|
if (n.type.isTop)
|
|
@@ -29733,7 +29733,7 @@ function sae(t) {
|
|
|
29733
29733
|
let e = sP.parse(t);
|
|
29734
29734
|
return (r, n, i, o) => {
|
|
29735
29735
|
let { text: a, ranges: s } = e.instantiate(r.state, i), { main: l } = r.state.selection, c = {
|
|
29736
|
-
changes: { from: i, to: o == l.from ? l.to : o, insert:
|
|
29736
|
+
changes: { from: i, to: o == l.from ? l.to : o, insert: Wt.of(a) },
|
|
29737
29737
|
scrollIntoView: !0,
|
|
29738
29738
|
annotations: n ? [rP.of(n), Wr.userEvent.of("input.complete")] : void 0
|
|
29739
29739
|
};
|
|
@@ -29947,11 +29947,11 @@ function wae(t, e, r, n) {
|
|
|
29947
29947
|
});
|
|
29948
29948
|
}
|
|
29949
29949
|
function MX(t, e) {
|
|
29950
|
-
let r =
|
|
29950
|
+
let r = qt(t).resolveInner(e + 1);
|
|
29951
29951
|
return r.parent && r.from == e;
|
|
29952
29952
|
}
|
|
29953
29953
|
function xae(t, e, r, n) {
|
|
29954
|
-
let i =
|
|
29954
|
+
let i = qt(t).resolveInner(e, -1), o = n.reduce((a, s) => Math.max(a, s.length), 0);
|
|
29955
29955
|
for (let a = 0; a < 5; a++) {
|
|
29956
29956
|
let s = t.sliceDoc(i.from, Math.min(i.to, i.from + r.length + o)), l = s.indexOf(r);
|
|
29957
29957
|
if (!l || l > -1 && n.indexOf(s.slice(0, l)) > -1) {
|
|
@@ -33245,7 +33245,7 @@ function t6(t, e, r) {
|
|
|
33245
33245
|
}
|
|
33246
33246
|
}
|
|
33247
33247
|
const uP = (t) => (e) => {
|
|
33248
|
-
let { state: r, pos: n } = e, i =
|
|
33248
|
+
let { state: r, pos: n } = e, i = qt(r).resolveInner(n, -1), o = i.type.isError && i.from == i.to - 1 && r.doc.sliceString(i.from, i.to) == "-";
|
|
33249
33249
|
if (i.name == "PropertyName" || (o || i.name == "TagName") && /^(Block|Styles)$/.test(i.resolve(i.to).name))
|
|
33250
33250
|
return { from: i.from, options: fb(), validFor: Pa };
|
|
33251
33251
|
if (i.name == "ValueName")
|
|
@@ -33517,7 +33517,7 @@ const w2 = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, i6 = [
|
|
|
33517
33517
|
".",
|
|
33518
33518
|
"?."
|
|
33519
33519
|
], Lle = (t) => {
|
|
33520
|
-
let e =
|
|
33520
|
+
let e = qt(t.state).resolveInner(t.pos, -1);
|
|
33521
33521
|
if (i6.indexOf(e.name) > -1)
|
|
33522
33522
|
return null;
|
|
33523
33523
|
let r = e.name == "VariableName" || e.to - e.from < 20 && w2.test(t.state.sliceDoc(e.from, e.to));
|
|
@@ -34186,7 +34186,7 @@ const z2 = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, b6 = [
|
|
|
34186
34186
|
"?."
|
|
34187
34187
|
];
|
|
34188
34188
|
function dOe(t) {
|
|
34189
|
-
let e =
|
|
34189
|
+
let e = qt(t.state).resolveInner(t.pos, -1);
|
|
34190
34190
|
if (b6.indexOf(e.name) > -1)
|
|
34191
34191
|
return null;
|
|
34192
34192
|
let r = e.name == "VariableName" || e.to - e.from < 20 && z2.test(t.state.sliceDoc(e.from, e.to));
|
|
@@ -34299,7 +34299,7 @@ const hOe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav
|
|
|
34299
34299
|
return !1;
|
|
34300
34300
|
let o = i(), { state: a } = o, s = a.changeByRange((l) => {
|
|
34301
34301
|
var c;
|
|
34302
|
-
let { head: d } = l, u =
|
|
34302
|
+
let { head: d } = l, u = qt(a).resolveInner(d - 1, -1), f;
|
|
34303
34303
|
if (u.name == "JSXStartTag" && (u = u.parent), !(a.doc.sliceString(d - 1, d) != n || u.name == "JSXAttributeValue" && u.to > d)) {
|
|
34304
34304
|
if (n == ">" && u.name == "JSXFragmentTag")
|
|
34305
34305
|
return { range: l, changes: { from: d, insert: "</>" } };
|
|
@@ -34837,7 +34837,7 @@ function QOe(t, e, r, n, i) {
|
|
|
34837
34837
|
return { from: n, to: i, options: s, validFor: l };
|
|
34838
34838
|
}
|
|
34839
34839
|
function X6(t, e) {
|
|
34840
|
-
let { state: r, pos: n } = e, i =
|
|
34840
|
+
let { state: r, pos: n } = e, i = qt(r).resolveInner(n, -1), o = i.resolve(n);
|
|
34841
34841
|
for (let a = n, s; o == i && (s = i.childBefore(a)); ) {
|
|
34842
34842
|
let l = s.lastChild;
|
|
34843
34843
|
if (!l || !l.type.isError || l.from < l.to)
|
|
@@ -34955,7 +34955,7 @@ const U2 = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command emb
|
|
|
34955
34955
|
return !1;
|
|
34956
34956
|
let o = i(), { state: a } = o, s = a.changeByRange((l) => {
|
|
34957
34957
|
var c, d, u;
|
|
34958
|
-
let f = a.doc.sliceString(l.from - 1, l.to) == n, { head: h } = l, p =
|
|
34958
|
+
let f = a.doc.sliceString(l.from - 1, l.to) == n, { head: h } = l, p = qt(a).resolveInner(h, -1), g;
|
|
34959
34959
|
if (f && n == ">" && p.name == "EndTag") {
|
|
34960
34960
|
let m = p.parent;
|
|
34961
34961
|
if (((d = (c = m.parent) === null || c === void 0 ? void 0 : c.lastChild) === null || d === void 0 ? void 0 : d.name) != "CloseTag" && (g = kO(a.doc, m.parent, h)) && !U2.has(g)) {
|
|
@@ -35179,7 +35179,7 @@ function pQ(t, e) {
|
|
|
35179
35179
|
const NOe = /* @__PURE__ */ pQ("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr", "function"), AOe = /* @__PURE__ */ pQ("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace", "function"), IOe = /* @__PURE__ */ pQ("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller", "keyword"), W2 = /* @__PURE__ */ AOe.concat(IOe), V2 = /* @__PURE__ */ pQ("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends", "keyword");
|
|
35180
35180
|
function LOe(t) {
|
|
35181
35181
|
var e;
|
|
35182
|
-
let { state: r, pos: n } = t, i =
|
|
35182
|
+
let { state: r, pos: n } = t, i = qt(r).resolveInner(n, -1).enterUnfinishedNodesBefore(n), o = ((e = i.childBefore(n)) === null || e === void 0 ? void 0 : e.name) || i.name;
|
|
35183
35183
|
if (i.name == "FilterName")
|
|
35184
35184
|
return { type: "filter", node: i };
|
|
35185
35185
|
if (t.explicit && (o == "FilterOp" || o == "filter"))
|
|
@@ -35597,7 +35597,7 @@ function sh(t, e) {
|
|
|
35597
35597
|
const j2 = /* @__PURE__ */ sh("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where", "function"), M2 = /* @__PURE__ */ sh("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include", "keyword"), D2 = /* @__PURE__ */ sh("empty forloop tablerowloop in with as", "keyword"), Tde = /* @__PURE__ */ sh("first index index0 last length rindex", "property"), _de = /* @__PURE__ */ sh("col col0 col_first col_last first index index0 last length rindex rindex0 row", "property");
|
|
35598
35598
|
function Xde(t) {
|
|
35599
35599
|
var e;
|
|
35600
|
-
let { state: r, pos: n } = t, i =
|
|
35600
|
+
let { state: r, pos: n } = t, i = qt(r).resolveInner(n, -1).enterUnfinishedNodesBefore(n), o = ((e = i.childBefore(n)) === null || e === void 0 ? void 0 : e.name) || i.name;
|
|
35601
35601
|
if (i.name == "FilterName")
|
|
35602
35602
|
return { type: "filter", node: i };
|
|
35603
35603
|
if (t.explicit && o == "|")
|
|
@@ -35857,7 +35857,7 @@ function G2(t, e, r) {
|
|
|
35857
35857
|
}
|
|
35858
35858
|
const W6 = {
|
|
35859
35859
|
[Se.Blockquote](t, e, r) {
|
|
35860
|
-
return r.next != 62 ? !1 : (r.markers.push(
|
|
35860
|
+
return r.next != 62 ? !1 : (r.markers.push(Ut(Se.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (ao(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0);
|
|
35861
35861
|
},
|
|
35862
35862
|
[Se.ListItem](t, e, r) {
|
|
35863
35863
|
return r.indent < r.baseIndent + t.value && r.next > -1 ? !1 : (r.moveBaseColumn(r.baseIndent + t.value), !0);
|
|
@@ -35977,7 +35977,7 @@ function F2(t, e) {
|
|
|
35977
35977
|
}
|
|
35978
35978
|
function ms(t, e, r) {
|
|
35979
35979
|
let n = t.length - 1;
|
|
35980
|
-
n >= 0 && t[n].to == e && t[n].type == Se.CodeText ? t[n].to = r : t.push(
|
|
35980
|
+
n >= 0 && t[n].to == e && t[n].type == Se.CodeText ? t[n].to = r : t.push(Ut(Se.CodeText, e, r));
|
|
35981
35981
|
}
|
|
35982
35982
|
const Op = {
|
|
35983
35983
|
LinkReference: void 0,
|
|
@@ -36014,8 +36014,8 @@ const Op = {
|
|
|
36014
36014
|
let r = V6(e);
|
|
36015
36015
|
if (r < 0)
|
|
36016
36016
|
return !1;
|
|
36017
|
-
let n = t.lineStart + e.pos, i = e.next, o = r - e.pos, a = e.skipSpace(r), s = B2(e.text, e.text.length, a), l = [
|
|
36018
|
-
a < s && l.push(
|
|
36017
|
+
let n = t.lineStart + e.pos, i = e.next, o = r - e.pos, a = e.skipSpace(r), s = B2(e.text, e.text.length, a), l = [Ut(Se.CodeMark, n, n + o)];
|
|
36018
|
+
a < s && l.push(Ut(Se.CodeInfo, t.lineStart + a, t.lineStart + s));
|
|
36019
36019
|
for (let c = !0, d = !0, u = !1; t.nextLine() && e.depth >= t.stack.length; c = !1) {
|
|
36020
36020
|
let f = e.pos;
|
|
36021
36021
|
if (e.indent - e.baseIndent < 4)
|
|
@@ -36024,7 +36024,7 @@ const Op = {
|
|
|
36024
36024
|
if (f - e.pos >= o && e.skipSpace(f) == e.text.length) {
|
|
36025
36025
|
for (let h of e.markers)
|
|
36026
36026
|
l.push(h);
|
|
36027
|
-
d && u && ms(l, t.lineStart - 1, t.lineStart), l.push(
|
|
36027
|
+
d && u && ms(l, t.lineStart - 1, t.lineStart), l.push(Ut(Se.CodeMark, t.lineStart + e.pos, t.lineStart + f)), t.nextLine();
|
|
36028
36028
|
break;
|
|
36029
36029
|
} else {
|
|
36030
36030
|
u = !0, c || (ms(l, t.lineStart - 1, t.lineStart), d = !1);
|
|
@@ -36110,7 +36110,7 @@ class Wde {
|
|
|
36110
36110
|
return (this.stage == 2 || this.stage == 3) && Pu(r.content, this.pos) == r.content.length ? this.complete(e, r, r.content.length) : !1;
|
|
36111
36111
|
}
|
|
36112
36112
|
complete(e, r, n) {
|
|
36113
|
-
return e.addLeafElement(r,
|
|
36113
|
+
return e.addLeafElement(r, Ut(Se.LinkReference, this.start, this.start + n, this.elts)), !0;
|
|
36114
36114
|
}
|
|
36115
36115
|
nextStage(e) {
|
|
36116
36116
|
return e ? (this.pos = e.to - this.start, this.elts.push(e), this.stage++, !0) : (e === !1 && (this.stage = -1), !1);
|
|
@@ -36124,7 +36124,7 @@ class Wde {
|
|
|
36124
36124
|
return -1;
|
|
36125
36125
|
if (e.charCodeAt(this.pos) != 58)
|
|
36126
36126
|
return this.stage = -1;
|
|
36127
|
-
this.elts.push(
|
|
36127
|
+
this.elts.push(Ut(Se.LinkMark, this.pos + this.start, this.pos + this.start + 1)), this.pos++;
|
|
36128
36128
|
} else if (this.stage == 1) {
|
|
36129
36129
|
if (!this.nextStage(tV(e, Pu(e, this.pos), this.start)))
|
|
36130
36130
|
return -1;
|
|
@@ -36158,8 +36158,8 @@ class Vde {
|
|
|
36158
36158
|
let i = r.depth < e.stack.length ? -1 : L6(r), o = r.next;
|
|
36159
36159
|
if (i < 0)
|
|
36160
36160
|
return !1;
|
|
36161
|
-
let a =
|
|
36162
|
-
return e.nextLine(), e.addLeafElement(n,
|
|
36161
|
+
let a = Ut(Se.HeaderMark, e.lineStart + r.pos, e.lineStart + i);
|
|
36162
|
+
return e.nextLine(), e.addLeafElement(n, Ut(o == 61 ? Se.SetextHeading1 : Se.SetextHeading2, n.start, e.prevLineEnd(), [
|
|
36163
36163
|
...e.parser.parseInline(n.content, n.start),
|
|
36164
36164
|
a
|
|
36165
36165
|
])), !0;
|
|
@@ -36413,7 +36413,7 @@ class Ide {
|
|
|
36413
36413
|
this.addNode(this.buffer.writeElements(r, -e.start).finish(Se.Paragraph, e.content.length), e.start);
|
|
36414
36414
|
}
|
|
36415
36415
|
elt(e, r, n, i) {
|
|
36416
|
-
return typeof e == "string" ?
|
|
36416
|
+
return typeof e == "string" ? Ut(this.parser.getNodeType(e), r, n, i) : new K6(e, r);
|
|
36417
36417
|
}
|
|
36418
36418
|
/**
|
|
36419
36419
|
@internal
|
|
@@ -36639,7 +36639,7 @@ class K6 {
|
|
|
36639
36639
|
return this.tree;
|
|
36640
36640
|
}
|
|
36641
36641
|
}
|
|
36642
|
-
function
|
|
36642
|
+
function Ut(t, e, r, n) {
|
|
36643
36643
|
return new Sf(t, e, r, n);
|
|
36644
36644
|
}
|
|
36645
36645
|
const J6 = { resolve: "Emphasis", mark: "EmphasisMark" }, eV = { resolve: "Emphasis", mark: "EmphasisMark" }, kl = {}, Xg = {};
|
|
@@ -36661,14 +36661,14 @@ const xb = {
|
|
|
36661
36661
|
let n = t.char(r + 1);
|
|
36662
36662
|
for (let i = 0; i < H2.length; i++)
|
|
36663
36663
|
if (H2.charCodeAt(i) == n)
|
|
36664
|
-
return t.append(
|
|
36664
|
+
return t.append(Ut(Se.Escape, r, r + 2));
|
|
36665
36665
|
return -1;
|
|
36666
36666
|
},
|
|
36667
36667
|
Entity(t, e, r) {
|
|
36668
36668
|
if (e != 38)
|
|
36669
36669
|
return -1;
|
|
36670
36670
|
let n = /^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r + 1, r + 31));
|
|
36671
|
-
return n ? t.append(
|
|
36671
|
+
return n ? t.append(Ut(Se.Entity, r, r + 1 + n[0].length)) : -1;
|
|
36672
36672
|
},
|
|
36673
36673
|
InlineCode(t, e, r) {
|
|
36674
36674
|
if (e != 96 || r && t.char(r - 1) == 96)
|
|
@@ -36680,9 +36680,9 @@ const xb = {
|
|
|
36680
36680
|
for (; n < t.end; n++)
|
|
36681
36681
|
if (t.char(n) == 96) {
|
|
36682
36682
|
if (o++, o == i && t.char(n + 1) != 96)
|
|
36683
|
-
return t.append(
|
|
36684
|
-
|
|
36685
|
-
|
|
36683
|
+
return t.append(Ut(Se.InlineCode, r, n + 1, [
|
|
36684
|
+
Ut(Se.CodeMark, r, r + i),
|
|
36685
|
+
Ut(Se.CodeMark, n + 1 - i, n + 1)
|
|
36686
36686
|
]));
|
|
36687
36687
|
} else
|
|
36688
36688
|
o = 0;
|
|
@@ -36693,20 +36693,20 @@ const xb = {
|
|
|
36693
36693
|
return -1;
|
|
36694
36694
|
let n = t.slice(r + 1, t.end), i = /^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);
|
|
36695
36695
|
if (i)
|
|
36696
|
-
return t.append(
|
|
36697
|
-
|
|
36696
|
+
return t.append(Ut(Se.Autolink, r, r + 1 + i[0].length, [
|
|
36697
|
+
Ut(Se.LinkMark, r, r + 1),
|
|
36698
36698
|
// url[0] includes the closing bracket, so exclude it from this slice
|
|
36699
|
-
|
|
36700
|
-
|
|
36699
|
+
Ut(Se.URL, r + 1, r + i[0].length),
|
|
36700
|
+
Ut(Se.LinkMark, r + i[0].length, r + 1 + i[0].length)
|
|
36701
36701
|
]));
|
|
36702
36702
|
let o = /^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);
|
|
36703
36703
|
if (o)
|
|
36704
|
-
return t.append(
|
|
36704
|
+
return t.append(Ut(Se.Comment, r, r + 1 + o[0].length));
|
|
36705
36705
|
let a = /^\?[^]*?\?>/.exec(n);
|
|
36706
36706
|
if (a)
|
|
36707
|
-
return t.append(
|
|
36707
|
+
return t.append(Ut(Se.ProcessingInstruction, r, r + 1 + a[0].length));
|
|
36708
36708
|
let s = /^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);
|
|
36709
|
-
return s ? t.append(
|
|
36709
|
+
return s ? t.append(Ut(Se.HTMLTag, r, r + 1 + s[0].length)) : -1;
|
|
36710
36710
|
},
|
|
36711
36711
|
Emphasis(t, e, r) {
|
|
36712
36712
|
if (e != 95 && e != 42)
|
|
@@ -36719,13 +36719,13 @@ const xb = {
|
|
|
36719
36719
|
},
|
|
36720
36720
|
HardBreak(t, e, r) {
|
|
36721
36721
|
if (e == 92 && t.char(r + 1) == 10)
|
|
36722
|
-
return t.append(
|
|
36722
|
+
return t.append(Ut(Se.HardBreak, r, r + 2));
|
|
36723
36723
|
if (e == 32) {
|
|
36724
36724
|
let n = r + 1;
|
|
36725
36725
|
for (; t.char(n) == 32; )
|
|
36726
36726
|
n++;
|
|
36727
36727
|
if (t.char(n) == 10 && n >= r + 2)
|
|
36728
|
-
return t.append(
|
|
36728
|
+
return t.append(Ut(Se.HardBreak, r, n + 1));
|
|
36729
36729
|
}
|
|
36730
36730
|
return -1;
|
|
36731
36731
|
},
|
|
@@ -36769,21 +36769,21 @@ const xb = {
|
|
|
36769
36769
|
};
|
|
36770
36770
|
function Lde(t, e, r, n, i) {
|
|
36771
36771
|
let { text: o } = t, a = t.char(i), s = i;
|
|
36772
|
-
if (e.unshift(
|
|
36772
|
+
if (e.unshift(Ut(Se.LinkMark, n, n + (r == Se.Image ? 2 : 1))), e.push(Ut(Se.LinkMark, i - 1, i)), a == 40) {
|
|
36773
36773
|
let l = t.skipSpace(i + 1), c = tV(o, l - t.offset, t.offset), d;
|
|
36774
|
-
c && (l = t.skipSpace(c.to), l != c.to && (d = rV(o, l - t.offset, t.offset), d && (l = t.skipSpace(d.to)))), t.char(l) == 41 && (e.push(
|
|
36774
|
+
c && (l = t.skipSpace(c.to), l != c.to && (d = rV(o, l - t.offset, t.offset), d && (l = t.skipSpace(d.to)))), t.char(l) == 41 && (e.push(Ut(Se.LinkMark, i, i + 1)), s = l + 1, c && e.push(c), d && e.push(d), e.push(Ut(Se.LinkMark, l, s)));
|
|
36775
36775
|
} else if (a == 91) {
|
|
36776
36776
|
let l = nV(o, i - t.offset, t.offset, !1);
|
|
36777
36777
|
l && (e.push(l), s = l.to);
|
|
36778
36778
|
}
|
|
36779
|
-
return
|
|
36779
|
+
return Ut(r, n, s, e);
|
|
36780
36780
|
}
|
|
36781
36781
|
function tV(t, e, r) {
|
|
36782
36782
|
if (t.charCodeAt(e) == 60) {
|
|
36783
36783
|
for (let i = e + 1; i < t.length; i++) {
|
|
36784
36784
|
let o = t.charCodeAt(i);
|
|
36785
36785
|
if (o == 62)
|
|
36786
|
-
return
|
|
36786
|
+
return Ut(Se.URL, e + r, i + 1 + r);
|
|
36787
36787
|
if (o == 60 || o == 10)
|
|
36788
36788
|
return !1;
|
|
36789
36789
|
}
|
|
@@ -36805,7 +36805,7 @@ function tV(t, e, r) {
|
|
|
36805
36805
|
} else
|
|
36806
36806
|
s == 92 && (a = !0);
|
|
36807
36807
|
}
|
|
36808
|
-
return o > e ?
|
|
36808
|
+
return o > e ? Ut(Se.URL, e + r, o + r) : o == t.length ? null : !1;
|
|
36809
36809
|
}
|
|
36810
36810
|
}
|
|
36811
36811
|
function rV(t, e, r) {
|
|
@@ -36819,7 +36819,7 @@ function rV(t, e, r) {
|
|
|
36819
36819
|
a = !1;
|
|
36820
36820
|
else {
|
|
36821
36821
|
if (s == i)
|
|
36822
|
-
return
|
|
36822
|
+
return Ut(Se.LinkTitle, e + r, o + 1 + r);
|
|
36823
36823
|
s == 92 && (a = !0);
|
|
36824
36824
|
}
|
|
36825
36825
|
}
|
|
@@ -36832,7 +36832,7 @@ function nV(t, e, r, n) {
|
|
|
36832
36832
|
i = !1;
|
|
36833
36833
|
else {
|
|
36834
36834
|
if (s == 93)
|
|
36835
|
-
return n ? !1 :
|
|
36835
|
+
return n ? !1 : Ut(Se.LinkLabel, e + r, o + 1 + r);
|
|
36836
36836
|
if (n && !ao(s) && (n = !1), s == 91)
|
|
36837
36837
|
return !1;
|
|
36838
36838
|
s == 92 && (i = !0);
|
|
@@ -36982,7 +36982,7 @@ class SP {
|
|
|
36982
36982
|
return Pu(this.text, e - this.offset) + this.offset;
|
|
36983
36983
|
}
|
|
36984
36984
|
elt(e, r, n, i) {
|
|
36985
|
-
return typeof e == "string" ?
|
|
36985
|
+
return typeof e == "string" ? Ut(this.parser.getNodeType(e), r, n, i) : new K6(e, r);
|
|
36986
36986
|
}
|
|
36987
36987
|
}
|
|
36988
36988
|
SP.linkStart = kl;
|
|
@@ -37359,7 +37359,7 @@ function Oue(t, e) {
|
|
|
37359
37359
|
return r.to;
|
|
37360
37360
|
}
|
|
37361
37361
|
const due = /* @__PURE__ */ XU.of((t, e, r) => {
|
|
37362
|
-
for (let n =
|
|
37362
|
+
for (let n = qt(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) {
|
|
37363
37363
|
let i = n.type.prop(lV);
|
|
37364
37364
|
if (i == null)
|
|
37365
37365
|
continue;
|
|
@@ -37465,7 +37465,7 @@ function xP(t, e) {
|
|
|
37465
37465
|
return i + t.slice(r);
|
|
37466
37466
|
}
|
|
37467
37467
|
const pue = (t = {}) => ({ state: e, dispatch: r }) => {
|
|
37468
|
-
let n =
|
|
37468
|
+
let n = qt(e), { doc: i } = e, o = null, a = e.changeByRange((s) => {
|
|
37469
37469
|
if (!s.empty || !Rg.isActiveAt(e, s.from, -1) && !Rg.isActiveAt(e, s.from, 1))
|
|
37470
37470
|
return o = { range: s };
|
|
37471
37471
|
let l = s.from, c = i.lineAt(l), d = OV(n.resolveInner(l, -1), i);
|
|
@@ -37546,7 +37546,7 @@ function $ue(t, e) {
|
|
|
37546
37546
|
return r;
|
|
37547
37547
|
}
|
|
37548
37548
|
const Que = ({ state: t, dispatch: e }) => {
|
|
37549
|
-
let r =
|
|
37549
|
+
let r = qt(t), n = null, i = t.changeByRange((o) => {
|
|
37550
37550
|
let a = o.from, { doc: s } = t;
|
|
37551
37551
|
if (o.empty && Rg.isActiveAt(t, o.from)) {
|
|
37552
37552
|
let l = s.lineAt(a), c = OV($ue(r, a), s);
|
|
@@ -37596,7 +37596,7 @@ function yue(t) {
|
|
|
37596
37596
|
let { state: e, pos: r } = t, n = /<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r - 25, r));
|
|
37597
37597
|
if (!n)
|
|
37598
37598
|
return null;
|
|
37599
|
-
let i =
|
|
37599
|
+
let i = qt(e).resolveInner(r, -1);
|
|
37600
37600
|
for (; i && !i.type.isTop; ) {
|
|
37601
37601
|
if (i.name == "CodeBlock" || i.name == "FencedCode" || i.name == "ProcessingInstructionBlock" || i.name == "CommentBlock" || i.name == "Link" || i.name == "Image")
|
|
37602
37602
|
return null;
|
|
@@ -37625,7 +37625,7 @@ const wue = /code|horizontalrule|html|link|comment|processing|escape|entity|imag
|
|
|
37625
37625
|
let i = (r = t.clipboardData) === null || r === void 0 ? void 0 : r.getData("text/plain");
|
|
37626
37626
|
if (!i || !/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i) || (/^www\./.test(i) && (i = "https://" + i), !Rg.isActiveAt(e.state, n.from, 1)))
|
|
37627
37627
|
return !1;
|
|
37628
|
-
let o =
|
|
37628
|
+
let o = qt(e.state), a = !1;
|
|
37629
37629
|
return o.iterate({
|
|
37630
37630
|
from: n.from,
|
|
37631
37631
|
to: n.to,
|
|
@@ -38251,7 +38251,7 @@ function SV(t, e) {
|
|
|
38251
38251
|
}
|
|
38252
38252
|
const $5 = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/, wV = ["String", "FormatString", "Comment", "PropertyName"];
|
|
38253
38253
|
function ape(t) {
|
|
38254
|
-
let e =
|
|
38254
|
+
let e = qt(t.state).resolveInner(t.pos, -1);
|
|
38255
38255
|
if (wV.indexOf(e.name) > -1)
|
|
38256
38256
|
return null;
|
|
38257
38257
|
let r = e.name == "VariableName" || e.to - e.from < 20 && $5.test(t.state.sliceDoc(e.from, e.to));
|
|
@@ -39166,7 +39166,7 @@ function Ub(t) {
|
|
|
39166
39166
|
}
|
|
39167
39167
|
function zme(t, e) {
|
|
39168
39168
|
var r;
|
|
39169
|
-
let n =
|
|
39169
|
+
let n = qt(t).resolveInner(e, -1), i = null;
|
|
39170
39170
|
for (let o = n; !i && o.parent; o = o.parent)
|
|
39171
39171
|
(o.name == "OpenTag" || o.name == "CloseTag" || o.name == "SelfClosingTag" || o.name == "MismatchedCloseTag") && (i = o);
|
|
39172
39172
|
if (i && (i.to > e || i.lastChild.type.isError)) {
|
|
@@ -39325,7 +39325,7 @@ const Yme = /* @__PURE__ */ _e.inputHandler.of((t, e, r, n, i) => {
|
|
|
39325
39325
|
return !1;
|
|
39326
39326
|
let o = i(), { state: a } = o, s = a.changeByRange((l) => {
|
|
39327
39327
|
var c, d, u;
|
|
39328
|
-
let { head: f } = l, h = a.doc.sliceString(f - 1, f) == n, p =
|
|
39328
|
+
let { head: f } = l, h = a.doc.sliceString(f - 1, f) == n, p = qt(a).resolveInner(f, -1), g;
|
|
39329
39329
|
if (h && n == ">" && p.name == "EndTag") {
|
|
39330
39330
|
let m = p.parent;
|
|
39331
39331
|
if (((d = (c = m.parent) === null || c === void 0 ? void 0 : c.lastChild) === null || d === void 0 ? void 0 : d.name) != "CloseTag" && (g = V5(a.doc, m.parent, f))) {
|
|
@@ -48650,7 +48650,7 @@ function YQ(t) {
|
|
|
48650
48650
|
if (z == "<")
|
|
48651
48651
|
return w(ie(ye, ">"), ye);
|
|
48652
48652
|
if (z == "quasi")
|
|
48653
|
-
return k(
|
|
48653
|
+
return k(Zt, rr);
|
|
48654
48654
|
}
|
|
48655
48655
|
function lt(z) {
|
|
48656
48656
|
if (z == "=>")
|
|
@@ -48673,12 +48673,12 @@ function YQ(t) {
|
|
|
48673
48673
|
if (!z.match(/[;\}\)\],]/))
|
|
48674
48674
|
return w();
|
|
48675
48675
|
}
|
|
48676
|
-
function
|
|
48677
|
-
return z != "quasi" ? k() : j.slice(j.length - 2) != "${" ? w(
|
|
48676
|
+
function Zt(z, j) {
|
|
48677
|
+
return z != "quasi" ? k() : j.slice(j.length - 2) != "${" ? w(Zt) : w(ye, Nr);
|
|
48678
48678
|
}
|
|
48679
48679
|
function Nr(z) {
|
|
48680
48680
|
if (z == "}")
|
|
48681
|
-
return x.marked = "string.special", x.state.tokenize = m, w(
|
|
48681
|
+
return x.marked = "string.special", x.state.tokenize = m, w(Zt);
|
|
48682
48682
|
}
|
|
48683
48683
|
function zi(z, j) {
|
|
48684
48684
|
return z == "variable" && x.stream.match(/^\s*[?:]/, !1) || j == "?" ? w(zi) : z == ":" ? w(ye) : z == "spread" ? w(zi) : k(ye);
|
|
@@ -56595,7 +56595,7 @@ function QE(t, e) {
|
|
|
56595
56595
|
}
|
|
56596
56596
|
}
|
|
56597
56597
|
function WPe(t, e) {
|
|
56598
|
-
let r =
|
|
56598
|
+
let r = qt(t).resolveInner(e, -1), n = NPe(t.doc, r);
|
|
56599
56599
|
return r.name == "Identifier" || r.name == "QuotedIdentifier" || r.name == "Keyword" ? {
|
|
56600
56600
|
from: r.from,
|
|
56601
56601
|
quoted: r.name == "QuotedIdentifier" ? t.doc.sliceString(r.from, r.from + 1) : null,
|
|
@@ -57469,7 +57469,7 @@ const OTe = /* @__PURE__ */ _e.inputHandler.of((t, e, r, n) => {
|
|
|
57469
57469
|
return !1;
|
|
57470
57470
|
let { state: i } = t, o = i.changeByRange((a) => {
|
|
57471
57471
|
var s, l, c;
|
|
57472
|
-
let { head: d } = a, u =
|
|
57472
|
+
let { head: d } = a, u = qt(i).resolveInner(d, -1), f;
|
|
57473
57473
|
if ((u.name === "TagName" || u.name === "ComponentName" || u.name === "SvelteElementName" || u.name === "StartTag") && (u = u.parent), n === ">" && u.name === "OpenTag") {
|
|
57474
57474
|
if (((l = (s = u.parent) === null || s === void 0 ? void 0 : s.lastChild) === null || l === void 0 ? void 0 : l.name) != "CloseTag" && (f = qE(i.doc, u.parent, d))) {
|
|
57475
57475
|
let h = t.state.doc.sliceString(d, d + 1) === ">", p = `${h ? "" : ">"}</${f}>`;
|
|
@@ -58819,7 +58819,7 @@ function jE(t, e, r) {
|
|
|
58819
58819
|
Nl.cellBgColor = d;
|
|
58820
58820
|
let f = null;
|
|
58821
58821
|
for (const h of u)
|
|
58822
|
-
|
|
58822
|
+
Vt(h) || h.getType() === "linebreak" ? (f || (f = ot(), o.append(f)), f.append(h)) : (f = null, o.append(h));
|
|
58823
58823
|
return o.getChildrenSize() === 0 && o.append(ot()), [o];
|
|
58824
58824
|
}
|
|
58825
58825
|
function Xo(t, e = null) {
|
|
@@ -58878,25 +58878,22 @@ function Xo(t, e = null) {
|
|
|
58878
58878
|
case "h6": {
|
|
58879
58879
|
const o = (n.textContent || "").trim().length, a = 100;
|
|
58880
58880
|
if (UO.isWordPaste && o > a) {
|
|
58881
|
-
const
|
|
58882
|
-
|
|
58881
|
+
const d = ot(), u = My(n, d);
|
|
58882
|
+
d.getChildrenSize() > 0 && r.push(d), u.overflowNodes.length > 0 && r.push(...u.overflowNodes);
|
|
58883
58883
|
break;
|
|
58884
58884
|
}
|
|
58885
58885
|
const s = Nf(i), l = Fg(n);
|
|
58886
58886
|
let c = !1;
|
|
58887
58887
|
if (l.fontSize) {
|
|
58888
|
-
const
|
|
58889
|
-
|
|
58888
|
+
const d = parseFloat(l.fontSize), u = r_e[i] || 14;
|
|
58889
|
+
d >= u && (c = !0);
|
|
58890
58890
|
}
|
|
58891
58891
|
if (c)
|
|
58892
58892
|
Qo(n, s);
|
|
58893
58893
|
else {
|
|
58894
|
-
const
|
|
58895
|
-
|
|
58894
|
+
const d = JTe[i];
|
|
58895
|
+
d ? ME(n, s, d) : Qo(n, s);
|
|
58896
58896
|
}
|
|
58897
|
-
const d = s.getChildren();
|
|
58898
|
-
for (const u of d)
|
|
58899
|
-
qt(u) && !u.hasFormat("bold") && u.toggleFormat("bold");
|
|
58900
58897
|
r.push(s);
|
|
58901
58898
|
break;
|
|
58902
58899
|
}
|
|
@@ -59205,14 +59202,14 @@ function My(t, e) {
|
|
|
59205
59202
|
}
|
|
59206
59203
|
}
|
|
59207
59204
|
Xo(a, t).forEach((l) => {
|
|
59208
|
-
if (
|
|
59205
|
+
if (Vt(l) && l.getTextContent().trim().length > 0 && (n = !0), ru(l) && n) {
|
|
59209
59206
|
const c = ot();
|
|
59210
59207
|
c.append(l), r.push(c);
|
|
59211
59208
|
} else if (l instanceof gu && n) {
|
|
59212
59209
|
const c = l.getChildren(), d = c.length === 1 && ru(c[0]);
|
|
59213
59210
|
r.push(l);
|
|
59214
59211
|
} else
|
|
59215
|
-
e.append(l),
|
|
59212
|
+
e.append(l), Vt(l) && l.getTextContent().trim().length > 0 && (n = !0);
|
|
59216
59213
|
});
|
|
59217
59214
|
}
|
|
59218
59215
|
return { overflowNodes: r };
|
|
@@ -59239,7 +59236,7 @@ function ME(t, e, r) {
|
|
|
59239
59236
|
}
|
|
59240
59237
|
} else
|
|
59241
59238
|
Xo(o, t).forEach((s) => {
|
|
59242
|
-
if (
|
|
59239
|
+
if (Vt(s)) {
|
|
59243
59240
|
const l = s.getStyle(), c = l.includes("font-size"), d = l.includes("line-height");
|
|
59244
59241
|
if (!c || !d) {
|
|
59245
59242
|
const u = l ? [l] : [];
|
|
@@ -59272,13 +59269,22 @@ function s_e(t) {
|
|
|
59272
59269
|
}
|
|
59273
59270
|
function l_e(t, e = {}) {
|
|
59274
59271
|
const { skipStyleInjection: r = !1 } = e, n = document.createElement("div");
|
|
59275
|
-
n.style.cssText = "position: absolute; left: -9999px; top: -9999px; visibility: hidden;";
|
|
59272
|
+
n.style.cssText = "position: absolute; left: -9999px; top: -9999px; visibility: hidden; font-family: serif;";
|
|
59276
59273
|
const o = new DOMParser().parseFromString(t, "text/html"), a = [];
|
|
59277
|
-
|
|
59278
|
-
const
|
|
59279
|
-
|
|
59280
|
-
})
|
|
59281
|
-
|
|
59274
|
+
r || o.querySelectorAll("style").forEach((d) => {
|
|
59275
|
+
const u = document.createElement("style");
|
|
59276
|
+
u.textContent = d.textContent, document.head.appendChild(u), a.push(u);
|
|
59277
|
+
});
|
|
59278
|
+
const s = document.createElement("style");
|
|
59279
|
+
return s.textContent = `
|
|
59280
|
+
[data-paste-container] h1 { font-size: 2em; }
|
|
59281
|
+
[data-paste-container] h2 { font-size: 1.5em; }
|
|
59282
|
+
[data-paste-container] h3 { font-size: 1.17em; }
|
|
59283
|
+
[data-paste-container] h4 { font-size: 1em; }
|
|
59284
|
+
[data-paste-container] h5 { font-size: 0.83em; }
|
|
59285
|
+
[data-paste-container] h6 { font-size: 0.67em; }
|
|
59286
|
+
`, document.head.appendChild(s), a.push(s), n.setAttribute("data-paste-container", "true"), n.innerHTML = o.body.innerHTML, document.body.appendChild(n), { container: n, cleanup: () => {
|
|
59287
|
+
a.forEach((c) => c.remove()), n.remove();
|
|
59282
59288
|
} };
|
|
59283
59289
|
}
|
|
59284
59290
|
let Vw = !1;
|
|
@@ -59334,7 +59340,7 @@ function hk(t, e, r) {
|
|
|
59334
59340
|
try {
|
|
59335
59341
|
const l = Xo(a, null), c = [];
|
|
59336
59342
|
for (const h of l) {
|
|
59337
|
-
if (
|
|
59343
|
+
if (Vt(h)) {
|
|
59338
59344
|
if (h.getTextContent().trim().length > 0) {
|
|
59339
59345
|
const g = ot();
|
|
59340
59346
|
g.append(h), c.push(g);
|
|
@@ -61473,7 +61479,7 @@ const jp = (t) => {
|
|
|
61473
61479
|
)
|
|
61474
61480
|
}
|
|
61475
61481
|
);
|
|
61476
|
-
}, q_e = _.lazy(() => import("./index-
|
|
61482
|
+
}, q_e = _.lazy(() => import("./index-BFVJDNlm.js"));
|
|
61477
61483
|
function Z_e(t) {
|
|
61478
61484
|
if (t instanceof HTMLDivElement) {
|
|
61479
61485
|
const e = t.getAttribute("data-lexical-file-src"), r = t.getAttribute("data-lexical-file-name");
|
|
@@ -64377,7 +64383,7 @@ function CXe({
|
|
|
64377
64383
|
function By(t) {
|
|
64378
64384
|
return t instanceof VO;
|
|
64379
64385
|
}
|
|
64380
|
-
const EXe = Pt.lazy(() => import("./index-
|
|
64386
|
+
const EXe = Pt.lazy(() => import("./index-qeSJbu9B.js"));
|
|
64381
64387
|
function zXe(t) {
|
|
64382
64388
|
const e = t;
|
|
64383
64389
|
if (e.src.startsWith("file:///"))
|
|
@@ -65001,7 +65007,7 @@ const UXe = [
|
|
|
65001
65007
|
t.update(() => {
|
|
65002
65008
|
const $ = he();
|
|
65003
65009
|
$e($) && (VL($), $.getNodes().forEach((b) => {
|
|
65004
|
-
|
|
65010
|
+
Vt(b) && (b.setFormat(0), b.setStyle(""), gL(b).setFormat("")), IL(b) && b.setFormat("");
|
|
65005
65011
|
}));
|
|
65006
65012
|
});
|
|
65007
65013
|
}, [t]);
|
|
@@ -67722,7 +67728,7 @@ const Fo = {
|
|
|
67722
67728
|
NEAR_BLACK: "#111111"
|
|
67723
67729
|
}
|
|
67724
67730
|
}, X2e = async () => {
|
|
67725
|
-
const t = await import("./html2pdf.bundle.min-
|
|
67731
|
+
const t = await import("./html2pdf.bundle.min-DO9nUvFt.js").then((e) => e.h);
|
|
67726
67732
|
return t?.default || t;
|
|
67727
67733
|
};
|
|
67728
67734
|
async function R2e(t, e = "document.pdf", r) {
|
|
@@ -69314,7 +69320,7 @@ const tRe = () => {
|
|
|
69314
69320
|
if ($e(Q)) {
|
|
69315
69321
|
const $ = Q.getNodes();
|
|
69316
69322
|
for (const b of $)
|
|
69317
|
-
|
|
69323
|
+
Vt(b) && !b.hasFormat("bold") && b.toggleFormat("bold");
|
|
69318
69324
|
}
|
|
69319
69325
|
}
|
|
69320
69326
|
});
|
|
@@ -76830,7 +76836,7 @@ const tEe = [
|
|
|
76830
76836
|
redo: !0
|
|
76831
76837
|
}), [Le, Re] = q(!1), [Ve, Pe] = q(
|
|
76832
76838
|
null
|
|
76833
|
-
), [Te, nt] = q(!1), [ur, Or] = q(!1), [ee, ae] = q(!1), [ie, J] = q(!1), [oe, le] = q(0), de = ce(null), pe = ce(null), [Qe, ye] = q(/* @__PURE__ */ new Set()), [lt, et] = q(!1), [_t,
|
|
76839
|
+
), [Te, nt] = q(!1), [ur, Or] = q(!1), [ee, ae] = q(!1), [ie, J] = q(!1), [oe, le] = q(0), de = ce(null), pe = ce(null), [Qe, ye] = q(/* @__PURE__ */ new Set()), [lt, et] = q(!1), [_t, Zt] = q(!1), [Nr, zi] = q(!1), [rr, xa] = q(!1), [lo, co] = q(!1), [Oo, Xr] = q(!1), [li, uo] = q(!1), [Hr, fo] = q(!1), [$n, Jt] = q(!1), [Sc, ho] = q(""), [Kr, ci] = q(""), ul = ce(null), Cn = rEe(), { hasFormat: wc, isEditorEmpty: us, blockType: qi, clearFormatting: En } = LXe(), { clearEditorContent: jo } = IXe(), { toolbarState: nr, updateToolbarState: Lt } = Ol(), at = {
|
|
76834
76840
|
blockFormat: {
|
|
76835
76841
|
label: "Block Format",
|
|
76836
76842
|
keywords: ["paragraph", "heading", "quote", "code", "block"]
|
|
@@ -76938,9 +76944,9 @@ const tEe = [
|
|
|
76938
76944
|
const Ee = at[ge];
|
|
76939
76945
|
if (!Ee)
|
|
76940
76946
|
return !0;
|
|
76941
|
-
const
|
|
76942
|
-
return Ee.label.toLowerCase().includes(
|
|
76943
|
-
(cn) => cn.toLowerCase().includes(
|
|
76947
|
+
const Yt = Kr.toLowerCase();
|
|
76948
|
+
return Ee.label.toLowerCase().includes(Yt) || Ee.keywords.some(
|
|
76949
|
+
(cn) => cn.toLowerCase().includes(Yt)
|
|
76944
76950
|
);
|
|
76945
76951
|
}, Rr = Array.from(Qe).some(
|
|
76946
76952
|
(ge) => tt(ge)
|
|
@@ -76971,9 +76977,9 @@ const tEe = [
|
|
|
76971
76977
|
de.current && pe.current && requestAnimationFrame(ge);
|
|
76972
76978
|
};
|
|
76973
76979
|
Ee(), window.addEventListener("resize", Ee);
|
|
76974
|
-
const
|
|
76975
|
-
return de.current &&
|
|
76976
|
-
window.removeEventListener("resize", Ee),
|
|
76980
|
+
const Yt = new ResizeObserver(Ee);
|
|
76981
|
+
return de.current && Yt.observe(de.current), () => {
|
|
76982
|
+
window.removeEventListener("resize", Ee), Yt.disconnect();
|
|
76977
76983
|
};
|
|
76978
76984
|
}, [
|
|
76979
76985
|
e,
|
|
@@ -77015,7 +77021,7 @@ const tEe = [
|
|
|
77015
77021
|
jI(
|
|
77016
77022
|
$e(Ee) && !!Ur(
|
|
77017
77023
|
Ee.anchor.getNode(),
|
|
77018
|
-
(
|
|
77024
|
+
(Yt) => Yt.getType() === "link"
|
|
77019
77025
|
)
|
|
77020
77026
|
);
|
|
77021
77027
|
});
|
|
@@ -77051,30 +77057,30 @@ const tEe = [
|
|
|
77051
77057
|
} else
|
|
77052
77058
|
Lt("isImageCaption", !1);
|
|
77053
77059
|
const Ee = ge.anchor.getNode();
|
|
77054
|
-
let
|
|
77060
|
+
let Yt = Ee.getKey() === "root" ? Ee : Ur(Ee, (Yi) => {
|
|
77055
77061
|
const hs = Yi.getParent();
|
|
77056
77062
|
return hs !== null && Es(hs);
|
|
77057
77063
|
});
|
|
77058
|
-
|
|
77059
|
-
const cn =
|
|
77064
|
+
Yt === null && (Yt = Ee.getTopLevelElementOrThrow());
|
|
77065
|
+
const cn = Yt.getKey(), di = B.getElementByKey(cn);
|
|
77060
77066
|
Lt("isRTL", NL(ge));
|
|
77061
77067
|
const po = da(ge), vc = po.getParent(), Kk = kr(vc) || kr(po);
|
|
77062
77068
|
Lt("isLink", Kk);
|
|
77063
77069
|
const Th = Ur(po, xi);
|
|
77064
77070
|
if (xi(Th) ? Lt("rootType", "table") : Lt("rootType", "root"), di !== null)
|
|
77065
|
-
if (Pe(cn), h$(
|
|
77071
|
+
if (Pe(cn), h$(Yt)) {
|
|
77066
77072
|
const Yi = Qx(
|
|
77067
77073
|
Ee,
|
|
77068
77074
|
p$
|
|
77069
|
-
), hs = Yi ? Yi.getListType() :
|
|
77075
|
+
), hs = Yi ? Yi.getListType() : Yt.getListType();
|
|
77070
77076
|
Lt("blockType", hs);
|
|
77071
77077
|
} else {
|
|
77072
|
-
const Yi = gz(
|
|
77078
|
+
const Yi = gz(Yt) ? Yt.getTag() : Yt.getType();
|
|
77073
77079
|
if (Yi in WN && Lt(
|
|
77074
77080
|
"blockType",
|
|
77075
77081
|
Yi
|
|
77076
|
-
), oi(
|
|
77077
|
-
const hs =
|
|
77082
|
+
), oi(Yt)) {
|
|
77083
|
+
const hs = Yt.getLanguage();
|
|
77078
77084
|
Lt(
|
|
77079
77085
|
"codeLanguage",
|
|
77080
77086
|
hs ? mz[hs] || hs : ""
|
|
@@ -77137,8 +77143,8 @@ const tEe = [
|
|
|
77137
77143
|
const ge = he();
|
|
77138
77144
|
if ($e(ge)) {
|
|
77139
77145
|
let Ee = !1;
|
|
77140
|
-
ge.getNodes().forEach((
|
|
77141
|
-
const cn =
|
|
77146
|
+
ge.getNodes().forEach((Yt) => {
|
|
77147
|
+
const cn = Yt.getParent();
|
|
77142
77148
|
cn && cn.getType() === "link" && (Ee = !0);
|
|
77143
77149
|
}), Ee ? (Re(!1), H.dispatchCommand(Ai, null)) : !ge.isCollapsed() ? (H.dispatchCommand(
|
|
77144
77150
|
Ai,
|
|
@@ -77164,8 +77170,8 @@ const tEe = [
|
|
|
77164
77170
|
Zi((ge) => {
|
|
77165
77171
|
const Ee = !ge;
|
|
77166
77172
|
return Ee && H.update(() => {
|
|
77167
|
-
const
|
|
77168
|
-
zn(
|
|
77173
|
+
const Yt = Wu(H, null);
|
|
77174
|
+
zn(Yt);
|
|
77169
77175
|
}), Ee;
|
|
77170
77176
|
});
|
|
77171
77177
|
}, [H, Zi, zn]), Mk = K(() => {
|
|
@@ -77188,12 +77194,12 @@ const tEe = [
|
|
|
77188
77194
|
if (ge.isCollapsed())
|
|
77189
77195
|
Da(ge, () => jn());
|
|
77190
77196
|
else {
|
|
77191
|
-
const
|
|
77192
|
-
ge.insertNodes([cn]), ge = he(), $e(ge) && ge.insertRawText(
|
|
77197
|
+
const Yt = ge.getTextContent(), cn = jn();
|
|
77198
|
+
ge.insertNodes([cn]), ge = he(), $e(ge) && ge.insertRawText(Yt);
|
|
77193
77199
|
}
|
|
77194
77200
|
const Ee = he();
|
|
77195
77201
|
if ($e(Ee)) {
|
|
77196
|
-
const
|
|
77202
|
+
const Yt = Ee.anchor.getNode(), cn = Ur(Yt, oi);
|
|
77197
77203
|
if (cn) {
|
|
77198
77204
|
const di = ot();
|
|
77199
77205
|
cn.insertAfter(di);
|
|
@@ -77206,10 +77212,10 @@ const tEe = [
|
|
|
77206
77212
|
}, []), GI = K(() => {
|
|
77207
77213
|
et(!1);
|
|
77208
77214
|
}, []), Fk = K(() => {
|
|
77209
|
-
|
|
77215
|
+
Zt(!0);
|
|
77210
77216
|
}, []);
|
|
77211
77217
|
K(() => {
|
|
77212
|
-
|
|
77218
|
+
Zt(!1);
|
|
77213
77219
|
}, []);
|
|
77214
77220
|
const Hk = K(() => {
|
|
77215
77221
|
zi(!0);
|
|
@@ -77217,10 +77223,10 @@ const tEe = [
|
|
|
77217
77223
|
async (ge) => {
|
|
77218
77224
|
const Ee = await GN(ge, Bn);
|
|
77219
77225
|
Ee.success && H.update(() => {
|
|
77220
|
-
const
|
|
77221
|
-
he() ? Fi([
|
|
77226
|
+
const Yt = e1(Ee.html, ge);
|
|
77227
|
+
he() ? Fi([Yt]) : Dt().append(Yt);
|
|
77222
77228
|
const di = ot();
|
|
77223
|
-
|
|
77229
|
+
Yt.insertAfter(di);
|
|
77224
77230
|
});
|
|
77225
77231
|
},
|
|
77226
77232
|
[H, Bn]
|
|
@@ -77240,14 +77246,14 @@ const tEe = [
|
|
|
77240
77246
|
description: "Almost done!"
|
|
77241
77247
|
}), di);
|
|
77242
77248
|
});
|
|
77243
|
-
}, 200),
|
|
77249
|
+
}, 200), Yt = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/[:T]/g, "-");
|
|
77244
77250
|
await R2e(
|
|
77245
77251
|
B,
|
|
77246
|
-
`export-${
|
|
77252
|
+
`export-${Yt}.pdf`,
|
|
77247
77253
|
Bn || void 0
|
|
77248
77254
|
), clearInterval(Ee), le(100), ke.success("PDF exported successfully!", {
|
|
77249
77255
|
id: ge,
|
|
77250
|
-
description: `File saved as export-${
|
|
77256
|
+
description: `File saved as export-${Yt}.pdf`,
|
|
77251
77257
|
duration: 4e3
|
|
77252
77258
|
});
|
|
77253
77259
|
} catch (ge) {
|
|
@@ -78435,7 +78441,7 @@ const tEe = [
|
|
|
78435
78441
|
MA,
|
|
78436
78442
|
{
|
|
78437
78443
|
open: _t,
|
|
78438
|
-
onOpenChange:
|
|
78444
|
+
onOpenChange: Zt,
|
|
78439
78445
|
onInsert: BI
|
|
78440
78446
|
}
|
|
78441
78447
|
),
|
|
@@ -78854,7 +78860,7 @@ const yI = "grammarDictionary", mEe = [
|
|
|
78854
78860
|
t.read(() => {
|
|
78855
78861
|
const n = Dt(), i = (o) => {
|
|
78856
78862
|
if (!oi(o)) {
|
|
78857
|
-
if (
|
|
78863
|
+
if (Vt(o)) {
|
|
78858
78864
|
const a = o.getTextContent(), s = e.length;
|
|
78859
78865
|
e += a, r.push({
|
|
78860
78866
|
start: s,
|
|
@@ -79082,7 +79088,7 @@ function PEe({
|
|
|
79082
79088
|
let de = le;
|
|
79083
79089
|
for (; de > 0 && /[a-zA-Z0-9_']/.test(oe[de - 1]); )
|
|
79084
79090
|
de--;
|
|
79085
|
-
if (
|
|
79091
|
+
if (Vt(J)) {
|
|
79086
79092
|
const pe = oe.slice(0, de) + ee.displayText + oe.slice(le);
|
|
79087
79093
|
J.setTextContent(pe);
|
|
79088
79094
|
const Qe = de + ee.displayText.length;
|
|
@@ -79114,9 +79120,9 @@ function PEe({
|
|
|
79114
79120
|
);
|
|
79115
79121
|
if (ye && lt) {
|
|
79116
79122
|
const et = Et(ye.key), _t = Et(lt.key);
|
|
79117
|
-
if (
|
|
79118
|
-
const
|
|
79119
|
-
|
|
79123
|
+
if (Vt(et) && Vt(_t)) {
|
|
79124
|
+
const Zt = yx(), Nr = pe - ye.start, zi = Qe - lt.start;
|
|
79125
|
+
Zt.anchor.set(et.getKey(), Nr, "text"), Zt.focus.set(_t.getKey(), zi, "text"), ga(Zt), Zt.insertText(ee);
|
|
79120
79126
|
}
|
|
79121
79127
|
}
|
|
79122
79128
|
}), Y(
|
|
@@ -79141,7 +79147,7 @@ function PEe({
|
|
|
79141
79147
|
const le = (de) => {
|
|
79142
79148
|
if (oe)
|
|
79143
79149
|
return !0;
|
|
79144
|
-
if (
|
|
79150
|
+
if (Vt(de)) {
|
|
79145
79151
|
const Qe = de.getTextContent(), ye = Qe.toLowerCase().indexOf(ae.toLowerCase());
|
|
79146
79152
|
if (ye !== -1) {
|
|
79147
79153
|
const lt = Qe.substring(0, ye) + ee + Qe.substring(ye + ae.length);
|
|
@@ -79283,11 +79289,11 @@ function PEe({
|
|
|
79283
79289
|
const lt = new RegExp(`\\b${Qe}\\b`), et = pe.match(lt), _t = et ? et.index : -1;
|
|
79284
79290
|
if (_t === void 0 || _t === -1)
|
|
79285
79291
|
return;
|
|
79286
|
-
const
|
|
79292
|
+
const Zt = de + _t, Nr = Zt + le.original.length;
|
|
79287
79293
|
J.filter(
|
|
79288
|
-
(rr) => rr.start <=
|
|
79294
|
+
(rr) => rr.start <= Zt && rr.end > Zt || rr.start < Nr && rr.end >= Nr || rr.start >= Zt && rr.end <= Nr
|
|
79289
79295
|
).forEach((rr) => {
|
|
79290
|
-
const xa = Math.max(rr.start,
|
|
79296
|
+
const xa = Math.max(rr.start, Zt), lo = Math.min(rr.end, Nr), co = xa - rr.start, Oo = lo - rr.start;
|
|
79291
79297
|
if (Oo <= co)
|
|
79292
79298
|
return;
|
|
79293
79299
|
const Xr = s.getElementByKey(rr.key);
|
|
@@ -79412,8 +79418,8 @@ function PEe({
|
|
|
79412
79418
|
/* @__PURE__ */ O("div", { className: "cteditor-space-y-2 cteditor-max-h-[120px] cteditor-overflow-y-auto cteditor-pr-1", children: ee.suggestions.map((et, _t) => /* @__PURE__ */ S(
|
|
79413
79419
|
"button",
|
|
79414
79420
|
{
|
|
79415
|
-
onClick: (
|
|
79416
|
-
|
|
79421
|
+
onClick: (Zt) => {
|
|
79422
|
+
Zt.preventDefault(), Zt.stopPropagation(), Re(et, ee);
|
|
79417
79423
|
},
|
|
79418
79424
|
className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-3 cteditor-py-2 cteditor-bg-green-50 dark:cteditor-bg-green-900/10 hover:cteditor-bg-green-100 cteditor-border-2 cteditor-border-green-200 cteditor-rounded-lg cteditor-transition-all",
|
|
79419
79425
|
children: [
|
|
@@ -79672,7 +79678,7 @@ const kEe = () => {
|
|
|
79672
79678
|
selectedText: g
|
|
79673
79679
|
}), Q = p.getNodes(), $ = Date.now();
|
|
79674
79680
|
for (const b of Q)
|
|
79675
|
-
if (
|
|
79681
|
+
if (Vt(b)) {
|
|
79676
79682
|
const T = Dx(
|
|
79677
79683
|
b.getTextContent(),
|
|
79678
79684
|
m,
|
|
@@ -82023,7 +82029,7 @@ function a4e(t, e, r, n) {
|
|
|
82023
82029
|
(B) => Nn(B) && !B.isInline()
|
|
82024
82030
|
));
|
|
82025
82031
|
const G = I !== null && Nn(I) ? I.getFormatType() : Nn(fe) ? fe.getFormatType() : D !== null && Nn(D) ? D.getFormatType() : "left";
|
|
82026
|
-
V(G), !EL(A.anchor.getNode()) && A.getTextContent() !== "" ? o(
|
|
82032
|
+
V(G), !EL(A.anchor.getNode()) && A.getTextContent() !== "" ? o(Vt(fe) || Oc(fe)) : o(!1);
|
|
82027
82033
|
const H = A.getTextContent().replace(/\n/g, "");
|
|
82028
82034
|
if (!A.isCollapsed() && H === "") {
|
|
82029
82035
|
o(!1);
|
|
@@ -82218,16 +82224,16 @@ function c4e({
|
|
|
82218
82224
|
}
|
|
82219
82225
|
C = C.getParent();
|
|
82220
82226
|
}
|
|
82221
|
-
if (
|
|
82227
|
+
if (Vt(Z)) {
|
|
82222
82228
|
const N = Z.getTextContent(), U = W.offset;
|
|
82223
82229
|
k = N.slice(0, U);
|
|
82224
82230
|
let X = Z.getPreviousSibling();
|
|
82225
82231
|
for (; X; )
|
|
82226
|
-
|
|
82232
|
+
Vt(X) && (k = X.getTextContent() + k), X = X.getPreviousSibling();
|
|
82227
82233
|
w = N.slice(U);
|
|
82228
82234
|
let Y = Z.getNextSibling();
|
|
82229
82235
|
for (; Y; )
|
|
82230
|
-
|
|
82236
|
+
Vt(Y) && (w += Y.getTextContent()), Y = Y.getNextSibling();
|
|
82231
82237
|
}
|
|
82232
82238
|
}), R) {
|
|
82233
82239
|
$();
|
|
@@ -82622,7 +82628,7 @@ function ss(t) {
|
|
|
82622
82628
|
if (!$e(r) || !r.isCollapsed())
|
|
82623
82629
|
return;
|
|
82624
82630
|
const n = r.anchor, i = n.getNode();
|
|
82625
|
-
if (!
|
|
82631
|
+
if (!Vt(i))
|
|
82626
82632
|
return;
|
|
82627
82633
|
const o = i.getTextContent(), a = n.offset;
|
|
82628
82634
|
e = o.slice(0, a);
|
|
@@ -82675,7 +82681,7 @@ function XI(t) {
|
|
|
82675
82681
|
if (!$e(a))
|
|
82676
82682
|
return;
|
|
82677
82683
|
const s = a.anchor.getNode();
|
|
82678
|
-
if (!
|
|
82684
|
+
if (!Vt(s))
|
|
82679
82685
|
return;
|
|
82680
82686
|
const l = s.getParent();
|
|
82681
82687
|
if (!l || l.getType() !== "paragraph" || Ph(l))
|
|
@@ -82693,7 +82699,7 @@ function XI(t) {
|
|
|
82693
82699
|
if (!$e(a))
|
|
82694
82700
|
return;
|
|
82695
82701
|
const s = a.anchor.getNode();
|
|
82696
|
-
if (!
|
|
82702
|
+
if (!Vt(s))
|
|
82697
82703
|
return;
|
|
82698
82704
|
const l = s.getParent();
|
|
82699
82705
|
if (l && l.getType() === "paragraph") {
|
|
@@ -82716,7 +82722,7 @@ function RI(t) {
|
|
|
82716
82722
|
if (!$e(n))
|
|
82717
82723
|
return;
|
|
82718
82724
|
const i = n.anchor.getNode();
|
|
82719
|
-
if (!
|
|
82725
|
+
if (!Vt(i))
|
|
82720
82726
|
return;
|
|
82721
82727
|
const o = i.getParent();
|
|
82722
82728
|
if (!o || o.getType() !== "paragraph" || Ph(o))
|
|
@@ -82731,7 +82737,7 @@ function RI(t) {
|
|
|
82731
82737
|
if (!$e(n))
|
|
82732
82738
|
return;
|
|
82733
82739
|
const i = n.anchor.getNode();
|
|
82734
|
-
if (!
|
|
82740
|
+
if (!Vt(i))
|
|
82735
82741
|
return;
|
|
82736
82742
|
const o = i.getParent();
|
|
82737
82743
|
if (o && o.getType() === "paragraph") {
|
|
@@ -82750,7 +82756,7 @@ function CI(t) {
|
|
|
82750
82756
|
if (!$e(n))
|
|
82751
82757
|
return;
|
|
82752
82758
|
const i = n.anchor.getNode();
|
|
82753
|
-
if (!
|
|
82759
|
+
if (!Vt(i))
|
|
82754
82760
|
return;
|
|
82755
82761
|
const o = i.getParent();
|
|
82756
82762
|
if (!o || o.getType() !== "paragraph" || Ph(o))
|
|
@@ -82765,7 +82771,7 @@ function CI(t) {
|
|
|
82765
82771
|
if (!$e(n))
|
|
82766
82772
|
return;
|
|
82767
82773
|
const i = n.anchor.getNode();
|
|
82768
|
-
if (!
|
|
82774
|
+
if (!Vt(i))
|
|
82769
82775
|
return;
|
|
82770
82776
|
const o = i.getParent();
|
|
82771
82777
|
if (o && o.getType() === "paragraph") {
|
|
@@ -82784,7 +82790,7 @@ function EI(t) {
|
|
|
82784
82790
|
if (!$e(n))
|
|
82785
82791
|
return;
|
|
82786
82792
|
const i = n.anchor.getNode();
|
|
82787
|
-
if (!
|
|
82793
|
+
if (!Vt(i))
|
|
82788
82794
|
return;
|
|
82789
82795
|
const o = i.getParent();
|
|
82790
82796
|
if (!o || o.getType() !== "paragraph" || Ph(o))
|
|
@@ -82799,7 +82805,7 @@ function EI(t) {
|
|
|
82799
82805
|
if (!$e(n))
|
|
82800
82806
|
return;
|
|
82801
82807
|
const i = n.anchor.getNode();
|
|
82802
|
-
if (!
|
|
82808
|
+
if (!Vt(i))
|
|
82803
82809
|
return;
|
|
82804
82810
|
const o = i.getParent();
|
|
82805
82811
|
if (o && o.getType() === "paragraph") {
|
|
@@ -82818,7 +82824,7 @@ function zI(t) {
|
|
|
82818
82824
|
if (!$e(n))
|
|
82819
82825
|
return;
|
|
82820
82826
|
const i = n.anchor.getNode();
|
|
82821
|
-
if (!
|
|
82827
|
+
if (!Vt(i))
|
|
82822
82828
|
return;
|
|
82823
82829
|
const o = i.getParent();
|
|
82824
82830
|
if (!o || o.getType() !== "paragraph" || Ph(o))
|
|
@@ -82833,7 +82839,7 @@ function zI(t) {
|
|
|
82833
82839
|
if (!$e(n))
|
|
82834
82840
|
return;
|
|
82835
82841
|
const i = n.anchor.getNode();
|
|
82836
|
-
if (!
|
|
82842
|
+
if (!Vt(i))
|
|
82837
82843
|
return;
|
|
82838
82844
|
const o = i.getParent();
|
|
82839
82845
|
if (o && o.getType() === "paragraph") {
|
|
@@ -83250,7 +83256,7 @@ function E4e(t, e) {
|
|
|
83250
83256
|
`h${d}`
|
|
83251
83257
|
);
|
|
83252
83258
|
Vc(s[2].trim()).forEach((h) => {
|
|
83253
|
-
|
|
83259
|
+
Vt(h) && !h.hasFormat("bold") && h.toggleFormat("bold"), u.append(h);
|
|
83254
83260
|
}), r.push(u), i++;
|
|
83255
83261
|
continue;
|
|
83256
83262
|
}
|
|
@@ -83352,7 +83358,7 @@ function z4e(t, e) {
|
|
|
83352
83358
|
const o = i.getChildren();
|
|
83353
83359
|
for (let a = o.length - 1; a >= 0; a--) {
|
|
83354
83360
|
const s = o[a];
|
|
83355
|
-
if (
|
|
83361
|
+
if (Vt(s)) {
|
|
83356
83362
|
const l = r(s);
|
|
83357
83363
|
if (l.length > 1 || l[0] !== s) {
|
|
83358
83364
|
for (const c of l)
|
|
@@ -83660,7 +83666,7 @@ function W4e() {
|
|
|
83660
83666
|
tt.insertNodes([Rr]);
|
|
83661
83667
|
}
|
|
83662
83668
|
});
|
|
83663
|
-
}, [t]),
|
|
83669
|
+
}, [t]), Zt = K(() => {
|
|
83664
83670
|
J(() => {
|
|
83665
83671
|
const at = he();
|
|
83666
83672
|
$e(at) && at.insertNodes([uc()]);
|
|
@@ -83744,7 +83750,7 @@ function W4e() {
|
|
|
83744
83750
|
new st("Heading 4", () => le("h4"), d, "Headings", l?.enableHeadings ?? !0),
|
|
83745
83751
|
new st("Heading 5", () => le("h5"), d, "Headings", l?.enableHeadings ?? !0),
|
|
83746
83752
|
new st("Heading 6", () => le("h6"), d, "Headings", l?.enableHeadings ?? !0),
|
|
83747
|
-
new st("Quote",
|
|
83753
|
+
new st("Quote", Zt, f, "Blockquote", l?.enableBlockquote ?? !0),
|
|
83748
83754
|
new st("Code block", Nr, h, "Code Format", l?.enableCodeFormat ?? !0),
|
|
83749
83755
|
new st("Horizontal line", rr, p, "Horizontal Line", l?.enableHorizontalLine ?? !0, !0),
|
|
83750
83756
|
// Lists
|
|
@@ -83804,7 +83810,7 @@ function W4e() {
|
|
|
83804
83810
|
], [
|
|
83805
83811
|
oe,
|
|
83806
83812
|
le,
|
|
83807
|
-
|
|
83813
|
+
Zt,
|
|
83808
83814
|
Nr,
|
|
83809
83815
|
rr,
|
|
83810
83816
|
de,
|
|
@@ -84329,7 +84335,7 @@ function tz(t) {
|
|
|
84329
84335
|
}
|
|
84330
84336
|
function M4e(t) {
|
|
84331
84337
|
const e = t.getLastDescendant();
|
|
84332
|
-
|
|
84338
|
+
Vt(e) ? e.select() : Nn(e) ? e.selectEnd() : e !== null && e.selectNext();
|
|
84333
84339
|
}
|
|
84334
84340
|
function D4e(t) {
|
|
84335
84341
|
return t.getEditorState().read(() => {
|
|
@@ -84663,10 +84669,10 @@ function B4e({
|
|
|
84663
84669
|
for (let et = 0; et < p.columns; et++) {
|
|
84664
84670
|
const _t = lt + et;
|
|
84665
84671
|
if (_t >= 0 && _t < ye.length) {
|
|
84666
|
-
const
|
|
84667
|
-
if ($t(
|
|
84672
|
+
const Zt = ye[_t];
|
|
84673
|
+
if ($t(Zt) && (Zt.setHeaderStyles(er.COLUMN), de && Zt.setBackgroundColor(de), Zt.getChildrenSize() === 0)) {
|
|
84668
84674
|
const Nr = ot();
|
|
84669
|
-
|
|
84675
|
+
Zt.append(Nr);
|
|
84670
84676
|
}
|
|
84671
84677
|
}
|
|
84672
84678
|
}
|
|
@@ -84941,14 +84947,14 @@ function B4e({
|
|
|
84941
84947
|
requestAnimationFrame(() => {
|
|
84942
84948
|
const ye = d.getRootElement(), et = (oe ?? ye)?.clientWidth ?? 0, _t = Math.max(0, et - UI);
|
|
84943
84949
|
if (_t > 0) {
|
|
84944
|
-
const
|
|
84950
|
+
const Zt = Math.floor(_t / de);
|
|
84945
84951
|
J.style.setProperty("width", `${_t}px`, "important"), pe.forEach((Nr) => {
|
|
84946
|
-
Nr.style.setProperty("width", `${
|
|
84952
|
+
Nr.style.setProperty("width", `${Zt}px`, "important");
|
|
84947
84953
|
});
|
|
84948
84954
|
} else {
|
|
84949
|
-
const
|
|
84955
|
+
const Zt = 100 / de;
|
|
84950
84956
|
pe.forEach((Nr) => {
|
|
84951
|
-
Nr.style.setProperty("width", `${
|
|
84957
|
+
Nr.style.setProperty("width", `${Zt}%`, "important");
|
|
84952
84958
|
});
|
|
84953
84959
|
}
|
|
84954
84960
|
});
|
|
@@ -86927,7 +86933,7 @@ const aze = 2 * 60 * 1e3, sze = ({
|
|
|
86927
86933
|
className: a ? "cteditor-text-[10px] cteditor-text-gray-500 dark:cteditor-text-gray-400 cteditor-border-l cteditor-border-gray-200 dark:cteditor-border-gray-700 cteditor-pl-2" : "cteditor-text-[10px] cteditor-text-gray-500 dark:cteditor-text-gray-400",
|
|
86928
86934
|
children: [
|
|
86929
86935
|
"v",
|
|
86930
|
-
"1.4.
|
|
86936
|
+
"1.4.3"
|
|
86931
86937
|
]
|
|
86932
86938
|
}
|
|
86933
86939
|
)
|
|
@@ -87074,7 +87080,7 @@ function bze(t) {
|
|
|
87074
87080
|
return r(t, ""), e;
|
|
87075
87081
|
}
|
|
87076
87082
|
function yze(t, e) {
|
|
87077
|
-
if (!
|
|
87083
|
+
if (!Vt(t) || e.length === 0)
|
|
87078
87084
|
return;
|
|
87079
87085
|
const r = t.getTextContent(), n = t.getFormat(), i = e.filter((l) => l.style);
|
|
87080
87086
|
if (i.length <= 1) {
|
|
@@ -87105,7 +87111,7 @@ function yze(t, e) {
|
|
|
87105
87111
|
const l = t.splitText(...s);
|
|
87106
87112
|
let c = 0;
|
|
87107
87113
|
for (const d of l)
|
|
87108
|
-
if (
|
|
87114
|
+
if (Vt(d) && c < e.length) {
|
|
87109
87115
|
const u = e[c];
|
|
87110
87116
|
u.style && d.setStyle(u.style), d.setFormat(n), c++;
|
|
87111
87117
|
}
|
|
@@ -87138,7 +87144,7 @@ function VI(t, e) {
|
|
|
87138
87144
|
if (o) {
|
|
87139
87145
|
const a = o.replace(/\s+/g, " ").toLowerCase(), s = e.get(a);
|
|
87140
87146
|
if (s && s.length > 0) {
|
|
87141
|
-
const l = r.getChildren().filter(
|
|
87147
|
+
const l = r.getChildren().filter(Vt);
|
|
87142
87148
|
if (l.length === 1)
|
|
87143
87149
|
yze(l[0], s);
|
|
87144
87150
|
else if (l.length > 0)
|