@tailor-cms/ce-html-edit 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +905 -786
- package/dist/{style.css → index.css} +21 -21
- package/dist/index.js +906 -787
- package/package.json +7 -7
- package/dist/chrome-4cc2126d.js +0 -8
- package/dist/chrome-dd3ea238.cjs +0 -9
- package/dist/html-09b878d3.js +0 -2347
- package/dist/html-838019c8.cjs +0 -2346
- package/dist/language_tools-51ba2c8f.cjs +0 -1738
- package/dist/language_tools-9b346ce3.js +0 -1737
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { defineComponent,
|
|
1
|
+
import "./index.css";
|
|
2
|
+
import { defineComponent, shallowRef, onMounted, onBeforeUnmount, ref, h, Teleport, getCurrentInstance, watchEffect, nextTick, unref, reactive, markRaw, customRef, resolveComponent, createBlock, openBlock, withCtx, createTextVNode, toDisplayString, createVNode, mergeProps, withDirectives, createElementBlock, Fragment as Fragment$1, renderList, vShow, inject, watch, createCommentVNode, withModifiers, createElementVNode, normalizeStyle, computed, resolveDynamicComponent } from "vue";
|
|
3
3
|
var type = "TIPTAP_HTML";
|
|
4
4
|
var name = "HTML";
|
|
5
5
|
var initState = () => ({ content: "" });
|
|
@@ -19,7 +19,7 @@ var manifest$1 = {
|
|
|
19
19
|
initState,
|
|
20
20
|
ui
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var index_default = manifest$1;
|
|
23
23
|
function OrderedMap(content) {
|
|
24
24
|
this.content = content;
|
|
25
25
|
}
|
|
@@ -27,8 +27,7 @@ OrderedMap.prototype = {
|
|
|
27
27
|
constructor: OrderedMap,
|
|
28
28
|
find: function(key) {
|
|
29
29
|
for (var i = 0; i < this.content.length; i += 2)
|
|
30
|
-
if (this.content[i] === key)
|
|
31
|
-
return i;
|
|
30
|
+
if (this.content[i] === key) return i;
|
|
32
31
|
return -1;
|
|
33
32
|
},
|
|
34
33
|
// :: (string) → ?any
|
|
@@ -49,8 +48,7 @@ OrderedMap.prototype = {
|
|
|
49
48
|
content.push(newKey || key, value);
|
|
50
49
|
} else {
|
|
51
50
|
content[found2 + 1] = value;
|
|
52
|
-
if (newKey)
|
|
53
|
-
content[found2] = newKey;
|
|
51
|
+
if (newKey) content[found2] = newKey;
|
|
54
52
|
}
|
|
55
53
|
return new OrderedMap(content);
|
|
56
54
|
},
|
|
@@ -58,8 +56,7 @@ OrderedMap.prototype = {
|
|
|
58
56
|
// Return a map with the given key removed, if it existed.
|
|
59
57
|
remove: function(key) {
|
|
60
58
|
var found2 = this.find(key);
|
|
61
|
-
if (found2 == -1)
|
|
62
|
-
return this;
|
|
59
|
+
if (found2 == -1) return this;
|
|
63
60
|
var content = this.content.slice();
|
|
64
61
|
content.splice(found2, 2);
|
|
65
62
|
return new OrderedMap(content);
|
|
@@ -97,8 +94,7 @@ OrderedMap.prototype = {
|
|
|
97
94
|
// appear in `map` before the keys in `map`.
|
|
98
95
|
prepend: function(map2) {
|
|
99
96
|
map2 = OrderedMap.from(map2);
|
|
100
|
-
if (!map2.size)
|
|
101
|
-
return this;
|
|
97
|
+
if (!map2.size) return this;
|
|
102
98
|
return new OrderedMap(map2.content.concat(this.subtract(map2).content));
|
|
103
99
|
},
|
|
104
100
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
@@ -106,8 +102,7 @@ OrderedMap.prototype = {
|
|
|
106
102
|
// appear in `map` after the keys in `map`.
|
|
107
103
|
append: function(map2) {
|
|
108
104
|
map2 = OrderedMap.from(map2);
|
|
109
|
-
if (!map2.size)
|
|
110
|
-
return this;
|
|
105
|
+
if (!map2.size) return this;
|
|
111
106
|
return new OrderedMap(this.subtract(map2).content.concat(map2.content));
|
|
112
107
|
},
|
|
113
108
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
@@ -136,12 +131,9 @@ OrderedMap.prototype = {
|
|
|
136
131
|
}
|
|
137
132
|
};
|
|
138
133
|
OrderedMap.from = function(value) {
|
|
139
|
-
if (value instanceof OrderedMap)
|
|
140
|
-
return value;
|
|
134
|
+
if (value instanceof OrderedMap) return value;
|
|
141
135
|
var content = [];
|
|
142
|
-
if (value)
|
|
143
|
-
for (var prop in value)
|
|
144
|
-
content.push(prop, value[prop]);
|
|
136
|
+
if (value) for (var prop in value) content.push(prop, value[prop]);
|
|
145
137
|
return new OrderedMap(content);
|
|
146
138
|
};
|
|
147
139
|
function findDiffStart(a, b, pos) {
|
|
@@ -744,8 +736,6 @@ function removeRange(content, from2, to) {
|
|
|
744
736
|
function insertInto(content, dist, insert, parent) {
|
|
745
737
|
let { index, offset: offset2 } = content.findIndex(dist), child = content.maybeChild(index);
|
|
746
738
|
if (offset2 == dist || child.isText) {
|
|
747
|
-
if (parent && !parent.canReplace(index, index, insert))
|
|
748
|
-
return null;
|
|
749
739
|
return content.cut(0, dist).append(insert).append(content.cut(dist));
|
|
750
740
|
}
|
|
751
741
|
let inner = insertInto(child.content, dist - offset2 - 1, insert);
|
|
@@ -2570,7 +2560,7 @@ const OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;
|
|
|
2570
2560
|
function wsOptionsFor(type2, preserveWhitespace, base2) {
|
|
2571
2561
|
if (preserveWhitespace != null)
|
|
2572
2562
|
return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
|
|
2573
|
-
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 &
|
|
2563
|
+
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 & -5;
|
|
2574
2564
|
}
|
|
2575
2565
|
class NodeContext {
|
|
2576
2566
|
constructor(type2, attrs, marks, pendingMarks, solid, match, options) {
|
|
@@ -4467,21 +4457,20 @@ class Fitter {
|
|
|
4467
4457
|
return after;
|
|
4468
4458
|
}
|
|
4469
4459
|
findCloseLevel($to) {
|
|
4470
|
-
scan:
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
continue scan;
|
|
4482
|
-
}
|
|
4483
|
-
return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
|
|
4460
|
+
scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {
|
|
4461
|
+
let { match, type: type2 } = this.frontier[i];
|
|
4462
|
+
let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));
|
|
4463
|
+
let fit = contentAfterFits($to, i, type2, match, dropInner);
|
|
4464
|
+
if (!fit)
|
|
4465
|
+
continue;
|
|
4466
|
+
for (let d = i - 1; d >= 0; d--) {
|
|
4467
|
+
let { match: match2, type: type3 } = this.frontier[d];
|
|
4468
|
+
let matches2 = contentAfterFits($to, d, type3, match2, true);
|
|
4469
|
+
if (!matches2 || matches2.childCount)
|
|
4470
|
+
continue scan;
|
|
4484
4471
|
}
|
|
4472
|
+
return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
|
|
4473
|
+
}
|
|
4485
4474
|
}
|
|
4486
4475
|
close($to) {
|
|
4487
4476
|
let close2 = this.findCloseLevel($to);
|
|
@@ -5475,7 +5464,7 @@ class Transaction extends Transform {
|
|
|
5475
5464
|
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
5476
5465
|
this.curSelection = selection;
|
|
5477
5466
|
this.curSelectionFor = this.steps.length;
|
|
5478
|
-
this.updated = (this.updated | UPDATED_SEL) &
|
|
5467
|
+
this.updated = (this.updated | UPDATED_SEL) & -3;
|
|
5479
5468
|
this.storedMarks = null;
|
|
5480
5469
|
return this;
|
|
5481
5470
|
}
|
|
@@ -5526,7 +5515,7 @@ class Transaction extends Transform {
|
|
|
5526
5515
|
*/
|
|
5527
5516
|
addStep(step, doc2) {
|
|
5528
5517
|
super.addStep(step, doc2);
|
|
5529
|
-
this.updated = this.updated &
|
|
5518
|
+
this.updated = this.updated & -3;
|
|
5530
5519
|
this.storedMarks = null;
|
|
5531
5520
|
}
|
|
5532
5521
|
/**
|
|
@@ -6757,17 +6746,17 @@ class ViewDesc {
|
|
|
6757
6746
|
// custom things with the selection. Note that this falls apart when
|
|
6758
6747
|
// a selection starts in such a node and ends in another, in which
|
|
6759
6748
|
// case we just use whatever domFromPos produces as a best effort.
|
|
6760
|
-
setSelection(anchor, head,
|
|
6749
|
+
setSelection(anchor, head, root, force = false) {
|
|
6761
6750
|
let from2 = Math.min(anchor, head), to = Math.max(anchor, head);
|
|
6762
6751
|
for (let i = 0, offset2 = 0; i < this.children.length; i++) {
|
|
6763
6752
|
let child = this.children[i], end2 = offset2 + child.size;
|
|
6764
6753
|
if (from2 > offset2 && to < end2)
|
|
6765
|
-
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border,
|
|
6754
|
+
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border, root, force);
|
|
6766
6755
|
offset2 = end2;
|
|
6767
6756
|
}
|
|
6768
6757
|
let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);
|
|
6769
6758
|
let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);
|
|
6770
|
-
let domSel =
|
|
6759
|
+
let domSel = root.getSelection();
|
|
6771
6760
|
let brKludge = false;
|
|
6772
6761
|
if ((gecko || safari) && anchor == head) {
|
|
6773
6762
|
let { node, offset: offset2 } = anchorDOM;
|
|
@@ -7076,12 +7065,9 @@ class NodeViewDesc extends ViewDesc {
|
|
|
7076
7065
|
}, (child, outerDeco, innerDeco, i) => {
|
|
7077
7066
|
updater.syncToMarks(child.marks, inline, view);
|
|
7078
7067
|
let compIndex;
|
|
7079
|
-
if (updater.findNodeMatch(child, outerDeco, innerDeco, i))
|
|
7080
|
-
|
|
7081
|
-
else if (
|
|
7082
|
-
;
|
|
7083
|
-
else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off))
|
|
7084
|
-
;
|
|
7068
|
+
if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;
|
|
7069
|
+
else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;
|
|
7070
|
+
else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;
|
|
7085
7071
|
else {
|
|
7086
7072
|
updater.addNode(child, outerDeco, innerDeco, view, off);
|
|
7087
7073
|
}
|
|
@@ -7282,8 +7268,8 @@ class CustomNodeViewDesc extends NodeViewDesc {
|
|
|
7282
7268
|
deselectNode() {
|
|
7283
7269
|
this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
|
|
7284
7270
|
}
|
|
7285
|
-
setSelection(anchor, head,
|
|
7286
|
-
this.spec.setSelection ? this.spec.setSelection(anchor, head,
|
|
7271
|
+
setSelection(anchor, head, root, force) {
|
|
7272
|
+
this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : super.setSelection(anchor, head, root, force);
|
|
7287
7273
|
}
|
|
7288
7274
|
destroy() {
|
|
7289
7275
|
if (this.spec.destroy)
|
|
@@ -7642,36 +7628,35 @@ class ViewTreeUpdater {
|
|
|
7642
7628
|
function preMatch(frag, parentDesc) {
|
|
7643
7629
|
let curDesc = parentDesc, descI = curDesc.children.length;
|
|
7644
7630
|
let fI = frag.childCount, matched = /* @__PURE__ */ new Map(), matches2 = [];
|
|
7645
|
-
outer:
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
descI = next.children.length;
|
|
7654
|
-
} else {
|
|
7655
|
-
desc = next;
|
|
7656
|
-
descI--;
|
|
7657
|
-
break;
|
|
7658
|
-
}
|
|
7659
|
-
} else if (curDesc == parentDesc) {
|
|
7660
|
-
break outer;
|
|
7631
|
+
outer: while (fI > 0) {
|
|
7632
|
+
let desc;
|
|
7633
|
+
for (; ; ) {
|
|
7634
|
+
if (descI) {
|
|
7635
|
+
let next = curDesc.children[descI - 1];
|
|
7636
|
+
if (next instanceof MarkViewDesc) {
|
|
7637
|
+
curDesc = next;
|
|
7638
|
+
descI = next.children.length;
|
|
7661
7639
|
} else {
|
|
7662
|
-
|
|
7663
|
-
|
|
7640
|
+
desc = next;
|
|
7641
|
+
descI--;
|
|
7642
|
+
break;
|
|
7664
7643
|
}
|
|
7644
|
+
} else if (curDesc == parentDesc) {
|
|
7645
|
+
break outer;
|
|
7646
|
+
} else {
|
|
7647
|
+
descI = curDesc.parent.children.indexOf(curDesc);
|
|
7648
|
+
curDesc = curDesc.parent;
|
|
7665
7649
|
}
|
|
7666
|
-
let node = desc.node;
|
|
7667
|
-
if (!node)
|
|
7668
|
-
continue;
|
|
7669
|
-
if (node != frag.child(fI - 1))
|
|
7670
|
-
break;
|
|
7671
|
-
--fI;
|
|
7672
|
-
matched.set(desc, fI);
|
|
7673
|
-
matches2.push(desc);
|
|
7674
7650
|
}
|
|
7651
|
+
let node = desc.node;
|
|
7652
|
+
if (!node)
|
|
7653
|
+
continue;
|
|
7654
|
+
if (node != frag.child(fI - 1))
|
|
7655
|
+
break;
|
|
7656
|
+
--fI;
|
|
7657
|
+
matched.set(desc, fI);
|
|
7658
|
+
matches2.push(desc);
|
|
7659
|
+
}
|
|
7675
7660
|
return { index: fI, matched, matches: matches2.reverse() };
|
|
7676
7661
|
}
|
|
7677
7662
|
function compareSide(a, b) {
|
|
@@ -8638,10 +8623,10 @@ editHandlers.keydown = (view, _event) => {
|
|
|
8638
8623
|
if (event.keyCode != 229)
|
|
8639
8624
|
view.domObserver.forceFlush();
|
|
8640
8625
|
if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
|
|
8641
|
-
let
|
|
8642
|
-
view.input.lastIOSEnter =
|
|
8626
|
+
let now = Date.now();
|
|
8627
|
+
view.input.lastIOSEnter = now;
|
|
8643
8628
|
view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8644
|
-
if (view.input.lastIOSEnter ==
|
|
8629
|
+
if (view.input.lastIOSEnter == now) {
|
|
8645
8630
|
view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")));
|
|
8646
8631
|
view.input.lastIOSEnter = 0;
|
|
8647
8632
|
}
|
|
@@ -8693,8 +8678,7 @@ function updateSelection(view, selection, origin) {
|
|
|
8693
8678
|
if (!view.focused)
|
|
8694
8679
|
view.focus();
|
|
8695
8680
|
let tr2 = view.state.tr.setSelection(selection);
|
|
8696
|
-
|
|
8697
|
-
tr2.setMeta("pointer", true);
|
|
8681
|
+
tr2.setMeta("pointer", true);
|
|
8698
8682
|
view.dispatch(tr2);
|
|
8699
8683
|
}
|
|
8700
8684
|
function selectClickedLeaf(view, inside) {
|
|
@@ -8702,7 +8686,7 @@ function selectClickedLeaf(view, inside) {
|
|
|
8702
8686
|
return false;
|
|
8703
8687
|
let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;
|
|
8704
8688
|
if (node && node.isAtom && NodeSelection.isSelectable(node)) {
|
|
8705
|
-
updateSelection(view, new NodeSelection($pos)
|
|
8689
|
+
updateSelection(view, new NodeSelection($pos));
|
|
8706
8690
|
return true;
|
|
8707
8691
|
}
|
|
8708
8692
|
return false;
|
|
@@ -8725,7 +8709,7 @@ function selectClickedNode(view, inside) {
|
|
|
8725
8709
|
}
|
|
8726
8710
|
}
|
|
8727
8711
|
if (selectAt != null) {
|
|
8728
|
-
updateSelection(view, NodeSelection.create(view.state.doc, selectAt)
|
|
8712
|
+
updateSelection(view, NodeSelection.create(view.state.doc, selectAt));
|
|
8729
8713
|
return true;
|
|
8730
8714
|
} else {
|
|
8731
8715
|
return false;
|
|
@@ -8746,7 +8730,7 @@ function defaultTripleClick(view, inside, event) {
|
|
|
8746
8730
|
let doc2 = view.state.doc;
|
|
8747
8731
|
if (inside == -1) {
|
|
8748
8732
|
if (doc2.inlineContent) {
|
|
8749
|
-
updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size)
|
|
8733
|
+
updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size));
|
|
8750
8734
|
return true;
|
|
8751
8735
|
}
|
|
8752
8736
|
return false;
|
|
@@ -8756,9 +8740,9 @@ function defaultTripleClick(view, inside, event) {
|
|
|
8756
8740
|
let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);
|
|
8757
8741
|
let nodePos = $pos.before(i);
|
|
8758
8742
|
if (node.inlineContent)
|
|
8759
|
-
updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size)
|
|
8743
|
+
updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size));
|
|
8760
8744
|
else if (NodeSelection.isSelectable(node))
|
|
8761
|
-
updateSelection(view, NodeSelection.create(doc2, nodePos)
|
|
8745
|
+
updateSelection(view, NodeSelection.create(doc2, nodePos));
|
|
8762
8746
|
else
|
|
8763
8747
|
continue;
|
|
8764
8748
|
return true;
|
|
@@ -8772,14 +8756,14 @@ handlers.mousedown = (view, _event) => {
|
|
|
8772
8756
|
let event = _event;
|
|
8773
8757
|
view.input.shiftKey = event.shiftKey;
|
|
8774
8758
|
let flushed = forceDOMFlush(view);
|
|
8775
|
-
let
|
|
8776
|
-
if (
|
|
8759
|
+
let now = Date.now(), type2 = "singleClick";
|
|
8760
|
+
if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
|
|
8777
8761
|
if (view.input.lastClick.type == "singleClick")
|
|
8778
8762
|
type2 = "doubleClick";
|
|
8779
8763
|
else if (view.input.lastClick.type == "doubleClick")
|
|
8780
8764
|
type2 = "tripleClick";
|
|
8781
8765
|
}
|
|
8782
|
-
view.input.lastClick = { time:
|
|
8766
|
+
view.input.lastClick = { time: now, x: event.clientX, y: event.clientY, type: type2 };
|
|
8783
8767
|
let pos = view.posAtCoords(eventCoords(event));
|
|
8784
8768
|
if (!pos)
|
|
8785
8769
|
return;
|
|
@@ -8875,7 +8859,7 @@ class MouseDown {
|
|
|
8875
8859
|
// thus doesn't get a reaction from ProseMirror. This
|
|
8876
8860
|
// works around that.
|
|
8877
8861
|
chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {
|
|
8878
|
-
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos))
|
|
8862
|
+
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)));
|
|
8879
8863
|
event.preventDefault();
|
|
8880
8864
|
} else {
|
|
8881
8865
|
setSelectionOrigin(this.view, "pointer");
|
|
@@ -9092,8 +9076,7 @@ handlers.dragstart = (view, _event) => {
|
|
|
9092
9076
|
let sel = view.state.selection;
|
|
9093
9077
|
let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));
|
|
9094
9078
|
let node;
|
|
9095
|
-
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to))
|
|
9096
|
-
;
|
|
9079
|
+
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;
|
|
9097
9080
|
else if (mouseDown && mouseDown.mightDrag) {
|
|
9098
9081
|
node = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);
|
|
9099
9082
|
} else if (event.target && event.target.nodeType == 1) {
|
|
@@ -10558,8 +10541,7 @@ class EditorView {
|
|
|
10558
10541
|
*/
|
|
10559
10542
|
scrollToSelection() {
|
|
10560
10543
|
let startDOM = this.domSelectionRange().focusNode;
|
|
10561
|
-
if (this.someProp("handleScrollToSelection", (f) => f(this)))
|
|
10562
|
-
;
|
|
10544
|
+
if (this.someProp("handleScrollToSelection", (f) => f(this))) ;
|
|
10563
10545
|
else if (this.state.selection instanceof NodeSelection) {
|
|
10564
10546
|
let target = this.docView.domAfterPos(this.state.selection.from);
|
|
10565
10547
|
if (target.nodeType == 1)
|
|
@@ -10978,32 +10960,22 @@ var shift = {
|
|
|
10978
10960
|
};
|
|
10979
10961
|
var mac$1 = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
|
|
10980
10962
|
var ie = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
10981
|
-
for (var i = 0; i < 10; i++)
|
|
10982
|
-
|
|
10983
|
-
for (var i = 1; i <= 24; i++)
|
|
10984
|
-
base[i + 111] = "F" + i;
|
|
10963
|
+
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
|
|
10964
|
+
for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
|
|
10985
10965
|
for (var i = 65; i <= 90; i++) {
|
|
10986
10966
|
base[i] = String.fromCharCode(i + 32);
|
|
10987
10967
|
shift[i] = String.fromCharCode(i);
|
|
10988
10968
|
}
|
|
10989
|
-
for (var code in base)
|
|
10990
|
-
if (!shift.hasOwnProperty(code))
|
|
10991
|
-
shift[code] = base[code];
|
|
10969
|
+
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
10992
10970
|
function keyName(event) {
|
|
10993
10971
|
var ignoreKey = mac$1 && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey || ie && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
|
|
10994
10972
|
var name2 = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
|
|
10995
|
-
if (name2 == "Esc")
|
|
10996
|
-
|
|
10997
|
-
if (name2 == "
|
|
10998
|
-
|
|
10999
|
-
if (name2 == "
|
|
11000
|
-
|
|
11001
|
-
if (name2 == "Up")
|
|
11002
|
-
name2 = "ArrowUp";
|
|
11003
|
-
if (name2 == "Right")
|
|
11004
|
-
name2 = "ArrowRight";
|
|
11005
|
-
if (name2 == "Down")
|
|
11006
|
-
name2 = "ArrowDown";
|
|
10973
|
+
if (name2 == "Esc") name2 = "Escape";
|
|
10974
|
+
if (name2 == "Del") name2 = "Delete";
|
|
10975
|
+
if (name2 == "Left") name2 = "ArrowLeft";
|
|
10976
|
+
if (name2 == "Up") name2 = "ArrowUp";
|
|
10977
|
+
if (name2 == "Right") name2 = "ArrowRight";
|
|
10978
|
+
if (name2 == "Down") name2 = "ArrowDown";
|
|
11007
10979
|
return name2;
|
|
11008
10980
|
}
|
|
11009
10981
|
const mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;
|
|
@@ -11374,6 +11346,45 @@ const liftEmptyBlock$1 = (state, dispatch) => {
|
|
|
11374
11346
|
dispatch(state.tr.lift(range, target).scrollIntoView());
|
|
11375
11347
|
return true;
|
|
11376
11348
|
};
|
|
11349
|
+
function splitBlockAs(splitNode) {
|
|
11350
|
+
return (state, dispatch) => {
|
|
11351
|
+
let { $from, $to } = state.selection;
|
|
11352
|
+
if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
|
|
11353
|
+
if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
|
|
11354
|
+
return false;
|
|
11355
|
+
if (dispatch)
|
|
11356
|
+
dispatch(state.tr.split($from.pos).scrollIntoView());
|
|
11357
|
+
return true;
|
|
11358
|
+
}
|
|
11359
|
+
if (!$from.parent.isBlock)
|
|
11360
|
+
return false;
|
|
11361
|
+
if (dispatch) {
|
|
11362
|
+
let atEnd = $to.parentOffset == $to.parent.content.size;
|
|
11363
|
+
let tr2 = state.tr;
|
|
11364
|
+
if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
|
|
11365
|
+
tr2.deleteSelection();
|
|
11366
|
+
let deflt = $from.depth == 0 ? null : defaultBlockAt$1($from.node(-1).contentMatchAt($from.indexAfter(-1)));
|
|
11367
|
+
let types = atEnd && deflt ? [{ type: deflt }] : void 0;
|
|
11368
|
+
let can = canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, types);
|
|
11369
|
+
if (!types && !can && canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) {
|
|
11370
|
+
if (deflt)
|
|
11371
|
+
types = [{ type: deflt }];
|
|
11372
|
+
can = true;
|
|
11373
|
+
}
|
|
11374
|
+
if (can) {
|
|
11375
|
+
tr2.split(tr2.mapping.map($from.pos), 1, types);
|
|
11376
|
+
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) {
|
|
11377
|
+
let first2 = tr2.mapping.map($from.before()), $first = tr2.doc.resolve(first2);
|
|
11378
|
+
if (deflt && $from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt))
|
|
11379
|
+
tr2.setNodeMarkup(tr2.mapping.map($from.before()), deflt);
|
|
11380
|
+
}
|
|
11381
|
+
}
|
|
11382
|
+
dispatch(tr2.scrollIntoView());
|
|
11383
|
+
}
|
|
11384
|
+
return true;
|
|
11385
|
+
};
|
|
11386
|
+
}
|
|
11387
|
+
const splitBlock$1 = splitBlockAs();
|
|
11377
11388
|
const selectParentNode$1 = (state, dispatch) => {
|
|
11378
11389
|
let { $from, to } = state.selection, pos;
|
|
11379
11390
|
let same = $from.sharedDepth(to);
|
|
@@ -11511,6 +11522,19 @@ function setBlockType(nodeType, attrs = null) {
|
|
|
11511
11522
|
return true;
|
|
11512
11523
|
};
|
|
11513
11524
|
}
|
|
11525
|
+
function chainCommands(...commands2) {
|
|
11526
|
+
return function(state, dispatch, view) {
|
|
11527
|
+
for (let i = 0; i < commands2.length; i++)
|
|
11528
|
+
if (commands2[i](state, dispatch, view))
|
|
11529
|
+
return true;
|
|
11530
|
+
return false;
|
|
11531
|
+
};
|
|
11532
|
+
}
|
|
11533
|
+
chainCommands(deleteSelection$1, joinBackward$1, selectNodeBackward$1);
|
|
11534
|
+
chainCommands(deleteSelection$1, joinForward$1, selectNodeForward$1);
|
|
11535
|
+
({
|
|
11536
|
+
"Enter": chainCommands(newlineInCode$1, createParagraphNear$1, liftEmptyBlock$1, splitBlock$1)
|
|
11537
|
+
});
|
|
11514
11538
|
typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false;
|
|
11515
11539
|
function wrapInList$1(listType, attrs = null) {
|
|
11516
11540
|
return function(state, dispatch) {
|
|
@@ -14658,7 +14682,7 @@ img.ProseMirror-separator {
|
|
|
14658
14682
|
opacity: 0
|
|
14659
14683
|
}`;
|
|
14660
14684
|
function createStyleTag(style2, nonce, suffix) {
|
|
14661
|
-
const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${
|
|
14685
|
+
const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${""}]`);
|
|
14662
14686
|
if (tiptapStyleTag !== null) {
|
|
14663
14687
|
return tiptapStyleTag;
|
|
14664
14688
|
}
|
|
@@ -14666,7 +14690,7 @@ function createStyleTag(style2, nonce, suffix) {
|
|
|
14666
14690
|
if (nonce) {
|
|
14667
14691
|
styleNode.setAttribute("nonce", nonce);
|
|
14668
14692
|
}
|
|
14669
|
-
styleNode.setAttribute(`data-tiptap-style${
|
|
14693
|
+
styleNode.setAttribute(`data-tiptap-style${""}`, "");
|
|
14670
14694
|
styleNode.innerHTML = style2;
|
|
14671
14695
|
document.getElementsByTagName("head")[0].appendChild(styleNode);
|
|
14672
14696
|
return styleNode;
|
|
@@ -16050,7 +16074,6 @@ function detectOverflow(state, options) {
|
|
|
16050
16074
|
var popperOffsets2 = computeOffsets({
|
|
16051
16075
|
reference: referenceClientRect,
|
|
16052
16076
|
element: popperRect,
|
|
16053
|
-
strategy: "absolute",
|
|
16054
16077
|
placement
|
|
16055
16078
|
});
|
|
16056
16079
|
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
|
|
@@ -16184,8 +16207,7 @@ function flip(_ref) {
|
|
|
16184
16207
|
};
|
|
16185
16208
|
for (var _i = numberOfChecks; _i > 0; _i--) {
|
|
16186
16209
|
var _ret = _loop(_i);
|
|
16187
|
-
if (_ret === "break")
|
|
16188
|
-
break;
|
|
16210
|
+
if (_ret === "break") break;
|
|
16189
16211
|
}
|
|
16190
16212
|
}
|
|
16191
16213
|
if (state.placement !== firstFittingPlacement) {
|
|
@@ -16298,7 +16320,6 @@ function popperOffsets(_ref) {
|
|
|
16298
16320
|
state.modifiersData[name2] = computeOffsets({
|
|
16299
16321
|
reference: state.rects.reference,
|
|
16300
16322
|
element: state.rects.popper,
|
|
16301
|
-
strategy: "absolute",
|
|
16302
16323
|
placement: state.placement
|
|
16303
16324
|
});
|
|
16304
16325
|
}
|
|
@@ -16493,7 +16514,7 @@ function orderModifiers(modifiers2) {
|
|
|
16493
16514
|
}));
|
|
16494
16515
|
}, []);
|
|
16495
16516
|
}
|
|
16496
|
-
function debounce$
|
|
16517
|
+
function debounce$2(fn2) {
|
|
16497
16518
|
var pending;
|
|
16498
16519
|
return function() {
|
|
16499
16520
|
if (!pending) {
|
|
@@ -16614,7 +16635,7 @@ function popperGenerator(generatorOptions) {
|
|
|
16614
16635
|
},
|
|
16615
16636
|
// Async and optimistically optimized update – it will not be executed if
|
|
16616
16637
|
// not necessary (debounced to run at most once-per-tick)
|
|
16617
|
-
update: debounce$
|
|
16638
|
+
update: debounce$2(function() {
|
|
16618
16639
|
return new Promise(function(resolve) {
|
|
16619
16640
|
instance.forceUpdate();
|
|
16620
16641
|
resolve(state);
|
|
@@ -16674,7 +16695,7 @@ var TOUCH_OPTIONS = {
|
|
|
16674
16695
|
var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO2() {
|
|
16675
16696
|
return document.body;
|
|
16676
16697
|
};
|
|
16677
|
-
function hasOwnProperty
|
|
16698
|
+
function hasOwnProperty(obj, key) {
|
|
16678
16699
|
return {}.hasOwnProperty.call(obj, key);
|
|
16679
16700
|
}
|
|
16680
16701
|
function getValueAtIndexOrReturn(value, index, defaultValue) {
|
|
@@ -16691,7 +16712,7 @@ function isType(value, type2) {
|
|
|
16691
16712
|
function invokeWithArgsOrReturn(value, args) {
|
|
16692
16713
|
return typeof value === "function" ? value.apply(void 0, args) : value;
|
|
16693
16714
|
}
|
|
16694
|
-
function debounce$
|
|
16715
|
+
function debounce$1(fn2, ms) {
|
|
16695
16716
|
if (ms === 0) {
|
|
16696
16717
|
return fn2;
|
|
16697
16718
|
}
|
|
@@ -16840,12 +16861,12 @@ function onDocumentTouchStart() {
|
|
|
16840
16861
|
}
|
|
16841
16862
|
}
|
|
16842
16863
|
function onDocumentMouseMove() {
|
|
16843
|
-
var
|
|
16844
|
-
if (
|
|
16864
|
+
var now = performance.now();
|
|
16865
|
+
if (now - lastMouseMoveTime < 20) {
|
|
16845
16866
|
currentInput.isTouch = false;
|
|
16846
16867
|
document.removeEventListener("mousemove", onDocumentMouseMove);
|
|
16847
16868
|
}
|
|
16848
|
-
lastMouseMoveTime =
|
|
16869
|
+
lastMouseMoveTime = now;
|
|
16849
16870
|
}
|
|
16850
16871
|
function onWindowBlur() {
|
|
16851
16872
|
var activeElement = document.activeElement;
|
|
@@ -17046,7 +17067,7 @@ function validateProps(partialProps, plugins) {
|
|
|
17046
17067
|
var keys2 = Object.keys(partialProps);
|
|
17047
17068
|
keys2.forEach(function(prop) {
|
|
17048
17069
|
var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
|
|
17049
|
-
var didPassUnknownProp = !hasOwnProperty
|
|
17070
|
+
var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop);
|
|
17050
17071
|
if (didPassUnknownProp) {
|
|
17051
17072
|
didPassUnknownProp = plugins.filter(function(plugin) {
|
|
17052
17073
|
return plugin.name === prop;
|
|
@@ -17175,7 +17196,7 @@ function createTippy(reference2, passedProps) {
|
|
|
17175
17196
|
var currentTransitionEndListener;
|
|
17176
17197
|
var onFirstUpdate;
|
|
17177
17198
|
var listeners = [];
|
|
17178
|
-
var debouncedOnMouseMove = debounce$
|
|
17199
|
+
var debouncedOnMouseMove = debounce$1(onMouseMove, props.interactiveDebounce);
|
|
17179
17200
|
var currentTarget;
|
|
17180
17201
|
var id = idCounter++;
|
|
17181
17202
|
var popperInstance = null;
|
|
@@ -17710,7 +17731,7 @@ function createTippy(reference2, passedProps) {
|
|
|
17710
17731
|
addListeners();
|
|
17711
17732
|
if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
|
|
17712
17733
|
cleanupInteractiveMouseListeners();
|
|
17713
|
-
debouncedOnMouseMove = debounce$
|
|
17734
|
+
debouncedOnMouseMove = debounce$1(onMouseMove, nextProps.interactiveDebounce);
|
|
17714
17735
|
}
|
|
17715
17736
|
if (prevProps.triggerTarget && !nextProps.triggerTarget) {
|
|
17716
17737
|
normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
|
|
@@ -18296,13 +18317,13 @@ const BubbleMenu = defineComponent({
|
|
|
18296
18317
|
}
|
|
18297
18318
|
},
|
|
18298
18319
|
setup(props, { slots }) {
|
|
18299
|
-
const
|
|
18320
|
+
const root = ref(null);
|
|
18300
18321
|
onMounted(() => {
|
|
18301
18322
|
const { updateDelay, editor, pluginKey, shouldShow, tippyOptions } = props;
|
|
18302
18323
|
editor.registerPlugin(BubbleMenuPlugin({
|
|
18303
18324
|
updateDelay,
|
|
18304
18325
|
editor,
|
|
18305
|
-
element:
|
|
18326
|
+
element: root.value,
|
|
18306
18327
|
pluginKey,
|
|
18307
18328
|
shouldShow,
|
|
18308
18329
|
tippyOptions
|
|
@@ -18314,7 +18335,7 @@ const BubbleMenu = defineComponent({
|
|
|
18314
18335
|
});
|
|
18315
18336
|
return () => {
|
|
18316
18337
|
var _a;
|
|
18317
|
-
return h("div", { ref:
|
|
18338
|
+
return h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
|
|
18318
18339
|
};
|
|
18319
18340
|
}
|
|
18320
18341
|
});
|
|
@@ -18464,13 +18485,13 @@ defineComponent({
|
|
|
18464
18485
|
}
|
|
18465
18486
|
},
|
|
18466
18487
|
setup(props, { slots }) {
|
|
18467
|
-
const
|
|
18488
|
+
const root = ref(null);
|
|
18468
18489
|
onMounted(() => {
|
|
18469
18490
|
const { pluginKey, editor, tippyOptions, shouldShow } = props;
|
|
18470
18491
|
editor.registerPlugin(FloatingMenuPlugin({
|
|
18471
18492
|
pluginKey,
|
|
18472
18493
|
editor,
|
|
18473
|
-
element:
|
|
18494
|
+
element: root.value,
|
|
18474
18495
|
tippyOptions,
|
|
18475
18496
|
shouldShow
|
|
18476
18497
|
}));
|
|
@@ -18481,7 +18502,7 @@ defineComponent({
|
|
|
18481
18502
|
});
|
|
18482
18503
|
return () => {
|
|
18483
18504
|
var _a;
|
|
18484
|
-
return h("div", { ref:
|
|
18505
|
+
return h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
|
|
18485
18506
|
};
|
|
18486
18507
|
}
|
|
18487
18508
|
});
|
|
@@ -18540,199 +18561,298 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
18540
18561
|
function getDefaultExportFromCjs(x) {
|
|
18541
18562
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
18542
18563
|
}
|
|
18543
|
-
|
|
18544
|
-
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
var
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
var
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
var
|
|
18576
|
-
var
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
var
|
|
18581
|
-
function
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18564
|
+
var isObject_1;
|
|
18565
|
+
var hasRequiredIsObject;
|
|
18566
|
+
function requireIsObject() {
|
|
18567
|
+
if (hasRequiredIsObject) return isObject_1;
|
|
18568
|
+
hasRequiredIsObject = 1;
|
|
18569
|
+
function isObject(value) {
|
|
18570
|
+
var type2 = typeof value;
|
|
18571
|
+
return value != null && (type2 == "object" || type2 == "function");
|
|
18572
|
+
}
|
|
18573
|
+
isObject_1 = isObject;
|
|
18574
|
+
return isObject_1;
|
|
18575
|
+
}
|
|
18576
|
+
var _freeGlobal;
|
|
18577
|
+
var hasRequired_freeGlobal;
|
|
18578
|
+
function require_freeGlobal() {
|
|
18579
|
+
if (hasRequired_freeGlobal) return _freeGlobal;
|
|
18580
|
+
hasRequired_freeGlobal = 1;
|
|
18581
|
+
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
18582
|
+
_freeGlobal = freeGlobal;
|
|
18583
|
+
return _freeGlobal;
|
|
18584
|
+
}
|
|
18585
|
+
var _root;
|
|
18586
|
+
var hasRequired_root;
|
|
18587
|
+
function require_root() {
|
|
18588
|
+
if (hasRequired_root) return _root;
|
|
18589
|
+
hasRequired_root = 1;
|
|
18590
|
+
var freeGlobal = require_freeGlobal();
|
|
18591
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
18592
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
18593
|
+
_root = root;
|
|
18594
|
+
return _root;
|
|
18595
|
+
}
|
|
18596
|
+
var now_1;
|
|
18597
|
+
var hasRequiredNow;
|
|
18598
|
+
function requireNow() {
|
|
18599
|
+
if (hasRequiredNow) return now_1;
|
|
18600
|
+
hasRequiredNow = 1;
|
|
18601
|
+
var root = require_root();
|
|
18602
|
+
var now = function() {
|
|
18603
|
+
return root.Date.now();
|
|
18604
|
+
};
|
|
18605
|
+
now_1 = now;
|
|
18606
|
+
return now_1;
|
|
18607
|
+
}
|
|
18608
|
+
var _trimmedEndIndex;
|
|
18609
|
+
var hasRequired_trimmedEndIndex;
|
|
18610
|
+
function require_trimmedEndIndex() {
|
|
18611
|
+
if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
|
|
18612
|
+
hasRequired_trimmedEndIndex = 1;
|
|
18613
|
+
var reWhitespace = /\s/;
|
|
18614
|
+
function trimmedEndIndex(string) {
|
|
18615
|
+
var index = string.length;
|
|
18616
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
18617
|
+
}
|
|
18618
|
+
return index;
|
|
18619
|
+
}
|
|
18620
|
+
_trimmedEndIndex = trimmedEndIndex;
|
|
18621
|
+
return _trimmedEndIndex;
|
|
18622
|
+
}
|
|
18623
|
+
var _baseTrim;
|
|
18624
|
+
var hasRequired_baseTrim;
|
|
18625
|
+
function require_baseTrim() {
|
|
18626
|
+
if (hasRequired_baseTrim) return _baseTrim;
|
|
18627
|
+
hasRequired_baseTrim = 1;
|
|
18628
|
+
var trimmedEndIndex = require_trimmedEndIndex();
|
|
18629
|
+
var reTrimStart = /^\s+/;
|
|
18630
|
+
function baseTrim(string) {
|
|
18631
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
18632
|
+
}
|
|
18633
|
+
_baseTrim = baseTrim;
|
|
18634
|
+
return _baseTrim;
|
|
18635
|
+
}
|
|
18636
|
+
var _Symbol;
|
|
18637
|
+
var hasRequired_Symbol;
|
|
18638
|
+
function require_Symbol() {
|
|
18639
|
+
if (hasRequired_Symbol) return _Symbol;
|
|
18640
|
+
hasRequired_Symbol = 1;
|
|
18641
|
+
var root = require_root();
|
|
18642
|
+
var Symbol2 = root.Symbol;
|
|
18643
|
+
_Symbol = Symbol2;
|
|
18644
|
+
return _Symbol;
|
|
18645
|
+
}
|
|
18646
|
+
var _getRawTag;
|
|
18647
|
+
var hasRequired_getRawTag;
|
|
18648
|
+
function require_getRawTag() {
|
|
18649
|
+
if (hasRequired_getRawTag) return _getRawTag;
|
|
18650
|
+
hasRequired_getRawTag = 1;
|
|
18651
|
+
var Symbol2 = require_Symbol();
|
|
18652
|
+
var objectProto = Object.prototype;
|
|
18653
|
+
var hasOwnProperty2 = objectProto.hasOwnProperty;
|
|
18654
|
+
var nativeObjectToString = objectProto.toString;
|
|
18655
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
18656
|
+
function getRawTag(value) {
|
|
18657
|
+
var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
|
|
18658
|
+
try {
|
|
18659
|
+
value[symToStringTag] = void 0;
|
|
18660
|
+
var unmasked = true;
|
|
18661
|
+
} catch (e) {
|
|
18662
|
+
}
|
|
18663
|
+
var result = nativeObjectToString.call(value);
|
|
18664
|
+
if (unmasked) {
|
|
18665
|
+
if (isOwn) {
|
|
18666
|
+
value[symToStringTag] = tag;
|
|
18667
|
+
} else {
|
|
18668
|
+
delete value[symToStringTag];
|
|
18669
|
+
}
|
|
18594
18670
|
}
|
|
18595
|
-
}
|
|
18596
|
-
return result;
|
|
18597
|
-
}
|
|
18598
|
-
var _getRawTag = getRawTag$1;
|
|
18599
|
-
var objectProto = Object.prototype;
|
|
18600
|
-
var nativeObjectToString = objectProto.toString;
|
|
18601
|
-
function objectToString$1(value) {
|
|
18602
|
-
return nativeObjectToString.call(value);
|
|
18603
|
-
}
|
|
18604
|
-
var _objectToString = objectToString$1;
|
|
18605
|
-
var Symbol$1 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
18606
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
18607
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
18608
|
-
function baseGetTag$1(value) {
|
|
18609
|
-
if (value == null) {
|
|
18610
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
18611
|
-
}
|
|
18612
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
18613
|
-
}
|
|
18614
|
-
var _baseGetTag = baseGetTag$1;
|
|
18615
|
-
function isObjectLike$1(value) {
|
|
18616
|
-
return value != null && typeof value == "object";
|
|
18617
|
-
}
|
|
18618
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
18619
|
-
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
18620
|
-
var symbolTag = "[object Symbol]";
|
|
18621
|
-
function isSymbol$1(value) {
|
|
18622
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
18623
|
-
}
|
|
18624
|
-
var isSymbol_1 = isSymbol$1;
|
|
18625
|
-
var baseTrim = _baseTrim, isObject$1 = isObject_1, isSymbol = isSymbol_1;
|
|
18626
|
-
var NAN = 0 / 0;
|
|
18627
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
18628
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
18629
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
18630
|
-
var freeParseInt = parseInt;
|
|
18631
|
-
function toNumber$1(value) {
|
|
18632
|
-
if (typeof value == "number") {
|
|
18633
|
-
return value;
|
|
18634
|
-
}
|
|
18635
|
-
if (isSymbol(value)) {
|
|
18636
|
-
return NAN;
|
|
18637
|
-
}
|
|
18638
|
-
if (isObject$1(value)) {
|
|
18639
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
18640
|
-
value = isObject$1(other) ? other + "" : other;
|
|
18641
|
-
}
|
|
18642
|
-
if (typeof value != "string") {
|
|
18643
|
-
return value === 0 ? value : +value;
|
|
18644
|
-
}
|
|
18645
|
-
value = baseTrim(value);
|
|
18646
|
-
var isBinary = reIsBinary.test(value);
|
|
18647
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
18648
|
-
}
|
|
18649
|
-
var toNumber_1 = toNumber$1;
|
|
18650
|
-
var isObject = isObject_1, now = now_1, toNumber = toNumber_1;
|
|
18651
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
18652
|
-
var nativeMax = Math.max, nativeMin = Math.min;
|
|
18653
|
-
function debounce(func, wait, options) {
|
|
18654
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
18655
|
-
if (typeof func != "function") {
|
|
18656
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
18657
|
-
}
|
|
18658
|
-
wait = toNumber(wait) || 0;
|
|
18659
|
-
if (isObject(options)) {
|
|
18660
|
-
leading = !!options.leading;
|
|
18661
|
-
maxing = "maxWait" in options;
|
|
18662
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
18663
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18664
|
-
}
|
|
18665
|
-
function invokeFunc(time) {
|
|
18666
|
-
var args = lastArgs, thisArg = lastThis;
|
|
18667
|
-
lastArgs = lastThis = void 0;
|
|
18668
|
-
lastInvokeTime = time;
|
|
18669
|
-
result = func.apply(thisArg, args);
|
|
18670
18671
|
return result;
|
|
18671
18672
|
}
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
return
|
|
18684
|
-
}
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18673
|
+
_getRawTag = getRawTag;
|
|
18674
|
+
return _getRawTag;
|
|
18675
|
+
}
|
|
18676
|
+
var _objectToString;
|
|
18677
|
+
var hasRequired_objectToString;
|
|
18678
|
+
function require_objectToString() {
|
|
18679
|
+
if (hasRequired_objectToString) return _objectToString;
|
|
18680
|
+
hasRequired_objectToString = 1;
|
|
18681
|
+
var objectProto = Object.prototype;
|
|
18682
|
+
var nativeObjectToString = objectProto.toString;
|
|
18683
|
+
function objectToString(value) {
|
|
18684
|
+
return nativeObjectToString.call(value);
|
|
18685
|
+
}
|
|
18686
|
+
_objectToString = objectToString;
|
|
18687
|
+
return _objectToString;
|
|
18688
|
+
}
|
|
18689
|
+
var _baseGetTag;
|
|
18690
|
+
var hasRequired_baseGetTag;
|
|
18691
|
+
function require_baseGetTag() {
|
|
18692
|
+
if (hasRequired_baseGetTag) return _baseGetTag;
|
|
18693
|
+
hasRequired_baseGetTag = 1;
|
|
18694
|
+
var Symbol2 = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString();
|
|
18695
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
18696
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
18697
|
+
function baseGetTag(value) {
|
|
18698
|
+
if (value == null) {
|
|
18699
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
18700
|
+
}
|
|
18701
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
18702
|
+
}
|
|
18703
|
+
_baseGetTag = baseGetTag;
|
|
18704
|
+
return _baseGetTag;
|
|
18705
|
+
}
|
|
18706
|
+
var isObjectLike_1;
|
|
18707
|
+
var hasRequiredIsObjectLike;
|
|
18708
|
+
function requireIsObjectLike() {
|
|
18709
|
+
if (hasRequiredIsObjectLike) return isObjectLike_1;
|
|
18710
|
+
hasRequiredIsObjectLike = 1;
|
|
18711
|
+
function isObjectLike(value) {
|
|
18712
|
+
return value != null && typeof value == "object";
|
|
18713
|
+
}
|
|
18714
|
+
isObjectLike_1 = isObjectLike;
|
|
18715
|
+
return isObjectLike_1;
|
|
18716
|
+
}
|
|
18717
|
+
var isSymbol_1;
|
|
18718
|
+
var hasRequiredIsSymbol;
|
|
18719
|
+
function requireIsSymbol() {
|
|
18720
|
+
if (hasRequiredIsSymbol) return isSymbol_1;
|
|
18721
|
+
hasRequiredIsSymbol = 1;
|
|
18722
|
+
var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike();
|
|
18723
|
+
var symbolTag = "[object Symbol]";
|
|
18724
|
+
function isSymbol(value) {
|
|
18725
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
18726
|
+
}
|
|
18727
|
+
isSymbol_1 = isSymbol;
|
|
18728
|
+
return isSymbol_1;
|
|
18729
|
+
}
|
|
18730
|
+
var toNumber_1;
|
|
18731
|
+
var hasRequiredToNumber;
|
|
18732
|
+
function requireToNumber() {
|
|
18733
|
+
if (hasRequiredToNumber) return toNumber_1;
|
|
18734
|
+
hasRequiredToNumber = 1;
|
|
18735
|
+
var baseTrim = require_baseTrim(), isObject = requireIsObject(), isSymbol = requireIsSymbol();
|
|
18736
|
+
var NAN = 0 / 0;
|
|
18737
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
18738
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
18739
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
18740
|
+
var freeParseInt = parseInt;
|
|
18741
|
+
function toNumber(value) {
|
|
18742
|
+
if (typeof value == "number") {
|
|
18743
|
+
return value;
|
|
18689
18744
|
}
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18745
|
+
if (isSymbol(value)) {
|
|
18746
|
+
return NAN;
|
|
18747
|
+
}
|
|
18748
|
+
if (isObject(value)) {
|
|
18749
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
18750
|
+
value = isObject(other) ? other + "" : other;
|
|
18751
|
+
}
|
|
18752
|
+
if (typeof value != "string") {
|
|
18753
|
+
return value === 0 ? value : +value;
|
|
18754
|
+
}
|
|
18755
|
+
value = baseTrim(value);
|
|
18756
|
+
var isBinary = reIsBinary.test(value);
|
|
18757
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
18758
|
+
}
|
|
18759
|
+
toNumber_1 = toNumber;
|
|
18760
|
+
return toNumber_1;
|
|
18761
|
+
}
|
|
18762
|
+
var debounce_1;
|
|
18763
|
+
var hasRequiredDebounce;
|
|
18764
|
+
function requireDebounce() {
|
|
18765
|
+
if (hasRequiredDebounce) return debounce_1;
|
|
18766
|
+
hasRequiredDebounce = 1;
|
|
18767
|
+
var isObject = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
|
|
18768
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
18769
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
18770
|
+
function debounce2(func, wait, options) {
|
|
18771
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
18772
|
+
if (typeof func != "function") {
|
|
18773
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
18774
|
+
}
|
|
18775
|
+
wait = toNumber(wait) || 0;
|
|
18776
|
+
if (isObject(options)) {
|
|
18777
|
+
leading = !!options.leading;
|
|
18778
|
+
maxing = "maxWait" in options;
|
|
18779
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
18780
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18781
|
+
}
|
|
18782
|
+
function invokeFunc(time) {
|
|
18783
|
+
var args = lastArgs, thisArg = lastThis;
|
|
18784
|
+
lastArgs = lastThis = void 0;
|
|
18785
|
+
lastInvokeTime = time;
|
|
18786
|
+
result = func.apply(thisArg, args);
|
|
18787
|
+
return result;
|
|
18696
18788
|
}
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
if (timerId !== void 0) {
|
|
18702
|
-
clearTimeout(timerId);
|
|
18789
|
+
function leadingEdge(time) {
|
|
18790
|
+
lastInvokeTime = time;
|
|
18791
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18792
|
+
return leading ? invokeFunc(time) : result;
|
|
18703
18793
|
}
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18794
|
+
function remainingWait(time) {
|
|
18795
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
18796
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
18797
|
+
}
|
|
18798
|
+
function shouldInvoke(time) {
|
|
18799
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
18800
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
18801
|
+
}
|
|
18802
|
+
function timerExpired() {
|
|
18803
|
+
var time = now();
|
|
18804
|
+
if (shouldInvoke(time)) {
|
|
18805
|
+
return trailingEdge(time);
|
|
18806
|
+
}
|
|
18807
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
18808
|
+
}
|
|
18809
|
+
function trailingEdge(time) {
|
|
18810
|
+
timerId = void 0;
|
|
18811
|
+
if (trailing && lastArgs) {
|
|
18812
|
+
return invokeFunc(time);
|
|
18718
18813
|
}
|
|
18719
|
-
|
|
18814
|
+
lastArgs = lastThis = void 0;
|
|
18815
|
+
return result;
|
|
18816
|
+
}
|
|
18817
|
+
function cancel() {
|
|
18818
|
+
if (timerId !== void 0) {
|
|
18720
18819
|
clearTimeout(timerId);
|
|
18721
|
-
timerId = setTimeout(timerExpired, wait);
|
|
18722
|
-
return invokeFunc(lastCallTime);
|
|
18723
18820
|
}
|
|
18821
|
+
lastInvokeTime = 0;
|
|
18822
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
18724
18823
|
}
|
|
18725
|
-
|
|
18726
|
-
timerId
|
|
18824
|
+
function flush() {
|
|
18825
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
18727
18826
|
}
|
|
18728
|
-
|
|
18827
|
+
function debounced() {
|
|
18828
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
18829
|
+
lastArgs = arguments;
|
|
18830
|
+
lastThis = this;
|
|
18831
|
+
lastCallTime = time;
|
|
18832
|
+
if (isInvoking) {
|
|
18833
|
+
if (timerId === void 0) {
|
|
18834
|
+
return leadingEdge(lastCallTime);
|
|
18835
|
+
}
|
|
18836
|
+
if (maxing) {
|
|
18837
|
+
clearTimeout(timerId);
|
|
18838
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18839
|
+
return invokeFunc(lastCallTime);
|
|
18840
|
+
}
|
|
18841
|
+
}
|
|
18842
|
+
if (timerId === void 0) {
|
|
18843
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18844
|
+
}
|
|
18845
|
+
return result;
|
|
18846
|
+
}
|
|
18847
|
+
debounced.cancel = cancel;
|
|
18848
|
+
debounced.flush = flush;
|
|
18849
|
+
return debounced;
|
|
18729
18850
|
}
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
return debounced;
|
|
18851
|
+
debounce_1 = debounce2;
|
|
18852
|
+
return debounce_1;
|
|
18733
18853
|
}
|
|
18734
|
-
var
|
|
18735
|
-
const debounce
|
|
18854
|
+
var debounceExports = requireDebounce();
|
|
18855
|
+
const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
|
|
18736
18856
|
const TextStyle$2 = Mark2.create({
|
|
18737
18857
|
name: "textStyle",
|
|
18738
18858
|
addOptions() {
|
|
@@ -19667,42 +19787,41 @@ class GapCursor extends Selection {
|
|
|
19667
19787
|
@internal
|
|
19668
19788
|
*/
|
|
19669
19789
|
static findGapCursorFrom($pos, dir, mustMove = false) {
|
|
19670
|
-
search:
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
return null;
|
|
19682
|
-
}
|
|
19683
|
-
pos += dir;
|
|
19684
|
-
let $cur = $pos.doc.resolve(pos);
|
|
19685
|
-
if (GapCursor.valid($cur))
|
|
19686
|
-
return $cur;
|
|
19790
|
+
search: for (; ; ) {
|
|
19791
|
+
if (!mustMove && GapCursor.valid($pos))
|
|
19792
|
+
return $pos;
|
|
19793
|
+
let pos = $pos.pos, next = null;
|
|
19794
|
+
for (let d = $pos.depth; ; d--) {
|
|
19795
|
+
let parent = $pos.node(d);
|
|
19796
|
+
if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
|
|
19797
|
+
next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
|
|
19798
|
+
break;
|
|
19799
|
+
} else if (d == 0) {
|
|
19800
|
+
return null;
|
|
19687
19801
|
}
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
|
|
19802
|
+
pos += dir;
|
|
19803
|
+
let $cur = $pos.doc.resolve(pos);
|
|
19804
|
+
if (GapCursor.valid($cur))
|
|
19805
|
+
return $cur;
|
|
19806
|
+
}
|
|
19807
|
+
for (; ; ) {
|
|
19808
|
+
let inside = dir > 0 ? next.firstChild : next.lastChild;
|
|
19809
|
+
if (!inside) {
|
|
19810
|
+
if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
|
|
19811
|
+
$pos = $pos.doc.resolve(pos + next.nodeSize * dir);
|
|
19812
|
+
mustMove = false;
|
|
19813
|
+
continue search;
|
|
19697
19814
|
}
|
|
19698
|
-
|
|
19699
|
-
pos += dir;
|
|
19700
|
-
let $cur = $pos.doc.resolve(pos);
|
|
19701
|
-
if (GapCursor.valid($cur))
|
|
19702
|
-
return $cur;
|
|
19815
|
+
break;
|
|
19703
19816
|
}
|
|
19704
|
-
|
|
19817
|
+
next = inside;
|
|
19818
|
+
pos += dir;
|
|
19819
|
+
let $cur = $pos.doc.resolve(pos);
|
|
19820
|
+
if (GapCursor.valid($cur))
|
|
19821
|
+
return $cur;
|
|
19705
19822
|
}
|
|
19823
|
+
return null;
|
|
19824
|
+
}
|
|
19706
19825
|
}
|
|
19707
19826
|
}
|
|
19708
19827
|
GapCursor.prototype.visible = false;
|
|
@@ -19985,10 +20104,8 @@ RopeSequence.prototype.appendInner = function appendInner(other) {
|
|
|
19985
20104
|
return new Append(this, other);
|
|
19986
20105
|
};
|
|
19987
20106
|
RopeSequence.prototype.slice = function slice(from2, to) {
|
|
19988
|
-
if (from2 === void 0)
|
|
19989
|
-
|
|
19990
|
-
if (to === void 0)
|
|
19991
|
-
to = this.length;
|
|
20107
|
+
if (from2 === void 0) from2 = 0;
|
|
20108
|
+
if (to === void 0) to = this.length;
|
|
19992
20109
|
if (from2 >= to) {
|
|
19993
20110
|
return RopeSequence.empty;
|
|
19994
20111
|
}
|
|
@@ -20001,10 +20118,8 @@ RopeSequence.prototype.get = function get(i) {
|
|
|
20001
20118
|
return this.getInner(i);
|
|
20002
20119
|
};
|
|
20003
20120
|
RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
|
|
20004
|
-
if (from2 === void 0)
|
|
20005
|
-
|
|
20006
|
-
if (to === void 0)
|
|
20007
|
-
to = this.length;
|
|
20121
|
+
if (from2 === void 0) from2 = 0;
|
|
20122
|
+
if (to === void 0) to = this.length;
|
|
20008
20123
|
if (from2 <= to) {
|
|
20009
20124
|
this.forEachInner(f, from2, to, 0);
|
|
20010
20125
|
} else {
|
|
@@ -20012,10 +20127,8 @@ RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
|
|
|
20012
20127
|
}
|
|
20013
20128
|
};
|
|
20014
20129
|
RopeSequence.prototype.map = function map(f, from2, to) {
|
|
20015
|
-
if (from2 === void 0)
|
|
20016
|
-
|
|
20017
|
-
if (to === void 0)
|
|
20018
|
-
to = this.length;
|
|
20130
|
+
if (from2 === void 0) from2 = 0;
|
|
20131
|
+
if (to === void 0) to = this.length;
|
|
20019
20132
|
var result = [];
|
|
20020
20133
|
this.forEach(function(elt, i) {
|
|
20021
20134
|
return result.push(f(elt, i));
|
|
@@ -20033,8 +20146,7 @@ var Leaf = /* @__PURE__ */ function(RopeSequence3) {
|
|
|
20033
20146
|
RopeSequence3.call(this);
|
|
20034
20147
|
this.values = values;
|
|
20035
20148
|
}
|
|
20036
|
-
if (RopeSequence3)
|
|
20037
|
-
Leaf2.__proto__ = RopeSequence3;
|
|
20149
|
+
if (RopeSequence3) Leaf2.__proto__ = RopeSequence3;
|
|
20038
20150
|
Leaf2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
|
|
20039
20151
|
Leaf2.prototype.constructor = Leaf2;
|
|
20040
20152
|
var prototypeAccessors = { length: { configurable: true }, depth: { configurable: true } };
|
|
@@ -20092,8 +20204,7 @@ var Append = /* @__PURE__ */ function(RopeSequence3) {
|
|
|
20092
20204
|
this.length = left2.length + right2.length;
|
|
20093
20205
|
this.depth = Math.max(left2.depth, right2.depth) + 1;
|
|
20094
20206
|
}
|
|
20095
|
-
if (RopeSequence3)
|
|
20096
|
-
Append2.__proto__ = RopeSequence3;
|
|
20207
|
+
if (RopeSequence3) Append2.__proto__ = RopeSequence3;
|
|
20097
20208
|
Append2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
|
|
20098
20209
|
Append2.prototype.constructor = Append2;
|
|
20099
20210
|
Append2.prototype.flatten = function flatten() {
|
|
@@ -23399,9 +23510,6 @@ function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
|
|
|
23399
23510
|
return { colgroup, tableWidth, tableMinWidth };
|
|
23400
23511
|
}
|
|
23401
23512
|
function createCell(cellType, cellContent) {
|
|
23402
|
-
if (cellContent) {
|
|
23403
|
-
return cellType.createChecked(null, cellContent);
|
|
23404
|
-
}
|
|
23405
23513
|
return cellType.createAndFill();
|
|
23406
23514
|
}
|
|
23407
23515
|
function getTableNodeTypes(schema) {
|
|
@@ -23423,12 +23531,12 @@ function createTable(schema, rowsCount, colsCount, withHeaderRow, cellContent) {
|
|
|
23423
23531
|
const headerCells = [];
|
|
23424
23532
|
const cells = [];
|
|
23425
23533
|
for (let index = 0; index < colsCount; index += 1) {
|
|
23426
|
-
const cell = createCell(types.cell
|
|
23534
|
+
const cell = createCell(types.cell);
|
|
23427
23535
|
if (cell) {
|
|
23428
23536
|
cells.push(cell);
|
|
23429
23537
|
}
|
|
23430
23538
|
if (withHeaderRow) {
|
|
23431
|
-
const headerCell = createCell(types.header_cell
|
|
23539
|
+
const headerCell = createCell(types.header_cell);
|
|
23432
23540
|
if (headerCell) {
|
|
23433
23541
|
headerCells.push(headerCell);
|
|
23434
23542
|
}
|
|
@@ -23822,8 +23930,7 @@ const FontSize$1 = Extension.create({
|
|
|
23822
23930
|
fontSize: {
|
|
23823
23931
|
default: null,
|
|
23824
23932
|
renderHTML: (attributes) => {
|
|
23825
|
-
if (!attributes.fontSize)
|
|
23826
|
-
return {};
|
|
23933
|
+
if (!attributes.fontSize) return {};
|
|
23827
23934
|
return {
|
|
23828
23935
|
style: `font-size: ${attributes.fontSize};`
|
|
23829
23936
|
};
|
|
@@ -23919,8 +24026,7 @@ const Image = Image$1.configure({ inline: true }).extend({
|
|
|
23919
24026
|
width: {
|
|
23920
24027
|
default: null,
|
|
23921
24028
|
renderHTML: ({ width }) => {
|
|
23922
|
-
if (!width)
|
|
23923
|
-
return {};
|
|
24029
|
+
if (!width) return {};
|
|
23924
24030
|
return { style: `width: ${width};` };
|
|
23925
24031
|
},
|
|
23926
24032
|
parseHTML: (element) => element.style.width.replace(/['"]+/g, "")
|
|
@@ -24265,8 +24371,8 @@ var tk = /* @__PURE__ */ Object.freeze({
|
|
|
24265
24371
|
SYM
|
|
24266
24372
|
});
|
|
24267
24373
|
const ASCII_LETTER = /[a-z]/;
|
|
24268
|
-
const LETTER =
|
|
24269
|
-
const EMOJI =
|
|
24374
|
+
const LETTER = new RegExp("\\p{L}", "u");
|
|
24375
|
+
const EMOJI = new RegExp("\\p{Emoji}", "u");
|
|
24270
24376
|
const DIGIT = /\d/;
|
|
24271
24377
|
const SPACE = /\s/;
|
|
24272
24378
|
const NL = "\n";
|
|
@@ -25412,7 +25518,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
25412
25518
|
};
|
|
25413
25519
|
}
|
|
25414
25520
|
});
|
|
25415
|
-
const IconButton_vue_vue_type_style_index_0_scoped_5f000959_lang = "";
|
|
25416
25521
|
const _export_sfc = (sfc, props) => {
|
|
25417
25522
|
const target = sfc.__vccOpts || sfc;
|
|
25418
25523
|
for (const [key, val] of props) {
|
|
@@ -25427,12 +25532,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25427
25532
|
editor: {}
|
|
25428
25533
|
},
|
|
25429
25534
|
setup(__props) {
|
|
25430
|
-
const props = __props;
|
|
25431
25535
|
const sizes = [
|
|
25432
25536
|
{ width: "25%", label: "Small", icon: "mdi-size-s" },
|
|
25433
25537
|
{ width: "50%", label: "Medium", icon: "mdi-size-m" },
|
|
25434
25538
|
{ width: "100%", label: "Large", icon: "mdi-size-xl" }
|
|
25435
25539
|
];
|
|
25540
|
+
const props = __props;
|
|
25436
25541
|
function setWidth(value) {
|
|
25437
25542
|
const current = props.editor.getAttributes("image").width;
|
|
25438
25543
|
const width = current !== value ? value : void 0;
|
|
@@ -25476,7 +25581,6 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25476
25581
|
};
|
|
25477
25582
|
}
|
|
25478
25583
|
});
|
|
25479
|
-
const ImageMenu_vue_vue_type_style_index_0_scoped_cb530515_lang = "";
|
|
25480
25584
|
const ImageMenu = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cb530515"]]);
|
|
25481
25585
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
25482
25586
|
__name: "TableMenu",
|
|
@@ -25577,7 +25681,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
25577
25681
|
};
|
|
25578
25682
|
}
|
|
25579
25683
|
});
|
|
25580
|
-
const TableMenu_vue_vue_type_style_index_0_scoped_e73020ec_lang = "";
|
|
25581
25684
|
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e73020ec"]]);
|
|
25582
25685
|
const _hoisted_1$3 = { class: "tce-container" };
|
|
25583
25686
|
const SAVE_DEBOUNCE = 3e3;
|
|
@@ -25589,34 +25692,41 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
25589
25692
|
isDisabled: { type: Boolean }
|
|
25590
25693
|
},
|
|
25591
25694
|
emits: ["save"],
|
|
25592
|
-
setup(__props, { emit }) {
|
|
25695
|
+
setup(__props, { emit: __emit }) {
|
|
25593
25696
|
const props = __props;
|
|
25697
|
+
const emit = __emit;
|
|
25594
25698
|
const elementBus = inject("$elementBus");
|
|
25595
25699
|
const editor = useEditor({
|
|
25596
25700
|
content: props.element.data.content,
|
|
25597
25701
|
extensions,
|
|
25598
25702
|
editable: !props.isDisabled && props.isFocused,
|
|
25599
|
-
onUpdate: debounce
|
|
25600
|
-
const content = editor2.isEmpty ? "" : editor2.getHTML();
|
|
25601
|
-
return emit("save", { content });
|
|
25602
|
-
}, SAVE_DEBOUNCE)
|
|
25703
|
+
onUpdate: debounce(() => save(), SAVE_DEBOUNCE)
|
|
25603
25704
|
});
|
|
25705
|
+
const save = () => {
|
|
25706
|
+
var _a, _b;
|
|
25707
|
+
const content = ((_a = editor.value) == null ? void 0 : _a.isEmpty) ? "" : (_b = editor.value) == null ? void 0 : _b.getHTML();
|
|
25708
|
+
return emit("save", { content });
|
|
25709
|
+
};
|
|
25604
25710
|
watch(
|
|
25605
25711
|
() => props.isFocused,
|
|
25606
25712
|
() => {
|
|
25607
25713
|
var _a, _b;
|
|
25608
|
-
const
|
|
25609
|
-
(_a = editor.value) == null ? void 0 : _a.setOptions({ editable });
|
|
25610
|
-
if (
|
|
25714
|
+
const { isDisabled, isFocused } = props;
|
|
25715
|
+
(_a = editor.value) == null ? void 0 : _a.setOptions({ editable: !isDisabled && isFocused });
|
|
25716
|
+
if (!isFocused) return save();
|
|
25717
|
+
if (!isDisabled) {
|
|
25611
25718
|
(_b = editor.value) == null ? void 0 : _b.commands.focus();
|
|
25612
|
-
|
|
25719
|
+
nextTick(() => elementBus.emit("initialize", editor.value));
|
|
25720
|
+
}
|
|
25613
25721
|
}
|
|
25614
25722
|
);
|
|
25615
25723
|
watch(
|
|
25616
25724
|
() => props.element.data.content,
|
|
25617
25725
|
(value) => {
|
|
25618
25726
|
var _a;
|
|
25619
|
-
|
|
25727
|
+
if (!editor.value) return;
|
|
25728
|
+
const isSame = editor.value.getHTML() === value;
|
|
25729
|
+
return !isSame && ((_a = editor.value) == null ? void 0 : _a.commands.setContent(value, false));
|
|
25620
25730
|
}
|
|
25621
25731
|
);
|
|
25622
25732
|
return (_ctx, _cache) => {
|
|
@@ -25637,366 +25747,378 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
25637
25747
|
};
|
|
25638
25748
|
}
|
|
25639
25749
|
});
|
|
25640
|
-
const
|
|
25641
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c2fe9392"]]);
|
|
25750
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-8f503238"]]);
|
|
25642
25751
|
var isURL$1 = { exports: {} };
|
|
25643
25752
|
var assertString = { exports: {} };
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
exports
|
|
25649
|
-
|
|
25650
|
-
|
|
25651
|
-
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25655
|
-
|
|
25656
|
-
|
|
25657
|
-
|
|
25658
|
-
|
|
25753
|
+
var hasRequiredAssertString;
|
|
25754
|
+
function requireAssertString() {
|
|
25755
|
+
if (hasRequiredAssertString) return assertString.exports;
|
|
25756
|
+
hasRequiredAssertString = 1;
|
|
25757
|
+
(function(module, exports) {
|
|
25758
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25759
|
+
value: true
|
|
25760
|
+
});
|
|
25761
|
+
exports.default = assertString2;
|
|
25762
|
+
function _typeof(obj) {
|
|
25763
|
+
"@babel/helpers - typeof";
|
|
25764
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
25765
|
+
_typeof = function _typeof2(obj2) {
|
|
25766
|
+
return typeof obj2;
|
|
25767
|
+
};
|
|
25768
|
+
} else {
|
|
25769
|
+
_typeof = function _typeof2(obj2) {
|
|
25770
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
25771
|
+
};
|
|
25772
|
+
}
|
|
25773
|
+
return _typeof(obj);
|
|
25659
25774
|
}
|
|
25660
|
-
|
|
25661
|
-
|
|
25662
|
-
|
|
25663
|
-
|
|
25664
|
-
|
|
25665
|
-
|
|
25666
|
-
|
|
25667
|
-
|
|
25668
|
-
else if (invalidType === "object")
|
|
25669
|
-
invalidType = input.constructor.name;
|
|
25670
|
-
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
25775
|
+
function assertString2(input) {
|
|
25776
|
+
var isString = typeof input === "string" || input instanceof String;
|
|
25777
|
+
if (!isString) {
|
|
25778
|
+
var invalidType = _typeof(input);
|
|
25779
|
+
if (input === null) invalidType = "null";
|
|
25780
|
+
else if (invalidType === "object") invalidType = input.constructor.name;
|
|
25781
|
+
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
25782
|
+
}
|
|
25671
25783
|
}
|
|
25672
|
-
|
|
25673
|
-
|
|
25674
|
-
|
|
25675
|
-
|
|
25676
|
-
|
|
25784
|
+
module.exports = exports.default;
|
|
25785
|
+
module.exports.default = exports.default;
|
|
25786
|
+
})(assertString, assertString.exports);
|
|
25787
|
+
return assertString.exports;
|
|
25788
|
+
}
|
|
25677
25789
|
var isFQDN = { exports: {} };
|
|
25678
25790
|
var merge = { exports: {} };
|
|
25679
|
-
|
|
25680
|
-
|
|
25681
|
-
|
|
25682
|
-
|
|
25683
|
-
exports
|
|
25684
|
-
|
|
25685
|
-
|
|
25686
|
-
|
|
25687
|
-
|
|
25688
|
-
|
|
25689
|
-
|
|
25791
|
+
var hasRequiredMerge;
|
|
25792
|
+
function requireMerge() {
|
|
25793
|
+
if (hasRequiredMerge) return merge.exports;
|
|
25794
|
+
hasRequiredMerge = 1;
|
|
25795
|
+
(function(module, exports) {
|
|
25796
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25797
|
+
value: true
|
|
25798
|
+
});
|
|
25799
|
+
exports.default = merge2;
|
|
25800
|
+
function merge2() {
|
|
25801
|
+
var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
25802
|
+
var defaults2 = arguments.length > 1 ? arguments[1] : void 0;
|
|
25803
|
+
for (var key in defaults2) {
|
|
25804
|
+
if (typeof obj[key] === "undefined") {
|
|
25805
|
+
obj[key] = defaults2[key];
|
|
25806
|
+
}
|
|
25690
25807
|
}
|
|
25808
|
+
return obj;
|
|
25691
25809
|
}
|
|
25692
|
-
|
|
25693
|
-
|
|
25694
|
-
|
|
25695
|
-
|
|
25696
|
-
}
|
|
25697
|
-
var
|
|
25698
|
-
|
|
25699
|
-
|
|
25700
|
-
|
|
25701
|
-
|
|
25702
|
-
|
|
25703
|
-
|
|
25704
|
-
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
|
|
25709
|
-
|
|
25710
|
-
|
|
25711
|
-
|
|
25712
|
-
|
|
25713
|
-
|
|
25714
|
-
|
|
25715
|
-
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25720
|
-
|
|
25721
|
-
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25725
|
-
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
|
|
25729
|
-
|
|
25810
|
+
module.exports = exports.default;
|
|
25811
|
+
module.exports.default = exports.default;
|
|
25812
|
+
})(merge, merge.exports);
|
|
25813
|
+
return merge.exports;
|
|
25814
|
+
}
|
|
25815
|
+
var hasRequiredIsFQDN;
|
|
25816
|
+
function requireIsFQDN() {
|
|
25817
|
+
if (hasRequiredIsFQDN) return isFQDN.exports;
|
|
25818
|
+
hasRequiredIsFQDN = 1;
|
|
25819
|
+
(function(module, exports) {
|
|
25820
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25821
|
+
value: true
|
|
25822
|
+
});
|
|
25823
|
+
exports.default = isFQDN2;
|
|
25824
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25825
|
+
var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
|
|
25826
|
+
function _interopRequireDefault(obj) {
|
|
25827
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25828
|
+
}
|
|
25829
|
+
var default_fqdn_options = {
|
|
25830
|
+
require_tld: true,
|
|
25831
|
+
allow_underscores: false,
|
|
25832
|
+
allow_trailing_dot: false,
|
|
25833
|
+
allow_numeric_tld: false,
|
|
25834
|
+
allow_wildcard: false,
|
|
25835
|
+
ignore_max_length: false
|
|
25836
|
+
};
|
|
25837
|
+
function isFQDN2(str, options) {
|
|
25838
|
+
(0, _assertString.default)(str);
|
|
25839
|
+
options = (0, _merge.default)(options, default_fqdn_options);
|
|
25840
|
+
if (options.allow_trailing_dot && str[str.length - 1] === ".") {
|
|
25841
|
+
str = str.substring(0, str.length - 1);
|
|
25842
|
+
}
|
|
25843
|
+
if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
|
|
25844
|
+
str = str.substring(2);
|
|
25845
|
+
}
|
|
25846
|
+
var parts = str.split(".");
|
|
25847
|
+
var tld = parts[parts.length - 1];
|
|
25848
|
+
if (options.require_tld) {
|
|
25849
|
+
if (parts.length < 2) {
|
|
25850
|
+
return false;
|
|
25851
|
+
}
|
|
25852
|
+
if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
|
25853
|
+
return false;
|
|
25854
|
+
}
|
|
25855
|
+
if (/\s/.test(tld)) {
|
|
25856
|
+
return false;
|
|
25857
|
+
}
|
|
25730
25858
|
}
|
|
25731
|
-
if (!options.allow_numeric_tld &&
|
|
25859
|
+
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
|
25732
25860
|
return false;
|
|
25733
25861
|
}
|
|
25734
|
-
|
|
25735
|
-
|
|
25862
|
+
return parts.every(function(part) {
|
|
25863
|
+
if (part.length > 63 && !options.ignore_max_length) {
|
|
25864
|
+
return false;
|
|
25865
|
+
}
|
|
25866
|
+
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
|
25867
|
+
return false;
|
|
25868
|
+
}
|
|
25869
|
+
if (/[\uff01-\uff5e]/.test(part)) {
|
|
25870
|
+
return false;
|
|
25871
|
+
}
|
|
25872
|
+
if (/^-|-$/.test(part)) {
|
|
25873
|
+
return false;
|
|
25874
|
+
}
|
|
25875
|
+
if (!options.allow_underscores && /_/.test(part)) {
|
|
25876
|
+
return false;
|
|
25877
|
+
}
|
|
25878
|
+
return true;
|
|
25879
|
+
});
|
|
25880
|
+
}
|
|
25881
|
+
module.exports = exports.default;
|
|
25882
|
+
module.exports.default = exports.default;
|
|
25883
|
+
})(isFQDN, isFQDN.exports);
|
|
25884
|
+
return isFQDN.exports;
|
|
25885
|
+
}
|
|
25886
|
+
var isIP = { exports: {} };
|
|
25887
|
+
var hasRequiredIsIP;
|
|
25888
|
+
function requireIsIP() {
|
|
25889
|
+
if (hasRequiredIsIP) return isIP.exports;
|
|
25890
|
+
hasRequiredIsIP = 1;
|
|
25891
|
+
(function(module, exports) {
|
|
25892
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25893
|
+
value: true
|
|
25894
|
+
});
|
|
25895
|
+
exports.default = isIP2;
|
|
25896
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25897
|
+
function _interopRequireDefault(obj) {
|
|
25898
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25899
|
+
}
|
|
25900
|
+
var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
|
|
25901
|
+
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
25902
|
+
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
25903
|
+
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
25904
|
+
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
25905
|
+
function isIP2(str) {
|
|
25906
|
+
var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
25907
|
+
(0, _assertString.default)(str);
|
|
25908
|
+
version2 = String(version2);
|
|
25909
|
+
if (!version2) {
|
|
25910
|
+
return isIP2(str, 4) || isIP2(str, 6);
|
|
25911
|
+
}
|
|
25912
|
+
if (version2 === "4") {
|
|
25913
|
+
return IPv4AddressRegExp.test(str);
|
|
25914
|
+
}
|
|
25915
|
+
if (version2 === "6") {
|
|
25916
|
+
return IPv6AddressRegExp.test(str);
|
|
25736
25917
|
}
|
|
25918
|
+
return false;
|
|
25737
25919
|
}
|
|
25738
|
-
|
|
25920
|
+
module.exports = exports.default;
|
|
25921
|
+
module.exports.default = exports.default;
|
|
25922
|
+
})(isIP, isIP.exports);
|
|
25923
|
+
return isIP.exports;
|
|
25924
|
+
}
|
|
25925
|
+
var hasRequiredIsURL;
|
|
25926
|
+
function requireIsURL() {
|
|
25927
|
+
if (hasRequiredIsURL) return isURL$1.exports;
|
|
25928
|
+
hasRequiredIsURL = 1;
|
|
25929
|
+
(function(module, exports) {
|
|
25930
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25931
|
+
value: true
|
|
25932
|
+
});
|
|
25933
|
+
exports.default = isURL2;
|
|
25934
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25935
|
+
var _isFQDN = _interopRequireDefault(/* @__PURE__ */ requireIsFQDN());
|
|
25936
|
+
var _isIP = _interopRequireDefault(/* @__PURE__ */ requireIsIP());
|
|
25937
|
+
var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
|
|
25938
|
+
function _interopRequireDefault(obj) {
|
|
25939
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25940
|
+
}
|
|
25941
|
+
function _slicedToArray(arr, i) {
|
|
25942
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
25943
|
+
}
|
|
25944
|
+
function _nonIterableRest() {
|
|
25945
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25946
|
+
}
|
|
25947
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
25948
|
+
if (!o) return;
|
|
25949
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
25950
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25951
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25952
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
25953
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25954
|
+
}
|
|
25955
|
+
function _arrayLikeToArray(arr, len) {
|
|
25956
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
25957
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
25958
|
+
arr2[i] = arr[i];
|
|
25959
|
+
}
|
|
25960
|
+
return arr2;
|
|
25961
|
+
}
|
|
25962
|
+
function _iterableToArrayLimit(arr, i) {
|
|
25963
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
25964
|
+
var _arr = [];
|
|
25965
|
+
var _n = true;
|
|
25966
|
+
var _d = false;
|
|
25967
|
+
var _e = void 0;
|
|
25968
|
+
try {
|
|
25969
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
25970
|
+
_arr.push(_s.value);
|
|
25971
|
+
if (i && _arr.length === i) break;
|
|
25972
|
+
}
|
|
25973
|
+
} catch (err) {
|
|
25974
|
+
_d = true;
|
|
25975
|
+
_e = err;
|
|
25976
|
+
} finally {
|
|
25977
|
+
try {
|
|
25978
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
25979
|
+
} finally {
|
|
25980
|
+
if (_d) throw _e;
|
|
25981
|
+
}
|
|
25982
|
+
}
|
|
25983
|
+
return _arr;
|
|
25984
|
+
}
|
|
25985
|
+
function _arrayWithHoles(arr) {
|
|
25986
|
+
if (Array.isArray(arr)) return arr;
|
|
25987
|
+
}
|
|
25988
|
+
var default_url_options = {
|
|
25989
|
+
protocols: ["http", "https", "ftp"],
|
|
25990
|
+
require_tld: true,
|
|
25991
|
+
require_protocol: false,
|
|
25992
|
+
require_host: true,
|
|
25993
|
+
require_port: false,
|
|
25994
|
+
require_valid_protocol: true,
|
|
25995
|
+
allow_underscores: false,
|
|
25996
|
+
allow_trailing_dot: false,
|
|
25997
|
+
allow_protocol_relative_urls: false,
|
|
25998
|
+
allow_fragments: true,
|
|
25999
|
+
allow_query_components: true,
|
|
26000
|
+
validate_length: true
|
|
26001
|
+
};
|
|
26002
|
+
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
26003
|
+
function isRegExp2(obj) {
|
|
26004
|
+
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
26005
|
+
}
|
|
26006
|
+
function checkHost(host, matches2) {
|
|
26007
|
+
for (var i = 0; i < matches2.length; i++) {
|
|
26008
|
+
var match = matches2[i];
|
|
26009
|
+
if (host === match || isRegExp2(match) && match.test(host)) {
|
|
26010
|
+
return true;
|
|
26011
|
+
}
|
|
26012
|
+
}
|
|
25739
26013
|
return false;
|
|
25740
26014
|
}
|
|
25741
|
-
|
|
25742
|
-
|
|
26015
|
+
function isURL2(url, options) {
|
|
26016
|
+
(0, _assertString.default)(url);
|
|
26017
|
+
if (!url || /[\s<>]/.test(url)) {
|
|
25743
26018
|
return false;
|
|
25744
26019
|
}
|
|
25745
|
-
if (
|
|
26020
|
+
if (url.indexOf("mailto:") === 0) {
|
|
25746
26021
|
return false;
|
|
25747
26022
|
}
|
|
25748
|
-
|
|
26023
|
+
options = (0, _merge.default)(options, default_url_options);
|
|
26024
|
+
if (options.validate_length && url.length >= 2083) {
|
|
25749
26025
|
return false;
|
|
25750
26026
|
}
|
|
25751
|
-
if (
|
|
26027
|
+
if (!options.allow_fragments && url.includes("#")) {
|
|
25752
26028
|
return false;
|
|
25753
26029
|
}
|
|
25754
|
-
if (!options.
|
|
26030
|
+
if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
|
|
25755
26031
|
return false;
|
|
25756
26032
|
}
|
|
25757
|
-
|
|
25758
|
-
|
|
25759
|
-
|
|
25760
|
-
|
|
25761
|
-
|
|
25762
|
-
|
|
25763
|
-
|
|
25764
|
-
|
|
25765
|
-
(
|
|
25766
|
-
|
|
25767
|
-
|
|
25768
|
-
|
|
25769
|
-
|
|
25770
|
-
|
|
25771
|
-
|
|
25772
|
-
|
|
25773
|
-
|
|
25774
|
-
|
|
25775
|
-
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
25776
|
-
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
25777
|
-
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
25778
|
-
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
25779
|
-
function isIP2(str) {
|
|
25780
|
-
var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
25781
|
-
(0, _assertString.default)(str);
|
|
25782
|
-
version2 = String(version2);
|
|
25783
|
-
if (!version2) {
|
|
25784
|
-
return isIP2(str, 4) || isIP2(str, 6);
|
|
25785
|
-
}
|
|
25786
|
-
if (version2 === "4") {
|
|
25787
|
-
return IPv4AddressRegExp.test(str);
|
|
25788
|
-
}
|
|
25789
|
-
if (version2 === "6") {
|
|
25790
|
-
return IPv6AddressRegExp.test(str);
|
|
25791
|
-
}
|
|
25792
|
-
return false;
|
|
25793
|
-
}
|
|
25794
|
-
module.exports = exports.default;
|
|
25795
|
-
module.exports.default = exports.default;
|
|
25796
|
-
})(isIP, isIP.exports);
|
|
25797
|
-
var isIPExports = isIP.exports;
|
|
25798
|
-
(function(module, exports) {
|
|
25799
|
-
Object.defineProperty(exports, "__esModule", {
|
|
25800
|
-
value: true
|
|
25801
|
-
});
|
|
25802
|
-
exports.default = isURL2;
|
|
25803
|
-
var _assertString = _interopRequireDefault(assertStringExports);
|
|
25804
|
-
var _isFQDN = _interopRequireDefault(isFQDNExports);
|
|
25805
|
-
var _isIP = _interopRequireDefault(isIPExports);
|
|
25806
|
-
var _merge = _interopRequireDefault(mergeExports);
|
|
25807
|
-
function _interopRequireDefault(obj) {
|
|
25808
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
25809
|
-
}
|
|
25810
|
-
function _slicedToArray(arr, i) {
|
|
25811
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
25812
|
-
}
|
|
25813
|
-
function _nonIterableRest() {
|
|
25814
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25815
|
-
}
|
|
25816
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
25817
|
-
if (!o)
|
|
25818
|
-
return;
|
|
25819
|
-
if (typeof o === "string")
|
|
25820
|
-
return _arrayLikeToArray(o, minLen);
|
|
25821
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25822
|
-
if (n === "Object" && o.constructor)
|
|
25823
|
-
n = o.constructor.name;
|
|
25824
|
-
if (n === "Map" || n === "Set")
|
|
25825
|
-
return Array.from(o);
|
|
25826
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
25827
|
-
return _arrayLikeToArray(o, minLen);
|
|
25828
|
-
}
|
|
25829
|
-
function _arrayLikeToArray(arr, len) {
|
|
25830
|
-
if (len == null || len > arr.length)
|
|
25831
|
-
len = arr.length;
|
|
25832
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
25833
|
-
arr2[i] = arr[i];
|
|
25834
|
-
}
|
|
25835
|
-
return arr2;
|
|
25836
|
-
}
|
|
25837
|
-
function _iterableToArrayLimit(arr, i) {
|
|
25838
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr)))
|
|
25839
|
-
return;
|
|
25840
|
-
var _arr = [];
|
|
25841
|
-
var _n = true;
|
|
25842
|
-
var _d = false;
|
|
25843
|
-
var _e = void 0;
|
|
25844
|
-
try {
|
|
25845
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
25846
|
-
_arr.push(_s.value);
|
|
25847
|
-
if (i && _arr.length === i)
|
|
25848
|
-
break;
|
|
26033
|
+
var protocol, auth, host, hostname, port, port_str, split2, ipv6;
|
|
26034
|
+
split2 = url.split("#");
|
|
26035
|
+
url = split2.shift();
|
|
26036
|
+
split2 = url.split("?");
|
|
26037
|
+
url = split2.shift();
|
|
26038
|
+
split2 = url.split("://");
|
|
26039
|
+
if (split2.length > 1) {
|
|
26040
|
+
protocol = split2.shift().toLowerCase();
|
|
26041
|
+
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
|
26042
|
+
return false;
|
|
26043
|
+
}
|
|
26044
|
+
} else if (options.require_protocol) {
|
|
26045
|
+
return false;
|
|
26046
|
+
} else if (url.slice(0, 2) === "//") {
|
|
26047
|
+
if (!options.allow_protocol_relative_urls) {
|
|
26048
|
+
return false;
|
|
26049
|
+
}
|
|
26050
|
+
split2[0] = url.slice(2);
|
|
25849
26051
|
}
|
|
25850
|
-
|
|
25851
|
-
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
|
|
25857
|
-
} finally {
|
|
25858
|
-
if (_d)
|
|
25859
|
-
throw _e;
|
|
25860
|
-
}
|
|
25861
|
-
}
|
|
25862
|
-
return _arr;
|
|
25863
|
-
}
|
|
25864
|
-
function _arrayWithHoles(arr) {
|
|
25865
|
-
if (Array.isArray(arr))
|
|
25866
|
-
return arr;
|
|
25867
|
-
}
|
|
25868
|
-
var default_url_options = {
|
|
25869
|
-
protocols: ["http", "https", "ftp"],
|
|
25870
|
-
require_tld: true,
|
|
25871
|
-
require_protocol: false,
|
|
25872
|
-
require_host: true,
|
|
25873
|
-
require_port: false,
|
|
25874
|
-
require_valid_protocol: true,
|
|
25875
|
-
allow_underscores: false,
|
|
25876
|
-
allow_trailing_dot: false,
|
|
25877
|
-
allow_protocol_relative_urls: false,
|
|
25878
|
-
allow_fragments: true,
|
|
25879
|
-
allow_query_components: true,
|
|
25880
|
-
validate_length: true
|
|
25881
|
-
};
|
|
25882
|
-
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
25883
|
-
function isRegExp2(obj) {
|
|
25884
|
-
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
25885
|
-
}
|
|
25886
|
-
function checkHost(host, matches2) {
|
|
25887
|
-
for (var i = 0; i < matches2.length; i++) {
|
|
25888
|
-
var match = matches2[i];
|
|
25889
|
-
if (host === match || isRegExp2(match) && match.test(host)) {
|
|
26052
|
+
url = split2.join("://");
|
|
26053
|
+
if (url === "") {
|
|
26054
|
+
return false;
|
|
26055
|
+
}
|
|
26056
|
+
split2 = url.split("/");
|
|
26057
|
+
url = split2.shift();
|
|
26058
|
+
if (url === "" && !options.require_host) {
|
|
25890
26059
|
return true;
|
|
25891
26060
|
}
|
|
25892
|
-
|
|
25893
|
-
|
|
25894
|
-
|
|
25895
|
-
|
|
25896
|
-
|
|
25897
|
-
|
|
25898
|
-
|
|
25899
|
-
|
|
25900
|
-
|
|
25901
|
-
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
|
|
25905
|
-
|
|
25906
|
-
|
|
25907
|
-
|
|
25908
|
-
return false;
|
|
25909
|
-
}
|
|
25910
|
-
if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
|
|
25911
|
-
return false;
|
|
25912
|
-
}
|
|
25913
|
-
var protocol, auth, host, hostname, port, port_str, split2, ipv6;
|
|
25914
|
-
split2 = url.split("#");
|
|
25915
|
-
url = split2.shift();
|
|
25916
|
-
split2 = url.split("?");
|
|
25917
|
-
url = split2.shift();
|
|
25918
|
-
split2 = url.split("://");
|
|
25919
|
-
if (split2.length > 1) {
|
|
25920
|
-
protocol = split2.shift().toLowerCase();
|
|
25921
|
-
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
|
25922
|
-
return false;
|
|
26061
|
+
split2 = url.split("@");
|
|
26062
|
+
if (split2.length > 1) {
|
|
26063
|
+
if (options.disallow_auth) {
|
|
26064
|
+
return false;
|
|
26065
|
+
}
|
|
26066
|
+
if (split2[0] === "") {
|
|
26067
|
+
return false;
|
|
26068
|
+
}
|
|
26069
|
+
auth = split2.shift();
|
|
26070
|
+
if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) {
|
|
26071
|
+
return false;
|
|
26072
|
+
}
|
|
26073
|
+
var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1];
|
|
26074
|
+
if (user === "" && password === "") {
|
|
26075
|
+
return false;
|
|
26076
|
+
}
|
|
25923
26077
|
}
|
|
25924
|
-
|
|
25925
|
-
|
|
25926
|
-
|
|
25927
|
-
|
|
25928
|
-
|
|
26078
|
+
hostname = split2.join("@");
|
|
26079
|
+
port_str = null;
|
|
26080
|
+
ipv6 = null;
|
|
26081
|
+
var ipv6_match = hostname.match(wrapped_ipv6);
|
|
26082
|
+
if (ipv6_match) {
|
|
26083
|
+
host = "";
|
|
26084
|
+
ipv6 = ipv6_match[1];
|
|
26085
|
+
port_str = ipv6_match[2] || null;
|
|
26086
|
+
} else {
|
|
26087
|
+
split2 = hostname.split(":");
|
|
26088
|
+
host = split2.shift();
|
|
26089
|
+
if (split2.length) {
|
|
26090
|
+
port_str = split2.join(":");
|
|
26091
|
+
}
|
|
25929
26092
|
}
|
|
25930
|
-
|
|
25931
|
-
|
|
25932
|
-
|
|
25933
|
-
|
|
25934
|
-
|
|
25935
|
-
|
|
25936
|
-
split2 = url.split("/");
|
|
25937
|
-
url = split2.shift();
|
|
25938
|
-
if (url === "" && !options.require_host) {
|
|
25939
|
-
return true;
|
|
25940
|
-
}
|
|
25941
|
-
split2 = url.split("@");
|
|
25942
|
-
if (split2.length > 1) {
|
|
25943
|
-
if (options.disallow_auth) {
|
|
26093
|
+
if (port_str !== null && port_str.length > 0) {
|
|
26094
|
+
port = parseInt(port_str, 10);
|
|
26095
|
+
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
26096
|
+
return false;
|
|
26097
|
+
}
|
|
26098
|
+
} else if (options.require_port) {
|
|
25944
26099
|
return false;
|
|
25945
26100
|
}
|
|
25946
|
-
if (
|
|
25947
|
-
return
|
|
26101
|
+
if (options.host_whitelist) {
|
|
26102
|
+
return checkHost(host, options.host_whitelist);
|
|
25948
26103
|
}
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
return false;
|
|
26104
|
+
if (host === "" && !options.require_host) {
|
|
26105
|
+
return true;
|
|
25952
26106
|
}
|
|
25953
|
-
|
|
25954
|
-
if (user === "" && password === "") {
|
|
26107
|
+
if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
|
|
25955
26108
|
return false;
|
|
25956
26109
|
}
|
|
25957
|
-
|
|
25958
|
-
|
|
25959
|
-
port_str = null;
|
|
25960
|
-
ipv6 = null;
|
|
25961
|
-
var ipv6_match = hostname.match(wrapped_ipv6);
|
|
25962
|
-
if (ipv6_match) {
|
|
25963
|
-
host = "";
|
|
25964
|
-
ipv6 = ipv6_match[1];
|
|
25965
|
-
port_str = ipv6_match[2] || null;
|
|
25966
|
-
} else {
|
|
25967
|
-
split2 = hostname.split(":");
|
|
25968
|
-
host = split2.shift();
|
|
25969
|
-
if (split2.length) {
|
|
25970
|
-
port_str = split2.join(":");
|
|
25971
|
-
}
|
|
25972
|
-
}
|
|
25973
|
-
if (port_str !== null && port_str.length > 0) {
|
|
25974
|
-
port = parseInt(port_str, 10);
|
|
25975
|
-
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
26110
|
+
host = host || ipv6;
|
|
26111
|
+
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
|
25976
26112
|
return false;
|
|
25977
26113
|
}
|
|
25978
|
-
} else if (options.require_port) {
|
|
25979
|
-
return false;
|
|
25980
|
-
}
|
|
25981
|
-
if (options.host_whitelist) {
|
|
25982
|
-
return checkHost(host, options.host_whitelist);
|
|
25983
|
-
}
|
|
25984
|
-
if (host === "" && !options.require_host) {
|
|
25985
26114
|
return true;
|
|
25986
26115
|
}
|
|
25987
|
-
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
}
|
|
25994
|
-
return true;
|
|
25995
|
-
}
|
|
25996
|
-
module.exports = exports.default;
|
|
25997
|
-
module.exports.default = exports.default;
|
|
25998
|
-
})(isURL$1, isURL$1.exports);
|
|
25999
|
-
var isURLExports = isURL$1.exports;
|
|
26116
|
+
module.exports = exports.default;
|
|
26117
|
+
module.exports.default = exports.default;
|
|
26118
|
+
})(isURL$1, isURL$1.exports);
|
|
26119
|
+
return isURL$1.exports;
|
|
26120
|
+
}
|
|
26121
|
+
var isURLExports = /* @__PURE__ */ requireIsURL();
|
|
26000
26122
|
const isURL = /* @__PURE__ */ getDefaultExportFromCjs(isURLExports);
|
|
26001
26123
|
const _hoisted_1$2 = { class: "actions d-flex justify-end" };
|
|
26002
26124
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
@@ -26005,24 +26127,22 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26005
26127
|
editor: {}
|
|
26006
26128
|
},
|
|
26007
26129
|
setup(__props) {
|
|
26008
|
-
const props = __props;
|
|
26009
26130
|
const rules = {
|
|
26010
26131
|
required: (val) => !!val || "The field is required",
|
|
26011
26132
|
url: (val) => {
|
|
26012
26133
|
const url2 = val.trim();
|
|
26013
|
-
if (!url2)
|
|
26014
|
-
return true;
|
|
26134
|
+
if (!url2) return true;
|
|
26015
26135
|
return isURL(url2) || "Please enter valid URL";
|
|
26016
26136
|
}
|
|
26017
26137
|
};
|
|
26138
|
+
const props = __props;
|
|
26018
26139
|
const form = ref();
|
|
26019
26140
|
const url = ref("");
|
|
26020
26141
|
const title = ref("");
|
|
26021
26142
|
const show = ref(false);
|
|
26022
26143
|
async function setImage() {
|
|
26023
26144
|
const { valid } = await form.value.validate();
|
|
26024
|
-
if (!valid)
|
|
26025
|
-
return;
|
|
26145
|
+
if (!valid) return;
|
|
26026
26146
|
const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
|
|
26027
26147
|
props.editor.chain().focus().setImage({ src: href, alt: title.value, title: title.value }).run();
|
|
26028
26148
|
show.value = false;
|
|
@@ -26030,8 +26150,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26030
26150
|
}
|
|
26031
26151
|
watch(show, (val) => {
|
|
26032
26152
|
var _a;
|
|
26033
|
-
if (!val)
|
|
26034
|
-
return;
|
|
26153
|
+
if (!val) return;
|
|
26035
26154
|
url.value = "";
|
|
26036
26155
|
title.value = "";
|
|
26037
26156
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
@@ -26061,9 +26180,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26061
26180
|
}, mergeProps(menu, tooltip)), {
|
|
26062
26181
|
default: withCtx(() => [
|
|
26063
26182
|
createVNode(_component_VIcon, { size: "24" }, {
|
|
26064
|
-
default: withCtx(() => [
|
|
26183
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
26065
26184
|
createTextVNode("mdi-image-plus")
|
|
26066
|
-
]),
|
|
26185
|
+
])),
|
|
26067
26186
|
_: 1
|
|
26068
26187
|
})
|
|
26069
26188
|
]),
|
|
@@ -26071,7 +26190,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26071
26190
|
}, 1040, ["active", "disabled"])
|
|
26072
26191
|
]),
|
|
26073
26192
|
default: withCtx(() => [
|
|
26074
|
-
createTextVNode(" Add image ")
|
|
26193
|
+
_cache[4] || (_cache[4] = createTextVNode(" Add image "))
|
|
26075
26194
|
]),
|
|
26076
26195
|
_: 2
|
|
26077
26196
|
}, 1024)
|
|
@@ -26114,9 +26233,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26114
26233
|
type: "submit",
|
|
26115
26234
|
variant: "tonal"
|
|
26116
26235
|
}, {
|
|
26117
|
-
default: withCtx(() => [
|
|
26236
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
26118
26237
|
createTextVNode("Confirm")
|
|
26119
|
-
]),
|
|
26238
|
+
])),
|
|
26120
26239
|
_: 1
|
|
26121
26240
|
})
|
|
26122
26241
|
])
|
|
@@ -26125,14 +26244,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
26125
26244
|
})
|
|
26126
26245
|
]),
|
|
26127
26246
|
_: 1
|
|
26128
|
-
},
|
|
26247
|
+
}, 512)
|
|
26129
26248
|
]),
|
|
26130
26249
|
_: 1
|
|
26131
26250
|
}, 8, ["modelValue"]);
|
|
26132
26251
|
};
|
|
26133
26252
|
}
|
|
26134
26253
|
});
|
|
26135
|
-
const AddImage_vue_vue_type_style_index_0_scoped_8e6263e8_lang = "";
|
|
26136
26254
|
const AddImage = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8e6263e8"]]);
|
|
26137
26255
|
const _hoisted_1$1 = { class: "actions d-flex justify-end" };
|
|
26138
26256
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
@@ -26141,16 +26259,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26141
26259
|
editor: {}
|
|
26142
26260
|
},
|
|
26143
26261
|
setup(__props) {
|
|
26144
|
-
const props = __props;
|
|
26145
26262
|
const rules = {
|
|
26146
26263
|
required: (val) => !!val || "The field is required",
|
|
26147
26264
|
url: (val) => {
|
|
26148
26265
|
const url2 = val.trim();
|
|
26149
|
-
if (!url2)
|
|
26150
|
-
return true;
|
|
26266
|
+
if (!url2) return true;
|
|
26151
26267
|
return isURL(url2) || "Please enter valid URL";
|
|
26152
26268
|
}
|
|
26153
26269
|
};
|
|
26270
|
+
const props = __props;
|
|
26154
26271
|
const form = ref();
|
|
26155
26272
|
const getText2 = () => {
|
|
26156
26273
|
const { view, state } = props.editor;
|
|
@@ -26167,21 +26284,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26167
26284
|
}
|
|
26168
26285
|
async function setLink() {
|
|
26169
26286
|
const { valid } = await form.value.validate();
|
|
26170
|
-
if (!valid)
|
|
26171
|
-
return;
|
|
26287
|
+
if (!valid) return;
|
|
26172
26288
|
const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
|
|
26173
26289
|
if (href) {
|
|
26174
26290
|
const attributes = { href };
|
|
26175
26291
|
props.editor.chain().focus().setLinkText({ attributes, text: text.value }).run();
|
|
26176
|
-
} else
|
|
26177
|
-
props.editor.chain().focus().unsetLink().run();
|
|
26292
|
+
} else props.editor.chain().focus().unsetLink().run();
|
|
26178
26293
|
show.value = false;
|
|
26179
26294
|
form.value.resetValidation();
|
|
26180
26295
|
}
|
|
26181
26296
|
watch(show, (val) => {
|
|
26182
26297
|
var _a;
|
|
26183
|
-
if (!val)
|
|
26184
|
-
return;
|
|
26298
|
+
if (!val) return;
|
|
26185
26299
|
url.value = props.editor.getAttributes("link").href ?? "";
|
|
26186
26300
|
text.value = getText2() ?? "";
|
|
26187
26301
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
@@ -26211,9 +26325,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26211
26325
|
}, mergeProps(menu, tooltip)), {
|
|
26212
26326
|
default: withCtx(() => [
|
|
26213
26327
|
createVNode(_component_VIcon, { size: "24" }, {
|
|
26214
|
-
default: withCtx(() => [
|
|
26328
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
26215
26329
|
createTextVNode("mdi-link")
|
|
26216
|
-
]),
|
|
26330
|
+
])),
|
|
26217
26331
|
_: 1
|
|
26218
26332
|
})
|
|
26219
26333
|
]),
|
|
@@ -26221,7 +26335,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26221
26335
|
}, 1040, ["active", "disabled"])
|
|
26222
26336
|
]),
|
|
26223
26337
|
default: withCtx(() => [
|
|
26224
|
-
createTextVNode(" Add link ")
|
|
26338
|
+
_cache[4] || (_cache[4] = createTextVNode(" Add link "))
|
|
26225
26339
|
]),
|
|
26226
26340
|
_: 2
|
|
26227
26341
|
}, 1024)
|
|
@@ -26265,9 +26379,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26265
26379
|
variant: "plain",
|
|
26266
26380
|
onClick: unlink
|
|
26267
26381
|
}, {
|
|
26268
|
-
default: withCtx(() => [
|
|
26382
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
26269
26383
|
createTextVNode(" Unlink ")
|
|
26270
|
-
]),
|
|
26384
|
+
])),
|
|
26271
26385
|
_: 1
|
|
26272
26386
|
})) : createCommentVNode("", true),
|
|
26273
26387
|
createVNode(_component_VBtn, {
|
|
@@ -26275,9 +26389,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26275
26389
|
type: "submit",
|
|
26276
26390
|
variant: "tonal"
|
|
26277
26391
|
}, {
|
|
26278
|
-
default: withCtx(() => [
|
|
26392
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
26279
26393
|
createTextVNode("Confirm")
|
|
26280
|
-
]),
|
|
26394
|
+
])),
|
|
26281
26395
|
_: 1
|
|
26282
26396
|
})
|
|
26283
26397
|
])
|
|
@@ -26286,14 +26400,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
26286
26400
|
})
|
|
26287
26401
|
]),
|
|
26288
26402
|
_: 1
|
|
26289
|
-
},
|
|
26403
|
+
}, 512)
|
|
26290
26404
|
]),
|
|
26291
26405
|
_: 1
|
|
26292
26406
|
}, 8, ["modelValue"]);
|
|
26293
26407
|
};
|
|
26294
26408
|
}
|
|
26295
26409
|
});
|
|
26296
|
-
const AddLink_vue_vue_type_style_index_0_scoped_148650fc_lang = "";
|
|
26297
26410
|
const AddLink = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-148650fc"]]);
|
|
26298
26411
|
const _hoisted_1 = { class: "text-body-2" };
|
|
26299
26412
|
const INIT_SIZE = 5;
|
|
@@ -26310,14 +26423,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26310
26423
|
const selectedSize = reactive({ rows: 0, cols: 0 });
|
|
26311
26424
|
const gridSize = reactive({ rows: INIT_SIZE, cols: INIT_SIZE });
|
|
26312
26425
|
const updateSelection2 = (rows, cols) => {
|
|
26313
|
-
if (rows === gridSize.rows)
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
|
|
26317
|
-
if (cols === gridSize.cols)
|
|
26318
|
-
gridSize.cols = Math.min(cols + 1, MAX_SIZE);
|
|
26319
|
-
else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1)
|
|
26320
|
-
gridSize.cols--;
|
|
26426
|
+
if (rows === gridSize.rows) gridSize.rows = Math.min(rows + 1, MAX_SIZE);
|
|
26427
|
+
else if (rows < gridSize.rows - 1 && rows >= INIT_SIZE - 1) gridSize.rows--;
|
|
26428
|
+
if (cols === gridSize.cols) gridSize.cols = Math.min(cols + 1, MAX_SIZE);
|
|
26429
|
+
else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1) gridSize.cols--;
|
|
26321
26430
|
selectedSize.rows = rows;
|
|
26322
26431
|
selectedSize.cols = cols;
|
|
26323
26432
|
};
|
|
@@ -26330,8 +26439,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26330
26439
|
return props.editor.chain().focus().insertTable(options).run();
|
|
26331
26440
|
};
|
|
26332
26441
|
watch(show, (val) => {
|
|
26333
|
-
if (!val)
|
|
26334
|
-
return;
|
|
26442
|
+
if (!val) return;
|
|
26335
26443
|
withHeaderRow.value = false;
|
|
26336
26444
|
gridSize.rows = INIT_SIZE;
|
|
26337
26445
|
gridSize.cols = INIT_SIZE;
|
|
@@ -26358,9 +26466,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26358
26466
|
}, mergeProps(menu, tooltip)), {
|
|
26359
26467
|
default: withCtx(() => [
|
|
26360
26468
|
createVNode(_component_VIcon, { size: "24" }, {
|
|
26361
|
-
default: withCtx(() => [
|
|
26469
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
26362
26470
|
createTextVNode("mdi-table-plus")
|
|
26363
|
-
]),
|
|
26471
|
+
])),
|
|
26364
26472
|
_: 1
|
|
26365
26473
|
})
|
|
26366
26474
|
]),
|
|
@@ -26368,7 +26476,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26368
26476
|
}, 1040)
|
|
26369
26477
|
]),
|
|
26370
26478
|
default: withCtx(() => [
|
|
26371
|
-
createTextVNode(" Add table ")
|
|
26479
|
+
_cache[4] || (_cache[4] = createTextVNode(" Add table "))
|
|
26372
26480
|
]),
|
|
26373
26481
|
_: 2
|
|
26374
26482
|
}, 1024)
|
|
@@ -26421,7 +26529,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26421
26529
|
};
|
|
26422
26530
|
}
|
|
26423
26531
|
});
|
|
26424
|
-
const AddTable_vue_vue_type_style_index_0_scoped_86386e2b_lang = "";
|
|
26425
26532
|
const AddTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-86386e2b"]]);
|
|
26426
26533
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
26427
26534
|
__name: "FontFamily",
|
|
@@ -26465,16 +26572,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
26465
26572
|
class: "ml-1 mr-n1",
|
|
26466
26573
|
size: "24"
|
|
26467
26574
|
}, {
|
|
26468
|
-
default: withCtx(() => [
|
|
26575
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
26469
26576
|
createTextVNode("mdi-format-font")
|
|
26470
|
-
]),
|
|
26577
|
+
])),
|
|
26471
26578
|
_: 1
|
|
26472
26579
|
}),
|
|
26473
26580
|
createElementVNode("div", null, [
|
|
26474
26581
|
createVNode(_component_VIcon, { small: "" }, {
|
|
26475
|
-
default: withCtx(() => [
|
|
26582
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
26476
26583
|
createTextVNode("mdi-menu-down")
|
|
26477
|
-
]),
|
|
26584
|
+
])),
|
|
26478
26585
|
_: 1
|
|
26479
26586
|
})
|
|
26480
26587
|
])
|
|
@@ -26483,7 +26590,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
26483
26590
|
}, 1040, ["active", "disabled"])
|
|
26484
26591
|
]),
|
|
26485
26592
|
default: withCtx(() => [
|
|
26486
|
-
createTextVNode(" Font family ")
|
|
26593
|
+
_cache[2] || (_cache[2] = createTextVNode(" Font family "))
|
|
26487
26594
|
]),
|
|
26488
26595
|
_: 2
|
|
26489
26596
|
}, 1024)
|
|
@@ -26527,7 +26634,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
26527
26634
|
};
|
|
26528
26635
|
}
|
|
26529
26636
|
});
|
|
26530
|
-
const FontFamily_vue_vue_type_style_index_0_scoped_13c3b0cc_lang = "";
|
|
26531
26637
|
const FontFamily = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-13c3b0cc"]]);
|
|
26532
26638
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
26533
26639
|
__name: "FontSize",
|
|
@@ -26579,15 +26685,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
26579
26685
|
class: "ml-1 mr-n1",
|
|
26580
26686
|
size: "24"
|
|
26581
26687
|
}, {
|
|
26582
|
-
default: withCtx(() => [
|
|
26688
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
26583
26689
|
createTextVNode("mdi-format-size")
|
|
26584
|
-
]),
|
|
26690
|
+
])),
|
|
26585
26691
|
_: 1
|
|
26586
26692
|
}),
|
|
26587
26693
|
createVNode(_component_VIcon, { small: "" }, {
|
|
26588
|
-
default: withCtx(() => [
|
|
26694
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
26589
26695
|
createTextVNode("mdi-menu-down")
|
|
26590
|
-
]),
|
|
26696
|
+
])),
|
|
26591
26697
|
_: 1
|
|
26592
26698
|
})
|
|
26593
26699
|
]),
|
|
@@ -26595,7 +26701,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
26595
26701
|
}, 1040, ["active", "disabled"])
|
|
26596
26702
|
]),
|
|
26597
26703
|
default: withCtx(() => [
|
|
26598
|
-
createTextVNode(" Font size ")
|
|
26704
|
+
_cache[2] || (_cache[2] = createTextVNode(" Font size "))
|
|
26599
26705
|
]),
|
|
26600
26706
|
_: 2
|
|
26601
26707
|
}, 1024)
|
|
@@ -26637,7 +26743,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
26637
26743
|
};
|
|
26638
26744
|
}
|
|
26639
26745
|
});
|
|
26640
|
-
const FontSize_vue_vue_type_style_index_0_scoped_70882e8a_lang = "";
|
|
26641
26746
|
const FontSize = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-70882e8a"]]);
|
|
26642
26747
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
26643
26748
|
__name: "TextAlign",
|
|
@@ -26670,15 +26775,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
26670
26775
|
class: "ml-1 mr-n1",
|
|
26671
26776
|
size: "24"
|
|
26672
26777
|
}, {
|
|
26673
|
-
default: withCtx(() => [
|
|
26778
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
26674
26779
|
createTextVNode("mdi-format-align-justify")
|
|
26675
|
-
]),
|
|
26780
|
+
])),
|
|
26676
26781
|
_: 1
|
|
26677
26782
|
}),
|
|
26678
26783
|
createVNode(_component_VIcon, { small: "" }, {
|
|
26679
|
-
default: withCtx(() => [
|
|
26784
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
26680
26785
|
createTextVNode("mdi-menu-down")
|
|
26681
|
-
]),
|
|
26786
|
+
])),
|
|
26682
26787
|
_: 1
|
|
26683
26788
|
})
|
|
26684
26789
|
]),
|
|
@@ -26686,7 +26791,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
26686
26791
|
}, 1040, ["disabled"])
|
|
26687
26792
|
]),
|
|
26688
26793
|
default: withCtx(() => [
|
|
26689
|
-
createTextVNode(" Text align ")
|
|
26794
|
+
_cache[2] || (_cache[2] = createTextVNode(" Text align "))
|
|
26690
26795
|
]),
|
|
26691
26796
|
_: 2
|
|
26692
26797
|
}, 1024)
|
|
@@ -26738,7 +26843,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
26738
26843
|
};
|
|
26739
26844
|
}
|
|
26740
26845
|
});
|
|
26741
|
-
const TextAlign_vue_vue_type_style_index_0_scoped_1b30eb43_lang = "";
|
|
26742
26846
|
const TextAlign = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-1b30eb43"]]);
|
|
26743
26847
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
26744
26848
|
__name: "ColorPicker",
|
|
@@ -26749,8 +26853,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26749
26853
|
icon: {}
|
|
26750
26854
|
},
|
|
26751
26855
|
emits: ["set", "unset"],
|
|
26752
|
-
setup(__props, { emit }) {
|
|
26856
|
+
setup(__props, { emit: __emit }) {
|
|
26753
26857
|
const props = __props;
|
|
26858
|
+
const emit = __emit;
|
|
26754
26859
|
const COLORS = [
|
|
26755
26860
|
[
|
|
26756
26861
|
"#000000",
|
|
@@ -26834,9 +26939,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26834
26939
|
color: currentColor.value,
|
|
26835
26940
|
size: "20"
|
|
26836
26941
|
}, {
|
|
26837
|
-
default: withCtx(() => [
|
|
26942
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
26838
26943
|
createTextVNode("mdi-color-helper")
|
|
26839
|
-
]),
|
|
26944
|
+
])),
|
|
26840
26945
|
_: 1
|
|
26841
26946
|
}, 8, ["color"])
|
|
26842
26947
|
]),
|
|
@@ -26877,9 +26982,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26877
26982
|
color: "white",
|
|
26878
26983
|
size: "small"
|
|
26879
26984
|
}, {
|
|
26880
|
-
default: withCtx(() => [
|
|
26985
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
26881
26986
|
createTextVNode(" mdi-check-circle ")
|
|
26882
|
-
]),
|
|
26987
|
+
])),
|
|
26883
26988
|
_: 1
|
|
26884
26989
|
})) : createCommentVNode("", true)
|
|
26885
26990
|
]),
|
|
@@ -26897,12 +27002,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26897
27002
|
}, {
|
|
26898
27003
|
default: withCtx(() => [
|
|
26899
27004
|
createVNode(_component_VIcon, { size: "small" }, {
|
|
26900
|
-
default: withCtx(() => [
|
|
27005
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
26901
27006
|
createTextVNode("mdi-water-off")
|
|
26902
|
-
]),
|
|
27007
|
+
])),
|
|
26903
27008
|
_: 1
|
|
26904
27009
|
}),
|
|
26905
|
-
createTextVNode(" Reset ")
|
|
27010
|
+
_cache[4] || (_cache[4] = createTextVNode(" Reset "))
|
|
26906
27011
|
]),
|
|
26907
27012
|
_: 1
|
|
26908
27013
|
})
|
|
@@ -26915,7 +27020,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26915
27020
|
};
|
|
26916
27021
|
}
|
|
26917
27022
|
});
|
|
26918
|
-
const ColorPicker_vue_vue_type_style_index_0_scoped_0b56d20a_lang = "";
|
|
26919
27023
|
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0b56d20a"]]);
|
|
26920
27024
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
26921
27025
|
__name: "TextColor",
|
|
@@ -26971,9 +27075,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
26971
27075
|
_: 1
|
|
26972
27076
|
}),
|
|
26973
27077
|
createVNode(_component_VIcon, { small: "" }, {
|
|
26974
|
-
default: withCtx(() => [
|
|
27078
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
26975
27079
|
createTextVNode("mdi-menu-down")
|
|
26976
|
-
]),
|
|
27080
|
+
])),
|
|
26977
27081
|
_: 1
|
|
26978
27082
|
})
|
|
26979
27083
|
]),
|
|
@@ -26981,7 +27085,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
26981
27085
|
}, 1040, ["active"])
|
|
26982
27086
|
]),
|
|
26983
27087
|
default: withCtx(() => [
|
|
26984
|
-
createTextVNode(" Headings ")
|
|
27088
|
+
_cache[2] || (_cache[2] = createTextVNode(" Headings "))
|
|
26985
27089
|
]),
|
|
26986
27090
|
_: 2
|
|
26987
27091
|
}, 1024)
|
|
@@ -27012,7 +27116,24 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
27012
27116
|
]),
|
|
27013
27117
|
_: 2
|
|
27014
27118
|
}, 1032, ["active", "onClick"]);
|
|
27015
|
-
}), 64))
|
|
27119
|
+
}), 64)),
|
|
27120
|
+
createVNode(_component_VListItem, {
|
|
27121
|
+
active: _ctx.editor.isActive("paragraph"),
|
|
27122
|
+
class: "px-2",
|
|
27123
|
+
"min-height": "36",
|
|
27124
|
+
rounded: "sm",
|
|
27125
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.editor.chain().focus().setParagraph().run())
|
|
27126
|
+
}, {
|
|
27127
|
+
default: withCtx(() => [
|
|
27128
|
+
createVNode(_component_VListItemTitle, null, {
|
|
27129
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
27130
|
+
createTextVNode("Normal")
|
|
27131
|
+
])),
|
|
27132
|
+
_: 1
|
|
27133
|
+
})
|
|
27134
|
+
]),
|
|
27135
|
+
_: 1
|
|
27136
|
+
}, 8, ["active"])
|
|
27016
27137
|
]),
|
|
27017
27138
|
_: 1
|
|
27018
27139
|
})
|
|
@@ -27022,8 +27143,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
27022
27143
|
};
|
|
27023
27144
|
}
|
|
27024
27145
|
});
|
|
27025
|
-
const
|
|
27026
|
-
const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-70d410a1"]]);
|
|
27146
|
+
const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-eb5927ce"]]);
|
|
27027
27147
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
27028
27148
|
__name: "TextHighlight",
|
|
27029
27149
|
props: {
|
|
@@ -27201,7 +27321,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27201
27321
|
};
|
|
27202
27322
|
}
|
|
27203
27323
|
});
|
|
27204
|
-
const EditorToolbar_vue_vue_type_style_index_0_scoped_b4ffaa29_lang = "";
|
|
27205
27324
|
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b4ffaa29"]]);
|
|
27206
27325
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27207
27326
|
__name: "TopToolbar",
|
|
@@ -27224,7 +27343,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27224
27343
|
}
|
|
27225
27344
|
});
|
|
27226
27345
|
const manifest = {
|
|
27227
|
-
...
|
|
27346
|
+
...index_default,
|
|
27228
27347
|
Edit,
|
|
27229
27348
|
TopToolbar: _sfc_main
|
|
27230
27349
|
};
|