@ahzoo/sus 1.1.0 → 1.1.2
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/index.js +241 -243
- package/main.ts +5 -0
- package/package.json +1 -1
- package/style.css +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var We = (fe, he, ke) => (
|
|
4
|
-
import { defineComponent as Ht, ref as yt, reactive as
|
|
1
|
+
var vi = Object.defineProperty;
|
|
2
|
+
var gi = (fe, he, ke) => he in fe ? vi(fe, he, { enumerable: !0, configurable: !0, writable: !0, value: ke }) : fe[he] = ke;
|
|
3
|
+
var We = (fe, he, ke) => (gi(fe, typeof he != "symbol" ? he + "" : he, ke), ke);
|
|
4
|
+
import { defineComponent as Ht, ref as yt, reactive as yi, onMounted as Wn, openBlock as qe, createElementBlock as ze, createElementVNode as ce, unref as xt, withDirectives as Jt, vModelText as Xt, normalizeClass as bi, toDisplayString as tt, createCommentVNode as nt, createStaticVNode as wi, createVNode as Ei, createBlock as Un, createTextVNode as ki, Fragment as Si, renderList as Li } from "vue";
|
|
5
5
|
var _i = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function Ci(fe) {
|
|
7
7
|
return fe && fe.__esModule && Object.prototype.hasOwnProperty.call(fe, "default") ? fe.default : fe;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var zn = { exports: {} };
|
|
10
10
|
(function(fe, he) {
|
|
11
11
|
(function(ke, be) {
|
|
12
12
|
fe.exports = be();
|
|
@@ -85,19 +85,19 @@ var Kn = { exports: {} };
|
|
|
85
85
|
x += 2;
|
|
86
86
|
else if (me > s)
|
|
87
87
|
p += 2;
|
|
88
|
-
else if (k && (ve = f + E - $) >= 0 && ve < w && S[ve] != -1 && Me >= (
|
|
88
|
+
else if (k && (ve = f + E - $) >= 0 && ve < w && S[ve] != -1 && Me >= (le = b - S[ve]))
|
|
89
89
|
return this.diff_bisectSplit_(l, m, Me, me, c);
|
|
90
90
|
}
|
|
91
91
|
for (var de = -N + I; de <= N - W; de += 2) {
|
|
92
|
-
for (var
|
|
93
|
-
|
|
94
|
-
if (S[ve] =
|
|
92
|
+
for (var le, ve = f + de, xe = (le = de == -N || de != N && S[ve - 1] < S[ve + 1] ? S[ve + 1] : S[ve - 1] + 1) - de; le < b && xe < s && l.charAt(b - le - 1) == m.charAt(s - xe - 1); )
|
|
93
|
+
le++, xe++;
|
|
94
|
+
if (S[ve] = le, le > b)
|
|
95
95
|
W += 2;
|
|
96
96
|
else if (xe > s)
|
|
97
97
|
I += 2;
|
|
98
98
|
else if (!k && (ne = f + E - de) >= 0 && ne < w && _[ne] != -1) {
|
|
99
99
|
var Me;
|
|
100
|
-
if (me = f + (Me = _[ne]) - ne, Me >= (
|
|
100
|
+
if (me = f + (Me = _[ne]) - ne, Me >= (le = b - le))
|
|
101
101
|
return this.diff_bisectSplit_(l, m, Me, me, c);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -160,11 +160,11 @@ var Kn = { exports: {} };
|
|
|
160
160
|
return null;
|
|
161
161
|
var s = this;
|
|
162
162
|
function u(p, x, I) {
|
|
163
|
-
for (var W, N, $, ne, me = p.substring(I, I + Math.floor(p.length / 4)), de = -1,
|
|
163
|
+
for (var W, N, $, ne, me = p.substring(I, I + Math.floor(p.length / 4)), de = -1, le = ""; (de = x.indexOf(me, de + 1)) != -1; ) {
|
|
164
164
|
var ve = s.diff_commonPrefix(p.substring(I), x.substring(de)), xe = s.diff_commonSuffix(p.substring(0, I), x.substring(0, de));
|
|
165
|
-
|
|
165
|
+
le.length < xe + ve && (le = x.substring(de - xe, de) + x.substring(de, de + ve), W = p.substring(0, I - xe), N = p.substring(I + ve), $ = x.substring(0, de - xe), ne = x.substring(de + ve));
|
|
166
166
|
}
|
|
167
|
-
return 2 *
|
|
167
|
+
return 2 * le.length >= p.length ? [W, N, $, ne, le] : null;
|
|
168
168
|
}
|
|
169
169
|
var f, w, _, S, M, E = u(c, b, Math.ceil(c.length / 4)), k = u(c, b, Math.ceil(c.length / 2));
|
|
170
170
|
return E || k ? (f = k ? E && E[4].length > k[4].length ? E : k : E, l.length > m.length ? (w = f[0], _ = f[1], S = f[2], M = f[3]) : (S = f[0], M = f[1], w = f[2], _ = f[3]), [w, _, S, M, f[4]]) : null;
|
|
@@ -182,8 +182,8 @@ var Kn = { exports: {} };
|
|
|
182
182
|
function m(p, x) {
|
|
183
183
|
if (!p || !x)
|
|
184
184
|
return 6;
|
|
185
|
-
var I = p.charAt(p.length - 1), W = x.charAt(0), N = I.match(L.nonAlphaNumericRegex_), $ = W.match(L.nonAlphaNumericRegex_), ne = N && I.match(L.whitespaceRegex_), me = $ && W.match(L.whitespaceRegex_), de = ne && I.match(L.linebreakRegex_),
|
|
186
|
-
return ve || xe ? 5 : de ||
|
|
185
|
+
var I = p.charAt(p.length - 1), W = x.charAt(0), N = I.match(L.nonAlphaNumericRegex_), $ = W.match(L.nonAlphaNumericRegex_), ne = N && I.match(L.whitespaceRegex_), me = $ && W.match(L.whitespaceRegex_), de = ne && I.match(L.linebreakRegex_), le = me && W.match(L.linebreakRegex_), ve = de && p.match(L.blanklineEndRegex_), xe = le && x.match(L.blanklineStartRegex_);
|
|
186
|
+
return ve || xe ? 5 : de || le ? 4 : N && !ne && me ? 3 : ne || me ? 2 : N || $ ? 1 : 0;
|
|
187
187
|
}
|
|
188
188
|
for (var c = 1; c < l.length - 1; ) {
|
|
189
189
|
if (l[c - 1][0] == 0 && l[c + 1][0] == 0) {
|
|
@@ -315,8 +315,8 @@ var Kn = { exports: {} };
|
|
|
315
315
|
throw new Error("Pattern too long for this browser.");
|
|
316
316
|
var b = this.match_alphabet_(m), s = this;
|
|
317
317
|
function u(me, de) {
|
|
318
|
-
var
|
|
319
|
-
return s.Match_Distance ?
|
|
318
|
+
var le = me / m.length, ve = Math.abs(c - de);
|
|
319
|
+
return s.Match_Distance ? le + ve / s.Match_Distance : ve ? 1 : le;
|
|
320
320
|
}
|
|
321
321
|
var f = this.Match_Threshold, w = l.indexOf(m, c);
|
|
322
322
|
w != -1 && (f = Math.min(u(0, w), f), (w = l.lastIndexOf(m, c + m.length)) != -1 && (f = Math.min(u(0, w), f)));
|
|
@@ -536,7 +536,7 @@ var Kn = { exports: {} };
|
|
|
536
536
|
}), K.querySelectorAll("img").forEach(function(V) {
|
|
537
537
|
window.vditorImageIntersectionObserver.observe(V);
|
|
538
538
|
}));
|
|
539
|
-
}, _ = y(466), S = y(554), M = y(40), E = y(563), k = y(749), p = y(818), x = y(408), I = y(54), W = y(227), N = y(526), $ = y(827), ne = y(640), me = y(895), de = y(393),
|
|
539
|
+
}, _ = y(466), S = y(554), M = y(40), E = y(563), k = y(749), p = y(818), x = y(408), I = y(54), W = y(227), N = y(526), $ = y(827), ne = y(640), me = y(895), de = y(393), le = function(K, ge) {
|
|
540
540
|
if (ge === void 0 && (ge = "zh_CN"), typeof speechSynthesis < "u" && typeof SpeechSynthesisUtterance < "u") {
|
|
541
541
|
var V = function() {
|
|
542
542
|
var pe, ue;
|
|
@@ -688,7 +688,7 @@ var Kn = { exports: {} };
|
|
|
688
688
|
case 7:
|
|
689
689
|
oe.sent(), oe.label = 8;
|
|
690
690
|
case 8:
|
|
691
|
-
return (0, W.Z)(j.theme.current, j.theme.path), j.anchor === 1 && K.classList.add("vditor-reset--anchor"), (0, b.O)(K, j.hljs), (0, f.s)(j.hljs, K, j.cdn), (0, _.H)(K, { cdn: j.cdn, math: j.math }), (0, M.i)(K, j.cdn, j.mode), (0, E.K)(K, j.cdn, j.mode), (0, s.P)(K, j.cdn), (0, u.v)(K, j.cdn), (0, c.p)(K, j.cdn, j.mode), (0, k.P)(K, j.cdn, j.mode), (0, x.B)(K, j.cdn), (0, l.Q)(K, j.cdn), j.render.media.enable && (0, S.Y)(K), j.speech.enable &&
|
|
691
|
+
return (0, W.Z)(j.theme.current, j.theme.path), j.anchor === 1 && K.classList.add("vditor-reset--anchor"), (0, b.O)(K, j.hljs), (0, f.s)(j.hljs, K, j.cdn), (0, _.H)(K, { cdn: j.cdn, math: j.math }), (0, M.i)(K, j.cdn, j.mode), (0, E.K)(K, j.cdn, j.mode), (0, s.P)(K, j.cdn), (0, u.v)(K, j.cdn), (0, c.p)(K, j.cdn, j.mode), (0, k.P)(K, j.cdn, j.mode), (0, x.B)(K, j.cdn), (0, l.Q)(K, j.cdn), j.render.media.enable && (0, S.Y)(K), j.speech.enable && le(K), j.anchor !== 0 && (Ne = j.anchor, document.querySelectorAll(".vditor-anchor").forEach(function(pe) {
|
|
692
692
|
Ne === 1 && pe.classList.add("vditor-anchor--left"), pe.onclick = function() {
|
|
693
693
|
var ue = pe.getAttribute("href").substr(1), Q = document.getElementById("vditorAnchor-" + ue).offsetTop;
|
|
694
694
|
document.querySelector("html").scrollTop = Q;
|
|
@@ -711,7 +711,7 @@ var Kn = { exports: {} };
|
|
|
711
711
|
const bt = function() {
|
|
712
712
|
function K() {
|
|
713
713
|
}
|
|
714
|
-
return K.adapterRender = m, K.previewImage = T.E, K.codeRender = b.O, K.graphvizRender = u.v, K.highlightRender = f.s, K.mathRender = _.H, K.mermaidRender = M.i, K.markmapRender = E.K, K.flowchartRender = s.P, K.chartRender = c.p, K.abcRender = l.Q, K.mindmapRender = k.P, K.plantumlRender = x.B, K.outlineRender = p.k, K.mediaRender = S.Y, K.speechRender =
|
|
714
|
+
return K.adapterRender = m, K.previewImage = T.E, K.codeRender = b.O, K.graphvizRender = u.v, K.highlightRender = f.s, K.mathRender = _.H, K.mermaidRender = M.i, K.markmapRender = E.K, K.flowchartRender = s.P, K.chartRender = c.p, K.abcRender = l.Q, K.mindmapRender = k.P, K.plantumlRender = x.B, K.outlineRender = p.k, K.mediaRender = S.Y, K.speechRender = le, K.lazyLoadImageRender = w, K.md2html = $e, K.preview = Ce, K.setCodeTheme = Ve.Y, K.setContentTheme = W.Z, K;
|
|
715
715
|
}();
|
|
716
716
|
}, 54: (Z, L, y) => {
|
|
717
717
|
y.d(L, { H: () => l, g: () => m });
|
|
@@ -891,13 +891,13 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
891
891
|
var _ = window.markmap, S = _.Transformer, M = _.Markmap, E = _.deriveOptions, k = (_.globalCSS, new S());
|
|
892
892
|
f.innerHTML = '<svg style="width:100%"></svg>';
|
|
893
893
|
var p = f.firstChild, x = M.create(p, null), I = function(ne, me) {
|
|
894
|
-
var de = ne.transform(me),
|
|
894
|
+
var de = ne.transform(me), le = Object.keys(de.features).filter(function(Ce) {
|
|
895
895
|
return !b[Ce];
|
|
896
896
|
});
|
|
897
|
-
|
|
897
|
+
le.forEach(function(Ce) {
|
|
898
898
|
b[Ce] = !0;
|
|
899
899
|
});
|
|
900
|
-
var ve = ne.getAssets(
|
|
900
|
+
var ve = ne.getAssets(le), xe = ve.styles, Me = ve.scripts, $e = window.markmap;
|
|
901
901
|
return xe && $e.loadCSS(xe), Me && $e.loadJS(Me), de;
|
|
902
902
|
}(k, w), W = I.root, N = I.frontmatter, $ = E(N == null ? void 0 : N.markmap);
|
|
903
903
|
x.setData(W, $), x.fit();
|
|
@@ -1545,7 +1545,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
1545
1545
|
};
|
|
1546
1546
|
var Se = {};
|
|
1547
1547
|
return (() => {
|
|
1548
|
-
J.d(Se, { default: () =>
|
|
1548
|
+
J.d(Se, { default: () => hi });
|
|
1549
1549
|
var Z, L = J(872), y = J(54), l = J(51), m = function(e) {
|
|
1550
1550
|
return e.currentMode === "sv" ? (0, l.X)((e.sv.element.textContent + `
|
|
1551
1551
|
`).replace(/\n\n$/, `
|
|
@@ -1613,11 +1613,11 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
1613
1613
|
});
|
|
1614
1614
|
}, p = J(827), x = J(64), I = function(e, t, n, i) {
|
|
1615
1615
|
i && console.log(e + " - " + n + ": " + t);
|
|
1616
|
-
}, W = J(478), N = J(314), $ = J(730), ne = J(66), me = J(218), de = J(702),
|
|
1616
|
+
}, W = J(478), N = J(314), $ = J(730), ne = J(66), me = J(218), de = J(702), le = J(466), ve = J(40), xe = J(563), Me = J(749), $e = J(408), Ce = function(e, t) {
|
|
1617
1617
|
if (e)
|
|
1618
1618
|
if (e.parentElement.getAttribute("data-type") !== "html-block") {
|
|
1619
1619
|
var n = e.firstElementChild.className.replace("language-", "");
|
|
1620
|
-
n === "abc" ? (0, W.Q)(e, t.options.cdn) : n === "mermaid" ? (0, ve.i)(e, t.options.cdn, t.options.theme) : n === "markmap" ? (0, xe.K)(e, t.options.cdn, t.options.theme) : n === "flowchart" ? (0, ne.P)(e, t.options.cdn) : n === "echarts" ? (0, N.p)(e, t.options.cdn, t.options.theme) : n === "mindmap" ? (0, Me.P)(e, t.options.cdn, t.options.theme) : n === "plantuml" ? (0, $e.B)(e, t.options.cdn) : n === "graphviz" ? (0, me.v)(e, t.options.cdn) : n === "math" ? (0,
|
|
1620
|
+
n === "abc" ? (0, W.Q)(e, t.options.cdn) : n === "mermaid" ? (0, ve.i)(e, t.options.cdn, t.options.theme) : n === "markmap" ? (0, xe.K)(e, t.options.cdn, t.options.theme) : n === "flowchart" ? (0, ne.P)(e, t.options.cdn) : n === "echarts" ? (0, N.p)(e, t.options.cdn, t.options.theme) : n === "mindmap" ? (0, Me.P)(e, t.options.cdn, t.options.theme) : n === "plantuml" ? (0, $e.B)(e, t.options.cdn) : n === "graphviz" ? (0, me.v)(e, t.options.cdn) : n === "math" ? (0, le.H)(e, { cdn: t.options.cdn, math: t.options.preview.math }) : t.options.customRenders.find(function(i) {
|
|
1621
1621
|
if (i.language === n)
|
|
1622
1622
|
return i.render(e, t), !0;
|
|
1623
1623
|
}) || ((0, de.s)(Object.assign({}, t.options.preview.hljs), e, t.options.cdn), (0, $.O)(e, t.options.preview.hljs)), e.setAttribute("data-render", "1");
|
|
@@ -1627,7 +1627,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
1627
1627
|
if (e.currentMode !== "sv") {
|
|
1628
1628
|
var t = e[e.currentMode].element, n = e.outline.render(e);
|
|
1629
1629
|
n === "" && (n = "[ToC]"), t.querySelectorAll('[data-type="toc-block"]').forEach(function(i) {
|
|
1630
|
-
i.innerHTML = n, (0,
|
|
1630
|
+
i.innerHTML = n, (0, le.H)(i, { cdn: e.options.cdn, math: e.options.preview.math });
|
|
1631
1631
|
});
|
|
1632
1632
|
}
|
|
1633
1633
|
}, bt = function(e, t) {
|
|
@@ -1871,7 +1871,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
1871
1871
|
function Ke() {
|
|
1872
1872
|
window.removeEventListener("resize", Z);
|
|
1873
1873
|
}
|
|
1874
|
-
var Xe, en,
|
|
1874
|
+
var Xe, en, Kn = function(e) {
|
|
1875
1875
|
Q(e), Ke(), window.addEventListener("resize", Z = function() {
|
|
1876
1876
|
ue(e), Q(e);
|
|
1877
1877
|
});
|
|
@@ -2212,7 +2212,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2212
2212
|
i.innerHTML = e.lute.Md2VditorDOM(t), i.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(r) {
|
|
2213
2213
|
Ce(r, e), r.previousElementSibling.setAttribute("style", "display:none");
|
|
2214
2214
|
}), we(e, n);
|
|
2215
|
-
},
|
|
2215
|
+
}, Fn = function(e, t, n) {
|
|
2216
2216
|
for (var i = e.startContainer.parentElement, r = !1, o = "", a = "", d = function(C) {
|
|
2217
2217
|
var R = nn(C.startContainer), q = tn(C.startContainer), D = C.startContainer.textContent, B = C.startOffset, P = "", H = "";
|
|
2218
2218
|
return (D.substr(0, B) !== "" && D.substr(0, B) !== y.g.ZWSP || R) && (P = "" + R + D.substr(0, B)), (D.substr(B) !== "" && D.substr(B) !== y.g.ZWSP || q) && (H = "" + D.substr(B) + q), { afterHTML: H, beforeHTML: P };
|
|
@@ -2252,7 +2252,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2252
2252
|
var D = (0, p.lG)(C.startContainer, "CODE");
|
|
2253
2253
|
D || (D = C.startContainer.childNodes[C.startOffset]), D && (D.outerHTML = D.innerHTML.replace(y.g.ZWSP, "") + "<wbr>", (0, T.ib)(g.wysiwyg.element, C));
|
|
2254
2254
|
} else
|
|
2255
|
-
R === "link" ? (C.collapsed && C.selectNode(C.startContainer.parentElement), document.execCommand("unlink", !1, "")) : R === "check" || R === "list" || R === "ordered-list" ? (Lt(g, C, R), (0, T.ib)(g.wysiwyg.element, C), O = !1, h.classList.remove("vditor-menu--current")) : (O = !1, h.classList.remove("vditor-menu--current"), C.toString() === "" ?
|
|
2255
|
+
R === "link" ? (C.collapsed && C.selectNode(C.startContainer.parentElement), document.execCommand("unlink", !1, "")) : R === "check" || R === "list" || R === "ordered-list" ? (Lt(g, C, R), (0, T.ib)(g.wysiwyg.element, C), O = !1, h.classList.remove("vditor-menu--current")) : (O = !1, h.classList.remove("vditor-menu--current"), C.toString() === "" ? Fn(C, g, R) : document.execCommand(R, !1, ""));
|
|
2256
2256
|
else {
|
|
2257
2257
|
g.wysiwyg.element.childNodes.length === 0 && (g.wysiwyg.element.innerHTML = '<p data-block="0"><wbr></p>', (0, T.ib)(g.wysiwyg.element, C));
|
|
2258
2258
|
var B = (0, p.F9)(C.startContainer);
|
|
@@ -2321,9 +2321,9 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2321
2321
|
}
|
|
2322
2322
|
O && Qe(g), U && we(g);
|
|
2323
2323
|
}
|
|
2324
|
-
}(e, i.element.children[0], v) : e.currentMode === "ir" ?
|
|
2324
|
+
}(e, i.element.children[0], v) : e.currentMode === "ir" ? or(e, i.element.children[0], t.prefix || "", t.suffix || "") : Jn(e, i.element.children[0], t.prefix || "", t.suffix || ""));
|
|
2325
2325
|
});
|
|
2326
|
-
},
|
|
2326
|
+
}, Gn = (Xe = function(e, t) {
|
|
2327
2327
|
return Xe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
2328
2328
|
n.__proto__ = i;
|
|
2329
2329
|
} || function(n, i) {
|
|
@@ -2342,11 +2342,11 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2342
2342
|
S(e.toolbar.elements, ["both"]), M(e.toolbar.elements, ["outdent", "indent", "outline", "insert-before", "insert-after"]), e.sv.element.style.display = "none", e.wysiwyg.element.parentElement.style.display = "none", e.ir.element.parentElement.style.display = "block", e.lute.SetVditorIR(!0), e.lute.SetVditorWYSIWYG(!1), e.lute.SetVditorSV(!1), e.currentMode = "ir", e.ir.element.innerHTML = e.lute.Md2VditorIRDOM(i), Fe(e, { enableAddUndoStack: !0, enableHint: !1, enableInput: !1 }), ue(e), e.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(o) {
|
|
2343
2343
|
Ce(o, e);
|
|
2344
2344
|
}), e.ir.element.querySelectorAll(".vditor-toc").forEach(function(o) {
|
|
2345
|
-
(0,
|
|
2345
|
+
(0, le.H)(o, { cdn: e.options.cdn, math: e.options.preview.math });
|
|
2346
2346
|
});
|
|
2347
2347
|
else if (t === "wysiwyg")
|
|
2348
2348
|
S(e.toolbar.elements, ["both"]), M(e.toolbar.elements, ["outdent", "indent", "outline", "insert-before", "insert-after"]), e.sv.element.style.display = "none", e.wysiwyg.element.parentElement.style.display = "block", e.ir.element.parentElement.style.display = "none", e.lute.SetVditorIR(!1), e.lute.SetVditorWYSIWYG(!0), e.lute.SetVditorSV(!1), e.currentMode = "wysiwyg", ue(e), an(e, i, { enableAddUndoStack: !0, enableHint: !1, enableInput: !1 }), e.wysiwyg.element.querySelectorAll(".vditor-toc").forEach(function(o) {
|
|
2349
|
-
(0,
|
|
2349
|
+
(0, le.H)(o, { cdn: e.options.cdn, math: e.options.preview.math });
|
|
2350
2350
|
}), e.wysiwyg.popover.style.display = "none";
|
|
2351
2351
|
else if (t === "sv") {
|
|
2352
2352
|
M(e.toolbar.elements, ["both"]), S(e.toolbar.elements, ["outdent", "indent", "outline", "insert-before", "insert-after"]), e.wysiwyg.element.parentElement.style.display = "none", e.ir.element.parentElement.style.display = "none", (e.options.preview.mode === "both" || e.options.preview.mode === "editor") && (e.sv.element.style.display = "block"), e.lute.SetVditorIR(!1), e.lute.SetVditorWYSIWYG(!1), e.lute.SetVditorSV(!0), e.currentMode = "sv";
|
|
@@ -2357,14 +2357,14 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2357
2357
|
o.classList.remove("vditor-menu--current");
|
|
2358
2358
|
}), e.toolbar.elements["edit-mode"].querySelector('button[data-mode="' + e.currentMode + '"]').classList.add("vditor-menu--current")), e.outline.toggle(e, e.currentMode !== "sv" && e.options.outline.enable, typeof n != "string");
|
|
2359
2359
|
}
|
|
2360
|
-
},
|
|
2360
|
+
}, Zn = function(e) {
|
|
2361
2361
|
function t(n, i) {
|
|
2362
2362
|
var r = e.call(this, n, i) || this, o = document.createElement("div");
|
|
2363
2363
|
return o.className = "vditor-hint" + (i.level === 2 ? "" : " vditor-panel--arrow"), o.innerHTML = '<button data-mode="wysiwyg">' + window.VditorI18n.wysiwyg + " <" + (0, s.ns)("⌥⌘7") + `></button>
|
|
2364
2364
|
<button data-mode="ir">` + window.VditorI18n.instantRendering + " <" + (0, s.ns)("⌥⌘8") + `></button>
|
|
2365
2365
|
<button data-mode="sv">` + window.VditorI18n.splitView + " <" + (0, s.ns)("⌥⌘9") + "></button>", r.element.appendChild(o), r._bindEvent(n, o, i), r;
|
|
2366
2366
|
}
|
|
2367
|
-
return
|
|
2367
|
+
return Gn(t, e), t.prototype._bindEvent = function(n, i, r) {
|
|
2368
2368
|
var o = this.element.children[0];
|
|
2369
2369
|
k(n, i, o, r.level), i.children.item(0).addEventListener((0, s.Le)(), function(a) {
|
|
2370
2370
|
Ye(n, "wysiwyg", a), a.preventDefault(), a.stopPropagation();
|
|
@@ -2448,7 +2448,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2448
2448
|
if (te) {
|
|
2449
2449
|
if (((v = te.previousElementSibling) === null || v === void 0 ? void 0 : v.getAttribute("data-action")) === "enter-remove")
|
|
2450
2450
|
return te.previousElementSibling.remove(), He(r), o.preventDefault(), !0;
|
|
2451
|
-
Y +=
|
|
2451
|
+
Y += $n(te);
|
|
2452
2452
|
}
|
|
2453
2453
|
return A.insertNode(document.createTextNode(Y)), A.collapse(!1), G && G.textContent.trim() !== "" && !X ? oe(r) : He(r), o.preventDefault(), !0;
|
|
2454
2454
|
}
|
|
@@ -2599,10 +2599,10 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2599
2599
|
}
|
|
2600
2600
|
var q = (0, p.lG)(d, "TD") || (0, p.lG)(d, "TH");
|
|
2601
2601
|
if (o.key.indexOf("Arrow") > -1 && q) {
|
|
2602
|
-
var D =
|
|
2602
|
+
var D = rr(q);
|
|
2603
2603
|
if (D && at(r, o, a, q, D))
|
|
2604
2604
|
return !0;
|
|
2605
|
-
var B =
|
|
2605
|
+
var B = ir(q);
|
|
2606
2606
|
if (B && ht(r, o, a, q, B))
|
|
2607
2607
|
return !0;
|
|
2608
2608
|
}
|
|
@@ -2691,7 +2691,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2691
2691
|
return I("SpinVditorSVDOM", e, "argument", t.options.debugger), e = "<div data-block='0'>" + t.lute.SpinVditorSVDOM(e).replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g, `<span data-type="newline"><br /><span style="display: none">
|
|
2692
2692
|
</span></span><span data-type="newline"><br /><span style="display: none">
|
|
2693
2693
|
</span></span></div><div data-block="0"><`) + "</div>", I("SpinVditorSVDOM", e, "result", t.options.debugger), e;
|
|
2694
|
-
},
|
|
2694
|
+
}, $n = function(e) {
|
|
2695
2695
|
var t = e.getAttribute("data-type"), n = e.previousElementSibling, i = t && t !== "text" && t !== "table" && t !== "heading-marker" && t !== "newline" && t !== "yaml-front-matter-open-marker" && t !== "yaml-front-matter-close-marker" && t !== "code-block-info" && t !== "code-block-close-marker" && t !== "code-block-open-marker" ? e.textContent : "", r = !1;
|
|
2696
2696
|
for (t === "newline" && (r = !0); n && !r; ) {
|
|
2697
2697
|
var o = n.getAttribute("data-type");
|
|
@@ -2720,7 +2720,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2720
2720
|
var n = (0, T.zh)(e), i = (0, x.S)(n.startContainer, "SPAN");
|
|
2721
2721
|
i && i.textContent.trim() !== "" && (t = `
|
|
2722
2722
|
` + t), n.collapse(!0), document.execCommand("insertHTML", !1, t);
|
|
2723
|
-
},
|
|
2723
|
+
}, Jn = function(e, t, n, i) {
|
|
2724
2724
|
var r = (0, T.zh)(e), o = t.getAttribute("data-type");
|
|
2725
2725
|
e.sv.element.childNodes.length === 0 && (e.sv.element.innerHTML = `<span data-type="p" data-block="0"><span data-type="text"><wbr></span></span><span data-type="newline"><br><span style="display: none">
|
|
2726
2726
|
</span></span>`, (0, T.ib)(e.sv.element, r));
|
|
@@ -2758,7 +2758,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2758
2758
|
e.options.upload.setHeaders && (e.options.upload.headers = e.options.upload.setHeaders()), e.options.upload.headers && Object.keys(e.options.upload.headers).forEach(function(n) {
|
|
2759
2759
|
t.setRequestHeader(n, e.options.upload.headers[n]);
|
|
2760
2760
|
});
|
|
2761
|
-
},
|
|
2761
|
+
}, Xn = function(e, t, n, i) {
|
|
2762
2762
|
return new (n || (n = Promise))(function(r, o) {
|
|
2763
2763
|
function a(g) {
|
|
2764
2764
|
try {
|
|
@@ -2782,7 +2782,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2782
2782
|
}
|
|
2783
2783
|
v((i = i.apply(e, [])).next());
|
|
2784
2784
|
});
|
|
2785
|
-
},
|
|
2785
|
+
}, Qn = function(e, t) {
|
|
2786
2786
|
var n, i, r, o, a = { label: 0, sent: function() {
|
|
2787
2787
|
if (1 & r[0])
|
|
2788
2788
|
throw r[1];
|
|
@@ -2845,12 +2845,12 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2845
2845
|
}([v, g]);
|
|
2846
2846
|
};
|
|
2847
2847
|
}
|
|
2848
|
-
},
|
|
2848
|
+
}, Yn = function() {
|
|
2849
2849
|
this.isUploading = !1, this.element = document.createElement("div"), this.element.className = "vditor-upload";
|
|
2850
2850
|
}, Ut = function(e, t, n) {
|
|
2851
|
-
return
|
|
2851
|
+
return Xn(void 0, void 0, void 0, function() {
|
|
2852
2852
|
var i, r, o, a, d, v, g, h, A, O, U, C, R, q;
|
|
2853
|
-
return
|
|
2853
|
+
return Qn(this, function(D) {
|
|
2854
2854
|
switch (D.label) {
|
|
2855
2855
|
case 0:
|
|
2856
2856
|
for (i = [], r = e.options.upload.multiple === !0 ? t.length : 1, C = 0; C < r; C++)
|
|
@@ -2993,9 +2993,9 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
2993
2993
|
}), n && (n.inputType === "deleteContentBackward" || n.inputType === "deleteContentForward") && e.options.comment.enable && (e.wysiwyg.triggerRemoveComment(e), e.options.comment.adjustTop(e.wysiwyg.getComments(e, !0)));
|
|
2994
2994
|
}
|
|
2995
2995
|
Ve(e), we(e, { enableAddUndoStack: !0, enableHint: !0, enableInput: !0 });
|
|
2996
|
-
},
|
|
2996
|
+
}, er = function(e, t) {
|
|
2997
2997
|
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
|
|
2998
|
-
},
|
|
2998
|
+
}, tr = function(e, t, n, i) {
|
|
2999
2999
|
return new (n || (n = Promise))(function(r, o) {
|
|
3000
3000
|
function a(g) {
|
|
3001
3001
|
try {
|
|
@@ -3019,7 +3019,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3019
3019
|
}
|
|
3020
3020
|
v((i = i.apply(e, [])).next());
|
|
3021
3021
|
});
|
|
3022
|
-
},
|
|
3022
|
+
}, nr = function(e, t) {
|
|
3023
3023
|
var n, i, r, o, a = { label: 0, sent: function() {
|
|
3024
3024
|
if (1 & r[0])
|
|
3025
3025
|
throw r[1];
|
|
@@ -3107,10 +3107,10 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3107
3107
|
var n = (0, T.zh)(e), i = (0, p.F9)(n.startContainer);
|
|
3108
3108
|
i && (i.insertAdjacentHTML(t, '<p data-block="0">' + y.g.ZWSP + `<wbr>
|
|
3109
3109
|
</p>`), (0, T.ib)(e[e.currentMode].element, n), ot(e), ae(e));
|
|
3110
|
-
},
|
|
3110
|
+
}, rr = function(e) {
|
|
3111
3111
|
var t = (0, p.lG)(e, "TABLE");
|
|
3112
3112
|
return !(!t || !t.rows[0].cells[0].isSameNode(e)) && t;
|
|
3113
|
-
},
|
|
3113
|
+
}, ir = function(e) {
|
|
3114
3114
|
var t = (0, p.lG)(e, "TABLE");
|
|
3115
3115
|
return !(!t || !t.lastElementChild.lastElementChild.lastElementChild.isSameNode(e)) && t;
|
|
3116
3116
|
}, vn = function(e, t, n) {
|
|
@@ -3250,7 +3250,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3250
3250
|
}, bn = function(e, t, n, i) {
|
|
3251
3251
|
if (n) {
|
|
3252
3252
|
if (!(0, s.yl)(e) && !e.altKey && e.key === "Enter") {
|
|
3253
|
-
var r = String.raw(en || (en =
|
|
3253
|
+
var r = String.raw(en || (en = er(["", ""], ["", ""])), n.textContent).replace(/\\\|/g, "").trim(), o = r.split("|");
|
|
3254
3254
|
if (r.startsWith("|") && r.endsWith("|") && o.length > 3) {
|
|
3255
3255
|
var a = o.map(function() {
|
|
3256
3256
|
return "---";
|
|
@@ -3487,9 +3487,9 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3487
3487
|
}
|
|
3488
3488
|
return !(e.key !== "ArrowDown" || !t || ((r = t.nextElementSibling) === null || r === void 0 ? void 0 : r.tagName) !== "TABLE") && (n.selectNodeContents(t.nextElementSibling.rows[0].cells[0]), n.collapse(!0), e.preventDefault(), !0);
|
|
3489
3489
|
}, Mt = function(e, t, n) {
|
|
3490
|
-
return
|
|
3490
|
+
return tr(void 0, void 0, void 0, function() {
|
|
3491
3491
|
var i, r, o, a, d, v, g, h, A, O, U, C, R, q, D, B;
|
|
3492
|
-
return
|
|
3492
|
+
return nr(this, function(P) {
|
|
3493
3493
|
switch (P.label) {
|
|
3494
3494
|
case 0:
|
|
3495
3495
|
return e[e.currentMode].element.getAttribute("contenteditable") !== "true" ? [2] : (t.stopPropagation(), t.preventDefault(), "clipboardData" in t ? (i = t.clipboardData.getData("text/html"), r = t.clipboardData.getData("text/plain"), o = t.clipboardData.files) : (i = t.dataTransfer.getData("text/html"), r = t.dataTransfer.getData("text/plain"), t.dataTransfer.types.includes("Files") && (o = t.dataTransfer.items)), a = {}, d = function(H, G) {
|
|
@@ -3601,7 +3601,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3601
3601
|
var r = document.createElement("div");
|
|
3602
3602
|
r.innerHTML = t.lute.SpinVditorIRDOM(i.outerHTML), i.outerHTML = r.firstElementChild.innerHTML.trim();
|
|
3603
3603
|
}
|
|
3604
|
-
},
|
|
3604
|
+
}, or = function(e, t, n, i) {
|
|
3605
3605
|
var r = (0, T.zh)(e), o = t.getAttribute("data-type"), a = r.startContainer;
|
|
3606
3606
|
a.nodeType === 3 && (a = a.parentElement);
|
|
3607
3607
|
var d = !0;
|
|
@@ -3643,7 +3643,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3643
3643
|
o !== "check" && o !== "list" && o !== "ordered-list" || (Lt(e, r, o, !1), d = !1, u(e.toolbar.elements, ["check", "list", "ordered-list"]), t.classList.add("vditor-menu--current"));
|
|
3644
3644
|
}
|
|
3645
3645
|
(0, T.ib)(e.ir.element, r), Fe(e), d && ut(e);
|
|
3646
|
-
},
|
|
3646
|
+
}, ar = function(e, t, n, i) {
|
|
3647
3647
|
return new (n || (n = Promise))(function(r, o) {
|
|
3648
3648
|
function a(g) {
|
|
3649
3649
|
try {
|
|
@@ -3667,7 +3667,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3667
3667
|
}
|
|
3668
3668
|
v((i = i.apply(e, [])).next());
|
|
3669
3669
|
});
|
|
3670
|
-
},
|
|
3670
|
+
}, sr = function(e, t) {
|
|
3671
3671
|
var n, i, r, o, a = { label: 0, sent: function() {
|
|
3672
3672
|
if (1 & r[0])
|
|
3673
3673
|
throw r[1];
|
|
@@ -3730,7 +3730,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3730
3730
|
}([v, g]);
|
|
3731
3731
|
};
|
|
3732
3732
|
}
|
|
3733
|
-
},
|
|
3733
|
+
}, lr = function() {
|
|
3734
3734
|
function e(t) {
|
|
3735
3735
|
var n = this;
|
|
3736
3736
|
this.splitChar = "", this.lastIndex = -1, this.fillEmoji = function(i, r) {
|
|
@@ -3773,9 +3773,9 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3773
3773
|
} else
|
|
3774
3774
|
t.options.hint.extend.forEach(function(v) {
|
|
3775
3775
|
v.key === n.splitChar && (clearTimeout(n.timeId), n.timeId = window.setTimeout(function() {
|
|
3776
|
-
return
|
|
3776
|
+
return ar(n, void 0, void 0, function() {
|
|
3777
3777
|
var g;
|
|
3778
|
-
return
|
|
3778
|
+
return sr(this, function(h) {
|
|
3779
3779
|
switch (h.label) {
|
|
3780
3780
|
case 0:
|
|
3781
3781
|
return g = this.genHTML, [4, v.hint(o)];
|
|
@@ -3843,7 +3843,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3843
3843
|
}
|
|
3844
3844
|
return i;
|
|
3845
3845
|
}, e;
|
|
3846
|
-
}(),
|
|
3846
|
+
}(), cr = function() {
|
|
3847
3847
|
function e(t) {
|
|
3848
3848
|
this.composingLock = !1;
|
|
3849
3849
|
var n = document.createElement("div");
|
|
@@ -3914,7 +3914,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3914
3914
|
}, e;
|
|
3915
3915
|
}(), Nn = function(e) {
|
|
3916
3916
|
return e.currentMode === "sv" ? e.lute.Md2HTML(m(e)) : e.currentMode === "wysiwyg" ? e.lute.VditorDOM2HTML(e.wysiwyg.element.innerHTML) : e.currentMode === "ir" ? e.lute.VditorIRDOM2HTML(e.ir.element.innerHTML) : void 0;
|
|
3917
|
-
},
|
|
3917
|
+
}, dr = J(895), Dn = J(818), ur = function() {
|
|
3918
3918
|
function e(t) {
|
|
3919
3919
|
this.element = document.createElement("div"), this.element.className = "vditor-outline", this.element.innerHTML = '<div class="vditor-outline__title">' + t + `</div>
|
|
3920
3920
|
<div class="vditor-outline__content"></div>`;
|
|
@@ -3931,7 +3931,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
3931
3931
|
}
|
|
3932
3932
|
ue(t);
|
|
3933
3933
|
}, e;
|
|
3934
|
-
}(),
|
|
3934
|
+
}(), pr = J(554), mr = function() {
|
|
3935
3935
|
function e(t) {
|
|
3936
3936
|
var n = this;
|
|
3937
3937
|
this.element = document.createElement("div"), this.element.className = "vditor-preview", this.previewElement = document.createElement("div"), this.previewElement.className = "vditor-reset", t.options.classes.preview && this.previewElement.classList.add(t.options.classes.preview), this.previewElement.style.maxWidth = t.options.preview.maxWidth + "px", this.previewElement.addEventListener("copy", function(v) {
|
|
@@ -4025,13 +4025,13 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4025
4025
|
var i = (/* @__PURE__ */ new Date()).getTime() - n;
|
|
4026
4026
|
(/* @__PURE__ */ new Date()).getTime() - n > 2600 ? (t.tip.show(window.VditorI18n.performanceTip.replace("${x}", i.toString())), t.preview.element.setAttribute("data-type", "renderPerformance")) : t.preview.element.getAttribute("data-type") === "renderPerformance" && (t.tip.hide(), t.preview.element.removeAttribute("data-type"));
|
|
4027
4027
|
var r = t.preview.element.querySelector(".vditor-comment--focus");
|
|
4028
|
-
r && r.classList.remove("vditor-comment--focus"), (0, $.O)(t.preview.previewElement, t.options.preview.hljs), (0, de.s)(t.options.preview.hljs, t.preview.previewElement, t.options.cdn), (0, ve.i)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, xe.K)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, ne.P)(t.preview.previewElement, t.options.cdn), (0, me.v)(t.preview.previewElement, t.options.cdn), (0, N.p)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, Me.P)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, $e.B)(t.preview.previewElement, t.options.cdn), (0, W.Q)(t.preview.previewElement, t.options.cdn), t.options.preview.render.media.enable && (0,
|
|
4028
|
+
r && r.classList.remove("vditor-comment--focus"), (0, $.O)(t.preview.previewElement, t.options.preview.hljs), (0, de.s)(t.options.preview.hljs, t.preview.previewElement, t.options.cdn), (0, ve.i)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, xe.K)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, ne.P)(t.preview.previewElement, t.options.cdn), (0, me.v)(t.preview.previewElement, t.options.cdn), (0, N.p)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, Me.P)(t.preview.previewElement, t.options.cdn, t.options.theme), (0, $e.B)(t.preview.previewElement, t.options.cdn), (0, W.Q)(t.preview.previewElement, t.options.cdn), t.options.preview.render.media.enable && (0, pr.Y)(t.preview.previewElement), t.options.customRenders.forEach(function(d) {
|
|
4029
4029
|
d.render(t.preview.previewElement, t);
|
|
4030
4030
|
});
|
|
4031
4031
|
var o = t.preview.element, a = t.outline.render(t);
|
|
4032
4032
|
a === "" && (a = "[ToC]"), o.querySelectorAll('[data-type="toc-block"]').forEach(function(d) {
|
|
4033
|
-
d.innerHTML = a, (0,
|
|
4034
|
-
}), (0,
|
|
4033
|
+
d.innerHTML = a, (0, le.H)(d, { cdn: t.options.cdn, math: t.options.preview.math });
|
|
4034
|
+
}), (0, le.H)(t.preview.previewElement, { cdn: t.options.cdn, math: t.options.preview.math });
|
|
4035
4035
|
}, e.prototype.copyToX = function(t, n, i) {
|
|
4036
4036
|
i === void 0 && (i = "mp-wechat"), i !== "zhihu" ? n.querySelectorAll(".katex-html .base").forEach(function(o) {
|
|
4037
4037
|
o.style.display = "initial";
|
|
@@ -4043,7 +4043,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4043
4043
|
var r = n.ownerDocument.createRange();
|
|
4044
4044
|
r.selectNode(n), (0, T.Hc)(r), document.execCommand("copy"), n.remove(), t.tip.show(["zhihu", "mp-wechat"].includes(i) ? "已复制,可到" + (i === "zhihu" ? "知乎" : "微信公众号平台") + "进行粘贴" : "已复制到剪切板");
|
|
4045
4045
|
}, e;
|
|
4046
|
-
}(),
|
|
4046
|
+
}(), fr = function() {
|
|
4047
4047
|
function e(t) {
|
|
4048
4048
|
this.element = document.createElement("div"), this.element.className = "vditor-resize vditor-resize--" + t.options.resize.position, this.element.innerHTML = '<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>', this.bindEvent(t);
|
|
4049
4049
|
}
|
|
@@ -4060,7 +4060,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4060
4060
|
};
|
|
4061
4061
|
});
|
|
4062
4062
|
}, e;
|
|
4063
|
-
}(),
|
|
4063
|
+
}(), hr = function() {
|
|
4064
4064
|
function e(t) {
|
|
4065
4065
|
this.composingLock = !1, this.element = document.createElement("pre"), this.element.className = "vditor-sv vditor-reset", this.element.setAttribute("placeholder", t.options.placeholder), this.element.setAttribute("contenteditable", "true"), this.element.setAttribute("spellcheck", "false"), this.bindEvent(t), It(t, this.element), jt(t, this.element), Bt(t, this.element), Vt(t, this.element), Rt(t, this.element), Pt(t, this.element, this.copy), qt(t, this.element, this.copy);
|
|
4066
4066
|
}
|
|
@@ -4117,7 +4117,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4117
4117
|
}
|
|
4118
4118
|
t.devtools && t.devtools.renderEchart(t);
|
|
4119
4119
|
}
|
|
4120
|
-
},
|
|
4120
|
+
}, vr = /* @__PURE__ */ function() {
|
|
4121
4121
|
var e = function(t, n) {
|
|
4122
4122
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4123
4123
|
i.__proto__ = r;
|
|
@@ -4132,17 +4132,17 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4132
4132
|
}
|
|
4133
4133
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4134
4134
|
};
|
|
4135
|
-
}(),
|
|
4135
|
+
}(), gr = function(e) {
|
|
4136
4136
|
function t(n, i) {
|
|
4137
4137
|
var r = e.call(this, n, i) || this;
|
|
4138
4138
|
return n.options.preview.mode === "both" && r.element.children[0].classList.add("vditor-menu--current"), r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4139
4139
|
r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || (o.preventDefault(), n.currentMode === "sv" && (n.options.preview.mode === "both" ? Gt("editor", n) : Gt("both", n)));
|
|
4140
4140
|
}), r;
|
|
4141
4141
|
}
|
|
4142
|
-
return
|
|
4143
|
-
}(Le),
|
|
4142
|
+
return vr(t, e), t;
|
|
4143
|
+
}(Le), yr = function() {
|
|
4144
4144
|
this.element = document.createElement("div"), this.element.className = "vditor-toolbar__br";
|
|
4145
|
-
}, In = J(312),
|
|
4145
|
+
}, In = J(312), br = /* @__PURE__ */ function() {
|
|
4146
4146
|
var e = function(t, n) {
|
|
4147
4147
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4148
4148
|
i.__proto__ = r;
|
|
@@ -4157,7 +4157,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4157
4157
|
}
|
|
4158
4158
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4159
4159
|
};
|
|
4160
|
-
}(),
|
|
4160
|
+
}(), wr = function(e) {
|
|
4161
4161
|
function t(n, i) {
|
|
4162
4162
|
var r = e.call(this, n, i) || this, o = r.element.children[0], a = document.createElement("div");
|
|
4163
4163
|
a.className = "vditor-hint" + (i.level === 2 ? "" : " vditor-panel--arrow");
|
|
@@ -4168,8 +4168,8 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4168
4168
|
v.target.tagName === "BUTTON" && (E(n, ["subToolbar"]), n.options.preview.hljs.style = v.target.textContent, (0, In.Y)(v.target.textContent, n.options.cdn), v.preventDefault(), v.stopPropagation());
|
|
4169
4169
|
}), r.element.appendChild(a), k(n, a, o, i.level), r;
|
|
4170
4170
|
}
|
|
4171
|
-
return
|
|
4172
|
-
}(Le),
|
|
4171
|
+
return br(t, e), t;
|
|
4172
|
+
}(Le), Er = /* @__PURE__ */ function() {
|
|
4173
4173
|
var e = function(t, n) {
|
|
4174
4174
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4175
4175
|
i.__proto__ = r;
|
|
@@ -4184,7 +4184,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4184
4184
|
}
|
|
4185
4185
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4186
4186
|
};
|
|
4187
|
-
}(),
|
|
4187
|
+
}(), kr = function(e) {
|
|
4188
4188
|
function t(n, i) {
|
|
4189
4189
|
var r = e.call(this, n, i) || this, o = r.element.children[0], a = document.createElement("div");
|
|
4190
4190
|
a.className = "vditor-hint" + (i.level === 2 ? "" : " vditor-panel--arrow");
|
|
@@ -4195,8 +4195,8 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4195
4195
|
v.target.tagName === "BUTTON" && (E(n, ["subToolbar"]), n.options.preview.theme.current = v.target.getAttribute("data-type"), (0, Ne.Z)(n.options.preview.theme.current, n.options.preview.theme.path), v.preventDefault(), v.stopPropagation());
|
|
4196
4196
|
}), r.element.appendChild(a), k(n, a, o, i.level), r;
|
|
4197
4197
|
}
|
|
4198
|
-
return
|
|
4199
|
-
}(Le),
|
|
4198
|
+
return Er(t, e), t;
|
|
4199
|
+
}(Le), Sr = function() {
|
|
4200
4200
|
function e(t) {
|
|
4201
4201
|
this.element = document.createElement("span"), this.element.className = "vditor-counter vditor-tooltipped vditor-tooltipped__nw", this.render(t, "");
|
|
4202
4202
|
}
|
|
@@ -4211,7 +4211,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4211
4211
|
}
|
|
4212
4212
|
typeof t.options.counter.max == "number" ? (i > t.options.counter.max ? this.element.className = "vditor-counter vditor-counter--error" : this.element.className = "vditor-counter", this.element.innerHTML = i + "/" + t.options.counter.max) : this.element.innerHTML = "" + i, this.element.setAttribute("aria-label", t.options.counter.type), t.options.counter.after && t.options.counter.after(i, { enable: t.options.counter.enable, max: t.options.counter.max, type: t.options.counter.type });
|
|
4213
4213
|
}, e;
|
|
4214
|
-
}(),
|
|
4214
|
+
}(), Lr = /* @__PURE__ */ function() {
|
|
4215
4215
|
var e = function(t, n) {
|
|
4216
4216
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4217
4217
|
i.__proto__ = r;
|
|
@@ -4226,15 +4226,15 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4226
4226
|
}
|
|
4227
4227
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4228
4228
|
};
|
|
4229
|
-
}(),
|
|
4229
|
+
}(), _r = function(e) {
|
|
4230
4230
|
function t(n, i) {
|
|
4231
4231
|
var r = e.call(this, n, i) || this;
|
|
4232
4232
|
return r.element.children[0].innerHTML = i.icon, r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4233
4233
|
o.preventDefault(), o.currentTarget.classList.contains(y.g.CLASS_MENU_DISABLED) || i.click(o, n);
|
|
4234
4234
|
}), r;
|
|
4235
4235
|
}
|
|
4236
|
-
return
|
|
4237
|
-
}(Le),
|
|
4236
|
+
return Lr(t, e), t;
|
|
4237
|
+
}(Le), Cr = /* @__PURE__ */ function() {
|
|
4238
4238
|
var e = function(t, n) {
|
|
4239
4239
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4240
4240
|
i.__proto__ = r;
|
|
@@ -4249,7 +4249,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4249
4249
|
}
|
|
4250
4250
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4251
4251
|
};
|
|
4252
|
-
}(),
|
|
4252
|
+
}(), Mr = function(e) {
|
|
4253
4253
|
function t(n, i) {
|
|
4254
4254
|
var r = e.call(this, n, i) || this;
|
|
4255
4255
|
return r.element.firstElementChild.addEventListener((0, s.Le)(), function(o) {
|
|
@@ -4257,10 +4257,10 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4257
4257
|
a.classList.contains(y.g.CLASS_MENU_DISABLED) || (o.preventDefault(), a.classList.contains("vditor-menu--current") ? (a.classList.remove("vditor-menu--current"), n.devtools.element.style.display = "none", ue(n)) : (a.classList.add("vditor-menu--current"), n.devtools.element.style.display = "block", ue(n), n.devtools.renderEchart(n)));
|
|
4258
4258
|
}), r;
|
|
4259
4259
|
}
|
|
4260
|
-
return
|
|
4261
|
-
}(Le),
|
|
4260
|
+
return Cr(t, e), t;
|
|
4261
|
+
}(Le), Tr = function() {
|
|
4262
4262
|
this.element = document.createElement("div"), this.element.className = "vditor-toolbar__divider";
|
|
4263
|
-
},
|
|
4263
|
+
}, Ar = /* @__PURE__ */ function() {
|
|
4264
4264
|
var e = function(t, n) {
|
|
4265
4265
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4266
4266
|
i.__proto__ = r;
|
|
@@ -4275,7 +4275,7 @@ onclick="this.previousElementSibling.select();document.execCommand('copy');this.
|
|
|
4275
4275
|
}
|
|
4276
4276
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4277
4277
|
};
|
|
4278
|
-
}(),
|
|
4278
|
+
}(), xr = function(e) {
|
|
4279
4279
|
function t(n, i) {
|
|
4280
4280
|
var r = e.call(this, n, i) || this, o = document.createElement("div");
|
|
4281
4281
|
o.className = "vditor-panel vditor-panel--arrow";
|
|
@@ -4289,7 +4289,7 @@ data-value=":` + d + ': " data-key=":' + d + ':" class="vditor-emojis__icon" src
|
|
|
4289
4289
|
<span class="vditor-emojis__tip"></span><span>` + (n.options.hint.emojiTail || "") + `</span>
|
|
4290
4290
|
</div>`, r.element.appendChild(o), k(n, o, r.element.firstElementChild, i.level), r.bindEvent(n), r;
|
|
4291
4291
|
}
|
|
4292
|
-
return
|
|
4292
|
+
return Ar(t, e), t.prototype.bindEvent = function(n) {
|
|
4293
4293
|
var i = this;
|
|
4294
4294
|
this.element.lastElementChild.addEventListener((0, s.Le)(), function(r) {
|
|
4295
4295
|
var o = (0, x.S)(r.target, "BUTTON");
|
|
@@ -4311,7 +4311,7 @@ data-value=":` + d + ': " data-key=":' + d + ':" class="vditor-emojis__icon" src
|
|
|
4311
4311
|
}(Le), jn = function(e, t, n) {
|
|
4312
4312
|
var i = document.createElement("a");
|
|
4313
4313
|
"download" in i ? (i.download = n, i.style.display = "none", i.href = URL.createObjectURL(new Blob([t])), document.body.appendChild(i), i.click(), i.remove()) : e.tip.show(window.VditorI18n.downloadTip, 0);
|
|
4314
|
-
},
|
|
4314
|
+
}, Hr = /* @__PURE__ */ function() {
|
|
4315
4315
|
var e = function(t, n) {
|
|
4316
4316
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4317
4317
|
i.__proto__ = r;
|
|
@@ -4326,7 +4326,7 @@ data-value=":` + d + ': " data-key=":' + d + ':" class="vditor-emojis__icon" src
|
|
|
4326
4326
|
}
|
|
4327
4327
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4328
4328
|
};
|
|
4329
|
-
}(),
|
|
4329
|
+
}(), Nr = function(e) {
|
|
4330
4330
|
function t(n, i) {
|
|
4331
4331
|
var r = e.call(this, n, i) || this, o = r.element.children[0], a = document.createElement("div");
|
|
4332
4332
|
return a.className = "vditor-hint" + (i.level === 2 ? "" : " vditor-panel--arrow"), a.innerHTML = `<button data-type="markdown">Markdown</button>
|
|
@@ -4404,8 +4404,8 @@ window.addEventListener("message", (e) => {
|
|
|
4404
4404
|
}
|
|
4405
4405
|
}), r.element.appendChild(a), k(n, a, o, i.level), r;
|
|
4406
4406
|
}
|
|
4407
|
-
return
|
|
4408
|
-
}(Le),
|
|
4407
|
+
return Hr(t, e), t;
|
|
4408
|
+
}(Le), Dr = /* @__PURE__ */ function() {
|
|
4409
4409
|
var e = function(t, n) {
|
|
4410
4410
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4411
4411
|
i.__proto__ = r;
|
|
@@ -4420,12 +4420,12 @@ window.addEventListener("message", (e) => {
|
|
|
4420
4420
|
}
|
|
4421
4421
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4422
4422
|
};
|
|
4423
|
-
}(),
|
|
4423
|
+
}(), Or = function(e) {
|
|
4424
4424
|
function t(n, i) {
|
|
4425
4425
|
var r = e.call(this, n, i) || this;
|
|
4426
4426
|
return r._bindEvent(n, i), r;
|
|
4427
4427
|
}
|
|
4428
|
-
return
|
|
4428
|
+
return Dr(t, e), t.prototype._bindEvent = function(n, i) {
|
|
4429
4429
|
this.element.children[0].addEventListener((0, s.Le)(), function(r) {
|
|
4430
4430
|
r.preventDefault(), n.element.className.includes("vditor--fullscreen") ? (i.level || (this.innerHTML = i.icon), n.element.style.zIndex = "", document.body.style.overflow = "", n.element.classList.remove("vditor--fullscreen"), Object.keys(n.toolbar.elements).forEach(function(o) {
|
|
4431
4431
|
var a = n.toolbar.elements[o].firstChild;
|
|
@@ -4438,7 +4438,7 @@ window.addEventListener("message", (e) => {
|
|
|
4438
4438
|
}), n.counter && (n.counter.element.className = n.counter.element.className.replace("__n", "__s"))), n.devtools && n.devtools.renderEchart(n), i.click && i.click(r, n), ue(n), Q(n);
|
|
4439
4439
|
});
|
|
4440
4440
|
}, t;
|
|
4441
|
-
}(Le),
|
|
4441
|
+
}(Le), Ir = /* @__PURE__ */ function() {
|
|
4442
4442
|
var e = function(t, n) {
|
|
4443
4443
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4444
4444
|
i.__proto__ = r;
|
|
@@ -4453,7 +4453,7 @@ window.addEventListener("message", (e) => {
|
|
|
4453
4453
|
}
|
|
4454
4454
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4455
4455
|
};
|
|
4456
|
-
}(),
|
|
4456
|
+
}(), jr = function(e) {
|
|
4457
4457
|
function t(n, i) {
|
|
4458
4458
|
var r = e.call(this, n, i) || this, o = document.createElement("div");
|
|
4459
4459
|
return o.className = "vditor-hint vditor-panel--arrow", o.innerHTML = '<button data-tag="h1" data-value="# ">' + window.VditorI18n.heading1 + " " + (0, s.ns)("<⌥⌘1>") + `</button>
|
|
@@ -4463,7 +4463,7 @@ window.addEventListener("message", (e) => {
|
|
|
4463
4463
|
<button data-tag="h5" data-value="##### ">` + window.VditorI18n.heading5 + " <" + (0, s.ns)("⌥⌘5") + `></button>
|
|
4464
4464
|
<button data-tag="h6" data-value="###### ">` + window.VditorI18n.heading6 + " <" + (0, s.ns)("⌥⌘6") + "></button>", r.element.appendChild(o), r._bindEvent(n, o), r;
|
|
4465
4465
|
}
|
|
4466
|
-
return
|
|
4466
|
+
return Ir(t, e), t.prototype._bindEvent = function(n, i) {
|
|
4467
4467
|
var r = this.element.children[0];
|
|
4468
4468
|
r.addEventListener((0, s.Le)(), function(a) {
|
|
4469
4469
|
a.preventDefault(), clearTimeout(n.wysiwyg.afterRenderTimeoutId), clearTimeout(n.ir.processTimeoutId), clearTimeout(n.sv.processTimeoutId), r.classList.contains(y.g.CLASS_MENU_DISABLED) || (r.blur(), r.classList.contains("vditor-menu--current") ? (n.currentMode === "wysiwyg" ? (Dt(n), we(n)) : n.currentMode === "ir" && vt(n, ""), r.classList.remove("vditor-menu--current")) : (E(n, ["subToolbar"]), i.style.display = "block"));
|
|
@@ -4473,7 +4473,7 @@ window.addEventListener("message", (e) => {
|
|
|
4473
4473
|
a.preventDefault(), n.currentMode === "wysiwyg" ? (wt(n, a.target.getAttribute("data-tag")), we(n), r.classList.add("vditor-menu--current")) : n.currentMode === "ir" ? (vt(n, a.target.getAttribute("data-value")), r.classList.add("vditor-menu--current")) : dn(n, a.target.getAttribute("data-value")), i.style.display = "none";
|
|
4474
4474
|
});
|
|
4475
4475
|
}, t;
|
|
4476
|
-
}(Le),
|
|
4476
|
+
}(Le), Rr = /* @__PURE__ */ function() {
|
|
4477
4477
|
var e = function(t, n) {
|
|
4478
4478
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4479
4479
|
i.__proto__ = r;
|
|
@@ -4488,7 +4488,7 @@ window.addEventListener("message", (e) => {
|
|
|
4488
4488
|
}
|
|
4489
4489
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4490
4490
|
};
|
|
4491
|
-
}(),
|
|
4491
|
+
}(), Pr = function(e) {
|
|
4492
4492
|
function t(n, i) {
|
|
4493
4493
|
var r = e.call(this, n, i) || this;
|
|
4494
4494
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
@@ -4513,8 +4513,8 @@ window.addEventListener("message", (e) => {
|
|
|
4513
4513
|
</div></div>`, 0);
|
|
4514
4514
|
}), r;
|
|
4515
4515
|
}
|
|
4516
|
-
return
|
|
4517
|
-
}(Le),
|
|
4516
|
+
return Rr(t, e), t;
|
|
4517
|
+
}(Le), qr = /* @__PURE__ */ function() {
|
|
4518
4518
|
var e = function(t, n) {
|
|
4519
4519
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4520
4520
|
i.__proto__ = r;
|
|
@@ -4529,7 +4529,7 @@ window.addEventListener("message", (e) => {
|
|
|
4529
4529
|
}
|
|
4530
4530
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4531
4531
|
};
|
|
4532
|
-
}(),
|
|
4532
|
+
}(), Br = function(e) {
|
|
4533
4533
|
function t(n, i) {
|
|
4534
4534
|
var r = e.call(this, n, i) || this;
|
|
4535
4535
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
@@ -4539,8 +4539,8 @@ window.addEventListener("message", (e) => {
|
|
|
4539
4539
|
}
|
|
4540
4540
|
}), r;
|
|
4541
4541
|
}
|
|
4542
|
-
return
|
|
4543
|
-
}(Le),
|
|
4542
|
+
return qr(t, e), t;
|
|
4543
|
+
}(Le), Vr = /* @__PURE__ */ function() {
|
|
4544
4544
|
var e = function(t, n) {
|
|
4545
4545
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4546
4546
|
i.__proto__ = r;
|
|
@@ -4555,7 +4555,7 @@ window.addEventListener("message", (e) => {
|
|
|
4555
4555
|
}
|
|
4556
4556
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4557
4557
|
};
|
|
4558
|
-
}(),
|
|
4558
|
+
}(), Ur = function(e) {
|
|
4559
4559
|
function t(n, i) {
|
|
4560
4560
|
var r = e.call(this, n, i) || this;
|
|
4561
4561
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
@@ -4592,8 +4592,8 @@ window.addEventListener("message", (e) => {
|
|
|
4592
4592
|
</div>`, 0);
|
|
4593
4593
|
}), r;
|
|
4594
4594
|
}
|
|
4595
|
-
return
|
|
4596
|
-
}(Le),
|
|
4595
|
+
return Vr(t, e), t;
|
|
4596
|
+
}(Le), Wr = /* @__PURE__ */ function() {
|
|
4597
4597
|
var e = function(t, n) {
|
|
4598
4598
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4599
4599
|
i.__proto__ = r;
|
|
@@ -4608,15 +4608,15 @@ window.addEventListener("message", (e) => {
|
|
|
4608
4608
|
}
|
|
4609
4609
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4610
4610
|
};
|
|
4611
|
-
}(),
|
|
4611
|
+
}(), zr = function(e) {
|
|
4612
4612
|
function t(n, i) {
|
|
4613
4613
|
var r = e.call(this, n, i) || this;
|
|
4614
4614
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4615
4615
|
o.preventDefault(), r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || n.currentMode === "sv" || St(n, "afterend");
|
|
4616
4616
|
}), r;
|
|
4617
4617
|
}
|
|
4618
|
-
return
|
|
4619
|
-
}(Le),
|
|
4618
|
+
return Wr(t, e), t;
|
|
4619
|
+
}(Le), Kr = /* @__PURE__ */ function() {
|
|
4620
4620
|
var e = function(t, n) {
|
|
4621
4621
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4622
4622
|
i.__proto__ = r;
|
|
@@ -4631,15 +4631,15 @@ window.addEventListener("message", (e) => {
|
|
|
4631
4631
|
}
|
|
4632
4632
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4633
4633
|
};
|
|
4634
|
-
}(),
|
|
4634
|
+
}(), Fr = function(e) {
|
|
4635
4635
|
function t(n, i) {
|
|
4636
4636
|
var r = e.call(this, n, i) || this;
|
|
4637
4637
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4638
4638
|
o.preventDefault(), r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || n.currentMode === "sv" || St(n, "beforebegin");
|
|
4639
4639
|
}), r;
|
|
4640
4640
|
}
|
|
4641
|
-
return
|
|
4642
|
-
}(Le),
|
|
4641
|
+
return Kr(t, e), t;
|
|
4642
|
+
}(Le), Gr = /* @__PURE__ */ function() {
|
|
4643
4643
|
var e = function(t, n) {
|
|
4644
4644
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4645
4645
|
i.__proto__ = r;
|
|
@@ -4654,7 +4654,7 @@ window.addEventListener("message", (e) => {
|
|
|
4654
4654
|
}
|
|
4655
4655
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4656
4656
|
};
|
|
4657
|
-
}(),
|
|
4657
|
+
}(), Zr = function(e) {
|
|
4658
4658
|
function t(n, i) {
|
|
4659
4659
|
var r = e.call(this, n, i) || this;
|
|
4660
4660
|
return r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
@@ -4664,8 +4664,8 @@ window.addEventListener("message", (e) => {
|
|
|
4664
4664
|
}
|
|
4665
4665
|
}), r;
|
|
4666
4666
|
}
|
|
4667
|
-
return
|
|
4668
|
-
}(Le),
|
|
4667
|
+
return Gr(t, e), t;
|
|
4668
|
+
}(Le), $r = /* @__PURE__ */ function() {
|
|
4669
4669
|
var e = function(t, n) {
|
|
4670
4670
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4671
4671
|
i.__proto__ = r;
|
|
@@ -4680,15 +4680,15 @@ window.addEventListener("message", (e) => {
|
|
|
4680
4680
|
}
|
|
4681
4681
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4682
4682
|
};
|
|
4683
|
-
}(),
|
|
4683
|
+
}(), Jr = function(e) {
|
|
4684
4684
|
function t(n, i) {
|
|
4685
4685
|
var r = e.call(this, n, i) || this;
|
|
4686
4686
|
return n.options.outline && r.element.firstElementChild.classList.add("vditor-menu--current"), r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4687
4687
|
o.preventDefault(), n.toolbar.elements.outline.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || (n.options.outline.enable = !r.element.firstElementChild.classList.contains("vditor-menu--current"), n.outline.toggle(n, n.options.outline.enable));
|
|
4688
4688
|
}), r;
|
|
4689
4689
|
}
|
|
4690
|
-
return
|
|
4691
|
-
}(Le),
|
|
4690
|
+
return $r(t, e), t;
|
|
4691
|
+
}(Le), Xr = /* @__PURE__ */ function() {
|
|
4692
4692
|
var e = function(t, n) {
|
|
4693
4693
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4694
4694
|
i.__proto__ = r;
|
|
@@ -4703,12 +4703,12 @@ window.addEventListener("message", (e) => {
|
|
|
4703
4703
|
}
|
|
4704
4704
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4705
4705
|
};
|
|
4706
|
-
}(),
|
|
4706
|
+
}(), Qr = function(e) {
|
|
4707
4707
|
function t(n, i) {
|
|
4708
4708
|
var r = e.call(this, n, i) || this;
|
|
4709
4709
|
return r._bindEvent(n), r;
|
|
4710
4710
|
}
|
|
4711
|
-
return
|
|
4711
|
+
return Xr(t, e), t.prototype._bindEvent = function(n) {
|
|
4712
4712
|
var i = this;
|
|
4713
4713
|
this.element.children[0].addEventListener((0, s.Le)(), function(r) {
|
|
4714
4714
|
r.preventDefault();
|
|
@@ -4721,7 +4721,7 @@ window.addEventListener("message", (e) => {
|
|
|
4721
4721
|
}
|
|
4722
4722
|
});
|
|
4723
4723
|
}, t;
|
|
4724
|
-
}(Le),
|
|
4724
|
+
}(Le), Yr = function() {
|
|
4725
4725
|
function e(t) {
|
|
4726
4726
|
var n;
|
|
4727
4727
|
if (this.SAMPLE_RATE = 5e3, this.isRecording = !1, this.readyFlag = !1, this.leftChannel = [], this.rightChannel = [], this.recordingLength = 0, typeof AudioContext < "u")
|
|
@@ -4771,7 +4771,7 @@ window.addEventListener("message", (e) => {
|
|
|
4771
4771
|
for (var r = i.length, o = 0; o < r; o++)
|
|
4772
4772
|
t.setUint8(n + o, i.charCodeAt(o));
|
|
4773
4773
|
}, e;
|
|
4774
|
-
}(),
|
|
4774
|
+
}(), ei = /* @__PURE__ */ function() {
|
|
4775
4775
|
var e = function(t, n) {
|
|
4776
4776
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4777
4777
|
i.__proto__ = r;
|
|
@@ -4786,12 +4786,12 @@ window.addEventListener("message", (e) => {
|
|
|
4786
4786
|
}
|
|
4787
4787
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4788
4788
|
};
|
|
4789
|
-
}(),
|
|
4789
|
+
}(), ti = function(e) {
|
|
4790
4790
|
function t(n, i) {
|
|
4791
4791
|
var r = e.call(this, n, i) || this;
|
|
4792
4792
|
return r._bindEvent(n), r;
|
|
4793
4793
|
}
|
|
4794
|
-
return
|
|
4794
|
+
return ei(t, e), t.prototype._bindEvent = function(n) {
|
|
4795
4795
|
var i, r = this;
|
|
4796
4796
|
this.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4797
4797
|
if (o.preventDefault(), !r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED)) {
|
|
@@ -4805,7 +4805,7 @@ window.addEventListener("message", (e) => {
|
|
|
4805
4805
|
n.tip.show(window.VditorI18n.recording), a.setAttribute("contenteditable", "false"), i.startRecordingNewWavFile(), r.element.children[0].classList.add("vditor-menu--current");
|
|
4806
4806
|
else
|
|
4807
4807
|
navigator.mediaDevices.getUserMedia({ audio: !0 }).then(function(v) {
|
|
4808
|
-
(i = new
|
|
4808
|
+
(i = new Yr(v)).recorder.onaudioprocess = function(g) {
|
|
4809
4809
|
if (i.isRecording) {
|
|
4810
4810
|
var h = g.inputBuffer.getChannelData(0), A = g.inputBuffer.getChannelData(1);
|
|
4811
4811
|
i.cloneChannelData(h, A);
|
|
@@ -4817,7 +4817,7 @@ window.addEventListener("message", (e) => {
|
|
|
4817
4817
|
}
|
|
4818
4818
|
});
|
|
4819
4819
|
}, t;
|
|
4820
|
-
}(Le),
|
|
4820
|
+
}(Le), ni = /* @__PURE__ */ function() {
|
|
4821
4821
|
var e = function(t, n) {
|
|
4822
4822
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4823
4823
|
i.__proto__ = r;
|
|
@@ -4832,15 +4832,15 @@ window.addEventListener("message", (e) => {
|
|
|
4832
4832
|
}
|
|
4833
4833
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4834
4834
|
};
|
|
4835
|
-
}(),
|
|
4835
|
+
}(), ri = function(e) {
|
|
4836
4836
|
function t(n, i) {
|
|
4837
4837
|
var r = e.call(this, n, i) || this;
|
|
4838
4838
|
return _({ redo: r.element }, ["redo"]), r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4839
4839
|
o.preventDefault(), r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || n.undo.redo(n);
|
|
4840
4840
|
}), r;
|
|
4841
4841
|
}
|
|
4842
|
-
return
|
|
4843
|
-
}(Le),
|
|
4842
|
+
return ni(t, e), t;
|
|
4843
|
+
}(Le), ii = /* @__PURE__ */ function() {
|
|
4844
4844
|
var e = function(t, n) {
|
|
4845
4845
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4846
4846
|
i.__proto__ = r;
|
|
@@ -4855,15 +4855,15 @@ window.addEventListener("message", (e) => {
|
|
|
4855
4855
|
}
|
|
4856
4856
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4857
4857
|
};
|
|
4858
|
-
}(),
|
|
4858
|
+
}(), oi = function(e) {
|
|
4859
4859
|
function t(n, i) {
|
|
4860
4860
|
var r = e.call(this, n, i) || this;
|
|
4861
4861
|
return _({ undo: r.element }, ["undo"]), r.element.children[0].addEventListener((0, s.Le)(), function(o) {
|
|
4862
4862
|
o.preventDefault(), r.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED) || n.undo.undo(n);
|
|
4863
4863
|
}), r;
|
|
4864
4864
|
}
|
|
4865
|
-
return
|
|
4866
|
-
}(Le),
|
|
4865
|
+
return ii(t, e), t;
|
|
4866
|
+
}(Le), ai = /* @__PURE__ */ function() {
|
|
4867
4867
|
var e = function(t, n) {
|
|
4868
4868
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
4869
4869
|
i.__proto__ = r;
|
|
@@ -4878,12 +4878,12 @@ window.addEventListener("message", (e) => {
|
|
|
4878
4878
|
}
|
|
4879
4879
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
4880
4880
|
};
|
|
4881
|
-
}(),
|
|
4881
|
+
}(), si = function(e) {
|
|
4882
4882
|
function t(n, i) {
|
|
4883
4883
|
var r = e.call(this, n, i) || this, o = '<input type="file"';
|
|
4884
4884
|
return n.options.upload.multiple && (o += ' multiple="multiple"'), n.options.upload.accept && (o += ' accept="' + n.options.upload.accept + '"'), r.element.children[0].innerHTML = "" + (i.icon || '<svg><use xlink:href="#vditor-icon-upload"></use></svg>') + o + ">", r._bindEvent(n), r;
|
|
4885
4885
|
}
|
|
4886
|
-
return
|
|
4886
|
+
return ai(t, e), t.prototype._bindEvent = function(n) {
|
|
4887
4887
|
var i = this;
|
|
4888
4888
|
this.element.children[0].addEventListener((0, s.Le)(), function(r) {
|
|
4889
4889
|
if (i.element.firstElementChild.classList.contains(y.g.CLASS_MENU_DISABLED))
|
|
@@ -4894,7 +4894,7 @@ window.addEventListener("message", (e) => {
|
|
|
4894
4894
|
r.target.files.length !== 0 && Ut(n, r.target.files, r.target);
|
|
4895
4895
|
});
|
|
4896
4896
|
}, t;
|
|
4897
|
-
}(Le),
|
|
4897
|
+
}(Le), li = function() {
|
|
4898
4898
|
function e(t) {
|
|
4899
4899
|
var n = this, i = t.options;
|
|
4900
4900
|
this.elements = {}, this.element = document.createElement("div"), this.element.className = "vditor-toolbar", i.toolbar.forEach(function(r, o) {
|
|
@@ -4907,7 +4907,7 @@ window.addEventListener("message", (e) => {
|
|
|
4907
4907
|
v.level = 2, d.appendChild(n.genItem(t, v, o + g));
|
|
4908
4908
|
}), a.appendChild(d), k(t, d, a.children[0]);
|
|
4909
4909
|
}
|
|
4910
|
-
}), t.options.toolbarConfig.hide && this.element.classList.add("vditor-toolbar--hide"), t.options.toolbarConfig.pin && this.element.classList.add("vditor-toolbar--pin"), t.options.counter.enable && (t.counter = new
|
|
4910
|
+
}), t.options.toolbarConfig.hide && this.element.classList.add("vditor-toolbar--hide"), t.options.toolbarConfig.pin && this.element.classList.add("vditor-toolbar--pin"), t.options.counter.enable && (t.counter = new Sr(t), this.element.appendChild(t.counter.element));
|
|
4911
4911
|
}
|
|
4912
4912
|
return e.prototype.genItem = function(t, n, i) {
|
|
4913
4913
|
var r;
|
|
@@ -4928,85 +4928,85 @@ window.addEventListener("message", (e) => {
|
|
|
4928
4928
|
r = new Le(t, n);
|
|
4929
4929
|
break;
|
|
4930
4930
|
case "emoji":
|
|
4931
|
-
r = new
|
|
4931
|
+
r = new xr(t, n);
|
|
4932
4932
|
break;
|
|
4933
4933
|
case "headings":
|
|
4934
|
-
r = new
|
|
4934
|
+
r = new jr(t, n);
|
|
4935
4935
|
break;
|
|
4936
4936
|
case "|":
|
|
4937
|
-
r = new
|
|
4937
|
+
r = new Tr();
|
|
4938
4938
|
break;
|
|
4939
4939
|
case "br":
|
|
4940
|
-
r = new
|
|
4940
|
+
r = new yr();
|
|
4941
4941
|
break;
|
|
4942
4942
|
case "undo":
|
|
4943
|
-
r = new
|
|
4943
|
+
r = new oi(t, n);
|
|
4944
4944
|
break;
|
|
4945
4945
|
case "redo":
|
|
4946
|
-
r = new
|
|
4946
|
+
r = new ri(t, n);
|
|
4947
4947
|
break;
|
|
4948
4948
|
case "help":
|
|
4949
|
-
r = new
|
|
4949
|
+
r = new Pr(t, n);
|
|
4950
4950
|
break;
|
|
4951
4951
|
case "both":
|
|
4952
|
-
r = new
|
|
4952
|
+
r = new gr(t, n);
|
|
4953
4953
|
break;
|
|
4954
4954
|
case "preview":
|
|
4955
|
-
r = new
|
|
4955
|
+
r = new Qr(t, n);
|
|
4956
4956
|
break;
|
|
4957
4957
|
case "fullscreen":
|
|
4958
|
-
r = new
|
|
4958
|
+
r = new Or(t, n);
|
|
4959
4959
|
break;
|
|
4960
4960
|
case "upload":
|
|
4961
|
-
r = new
|
|
4961
|
+
r = new si(t, n);
|
|
4962
4962
|
break;
|
|
4963
4963
|
case "record":
|
|
4964
|
-
r = new
|
|
4964
|
+
r = new ti(t, n);
|
|
4965
4965
|
break;
|
|
4966
4966
|
case "info":
|
|
4967
|
-
r = new
|
|
4967
|
+
r = new Ur(t, n);
|
|
4968
4968
|
break;
|
|
4969
4969
|
case "edit-mode":
|
|
4970
|
-
r = new
|
|
4970
|
+
r = new Zn(t, n);
|
|
4971
4971
|
break;
|
|
4972
4972
|
case "devtools":
|
|
4973
|
-
r = new
|
|
4973
|
+
r = new Mr(t, n);
|
|
4974
4974
|
break;
|
|
4975
4975
|
case "outdent":
|
|
4976
|
-
r = new
|
|
4976
|
+
r = new Zr(t, n);
|
|
4977
4977
|
break;
|
|
4978
4978
|
case "indent":
|
|
4979
|
-
r = new
|
|
4979
|
+
r = new Br(t, n);
|
|
4980
4980
|
break;
|
|
4981
4981
|
case "outline":
|
|
4982
|
-
r = new
|
|
4982
|
+
r = new Jr(t, n);
|
|
4983
4983
|
break;
|
|
4984
4984
|
case "insert-after":
|
|
4985
|
-
r = new
|
|
4985
|
+
r = new zr(t, n);
|
|
4986
4986
|
break;
|
|
4987
4987
|
case "insert-before":
|
|
4988
|
-
r = new
|
|
4988
|
+
r = new Fr(t, n);
|
|
4989
4989
|
break;
|
|
4990
4990
|
case "code-theme":
|
|
4991
|
-
r = new
|
|
4991
|
+
r = new wr(t, n);
|
|
4992
4992
|
break;
|
|
4993
4993
|
case "content-theme":
|
|
4994
|
-
r = new
|
|
4994
|
+
r = new kr(t, n);
|
|
4995
4995
|
break;
|
|
4996
4996
|
case "export":
|
|
4997
|
-
r = new
|
|
4997
|
+
r = new Nr(t, n);
|
|
4998
4998
|
break;
|
|
4999
4999
|
default:
|
|
5000
|
-
r = new
|
|
5000
|
+
r = new _r(t, n);
|
|
5001
5001
|
}
|
|
5002
5002
|
if (r) {
|
|
5003
5003
|
var o = n.name;
|
|
5004
5004
|
return o !== "br" && o !== "|" || (o += i), this.elements[o] = r.element, r.element;
|
|
5005
5005
|
}
|
|
5006
5006
|
}, e;
|
|
5007
|
-
}(),
|
|
5007
|
+
}(), ci = J(471), di = function() {
|
|
5008
5008
|
function e() {
|
|
5009
|
-
this.stackSize = 50, this.resetStack(), this.dmp = new
|
|
5009
|
+
this.stackSize = 50, this.resetStack(), this.dmp = new ci();
|
|
5010
5010
|
}
|
|
5011
5011
|
return e.prototype.clearStack = function(t) {
|
|
5012
5012
|
this.resetStack(), this.resetIcon(t);
|
|
@@ -5072,7 +5072,7 @@ window.addEventListener("message", (e) => {
|
|
|
5072
5072
|
d.remove();
|
|
5073
5073
|
}), n && i && (0, T.Hc)(i), a.replace('<span class="vditor-wbr"></span>', "<wbr>");
|
|
5074
5074
|
}, e;
|
|
5075
|
-
}(),
|
|
5075
|
+
}(), ui = J(640), pi = function() {
|
|
5076
5076
|
function e(t) {
|
|
5077
5077
|
this.defaultOptions = { rtl: !1, after: void 0, cache: { enable: !0 }, cdn: y.g.CDN, classes: { preview: "" }, comment: { enable: !1 }, counter: { enable: !1, type: "markdown" }, customRenders: [], debugger: !1, fullscreen: { index: 90 }, height: "auto", hint: { delay: 200, emoji: { "+1": "👍", "-1": "👎", confused: "😕", eyes: "👀️", heart: "❤️", rocket: "🚀️", smile: "😄", tada: "🎉️" }, emojiPath: y.g.CDN + "/dist/images/emoji", extend: [], parse: !0 }, icon: "ant", lang: "zh_CN", mode: "ir", outline: { enable: !1, position: "left" }, placeholder: "", preview: { actions: ["desktop", "tablet", "mobile", "mp-wechat", "zhihu"], delay: 1e3, hljs: y.g.HLJS_OPTIONS, markdown: y.g.MARKDOWN_OPTIONS, math: y.g.MATH_OPTIONS, maxWidth: 800, mode: "both", theme: y.g.THEME_OPTIONS, render: { media: { enable: !0 } } }, link: { isOpen: !0 }, image: { isPreview: !0 }, resize: { enable: !1, position: "bottom" }, theme: "classic", toolbar: ["emoji", "headings", "bold", "italic", "strike", "link", "|", "list", "ordered-list", "check", "outdent", "indent", "|", "quote", "line", "code", "inline-code", "insert-before", "insert-after", "|", "upload", "record", "table", "|", "undo", "redo", "|", "fullscreen", "edit-mode", { name: "more", toolbar: ["both", "code-theme", "content-theme", "export", "outline", "preview", "devtools", "info", "help"] }], toolbarConfig: { hide: !1, pin: !1 }, typewriterMode: !1, undoDelay: 800, upload: { extraData: {}, fieldName: "file[]", filename: function(n) {
|
|
5078
5078
|
return n.replace(/\W/g, "");
|
|
@@ -5081,7 +5081,7 @@ window.addEventListener("message", (e) => {
|
|
|
5081
5081
|
return e.prototype.merge = function() {
|
|
5082
5082
|
var t, n, i, r, o, a, d, v, g;
|
|
5083
5083
|
this.options && (this.options.toolbar ? this.options.toolbar = this.mergeToolbar(this.options.toolbar) : this.options.toolbar = this.mergeToolbar(this.defaultOptions.toolbar), !((n = (t = this.options.preview) === null || t === void 0 ? void 0 : t.theme) === null || n === void 0) && n.list && (this.defaultOptions.preview.theme.list = this.options.preview.theme.list), !((o = (r = (i = this.options.preview) === null || i === void 0 ? void 0 : i.render) === null || r === void 0 ? void 0 : r.media) === null || o === void 0) && o.enable && (this.defaultOptions.preview.render.media.enable = this.options.preview.render.media.enable), !((a = this.options.hint) === null || a === void 0) && a.emoji && (this.defaultOptions.hint.emoji = this.options.hint.emoji), this.options.comment && (this.defaultOptions.comment = this.options.comment), this.options.cdn && (!((v = (d = this.options.preview) === null || d === void 0 ? void 0 : d.theme) === null || v === void 0) && v.path || (this.defaultOptions.preview.theme.path = this.options.cdn + "/dist/css/content-theme"), !((g = this.options.hint) === null || g === void 0) && g.emojiPath || (this.defaultOptions.hint.emojiPath = this.options.cdn + "/dist/images/emoji")));
|
|
5084
|
-
var h = (0,
|
|
5084
|
+
var h = (0, ui.T)(this.defaultOptions, this.options);
|
|
5085
5085
|
if (h.cache.enable && !h.cache.id)
|
|
5086
5086
|
throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");
|
|
5087
5087
|
return h;
|
|
@@ -5097,7 +5097,7 @@ window.addEventListener("message", (e) => {
|
|
|
5097
5097
|
}), o.toolbar && (a.toolbar = n.mergeToolbar(o.toolbar)), r.push(a);
|
|
5098
5098
|
}), r;
|
|
5099
5099
|
}, e;
|
|
5100
|
-
}(),
|
|
5100
|
+
}(), mi = function() {
|
|
5101
5101
|
function e(t) {
|
|
5102
5102
|
var n = this;
|
|
5103
5103
|
this.composingLock = !1, this.commentIds = [];
|
|
@@ -5323,7 +5323,7 @@ window.addEventListener("message", (e) => {
|
|
|
5323
5323
|
}
|
|
5324
5324
|
});
|
|
5325
5325
|
}, e;
|
|
5326
|
-
}(),
|
|
5326
|
+
}(), fi = /* @__PURE__ */ function() {
|
|
5327
5327
|
var e = function(t, n) {
|
|
5328
5328
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
5329
5329
|
i.__proto__ = r;
|
|
@@ -5339,7 +5339,7 @@ window.addEventListener("message", (e) => {
|
|
|
5339
5339
|
e(t, n), t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
5340
5340
|
};
|
|
5341
5341
|
}();
|
|
5342
|
-
const
|
|
5342
|
+
const hi = function(e) {
|
|
5343
5343
|
function t(n, i) {
|
|
5344
5344
|
var r = e.call(this) || this;
|
|
5345
5345
|
if (r.version = y.H, typeof n == "string") {
|
|
@@ -5347,7 +5347,7 @@ window.addEventListener("message", (e) => {
|
|
|
5347
5347
|
return r.showErrorTip("Failed to get element by id: " + n), r;
|
|
5348
5348
|
n = document.getElementById(n);
|
|
5349
5349
|
}
|
|
5350
|
-
var o = new
|
|
5350
|
+
var o = new pi(i).merge();
|
|
5351
5351
|
if (o.i18n)
|
|
5352
5352
|
window.VditorI18n = o.i18n, r.init(n, o);
|
|
5353
5353
|
else {
|
|
@@ -5364,7 +5364,7 @@ window.addEventListener("message", (e) => {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
return r;
|
|
5366
5366
|
}
|
|
5367
|
-
return
|
|
5367
|
+
return fi(t, e), t.prototype.showErrorTip = function(n) {
|
|
5368
5368
|
var i = new On();
|
|
5369
5369
|
document.body.appendChild(i.element), i.show(n, 0);
|
|
5370
5370
|
}, t.prototype.setTheme = function(n, i, r, o) {
|
|
@@ -5476,13 +5476,13 @@ window.addEventListener("message", (e) => {
|
|
|
5476
5476
|
}
|
|
5477
5477
|
}, t.prototype.init = function(n, i) {
|
|
5478
5478
|
var r = this;
|
|
5479
|
-
this.vditor = { currentMode: i.mode, element: n, hint: new
|
|
5480
|
-
r.vditor.lute = (0,
|
|
5479
|
+
this.vditor = { currentMode: i.mode, element: n, hint: new lr(i.hint.extend), lute: void 0, options: i, originalInnerHTML: n.innerHTML, outline: new ur(window.VditorI18n.outline), tip: new On() }, this.vditor.sv = new hr(this.vditor), this.vditor.undo = new di(), this.vditor.wysiwyg = new mi(this.vditor), this.vditor.ir = new cr(this.vditor), this.vditor.toolbar = new li(this.vditor), i.resize.enable && (this.vditor.resize = new fr(this.vditor)), this.vditor.toolbar.elements.devtools && (this.vditor.devtools = new b()), (i.upload.url || i.upload.handler) && (this.vditor.upload = new Yn()), (0, c.G)(i._lutePath || i.cdn + "/dist/js/lute/lute.min.js", "vditorLuteScript").then(function() {
|
|
5480
|
+
r.vditor.lute = (0, dr.X)({ autoSpace: r.vditor.options.preview.markdown.autoSpace, gfmAutoLink: r.vditor.options.preview.markdown.gfmAutoLink, codeBlockPreview: r.vditor.options.preview.markdown.codeBlockPreview, emojiSite: r.vditor.options.hint.emojiPath, emojis: r.vditor.options.hint.emoji, fixTermTypo: r.vditor.options.preview.markdown.fixTermTypo, footnotes: r.vditor.options.preview.markdown.footnotes, headingAnchor: !1, inlineMathDigit: r.vditor.options.preview.math.inlineDigit, linkBase: r.vditor.options.preview.markdown.linkBase, linkPrefix: r.vditor.options.preview.markdown.linkPrefix, listStyle: r.vditor.options.preview.markdown.listStyle, mark: r.vditor.options.preview.markdown.mark, mathBlockPreview: r.vditor.options.preview.markdown.mathBlockPreview, paragraphBeginningSpace: r.vditor.options.preview.markdown.paragraphBeginningSpace, sanitize: r.vditor.options.preview.markdown.sanitize, toc: r.vditor.options.preview.markdown.toc }), r.vditor.preview = new mr(r.vditor), function(o) {
|
|
5481
5481
|
o.element.innerHTML = "", o.element.classList.add("vditor"), o.options.rtl && o.element.setAttribute("dir", "rtl"), pe(o), (0, Ne.Z)(o.options.preview.theme.current, o.options.preview.theme.path), typeof o.options.height == "number" ? o.element.style.height = o.options.height + "px" : o.element.style.height = o.options.height, typeof o.options.minHeight == "number" && (o.element.style.minHeight = o.options.minHeight + "px"), typeof o.options.width == "number" ? o.element.style.width = o.options.width + "px" : o.element.style.width = o.options.width, o.element.appendChild(o.toolbar.element);
|
|
5482
5482
|
var a = document.createElement("div");
|
|
5483
5483
|
if (a.className = "vditor-content", o.options.outline.position === "left" && a.appendChild(o.outline.element), a.appendChild(o.wysiwyg.element.parentElement), a.appendChild(o.sv.element), a.appendChild(o.ir.element.parentElement), a.appendChild(o.preview.element), o.toolbar.elements.devtools && a.appendChild(o.devtools.element), o.options.outline.position === "right" && (o.outline.element.classList.add("vditor-outline--right"), a.appendChild(o.outline.element)), o.upload && a.appendChild(o.upload.element), o.options.resize.enable && a.appendChild(o.resize.element), a.appendChild(o.hint.element), a.appendChild(o.tip.element), o.element.appendChild(a), a.addEventListener("click", function() {
|
|
5484
5484
|
E(o, ["subToolbar"]);
|
|
5485
|
-
}), o.toolbar.elements.export && o.element.insertAdjacentHTML("beforeend", '<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'), Ye(o, o.options.mode,
|
|
5485
|
+
}), o.toolbar.elements.export && o.element.insertAdjacentHTML("beforeend", '<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'), Ye(o, o.options.mode, Kn(o)), document.execCommand("DefaultParagraphSeparator", !1, "p"), navigator.userAgent.indexOf("iPhone") > -1 && window.visualViewport !== void 0) {
|
|
5486
5486
|
var d = !1, v = function(g) {
|
|
5487
5487
|
d || (d = !0, requestAnimationFrame(function() {
|
|
5488
5488
|
d = !1;
|
|
@@ -5498,8 +5498,8 @@ window.addEventListener("message", (e) => {
|
|
|
5498
5498
|
}(L.default);
|
|
5499
5499
|
})(), Se = Se.default;
|
|
5500
5500
|
})());
|
|
5501
|
-
})(
|
|
5502
|
-
var Mi =
|
|
5501
|
+
})(zn);
|
|
5502
|
+
var Mi = zn.exports;
|
|
5503
5503
|
const Ti = /* @__PURE__ */ Ci(Mi);
|
|
5504
5504
|
function Yt(fe) {
|
|
5505
5505
|
let he = fe.srcElement;
|
|
@@ -5524,10 +5524,10 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5524
5524
|
props: {
|
|
5525
5525
|
vId: { default: "sus-vditor" },
|
|
5526
5526
|
cache: { type: Boolean, default: !1 },
|
|
5527
|
-
|
|
5527
|
+
reply: {},
|
|
5528
5528
|
emoji: {}
|
|
5529
5529
|
},
|
|
5530
|
-
emits: ["
|
|
5530
|
+
emits: ["on-save", "on-cancel"],
|
|
5531
5531
|
setup(fe, { emit: he }) {
|
|
5532
5532
|
class ke {
|
|
5533
5533
|
constructor() {
|
|
@@ -5542,22 +5542,22 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5542
5542
|
We(this, "parentId", "");
|
|
5543
5543
|
}
|
|
5544
5544
|
}
|
|
5545
|
-
const be = fe, J = he, Se = be.
|
|
5545
|
+
const be = fe, J = he, Se = be.reply.userName, Z = yt("在此处留下你的足迹吧!(支持markdown语法)"), L = yi(new ke()), y = yt(null);
|
|
5546
5546
|
async function l() {
|
|
5547
5547
|
var f, w;
|
|
5548
5548
|
if (!y.value) {
|
|
5549
|
-
J("
|
|
5549
|
+
J("on-save", L);
|
|
5550
5550
|
return;
|
|
5551
5551
|
}
|
|
5552
5552
|
const s = (f = y.value) == null ? void 0 : f.getHTML(), u = (w = y.value) == null ? void 0 : w.getValue();
|
|
5553
|
-
if (L.userWebsite && (L.userWebsite.concat("http://") || L.userWebsite.concat("https://") || (L.userWebsite = "https://" + L.userWebsite)), localStorage.setItem("user", JSON.stringify(L)), be.
|
|
5554
|
-
const _ = be.
|
|
5555
|
-
L.parentId = _ === "0" ? be.
|
|
5553
|
+
if (L.userWebsite && (L.userWebsite.concat("http://") || L.userWebsite.concat("https://") || (L.userWebsite = "https://" + L.userWebsite)), localStorage.setItem("user", JSON.stringify(L)), be.reply.id != "0") {
|
|
5554
|
+
const _ = be.reply.parentId;
|
|
5555
|
+
L.parentId = _ === "0" ? be.reply.id : _, L.replyName = be.reply.userName, Z.value = "@" + Se + ":";
|
|
5556
5556
|
}
|
|
5557
|
-
L.content = s, L.contentMD = u, J("
|
|
5557
|
+
L.content = s, L.contentMD = u, J("on-save", L), y.value.setValue("");
|
|
5558
5558
|
}
|
|
5559
5559
|
function m() {
|
|
5560
|
-
J("
|
|
5560
|
+
J("on-cancel");
|
|
5561
5561
|
}
|
|
5562
5562
|
function c() {
|
|
5563
5563
|
y.value = new Ti(be.vId, {
|
|
@@ -5594,17 +5594,17 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5594
5594
|
L.userName = u.userName, L.userEmail = u.userEmail, L.userWebsite = u.userWebsite, b();
|
|
5595
5595
|
}
|
|
5596
5596
|
}), (s, u) => (qe(), ze("div", xi, [
|
|
5597
|
-
|
|
5598
|
-
|
|
5597
|
+
ce("div", Hi, [
|
|
5598
|
+
ce("img", {
|
|
5599
5599
|
src: L.userAvatar,
|
|
5600
5600
|
class: "sus-avatar",
|
|
5601
5601
|
onerror: xt(Yt)
|
|
5602
5602
|
}, null, 8, Ni)
|
|
5603
5603
|
]),
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
Jt(
|
|
5604
|
+
ce("div", Di, [
|
|
5605
|
+
ce("div", Oi, [
|
|
5606
|
+
ce("div", Ii, [
|
|
5607
|
+
Jt(ce("input", {
|
|
5608
5608
|
class: "sus-input sus-username",
|
|
5609
5609
|
placeholder: "昵称(必填)",
|
|
5610
5610
|
"onUpdate:modelValue": u[0] || (u[0] = (f) => L.userName = f),
|
|
@@ -5613,8 +5613,8 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5613
5613
|
[Xt, L.userName]
|
|
5614
5614
|
])
|
|
5615
5615
|
]),
|
|
5616
|
-
|
|
5617
|
-
Jt(
|
|
5616
|
+
ce("div", ji, [
|
|
5617
|
+
Jt(ce("input", {
|
|
5618
5618
|
class: "sus-input sus-web",
|
|
5619
5619
|
title: "点击昵称时可跳转",
|
|
5620
5620
|
placeholder: "网址",
|
|
@@ -5624,8 +5624,8 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5624
5624
|
[Xt, L.userWebsite]
|
|
5625
5625
|
])
|
|
5626
5626
|
]),
|
|
5627
|
-
|
|
5628
|
-
Jt(
|
|
5627
|
+
ce("div", Ri, [
|
|
5628
|
+
Jt(ce("input", {
|
|
5629
5629
|
onBlur: b,
|
|
5630
5630
|
title: "邮箱仅用于通知回复,不会公开",
|
|
5631
5631
|
class: "sus-input sus-email",
|
|
@@ -5637,17 +5637,17 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5637
5637
|
])
|
|
5638
5638
|
])
|
|
5639
5639
|
]),
|
|
5640
|
-
|
|
5640
|
+
ce("div", {
|
|
5641
5641
|
id: s.vId,
|
|
5642
5642
|
class: "sus-comment__editor h-full w-full"
|
|
5643
5643
|
}, null, 8, Pi),
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5644
|
+
ce("div", { class: "sus-comment__footer" }, [
|
|
5645
|
+
ce("div", { class: "sus-comment__footer-send flex justify-end my-2" }, [
|
|
5646
|
+
ce("button", {
|
|
5647
5647
|
class: "sus-button cancel mx-2",
|
|
5648
5648
|
onClick: m
|
|
5649
5649
|
}, "取消"),
|
|
5650
|
-
|
|
5650
|
+
ce("button", {
|
|
5651
5651
|
class: "sus-button ok",
|
|
5652
5652
|
onClick: l
|
|
5653
5653
|
}, "发送")
|
|
@@ -5661,17 +5661,17 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5661
5661
|
for (const [be, J] of he)
|
|
5662
5662
|
ke[be] = J;
|
|
5663
5663
|
return ke;
|
|
5664
|
-
}, Bi = /* @__PURE__ */ Nt(qi, [["__scopeId", "data-v-
|
|
5664
|
+
}, Bi = /* @__PURE__ */ Nt(qi, [["__scopeId", "data-v-f0c81316"]]), Vi = { class: "sus-item__container flex flex-row" }, Ui = { class: "sus-comment-avatar" }, Wi = ["src", "onerror"], zi = { class: "sus-item__main" }, Ki = { class: "sus-item__user leading-loose" }, Fi = ["href"], Gi = { class: "sus-item__user-date ml-5" }, Zi = { class: "sus-item__content" }, $i = {
|
|
5665
5665
|
key: 0,
|
|
5666
5666
|
class: "sus-item__content-name font-semibold"
|
|
5667
|
-
}, Ji = ["innerHTML"], Xi = { class: "sus-item__info" }, Qi = { class: "sus-item__info-ip" }, Yi = /* @__PURE__ */
|
|
5667
|
+
}, Ji = ["innerHTML"], Xi = { class: "sus-item__info" }, Qi = { class: "sus-item__info-ip" }, Yi = /* @__PURE__ */ wi('<svg class="sus-svg equipment" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" data-v-3c1f21df><defs data-v-3c1f21df><linearGradient id="a2" x1="50%" x2="50%" y1="0%" y2="100%" data-v-3c1f21df><stop offset="0%" stop-color="#FF6680" data-v-3c1f21df></stop><stop offset="100%" stop-color="#E61739" data-v-3c1f21df></stop></linearGradient><filter id="c2" width="118.8%" height="118.8%" x="-9.4%" y="-9.4%" filterUnits="objectBoundingBox" data-v-3c1f21df><feGaussianBlur in="SourceAlpha" result="shadowBlurInner1" stdDeviation="1" data-v-3c1f21df></feGaussianBlur><feOffset dy="-1" in="shadowBlurInner1" result="shadowOffsetInner1" data-v-3c1f21df></feOffset><feComposite in="shadowOffsetInner1" in2="SourceAlpha" k2="-1" k3="1" operator="arithmetic" result="shadowInnerInner1" data-v-3c1f21df></feComposite><feColorMatrix in="shadowInnerInner1" values="0 0 0 0 0.710144928 0 0 0 0 0 0 0 0 0 0.117780134 0 0 0 0.349786932 0" data-v-3c1f21df></feColorMatrix></filter><path id="b2" d="M8 0a8 8 0 100 16A8 8 0 008 0z" data-v-3c1f21df></path></defs><g fill="none" data-v-3c1f21df><use fill="url(#a2)" xlink:href="#b2" data-v-3c1f21df></use><use fill="black" filter="url(#c2)" xlink:href="#b2" data-v-3c1f21df></use><path fill="white" d="M10.473 4C8.275 4 8 5.824 8 5.824S7.726 4 5.528 4c-2.114 0-2.73 2.222-2.472 3.41C3.736 10.55 8 12.75 8 12.75s4.265-2.2 4.945-5.34c.257-1.188-.36-3.41-2.472-3.41" data-v-3c1f21df></path></g></svg><svg class="sus-svg comment" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" fill="none" data-v-3c1f21df><g opacity="1" transform="translate(0 0) rotate(0)" data-v-3c1f21df><mask id="bg-comment-mask-0" fill="white" data-v-3c1f21df><use transform="translate(0 0) rotate(0)" xlink:href="#ahzoo_comment_0" data-v-3c1f21df></use></mask><g mask="url(#bg-comment-mask-0)" data-v-3c1f21df><g opacity="1" transform="translate(0 0) rotate(0)" data-v-3c1f21df><path id="ah1" fill-rule="evenodd" fill="url(#comment_linear_0)" opacity="1" d="M0 8C0 12.42 3.58 16 8 16C12.42 16 16 12.42 16 8C16 3.58 12.42 0 8 0C3.58 0 0 3.58 0 8Z" data-v-3c1f21df></path></g><g opacity="1" transform="translate(2 2) rotate(0)" data-v-3c1f21df><mask id="bg-comment-mask-1" fill="white" data-v-3c1f21df><use transform="translate(0 0) rotate(0)" xlink:href="#ahzoo_comment_1" data-v-3c1f21df></use></mask><g mask="url(#bg-comment-mask-1)" data-v-3c1f21df><path id="ahzoo_comment_path_1" fill-rule="evenodd" style="fill:#FFFFFF;" opacity="1" d="M4.65402 2.58221C2.49402 2.58221 0.744019 3.99221 0.744019 5.73221C0.744019 6.45221 1.04402 7.11222 1.55402 7.64221L1.55402 7.65222L1.31402 8.91222C1.29402 9.01221 1.39402 9.09222 1.48402 9.06222L2.69402 8.64222L2.94402 8.55221C3.45402 8.76221 4.04402 8.87222 4.65402 8.87222C6.82402 8.87222 8.57402 7.46221 8.57402 5.73221C8.57402 3.99221 6.82402 2.58221 4.65402 2.58221Z" data-v-3c1f21df></path><path id="ahzoo_comment_path_2" fill-rule="evenodd" style="fill:#FFFFFF;" opacity="1" d="M10.6503 8.36141C11.0303 7.96141 11.2603 7.47141 11.2603 6.93141C11.2603 5.74141 10.3203 4.65141 8.89029 4.51141C9.20029 4.94141 9.19029 5.55141 9.19029 6.08141C9.19029 7.37141 8.16029 8.56141 6.73029 8.97141C7.19029 9.22141 7.75029 9.27141 8.35029 9.27141C8.80029 9.27141 9.24029 9.18141 9.62029 9.03141L9.81029 9.10141L10.7003 9.41141C10.7703 9.44141 10.8503 9.37141 10.8303 9.30141L10.6603 8.37141L10.6503 8.36141Z" data-v-3c1f21df></path></g></g></g></g><defs data-v-3c1f21df><rect id="ahzoo_comment_0" x="0" y="0" width="16" height="16" data-v-3c1f21df></rect><linearGradient id="comment_linear_0" x1="50%" y1="0%" x2="51%" y2="100%" gradientUnits="objectBoundingBox" data-v-3c1f21df><stop offset="0" stop-color="#1AAFFF" stop-opacity="1" data-v-3c1f21df></stop><stop offset="1" stop-color="#0261DE" stop-opacity="1" data-v-3c1f21df></stop></linearGradient><rect id="ahzoo_comment_1" x="0" y="0" width="12" height="12" data-v-3c1f21df></rect></defs></svg>', 2), eo = [
|
|
5668
5668
|
Yi
|
|
5669
5669
|
], to = /* @__PURE__ */ Ht({
|
|
5670
5670
|
__name: "item",
|
|
5671
5671
|
props: {
|
|
5672
5672
|
comment: {}
|
|
5673
5673
|
},
|
|
5674
|
-
emits: ["
|
|
5674
|
+
emits: ["on-reply"],
|
|
5675
5675
|
setup(fe, { emit: he }) {
|
|
5676
5676
|
const ke = fe, be = yt(), J = yt(!1), Se = he;
|
|
5677
5677
|
function Z() {
|
|
@@ -5681,13 +5681,13 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5681
5681
|
be.value.clientHeight > 110 && (J.value = !0);
|
|
5682
5682
|
}
|
|
5683
5683
|
function y() {
|
|
5684
|
-
Se("
|
|
5684
|
+
Se("on-reply", ke.comment);
|
|
5685
5685
|
}
|
|
5686
5686
|
return Wn(() => {
|
|
5687
5687
|
L();
|
|
5688
5688
|
}), (l, m) => (qe(), ze("div", Vi, [
|
|
5689
|
-
|
|
5690
|
-
|
|
5689
|
+
ce("div", Ui, [
|
|
5690
|
+
ce("img", {
|
|
5691
5691
|
alt: "",
|
|
5692
5692
|
class: "sus-avatar",
|
|
5693
5693
|
loading: "lazy",
|
|
@@ -5696,19 +5696,19 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5696
5696
|
onerror: xt(Yt)
|
|
5697
5697
|
}, null, 8, Wi)
|
|
5698
5698
|
]),
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5699
|
+
ce("div", zi, [
|
|
5700
|
+
ce("div", Ki, [
|
|
5701
|
+
ce("a", {
|
|
5702
5702
|
target: "_blank",
|
|
5703
5703
|
rel: "noreferrer noopener",
|
|
5704
5704
|
href: l.comment.userWebsite,
|
|
5705
|
-
class:
|
|
5705
|
+
class: bi(["sus-item__user-name font-semibold ml-1", { master: l.comment.tagName === "博主" }])
|
|
5706
5706
|
}, tt(l.comment.userName), 11, Fi),
|
|
5707
|
-
|
|
5707
|
+
ce("span", Gi, tt(xt(Ai)(l.comment.createdDate)), 1)
|
|
5708
5708
|
]),
|
|
5709
|
-
|
|
5709
|
+
ce("div", Zi, [
|
|
5710
5710
|
l.comment.replyName ? (qe(), ze("span", $i, "@" + tt(l.comment.replyName) + ":", 1)) : nt("", !0),
|
|
5711
|
-
|
|
5711
|
+
ce("span", {
|
|
5712
5712
|
ref_key: "contentDom",
|
|
5713
5713
|
ref: be,
|
|
5714
5714
|
class: "sus-item__content-text",
|
|
@@ -5720,9 +5720,9 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5720
5720
|
onClick: Z
|
|
5721
5721
|
}, "显示更多")) : nt("", !0)
|
|
5722
5722
|
]),
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5723
|
+
ce("div", Xi, [
|
|
5724
|
+
ce("span", Qi, tt(l.comment.area), 1),
|
|
5725
|
+
ce("span", {
|
|
5726
5726
|
onClick: y,
|
|
5727
5727
|
class: "sus-item__info-reply",
|
|
5728
5728
|
title: "回复"
|
|
@@ -5731,40 +5731,40 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5731
5731
|
])
|
|
5732
5732
|
]));
|
|
5733
5733
|
}
|
|
5734
|
-
}), Qt = /* @__PURE__ */ Nt(to, [["__scopeId", "data-v-
|
|
5734
|
+
}), Qt = /* @__PURE__ */ Nt(to, [["__scopeId", "data-v-3c1f21df"]]), no = { class: "sus-comment__item" }, ro = { class: "sus-comment__item-child" }, io = { key: 1 }, oo = { class: "sus-comment__item-footer flex justify-center w-auto" }, ao = /* @__PURE__ */ Ht({
|
|
5735
5735
|
__name: "index",
|
|
5736
5736
|
props: {
|
|
5737
5737
|
comment: {}
|
|
5738
5738
|
},
|
|
5739
|
-
emits: ["
|
|
5739
|
+
emits: ["on-reply"],
|
|
5740
5740
|
setup(fe, { emit: he }) {
|
|
5741
5741
|
const ke = yt(!1), be = he;
|
|
5742
5742
|
function J(Se) {
|
|
5743
|
-
be("
|
|
5743
|
+
be("on-reply", Se);
|
|
5744
5744
|
}
|
|
5745
5745
|
return (Se, Z) => {
|
|
5746
5746
|
var L, y;
|
|
5747
5747
|
return qe(), ze("div", no, [
|
|
5748
|
-
|
|
5748
|
+
Ei(Qt, {
|
|
5749
5749
|
comment: Se.comment,
|
|
5750
5750
|
onOnReply: Z[0] || (Z[0] = (l) => J(Se.comment))
|
|
5751
5751
|
}, null, 8, ["comment"]),
|
|
5752
|
-
|
|
5752
|
+
ce("div", ro, [
|
|
5753
5753
|
((L = Se.comment.child) == null ? void 0 : L.length) > 0 ? (qe(), Un(Qt, {
|
|
5754
5754
|
key: 0,
|
|
5755
5755
|
onOnReply: Z[1] || (Z[1] = (l) => J(Se.comment)),
|
|
5756
5756
|
comment: Se.comment.child[0]
|
|
5757
5757
|
}, null, 8, ["comment"])) : nt("", !0),
|
|
5758
|
-
|
|
5758
|
+
ki(" " + tt(Se.comment.showMore) + " ", 1),
|
|
5759
5759
|
((y = Se.comment.child) == null ? void 0 : y.length) > 1 ? (qe(), ze("div", io, [
|
|
5760
|
-
|
|
5760
|
+
ce("div", oo, [
|
|
5761
5761
|
ke.value ? nt("", !0) : (qe(), ze("button", {
|
|
5762
5762
|
key: 0,
|
|
5763
5763
|
class: "sus-load-more",
|
|
5764
5764
|
onClick: Z[2] || (Z[2] = (l) => ke.value = !0)
|
|
5765
5765
|
}, " 查看更多回复 "))
|
|
5766
5766
|
]),
|
|
5767
|
-
ke.value ? (qe(!0), ze(
|
|
5767
|
+
ke.value ? (qe(!0), ze(Si, { key: 0 }, Li(Se.comment.child.slice(1), (l, m) => (qe(), Un(Qt, {
|
|
5768
5768
|
onOnReply: Z[3] || (Z[3] = (c) => J(Se.comment)),
|
|
5769
5769
|
key: m,
|
|
5770
5770
|
comment: l
|
|
@@ -5774,7 +5774,7 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5774
5774
|
]);
|
|
5775
5775
|
};
|
|
5776
5776
|
}
|
|
5777
|
-
}), so = /* @__PURE__ */ Nt(ao, [["__scopeId", "data-v-
|
|
5777
|
+
}), so = /* @__PURE__ */ Nt(ao, [["__scopeId", "data-v-7de7388c"]]), lo = { class: "sus-top-item__user flex items-center" }, co = {
|
|
5778
5778
|
key: 0,
|
|
5779
5779
|
class: "sus-top-item__user-avatar ml-1 mr-2"
|
|
5780
5780
|
}, uo = ["src", "onerror"], po = { class: "sus-top-item__user-owner" }, mo = { class: "sus-top-item__user-reply ml-3 opacity-70" }, fo = ["innerHTML"], ho = /* @__PURE__ */ Ht({
|
|
@@ -5782,16 +5782,19 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5782
5782
|
props: {
|
|
5783
5783
|
comment: {}
|
|
5784
5784
|
},
|
|
5785
|
-
emits: ["
|
|
5785
|
+
emits: ["go-local"],
|
|
5786
5786
|
setup(fe, { emit: he }) {
|
|
5787
5787
|
const ke = he;
|
|
5788
5788
|
function be() {
|
|
5789
|
-
ke("
|
|
5789
|
+
ke("go-local");
|
|
5790
5790
|
}
|
|
5791
|
-
return (J, Se) => (qe(), ze(
|
|
5792
|
-
|
|
5791
|
+
return (J, Se) => (qe(), ze("div", {
|
|
5792
|
+
class: "sus-top-item p-1.5 cursor-pointer",
|
|
5793
|
+
onClick: be
|
|
5794
|
+
}, [
|
|
5795
|
+
ce("div", lo, [
|
|
5793
5796
|
J.comment.userAvatar ? (qe(), ze("div", co, [
|
|
5794
|
-
|
|
5797
|
+
ce("img", {
|
|
5795
5798
|
alt: "",
|
|
5796
5799
|
class: "sus-avatar",
|
|
5797
5800
|
loading: "lazy",
|
|
@@ -5800,21 +5803,16 @@ const xi = { class: "sus-comment flex flex-row w-full" }, Hi = {
|
|
|
5800
5803
|
onerror: xt(Yt)
|
|
5801
5804
|
}, null, 8, uo)
|
|
5802
5805
|
])) : nt("", !0),
|
|
5803
|
-
|
|
5804
|
-
|
|
5806
|
+
ce("div", po, tt(J.comment.userName), 1),
|
|
5807
|
+
ce("div", mo, tt(J.comment.replyName ? "@" + J.comment.replyName : ""), 1)
|
|
5805
5808
|
]),
|
|
5806
|
-
|
|
5807
|
-
class: "sus-top-
|
|
5808
|
-
|
|
5809
|
-
},
|
|
5810
|
-
|
|
5811
|
-
class: "sus-top-item__content",
|
|
5812
|
-
innerHTML: J.comment.content
|
|
5813
|
-
}, null, 8, fo)
|
|
5814
|
-
])
|
|
5815
|
-
], 64));
|
|
5809
|
+
ce("div", {
|
|
5810
|
+
class: "sus-top-item__content p-1",
|
|
5811
|
+
innerHTML: J.comment.content
|
|
5812
|
+
}, null, 8, fo)
|
|
5813
|
+
]));
|
|
5816
5814
|
}
|
|
5817
|
-
}), vo = /* @__PURE__ */ Nt(ho, [["__scopeId", "data-v-
|
|
5815
|
+
}), vo = /* @__PURE__ */ Nt(ho, [["__scopeId", "data-v-2348efc6"]]), go = [Bi, so, vo], wo = {
|
|
5818
5816
|
install(fe) {
|
|
5819
5817
|
go.forEach((he) => {
|
|
5820
5818
|
fe.component(he.name, he);
|