@naersen/tts-rich-text 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +4 -0
- package/dist/base.css +1 -1
- package/dist/components/tts-editor-root/index.vue.d.ts +1 -0
- package/dist/components/tts-rich-text/editor/useRichTextEditor.d.ts +6 -0
- package/dist/components/tts-rich-text-editor/index.vue.d.ts +8 -2
- package/dist/index.js +1157 -1134
- package/dist/type/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolConfig as P, LanguageOptions as gl, DeleteMode as cl, getInitContent as Jn, sanitizePastedHtml as dl, sanitizePastedText as _i, resolveTtsEditorFeatures as ml, NumberToTextTools as pl, convertToTtsFormat as Yi, estimateTtsDuration as fl, StopOptions as yl } from "./core.js";
|
|
2
2
|
import { allToolTypes as bc, getVisualLength as jc, splitTextToSentences as vc, toCardinal as Ac, toColloquial as Zc, toPhoneReading as xc, toPositional as Cc, transformParagraph as Ic } from "./core.js";
|
|
3
|
-
import { ref as K, computed as T, useSlots as ql, defineComponent as $, useCssVars as Nt, unref as
|
|
3
|
+
import { ref as K, computed as T, useSlots as ql, defineComponent as $, useCssVars as Nt, unref as z, toRefs as ki, openBlock as Y, createElementBlock as L, normalizeClass as bn, createBlock as _, mergeProps as zl, createSlots as bl, withCtx as N, createElementVNode as v, createVNode as H, renderList as gn, renderSlot as wn, normalizeProps as jl, guardReactiveProps as vl, normalizeStyle as he, toDisplayString as F, getCurrentScope as Rt, onScopeDispose as Al, readonly as Ki, toRef as Zl, customRef as xl, watch as cn, onMounted as we, nextTick as de, getCurrentInstance as Ft, shallowRef as zi, watchEffect as $i, toRaw as Pt, Fragment as en, createCommentVNode as yn, Transition as Cl, withModifiers as bi, inject as Il, provide as Wl, onUnmounted as wl, onBeforeUnmount as Se, h as Ut, withDirectives as Te, vModelText as Ne, isRef as Et, createTextVNode as An, toValue as Sl, reactive as Vi, useModel as Gi, mergeModels as ae } from "vue";
|
|
4
4
|
import { ElButton as Ol, ElMessage as ji, ElMessageBox as Yl, ElDialog as Oe, ElInput as nt, ElPopover as _e, ElInputNumber as kl } from "element-plus";
|
|
5
5
|
import { Node as Kl, Extension as Vl, isTextSelection as Gl, posToDOMRect as Dt, getText as Xl, getTextSerializersFromSchema as Jl } from "@tiptap/core";
|
|
6
6
|
import { nodeViewProps as Hl, NodeViewWrapper as Ll, NodeViewContent as ye, VueNodeViewRenderer as Ml, mergeAttributes as et, useEditor as Tl, EditorContent as Nl } from "@tiptap/vue-3";
|
|
@@ -15,99 +15,99 @@ var _t = { exports: {} };
|
|
|
15
15
|
(function(i, t) {
|
|
16
16
|
e.exports = t();
|
|
17
17
|
})(Bt, function() {
|
|
18
|
-
var i = 1e3, t = 6e4, o = 36e5, l = "millisecond", s = "second", h = "minute", r = "hour", u = "day", g = "week", a = "month", c = "quarter",
|
|
19
|
-
var
|
|
20
|
-
return "[" +
|
|
21
|
-
} }, I = function(
|
|
22
|
-
var
|
|
23
|
-
return !
|
|
24
|
-
}, w = { s: I, z: function(
|
|
25
|
-
var
|
|
26
|
-
return (
|
|
27
|
-
}, m: function
|
|
28
|
-
if (
|
|
29
|
-
var
|
|
30
|
-
return +(-(
|
|
31
|
-
}, a: function(
|
|
32
|
-
return
|
|
33
|
-
}, p: function(
|
|
34
|
-
return { M: a, y:
|
|
35
|
-
}, u: function(
|
|
36
|
-
return
|
|
18
|
+
var i = 1e3, t = 6e4, o = 36e5, l = "millisecond", s = "second", h = "minute", r = "hour", u = "day", g = "week", a = "month", c = "quarter", p = "year", f = "date", d = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(j) {
|
|
19
|
+
var x = ["th", "st", "nd", "rd"], q = j % 100;
|
|
20
|
+
return "[" + j + (x[(q - 20) % 10] || x[q] || x[0]) + "]";
|
|
21
|
+
} }, I = function(j, x, q) {
|
|
22
|
+
var O = String(j);
|
|
23
|
+
return !O || O.length >= x ? j : "" + Array(x + 1 - O.length).join(q) + j;
|
|
24
|
+
}, w = { s: I, z: function(j) {
|
|
25
|
+
var x = -j.utcOffset(), q = Math.abs(x), O = Math.floor(q / 60), Z = q % 60;
|
|
26
|
+
return (x <= 0 ? "+" : "-") + I(O, 2, "0") + ":" + I(Z, 2, "0");
|
|
27
|
+
}, m: function j(x, q) {
|
|
28
|
+
if (x.date() < q.date()) return -j(q, x);
|
|
29
|
+
var O = 12 * (q.year() - x.year()) + (q.month() - x.month()), Z = x.clone().add(O, a), X = q - Z < 0, R = x.clone().add(O + (X ? -1 : 1), a);
|
|
30
|
+
return +(-(O + (q - Z) / (X ? Z - R : R - Z)) || 0);
|
|
31
|
+
}, a: function(j) {
|
|
32
|
+
return j < 0 ? Math.ceil(j) || 0 : Math.floor(j);
|
|
33
|
+
}, p: function(j) {
|
|
34
|
+
return { M: a, y: p, w: g, d: u, D: f, h: r, m: h, s, ms: l, Q: c }[j] || String(j || "").toLowerCase().replace(/s$/, "");
|
|
35
|
+
}, u: function(j) {
|
|
36
|
+
return j === void 0;
|
|
37
37
|
} }, J = "en", k = {};
|
|
38
|
-
k[J] =
|
|
39
|
-
var G = "$isDayjsObject", M = function(
|
|
40
|
-
return
|
|
41
|
-
}, V = function
|
|
42
|
-
var
|
|
43
|
-
if (!
|
|
44
|
-
if (typeof
|
|
45
|
-
var X =
|
|
46
|
-
k[X] && (
|
|
47
|
-
var R =
|
|
48
|
-
if (!
|
|
38
|
+
k[J] = A;
|
|
39
|
+
var G = "$isDayjsObject", M = function(j) {
|
|
40
|
+
return j instanceof C || !(!j || !j[G]);
|
|
41
|
+
}, V = function j(x, q, O) {
|
|
42
|
+
var Z;
|
|
43
|
+
if (!x) return J;
|
|
44
|
+
if (typeof x == "string") {
|
|
45
|
+
var X = x.toLowerCase();
|
|
46
|
+
k[X] && (Z = X), q && (k[X] = q, Z = X);
|
|
47
|
+
var R = x.split("-");
|
|
48
|
+
if (!Z && R.length > 1) return j(R[0]);
|
|
49
49
|
} else {
|
|
50
|
-
var Q =
|
|
51
|
-
k[Q] =
|
|
50
|
+
var Q = x.name;
|
|
51
|
+
k[Q] = x, Z = Q;
|
|
52
52
|
}
|
|
53
|
-
return !
|
|
54
|
-
},
|
|
55
|
-
if (M(
|
|
56
|
-
var
|
|
57
|
-
return
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
return
|
|
53
|
+
return !O && Z && (J = Z), Z || !O && J;
|
|
54
|
+
}, S = function(j, x) {
|
|
55
|
+
if (M(j)) return j.clone();
|
|
56
|
+
var q = typeof x == "object" ? x : {};
|
|
57
|
+
return q.date = j, q.args = arguments, new C(q);
|
|
58
|
+
}, m = w;
|
|
59
|
+
m.l = V, m.i = M, m.w = function(j, x) {
|
|
60
|
+
return S(j, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
|
|
61
61
|
};
|
|
62
|
-
var
|
|
63
|
-
function
|
|
64
|
-
this.$L = V(
|
|
62
|
+
var C = function() {
|
|
63
|
+
function j(q) {
|
|
64
|
+
this.$L = V(q.locale, null, !0), this.parse(q), this.$x = this.$x || q.x || {}, this[G] = !0;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
return
|
|
68
|
-
this.$d = function(
|
|
69
|
-
var
|
|
70
|
-
if (
|
|
71
|
-
if (
|
|
72
|
-
if (
|
|
73
|
-
if (typeof
|
|
74
|
-
var R =
|
|
66
|
+
var x = j.prototype;
|
|
67
|
+
return x.parse = function(q) {
|
|
68
|
+
this.$d = function(O) {
|
|
69
|
+
var Z = O.date, X = O.utc;
|
|
70
|
+
if (Z === null) return /* @__PURE__ */ new Date(NaN);
|
|
71
|
+
if (m.u(Z)) return /* @__PURE__ */ new Date();
|
|
72
|
+
if (Z instanceof Date) return new Date(Z);
|
|
73
|
+
if (typeof Z == "string" && !/Z$/i.test(Z)) {
|
|
74
|
+
var R = Z.match(y);
|
|
75
75
|
if (R) {
|
|
76
76
|
var Q = R[2] - 1 || 0, tn = (R[7] || "0").substring(0, 3);
|
|
77
77
|
return X ? new Date(Date.UTC(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, tn)) : new Date(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, tn);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
return new Date(
|
|
81
|
-
}(
|
|
82
|
-
},
|
|
83
|
-
var
|
|
84
|
-
this.$y =
|
|
85
|
-
},
|
|
86
|
-
return
|
|
87
|
-
},
|
|
88
|
-
return this.$d.toString() !==
|
|
89
|
-
},
|
|
90
|
-
var
|
|
91
|
-
return this.startOf(
|
|
92
|
-
},
|
|
93
|
-
return q
|
|
94
|
-
},
|
|
95
|
-
return this.endOf(
|
|
96
|
-
},
|
|
97
|
-
return
|
|
98
|
-
},
|
|
80
|
+
return new Date(Z);
|
|
81
|
+
}(q), this.init();
|
|
82
|
+
}, x.init = function() {
|
|
83
|
+
var q = this.$d;
|
|
84
|
+
this.$y = q.getFullYear(), this.$M = q.getMonth(), this.$D = q.getDate(), this.$W = q.getDay(), this.$H = q.getHours(), this.$m = q.getMinutes(), this.$s = q.getSeconds(), this.$ms = q.getMilliseconds();
|
|
85
|
+
}, x.$utils = function() {
|
|
86
|
+
return m;
|
|
87
|
+
}, x.isValid = function() {
|
|
88
|
+
return this.$d.toString() !== d;
|
|
89
|
+
}, x.isSame = function(q, O) {
|
|
90
|
+
var Z = S(q);
|
|
91
|
+
return this.startOf(O) <= Z && Z <= this.endOf(O);
|
|
92
|
+
}, x.isAfter = function(q, O) {
|
|
93
|
+
return S(q) < this.startOf(O);
|
|
94
|
+
}, x.isBefore = function(q, O) {
|
|
95
|
+
return this.endOf(O) < S(q);
|
|
96
|
+
}, x.$g = function(q, O, Z) {
|
|
97
|
+
return m.u(q) ? this[O] : this.set(Z, q);
|
|
98
|
+
}, x.unix = function() {
|
|
99
99
|
return Math.floor(this.valueOf() / 1e3);
|
|
100
|
-
},
|
|
100
|
+
}, x.valueOf = function() {
|
|
101
101
|
return this.$d.getTime();
|
|
102
|
-
},
|
|
103
|
-
var
|
|
104
|
-
var Rn =
|
|
102
|
+
}, x.startOf = function(q, O) {
|
|
103
|
+
var Z = this, X = !!m.u(O) || O, R = m.p(q), Q = function(Qn, mn) {
|
|
104
|
+
var Rn = m.w(Z.$u ? Date.UTC(Z.$y, mn, Qn) : new Date(Z.$y, mn, Qn), Z);
|
|
105
105
|
return X ? Rn : Rn.endOf(u);
|
|
106
106
|
}, tn = function(Qn, mn) {
|
|
107
|
-
return
|
|
107
|
+
return m.w(Z.toDate()[Qn].apply(Z.toDate("s"), (X ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(mn)), Z);
|
|
108
108
|
}, hn = this.$W, an = this.$M, zn = this.$D, oe = "set" + (this.$u ? "UTC" : "");
|
|
109
109
|
switch (R) {
|
|
110
|
-
case
|
|
110
|
+
case p:
|
|
111
111
|
return X ? Q(1, 0) : Q(31, 11);
|
|
112
112
|
case a:
|
|
113
113
|
return X ? Q(1, an) : Q(0, an + 1);
|
|
@@ -126,76 +126,76 @@ var _t = { exports: {} };
|
|
|
126
126
|
default:
|
|
127
127
|
return this.clone();
|
|
128
128
|
}
|
|
129
|
-
},
|
|
130
|
-
return this.startOf(
|
|
131
|
-
},
|
|
132
|
-
var
|
|
133
|
-
if (X === a || X ===
|
|
129
|
+
}, x.endOf = function(q) {
|
|
130
|
+
return this.startOf(q, !1);
|
|
131
|
+
}, x.$set = function(q, O) {
|
|
132
|
+
var Z, X = m.p(q), R = "set" + (this.$u ? "UTC" : ""), Q = (Z = {}, Z[u] = R + "Date", Z[f] = R + "Date", Z[a] = R + "Month", Z[p] = R + "FullYear", Z[r] = R + "Hours", Z[h] = R + "Minutes", Z[s] = R + "Seconds", Z[l] = R + "Milliseconds", Z)[X], tn = X === u ? this.$D + (O - this.$W) : O;
|
|
133
|
+
if (X === a || X === p) {
|
|
134
134
|
var hn = this.clone().set(f, 1);
|
|
135
135
|
hn.$d[Q](tn), hn.init(), this.$d = hn.set(f, Math.min(this.$D, hn.daysInMonth())).$d;
|
|
136
136
|
} else Q && this.$d[Q](tn);
|
|
137
137
|
return this.init(), this;
|
|
138
|
-
},
|
|
139
|
-
return this.clone().$set(
|
|
140
|
-
},
|
|
141
|
-
return this[
|
|
142
|
-
},
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
var R =
|
|
146
|
-
var zn =
|
|
147
|
-
return
|
|
138
|
+
}, x.set = function(q, O) {
|
|
139
|
+
return this.clone().$set(q, O);
|
|
140
|
+
}, x.get = function(q) {
|
|
141
|
+
return this[m.p(q)]();
|
|
142
|
+
}, x.add = function(q, O) {
|
|
143
|
+
var Z, X = this;
|
|
144
|
+
q = Number(q);
|
|
145
|
+
var R = m.p(O), Q = function(an) {
|
|
146
|
+
var zn = S(X);
|
|
147
|
+
return m.w(zn.date(zn.date() + Math.round(an * q)), X);
|
|
148
148
|
};
|
|
149
|
-
if (R === a) return this.set(a, this.$M +
|
|
150
|
-
if (R ===
|
|
149
|
+
if (R === a) return this.set(a, this.$M + q);
|
|
150
|
+
if (R === p) return this.set(p, this.$y + q);
|
|
151
151
|
if (R === u) return Q(1);
|
|
152
152
|
if (R === g) return Q(7);
|
|
153
|
-
var tn = (
|
|
154
|
-
return
|
|
155
|
-
},
|
|
156
|
-
return this.add(-1 *
|
|
157
|
-
},
|
|
158
|
-
var
|
|
159
|
-
if (!this.isValid()) return
|
|
160
|
-
var X =
|
|
161
|
-
return mn && (mn[Rn] || mn(
|
|
153
|
+
var tn = (Z = {}, Z[h] = t, Z[r] = o, Z[s] = i, Z)[R] || 1, hn = this.$d.getTime() + q * tn;
|
|
154
|
+
return m.w(hn, this);
|
|
155
|
+
}, x.subtract = function(q, O) {
|
|
156
|
+
return this.add(-1 * q, O);
|
|
157
|
+
}, x.format = function(q) {
|
|
158
|
+
var O = this, Z = this.$locale();
|
|
159
|
+
if (!this.isValid()) return Z.invalidDate || d;
|
|
160
|
+
var X = q || "YYYY-MM-DDTHH:mm:ssZ", R = m.z(this), Q = this.$H, tn = this.$m, hn = this.$M, an = Z.weekdays, zn = Z.months, oe = Z.meridiem, Bn = function(mn, Rn, fe, Ke) {
|
|
161
|
+
return mn && (mn[Rn] || mn(O, X)) || fe[Rn].slice(0, Ke);
|
|
162
162
|
}, pe = function(mn) {
|
|
163
|
-
return
|
|
163
|
+
return m.s(Q % 12 || 12, mn, "0");
|
|
164
164
|
}, Qn = oe || function(mn, Rn, fe) {
|
|
165
165
|
var Ke = mn < 12 ? "AM" : "PM";
|
|
166
166
|
return fe ? Ke.toLowerCase() : Ke;
|
|
167
167
|
};
|
|
168
|
-
return X.replace(
|
|
168
|
+
return X.replace(b, function(mn, Rn) {
|
|
169
169
|
return Rn || function(fe) {
|
|
170
170
|
switch (fe) {
|
|
171
171
|
case "YY":
|
|
172
|
-
return String(
|
|
172
|
+
return String(O.$y).slice(-2);
|
|
173
173
|
case "YYYY":
|
|
174
|
-
return
|
|
174
|
+
return m.s(O.$y, 4, "0");
|
|
175
175
|
case "M":
|
|
176
176
|
return hn + 1;
|
|
177
177
|
case "MM":
|
|
178
|
-
return
|
|
178
|
+
return m.s(hn + 1, 2, "0");
|
|
179
179
|
case "MMM":
|
|
180
|
-
return Bn(
|
|
180
|
+
return Bn(Z.monthsShort, hn, zn, 3);
|
|
181
181
|
case "MMMM":
|
|
182
182
|
return Bn(zn, hn);
|
|
183
183
|
case "D":
|
|
184
|
-
return
|
|
184
|
+
return O.$D;
|
|
185
185
|
case "DD":
|
|
186
|
-
return
|
|
186
|
+
return m.s(O.$D, 2, "0");
|
|
187
187
|
case "d":
|
|
188
|
-
return String(
|
|
188
|
+
return String(O.$W);
|
|
189
189
|
case "dd":
|
|
190
|
-
return Bn(
|
|
190
|
+
return Bn(Z.weekdaysMin, O.$W, an, 2);
|
|
191
191
|
case "ddd":
|
|
192
|
-
return Bn(
|
|
192
|
+
return Bn(Z.weekdaysShort, O.$W, an, 3);
|
|
193
193
|
case "dddd":
|
|
194
|
-
return an[
|
|
194
|
+
return an[O.$W];
|
|
195
195
|
case "H":
|
|
196
196
|
return String(Q);
|
|
197
197
|
case "HH":
|
|
198
|
-
return
|
|
198
|
+
return m.s(Q, 2, "0");
|
|
199
199
|
case "h":
|
|
200
200
|
return pe(1);
|
|
201
201
|
case "hh":
|
|
@@ -207,27 +207,27 @@ var _t = { exports: {} };
|
|
|
207
207
|
case "m":
|
|
208
208
|
return String(tn);
|
|
209
209
|
case "mm":
|
|
210
|
-
return
|
|
210
|
+
return m.s(tn, 2, "0");
|
|
211
211
|
case "s":
|
|
212
|
-
return String(
|
|
212
|
+
return String(O.$s);
|
|
213
213
|
case "ss":
|
|
214
|
-
return
|
|
214
|
+
return m.s(O.$s, 2, "0");
|
|
215
215
|
case "SSS":
|
|
216
|
-
return
|
|
216
|
+
return m.s(O.$ms, 3, "0");
|
|
217
217
|
case "Z":
|
|
218
218
|
return R;
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
}(mn) || R.replace(":", "");
|
|
222
222
|
});
|
|
223
|
-
},
|
|
223
|
+
}, x.utcOffset = function() {
|
|
224
224
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
225
|
-
},
|
|
226
|
-
var X, R = this, Q =
|
|
227
|
-
return
|
|
225
|
+
}, x.diff = function(q, O, Z) {
|
|
226
|
+
var X, R = this, Q = m.p(O), tn = S(q), hn = (tn.utcOffset() - this.utcOffset()) * t, an = this - tn, zn = function() {
|
|
227
|
+
return m.m(R, tn);
|
|
228
228
|
};
|
|
229
229
|
switch (Q) {
|
|
230
|
-
case
|
|
230
|
+
case p:
|
|
231
231
|
X = zn() / 12;
|
|
232
232
|
break;
|
|
233
233
|
case a:
|
|
@@ -254,36 +254,36 @@ var _t = { exports: {} };
|
|
|
254
254
|
default:
|
|
255
255
|
X = an;
|
|
256
256
|
}
|
|
257
|
-
return
|
|
258
|
-
},
|
|
257
|
+
return Z ? X : m.a(X);
|
|
258
|
+
}, x.daysInMonth = function() {
|
|
259
259
|
return this.endOf(a).$D;
|
|
260
|
-
},
|
|
260
|
+
}, x.$locale = function() {
|
|
261
261
|
return k[this.$L];
|
|
262
|
-
},
|
|
263
|
-
if (!
|
|
264
|
-
var
|
|
265
|
-
return X && (
|
|
266
|
-
},
|
|
267
|
-
return
|
|
268
|
-
},
|
|
262
|
+
}, x.locale = function(q, O) {
|
|
263
|
+
if (!q) return this.$L;
|
|
264
|
+
var Z = this.clone(), X = V(q, O, !0);
|
|
265
|
+
return X && (Z.$L = X), Z;
|
|
266
|
+
}, x.clone = function() {
|
|
267
|
+
return m.w(this.$d, this);
|
|
268
|
+
}, x.toDate = function() {
|
|
269
269
|
return new Date(this.valueOf());
|
|
270
|
-
},
|
|
270
|
+
}, x.toJSON = function() {
|
|
271
271
|
return this.isValid() ? this.toISOString() : null;
|
|
272
|
-
},
|
|
272
|
+
}, x.toISOString = function() {
|
|
273
273
|
return this.$d.toISOString();
|
|
274
|
-
},
|
|
274
|
+
}, x.toString = function() {
|
|
275
275
|
return this.$d.toUTCString();
|
|
276
|
-
},
|
|
277
|
-
}(),
|
|
278
|
-
return
|
|
279
|
-
|
|
280
|
-
return this.$g(
|
|
276
|
+
}, j;
|
|
277
|
+
}(), W = C.prototype;
|
|
278
|
+
return S.prototype = W, [["$ms", l], ["$s", s], ["$m", h], ["$H", r], ["$W", u], ["$M", a], ["$y", p], ["$D", f]].forEach(function(j) {
|
|
279
|
+
W[j[1]] = function(x) {
|
|
280
|
+
return this.$g(x, j[0], j[1]);
|
|
281
281
|
};
|
|
282
|
-
}),
|
|
283
|
-
return
|
|
284
|
-
},
|
|
285
|
-
return
|
|
286
|
-
},
|
|
282
|
+
}), S.extend = function(j, x) {
|
|
283
|
+
return j.$i || (j(x, C, S), j.$i = !0), S;
|
|
284
|
+
}, S.locale = V, S.isDayjs = M, S.unix = function(j) {
|
|
285
|
+
return S(1e3 * j);
|
|
286
|
+
}, S.en = k[J], S.Ls = k, S.p = {}, S;
|
|
287
287
|
});
|
|
288
288
|
})(_t);
|
|
289
289
|
var Pl = _t.exports;
|
|
@@ -296,51 +296,51 @@ var no = { exports: {} };
|
|
|
296
296
|
var i = "minute", t = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
|
|
297
297
|
return function(l, s, h) {
|
|
298
298
|
var r = s.prototype;
|
|
299
|
-
h.utc = function(
|
|
300
|
-
var y = { date:
|
|
299
|
+
h.utc = function(d) {
|
|
300
|
+
var y = { date: d, utc: !0, args: arguments };
|
|
301
301
|
return new s(y);
|
|
302
|
-
}, r.utc = function(
|
|
302
|
+
}, r.utc = function(d) {
|
|
303
303
|
var y = h(this.toDate(), { locale: this.$L, utc: !0 });
|
|
304
|
-
return
|
|
304
|
+
return d ? y.add(this.utcOffset(), i) : y;
|
|
305
305
|
}, r.local = function() {
|
|
306
306
|
return h(this.toDate(), { locale: this.$L, utc: !1 });
|
|
307
307
|
};
|
|
308
308
|
var u = r.parse;
|
|
309
|
-
r.parse = function(
|
|
310
|
-
|
|
309
|
+
r.parse = function(d) {
|
|
310
|
+
d.utc && (this.$u = !0), this.$utils().u(d.$offset) || (this.$offset = d.$offset), u.call(this, d);
|
|
311
311
|
};
|
|
312
312
|
var g = r.init;
|
|
313
313
|
r.init = function() {
|
|
314
314
|
if (this.$u) {
|
|
315
|
-
var
|
|
316
|
-
this.$y =
|
|
315
|
+
var d = this.$d;
|
|
316
|
+
this.$y = d.getUTCFullYear(), this.$M = d.getUTCMonth(), this.$D = d.getUTCDate(), this.$W = d.getUTCDay(), this.$H = d.getUTCHours(), this.$m = d.getUTCMinutes(), this.$s = d.getUTCSeconds(), this.$ms = d.getUTCMilliseconds();
|
|
317
317
|
} else g.call(this);
|
|
318
318
|
};
|
|
319
319
|
var a = r.utcOffset;
|
|
320
|
-
r.utcOffset = function(
|
|
321
|
-
var
|
|
322
|
-
if (
|
|
323
|
-
if (typeof
|
|
320
|
+
r.utcOffset = function(d, y) {
|
|
321
|
+
var b = this.$utils().u;
|
|
322
|
+
if (b(d)) return this.$u ? 0 : b(this.$offset) ? a.call(this) : this.$offset;
|
|
323
|
+
if (typeof d == "string" && (d = function(J) {
|
|
324
324
|
J === void 0 && (J = "");
|
|
325
325
|
var k = J.match(t);
|
|
326
326
|
if (!k) return null;
|
|
327
327
|
var G = ("" + k[0]).match(o) || ["-", 0, 0], M = G[0], V = 60 * +G[1] + +G[2];
|
|
328
328
|
return V === 0 ? 0 : M === "+" ? V : -V;
|
|
329
|
-
}(
|
|
330
|
-
var
|
|
331
|
-
if (
|
|
329
|
+
}(d), d === null)) return this;
|
|
330
|
+
var A = Math.abs(d) <= 16 ? 60 * d : d;
|
|
331
|
+
if (A === 0) return this.utc(y);
|
|
332
332
|
var I = this.clone();
|
|
333
|
-
if (y) return I.$offset =
|
|
333
|
+
if (y) return I.$offset = A, I.$u = !1, I;
|
|
334
334
|
var w = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
335
|
-
return (I = this.local().add(
|
|
335
|
+
return (I = this.local().add(A + w, i)).$offset = A, I.$x.$localOffset = w, I;
|
|
336
336
|
};
|
|
337
337
|
var c = r.format;
|
|
338
|
-
r.format = function(
|
|
339
|
-
var y =
|
|
338
|
+
r.format = function(d) {
|
|
339
|
+
var y = d || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
340
340
|
return c.call(this, y);
|
|
341
341
|
}, r.valueOf = function() {
|
|
342
|
-
var
|
|
343
|
-
return this.$d.valueOf() - 6e4 *
|
|
342
|
+
var d = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
343
|
+
return this.$d.valueOf() - 6e4 * d;
|
|
344
344
|
}, r.isUTC = function() {
|
|
345
345
|
return !!this.$u;
|
|
346
346
|
}, r.toISOString = function() {
|
|
@@ -348,15 +348,15 @@ var no = { exports: {} };
|
|
|
348
348
|
}, r.toString = function() {
|
|
349
349
|
return this.toDate().toUTCString();
|
|
350
350
|
};
|
|
351
|
-
var
|
|
352
|
-
r.toDate = function(
|
|
353
|
-
return
|
|
351
|
+
var p = r.toDate;
|
|
352
|
+
r.toDate = function(d) {
|
|
353
|
+
return d === "s" && this.$offset ? h(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
|
|
354
354
|
};
|
|
355
355
|
var f = r.diff;
|
|
356
|
-
r.diff = function(
|
|
357
|
-
if (
|
|
358
|
-
var
|
|
359
|
-
return f.call(
|
|
356
|
+
r.diff = function(d, y, b) {
|
|
357
|
+
if (d && this.$u === d.$u) return f.call(this, d, y, b);
|
|
358
|
+
var A = this.local(), I = h(d).local();
|
|
359
|
+
return f.call(A, I, y, b);
|
|
360
360
|
};
|
|
361
361
|
};
|
|
362
362
|
});
|
|
@@ -557,7 +557,7 @@ const Hn = (e) => {
|
|
|
557
557
|
Nt((a) => ({
|
|
558
558
|
v6cd858ea: u.value,
|
|
559
559
|
v4f17a402: g.value,
|
|
560
|
-
v6f0655b0:
|
|
560
|
+
v6f0655b0: z(t)
|
|
561
561
|
}));
|
|
562
562
|
const n = e, { size: i, color: t, name: o, prefix: l } = ki(n), h = Object.entries(/* @__PURE__ */ Object.assign({
|
|
563
563
|
"../../assets/icons-component/icon-component-clear.svg": ds,
|
|
@@ -598,10 +598,10 @@ const Hn = (e) => {
|
|
|
598
598
|
"../../assets/icons-editor/editor-time.svg": Es,
|
|
599
599
|
"../../assets/icons-editor/editor-upload.svg": Ds
|
|
600
600
|
})).reduce(
|
|
601
|
-
(a, [c,
|
|
602
|
-
var
|
|
603
|
-
const f = (
|
|
604
|
-
return f && (a[f] =
|
|
601
|
+
(a, [c, p]) => {
|
|
602
|
+
var d;
|
|
603
|
+
const f = (d = c.split("/").pop()) == null ? void 0 : d.replace(/\.svg$/, "");
|
|
604
|
+
return f && (a[f] = p), a;
|
|
605
605
|
},
|
|
606
606
|
{}
|
|
607
607
|
), r = T(() => (h[o.value] ?? h[`${l.value}-${o.value}`] ?? "").replace("<svg", '<svg fill="currentColor"')), u = T(() => Ai(i.value) ? "1em" : Hn(vi(i.value) ? i.value[0] : i.value)), g = T(() => Ai(i.value) ? "1em" : Hn(vi(i.value) ? i.value[1] : i.value));
|
|
@@ -627,7 +627,7 @@ const Hn = (e) => {
|
|
|
627
627
|
},
|
|
628
628
|
setup(e) {
|
|
629
629
|
const { renderSlots: n } = cs(["default", "icon"]);
|
|
630
|
-
return (i, t) => (Y(), _(
|
|
630
|
+
return (i, t) => (Y(), _(z(Ol), zl({
|
|
631
631
|
class: [
|
|
632
632
|
{
|
|
633
633
|
"cx-button-link": e.link
|
|
@@ -635,8 +635,8 @@ const Hn = (e) => {
|
|
|
635
635
|
]
|
|
636
636
|
}, i.$attrs, { size: "large" }), bl({
|
|
637
637
|
loading: N(() => [
|
|
638
|
-
|
|
639
|
-
H(
|
|
638
|
+
v("i", _s, [
|
|
639
|
+
H(z(rn), {
|
|
640
640
|
name: "icon-component-loading",
|
|
641
641
|
size: "18px"
|
|
642
642
|
})
|
|
@@ -644,7 +644,7 @@ const Hn = (e) => {
|
|
|
644
644
|
]),
|
|
645
645
|
_: 2
|
|
646
646
|
}, [
|
|
647
|
-
gn(
|
|
647
|
+
gn(z(n), (o) => ({
|
|
648
648
|
name: o,
|
|
649
649
|
fn: N((l) => [
|
|
650
650
|
wn(i.$slots, o, jl(vl(l || {})), void 0, !0)
|
|
@@ -661,20 +661,20 @@ const Hn = (e) => {
|
|
|
661
661
|
},
|
|
662
662
|
setup(e) {
|
|
663
663
|
return (n, i) => (Y(), L("div", ih, [
|
|
664
|
-
|
|
664
|
+
v("div", {
|
|
665
665
|
style: he({
|
|
666
|
-
width:
|
|
667
|
-
height:
|
|
666
|
+
width: z(Hn)(e.size),
|
|
667
|
+
height: z(Hn)(e.size)
|
|
668
668
|
}),
|
|
669
669
|
class: "cx-empty-icon"
|
|
670
670
|
}, [
|
|
671
671
|
wn(n.$slots, "icon", {}, () => [
|
|
672
|
-
|
|
673
|
-
src: e.type === "normal" ?
|
|
672
|
+
v("img", {
|
|
673
|
+
src: e.type === "normal" ? z(nh) : z(eh)
|
|
674
674
|
}, null, 8, th)
|
|
675
675
|
], !0)
|
|
676
676
|
], 4),
|
|
677
|
-
|
|
677
|
+
v("div", oh, F(e.description), 1)
|
|
678
678
|
]));
|
|
679
679
|
}
|
|
680
680
|
}), sh = /* @__PURE__ */ sn(lh, [["__scopeId", "data-v-56b17ee0"]]);
|
|
@@ -698,7 +698,7 @@ function Fe() {
|
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
700
|
function nn(e) {
|
|
701
|
-
return typeof e == "function" ? e() :
|
|
701
|
+
return typeof e == "function" ? e() : z(e);
|
|
702
702
|
}
|
|
703
703
|
const Ye = typeof window < "u" && typeof document < "u";
|
|
704
704
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -791,14 +791,14 @@ function lt(e, n, i = {}) {
|
|
|
791
791
|
{ ...o, flush: "sync" }
|
|
792
792
|
)
|
|
793
793
|
), s = (c) => {
|
|
794
|
-
const
|
|
795
|
-
c(), g.value += a.value -
|
|
794
|
+
const p = a.value;
|
|
795
|
+
c(), g.value += a.value - p;
|
|
796
796
|
}, u.push(
|
|
797
797
|
cn(
|
|
798
798
|
e,
|
|
799
799
|
(...c) => {
|
|
800
|
-
const
|
|
801
|
-
g.value = 0, a.value = 0, !
|
|
800
|
+
const p = g.value > 0 && g.value === a.value;
|
|
801
|
+
g.value = 0, a.value = 0, !p && l(...c);
|
|
802
802
|
},
|
|
803
803
|
o
|
|
804
804
|
)
|
|
@@ -821,14 +821,14 @@ function E(...e) {
|
|
|
821
821
|
Array.isArray(i) || (i = [i]), Array.isArray(t) || (t = [t]);
|
|
822
822
|
const l = [], s = () => {
|
|
823
823
|
l.forEach((g) => g()), l.length = 0;
|
|
824
|
-
}, h = (g, a, c,
|
|
824
|
+
}, h = (g, a, c, p) => (g.addEventListener(a, c, p), () => g.removeEventListener(a, c, p)), r = cn(
|
|
825
825
|
() => [$n(n), nn(o)],
|
|
826
826
|
([g, a]) => {
|
|
827
827
|
if (s(), !g)
|
|
828
828
|
return;
|
|
829
829
|
const c = so(a) ? { ...a } : a;
|
|
830
830
|
l.push(
|
|
831
|
-
...i.flatMap((
|
|
831
|
+
...i.flatMap((p) => t.map((f) => h(g, p, f, c)))
|
|
832
832
|
);
|
|
833
833
|
},
|
|
834
834
|
{ immediate: !0, flush: "post" }
|
|
@@ -884,25 +884,25 @@ function yh(e = {}) {
|
|
|
884
884
|
copiedDuring: o = 1500,
|
|
885
885
|
legacy: l = !1
|
|
886
886
|
} = e, s = Ji(() => n && "clipboard" in n), h = st("clipboard-read"), r = st("clipboard-write"), u = T(() => s.value || l), g = K(""), a = K(!1), c = ph(() => a.value = !1, o);
|
|
887
|
-
function
|
|
888
|
-
s.value &&
|
|
889
|
-
g.value =
|
|
887
|
+
function p() {
|
|
888
|
+
s.value && b(h.value) ? n.clipboard.readText().then((A) => {
|
|
889
|
+
g.value = A;
|
|
890
890
|
}) : g.value = y();
|
|
891
891
|
}
|
|
892
|
-
u.value && i && E(["copy", "cut"],
|
|
893
|
-
async function f(
|
|
894
|
-
u.value &&
|
|
892
|
+
u.value && i && E(["copy", "cut"], p);
|
|
893
|
+
async function f(A = nn(t)) {
|
|
894
|
+
u.value && A != null && (s.value && b(r.value) ? await n.clipboard.writeText(A) : d(A), g.value = A, a.value = !0, c.start());
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function d(A) {
|
|
897
897
|
const I = document.createElement("textarea");
|
|
898
|
-
I.value =
|
|
898
|
+
I.value = A ?? "", I.style.position = "absolute", I.style.opacity = "0", document.body.appendChild(I), I.select(), document.execCommand("copy"), I.remove();
|
|
899
899
|
}
|
|
900
900
|
function y() {
|
|
901
|
-
var
|
|
902
|
-
return (w = (I = (
|
|
901
|
+
var A, I, w;
|
|
902
|
+
return (w = (I = (A = document == null ? void 0 : document.getSelection) == null ? void 0 : A.call(document)) == null ? void 0 : I.toString()) != null ? w : "";
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
904
|
+
function b(A) {
|
|
905
|
+
return A === "granted" || A === "prompt";
|
|
906
906
|
}
|
|
907
907
|
return {
|
|
908
908
|
isSupported: u,
|
|
@@ -916,44 +916,44 @@ function qh(e, n = {}) {
|
|
|
916
916
|
const o = K(!1), l = zi(null);
|
|
917
917
|
let s = 0, h = !0;
|
|
918
918
|
if (Ye) {
|
|
919
|
-
const r = typeof n == "function" ? { onDrop: n } : n, u = (i = r.multiple) != null ? i : !0, g = (t = r.preventDefaultForUnhandled) != null ? t : !1, a = (
|
|
920
|
-
var y,
|
|
921
|
-
const
|
|
922
|
-
return
|
|
923
|
-
}, c = (
|
|
919
|
+
const r = typeof n == "function" ? { onDrop: n } : n, u = (i = r.multiple) != null ? i : !0, g = (t = r.preventDefaultForUnhandled) != null ? t : !1, a = (d) => {
|
|
920
|
+
var y, b;
|
|
921
|
+
const A = Array.from((b = (y = d.dataTransfer) == null ? void 0 : y.files) != null ? b : []);
|
|
922
|
+
return A.length === 0 ? null : u ? A : [A[0]];
|
|
923
|
+
}, c = (d) => {
|
|
924
924
|
if (r.dataTypes) {
|
|
925
|
-
const y =
|
|
926
|
-
return typeof y == "function" ? y(
|
|
925
|
+
const y = z(r.dataTypes);
|
|
926
|
+
return typeof y == "function" ? y(d) : y ? y.some((b) => d.includes(b)) : !0;
|
|
927
927
|
}
|
|
928
928
|
return !0;
|
|
929
|
-
},
|
|
930
|
-
var y,
|
|
931
|
-
const
|
|
929
|
+
}, p = (d) => {
|
|
930
|
+
var y, b;
|
|
931
|
+
const A = Array.from((b = (y = d.dataTransfer) == null ? void 0 : y.items) != null ? b : []), I = A.map((k) => k.type), w = c(I), J = u || A.length <= 1;
|
|
932
932
|
return w && J;
|
|
933
|
-
}, f = (
|
|
934
|
-
var
|
|
935
|
-
if (h = d
|
|
936
|
-
g &&
|
|
933
|
+
}, f = (d, y) => {
|
|
934
|
+
var b, A, I, w;
|
|
935
|
+
if (h = p(d), !h) {
|
|
936
|
+
g && d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "none");
|
|
937
937
|
return;
|
|
938
938
|
}
|
|
939
|
-
|
|
940
|
-
const J = a(
|
|
939
|
+
d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "copy");
|
|
940
|
+
const J = a(d);
|
|
941
941
|
switch (y) {
|
|
942
942
|
case "enter":
|
|
943
|
-
s += 1, o.value = !0, (
|
|
943
|
+
s += 1, o.value = !0, (b = r.onEnter) == null || b.call(r, null, d);
|
|
944
944
|
break;
|
|
945
945
|
case "over":
|
|
946
|
-
(
|
|
946
|
+
(A = r.onOver) == null || A.call(r, null, d);
|
|
947
947
|
break;
|
|
948
948
|
case "leave":
|
|
949
|
-
s -= 1, s === 0 && (o.value = !1), (I = r.onLeave) == null || I.call(r, null,
|
|
949
|
+
s -= 1, s === 0 && (o.value = !1), (I = r.onLeave) == null || I.call(r, null, d);
|
|
950
950
|
break;
|
|
951
951
|
case "drop":
|
|
952
|
-
s = 0, o.value = !1, h && (l.value = J, (w = r.onDrop) == null || w.call(r, J,
|
|
952
|
+
s = 0, o.value = !1, h && (l.value = J, (w = r.onDrop) == null || w.call(r, J, d));
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
955
|
};
|
|
956
|
-
E(e, "dragenter", (
|
|
956
|
+
E(e, "dragenter", (d) => f(d, "enter")), E(e, "dragover", (d) => f(d, "over")), E(e, "dragleave", (d) => f(d, "leave")), E(e, "drop", (d) => f(d, "drop"));
|
|
957
957
|
}
|
|
958
958
|
return {
|
|
959
959
|
files: l,
|
|
@@ -995,14 +995,14 @@ function zh(e, n = { width: 0, height: 0 }, i = {}) {
|
|
|
995
995
|
([a]) => {
|
|
996
996
|
const c = o === "border-box" ? a.borderBoxSize : o === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
997
997
|
if (t && l.value) {
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
const f =
|
|
998
|
+
const p = $n(e);
|
|
999
|
+
if (p) {
|
|
1000
|
+
const f = p.getBoundingClientRect();
|
|
1001
1001
|
s.value = f.width, h.value = f.height;
|
|
1002
1002
|
}
|
|
1003
1003
|
} else if (c) {
|
|
1004
|
-
const
|
|
1005
|
-
s.value =
|
|
1004
|
+
const p = Array.isArray(c) ? c : [c];
|
|
1005
|
+
s.value = p.reduce((f, { inlineSize: d }) => f + d, 0), h.value = p.reduce((f, { blockSize: d }) => f + d, 0);
|
|
1006
1006
|
} else
|
|
1007
1007
|
s.value = a.contentRect.width, h.value = a.contentRect.height;
|
|
1008
1008
|
},
|
|
@@ -1116,83 +1116,83 @@ function xh(e, n = {}) {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
const {
|
|
1118
1118
|
document: i = ro
|
|
1119
|
-
} = n, t = K(0), o = K(0), l = K(!1), s = K(1), h = K(!1), r = K(!1), u = K(!1), g = K(1), a = K(!1), c = K([]),
|
|
1120
|
-
si(e, (
|
|
1121
|
-
if (
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1119
|
+
} = n, t = K(0), o = K(0), l = K(!1), s = K(1), h = K(!1), r = K(!1), u = K(!1), g = K(1), a = K(!1), c = K([]), p = K([]), f = K(-1), d = K(!1), y = K(!1), b = i && "pictureInPictureEnabled" in i, A = Fe(), I = Fe(), w = (m) => {
|
|
1120
|
+
si(e, (C) => {
|
|
1121
|
+
if (m) {
|
|
1122
|
+
const W = typeof m == "number" ? m : m.id;
|
|
1123
|
+
C.textTracks[W].mode = "disabled";
|
|
1124
1124
|
} else
|
|
1125
|
-
for (let
|
|
1126
|
-
|
|
1125
|
+
for (let W = 0; W < C.textTracks.length; ++W)
|
|
1126
|
+
C.textTracks[W].mode = "disabled";
|
|
1127
1127
|
f.value = -1;
|
|
1128
1128
|
});
|
|
1129
|
-
}, J = (
|
|
1130
|
-
si(e, (
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1129
|
+
}, J = (m, C = !0) => {
|
|
1130
|
+
si(e, (W) => {
|
|
1131
|
+
const j = typeof m == "number" ? m : m.id;
|
|
1132
|
+
C && w(), W.textTracks[j].mode = "showing", f.value = j;
|
|
1133
1133
|
});
|
|
1134
|
-
}, k = () => new Promise((
|
|
1135
|
-
si(e, async (
|
|
1136
|
-
|
|
1134
|
+
}, k = () => new Promise((m, C) => {
|
|
1135
|
+
si(e, async (W) => {
|
|
1136
|
+
b && (d.value ? i.exitPictureInPicture().then(m).catch(C) : W.requestPictureInPicture().then(m).catch(C));
|
|
1137
1137
|
});
|
|
1138
1138
|
});
|
|
1139
1139
|
$i(() => {
|
|
1140
1140
|
if (!i)
|
|
1141
1141
|
return;
|
|
1142
|
-
const
|
|
1143
|
-
if (!
|
|
1142
|
+
const m = nn(e);
|
|
1143
|
+
if (!m)
|
|
1144
1144
|
return;
|
|
1145
|
-
const
|
|
1146
|
-
let
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
}),
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
}),
|
|
1145
|
+
const C = nn(n.src);
|
|
1146
|
+
let W = [];
|
|
1147
|
+
C && (typeof C == "string" ? W = [{ src: C }] : Array.isArray(C) ? W = C : so(C) && (W = [C]), m.querySelectorAll("source").forEach((j) => {
|
|
1148
|
+
j.removeEventListener("error", A.trigger), j.remove();
|
|
1149
|
+
}), W.forEach(({ src: j, type: x }) => {
|
|
1150
|
+
const q = i.createElement("source");
|
|
1151
|
+
q.setAttribute("src", j), q.setAttribute("type", x || ""), q.addEventListener("error", A.trigger), m.appendChild(q);
|
|
1152
|
+
}), m.load());
|
|
1153
1153
|
}), ge(() => {
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1154
|
+
const m = nn(e);
|
|
1155
|
+
m && m.querySelectorAll("source").forEach((C) => C.removeEventListener("error", A.trigger));
|
|
1156
1156
|
}), cn([e, s], () => {
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1157
|
+
const m = nn(e);
|
|
1158
|
+
m && (m.volume = s.value);
|
|
1159
1159
|
}), cn([e, y], () => {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1160
|
+
const m = nn(e);
|
|
1161
|
+
m && (m.muted = y.value);
|
|
1162
1162
|
}), cn([e, g], () => {
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1163
|
+
const m = nn(e);
|
|
1164
|
+
m && (m.playbackRate = g.value);
|
|
1165
1165
|
}), $i(() => {
|
|
1166
1166
|
if (!i)
|
|
1167
1167
|
return;
|
|
1168
|
-
const
|
|
1169
|
-
!
|
|
1168
|
+
const m = nn(n.tracks), C = nn(e);
|
|
1169
|
+
!m || !m.length || !C || (C.querySelectorAll("track").forEach((W) => W.remove()), m.forEach(({ default: W, kind: j, label: x, src: q, srcLang: O }, Z) => {
|
|
1170
1170
|
const X = i.createElement("track");
|
|
1171
|
-
X.default =
|
|
1171
|
+
X.default = W || !1, X.kind = j, X.label = x, X.src = q, X.srclang = O, X.default && (f.value = Z), C.appendChild(X);
|
|
1172
1172
|
}));
|
|
1173
1173
|
});
|
|
1174
|
-
const { ignoreUpdates: G } = lt(t, (
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
}), { ignoreUpdates: M } = lt(u, (
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
throw I.trigger(
|
|
1181
|
-
}) :
|
|
1174
|
+
const { ignoreUpdates: G } = lt(t, (m) => {
|
|
1175
|
+
const C = nn(e);
|
|
1176
|
+
C && (C.currentTime = m);
|
|
1177
|
+
}), { ignoreUpdates: M } = lt(u, (m) => {
|
|
1178
|
+
const C = nn(e);
|
|
1179
|
+
C && (m ? C.play().catch((W) => {
|
|
1180
|
+
throw I.trigger(W), W;
|
|
1181
|
+
}) : C.pause());
|
|
1182
1182
|
});
|
|
1183
1183
|
E(e, "timeupdate", () => G(() => t.value = nn(e).currentTime)), E(e, "durationchange", () => o.value = nn(e).duration), E(e, "progress", () => c.value = Ah(nn(e).buffered)), E(e, "seeking", () => l.value = !0), E(e, "seeked", () => l.value = !1), E(e, ["waiting", "loadstart"], () => {
|
|
1184
1184
|
h.value = !0, M(() => u.value = !1);
|
|
1185
1185
|
}), E(e, "loadeddata", () => h.value = !1), E(e, "playing", () => {
|
|
1186
1186
|
h.value = !1, r.value = !1, M(() => u.value = !0);
|
|
1187
|
-
}), E(e, "ratechange", () => g.value = nn(e).playbackRate), E(e, "stalled", () => a.value = !0), E(e, "ended", () => r.value = !0), E(e, "pause", () => M(() => u.value = !1)), E(e, "play", () => M(() => u.value = !0)), E(e, "enterpictureinpicture", () =>
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1187
|
+
}), E(e, "ratechange", () => g.value = nn(e).playbackRate), E(e, "stalled", () => a.value = !0), E(e, "ended", () => r.value = !0), E(e, "pause", () => M(() => u.value = !1)), E(e, "play", () => M(() => u.value = !0)), E(e, "enterpictureinpicture", () => d.value = !0), E(e, "leavepictureinpicture", () => d.value = !1), E(e, "volumechange", () => {
|
|
1188
|
+
const m = nn(e);
|
|
1189
|
+
m && (s.value = m.volume, y.value = m.muted);
|
|
1190
1190
|
});
|
|
1191
|
-
const V = [],
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1191
|
+
const V = [], S = cn([e], () => {
|
|
1192
|
+
const m = nn(e);
|
|
1193
|
+
m && (S(), V[0] = E(m.textTracks, "addtrack", () => p.value = hi(m.textTracks)), V[1] = E(m.textTracks, "removetrack", () => p.value = hi(m.textTracks)), V[2] = E(m.textTracks, "change", () => p.value = hi(m.textTracks)));
|
|
1194
1194
|
});
|
|
1195
|
-
return ge(() => V.forEach((
|
|
1195
|
+
return ge(() => V.forEach((m) => m())), {
|
|
1196
1196
|
currentTime: t,
|
|
1197
1197
|
duration: o,
|
|
1198
1198
|
waiting: h,
|
|
@@ -1206,16 +1206,16 @@ function xh(e, n = {}) {
|
|
|
1206
1206
|
volume: s,
|
|
1207
1207
|
muted: y,
|
|
1208
1208
|
// Tracks
|
|
1209
|
-
tracks:
|
|
1209
|
+
tracks: p,
|
|
1210
1210
|
selectedTrack: f,
|
|
1211
1211
|
enableTrack: J,
|
|
1212
1212
|
disableTrack: w,
|
|
1213
1213
|
// Picture in Picture
|
|
1214
|
-
supportsPictureInPicture:
|
|
1214
|
+
supportsPictureInPicture: b,
|
|
1215
1215
|
togglePictureInPicture: k,
|
|
1216
|
-
isPictureInPicture:
|
|
1216
|
+
isPictureInPicture: d,
|
|
1217
1217
|
// Events
|
|
1218
|
-
onSourceError:
|
|
1218
|
+
onSourceError: A.on,
|
|
1219
1219
|
onPlaybackError: I.on
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
@@ -1239,72 +1239,72 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1239
1239
|
},
|
|
1240
1240
|
emits: ["update:modelValue", "change"],
|
|
1241
1241
|
setup(e, { emit: n }) {
|
|
1242
|
-
Nt((
|
|
1243
|
-
v74036a63:
|
|
1244
|
-
v41a8ae01:
|
|
1245
|
-
c15225e4:
|
|
1246
|
-
v9294f916:
|
|
1247
|
-
v5c0c1e88:
|
|
1248
|
-
v69c0c568:
|
|
1242
|
+
Nt((d) => ({
|
|
1243
|
+
v74036a63: d.background,
|
|
1244
|
+
v41a8ae01: d.activeBackgound,
|
|
1245
|
+
c15225e4: d.color,
|
|
1246
|
+
v9294f916: z(h),
|
|
1247
|
+
v5c0c1e88: z(r),
|
|
1248
|
+
v69c0c568: d.activeColor
|
|
1249
1249
|
}));
|
|
1250
1250
|
const i = e, t = n, { modelValue: o, defaultValue: l, options: s, hoverBackground: h, hoverColor: r } = ki(i), u = lo(
|
|
1251
1251
|
o,
|
|
1252
1252
|
l.value || s.value[0].value,
|
|
1253
|
-
(
|
|
1254
|
-
t("update:modelValue",
|
|
1253
|
+
(d) => {
|
|
1254
|
+
t("update:modelValue", d), t("change", d);
|
|
1255
1255
|
}
|
|
1256
|
-
), g = K([]), a = K(), c = (
|
|
1257
|
-
const y = Hn(
|
|
1256
|
+
), g = K([]), a = K(), c = (d = 18) => {
|
|
1257
|
+
const y = Hn(d);
|
|
1258
1258
|
return {
|
|
1259
1259
|
width: y,
|
|
1260
1260
|
height: y,
|
|
1261
1261
|
fontSize: y
|
|
1262
1262
|
};
|
|
1263
|
-
},
|
|
1264
|
-
u.value !==
|
|
1263
|
+
}, p = (d) => {
|
|
1264
|
+
u.value !== d && (u.value = d);
|
|
1265
1265
|
}, f = async () => {
|
|
1266
1266
|
await de();
|
|
1267
|
-
const
|
|
1268
|
-
(
|
|
1269
|
-
), y =
|
|
1267
|
+
const d = s.value.findIndex(
|
|
1268
|
+
(A) => A.value === u.value
|
|
1269
|
+
), y = d === -1 ? 0 : d, b = g.value[y];
|
|
1270
1270
|
a.value = {
|
|
1271
1271
|
...i.sliderStyle || {},
|
|
1272
|
-
width: Hn(
|
|
1273
|
-
transform: `translateX(${Hn(
|
|
1272
|
+
width: Hn(b == null ? void 0 : b.offsetWidth),
|
|
1273
|
+
transform: `translateX(${Hn(b == null ? void 0 : b.offsetLeft)})`
|
|
1274
1274
|
};
|
|
1275
1275
|
};
|
|
1276
1276
|
return cn(() => u.value, f, {
|
|
1277
1277
|
immediate: !0
|
|
1278
1278
|
}), Hi(g, f, {
|
|
1279
1279
|
box: "border-box"
|
|
1280
|
-
}), (
|
|
1281
|
-
|
|
1280
|
+
}), (d, y) => (Y(), L("div", Ch, [
|
|
1281
|
+
v("div", {
|
|
1282
1282
|
class: "cx-radio-slider",
|
|
1283
1283
|
style: he(a.value)
|
|
1284
1284
|
}, null, 4),
|
|
1285
|
-
(Y(!0), L(en, null, gn(
|
|
1286
|
-
key:
|
|
1285
|
+
(Y(!0), L(en, null, gn(z(s), (b, A) => (Y(), L("div", {
|
|
1286
|
+
key: b.value,
|
|
1287
1287
|
style: he(e.radioStyle),
|
|
1288
1288
|
class: bn([
|
|
1289
1289
|
"cx-radio",
|
|
1290
1290
|
{
|
|
1291
|
-
"cx-radio-selected":
|
|
1291
|
+
"cx-radio-selected": z(u) === b.value
|
|
1292
1292
|
}
|
|
1293
1293
|
]),
|
|
1294
1294
|
ref_for: !0,
|
|
1295
|
-
ref: (I) => g.value[
|
|
1296
|
-
onClick: (I) =>
|
|
1295
|
+
ref: (I) => g.value[A] = I,
|
|
1296
|
+
onClick: (I) => p(b.value)
|
|
1297
1297
|
}, [
|
|
1298
|
-
|
|
1298
|
+
b.icon ? (Y(), L("div", {
|
|
1299
1299
|
key: 0,
|
|
1300
1300
|
class: "cx-radio-icon",
|
|
1301
|
-
style: he(c(
|
|
1301
|
+
style: he(c(b.iconSize))
|
|
1302
1302
|
}, [
|
|
1303
|
-
H(
|
|
1304
|
-
name:
|
|
1303
|
+
H(z(rn), {
|
|
1304
|
+
name: b.icon
|
|
1305
1305
|
}, null, 8, ["name"])
|
|
1306
1306
|
], 4)) : yn("", !0),
|
|
1307
|
-
|
|
1307
|
+
b.label ? (Y(), L("div", Wh, F(b.label), 1)) : yn("", !0)
|
|
1308
1308
|
], 14, Ih))), 128))
|
|
1309
1309
|
]));
|
|
1310
1310
|
}
|
|
@@ -1327,13 +1327,13 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1327
1327
|
H(Cl, { name: "el-fade-in" }, {
|
|
1328
1328
|
default: N(() => [
|
|
1329
1329
|
e.loading ? (Y(), L("div", Yh, [
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
src:
|
|
1330
|
+
v("div", kh, [
|
|
1331
|
+
v("img", {
|
|
1332
|
+
src: z(Sh),
|
|
1333
1333
|
class: "cx-spin-loading",
|
|
1334
1334
|
style: he({
|
|
1335
|
-
width:
|
|
1336
|
-
height:
|
|
1335
|
+
width: z(Hn)(e.size),
|
|
1336
|
+
height: z(Hn)(e.size)
|
|
1337
1337
|
})
|
|
1338
1338
|
}, null, 12, Kh),
|
|
1339
1339
|
e.text ? (Y(), L("span", Vh, F(e.text), 1)) : yn("", !0)
|
|
@@ -1369,26 +1369,26 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1369
1369
|
(w) => {
|
|
1370
1370
|
o("update:modelValue", w);
|
|
1371
1371
|
}
|
|
1372
|
-
), a = T(() => g.value[0]), { onChange: c, open:
|
|
1372
|
+
), a = T(() => g.value[0]), { onChange: c, open: p } = vh({
|
|
1373
1373
|
accept: r.value.join(","),
|
|
1374
1374
|
multiple: !1,
|
|
1375
1375
|
reset: !0
|
|
1376
1376
|
});
|
|
1377
|
-
c((w) =>
|
|
1378
|
-
const f = K(), { isOverDropZone:
|
|
1377
|
+
c((w) => b(w && [...w]));
|
|
1378
|
+
const f = K(), { isOverDropZone: d } = qh(f, {
|
|
1379
1379
|
preventDefaultForUnhandled: !0,
|
|
1380
|
-
onDrop: (w) =>
|
|
1380
|
+
onDrop: (w) => b(w)
|
|
1381
1381
|
}), y = () => {
|
|
1382
1382
|
o("clear"), g.value = [];
|
|
1383
|
-
},
|
|
1383
|
+
}, b = (w) => {
|
|
1384
1384
|
if (u.value || !(w != null && w.length)) return;
|
|
1385
1385
|
const J = w.filter((k) => I(k));
|
|
1386
1386
|
J.length && (g.value = J, o("change", J));
|
|
1387
|
-
},
|
|
1388
|
-
u.value ||
|
|
1387
|
+
}, A = () => {
|
|
1388
|
+
u.value || p();
|
|
1389
1389
|
}, I = (w) => r.value.includes(`.${oo(w.name)}`) ? h.value > 0 && w.size > h.value ? (ji.error("文件大小不符合上传要求"), o("error", "size", w), !1) : !0 : (ji.error("文件类型不符合上传要求"), o("error", "type", w), !1);
|
|
1390
1390
|
return n({
|
|
1391
|
-
open:
|
|
1391
|
+
open: A,
|
|
1392
1392
|
clear: () => {
|
|
1393
1393
|
g.value = [];
|
|
1394
1394
|
}
|
|
@@ -1396,34 +1396,34 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1396
1396
|
class: bn([
|
|
1397
1397
|
"cx-upload-wrapper",
|
|
1398
1398
|
{
|
|
1399
|
-
"cx-upload-dragging":
|
|
1400
|
-
"cx-upload-has-value":
|
|
1401
|
-
"cx-upload-disabled":
|
|
1399
|
+
"cx-upload-dragging": z(d),
|
|
1400
|
+
"cx-upload-has-value": z(g).length > 0,
|
|
1401
|
+
"cx-upload-disabled": z(u)
|
|
1402
1402
|
}
|
|
1403
1403
|
])
|
|
1404
1404
|
}, [
|
|
1405
1405
|
a.value ? (Y(), L("div", Xh, [
|
|
1406
|
-
|
|
1407
|
-
H(
|
|
1408
|
-
name: `icon-component-file-${
|
|
1406
|
+
v("div", Jh, [
|
|
1407
|
+
H(z(rn), {
|
|
1408
|
+
name: `icon-component-file-${z(gs)(a.value.name)}`,
|
|
1409
1409
|
size: "56"
|
|
1410
1410
|
}, null, 8, ["name"]),
|
|
1411
|
-
|
|
1411
|
+
v("span", {
|
|
1412
1412
|
class: "cx-upload-clear-icon",
|
|
1413
1413
|
onClick: y
|
|
1414
1414
|
}, [
|
|
1415
|
-
H(
|
|
1415
|
+
H(z(rn), {
|
|
1416
1416
|
name: "icon-component-upload-clear",
|
|
1417
1417
|
size: "16"
|
|
1418
1418
|
})
|
|
1419
1419
|
])
|
|
1420
1420
|
]),
|
|
1421
|
-
|
|
1422
|
-
|
|
1421
|
+
v("div", Hh, F(a.value.name), 1),
|
|
1422
|
+
v("div", Lh, [
|
|
1423
1423
|
wn(w.$slots, "operate", {}, () => [
|
|
1424
|
-
|
|
1424
|
+
v("div", {
|
|
1425
1425
|
class: "cx-upload-file-replace",
|
|
1426
|
-
onClick:
|
|
1426
|
+
onClick: A
|
|
1427
1427
|
}, " 点击更换文件 ")
|
|
1428
1428
|
], !0)
|
|
1429
1429
|
])
|
|
@@ -1432,15 +1432,15 @@ const Ch = { class: "cx-radio-group" }, Ih = ["onClick"], Wh = {
|
|
|
1432
1432
|
class: "cx-upload",
|
|
1433
1433
|
ref_key: "uploadRef",
|
|
1434
1434
|
ref: f,
|
|
1435
|
-
onClick:
|
|
1435
|
+
onClick: A
|
|
1436
1436
|
}, [
|
|
1437
|
-
|
|
1438
|
-
H(
|
|
1437
|
+
v("div", Mh, [
|
|
1438
|
+
H(z(rn), {
|
|
1439
1439
|
name: "icon-component-cx-upload",
|
|
1440
1440
|
size: [28, 19]
|
|
1441
1441
|
})
|
|
1442
1442
|
]),
|
|
1443
|
-
|
|
1443
|
+
v("div", Th, F(e.title), 1),
|
|
1444
1444
|
e.tip ? (Y(), L("div", Nh, F(e.tip), 1)) : yn("", !0)
|
|
1445
1445
|
], 512))
|
|
1446
1446
|
], 2));
|
|
@@ -1525,8 +1525,8 @@ const Uh = {
|
|
|
1525
1525
|
console.warn("无法获取节点位置");
|
|
1526
1526
|
return;
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1529
|
-
a(
|
|
1528
|
+
const p = n.node.textContent, f = c, d = c + n.node.nodeSize, y = g.schema.text(p), b = g.tr.replaceWith(f, d, y);
|
|
1529
|
+
a(b);
|
|
1530
1530
|
}, s = () => {
|
|
1531
1531
|
const u = P[o.value];
|
|
1532
1532
|
if ("deleteMode" in u && u.deleteMode === cl.DELETE_NODE)
|
|
@@ -1537,7 +1537,7 @@ const Uh = {
|
|
|
1537
1537
|
if (o.value === P.language.type)
|
|
1538
1538
|
return ((u = gl.find((g) => g.value === t.value.code)) == null ? void 0 : u.label) || "";
|
|
1539
1539
|
}), r = T(() => P[o.value].icon);
|
|
1540
|
-
return (u, g) => (Y(), _(
|
|
1540
|
+
return (u, g) => (Y(), _(z(Ll), {
|
|
1541
1541
|
as: "span",
|
|
1542
1542
|
class: bn(["tag-node", {
|
|
1543
1543
|
"is-selected": i.value
|
|
@@ -1545,51 +1545,51 @@ const Uh = {
|
|
|
1545
1545
|
contenteditable: "false"
|
|
1546
1546
|
}, {
|
|
1547
1547
|
default: N(() => {
|
|
1548
|
-
var a, c,
|
|
1548
|
+
var a, c, p;
|
|
1549
1549
|
return [
|
|
1550
|
-
|
|
1551
|
-
H(
|
|
1550
|
+
v("span", Dh, [
|
|
1551
|
+
H(z(rn), {
|
|
1552
1552
|
name: r.value,
|
|
1553
1553
|
size: 14
|
|
1554
1554
|
}, null, 8, ["name"])
|
|
1555
1555
|
]),
|
|
1556
|
-
o.value ===
|
|
1557
|
-
|
|
1558
|
-
H(
|
|
1556
|
+
o.value === z(P).stop.type ? (Y(), L("span", Bh, "停顿")) : o.value === z(P).customStop.type ? (Y(), L("span", Qh, "停顿" + F((a = t.value) == null ? void 0 : a.time) + "s", 1)) : o.value === z(P).continue.type ? (Y(), L(en, { key: 2 }, [
|
|
1557
|
+
v("span", null, "连续" + F(be)),
|
|
1558
|
+
H(z(ye), {
|
|
1559
1559
|
as: "span",
|
|
1560
1560
|
class: "tag-content"
|
|
1561
1561
|
})
|
|
1562
|
-
], 64)) : o.value ===
|
|
1563
|
-
|
|
1564
|
-
H(
|
|
1562
|
+
], 64)) : o.value === z(P).replace.type ? (Y(), L(en, { key: 3 }, [
|
|
1563
|
+
v("span", null, "替换" + F(be)),
|
|
1564
|
+
H(z(ye), {
|
|
1565
1565
|
as: "span",
|
|
1566
1566
|
class: "tag-content"
|
|
1567
1567
|
}),
|
|
1568
|
-
g[0] || (g[0] =
|
|
1569
|
-
|
|
1570
|
-
], 64)) : o.value ===
|
|
1571
|
-
|
|
1572
|
-
H(
|
|
1568
|
+
g[0] || (g[0] = v("span", null, "→", -1)),
|
|
1569
|
+
v("span", null, F((c = t.value) == null ? void 0 : c.text), 1)
|
|
1570
|
+
], 64)) : o.value === z(P).pinyin.type ? (Y(), L(en, { key: 4 }, [
|
|
1571
|
+
v("span", null, "拼音" + F(be)),
|
|
1572
|
+
H(z(ye), {
|
|
1573
1573
|
as: "span",
|
|
1574
1574
|
class: "tag-content"
|
|
1575
1575
|
}),
|
|
1576
|
-
g[1] || (g[1] =
|
|
1577
|
-
|
|
1578
|
-
], 64)) : o.value ===
|
|
1579
|
-
|
|
1580
|
-
H(
|
|
1576
|
+
g[1] || (g[1] = v("span", null, "→", -1)),
|
|
1577
|
+
v("span", null, F((p = t.value) == null ? void 0 : p.text), 1)
|
|
1578
|
+
], 64)) : o.value === z(P).language.type ? (Y(), L(en, { key: 5 }, [
|
|
1579
|
+
v("span", null, F(h.value) + F(be), 1),
|
|
1580
|
+
H(z(ye), {
|
|
1581
1581
|
as: "span",
|
|
1582
1582
|
class: "tag-content"
|
|
1583
1583
|
})
|
|
1584
|
-
], 64)) : o.value ===
|
|
1585
|
-
|
|
1586
|
-
H(
|
|
1584
|
+
], 64)) : o.value === z(P).ignore.type ? (Y(), L(en, { key: 6 }, [
|
|
1585
|
+
v("span", null, "忽略读音" + F(be)),
|
|
1586
|
+
H(z(ye), {
|
|
1587
1587
|
as: "span",
|
|
1588
1588
|
class: "tag-content"
|
|
1589
1589
|
})
|
|
1590
1590
|
], 64)) : yn("", !0),
|
|
1591
|
-
|
|
1592
|
-
H(
|
|
1591
|
+
v("span", _h, [
|
|
1592
|
+
H(z(rn), {
|
|
1593
1593
|
name: "editor-close",
|
|
1594
1594
|
class: "delete-btn",
|
|
1595
1595
|
onClick: bi(s, ["stop"])
|
|
@@ -1622,7 +1622,22 @@ const Uh = {
|
|
|
1622
1622
|
return {
|
|
1623
1623
|
id: { default: "" },
|
|
1624
1624
|
categ: { default: o },
|
|
1625
|
-
payload: {
|
|
1625
|
+
payload: {
|
|
1626
|
+
default: {},
|
|
1627
|
+
renderHTML: ({ payload: s }) => ({
|
|
1628
|
+
payload: JSON.stringify(s ?? {}) ?? "{}"
|
|
1629
|
+
}),
|
|
1630
|
+
parseHTML: (s) => {
|
|
1631
|
+
const h = s.getAttribute("payload");
|
|
1632
|
+
if (!h) return {};
|
|
1633
|
+
try {
|
|
1634
|
+
const r = JSON.parse(h);
|
|
1635
|
+
return r && typeof r == "object" ? r : {};
|
|
1636
|
+
} catch {
|
|
1637
|
+
return {};
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1626
1641
|
};
|
|
1627
1642
|
},
|
|
1628
1643
|
parseHTML() {
|
|
@@ -2153,11 +2168,11 @@ class pn {
|
|
|
2153
2168
|
break;
|
|
2154
2169
|
let u = this.ranges[h + l], g = this.ranges[h + s], a = r + u;
|
|
2155
2170
|
if (n <= a) {
|
|
2156
|
-
let c = u ? n == r ? -1 : n == a ? 1 : i : i,
|
|
2171
|
+
let c = u ? n == r ? -1 : n == a ? 1 : i : i, p = r + o + (c < 0 ? 0 : g);
|
|
2157
2172
|
if (t)
|
|
2158
|
-
return
|
|
2159
|
-
let f = n == (i < 0 ? r : a) ? null : or(h / 3, n - r),
|
|
2160
|
-
return (i < 0 ? n != r : n != a) && (
|
|
2173
|
+
return p;
|
|
2174
|
+
let f = n == (i < 0 ? r : a) ? null : or(h / 3, n - r), d = n == r ? jo : n == a ? bo : Le;
|
|
2175
|
+
return (i < 0 ? n != r : n != a) && (d |= vo), new ut(p, d, f);
|
|
2161
2176
|
}
|
|
2162
2177
|
o += g - u;
|
|
2163
2178
|
}
|
|
@@ -3199,12 +3214,12 @@ function rr(e = {}) {
|
|
|
3199
3214
|
editable: l = K(!0),
|
|
3200
3215
|
services: s = K({}),
|
|
3201
3216
|
features: h = K({})
|
|
3202
|
-
} = e, r = e.getGenerateAudioParams ?? (() => ({})), u = K(Uh.TEXT),
|
|
3203
|
-
const { from: W, to:
|
|
3204
|
-
return
|
|
3205
|
-
},
|
|
3206
|
-
|
|
3207
|
-
},
|
|
3217
|
+
} = e, r = e.getGenerateAudioParams ?? (() => ({})), u = e.getPlaybackSpeed ?? (() => 1), g = K(Uh.TEXT), a = K(""), c = (m, C = "") => {
|
|
3218
|
+
const { from: W, to: j, empty: x } = m.state.selection;
|
|
3219
|
+
return x ? "" : m.state.doc.textBetween(W, j, C);
|
|
3220
|
+
}, p = (m) => {
|
|
3221
|
+
a.value = c(m);
|
|
3222
|
+
}, f = Tl({
|
|
3208
3223
|
content: n,
|
|
3209
3224
|
editable: l.value,
|
|
3210
3225
|
extensions: [
|
|
@@ -3228,65 +3243,65 @@ function rr(e = {}) {
|
|
|
3228
3243
|
attributes: {
|
|
3229
3244
|
class: "tiptap-editor"
|
|
3230
3245
|
},
|
|
3231
|
-
transformPastedText(
|
|
3232
|
-
return _i(
|
|
3246
|
+
transformPastedText(m) {
|
|
3247
|
+
return _i(m);
|
|
3233
3248
|
},
|
|
3234
|
-
transformPastedHTML(
|
|
3235
|
-
return dl(
|
|
3249
|
+
transformPastedHTML(m) {
|
|
3250
|
+
return dl(m);
|
|
3236
3251
|
}
|
|
3237
3252
|
},
|
|
3238
|
-
onCreate({ editor:
|
|
3239
|
-
var
|
|
3240
|
-
|
|
3253
|
+
onCreate({ editor: m }) {
|
|
3254
|
+
var C;
|
|
3255
|
+
p(m), (C = e.onCreate) == null || C.call(e, m);
|
|
3241
3256
|
},
|
|
3242
|
-
onUpdate({ editor:
|
|
3243
|
-
var
|
|
3244
|
-
|
|
3257
|
+
onUpdate({ editor: m }) {
|
|
3258
|
+
var C, W;
|
|
3259
|
+
p(m), (C = e.onChange) == null || C.call(e, m), (W = e.onUpdate) == null || W.call(e, m.getJSON(), m);
|
|
3245
3260
|
},
|
|
3246
|
-
onSelectionUpdate({ editor:
|
|
3247
|
-
|
|
3261
|
+
onSelectionUpdate({ editor: m }) {
|
|
3262
|
+
p(m);
|
|
3248
3263
|
}
|
|
3249
3264
|
});
|
|
3250
|
-
cn(l, (
|
|
3251
|
-
var
|
|
3252
|
-
return (
|
|
3265
|
+
cn(l, (m) => {
|
|
3266
|
+
var C;
|
|
3267
|
+
return (C = f.value) == null ? void 0 : C.setEditable(m);
|
|
3253
3268
|
});
|
|
3254
|
-
const
|
|
3255
|
-
if (!
|
|
3256
|
-
const { empty:
|
|
3257
|
-
return
|
|
3269
|
+
const d = T(() => a.value.length > 0), y = T(() => /^\d+$/.test(a.value)), b = () => f.value ? c(f.value) : "", A = () => {
|
|
3270
|
+
if (!f.value) return null;
|
|
3271
|
+
const { empty: m } = f.value.state.selection;
|
|
3272
|
+
return m ? null : f.value.state.selection.content().toJSON();
|
|
3258
3273
|
};
|
|
3259
|
-
function
|
|
3274
|
+
function I(m) {
|
|
3260
3275
|
var W;
|
|
3261
|
-
if (!
|
|
3262
|
-
const { empty:
|
|
3263
|
-
|
|
3276
|
+
if (!f.value) return;
|
|
3277
|
+
const { empty: C } = f.value.state.selection;
|
|
3278
|
+
C && ((W = f.value) == null || W.chain().focus().insertContent({
|
|
3264
3279
|
type: ce,
|
|
3265
3280
|
attrs: {
|
|
3266
3281
|
id: Zi(16),
|
|
3267
|
-
...
|
|
3282
|
+
...m
|
|
3268
3283
|
}
|
|
3269
3284
|
}).run());
|
|
3270
3285
|
}
|
|
3271
|
-
function
|
|
3272
|
-
if (!
|
|
3273
|
-
const { from:
|
|
3274
|
-
if (
|
|
3275
|
-
const
|
|
3286
|
+
function w(m) {
|
|
3287
|
+
if (!f.value) return;
|
|
3288
|
+
const { from: C, to: W, empty: j } = f.value.state.selection;
|
|
3289
|
+
if (j) return;
|
|
3290
|
+
const x = j ? "" : f.value.state.doc.textBetween(C, W, ""), q = f.value.chain().focus().deleteRange({ from: C, to: W }).insertContent({
|
|
3276
3291
|
type: ce,
|
|
3277
3292
|
attrs: {
|
|
3278
3293
|
id: Zi(16),
|
|
3279
|
-
...
|
|
3294
|
+
...m
|
|
3280
3295
|
},
|
|
3281
|
-
content:
|
|
3296
|
+
content: x ? [{ type: "text", text: x }] : []
|
|
3282
3297
|
});
|
|
3283
|
-
|
|
3298
|
+
j && q.setTextSelection(C + 1), q.run();
|
|
3284
3299
|
}
|
|
3285
|
-
const
|
|
3286
|
-
if (!
|
|
3287
|
-
const { empty:
|
|
3288
|
-
if (
|
|
3289
|
-
const W =
|
|
3300
|
+
const J = () => {
|
|
3301
|
+
if (!f.value) return null;
|
|
3302
|
+
const { empty: m, head: C } = f.value.state.selection;
|
|
3303
|
+
if (m) return null;
|
|
3304
|
+
const W = f.value.view.coordsAtPos(C);
|
|
3290
3305
|
return {
|
|
3291
3306
|
getBoundingClientRect() {
|
|
3292
3307
|
return {
|
|
@@ -3302,58 +3317,59 @@ function rr(e = {}) {
|
|
|
3302
3317
|
}
|
|
3303
3318
|
};
|
|
3304
3319
|
};
|
|
3305
|
-
function
|
|
3306
|
-
var
|
|
3307
|
-
(
|
|
3308
|
-
}
|
|
3309
|
-
const
|
|
3310
|
-
var
|
|
3311
|
-
(
|
|
3312
|
-
},
|
|
3313
|
-
var W,
|
|
3314
|
-
const
|
|
3315
|
-
if (!
|
|
3316
|
-
(W =
|
|
3320
|
+
function k() {
|
|
3321
|
+
var m;
|
|
3322
|
+
(m = f.value) == null || m.commands.setContent(Jn());
|
|
3323
|
+
}
|
|
3324
|
+
const G = (m) => {
|
|
3325
|
+
var C;
|
|
3326
|
+
(C = f.value) == null || C.commands.setContent(m, { emitUpdate: !1 });
|
|
3327
|
+
}, M = (m) => {
|
|
3328
|
+
var W, j;
|
|
3329
|
+
const C = _i(m);
|
|
3330
|
+
if (!C) {
|
|
3331
|
+
(W = f.value) == null || W.commands.setContent(Jn());
|
|
3317
3332
|
return;
|
|
3318
3333
|
}
|
|
3319
|
-
(
|
|
3334
|
+
(j = f.value) == null || j.commands.setContent({
|
|
3320
3335
|
type: "doc",
|
|
3321
|
-
content:
|
|
3322
|
-
`).map((
|
|
3336
|
+
content: C.split(`
|
|
3337
|
+
`).map((x) => ({
|
|
3323
3338
|
type: "paragraph",
|
|
3324
|
-
content:
|
|
3339
|
+
content: x ? [{ type: "text", text: x }] : []
|
|
3325
3340
|
}))
|
|
3326
3341
|
});
|
|
3327
|
-
},
|
|
3328
|
-
var
|
|
3329
|
-
return ((
|
|
3342
|
+
}, V = T(() => {
|
|
3343
|
+
var m;
|
|
3344
|
+
return ((m = f.value) == null ? void 0 : m.storage.characterCount.characters()) || 0;
|
|
3330
3345
|
});
|
|
3331
3346
|
return {
|
|
3332
|
-
editor:
|
|
3333
|
-
driveMode:
|
|
3334
|
-
insertToken:
|
|
3335
|
-
insertWrappedToken:
|
|
3336
|
-
clearContent:
|
|
3337
|
-
setContent:
|
|
3338
|
-
getSelectedText:
|
|
3339
|
-
getSelectedJson:
|
|
3340
|
-
selectedText:
|
|
3341
|
-
hasSelectedText:
|
|
3342
|
-
isSelectedPureNumber:
|
|
3347
|
+
editor: f,
|
|
3348
|
+
driveMode: g,
|
|
3349
|
+
insertToken: I,
|
|
3350
|
+
insertWrappedToken: w,
|
|
3351
|
+
clearContent: k,
|
|
3352
|
+
setContent: G,
|
|
3353
|
+
getSelectedText: b,
|
|
3354
|
+
getSelectedJson: A,
|
|
3355
|
+
selectedText: a,
|
|
3356
|
+
hasSelectedText: d,
|
|
3357
|
+
isSelectedPureNumber: y,
|
|
3343
3358
|
textLimitLength: i,
|
|
3344
3359
|
getGenerateAudioParams: r,
|
|
3360
|
+
getPlaybackSpeed: u,
|
|
3345
3361
|
services: s,
|
|
3346
3362
|
features: h,
|
|
3347
|
-
notify: (
|
|
3363
|
+
notify: (m, C) => {
|
|
3348
3364
|
if (s.value.notify) {
|
|
3349
|
-
s.value.notify(
|
|
3365
|
+
s.value.notify(m, C);
|
|
3350
3366
|
return;
|
|
3351
3367
|
}
|
|
3352
|
-
ji({ type:
|
|
3368
|
+
ji({ type: m, message: C });
|
|
3353
3369
|
},
|
|
3354
|
-
getReferencedVirtualElement:
|
|
3355
|
-
replaceContentWithText:
|
|
3356
|
-
textLength:
|
|
3370
|
+
getReferencedVirtualElement: J,
|
|
3371
|
+
replaceContentWithText: M,
|
|
3372
|
+
textLength: V,
|
|
3357
3373
|
voiceVersion: t
|
|
3358
3374
|
};
|
|
3359
3375
|
}
|
|
@@ -3446,48 +3462,48 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3446
3462
|
const { services: n } = Tn(), i = K(!1), t = K([]), o = K(-1), l = K("idle"), s = K(!1), h = K(!1);
|
|
3447
3463
|
let r = null, u = null;
|
|
3448
3464
|
const g = T(() => {
|
|
3449
|
-
var
|
|
3450
|
-
return o.value < 0 ? "" : ((
|
|
3451
|
-
}), a = xh(e, { src: g }), { playing: c } = a,
|
|
3452
|
-
() => t.value.reduce((
|
|
3453
|
-
), y = T(() => o.value <= 0 ? 0 : t.value.slice(0, o.value).reduce((
|
|
3465
|
+
var j;
|
|
3466
|
+
return o.value < 0 ? "" : ((j = t.value[o.value]) == null ? void 0 : j.src) || "";
|
|
3467
|
+
}), a = xh(e, { src: g }), { playing: c } = a, p = T(() => l.value === "playing"), f = T(() => t.value.length > 0), d = T(
|
|
3468
|
+
() => t.value.reduce((j, x) => j + x.duration, 0)
|
|
3469
|
+
), y = T(() => o.value <= 0 ? 0 : t.value.slice(0, o.value).reduce((j, x) => j + x.duration, 0)), b = T({
|
|
3454
3470
|
get() {
|
|
3455
3471
|
return o.value < 0 || !g.value ? 0 : y.value + a.currentTime.value;
|
|
3456
3472
|
},
|
|
3457
|
-
set(
|
|
3473
|
+
set(j) {
|
|
3458
3474
|
a.currentTime.value = Math.max(
|
|
3459
3475
|
0,
|
|
3460
|
-
|
|
3476
|
+
j - y.value
|
|
3461
3477
|
);
|
|
3462
3478
|
}
|
|
3463
|
-
}),
|
|
3479
|
+
}), A = T({
|
|
3464
3480
|
get: () => c.value,
|
|
3465
|
-
set(
|
|
3466
|
-
l.value =
|
|
3481
|
+
set(j) {
|
|
3482
|
+
l.value = j ? "playing" : "paused", c.value = j;
|
|
3467
3483
|
}
|
|
3468
3484
|
}), I = {
|
|
3469
3485
|
...a,
|
|
3470
|
-
playing:
|
|
3471
|
-
currentTime:
|
|
3472
|
-
duration:
|
|
3486
|
+
playing: A,
|
|
3487
|
+
currentTime: b,
|
|
3488
|
+
duration: d
|
|
3473
3489
|
}, w = async () => {
|
|
3474
3490
|
s.value = !1, await de(), c.value = !0;
|
|
3475
3491
|
}, J = async () => {
|
|
3476
3492
|
t.value.length && (o.value = 0, a.currentTime.value = 0, await w());
|
|
3477
3493
|
}, k = async () => {
|
|
3478
3494
|
if (l.value !== "playing") return;
|
|
3479
|
-
const
|
|
3480
|
-
if (!t.value[
|
|
3495
|
+
const j = o.value + 1;
|
|
3496
|
+
if (!t.value[j]) {
|
|
3481
3497
|
h.value ? l.value = "idle" : s.value = !0;
|
|
3482
3498
|
return;
|
|
3483
3499
|
}
|
|
3484
|
-
o.value =
|
|
3500
|
+
o.value = j, await w();
|
|
3485
3501
|
}, G = async () => {
|
|
3486
3502
|
if (l.value = "playing", o.value < 0 || s.value) {
|
|
3487
3503
|
await k();
|
|
3488
3504
|
return;
|
|
3489
3505
|
}
|
|
3490
|
-
if (
|
|
3506
|
+
if (d.value > 0 && b.value >= d.value) {
|
|
3491
3507
|
await J();
|
|
3492
3508
|
return;
|
|
3493
3509
|
}
|
|
@@ -3496,66 +3512,66 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3496
3512
|
E(e, "ended", () => {
|
|
3497
3513
|
k();
|
|
3498
3514
|
}), E(e, "loadedmetadata", () => {
|
|
3499
|
-
var
|
|
3500
|
-
const
|
|
3501
|
-
|
|
3515
|
+
var q;
|
|
3516
|
+
const j = t.value[o.value], x = (q = e == null ? void 0 : e.value) == null ? void 0 : q.duration;
|
|
3517
|
+
j && !j.duration && Number.isFinite(x) && (j.duration = x || 0);
|
|
3502
3518
|
});
|
|
3503
3519
|
const M = () => {
|
|
3504
3520
|
l.value = "stopped", c.value = !1, s.value = !1, i.value = !1, r == null || r.abort(), r = null;
|
|
3505
3521
|
}, V = () => {
|
|
3506
|
-
t.value.forEach((
|
|
3507
|
-
},
|
|
3522
|
+
t.value.forEach((j) => URL.revokeObjectURL(j.src)), t.value = [], o.value = -1, a.currentTime.value = 0, s.value = !1, h.value = !1;
|
|
3523
|
+
}, S = () => {
|
|
3508
3524
|
h.value = !0, s.value && o.value >= t.value.length - 1 && (s.value = !1, l.value = "idle"), i.value = !1;
|
|
3509
|
-
},
|
|
3510
|
-
if (
|
|
3511
|
-
|
|
3525
|
+
}, m = (j) => {
|
|
3526
|
+
if (j.done) {
|
|
3527
|
+
S(), u = j;
|
|
3512
3528
|
return;
|
|
3513
3529
|
}
|
|
3514
|
-
|
|
3515
|
-
src: pr(
|
|
3516
|
-
duration: mr(
|
|
3530
|
+
j.audio_base64 && (t.value[j.index] = {
|
|
3531
|
+
src: pr(j.audio_base64, j.audio_format),
|
|
3532
|
+
duration: mr(j)
|
|
3517
3533
|
}, l.value === "playing" && (o.value < 0 || s.value) && k());
|
|
3518
|
-
},
|
|
3519
|
-
const
|
|
3520
|
-
t.value[0] = { src:
|
|
3521
|
-
},
|
|
3522
|
-
const
|
|
3523
|
-
if (!
|
|
3534
|
+
}, C = (j) => {
|
|
3535
|
+
const x = j instanceof Blob ? URL.createObjectURL(j) : j;
|
|
3536
|
+
t.value[0] = { src: x, duration: 0 }, h.value = !0, k();
|
|
3537
|
+
}, W = async (j) => {
|
|
3538
|
+
const x = n.value.synthesizePreviewStream, q = n.value.synthesizePreview;
|
|
3539
|
+
if (!x && !q) return null;
|
|
3524
3540
|
M(), V(), i.value = !0, u = null, l.value = "playing";
|
|
3525
|
-
const
|
|
3526
|
-
r =
|
|
3541
|
+
const O = new AbortController();
|
|
3542
|
+
r = O;
|
|
3527
3543
|
try {
|
|
3528
|
-
if (
|
|
3529
|
-
u = await
|
|
3530
|
-
signal:
|
|
3531
|
-
onMessage: (
|
|
3532
|
-
|
|
3544
|
+
if (x)
|
|
3545
|
+
u = await x(j, {
|
|
3546
|
+
signal: O.signal,
|
|
3547
|
+
onMessage: (Z) => {
|
|
3548
|
+
O.signal.aborted || m(Z);
|
|
3533
3549
|
}
|
|
3534
|
-
}), h.value ||
|
|
3535
|
-
else if (
|
|
3536
|
-
const
|
|
3537
|
-
if (
|
|
3538
|
-
|
|
3550
|
+
}), h.value || S();
|
|
3551
|
+
else if (q) {
|
|
3552
|
+
const Z = await q(j, O.signal);
|
|
3553
|
+
if (O.signal.aborted) return null;
|
|
3554
|
+
C(Z);
|
|
3539
3555
|
}
|
|
3540
3556
|
return u;
|
|
3541
|
-
} catch (
|
|
3542
|
-
if (
|
|
3543
|
-
throw
|
|
3557
|
+
} catch (Z) {
|
|
3558
|
+
if (Z instanceof Error && Z.name === "AbortError") return null;
|
|
3559
|
+
throw Z;
|
|
3544
3560
|
} finally {
|
|
3545
|
-
r ===
|
|
3561
|
+
r === O && (i.value = !1, r = null);
|
|
3546
3562
|
}
|
|
3547
3563
|
};
|
|
3548
3564
|
return Se(() => {
|
|
3549
3565
|
M(), V();
|
|
3550
3566
|
}), {
|
|
3551
|
-
execute:
|
|
3567
|
+
execute: W,
|
|
3552
3568
|
loading: i,
|
|
3553
3569
|
abort: M,
|
|
3554
3570
|
resume: G,
|
|
3555
3571
|
stop: M,
|
|
3556
|
-
playing:
|
|
3572
|
+
playing: A,
|
|
3557
3573
|
mediaControls: I,
|
|
3558
|
-
shouldAutoPlay:
|
|
3574
|
+
shouldAutoPlay: p,
|
|
3559
3575
|
hasAudio: f
|
|
3560
3576
|
};
|
|
3561
3577
|
}, yr = /^[\u3400-\u9fff]+$/, qr = ({
|
|
@@ -3571,21 +3587,21 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3571
3587
|
selectedText: h,
|
|
3572
3588
|
hasSelectedText: r,
|
|
3573
3589
|
isSelectedPureNumber: u
|
|
3574
|
-
} = e, { features: g, notify: a, services: c } = e,
|
|
3590
|
+
} = e, { features: g, notify: a, services: c } = e, p = T(
|
|
3575
3591
|
() => ml(i.value, g.value)
|
|
3576
|
-
), f = () => !r.value,
|
|
3577
|
-
var
|
|
3578
|
-
const
|
|
3579
|
-
(
|
|
3580
|
-
var
|
|
3581
|
-
return (
|
|
3592
|
+
), f = () => !r.value, d = () => {
|
|
3593
|
+
var W;
|
|
3594
|
+
const C = (((W = s()) == null ? void 0 : W.content) || []).some(
|
|
3595
|
+
(j) => {
|
|
3596
|
+
var x;
|
|
3597
|
+
return (x = j.content) == null ? void 0 : x.some((q) => q.type !== "text");
|
|
3582
3598
|
}
|
|
3583
3599
|
);
|
|
3584
|
-
return
|
|
3585
|
-
}, y = (
|
|
3600
|
+
return C && a("info", "请选择纯文本"), C;
|
|
3601
|
+
}, y = (m) => yr.test(m) ? Array.from(m).length > p.value.maxPinyinLength ? (a(
|
|
3586
3602
|
"info",
|
|
3587
|
-
`最多选择${
|
|
3588
|
-
), !0) : !1 : (a("info", "请选择中文"), !0),
|
|
3603
|
+
`最多选择${p.value.maxPinyinLength}个中文`
|
|
3604
|
+
), !0) : !1 : (a("info", "请选择中文"), !0), b = [
|
|
3589
3605
|
{
|
|
3590
3606
|
tool: P.customStop
|
|
3591
3607
|
},
|
|
@@ -3597,23 +3613,23 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3597
3613
|
tool: P.continue,
|
|
3598
3614
|
disabled: f,
|
|
3599
3615
|
onClick: () => {
|
|
3600
|
-
|
|
3616
|
+
d() || o({ categ: "continue", payload: {} });
|
|
3601
3617
|
}
|
|
3602
3618
|
},
|
|
3603
3619
|
{
|
|
3604
3620
|
tool: P.pinyin,
|
|
3605
3621
|
disabled: f,
|
|
3606
3622
|
onClick: () => {
|
|
3607
|
-
const
|
|
3608
|
-
!
|
|
3623
|
+
const m = l();
|
|
3624
|
+
!m || d() || y(m) || n.pinyin(m);
|
|
3609
3625
|
}
|
|
3610
3626
|
},
|
|
3611
3627
|
{
|
|
3612
3628
|
tool: P.replace,
|
|
3613
3629
|
disabled: f,
|
|
3614
3630
|
onClick: () => {
|
|
3615
|
-
const
|
|
3616
|
-
!
|
|
3631
|
+
const m = l();
|
|
3632
|
+
!m || d() || n.replace(m);
|
|
3617
3633
|
}
|
|
3618
3634
|
},
|
|
3619
3635
|
{
|
|
@@ -3624,19 +3640,19 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3624
3640
|
tool: P.ignore,
|
|
3625
3641
|
disabled: f,
|
|
3626
3642
|
onClick: () => {
|
|
3627
|
-
|
|
3643
|
+
d() || o({ categ: "ignore", payload: {} });
|
|
3628
3644
|
}
|
|
3629
3645
|
},
|
|
3630
3646
|
{
|
|
3631
3647
|
tool: P.number,
|
|
3632
|
-
disabled: () => !u.value || h.value.length >
|
|
3648
|
+
disabled: () => !u.value || h.value.length > p.value.maxNumberLength
|
|
3633
3649
|
},
|
|
3634
3650
|
{
|
|
3635
3651
|
tool: P.formula,
|
|
3636
3652
|
disabled: f,
|
|
3637
3653
|
onClick: () => {
|
|
3638
|
-
const
|
|
3639
|
-
!
|
|
3654
|
+
const m = l();
|
|
3655
|
+
!m || d() || n.formula(m);
|
|
3640
3656
|
}
|
|
3641
3657
|
},
|
|
3642
3658
|
{
|
|
@@ -3647,30 +3663,30 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3647
3663
|
tool: P.upload,
|
|
3648
3664
|
onClick: n.upload
|
|
3649
3665
|
}
|
|
3650
|
-
],
|
|
3651
|
-
const
|
|
3652
|
-
return
|
|
3653
|
-
}), I = T(() =>
|
|
3654
|
-
label:
|
|
3655
|
-
value:
|
|
3656
|
-
})) : []), J = (
|
|
3666
|
+
], A = T(() => {
|
|
3667
|
+
const m = new Set(p.value.tools);
|
|
3668
|
+
return b.filter((C) => m.has(C.tool.type));
|
|
3669
|
+
}), I = T(() => p.value.languages), w = T(() => u.value ? pl.map((m) => ({
|
|
3670
|
+
label: m.label,
|
|
3671
|
+
value: m.func(h.value)
|
|
3672
|
+
})) : []), J = (m) => m === P.formula.type ? !c.value.readFormula : m === P.aiRewrite.type ? !c.value.generateDraft : m === P.upload.type ? !c.value.parseDocument : !1;
|
|
3657
3673
|
return {
|
|
3658
|
-
toolList:
|
|
3674
|
+
toolList: A,
|
|
3659
3675
|
languageOptions: I,
|
|
3660
3676
|
numberToTextList: w,
|
|
3661
|
-
isToolDisabled: (
|
|
3662
|
-
var
|
|
3663
|
-
return (((
|
|
3677
|
+
isToolDisabled: (m) => {
|
|
3678
|
+
var C;
|
|
3679
|
+
return (((C = m.disabled) == null ? void 0 : C.call(m)) ?? !1) || J(m.tool.type);
|
|
3664
3680
|
},
|
|
3665
|
-
insertCustomStop: (
|
|
3666
|
-
t({ categ: "customStop", payload: { time:
|
|
3681
|
+
insertCustomStop: (m) => {
|
|
3682
|
+
t({ categ: "customStop", payload: { time: m } });
|
|
3667
3683
|
},
|
|
3668
|
-
setLanguage: (
|
|
3669
|
-
replaceText: (
|
|
3670
|
-
o({ categ: "replace", payload: { text:
|
|
3684
|
+
setLanguage: (m) => d() ? !1 : (o({ categ: "language", payload: { code: m } }), !0),
|
|
3685
|
+
replaceText: (m) => {
|
|
3686
|
+
o({ categ: "replace", payload: { text: m } });
|
|
3671
3687
|
},
|
|
3672
|
-
markPinyin: (
|
|
3673
|
-
o({ categ: "pinyin", payload: { text:
|
|
3688
|
+
markPinyin: (m) => {
|
|
3689
|
+
o({ categ: "pinyin", payload: { text: m } });
|
|
3674
3690
|
}
|
|
3675
3691
|
};
|
|
3676
3692
|
}, zr = {
|
|
@@ -3731,10 +3747,10 @@ const Co = Symbol("useRichTextEditor"), ur = (e) => {
|
|
|
3731
3747
|
__name: "index",
|
|
3732
3748
|
setup(e) {
|
|
3733
3749
|
const { editor: n } = Tn();
|
|
3734
|
-
return (i, t) =>
|
|
3750
|
+
return (i, t) => z(n) ? (Y(), _(z(Nl), {
|
|
3735
3751
|
key: 0,
|
|
3736
3752
|
class: "tts-editor-content",
|
|
3737
|
-
editor:
|
|
3753
|
+
editor: z(n)
|
|
3738
3754
|
}, null, 8, ["editor"])) : yn("", !0);
|
|
3739
3755
|
}
|
|
3740
3756
|
}), vr = /* @__PURE__ */ sn(jr, [["__scopeId", "data-v-d764ae22"]]), wo = ["top", "right", "bottom", "left"], mt = ["start", "end"], pt = /* @__PURE__ */ wo.reduce((e, n) => e.concat(n, n + "-" + mt[0], n + "-" + mt[1]), []), Yn = Math.min, Cn = Math.max, Ue = Math.round, Mn = (e) => ({
|
|
@@ -3847,40 +3863,40 @@ function qt(e, n, i) {
|
|
|
3847
3863
|
floating: o
|
|
3848
3864
|
} = e;
|
|
3849
3865
|
const l = Sn(n), s = Ri(n), h = Ni(s), r = Wn(n), u = l === "y", g = t.x + t.width / 2 - o.width / 2, a = t.y + t.height / 2 - o.height / 2, c = t[h] / 2 - o[h] / 2;
|
|
3850
|
-
let
|
|
3866
|
+
let p;
|
|
3851
3867
|
switch (r) {
|
|
3852
3868
|
case "top":
|
|
3853
|
-
|
|
3869
|
+
p = {
|
|
3854
3870
|
x: g,
|
|
3855
3871
|
y: t.y - o.height
|
|
3856
3872
|
};
|
|
3857
3873
|
break;
|
|
3858
3874
|
case "bottom":
|
|
3859
|
-
|
|
3875
|
+
p = {
|
|
3860
3876
|
x: g,
|
|
3861
3877
|
y: t.y + t.height
|
|
3862
3878
|
};
|
|
3863
3879
|
break;
|
|
3864
3880
|
case "right":
|
|
3865
|
-
|
|
3881
|
+
p = {
|
|
3866
3882
|
x: t.x + t.width,
|
|
3867
3883
|
y: a
|
|
3868
3884
|
};
|
|
3869
3885
|
break;
|
|
3870
3886
|
case "left":
|
|
3871
|
-
|
|
3887
|
+
p = {
|
|
3872
3888
|
x: t.x - o.width,
|
|
3873
3889
|
y: a
|
|
3874
3890
|
};
|
|
3875
3891
|
break;
|
|
3876
3892
|
default:
|
|
3877
|
-
|
|
3893
|
+
p = {
|
|
3878
3894
|
x: t.x,
|
|
3879
3895
|
y: t.y
|
|
3880
3896
|
};
|
|
3881
3897
|
}
|
|
3882
3898
|
const f = In(n);
|
|
3883
|
-
return f && (
|
|
3899
|
+
return f && (p[s] += c * (f === "end" ? 1 : -1) * (i && u ? -1 : 1)), p;
|
|
3884
3900
|
}
|
|
3885
3901
|
async function Sr(e, n) {
|
|
3886
3902
|
var i;
|
|
@@ -3897,13 +3913,13 @@ async function Sr(e, n) {
|
|
|
3897
3913
|
rootBoundary: g = "viewport",
|
|
3898
3914
|
elementContext: a = "floating",
|
|
3899
3915
|
altBoundary: c = !1,
|
|
3900
|
-
padding:
|
|
3901
|
-
} = Nn(n, e), f = Fi(
|
|
3916
|
+
padding: p = 0
|
|
3917
|
+
} = Nn(n, e), f = Fi(p), y = h[c ? a === "floating" ? "reference" : "floating" : a], b = Fn(await l.getClippingRect({
|
|
3902
3918
|
element: (i = await (l.isElement == null ? void 0 : l.isElement(y))) == null || i ? y : y.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(h.floating)),
|
|
3903
3919
|
boundary: u,
|
|
3904
3920
|
rootBoundary: g,
|
|
3905
3921
|
strategy: r
|
|
3906
|
-
})),
|
|
3922
|
+
})), A = a === "floating" ? {
|
|
3907
3923
|
x: t,
|
|
3908
3924
|
y: o,
|
|
3909
3925
|
width: s.floating.width,
|
|
@@ -3913,15 +3929,15 @@ async function Sr(e, n) {
|
|
|
3913
3929
|
y: 1
|
|
3914
3930
|
}, J = Fn(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3915
3931
|
elements: h,
|
|
3916
|
-
rect:
|
|
3932
|
+
rect: A,
|
|
3917
3933
|
offsetParent: I,
|
|
3918
3934
|
strategy: r
|
|
3919
|
-
}) :
|
|
3935
|
+
}) : A);
|
|
3920
3936
|
return {
|
|
3921
|
-
top: (
|
|
3922
|
-
bottom: (J.bottom -
|
|
3923
|
-
left: (
|
|
3924
|
-
right: (J.right -
|
|
3937
|
+
top: (b.top - J.top + f.top) / w.y,
|
|
3938
|
+
bottom: (J.bottom - b.bottom + f.bottom) / w.y,
|
|
3939
|
+
left: (b.left - J.left + f.left) / w.x,
|
|
3940
|
+
right: (J.right - b.right + f.right) / w.x
|
|
3925
3941
|
};
|
|
3926
3942
|
}
|
|
3927
3943
|
const Or = 50, Yr = async (e, n, i) => {
|
|
@@ -3941,21 +3957,21 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
3941
3957
|
}), {
|
|
3942
3958
|
x: g,
|
|
3943
3959
|
y: a
|
|
3944
|
-
} = qt(u, t, r), c = t,
|
|
3960
|
+
} = qt(u, t, r), c = t, p = 0;
|
|
3945
3961
|
const f = {};
|
|
3946
|
-
for (let
|
|
3947
|
-
const y = l[
|
|
3962
|
+
for (let d = 0; d < l.length; d++) {
|
|
3963
|
+
const y = l[d];
|
|
3948
3964
|
if (!y)
|
|
3949
3965
|
continue;
|
|
3950
3966
|
const {
|
|
3951
|
-
name:
|
|
3952
|
-
fn:
|
|
3967
|
+
name: b,
|
|
3968
|
+
fn: A
|
|
3953
3969
|
} = y, {
|
|
3954
3970
|
x: I,
|
|
3955
3971
|
y: w,
|
|
3956
3972
|
data: J,
|
|
3957
3973
|
reset: k
|
|
3958
|
-
} = await
|
|
3974
|
+
} = await A({
|
|
3959
3975
|
x: g,
|
|
3960
3976
|
y: a,
|
|
3961
3977
|
initialPlacement: t,
|
|
@@ -3969,17 +3985,17 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
3969
3985
|
floating: n
|
|
3970
3986
|
}
|
|
3971
3987
|
});
|
|
3972
|
-
g = I ?? g, a = w ?? a, f[
|
|
3973
|
-
...f[
|
|
3988
|
+
g = I ?? g, a = w ?? a, f[b] = {
|
|
3989
|
+
...f[b],
|
|
3974
3990
|
...J
|
|
3975
|
-
}, k &&
|
|
3991
|
+
}, k && p < Or && (p++, typeof k == "object" && (k.placement && (c = k.placement), k.rects && (u = k.rects === !0 ? await s.getElementRects({
|
|
3976
3992
|
reference: e,
|
|
3977
3993
|
floating: n,
|
|
3978
3994
|
strategy: o
|
|
3979
3995
|
}) : k.rects), {
|
|
3980
3996
|
x: g,
|
|
3981
3997
|
y: a
|
|
3982
|
-
} = qt(u, c, r)),
|
|
3998
|
+
} = qt(u, c, r)), d = -1);
|
|
3983
3999
|
}
|
|
3984
4000
|
return {
|
|
3985
4001
|
x: g,
|
|
@@ -4009,20 +4025,20 @@ const Or = 50, Yr = async (e, n, i) => {
|
|
|
4009
4025
|
const a = Fi(g), c = {
|
|
4010
4026
|
x: i,
|
|
4011
4027
|
y: t
|
|
4012
|
-
},
|
|
4028
|
+
}, p = Ri(o), f = Ni(p), d = await s.getDimensions(u), y = p === "y", b = y ? "top" : "left", A = y ? "bottom" : "right", I = y ? "clientHeight" : "clientWidth", w = l.reference[f] + l.reference[p] - c[p] - l.floating[f], J = c[p] - l.reference[p], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
4013
4029
|
let G = k ? k[I] : 0;
|
|
4014
4030
|
(!G || !await (s.isElement == null ? void 0 : s.isElement(k))) && (G = h.floating[I] || l.floating[f]);
|
|
4015
|
-
const M = w / 2 - J / 2, V = G / 2 -
|
|
4031
|
+
const M = w / 2 - J / 2, V = G / 2 - d[f] / 2 - 1, S = Yn(a[b], V), m = Yn(a[A], V), C = G - d[f] - m, W = G / 2 - d[f] / 2 + M, j = So(S, W, C), x = !r.arrow && In(o) != null && W !== j && l.reference[f] / 2 - (W < S ? S : m) - d[f] / 2 < 0, q = x ? W < S ? W - S : W - C : 0;
|
|
4016
4032
|
return {
|
|
4017
|
-
[
|
|
4033
|
+
[p]: c[p] + q,
|
|
4018
4034
|
data: {
|
|
4019
|
-
[
|
|
4020
|
-
centerOffset:
|
|
4021
|
-
...
|
|
4022
|
-
alignmentOffset:
|
|
4035
|
+
[p]: j,
|
|
4036
|
+
centerOffset: W - j - q,
|
|
4037
|
+
...x && {
|
|
4038
|
+
alignmentOffset: q
|
|
4023
4039
|
}
|
|
4024
4040
|
},
|
|
4025
|
-
reset:
|
|
4041
|
+
reset: x
|
|
4026
4042
|
};
|
|
4027
4043
|
}
|
|
4028
4044
|
});
|
|
@@ -4045,21 +4061,21 @@ const Vr = function(e) {
|
|
|
4045
4061
|
crossAxis: g = !1,
|
|
4046
4062
|
alignment: a,
|
|
4047
4063
|
allowedPlacements: c = pt,
|
|
4048
|
-
autoAlignment:
|
|
4064
|
+
autoAlignment: p = !0,
|
|
4049
4065
|
...f
|
|
4050
|
-
} = Nn(e, n),
|
|
4051
|
-
if (
|
|
4066
|
+
} = Nn(e, n), d = a !== void 0 || c === pt ? Kr(a || null, p, c) : c, y = ((i = s.autoPlacement) == null ? void 0 : i.index) || 0, b = d[y];
|
|
4067
|
+
if (b == null)
|
|
4052
4068
|
return {};
|
|
4053
|
-
if (h !==
|
|
4069
|
+
if (h !== b)
|
|
4054
4070
|
return {
|
|
4055
4071
|
reset: {
|
|
4056
|
-
placement:
|
|
4072
|
+
placement: d[0]
|
|
4057
4073
|
}
|
|
4058
4074
|
};
|
|
4059
|
-
const
|
|
4060
|
-
placement:
|
|
4075
|
+
const A = await r.detectOverflow(n, f), I = Yo(b, l, await (r.isRTL == null ? void 0 : r.isRTL(u.floating))), w = [A[Wn(b)], A[I[0]], A[I[1]]], J = [...((t = s.autoPlacement) == null ? void 0 : t.overflows) || [], {
|
|
4076
|
+
placement: b,
|
|
4061
4077
|
overflows: w
|
|
4062
|
-
}], k =
|
|
4078
|
+
}], k = d[y + 1];
|
|
4063
4079
|
if (k)
|
|
4064
4080
|
return {
|
|
4065
4081
|
data: {
|
|
@@ -4070,21 +4086,21 @@ const Vr = function(e) {
|
|
|
4070
4086
|
placement: k
|
|
4071
4087
|
}
|
|
4072
4088
|
};
|
|
4073
|
-
const G = J.map((
|
|
4074
|
-
const
|
|
4075
|
-
return [
|
|
4089
|
+
const G = J.map((S) => {
|
|
4090
|
+
const m = In(S.placement);
|
|
4091
|
+
return [S.placement, m && g ? (
|
|
4076
4092
|
// Check along the mainAxis and main crossAxis side.
|
|
4077
|
-
|
|
4093
|
+
S.overflows.slice(0, 2).reduce((C, W) => C + W, 0)
|
|
4078
4094
|
) : (
|
|
4079
4095
|
// Check only the mainAxis.
|
|
4080
|
-
|
|
4081
|
-
),
|
|
4082
|
-
}).sort((
|
|
4096
|
+
S.overflows[0]
|
|
4097
|
+
), S.overflows];
|
|
4098
|
+
}).sort((S, m) => S[1] - m[1]), V = ((o = G.filter((S) => S[2].slice(
|
|
4083
4099
|
0,
|
|
4084
4100
|
// Aligned placements should not check their opposite crossAxis
|
|
4085
4101
|
// side.
|
|
4086
|
-
In(
|
|
4087
|
-
).every((
|
|
4102
|
+
In(S[0]) ? 2 : 3
|
|
4103
|
+
).every((m) => m <= 0))[0]) == null ? void 0 : o[0]) || G[0][0];
|
|
4088
4104
|
return V !== h ? {
|
|
4089
4105
|
data: {
|
|
4090
4106
|
index: y + 1,
|
|
@@ -4113,64 +4129,64 @@ const Vr = function(e) {
|
|
|
4113
4129
|
mainAxis: g = !0,
|
|
4114
4130
|
crossAxis: a = !0,
|
|
4115
4131
|
fallbackPlacements: c,
|
|
4116
|
-
fallbackStrategy:
|
|
4132
|
+
fallbackStrategy: p = "bestFit",
|
|
4117
4133
|
fallbackAxisSideDirection: f = "none",
|
|
4118
|
-
flipAlignment:
|
|
4134
|
+
flipAlignment: d = !0,
|
|
4119
4135
|
...y
|
|
4120
4136
|
} = Nn(e, n);
|
|
4121
4137
|
if ((i = l.arrow) != null && i.alignmentOffset)
|
|
4122
4138
|
return {};
|
|
4123
|
-
const
|
|
4124
|
-
!c && k && J.push(...Wr(h,
|
|
4139
|
+
const b = Wn(o), A = Sn(h), I = Wn(h) === h, w = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), J = c || (I || !d ? [De(h)] : Zr(h)), k = f !== "none";
|
|
4140
|
+
!c && k && J.push(...Wr(h, d, f, w));
|
|
4125
4141
|
const G = [h, ...J], M = await r.detectOverflow(n, y), V = [];
|
|
4126
|
-
let
|
|
4127
|
-
if (g && V.push(M[
|
|
4128
|
-
const
|
|
4129
|
-
V.push(M[
|
|
4142
|
+
let S = ((t = l.flip) == null ? void 0 : t.overflows) || [];
|
|
4143
|
+
if (g && V.push(M[b]), a) {
|
|
4144
|
+
const j = Yo(o, s, w);
|
|
4145
|
+
V.push(M[j[0]], M[j[1]]);
|
|
4130
4146
|
}
|
|
4131
|
-
if (
|
|
4147
|
+
if (S = [...S, {
|
|
4132
4148
|
placement: o,
|
|
4133
4149
|
overflows: V
|
|
4134
|
-
}], !V.every((
|
|
4135
|
-
var
|
|
4136
|
-
const
|
|
4137
|
-
if (
|
|
4150
|
+
}], !V.every((j) => j <= 0)) {
|
|
4151
|
+
var m, C;
|
|
4152
|
+
const j = (((m = l.flip) == null ? void 0 : m.index) || 0) + 1, x = G[j];
|
|
4153
|
+
if (x && (!(a === "alignment" ? A !== Sn(x) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4138
4154
|
// overflows the main axis.
|
|
4139
|
-
|
|
4155
|
+
S.every((Z) => Sn(Z.placement) === A ? Z.overflows[0] > 0 : !0)))
|
|
4140
4156
|
return {
|
|
4141
4157
|
data: {
|
|
4142
|
-
index:
|
|
4143
|
-
overflows:
|
|
4158
|
+
index: j,
|
|
4159
|
+
overflows: S
|
|
4144
4160
|
},
|
|
4145
4161
|
reset: {
|
|
4146
|
-
placement:
|
|
4162
|
+
placement: x
|
|
4147
4163
|
}
|
|
4148
4164
|
};
|
|
4149
|
-
let
|
|
4150
|
-
if (!
|
|
4151
|
-
switch (
|
|
4165
|
+
let q = (C = S.filter((O) => O.overflows[0] <= 0).sort((O, Z) => O.overflows[1] - Z.overflows[1])[0]) == null ? void 0 : C.placement;
|
|
4166
|
+
if (!q)
|
|
4167
|
+
switch (p) {
|
|
4152
4168
|
case "bestFit": {
|
|
4153
|
-
var
|
|
4154
|
-
const
|
|
4169
|
+
var W;
|
|
4170
|
+
const O = (W = S.filter((Z) => {
|
|
4155
4171
|
if (k) {
|
|
4156
|
-
const X = Sn(
|
|
4157
|
-
return X ===
|
|
4172
|
+
const X = Sn(Z.placement);
|
|
4173
|
+
return X === A || // Create a bias to the `y` side axis due to horizontal
|
|
4158
4174
|
// reading directions favoring greater width.
|
|
4159
4175
|
X === "y";
|
|
4160
4176
|
}
|
|
4161
4177
|
return !0;
|
|
4162
|
-
}).map((
|
|
4163
|
-
|
|
4178
|
+
}).map((Z) => [Z.placement, Z.overflows.filter((X) => X > 0).reduce((X, R) => X + R, 0)]).sort((Z, X) => Z[1] - X[1])[0]) == null ? void 0 : W[0];
|
|
4179
|
+
O && (q = O);
|
|
4164
4180
|
break;
|
|
4165
4181
|
}
|
|
4166
4182
|
case "initialPlacement":
|
|
4167
|
-
|
|
4183
|
+
q = h;
|
|
4168
4184
|
break;
|
|
4169
4185
|
}
|
|
4170
|
-
if (o !==
|
|
4186
|
+
if (o !== q)
|
|
4171
4187
|
return {
|
|
4172
4188
|
reset: {
|
|
4173
|
-
placement:
|
|
4189
|
+
placement: q
|
|
4174
4190
|
}
|
|
4175
4191
|
};
|
|
4176
4192
|
}
|
|
@@ -4268,40 +4284,40 @@ const Hr = function(e) {
|
|
|
4268
4284
|
} = Nn(e, n), g = Array.from(await (l.getClientRects == null ? void 0 : l.getClientRects(t.reference)) || []);
|
|
4269
4285
|
if (!g.length)
|
|
4270
4286
|
return {};
|
|
4271
|
-
const a = Jr(g), c = Fn(ko(g)),
|
|
4287
|
+
const a = Jr(g), c = Fn(ko(g)), p = Fi(h);
|
|
4272
4288
|
function f() {
|
|
4273
4289
|
if (a.length === 2 && (a[0].left > a[1].right || a[1].left > a[0].right) && r != null && u != null)
|
|
4274
|
-
return a.find((y) => r > y.left -
|
|
4290
|
+
return a.find((y) => r > y.left - p.left && r < y.right + p.right && u > y.top - p.top && u < y.bottom + p.bottom) || c;
|
|
4275
4291
|
if (a.length >= 2) {
|
|
4276
4292
|
if (Sn(i) === "y") {
|
|
4277
|
-
const k = a[0], G = a[a.length - 1], M = Wn(i) === "top", V = k.top,
|
|
4293
|
+
const k = a[0], G = a[a.length - 1], M = Wn(i) === "top", V = k.top, S = G.bottom, m = M ? k.left : G.left, C = M ? k.right : G.right;
|
|
4278
4294
|
return Fn({
|
|
4279
|
-
x:
|
|
4295
|
+
x: m,
|
|
4280
4296
|
y: V,
|
|
4281
|
-
width:
|
|
4282
|
-
height:
|
|
4297
|
+
width: C - m,
|
|
4298
|
+
height: S - V
|
|
4283
4299
|
});
|
|
4284
4300
|
}
|
|
4285
|
-
const y = Wn(i) === "left",
|
|
4301
|
+
const y = Wn(i) === "left", b = Cn(...a.map((k) => k.right)), A = Yn(...a.map((k) => k.left)), I = a.filter((k) => y ? k.left === A : k.right === b), w = I[0].top, J = I[I.length - 1].bottom;
|
|
4286
4302
|
return Fn({
|
|
4287
|
-
x:
|
|
4303
|
+
x: A,
|
|
4288
4304
|
y: w,
|
|
4289
|
-
width:
|
|
4305
|
+
width: b - A,
|
|
4290
4306
|
height: J - w
|
|
4291
4307
|
});
|
|
4292
4308
|
}
|
|
4293
4309
|
return c;
|
|
4294
4310
|
}
|
|
4295
|
-
const
|
|
4311
|
+
const d = await l.getElementRects({
|
|
4296
4312
|
reference: {
|
|
4297
4313
|
getBoundingClientRect: f
|
|
4298
4314
|
},
|
|
4299
4315
|
floating: t.floating,
|
|
4300
4316
|
strategy: s
|
|
4301
4317
|
});
|
|
4302
|
-
return o.reference.x !==
|
|
4318
|
+
return o.reference.x !== d.reference.x || o.reference.y !== d.reference.y || o.reference.width !== d.reference.width || o.reference.height !== d.reference.height ? {
|
|
4303
4319
|
reset: {
|
|
4304
|
-
rects:
|
|
4320
|
+
rects: d
|
|
4305
4321
|
}
|
|
4306
4322
|
} : {};
|
|
4307
4323
|
}
|
|
@@ -4315,7 +4331,7 @@ async function Mr(e, n) {
|
|
|
4315
4331
|
} = e, l = await (t.isRTL == null ? void 0 : t.isRTL(o.floating)), s = Wn(i), h = In(i), r = Sn(i) === "y", u = Lr.has(s) ? -1 : 1, g = l && r ? -1 : 1, a = Nn(n, e);
|
|
4316
4332
|
let {
|
|
4317
4333
|
mainAxis: c,
|
|
4318
|
-
crossAxis:
|
|
4334
|
+
crossAxis: p,
|
|
4319
4335
|
alignmentAxis: f
|
|
4320
4336
|
} = typeof a == "number" ? {
|
|
4321
4337
|
mainAxis: a,
|
|
@@ -4326,12 +4342,12 @@ async function Mr(e, n) {
|
|
|
4326
4342
|
crossAxis: a.crossAxis || 0,
|
|
4327
4343
|
alignmentAxis: a.alignmentAxis
|
|
4328
4344
|
};
|
|
4329
|
-
return h && typeof f == "number" && (
|
|
4330
|
-
x:
|
|
4345
|
+
return h && typeof f == "number" && (p = h === "end" ? f * -1 : f), r ? {
|
|
4346
|
+
x: p * g,
|
|
4331
4347
|
y: c * u
|
|
4332
4348
|
} : {
|
|
4333
4349
|
x: c * u,
|
|
4334
|
-
y:
|
|
4350
|
+
y: p * g
|
|
4335
4351
|
};
|
|
4336
4352
|
}
|
|
4337
4353
|
const Tr = function(e) {
|
|
@@ -4370,11 +4386,11 @@ const Tr = function(e) {
|
|
|
4370
4386
|
mainAxis: s = !0,
|
|
4371
4387
|
crossAxis: h = !1,
|
|
4372
4388
|
limiter: r = {
|
|
4373
|
-
fn: (
|
|
4389
|
+
fn: (A) => {
|
|
4374
4390
|
let {
|
|
4375
4391
|
x: I,
|
|
4376
4392
|
y: w
|
|
4377
|
-
} =
|
|
4393
|
+
} = A;
|
|
4378
4394
|
return {
|
|
4379
4395
|
x: I,
|
|
4380
4396
|
y: w
|
|
@@ -4385,22 +4401,22 @@ const Tr = function(e) {
|
|
|
4385
4401
|
} = Nn(e, n), g = {
|
|
4386
4402
|
x: i,
|
|
4387
4403
|
y: t
|
|
4388
|
-
}, a = await l.detectOverflow(n, u), c = Sn(o),
|
|
4389
|
-
let f = g[
|
|
4390
|
-
const y = (
|
|
4391
|
-
s && (f = y(
|
|
4392
|
-
const
|
|
4404
|
+
}, a = await l.detectOverflow(n, u), c = Sn(o), p = Oo(c);
|
|
4405
|
+
let f = g[p], d = g[c];
|
|
4406
|
+
const y = (A, I) => So(I + a[A === "y" ? "top" : "left"], I, I - a[A === "y" ? "bottom" : "right"]);
|
|
4407
|
+
s && (f = y(p, f)), h && (d = y(c, d));
|
|
4408
|
+
const b = r.fn({
|
|
4393
4409
|
...n,
|
|
4394
|
-
[
|
|
4395
|
-
[c]:
|
|
4410
|
+
[p]: f,
|
|
4411
|
+
[c]: d
|
|
4396
4412
|
});
|
|
4397
4413
|
return {
|
|
4398
|
-
...
|
|
4414
|
+
...b,
|
|
4399
4415
|
data: {
|
|
4400
|
-
x:
|
|
4401
|
-
y:
|
|
4416
|
+
x: b.x - i,
|
|
4417
|
+
y: b.y - t,
|
|
4402
4418
|
enabled: {
|
|
4403
|
-
[
|
|
4419
|
+
[p]: s,
|
|
4404
4420
|
[c]: h
|
|
4405
4421
|
}
|
|
4406
4422
|
}
|
|
@@ -4423,19 +4439,19 @@ const Tr = function(e) {
|
|
|
4423
4439
|
...h
|
|
4424
4440
|
} = Nn(e, n), r = await o.detectOverflow(n, h), u = Wn(i), g = In(i), a = Sn(i) === "y", {
|
|
4425
4441
|
width: c,
|
|
4426
|
-
height:
|
|
4442
|
+
height: p
|
|
4427
4443
|
} = t.floating;
|
|
4428
|
-
let f,
|
|
4429
|
-
u === "top" || u === "bottom" ? (f = u,
|
|
4430
|
-
const y =
|
|
4431
|
-
let k =
|
|
4432
|
-
w != null && w.enabled.x && (G =
|
|
4444
|
+
let f, d;
|
|
4445
|
+
u === "top" || u === "bottom" ? (f = u, d = g === (await (o.isRTL == null ? void 0 : o.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (d = u, f = g === "end" ? "top" : "bottom");
|
|
4446
|
+
const y = p - r.top - r.bottom, b = c - r.left - r.right, A = Yn(p - r[f], y), I = Yn(c - r[d], b), w = n.middlewareData.shift, J = !w;
|
|
4447
|
+
let k = A, G = I;
|
|
4448
|
+
w != null && w.enabled.x && (G = b), w != null && w.enabled.y && (k = y), J && !g && (a ? G = c - 2 * Cn(r.left, r.right) : k = p - 2 * Cn(r.top, r.bottom)), await s({
|
|
4433
4449
|
...n,
|
|
4434
4450
|
availableWidth: G,
|
|
4435
4451
|
availableHeight: k
|
|
4436
4452
|
});
|
|
4437
4453
|
const M = await o.getDimensions(l.floating);
|
|
4438
|
-
return c !== M.width ||
|
|
4454
|
+
return c !== M.width || p !== M.height ? {
|
|
4439
4455
|
reset: {
|
|
4440
4456
|
rects: !0
|
|
4441
4457
|
}
|
|
@@ -4600,11 +4616,11 @@ function Ie(e, n, i, t) {
|
|
|
4600
4616
|
const h = Br(l, i, t) ? Ho(l) : Mn(0);
|
|
4601
4617
|
let r = (o.left + h.x) / s.x, u = (o.top + h.y) / s.y, g = o.width / s.x, a = o.height / s.y;
|
|
4602
4618
|
if (l && t) {
|
|
4603
|
-
const c = fn(l),
|
|
4604
|
-
let f = c,
|
|
4605
|
-
for (;
|
|
4606
|
-
const y = ue(
|
|
4607
|
-
r *= y.x, u *= y.y, g *= y.x, a *= y.y, r += I, u += w, f = fn(
|
|
4619
|
+
const c = fn(l), p = kn(t) ? fn(t) : t;
|
|
4620
|
+
let f = c, d = Ii(f);
|
|
4621
|
+
for (; d && p !== f; ) {
|
|
4622
|
+
const y = ue(d), b = d.getBoundingClientRect(), A = Kn(d), I = b.left + (d.clientLeft + parseFloat(A.paddingLeft)) * y.x, w = b.top + (d.clientTop + parseFloat(A.paddingTop)) * y.y;
|
|
4623
|
+
r *= y.x, u *= y.y, g *= y.x, a *= y.y, r += I, u += w, f = fn(d), d = Ii(f);
|
|
4608
4624
|
}
|
|
4609
4625
|
}
|
|
4610
4626
|
return Fn({
|
|
@@ -4641,8 +4657,8 @@ function Qr(e) {
|
|
|
4641
4657
|
}, u = Mn(1);
|
|
4642
4658
|
const g = Mn(0), a = Dn(t);
|
|
4643
4659
|
if ((a || !l) && ((me(t) !== "body" || ei(s)) && (r = ti(t)), a)) {
|
|
4644
|
-
const
|
|
4645
|
-
u = ue(t), g.x =
|
|
4660
|
+
const p = Ie(t);
|
|
4661
|
+
u = ue(t), g.x = p.x + t.clientLeft, g.y = p.y + t.clientTop;
|
|
4646
4662
|
}
|
|
4647
4663
|
const c = s && !a && !l ? Lo(s, r) : Mn(0);
|
|
4648
4664
|
return {
|
|
@@ -4676,8 +4692,8 @@ function eu(e, n, i) {
|
|
|
4676
4692
|
t ? c || (u = -s.offsetLeft, g = -s.offsetTop) : (h = s.width, r = s.height, c && (u = s.offsetLeft, g = s.offsetTop));
|
|
4677
4693
|
}
|
|
4678
4694
|
if (oi(l) <= 0) {
|
|
4679
|
-
const c = l.ownerDocument,
|
|
4680
|
-
|
|
4695
|
+
const c = l.ownerDocument, p = c.body, f = getComputedStyle(p), d = c.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, y = Math.abs(l.clientWidth - p.clientWidth - d), b = getComputedStyle(l).scrollbarGutter === "stable both-edges" ? y / 2 : y;
|
|
4696
|
+
b <= nu && (h -= b);
|
|
4681
4697
|
}
|
|
4682
4698
|
return {
|
|
4683
4699
|
width: h,
|
|
@@ -4737,8 +4753,8 @@ function ou(e) {
|
|
|
4737
4753
|
const s = [...i === "clippingAncestors" ? ii(n) ? [] : tu(n, this._c) : [].concat(i), t], h = vt(n, s[0], o);
|
|
4738
4754
|
let r = h.top, u = h.right, g = h.bottom, a = h.left;
|
|
4739
4755
|
for (let c = 1; c < s.length; c++) {
|
|
4740
|
-
const
|
|
4741
|
-
r = Cn(
|
|
4756
|
+
const p = vt(n, s[c], o);
|
|
4757
|
+
r = Cn(p.top, r), u = Yn(p.right, u), g = Yn(p.bottom, g), a = Cn(p.left, a);
|
|
4742
4758
|
}
|
|
4743
4759
|
return {
|
|
4744
4760
|
width: u - a,
|
|
@@ -5069,13 +5085,13 @@ function qu(e) {
|
|
|
5069
5085
|
for (let f = 0; ; f++) {
|
|
5070
5086
|
for (; o < t.length && t[o] != 0; ) o++;
|
|
5071
5087
|
if (f == a.childCount) break;
|
|
5072
|
-
const
|
|
5073
|
-
for (let I = 0; I <
|
|
5088
|
+
const d = a.child(f), { colspan: y, rowspan: b, colwidth: A } = d.attrs;
|
|
5089
|
+
for (let I = 0; I < b; I++) {
|
|
5074
5090
|
if (I + u >= i) {
|
|
5075
5091
|
(l || (l = [])).push({
|
|
5076
5092
|
type: "overlong_rowspan",
|
|
5077
5093
|
pos: g,
|
|
5078
|
-
n:
|
|
5094
|
+
n: b - I
|
|
5079
5095
|
});
|
|
5080
5096
|
break;
|
|
5081
5097
|
}
|
|
@@ -5087,22 +5103,22 @@ function qu(e) {
|
|
|
5087
5103
|
pos: g,
|
|
5088
5104
|
n: y - J
|
|
5089
5105
|
});
|
|
5090
|
-
const k =
|
|
5106
|
+
const k = A && A[J];
|
|
5091
5107
|
if (k) {
|
|
5092
5108
|
const G = (w + J) % n * 2, M = s[G];
|
|
5093
5109
|
M == null || M != k && s[G + 1] == 1 ? (s[G] = k, s[G + 1] = 1) : M == k && s[G + 1]++;
|
|
5094
5110
|
}
|
|
5095
5111
|
}
|
|
5096
5112
|
}
|
|
5097
|
-
o += y, g +=
|
|
5113
|
+
o += y, g += d.nodeSize;
|
|
5098
5114
|
}
|
|
5099
5115
|
const c = (u + 1) * n;
|
|
5100
|
-
let
|
|
5101
|
-
for (; o < c; ) t[o++] == 0 &&
|
|
5102
|
-
|
|
5116
|
+
let p = 0;
|
|
5117
|
+
for (; o < c; ) t[o++] == 0 && p++;
|
|
5118
|
+
p && (l || (l = [])).push({
|
|
5103
5119
|
type: "missing",
|
|
5104
5120
|
row: u,
|
|
5105
|
-
n:
|
|
5121
|
+
n: p
|
|
5106
5122
|
}), g++;
|
|
5107
5123
|
}
|
|
5108
5124
|
(n === 0 || i === 0) && (l || (l = [])).push({ type: "zero_sized" });
|
|
@@ -5243,22 +5259,22 @@ var On = class Gn extends B {
|
|
|
5243
5259
|
const c = i.map[g];
|
|
5244
5260
|
if (l[c]) continue;
|
|
5245
5261
|
l[c] = !0;
|
|
5246
|
-
const
|
|
5262
|
+
const p = i.findCell(c);
|
|
5247
5263
|
let f = n.nodeAt(c);
|
|
5248
5264
|
if (!f) throw new RangeError(`No cell with offset ${c} found`);
|
|
5249
|
-
const
|
|
5250
|
-
if (
|
|
5251
|
-
let
|
|
5252
|
-
if (
|
|
5253
|
-
if (f = f.type.createAndFill(
|
|
5254
|
-
} else f = f.type.create(
|
|
5265
|
+
const d = o.left - p.left, y = p.right - o.right;
|
|
5266
|
+
if (d > 0 || y > 0) {
|
|
5267
|
+
let b = f.attrs;
|
|
5268
|
+
if (d > 0 && (b = xt(b, 0, d)), y > 0 && (b = xt(b, b.colspan - y, y)), p.left < o.left) {
|
|
5269
|
+
if (f = f.type.createAndFill(b), !f) throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`);
|
|
5270
|
+
} else f = f.type.create(b, f.content);
|
|
5255
5271
|
}
|
|
5256
|
-
if (
|
|
5257
|
-
const
|
|
5272
|
+
if (p.top < o.top || p.bottom > o.bottom) {
|
|
5273
|
+
const b = {
|
|
5258
5274
|
...f.attrs,
|
|
5259
|
-
rowspan: Math.min(
|
|
5275
|
+
rowspan: Math.min(p.bottom, o.bottom) - Math.max(p.top, o.top)
|
|
5260
5276
|
};
|
|
5261
|
-
|
|
5277
|
+
p.top < o.top ? f = f.type.createAndFill(b) : f = f.type.create(b, f.content);
|
|
5262
5278
|
}
|
|
5263
5279
|
u.push(f);
|
|
5264
5280
|
}
|
|
@@ -5398,8 +5414,8 @@ function Di(e, n) {
|
|
|
5398
5414
|
bottom: 1
|
|
5399
5415
|
} : l, a = e == "column" ? r ? o.cell : o.header_cell : e == "row" ? h ? o.cell : o.header_cell : o.cell;
|
|
5400
5416
|
l.map.cellsInRect(g).forEach((c) => {
|
|
5401
|
-
const
|
|
5402
|
-
f && s.setNodeMarkup(
|
|
5417
|
+
const p = c + l.tableStart, f = s.doc.nodeAt(p);
|
|
5418
|
+
f && s.setNodeMarkup(p, a, f.attrs);
|
|
5403
5419
|
}), t(s);
|
|
5404
5420
|
}
|
|
5405
5421
|
return !0;
|
|
@@ -5516,11 +5532,11 @@ var Wu = class {
|
|
|
5516
5532
|
}, this.shouldShow = ({
|
|
5517
5533
|
view: a,
|
|
5518
5534
|
state: c,
|
|
5519
|
-
from:
|
|
5535
|
+
from: p,
|
|
5520
5536
|
to: f
|
|
5521
5537
|
}) => {
|
|
5522
|
-
const { doc:
|
|
5523
|
-
return !(!(a.hasFocus() || I) ||
|
|
5538
|
+
const { doc: d, selection: y } = c, { empty: b } = y, A = !d.textBetween(p, f).length && Gl(c.selection), I = this.element.contains(document.activeElement);
|
|
5539
|
+
return !(!(a.hasFocus() || I) || b || A || !this.editor.isEditable);
|
|
5524
5540
|
}, this.mousedownHandler = () => {
|
|
5525
5541
|
this.preventHide = !0;
|
|
5526
5542
|
}, this.dragstartHandler = () => {
|
|
@@ -5543,13 +5559,13 @@ var Wu = class {
|
|
|
5543
5559
|
}
|
|
5544
5560
|
a != null && a.relatedTarget && ((c = this.element.parentNode) != null && c.contains(a.relatedTarget)) || (a == null ? void 0 : a.relatedTarget) !== this.editor.view.dom && this.hide();
|
|
5545
5561
|
}, this.handleDebouncedUpdate = (a, c) => {
|
|
5546
|
-
const
|
|
5547
|
-
!
|
|
5548
|
-
this.updateHandler(a,
|
|
5562
|
+
const p = !(c != null && c.selection.eq(a.state.selection)), f = !(c != null && c.doc.eq(a.state.doc));
|
|
5563
|
+
!p && !f || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
|
|
5564
|
+
this.updateHandler(a, p, f, c);
|
|
5549
5565
|
}, this.updateDelay));
|
|
5550
|
-
}, this.updateHandler = (a, c,
|
|
5551
|
-
const { composing:
|
|
5552
|
-
if (
|
|
5566
|
+
}, this.updateHandler = (a, c, p, f) => {
|
|
5567
|
+
const { composing: d } = a;
|
|
5568
|
+
if (d || !c && !p)
|
|
5553
5569
|
return;
|
|
5554
5570
|
if (!this.getShouldShow(f)) {
|
|
5555
5571
|
this.hide();
|
|
@@ -5622,13 +5638,13 @@ var Wu = class {
|
|
|
5622
5638
|
const { $anchorCell: h, $headCell: r } = t, u = h ? h.pos : r.pos, g = r ? r.pos : h.pos, a = this.view.nodeDOM(u), c = this.view.nodeDOM(g);
|
|
5623
5639
|
if (!a || !c)
|
|
5624
5640
|
return;
|
|
5625
|
-
const
|
|
5641
|
+
const p = a === c ? a.getBoundingClientRect() : Iu(
|
|
5626
5642
|
a.getBoundingClientRect(),
|
|
5627
5643
|
c.getBoundingClientRect()
|
|
5628
5644
|
);
|
|
5629
5645
|
s = {
|
|
5630
|
-
getBoundingClientRect: () =>
|
|
5631
|
-
getClientRects: () => [
|
|
5646
|
+
getBoundingClientRect: () => p,
|
|
5647
|
+
getClientRects: () => [p]
|
|
5632
5648
|
};
|
|
5633
5649
|
}
|
|
5634
5650
|
return s;
|
|
@@ -5750,12 +5766,12 @@ var Wu = class {
|
|
|
5750
5766
|
shouldShow: g,
|
|
5751
5767
|
getReferencedVirtualElement: a,
|
|
5752
5768
|
updateDelay: c
|
|
5753
|
-
} = e,
|
|
5754
|
-
|
|
5769
|
+
} = e, p = o.value;
|
|
5770
|
+
p && (p.style.visibility = "hidden", p.style.position = "absolute", p.remove(), de(() => {
|
|
5755
5771
|
s.registerPlugin(
|
|
5756
5772
|
wu({
|
|
5757
5773
|
editor: s,
|
|
5758
|
-
element:
|
|
5774
|
+
element: p,
|
|
5759
5775
|
options: h,
|
|
5760
5776
|
pluginKey: l,
|
|
5761
5777
|
resizeDelay: r,
|
|
@@ -5787,8 +5803,8 @@ var Wu = class {
|
|
|
5787
5803
|
shouldShow: r
|
|
5788
5804
|
}) {
|
|
5789
5805
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: g, state: a }) => {
|
|
5790
|
-
const { selection: c } = a, { $anchor:
|
|
5791
|
-
return !(!g.hasFocus() || !f || !
|
|
5806
|
+
const { selection: c } = a, { $anchor: p, empty: f } = c, d = p.depth === 1, y = p.parent.isTextblock && !p.parent.type.spec.code && !p.parent.textContent && p.parent.childCount === 0 && !this.getTextContent(p.parent);
|
|
5807
|
+
return !(!g.hasFocus() || !f || !d || !y || !this.editor.isEditable);
|
|
5792
5808
|
}, this.floatingUIOptions = {
|
|
5793
5809
|
strategy: "absolute",
|
|
5794
5810
|
placement: "right",
|
|
@@ -5800,11 +5816,11 @@ var Wu = class {
|
|
|
5800
5816
|
autoPlacement: !1,
|
|
5801
5817
|
hide: !1,
|
|
5802
5818
|
inline: !1
|
|
5803
|
-
}, this.updateHandler = (g, a, c,
|
|
5819
|
+
}, this.updateHandler = (g, a, c, p) => {
|
|
5804
5820
|
const { composing: f } = g;
|
|
5805
5821
|
if (f || !a && !c)
|
|
5806
5822
|
return;
|
|
5807
|
-
if (!this.getShouldShow(
|
|
5823
|
+
if (!this.getShouldShow(p)) {
|
|
5808
5824
|
this.hide();
|
|
5809
5825
|
return;
|
|
5810
5826
|
}
|
|
@@ -6011,12 +6027,12 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6011
6027
|
on: () => {
|
|
6012
6028
|
a.abort();
|
|
6013
6029
|
}
|
|
6014
|
-
}),
|
|
6030
|
+
}), p = () => {
|
|
6015
6031
|
var y;
|
|
6016
6032
|
(y = i.value) == null || y.view.dispatch(
|
|
6017
6033
|
i.value.state.tr.setMeta(u, "hide")
|
|
6018
6034
|
);
|
|
6019
|
-
},
|
|
6035
|
+
}, d = [
|
|
6020
6036
|
{
|
|
6021
6037
|
label: "试听",
|
|
6022
6038
|
value: "test",
|
|
@@ -6025,10 +6041,10 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6025
6041
|
c.emit();
|
|
6026
6042
|
const y = l();
|
|
6027
6043
|
if (!y.timberId) return;
|
|
6028
|
-
const
|
|
6029
|
-
if (!
|
|
6030
|
-
const I = Yi(
|
|
6031
|
-
|
|
6044
|
+
const A = t();
|
|
6045
|
+
if (!A) return;
|
|
6046
|
+
const I = Yi(A);
|
|
6047
|
+
p(), await a.execute({
|
|
6032
6048
|
...y,
|
|
6033
6049
|
...I,
|
|
6034
6050
|
partialPreview: !0
|
|
@@ -6039,25 +6055,25 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6039
6055
|
}
|
|
6040
6056
|
}
|
|
6041
6057
|
];
|
|
6042
|
-
return (y,
|
|
6043
|
-
|
|
6058
|
+
return (y, b) => r.value ? (Y(), L("div", ku, [
|
|
6059
|
+
z(i) ? (Y(), _(z(Su), {
|
|
6044
6060
|
key: 0,
|
|
6045
6061
|
"plugin-key": u,
|
|
6046
|
-
editor:
|
|
6047
|
-
"get-referenced-virtual-element":
|
|
6062
|
+
editor: z(i),
|
|
6063
|
+
"get-referenced-virtual-element": z(o),
|
|
6048
6064
|
class: "lsh-menu-box"
|
|
6049
6065
|
}, {
|
|
6050
6066
|
default: N(() => [
|
|
6051
|
-
(Y(), L(en, null, gn(
|
|
6052
|
-
key:
|
|
6067
|
+
(Y(), L(en, null, gn(d, (A) => v("button", {
|
|
6068
|
+
key: A.value,
|
|
6053
6069
|
type: "button",
|
|
6054
6070
|
class: "lsh-menu-item",
|
|
6055
|
-
onClick:
|
|
6056
|
-
}, F(
|
|
6071
|
+
onClick: A.onClick
|
|
6072
|
+
}, F(A.label), 9, Ku)), 64))
|
|
6057
6073
|
]),
|
|
6058
6074
|
_: 1
|
|
6059
6075
|
}, 8, ["editor", "get-referenced-virtual-element"])) : yn("", !0),
|
|
6060
|
-
|
|
6076
|
+
v("audio", {
|
|
6061
6077
|
ref_key: "audioRef",
|
|
6062
6078
|
ref: g,
|
|
6063
6079
|
preload: "metadata"
|
|
@@ -6074,6 +6090,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6074
6090
|
features: { default: () => ({}) },
|
|
6075
6091
|
services: { default: () => ({}) },
|
|
6076
6092
|
getPreviewParams: {},
|
|
6093
|
+
getPlaybackSpeed: {},
|
|
6077
6094
|
showSelectionMenu: { type: Boolean, default: !0 },
|
|
6078
6095
|
initialContent: { default: Jn }
|
|
6079
6096
|
},
|
|
@@ -6083,19 +6100,23 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6083
6100
|
content: t.initialContent,
|
|
6084
6101
|
textLimitLength: t.textLimit,
|
|
6085
6102
|
getGenerateAudioParams: () => {
|
|
6086
|
-
var
|
|
6087
|
-
return ((
|
|
6103
|
+
var d;
|
|
6104
|
+
return ((d = t.getPreviewParams) == null ? void 0 : d.call(t)) ?? {};
|
|
6105
|
+
},
|
|
6106
|
+
getPlaybackSpeed: () => {
|
|
6107
|
+
var d;
|
|
6108
|
+
return ((d = t.getPlaybackSpeed) == null ? void 0 : d.call(t)) ?? 1;
|
|
6088
6109
|
},
|
|
6089
6110
|
voiceVersion: l,
|
|
6090
6111
|
placeholder: t.placeholder,
|
|
6091
6112
|
editable: s,
|
|
6092
6113
|
services: h,
|
|
6093
6114
|
features: r,
|
|
6094
|
-
onCreate: (
|
|
6115
|
+
onCreate: (d) => o("ready", d),
|
|
6095
6116
|
onChange: () => o("change")
|
|
6096
6117
|
}), { editor: g, clearContent: a, replaceContentWithText: c } = u;
|
|
6097
6118
|
ur(u);
|
|
6098
|
-
const { handleChangeVoice:
|
|
6119
|
+
const { handleChangeVoice: p } = br({
|
|
6099
6120
|
richTextEditor: u
|
|
6100
6121
|
});
|
|
6101
6122
|
return n({
|
|
@@ -6103,22 +6124,22 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6103
6124
|
...{
|
|
6104
6125
|
clear: a,
|
|
6105
6126
|
focus: () => {
|
|
6106
|
-
var
|
|
6107
|
-
return (
|
|
6127
|
+
var d;
|
|
6128
|
+
return (d = g.value) == null ? void 0 : d.commands.focus();
|
|
6108
6129
|
},
|
|
6109
6130
|
getJson: () => {
|
|
6110
|
-
var
|
|
6111
|
-
return ((
|
|
6131
|
+
var d;
|
|
6132
|
+
return ((d = g.value) == null ? void 0 : d.getJSON()) ?? Jn();
|
|
6112
6133
|
},
|
|
6113
6134
|
getTtsData: () => {
|
|
6114
|
-
var
|
|
6115
|
-
return Yi(((
|
|
6135
|
+
var d;
|
|
6136
|
+
return Yi(((d = g.value) == null ? void 0 : d.getJSON()) ?? Jn());
|
|
6116
6137
|
},
|
|
6117
6138
|
replaceText: c,
|
|
6118
|
-
handleChangeVoice:
|
|
6139
|
+
handleChangeVoice: p
|
|
6119
6140
|
}
|
|
6120
|
-
}), (
|
|
6121
|
-
wn(
|
|
6141
|
+
}), (d, y) => (Y(), L(en, null, [
|
|
6142
|
+
wn(d.$slots, "default"),
|
|
6122
6143
|
t.showSelectionMenu ? (Y(), _(Gu, { key: 0 })) : yn("", !0)
|
|
6123
6144
|
], 64));
|
|
6124
6145
|
}
|
|
@@ -6136,22 +6157,22 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6136
6157
|
emits: ["confirm"],
|
|
6137
6158
|
setup(e, { expose: n, emit: i }) {
|
|
6138
6159
|
const t = i, o = K(!1), l = K(), s = Tn(), { notify: h, services: r, textLimitLength: u } = s, g = Io({
|
|
6139
|
-
runner: (
|
|
6140
|
-
var
|
|
6141
|
-
return ((
|
|
6142
|
-
|
|
6160
|
+
runner: (C, W) => {
|
|
6161
|
+
var j, x;
|
|
6162
|
+
return ((x = (j = r.value).generateDraft) == null ? void 0 : x.call(
|
|
6163
|
+
j,
|
|
6143
6164
|
{
|
|
6144
|
-
themeWord: String(
|
|
6145
|
-
requireWord: String(
|
|
6165
|
+
themeWord: String(C.themeWord ?? ""),
|
|
6166
|
+
requireWord: String(C.requireWord ?? "")
|
|
6146
6167
|
},
|
|
6147
|
-
|
|
6168
|
+
W
|
|
6148
6169
|
)) ?? Promise.resolve();
|
|
6149
6170
|
},
|
|
6150
6171
|
scrollTarget: l
|
|
6151
|
-
}), { loading: a, result: c } = g,
|
|
6172
|
+
}), { loading: a, result: c } = g, p = K(""), f = K(""), { copy: d } = yh({ source: c }), y = K(!1), b = [
|
|
6152
6173
|
{
|
|
6153
6174
|
label: "文稿主题",
|
|
6154
|
-
modelValue:
|
|
6175
|
+
modelValue: p,
|
|
6155
6176
|
placeholder: "请输入文稿主题...",
|
|
6156
6177
|
inputHeight: 80,
|
|
6157
6178
|
maxLength: 200
|
|
@@ -6167,152 +6188,152 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6167
6188
|
inputHeight: 233,
|
|
6168
6189
|
maxLength: 500
|
|
6169
6190
|
}
|
|
6170
|
-
],
|
|
6191
|
+
], A = () => {
|
|
6171
6192
|
o.value = !o.value;
|
|
6172
6193
|
}, I = () => {
|
|
6173
|
-
|
|
6194
|
+
A();
|
|
6174
6195
|
}, w = () => {
|
|
6175
|
-
t("confirm", c.value),
|
|
6196
|
+
t("confirm", c.value), A();
|
|
6176
6197
|
}, J = async () => {
|
|
6177
6198
|
try {
|
|
6178
|
-
await
|
|
6179
|
-
} catch (
|
|
6180
|
-
console.log(
|
|
6199
|
+
await d(), h("success", "复制成功");
|
|
6200
|
+
} catch (C) {
|
|
6201
|
+
console.log(C);
|
|
6181
6202
|
}
|
|
6182
6203
|
}, k = async () => {
|
|
6183
6204
|
try {
|
|
6184
6205
|
await g.exec({
|
|
6185
|
-
themeWord:
|
|
6206
|
+
themeWord: p.value,
|
|
6186
6207
|
requireWord: f.value
|
|
6187
6208
|
}), y.value = !0;
|
|
6188
6209
|
} catch {
|
|
6189
6210
|
}
|
|
6190
|
-
}, G = T(() => !
|
|
6211
|
+
}, G = T(() => !p.value || !f.value), M = T(() => u), V = T(() => c.value.length > M.value), S = T(() => a.value || !c.value), m = T(() => S.value || V.value);
|
|
6191
6212
|
return n({
|
|
6192
6213
|
open: () => {
|
|
6193
|
-
|
|
6214
|
+
A();
|
|
6194
6215
|
}
|
|
6195
|
-
}), (
|
|
6216
|
+
}), (C, W) => (Y(), _(z(Oe), {
|
|
6196
6217
|
modelValue: o.value,
|
|
6197
|
-
"onUpdate:modelValue":
|
|
6218
|
+
"onUpdate:modelValue": W[1] || (W[1] = (j) => o.value = j),
|
|
6198
6219
|
width: 800,
|
|
6199
6220
|
title: "AI写稿",
|
|
6200
6221
|
class: "lsh-ai-modal"
|
|
6201
6222
|
}, {
|
|
6202
6223
|
footer: N(() => [
|
|
6203
|
-
H(
|
|
6224
|
+
H(z(on), {
|
|
6204
6225
|
plain: "",
|
|
6205
6226
|
onClick: I
|
|
6206
6227
|
}, {
|
|
6207
|
-
default: N(() => [...
|
|
6228
|
+
default: N(() => [...W[7] || (W[7] = [
|
|
6208
6229
|
An("取消", -1)
|
|
6209
6230
|
])]),
|
|
6210
6231
|
_: 1
|
|
6211
6232
|
}),
|
|
6212
|
-
H(
|
|
6233
|
+
H(z(on), {
|
|
6213
6234
|
plain: "",
|
|
6214
6235
|
onClick: J,
|
|
6215
|
-
disabled:
|
|
6236
|
+
disabled: S.value
|
|
6216
6237
|
}, {
|
|
6217
|
-
default: N(() => [...
|
|
6238
|
+
default: N(() => [...W[8] || (W[8] = [
|
|
6218
6239
|
An("复制", -1)
|
|
6219
6240
|
])]),
|
|
6220
6241
|
_: 1
|
|
6221
6242
|
}, 8, ["disabled"]),
|
|
6222
|
-
H(
|
|
6243
|
+
H(z(on), {
|
|
6223
6244
|
type: "info",
|
|
6224
6245
|
onClick: w,
|
|
6225
|
-
disabled:
|
|
6226
|
-
loading:
|
|
6246
|
+
disabled: m.value,
|
|
6247
|
+
loading: z(a)
|
|
6227
6248
|
}, {
|
|
6228
|
-
default: N(() => [...
|
|
6249
|
+
default: N(() => [...W[9] || (W[9] = [
|
|
6229
6250
|
An(" 替换原文 ", -1)
|
|
6230
6251
|
])]),
|
|
6231
6252
|
_: 1
|
|
6232
6253
|
}, 8, ["disabled", "loading"])
|
|
6233
6254
|
]),
|
|
6234
6255
|
default: N(() => [
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6256
|
+
v("div", Ju, [
|
|
6257
|
+
v("div", Hu, [
|
|
6258
|
+
v("div", Lu, [
|
|
6259
|
+
W[4] || (W[4] = v("span", { class: "lsh-title" }, "文稿关键词", -1)),
|
|
6260
|
+
z(a) ? (Y(), _(z(on), {
|
|
6240
6261
|
key: 1,
|
|
6241
6262
|
class: "lsh-text-btn red",
|
|
6242
|
-
onClick:
|
|
6263
|
+
onClick: z(g).abort
|
|
6243
6264
|
}, {
|
|
6244
6265
|
icon: N(() => [
|
|
6245
|
-
H(
|
|
6266
|
+
H(z(rn), { name: "editor-generate-stop" })
|
|
6246
6267
|
]),
|
|
6247
6268
|
default: N(() => [
|
|
6248
|
-
|
|
6269
|
+
W[3] || (W[3] = v("span", null, "停止生成 ", -1))
|
|
6249
6270
|
]),
|
|
6250
6271
|
_: 1
|
|
6251
|
-
}, 8, ["onClick"])) : (Y(), _(
|
|
6272
|
+
}, 8, ["onClick"])) : (Y(), _(z(on), {
|
|
6252
6273
|
key: 0,
|
|
6253
6274
|
class: "lsh-text-btn blue",
|
|
6254
6275
|
onClick: k,
|
|
6255
6276
|
disabled: G.value
|
|
6256
6277
|
}, {
|
|
6257
6278
|
icon: N(() => [
|
|
6258
|
-
H(
|
|
6279
|
+
H(z(rn), { name: "editor-send" })
|
|
6259
6280
|
]),
|
|
6260
6281
|
default: N(() => [
|
|
6261
|
-
|
|
6282
|
+
W[2] || (W[2] = v("span", null, "开始生成 ", -1))
|
|
6262
6283
|
]),
|
|
6263
6284
|
_: 1
|
|
6264
6285
|
}, 8, ["disabled"]))
|
|
6265
6286
|
]),
|
|
6266
|
-
|
|
6267
|
-
(Y(), L(en, null, gn(
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6287
|
+
v("div", Mu, [
|
|
6288
|
+
(Y(), L(en, null, gn(b, (j) => v("div", Tu, [
|
|
6289
|
+
v("div", Nu, [
|
|
6290
|
+
v("span", null, F(j.label), 1),
|
|
6291
|
+
v("span", Ru, F(j.modelValue.value.length) + "/" + F(j.maxLength), 1)
|
|
6271
6292
|
]),
|
|
6272
|
-
Te(
|
|
6293
|
+
Te(v("textarea", {
|
|
6273
6294
|
class: "lsh-textarea",
|
|
6274
|
-
"onUpdate:modelValue": (
|
|
6275
|
-
placeholder:
|
|
6276
|
-
style: he({ height:
|
|
6295
|
+
"onUpdate:modelValue": (x) => j.modelValue.value = x,
|
|
6296
|
+
placeholder: j.placeholder,
|
|
6297
|
+
style: he({ height: j.inputHeight + "px" }),
|
|
6277
6298
|
resizable: !1,
|
|
6278
|
-
maxlength:
|
|
6299
|
+
maxlength: j.maxLength
|
|
6279
6300
|
}, null, 12, Fu), [
|
|
6280
|
-
[Ne,
|
|
6301
|
+
[Ne, j.modelValue.value]
|
|
6281
6302
|
])
|
|
6282
6303
|
])), 64))
|
|
6283
6304
|
])
|
|
6284
6305
|
]),
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6306
|
+
v("div", Pu, [
|
|
6307
|
+
W[6] || (W[6] = v("div", { class: "lsh-form-top" }, [
|
|
6308
|
+
v("span", { class: "lsh-title" }, "AI写稿结果")
|
|
6288
6309
|
], -1)),
|
|
6289
|
-
|
|
6290
|
-
Te(
|
|
6310
|
+
z(c) || y.value ? (Y(), L("div", Uu, [
|
|
6311
|
+
Te(v("textarea", {
|
|
6291
6312
|
class: "lsh-textarea lsh-result-box",
|
|
6292
6313
|
ref_key: "textBoxRef",
|
|
6293
6314
|
ref: l,
|
|
6294
|
-
"onUpdate:modelValue":
|
|
6315
|
+
"onUpdate:modelValue": W[0] || (W[0] = (j) => Et(c) ? c.value = j : null)
|
|
6295
6316
|
}, null, 512), [
|
|
6296
|
-
[Ne,
|
|
6317
|
+
[Ne, z(c)]
|
|
6297
6318
|
]),
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6319
|
+
v("div", Eu, [
|
|
6320
|
+
W[5] || (W[5] = v("span", null, "内容由AI生成,仅供参考", -1)),
|
|
6321
|
+
v("span", {
|
|
6301
6322
|
class: bn({
|
|
6302
6323
|
"red-text": V.value
|
|
6303
6324
|
})
|
|
6304
|
-
}, F(
|
|
6325
|
+
}, F(z(c).length) + "/" + F(M.value), 3)
|
|
6305
6326
|
])
|
|
6306
|
-
])) :
|
|
6307
|
-
|
|
6308
|
-
H(
|
|
6327
|
+
])) : z(a) ? (Y(), L("div", Du, [
|
|
6328
|
+
v("div", Bu, [
|
|
6329
|
+
H(z(ao), {
|
|
6309
6330
|
loading: "",
|
|
6310
6331
|
text: "正在生成中,请稍候..."
|
|
6311
6332
|
})
|
|
6312
6333
|
])
|
|
6313
6334
|
])) : (Y(), L("div", Qu, [
|
|
6314
|
-
|
|
6315
|
-
H(
|
|
6335
|
+
v("div", _u, [
|
|
6336
|
+
H(z(sh), {
|
|
6316
6337
|
style: { height: "100%" },
|
|
6317
6338
|
description: "暂无内容,请先输入关键词"
|
|
6318
6339
|
})
|
|
@@ -6327,33 +6348,33 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6327
6348
|
}), na = /* @__PURE__ */ sn($u, [["__scopeId", "data-v-259be8b7"]]), ea = { class: "lsh-footer-box" }, ia = { class: "lsh-option-item gray" }, ta = { class: "lsh-option-item gray" }, oa = /* @__PURE__ */ $({
|
|
6328
6349
|
__name: "editor-footer",
|
|
6329
6350
|
setup(e) {
|
|
6330
|
-
const n = Tn(), { clearContent: i, editor: t,
|
|
6331
|
-
var
|
|
6351
|
+
const n = Tn(), { clearContent: i, editor: t, getPlaybackSpeed: o, textLimitLength: l, textLength: s } = n, h = T(() => {
|
|
6352
|
+
var u;
|
|
6332
6353
|
if (!s.value) return tt(0);
|
|
6333
|
-
const
|
|
6334
|
-
return tt(fl(
|
|
6354
|
+
const r = ((u = t.value) == null ? void 0 : u.getText()) ?? "";
|
|
6355
|
+
return tt(fl(r, o()));
|
|
6335
6356
|
});
|
|
6336
6357
|
return (r, u) => (Y(), L("div", ea, [
|
|
6337
|
-
|
|
6338
|
-
H(
|
|
6339
|
-
|
|
6358
|
+
v("div", ia, [
|
|
6359
|
+
H(z(rn), { name: "editor-text" }),
|
|
6360
|
+
v("span", null, F(z(s)) + "/" + F(z(l)), 1)
|
|
6340
6361
|
]),
|
|
6341
|
-
|
|
6342
|
-
H(
|
|
6343
|
-
|
|
6362
|
+
v("div", ta, [
|
|
6363
|
+
H(z(rn), { name: "editor-time" }),
|
|
6364
|
+
v("span", null, F(h.value), 1)
|
|
6344
6365
|
]),
|
|
6345
|
-
u[2] || (u[2] =
|
|
6346
|
-
|
|
6347
|
-
class: bn(["lsh-option-item btn", { disabled: !
|
|
6366
|
+
u[2] || (u[2] = v("div", { class: "lsh-divider" }, null, -1)),
|
|
6367
|
+
v("div", {
|
|
6368
|
+
class: bn(["lsh-option-item btn", { disabled: !z(s) }]),
|
|
6348
6369
|
onClick: u[0] || (u[0] = //@ts-ignore
|
|
6349
|
-
(...g) =>
|
|
6370
|
+
(...g) => z(i) && z(i)(...g))
|
|
6350
6371
|
}, [
|
|
6351
|
-
H(
|
|
6352
|
-
u[1] || (u[1] =
|
|
6372
|
+
H(z(rn), { name: "editor-clear" }),
|
|
6373
|
+
u[1] || (u[1] = v("span", null, "清空", -1))
|
|
6353
6374
|
], 2)
|
|
6354
6375
|
]));
|
|
6355
6376
|
}
|
|
6356
|
-
}), la = /* @__PURE__ */ sn(oa, [["__scopeId", "data-v-
|
|
6377
|
+
}), la = /* @__PURE__ */ sn(oa, [["__scopeId", "data-v-b83e8b96"]]), sa = ({
|
|
6357
6378
|
list: e,
|
|
6358
6379
|
toolbarRef: n,
|
|
6359
6380
|
measureRef: i,
|
|
@@ -6366,23 +6387,23 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6366
6387
|
() => l.value.slice(s.value)
|
|
6367
6388
|
), g = () => {
|
|
6368
6389
|
var I;
|
|
6369
|
-
const c = n.value,
|
|
6370
|
-
if (!c || !
|
|
6390
|
+
const c = n.value, p = i.value;
|
|
6391
|
+
if (!c || !p) return;
|
|
6371
6392
|
const f = c.clientWidth;
|
|
6372
6393
|
if (f <= 0) return;
|
|
6373
|
-
const
|
|
6374
|
-
|
|
6375
|
-
), y = ((I =
|
|
6376
|
-
if (!y ||
|
|
6377
|
-
let
|
|
6378
|
-
s.value =
|
|
6379
|
-
for (let w = 0; w <
|
|
6380
|
-
const J =
|
|
6394
|
+
const d = Array.from(
|
|
6395
|
+
p.querySelectorAll(t)
|
|
6396
|
+
), y = ((I = d[d.length - 1]) == null ? void 0 : I.offsetWidth) || 0, b = d.slice(0, -1).map((w) => w.offsetWidth);
|
|
6397
|
+
if (!y || b.some((w) => !w)) return;
|
|
6398
|
+
let A = 0;
|
|
6399
|
+
s.value = b.length;
|
|
6400
|
+
for (let w = 0; w < b.length; w++) {
|
|
6401
|
+
const J = b.length - w - 1, k = A + (w > 0 ? o : 0) + b[w];
|
|
6381
6402
|
if (k + (J > 0 ? o + y : 0) > f) {
|
|
6382
6403
|
s.value = w;
|
|
6383
6404
|
return;
|
|
6384
6405
|
}
|
|
6385
|
-
|
|
6406
|
+
A = k;
|
|
6386
6407
|
}
|
|
6387
6408
|
}, a = () => {
|
|
6388
6409
|
de(g);
|
|
@@ -6406,7 +6427,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6406
6427
|
var l;
|
|
6407
6428
|
return (l = o.value) == null ? void 0 : l.$el;
|
|
6408
6429
|
}
|
|
6409
|
-
}), (l, s) => (Y(), _(
|
|
6430
|
+
}), (l, s) => (Y(), _(z(on), {
|
|
6410
6431
|
ref_key: "buttonRef",
|
|
6411
6432
|
ref: o,
|
|
6412
6433
|
plain: e.plain,
|
|
@@ -6415,13 +6436,13 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6415
6436
|
link: ""
|
|
6416
6437
|
}, {
|
|
6417
6438
|
icon: N(() => [
|
|
6418
|
-
H(
|
|
6439
|
+
H(z(rn), {
|
|
6419
6440
|
name: e.item.tool.icon,
|
|
6420
6441
|
size: "18"
|
|
6421
6442
|
}, null, 8, ["name"])
|
|
6422
6443
|
]),
|
|
6423
6444
|
default: N(() => [
|
|
6424
|
-
|
|
6445
|
+
v("span", null, F(e.item.tool.label), 1)
|
|
6425
6446
|
]),
|
|
6426
6447
|
_: 1
|
|
6427
6448
|
}, 8, ["plain", "disabled"]));
|
|
@@ -6442,25 +6463,25 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6442
6463
|
return ((V = (M = r.value).readFormula) == null ? void 0 : V.call(M, String(k.formula ?? ""), G)) ?? Promise.resolve();
|
|
6443
6464
|
},
|
|
6444
6465
|
scrollTarget: s
|
|
6445
|
-
}), { loading: c, result:
|
|
6466
|
+
}), { loading: c, result: p } = a, f = K(!1), d = () => {
|
|
6446
6467
|
o.value = !o.value;
|
|
6447
6468
|
}, y = () => {
|
|
6448
|
-
|
|
6449
|
-
},
|
|
6450
|
-
t("confirm",
|
|
6451
|
-
},
|
|
6469
|
+
d();
|
|
6470
|
+
}, b = () => {
|
|
6471
|
+
t("confirm", p.value), d();
|
|
6472
|
+
}, A = async () => {
|
|
6452
6473
|
try {
|
|
6453
6474
|
await a.exec({
|
|
6454
6475
|
formula: l.value
|
|
6455
6476
|
}), f.value = !0;
|
|
6456
6477
|
} catch {
|
|
6457
6478
|
}
|
|
6458
|
-
}, I = T(() => g - u.value + l.value.length), w = T(() =>
|
|
6479
|
+
}, I = T(() => g - u.value + l.value.length), w = T(() => p.value.length > I.value), J = T(() => c.value || !p.value || w.value);
|
|
6459
6480
|
return n({
|
|
6460
6481
|
open: (k) => {
|
|
6461
|
-
l.value = k,
|
|
6482
|
+
l.value = k, A(), d();
|
|
6462
6483
|
}
|
|
6463
|
-
}), (k, G) => (Y(), _(
|
|
6484
|
+
}), (k, G) => (Y(), _(z(Oe), {
|
|
6464
6485
|
modelValue: o.value,
|
|
6465
6486
|
"onUpdate:modelValue": G[2] || (G[2] = (M) => o.value = M),
|
|
6466
6487
|
width: 800,
|
|
@@ -6468,7 +6489,7 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6468
6489
|
class: "lsh-ai-modal"
|
|
6469
6490
|
}, {
|
|
6470
6491
|
footer: N(() => [
|
|
6471
|
-
H(
|
|
6492
|
+
H(z(on), {
|
|
6472
6493
|
plain: "",
|
|
6473
6494
|
onClick: y
|
|
6474
6495
|
}, {
|
|
@@ -6477,11 +6498,11 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6477
6498
|
])]),
|
|
6478
6499
|
_: 1
|
|
6479
6500
|
}),
|
|
6480
|
-
H(
|
|
6501
|
+
H(z(on), {
|
|
6481
6502
|
type: "info",
|
|
6482
|
-
onClick:
|
|
6503
|
+
onClick: b,
|
|
6483
6504
|
disabled: J.value,
|
|
6484
|
-
loading:
|
|
6505
|
+
loading: z(c)
|
|
6485
6506
|
}, {
|
|
6486
6507
|
default: N(() => [...G[9] || (G[9] = [
|
|
6487
6508
|
An(" 确定 ", -1)
|
|
@@ -6490,55 +6511,55 @@ const ku = { key: 0 }, Ku = ["onClick"], Vu = /* @__PURE__ */ $({
|
|
|
6490
6511
|
}, 8, ["disabled", "loading"])
|
|
6491
6512
|
]),
|
|
6492
6513
|
default: N(() => [
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
G[3] || (G[3] =
|
|
6496
|
-
|
|
6514
|
+
v("div", ha, [
|
|
6515
|
+
v("div", ra, [
|
|
6516
|
+
G[3] || (G[3] = v("div", { class: "lsh-form-top" }, [
|
|
6517
|
+
v("span", { class: "lsh-title" }, "原始文本")
|
|
6497
6518
|
], -1)),
|
|
6498
|
-
|
|
6499
|
-
|
|
6519
|
+
v("div", ua, [
|
|
6520
|
+
v("span", null, F(l.value), 1)
|
|
6500
6521
|
])
|
|
6501
6522
|
]),
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
G[6] || (G[6] =
|
|
6505
|
-
|
|
6523
|
+
v("div", aa, [
|
|
6524
|
+
v("div", ga, [
|
|
6525
|
+
G[6] || (G[6] = v("span", { class: "lsh-title" }, "AI读公式结果", -1)),
|
|
6526
|
+
z(c) ? (Y(), L("div", {
|
|
6506
6527
|
key: 1,
|
|
6507
6528
|
class: "lsh-text-btn stop",
|
|
6508
6529
|
onClick: G[0] || (G[0] = //@ts-ignore
|
|
6509
|
-
(...M) =>
|
|
6530
|
+
(...M) => z(a).abort && z(a).abort(...M))
|
|
6510
6531
|
}, [
|
|
6511
|
-
H(
|
|
6512
|
-
G[5] || (G[5] =
|
|
6532
|
+
H(z(rn), { name: "editor-generate-stop" }),
|
|
6533
|
+
G[5] || (G[5] = v("span", null, "停止生成 ", -1))
|
|
6513
6534
|
])) : (Y(), L("div", {
|
|
6514
6535
|
key: 0,
|
|
6515
6536
|
class: "lsh-text-btn",
|
|
6516
|
-
onClick:
|
|
6537
|
+
onClick: A
|
|
6517
6538
|
}, [
|
|
6518
|
-
H(
|
|
6519
|
-
G[4] || (G[4] =
|
|
6539
|
+
H(z(rn), { name: "editor-refresh" }),
|
|
6540
|
+
G[4] || (G[4] = v("span", null, "重新生成 ", -1))
|
|
6520
6541
|
]))
|
|
6521
6542
|
]),
|
|
6522
|
-
|
|
6523
|
-
Te(
|
|
6543
|
+
z(p) || f.value ? (Y(), L("div", ca, [
|
|
6544
|
+
Te(v("textarea", {
|
|
6524
6545
|
class: "lsh-textarea lsh-result-box",
|
|
6525
6546
|
ref_key: "textBoxRef",
|
|
6526
6547
|
ref: s,
|
|
6527
|
-
"onUpdate:modelValue": G[1] || (G[1] = (M) => Et(
|
|
6548
|
+
"onUpdate:modelValue": G[1] || (G[1] = (M) => Et(p) ? p.value = M : null)
|
|
6528
6549
|
}, null, 512), [
|
|
6529
|
-
[Ne,
|
|
6550
|
+
[Ne, z(p)]
|
|
6530
6551
|
]),
|
|
6531
|
-
|
|
6532
|
-
G[7] || (G[7] =
|
|
6533
|
-
|
|
6552
|
+
v("div", da, [
|
|
6553
|
+
G[7] || (G[7] = v("span", null, "内容由AI生成,仅供参考", -1)),
|
|
6554
|
+
v("span", {
|
|
6534
6555
|
class: bn({
|
|
6535
6556
|
"red-text": w.value
|
|
6536
6557
|
})
|
|
6537
|
-
}, F(
|
|
6558
|
+
}, F(z(p).length) + "/" + F(I.value), 3)
|
|
6538
6559
|
])
|
|
6539
6560
|
])) : (Y(), L("div", ma, [
|
|
6540
|
-
|
|
6541
|
-
H(
|
|
6561
|
+
v("div", pa, [
|
|
6562
|
+
H(z(ao), {
|
|
6542
6563
|
loading: "",
|
|
6543
6564
|
text: "正在生成中,请稍候..."
|
|
6544
6565
|
})
|
|
@@ -30243,13 +30264,13 @@ const je = (e) => {
|
|
|
30243
30264
|
const g = s[h];
|
|
30244
30265
|
if (g && u === g.index) {
|
|
30245
30266
|
if (g.length === 1 && g.priority <= qn.Normal) {
|
|
30246
|
-
const
|
|
30247
|
-
g.zh =
|
|
30267
|
+
const p = r[u];
|
|
30268
|
+
g.zh = p;
|
|
30248
30269
|
let f = "";
|
|
30249
|
-
f = Mt(
|
|
30250
|
-
origin:
|
|
30270
|
+
f = Mt(p, r[u - 1], r[u + 1]), n[u] = {
|
|
30271
|
+
origin: p,
|
|
30251
30272
|
result: f,
|
|
30252
|
-
isZh: f !==
|
|
30273
|
+
isZh: f !== p,
|
|
30253
30274
|
originPinyin: f
|
|
30254
30275
|
}, u++, h++;
|
|
30255
30276
|
continue;
|
|
@@ -30257,9 +30278,9 @@ const je = (e) => {
|
|
|
30257
30278
|
const a = g.pinyin.split(" ");
|
|
30258
30279
|
let c = 0;
|
|
30259
30280
|
o && (g.zh = r.slice(g.index, g.index + g.length).join(""));
|
|
30260
|
-
for (let
|
|
30261
|
-
n[u +
|
|
30262
|
-
origin: r[
|
|
30281
|
+
for (let p = 0; p < g.length; p++)
|
|
30282
|
+
n[u + p] = {
|
|
30283
|
+
origin: r[p + g.index],
|
|
30263
30284
|
result: a[c] || "",
|
|
30264
30285
|
isZh: !0,
|
|
30265
30286
|
originPinyin: a[c] || ""
|
|
@@ -30606,53 +30627,53 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30606
30627
|
}, c = () => {
|
|
30607
30628
|
const V = s.value === "auto" ? G(u.autoPinyin) : J.value;
|
|
30608
30629
|
o.value = !1, t("confirm", V);
|
|
30609
|
-
},
|
|
30630
|
+
}, p = (V) => {
|
|
30610
30631
|
I.value.initial = V === I.value.initial ? "" : V;
|
|
30611
30632
|
}, f = (V) => {
|
|
30612
30633
|
I.value.final = V;
|
|
30613
|
-
},
|
|
30614
|
-
var
|
|
30634
|
+
}, d = (V) => {
|
|
30635
|
+
var m, C;
|
|
30615
30636
|
r.value = V;
|
|
30616
|
-
const
|
|
30617
|
-
h.value = ((
|
|
30618
|
-
}, y = (V,
|
|
30619
|
-
const
|
|
30620
|
-
|
|
30621
|
-
},
|
|
30637
|
+
const S = ((m = u.manualPinyin[V]) == null ? void 0 : m.final) ?? "";
|
|
30638
|
+
h.value = ((C = le.find((W) => W.options.includes(S))) == null ? void 0 : C.value) ?? le[0].value;
|
|
30639
|
+
}, y = (V, S) => {
|
|
30640
|
+
const m = u.autoPinyin.split(" ");
|
|
30641
|
+
m[V] = S, u.autoPinyin = m.join(" ");
|
|
30642
|
+
}, b = T(() => {
|
|
30622
30643
|
var V;
|
|
30623
|
-
return ((V = le.find((
|
|
30624
|
-
}),
|
|
30644
|
+
return ((V = le.find((S) => S.value === h.value)) == null ? void 0 : V.options) || [];
|
|
30645
|
+
}), A = T(() => s.value === "auto" ? !u.autoPinyin.length : u.manualPinyin.some((V) => !V.final)), I = T(
|
|
30625
30646
|
() => u.manualPinyin[r.value]
|
|
30626
30647
|
), w = (V) => {
|
|
30627
|
-
const
|
|
30628
|
-
return `${V.initial}${V.final}${V.final ?
|
|
30648
|
+
const S = V.tone === "0" ? "" : V.tone;
|
|
30649
|
+
return `${V.initial}${V.final}${V.final ? S : ""}`;
|
|
30629
30650
|
}, J = T(() => s.value === "auto" ? u.autoPinyin : u.manualPinyin.map(w).join(" ")), k = (V) => V.replace(/ü/g, "v").replace(/0$/, ""), G = (V) => V.trim().split(/\s+/).map(k).join(" "), M = (V) => {
|
|
30630
30651
|
try {
|
|
30631
|
-
const
|
|
30652
|
+
const S = lg(V, {
|
|
30632
30653
|
type: "all",
|
|
30633
30654
|
toneType: "num",
|
|
30634
30655
|
nonZh: "consecutive"
|
|
30635
|
-
}),
|
|
30656
|
+
}), m = hg(V, {
|
|
30636
30657
|
type: "array",
|
|
30637
30658
|
toneType: "num",
|
|
30638
30659
|
nonZh: "consecutive"
|
|
30639
30660
|
});
|
|
30640
|
-
let
|
|
30641
|
-
u.autoPinyin =
|
|
30642
|
-
if (!
|
|
30643
|
-
const
|
|
30661
|
+
let C = 0;
|
|
30662
|
+
u.autoPinyin = S.filter((W) => W.isZh && W.pinyin).map((W) => k(W.pinyin)).join(" "), u.pinyinOptions = S.reduce((W, j, x) => {
|
|
30663
|
+
if (!j.isZh || !j.pinyin) return W;
|
|
30664
|
+
const q = Array.from(
|
|
30644
30665
|
/* @__PURE__ */ new Set([
|
|
30645
|
-
k(
|
|
30646
|
-
...(
|
|
30647
|
-
(
|
|
30666
|
+
k(j.pinyin),
|
|
30667
|
+
...(m[x] || []).map(
|
|
30668
|
+
(O) => k(O)
|
|
30648
30669
|
)
|
|
30649
30670
|
])
|
|
30650
30671
|
);
|
|
30651
|
-
return
|
|
30652
|
-
text:
|
|
30653
|
-
index:
|
|
30654
|
-
options:
|
|
30655
|
-
}),
|
|
30672
|
+
return q.length > 1 && W.push({
|
|
30673
|
+
text: j.origin,
|
|
30674
|
+
index: C,
|
|
30675
|
+
options: q
|
|
30676
|
+
}), C += 1, W;
|
|
30656
30677
|
}, []);
|
|
30657
30678
|
} catch {
|
|
30658
30679
|
u.autoPinyin = "", u.pinyinOptions = [];
|
|
@@ -30660,157 +30681,157 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30660
30681
|
};
|
|
30661
30682
|
return n({
|
|
30662
30683
|
open: (V) => {
|
|
30663
|
-
u.text = V, u.autoPinyin = "", u.manualPinyin = Array.from(V, (
|
|
30664
|
-
text:
|
|
30684
|
+
u.text = V, u.autoPinyin = "", u.manualPinyin = Array.from(V, (S) => ({
|
|
30685
|
+
text: S,
|
|
30665
30686
|
initial: "",
|
|
30666
30687
|
tone: ht[4].value,
|
|
30667
30688
|
final: ""
|
|
30668
30689
|
})), r.value = 0, h.value = le[0].value, u.pinyinOptions = [], M(V), g();
|
|
30669
30690
|
}
|
|
30670
|
-
}), (V,
|
|
30691
|
+
}), (V, S) => (Y(), _(z(Oe), {
|
|
30671
30692
|
modelValue: o.value,
|
|
30672
|
-
"onUpdate:modelValue":
|
|
30693
|
+
"onUpdate:modelValue": S[4] || (S[4] = (m) => o.value = m),
|
|
30673
30694
|
width: 800,
|
|
30674
30695
|
"header-class": "lsh-modal-header"
|
|
30675
30696
|
}, {
|
|
30676
30697
|
header: N(() => [
|
|
30677
|
-
|
|
30678
|
-
|
|
30679
|
-
H(
|
|
30698
|
+
v("div", gg, [
|
|
30699
|
+
S[5] || (S[5] = v("span", { class: "lsh-title" }, "拼音标注助手", -1)),
|
|
30700
|
+
H(z(ri), {
|
|
30680
30701
|
class: "lsh-radio-group",
|
|
30681
30702
|
options: l,
|
|
30682
30703
|
modelValue: s.value,
|
|
30683
|
-
"onUpdate:modelValue":
|
|
30704
|
+
"onUpdate:modelValue": S[0] || (S[0] = (m) => s.value = m),
|
|
30684
30705
|
style: { "border-radius": "9px" }
|
|
30685
30706
|
}, null, 8, ["modelValue"])
|
|
30686
30707
|
])
|
|
30687
30708
|
]),
|
|
30688
30709
|
footer: N(() => [
|
|
30689
|
-
H(
|
|
30710
|
+
H(z(on), {
|
|
30690
30711
|
plain: "",
|
|
30691
30712
|
onClick: a
|
|
30692
30713
|
}, {
|
|
30693
|
-
default: N(() => [...
|
|
30714
|
+
default: N(() => [...S[12] || (S[12] = [
|
|
30694
30715
|
An("取消", -1)
|
|
30695
30716
|
])]),
|
|
30696
30717
|
_: 1
|
|
30697
30718
|
}),
|
|
30698
|
-
H(
|
|
30719
|
+
H(z(on), {
|
|
30699
30720
|
type: "info",
|
|
30700
30721
|
onClick: c,
|
|
30701
|
-
disabled:
|
|
30722
|
+
disabled: A.value
|
|
30702
30723
|
}, {
|
|
30703
|
-
default: N(() => [...
|
|
30724
|
+
default: N(() => [...S[13] || (S[13] = [
|
|
30704
30725
|
An(" 确认 ", -1)
|
|
30705
30726
|
])]),
|
|
30706
30727
|
_: 1
|
|
30707
30728
|
}, 8, ["disabled"])
|
|
30708
30729
|
]),
|
|
30709
30730
|
default: N(() => [
|
|
30710
|
-
|
|
30711
|
-
|
|
30712
|
-
|
|
30731
|
+
v("div", cg, [
|
|
30732
|
+
v("div", null, [
|
|
30733
|
+
S[6] || (S[6] = v("div", { class: "lsh-label" }, "拼音", -1)),
|
|
30713
30734
|
s.value === "auto" ? Te((Y(), L("input", {
|
|
30714
30735
|
key: 0,
|
|
30715
30736
|
class: "lsh-text-box",
|
|
30716
|
-
"onUpdate:modelValue":
|
|
30737
|
+
"onUpdate:modelValue": S[1] || (S[1] = (m) => u.autoPinyin = m)
|
|
30717
30738
|
}, null, 512)), [
|
|
30718
30739
|
[Ne, u.autoPinyin]
|
|
30719
30740
|
]) : (Y(), L("div", dg, F(J.value), 1))
|
|
30720
30741
|
]),
|
|
30721
30742
|
s.value === "auto" ? (Y(), L("div", mg, [
|
|
30722
|
-
|
|
30723
|
-
|
|
30743
|
+
S[8] || (S[8] = v("div", { class: "lsh-label" }, "汉字", -1)),
|
|
30744
|
+
v("div", pg, F(u.text), 1),
|
|
30724
30745
|
u.pinyinOptions.length ? (Y(), L("div", fg, [
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
(Y(!0), L(en, null, gn(u.pinyinOptions, (
|
|
30746
|
+
S[7] || (S[7] = v("div", { class: "lsh-label" }, "多音字候选", -1)),
|
|
30747
|
+
v("div", yg, [
|
|
30748
|
+
(Y(!0), L(en, null, gn(u.pinyinOptions, (m) => (Y(), L("div", {
|
|
30728
30749
|
class: "lsh-polyphonic-item",
|
|
30729
|
-
key: `${
|
|
30750
|
+
key: `${m.text}-${m.index}`
|
|
30730
30751
|
}, [
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
(Y(!0), L(en, null, gn(
|
|
30752
|
+
v("span", qg, F(m.text), 1),
|
|
30753
|
+
v("div", zg, [
|
|
30754
|
+
(Y(!0), L(en, null, gn(m.options, (C) => (Y(), L("div", {
|
|
30734
30755
|
class: bn(["lsh-polyphonic-option", {
|
|
30735
|
-
active:
|
|
30756
|
+
active: C === u.autoPinyin.split(" ")[m.index]
|
|
30736
30757
|
}]),
|
|
30737
|
-
key:
|
|
30738
|
-
onClick: (
|
|
30739
|
-
|
|
30740
|
-
|
|
30758
|
+
key: C,
|
|
30759
|
+
onClick: (W) => y(
|
|
30760
|
+
m.index,
|
|
30761
|
+
C
|
|
30741
30762
|
)
|
|
30742
|
-
}, F(
|
|
30763
|
+
}, F(C), 11, bg))), 128))
|
|
30743
30764
|
])
|
|
30744
30765
|
]))), 128))
|
|
30745
30766
|
])
|
|
30746
30767
|
])) : yn("", !0)
|
|
30747
30768
|
])) : (Y(), L(en, { key: 1 }, [
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
(Y(!0), L(en, null, gn(u.manualPinyin, (
|
|
30752
|
-
class: bn(["lsh-manual-text-item", { active:
|
|
30753
|
-
key: `${
|
|
30754
|
-
onClick: (
|
|
30769
|
+
v("div", jg, [
|
|
30770
|
+
S[9] || (S[9] = v("div", { class: "lsh-label" }, "汉字", -1)),
|
|
30771
|
+
v("div", vg, [
|
|
30772
|
+
(Y(!0), L(en, null, gn(u.manualPinyin, (m, C) => (Y(), L("div", {
|
|
30773
|
+
class: bn(["lsh-manual-text-item", { active: C === r.value }]),
|
|
30774
|
+
key: `${m.text}-${C}`,
|
|
30775
|
+
onClick: (W) => d(C)
|
|
30755
30776
|
}, [
|
|
30756
|
-
|
|
30757
|
-
|
|
30777
|
+
v("span", null, F(m.text), 1),
|
|
30778
|
+
v("span", Zg, F(w(m) || "-"), 1)
|
|
30758
30779
|
], 10, Ag))), 128))
|
|
30759
30780
|
])
|
|
30760
30781
|
]),
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
(Y(!0), L(en, null, gn(
|
|
30782
|
+
v("div", xg, [
|
|
30783
|
+
v("div", Cg, [
|
|
30784
|
+
S[10] || (S[10] = v("div", { class: "lsh-label" }, "声母", -1)),
|
|
30785
|
+
v("div", Ig, [
|
|
30786
|
+
(Y(!0), L(en, null, gn(z(Eh), (m) => (Y(), L("div", {
|
|
30766
30787
|
class: bn(["lsh-initial-btn", {
|
|
30767
|
-
active:
|
|
30788
|
+
active: m === I.value.initial
|
|
30768
30789
|
}]),
|
|
30769
|
-
key:
|
|
30770
|
-
onClick: (
|
|
30771
|
-
}, F(
|
|
30790
|
+
key: m,
|
|
30791
|
+
onClick: (C) => p(m)
|
|
30792
|
+
}, F(m), 11, Wg))), 128))
|
|
30772
30793
|
])
|
|
30773
30794
|
]),
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
H(
|
|
30795
|
+
v("div", wg, [
|
|
30796
|
+
S[11] || (S[11] = v("div", { class: "lsh-label" }, "韵母", -1)),
|
|
30797
|
+
H(z(ri), {
|
|
30777
30798
|
class: "lsh-radio-group-white",
|
|
30778
|
-
options:
|
|
30799
|
+
options: z(ht),
|
|
30779
30800
|
color: "#101114",
|
|
30780
30801
|
"active-color": "#101114",
|
|
30781
30802
|
background: "#F1F2F5",
|
|
30782
30803
|
"active-backgound": "#fff",
|
|
30783
30804
|
style: { width: "284px" },
|
|
30784
30805
|
modelValue: I.value.tone,
|
|
30785
|
-
"onUpdate:modelValue":
|
|
30806
|
+
"onUpdate:modelValue": S[2] || (S[2] = (m) => I.value.tone = m),
|
|
30786
30807
|
"slider-style": {
|
|
30787
30808
|
borderRadius: "10px",
|
|
30788
30809
|
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.10)"
|
|
30789
30810
|
}
|
|
30790
30811
|
}, null, 8, ["options", "modelValue"]),
|
|
30791
|
-
|
|
30792
|
-
H(
|
|
30812
|
+
v("div", Sg, [
|
|
30813
|
+
H(z(ri), {
|
|
30793
30814
|
class: "lsh-radio-group-white",
|
|
30794
|
-
options:
|
|
30815
|
+
options: z(le),
|
|
30795
30816
|
color: "#101114",
|
|
30796
30817
|
"active-color": "#101114",
|
|
30797
30818
|
background: "#F1F2F5",
|
|
30798
30819
|
"active-backgound": "#fff",
|
|
30799
30820
|
modelValue: h.value,
|
|
30800
|
-
"onUpdate:modelValue":
|
|
30821
|
+
"onUpdate:modelValue": S[3] || (S[3] = (m) => h.value = m),
|
|
30801
30822
|
"slider-style": {
|
|
30802
30823
|
borderRadius: "10px",
|
|
30803
30824
|
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.10)"
|
|
30804
30825
|
}
|
|
30805
30826
|
}, null, 8, ["options", "modelValue"]),
|
|
30806
|
-
|
|
30807
|
-
(Y(!0), L(en, null, gn(
|
|
30827
|
+
v("div", Og, [
|
|
30828
|
+
(Y(!0), L(en, null, gn(b.value, (m) => (Y(), L("div", {
|
|
30808
30829
|
class: bn(["lsh-final-item", {
|
|
30809
|
-
active:
|
|
30830
|
+
active: m === I.value.final
|
|
30810
30831
|
}]),
|
|
30811
|
-
key:
|
|
30812
|
-
onClick: (
|
|
30813
|
-
}, F(
|
|
30832
|
+
key: m,
|
|
30833
|
+
onClick: (C) => f(m)
|
|
30834
|
+
}, F(m), 11, Yg))), 128))
|
|
30814
30835
|
])
|
|
30815
30836
|
])
|
|
30816
30837
|
])
|
|
@@ -30842,20 +30863,20 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30842
30863
|
open: (g) => {
|
|
30843
30864
|
l.origin = g, l.new = "", s();
|
|
30844
30865
|
}
|
|
30845
|
-
}), (g, a) => (Y(), _(
|
|
30866
|
+
}), (g, a) => (Y(), _(z(Oe), {
|
|
30846
30867
|
modelValue: o.value,
|
|
30847
30868
|
"onUpdate:modelValue": a[2] || (a[2] = (c) => o.value = c),
|
|
30848
30869
|
width: 400,
|
|
30849
30870
|
"header-class": "lsh-modal-header"
|
|
30850
30871
|
}, {
|
|
30851
30872
|
header: N(() => [...a[3] || (a[3] = [
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30873
|
+
v("div", { class: "lsh-header-content" }, [
|
|
30874
|
+
v("span", { class: "lsh-title" }, "文本替换"),
|
|
30875
|
+
v("p", { class: "lsh-tip" }, " 替换的文本将保留显示,但语音合成朗读会使用替换后的内容 ")
|
|
30855
30876
|
], -1)
|
|
30856
30877
|
])]),
|
|
30857
30878
|
footer: N(() => [
|
|
30858
|
-
H(
|
|
30879
|
+
H(z(on), {
|
|
30859
30880
|
plain: "",
|
|
30860
30881
|
onClick: h
|
|
30861
30882
|
}, {
|
|
@@ -30864,7 +30885,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30864
30885
|
])]),
|
|
30865
30886
|
_: 1
|
|
30866
30887
|
}),
|
|
30867
|
-
H(
|
|
30888
|
+
H(z(on), {
|
|
30868
30889
|
type: "info",
|
|
30869
30890
|
onClick: r,
|
|
30870
30891
|
disabled: u.value
|
|
@@ -30876,18 +30897,18 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30876
30897
|
}, 8, ["disabled"])
|
|
30877
30898
|
]),
|
|
30878
30899
|
default: N(() => [
|
|
30879
|
-
|
|
30880
|
-
|
|
30881
|
-
a[4] || (a[4] =
|
|
30882
|
-
H(
|
|
30900
|
+
v("div", Vg, [
|
|
30901
|
+
v("div", null, [
|
|
30902
|
+
a[4] || (a[4] = v("div", { class: "lsh-form-item-label" }, "原文", -1)),
|
|
30903
|
+
H(z(nt), {
|
|
30883
30904
|
disabled: "",
|
|
30884
30905
|
modelValue: l.origin,
|
|
30885
30906
|
"onUpdate:modelValue": a[0] || (a[0] = (c) => l.origin = c)
|
|
30886
30907
|
}, null, 8, ["modelValue"])
|
|
30887
30908
|
]),
|
|
30888
|
-
|
|
30889
|
-
a[5] || (a[5] =
|
|
30890
|
-
H(
|
|
30909
|
+
v("div", null, [
|
|
30910
|
+
a[5] || (a[5] = v("div", { class: "lsh-form-item-label" }, "替换文本", -1)),
|
|
30911
|
+
H(z(nt), {
|
|
30891
30912
|
placeholder: "请输入",
|
|
30892
30913
|
modelValue: l.new,
|
|
30893
30914
|
"onUpdate:modelValue": a[1] || (a[1] = (c) => l.new = c)
|
|
@@ -30910,7 +30931,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30910
30931
|
emits: /* @__PURE__ */ ae(["select"], ["update:visible"]),
|
|
30911
30932
|
setup(e, { emit: n }) {
|
|
30912
30933
|
const i = Gi(e, "visible"), t = n;
|
|
30913
|
-
return (o, l) => (Y(), _(
|
|
30934
|
+
return (o, l) => (Y(), _(z(_e), {
|
|
30914
30935
|
"virtual-ref": e.virtualRef,
|
|
30915
30936
|
trigger: "click",
|
|
30916
30937
|
"virtual-triggering": "",
|
|
@@ -30921,14 +30942,14 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30921
30942
|
placement: "top"
|
|
30922
30943
|
}, {
|
|
30923
30944
|
default: N(() => [
|
|
30924
|
-
|
|
30925
|
-
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(
|
|
30945
|
+
v("div", Jg, [
|
|
30946
|
+
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(z(on), {
|
|
30926
30947
|
key: s.value,
|
|
30927
30948
|
onClick: (h) => t("select", s.value)
|
|
30928
30949
|
}, {
|
|
30929
30950
|
default: N(() => [
|
|
30930
|
-
|
|
30931
|
-
|
|
30951
|
+
v("span", null, F(s.value.toUpperCase()), 1),
|
|
30952
|
+
v("span", null, " " + F(s.label), 1)
|
|
30932
30953
|
]),
|
|
30933
30954
|
_: 2
|
|
30934
30955
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -30949,7 +30970,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30949
30970
|
emits: /* @__PURE__ */ ae(["select"], ["update:visible"]),
|
|
30950
30971
|
setup(e, { emit: n }) {
|
|
30951
30972
|
const i = Gi(e, "visible"), t = n;
|
|
30952
|
-
return (o, l) => (Y(), _(
|
|
30973
|
+
return (o, l) => (Y(), _(z(_e), {
|
|
30953
30974
|
"virtual-ref": e.virtualRef,
|
|
30954
30975
|
trigger: "click",
|
|
30955
30976
|
"virtual-triggering": "",
|
|
@@ -30960,14 +30981,14 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30960
30981
|
placement: "top"
|
|
30961
30982
|
}, {
|
|
30962
30983
|
default: N(() => [
|
|
30963
|
-
|
|
30964
|
-
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(
|
|
30984
|
+
v("div", Mg, [
|
|
30985
|
+
(Y(!0), L(en, null, gn(e.options, (s) => (Y(), _(z(on), {
|
|
30965
30986
|
key: s.label,
|
|
30966
30987
|
onClick: (h) => t("select", s.value)
|
|
30967
30988
|
}, {
|
|
30968
30989
|
default: N(() => [
|
|
30969
|
-
|
|
30970
|
-
|
|
30990
|
+
v("span", Tg, F(s.label) + ":", 1),
|
|
30991
|
+
v("span", Ng, " " + F(s.value), 1)
|
|
30971
30992
|
]),
|
|
30972
30993
|
_: 2
|
|
30973
30994
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -30989,7 +31010,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
30989
31010
|
const i = Gi(e, "visible"), t = n, o = K(), l = (s) => {
|
|
30990
31011
|
t("select", s), o.value = void 0;
|
|
30991
31012
|
};
|
|
30992
|
-
return (s, h) => (Y(), _(
|
|
31013
|
+
return (s, h) => (Y(), _(z(_e), {
|
|
30993
31014
|
"virtual-ref": e.virtualRef,
|
|
30994
31015
|
trigger: "click",
|
|
30995
31016
|
"virtual-triggering": "",
|
|
@@ -31000,8 +31021,8 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31000
31021
|
placement: "top"
|
|
31001
31022
|
}, {
|
|
31002
31023
|
default: N(() => [
|
|
31003
|
-
|
|
31004
|
-
(Y(!0), L(en, null, gn(
|
|
31024
|
+
v("div", Pg, [
|
|
31025
|
+
(Y(!0), L(en, null, gn(z(yl), (r) => (Y(), _(z(on), {
|
|
31005
31026
|
key: r.label,
|
|
31006
31027
|
onClick: (u) => l(r.value)
|
|
31007
31028
|
}, {
|
|
@@ -31010,12 +31031,12 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31010
31031
|
]),
|
|
31011
31032
|
_: 2
|
|
31012
31033
|
}, 1032, ["onClick"]))), 128)),
|
|
31013
|
-
H(
|
|
31034
|
+
H(z(on), {
|
|
31014
31035
|
onClick: h[2] || (h[2] = bi((r) => o.value && l(o.value), ["stop"]))
|
|
31015
31036
|
}, {
|
|
31016
31037
|
default: N(() => [
|
|
31017
|
-
h[4] || (h[4] =
|
|
31018
|
-
H(
|
|
31038
|
+
h[4] || (h[4] = v("span", null, "停顿", -1)),
|
|
31039
|
+
H(z(kl), {
|
|
31019
31040
|
modelValue: o.value,
|
|
31020
31041
|
"onUpdate:modelValue": h[0] || (h[0] = (r) => o.value = r),
|
|
31021
31042
|
min: 0.1,
|
|
@@ -31025,7 +31046,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31025
31046
|
onClick: h[1] || (h[1] = bi(() => {
|
|
31026
31047
|
}, ["stop"]))
|
|
31027
31048
|
}, null, 8, ["modelValue"]),
|
|
31028
|
-
h[5] || (h[5] =
|
|
31049
|
+
h[5] || (h[5] = v("span", null, "秒", -1))
|
|
31029
31050
|
]),
|
|
31030
31051
|
_: 1
|
|
31031
31052
|
})
|
|
@@ -31047,15 +31068,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31047
31068
|
s.value = !s.value;
|
|
31048
31069
|
}, c = () => {
|
|
31049
31070
|
u == null || u.abort(), a();
|
|
31050
|
-
},
|
|
31051
|
-
const
|
|
31052
|
-
if (!(!
|
|
31071
|
+
}, p = async () => {
|
|
31072
|
+
const d = h.value[0], y = l.value.parseDocument;
|
|
31073
|
+
if (!(!d || !y)) {
|
|
31053
31074
|
r.value = !0, u == null || u.abort(), u = new AbortController();
|
|
31054
31075
|
try {
|
|
31055
|
-
const
|
|
31056
|
-
t("confirm",
|
|
31057
|
-
} catch (
|
|
31058
|
-
|
|
31076
|
+
const b = await y(d, u.signal);
|
|
31077
|
+
t("confirm", b), a();
|
|
31078
|
+
} catch (b) {
|
|
31079
|
+
b instanceof Error && b.name === "AbortError" || o("error", "解析失败");
|
|
31059
31080
|
} finally {
|
|
31060
31081
|
r.value = !1, u = null;
|
|
31061
31082
|
}
|
|
@@ -31065,15 +31086,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31065
31086
|
open: () => {
|
|
31066
31087
|
a();
|
|
31067
31088
|
}
|
|
31068
|
-
}), Se(() => u == null ? void 0 : u.abort()), (
|
|
31089
|
+
}), Se(() => u == null ? void 0 : u.abort()), (d, y) => (Y(), _(z(Oe), {
|
|
31069
31090
|
modelValue: s.value,
|
|
31070
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
31091
|
+
"onUpdate:modelValue": y[1] || (y[1] = (b) => s.value = b),
|
|
31071
31092
|
width: 800,
|
|
31072
31093
|
title: "上传文稿",
|
|
31073
31094
|
"modal-class": "word-upload-modal"
|
|
31074
31095
|
}, {
|
|
31075
31096
|
footer: N(() => [
|
|
31076
|
-
H(
|
|
31097
|
+
H(z(on), {
|
|
31077
31098
|
plain: "",
|
|
31078
31099
|
onClick: c
|
|
31079
31100
|
}, {
|
|
@@ -31082,9 +31103,9 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31082
31103
|
])]),
|
|
31083
31104
|
_: 1
|
|
31084
31105
|
}),
|
|
31085
|
-
H(
|
|
31106
|
+
H(z(on), {
|
|
31086
31107
|
type: "info",
|
|
31087
|
-
onClick:
|
|
31108
|
+
onClick: p,
|
|
31088
31109
|
disabled: f.value,
|
|
31089
31110
|
loading: r.value
|
|
31090
31111
|
}, {
|
|
@@ -31095,7 +31116,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31095
31116
|
}, 8, ["disabled", "loading"])
|
|
31096
31117
|
]),
|
|
31097
31118
|
default: N(() => [
|
|
31098
|
-
|
|
31119
|
+
v("div", Dg, [
|
|
31099
31120
|
H(Fh, {
|
|
31100
31121
|
class: "lsh-audio-upload",
|
|
31101
31122
|
accept: [".txt", ".docx"],
|
|
@@ -31104,13 +31125,13 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31104
31125
|
tip: "支持 TXT、DOCX 格式,大小不超过 3 MB",
|
|
31105
31126
|
ref: "uploadRef",
|
|
31106
31127
|
modelValue: h.value,
|
|
31107
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
31128
|
+
"onUpdate:modelValue": y[0] || (y[0] = (b) => h.value = b)
|
|
31108
31129
|
}, null, 8, ["modelValue"]),
|
|
31109
|
-
|
|
31110
|
-
y[2] || (y[2] =
|
|
31111
|
-
(Y(), L(en, null, gn(g, (
|
|
31112
|
-
|
|
31113
|
-
|
|
31130
|
+
v("div", Bg, [
|
|
31131
|
+
y[2] || (y[2] = v("div", { class: "lsh-title" }, "注意事项:", -1)),
|
|
31132
|
+
(Y(), L(en, null, gn(g, (b, A) => v("div", Qg, [
|
|
31133
|
+
v("span", null, F(A + 1) + ".", 1),
|
|
31134
|
+
v("span", null, F(b), 1)
|
|
31114
31135
|
])), 64))
|
|
31115
31136
|
])
|
|
31116
31137
|
])
|
|
@@ -31125,189 +31146,189 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31125
31146
|
customStop: !1,
|
|
31126
31147
|
language: !1,
|
|
31127
31148
|
number: !1
|
|
31128
|
-
}), u = K(), g = K(), a = K(), c = K(),
|
|
31149
|
+
}), u = K(), g = K(), a = K(), c = K(), p = K(), {
|
|
31129
31150
|
toolList: f,
|
|
31130
|
-
languageOptions:
|
|
31151
|
+
languageOptions: d,
|
|
31131
31152
|
numberToTextList: y,
|
|
31132
|
-
isToolDisabled:
|
|
31133
|
-
insertCustomStop:
|
|
31153
|
+
isToolDisabled: b,
|
|
31154
|
+
insertCustomStop: A,
|
|
31134
31155
|
setLanguage: I,
|
|
31135
31156
|
replaceText: w,
|
|
31136
31157
|
markPinyin: J
|
|
31137
31158
|
} = qr({
|
|
31138
31159
|
editorContext: n,
|
|
31139
31160
|
openModal: {
|
|
31140
|
-
pinyin: (
|
|
31141
|
-
var
|
|
31142
|
-
return (
|
|
31161
|
+
pinyin: (q) => {
|
|
31162
|
+
var O;
|
|
31163
|
+
return (O = g.value) == null ? void 0 : O.open(q);
|
|
31143
31164
|
},
|
|
31144
|
-
replace: (
|
|
31145
|
-
var
|
|
31146
|
-
return (
|
|
31165
|
+
replace: (q) => {
|
|
31166
|
+
var O;
|
|
31167
|
+
return (O = u.value) == null ? void 0 : O.open(q);
|
|
31147
31168
|
},
|
|
31148
|
-
formula: (
|
|
31149
|
-
var
|
|
31150
|
-
return (
|
|
31169
|
+
formula: (q) => {
|
|
31170
|
+
var O;
|
|
31171
|
+
return (O = c.value) == null ? void 0 : O.open(q);
|
|
31151
31172
|
},
|
|
31152
31173
|
aiRewrite: () => {
|
|
31153
|
-
var
|
|
31154
|
-
return (
|
|
31174
|
+
var q;
|
|
31175
|
+
return (q = p.value) == null ? void 0 : q.open();
|
|
31155
31176
|
},
|
|
31156
31177
|
upload: () => {
|
|
31157
|
-
var
|
|
31158
|
-
return (
|
|
31178
|
+
var q;
|
|
31179
|
+
return (q = a.value) == null ? void 0 : q.open();
|
|
31159
31180
|
}
|
|
31160
31181
|
}
|
|
31161
31182
|
}), { visibleList: k, hiddenList: G } = sa({
|
|
31162
31183
|
list: f,
|
|
31163
31184
|
toolbarRef: t,
|
|
31164
31185
|
measureRef: o
|
|
31165
|
-
}), M = (
|
|
31166
|
-
if (!
|
|
31167
|
-
const X =
|
|
31168
|
-
X && l.value.set(
|
|
31186
|
+
}), M = (q, O) => {
|
|
31187
|
+
if (!q || q instanceof Element) return;
|
|
31188
|
+
const X = q.getVirtualRef();
|
|
31189
|
+
X && l.value.set(O, X);
|
|
31169
31190
|
}, V = /* @__PURE__ */ new Set([
|
|
31170
31191
|
P.customStop.type,
|
|
31171
31192
|
P.language.type,
|
|
31172
31193
|
P.number.type
|
|
31173
|
-
]),
|
|
31174
|
-
var
|
|
31175
|
-
|
|
31176
|
-
},
|
|
31177
|
-
q
|
|
31178
|
-
},
|
|
31179
|
-
|
|
31180
|
-
},
|
|
31181
|
-
I(
|
|
31182
|
-
},
|
|
31183
|
-
w(
|
|
31184
|
-
},
|
|
31185
|
-
return cn(G, (
|
|
31186
|
-
|
|
31187
|
-
}), (
|
|
31194
|
+
]), S = (q) => {
|
|
31195
|
+
var O;
|
|
31196
|
+
b(q) || ((O = q.onClick) == null || O.call(q), s.value = q.tool.type);
|
|
31197
|
+
}, m = (q) => {
|
|
31198
|
+
S(q), V.has(q.tool.type) || (h.value = !1);
|
|
31199
|
+
}, C = (q) => {
|
|
31200
|
+
A(q), r.customStop = !1;
|
|
31201
|
+
}, W = (q) => {
|
|
31202
|
+
I(q) && (r.language = !1);
|
|
31203
|
+
}, j = (q) => {
|
|
31204
|
+
w(q), r.number = !1;
|
|
31205
|
+
}, x = (q) => s.value !== q || !r[q];
|
|
31206
|
+
return cn(G, (q) => {
|
|
31207
|
+
q.length || (h.value = !1);
|
|
31208
|
+
}), (q, O) => (Y(), L("div", {
|
|
31188
31209
|
ref_key: "toolbarRef",
|
|
31189
31210
|
ref: t,
|
|
31190
31211
|
class: "lsh-toolbar-box"
|
|
31191
31212
|
}, [
|
|
31192
|
-
(Y(!0), L(en, null, gn(
|
|
31193
|
-
key:
|
|
31213
|
+
(Y(!0), L(en, null, gn(z(k), (Z) => (Y(), _(yi, {
|
|
31214
|
+
key: Z.tool.label,
|
|
31194
31215
|
ref_for: !0,
|
|
31195
|
-
ref: (X) => M(X,
|
|
31216
|
+
ref: (X) => M(X, Z.tool.type),
|
|
31196
31217
|
class: "lsh-tool-btn",
|
|
31197
|
-
item:
|
|
31198
|
-
plain:
|
|
31199
|
-
disabled: b
|
|
31200
|
-
onClick: (X) =>
|
|
31218
|
+
item: Z,
|
|
31219
|
+
plain: x(Z.tool.type),
|
|
31220
|
+
disabled: z(b)(Z),
|
|
31221
|
+
onClick: (X) => S(Z)
|
|
31201
31222
|
}, null, 8, ["item", "plain", "disabled", "onClick"]))), 128)),
|
|
31202
|
-
|
|
31223
|
+
z(G).length ? (Y(), _(z(_e), {
|
|
31203
31224
|
key: 0,
|
|
31204
31225
|
visible: h.value,
|
|
31205
|
-
"onUpdate:visible":
|
|
31226
|
+
"onUpdate:visible": O[0] || (O[0] = (Z) => h.value = Z),
|
|
31206
31227
|
"show-arrow": !1,
|
|
31207
31228
|
"popper-class": "lsh-popper lsh-more-popper",
|
|
31208
31229
|
placement: "top-end",
|
|
31209
31230
|
transition: "popper-slide"
|
|
31210
31231
|
}, {
|
|
31211
31232
|
reference: N(() => [
|
|
31212
|
-
H(
|
|
31233
|
+
H(z(on), {
|
|
31213
31234
|
class: "lsh-tool-btn",
|
|
31214
31235
|
plain: !h.value
|
|
31215
31236
|
}, {
|
|
31216
31237
|
icon: N(() => [
|
|
31217
|
-
H(
|
|
31238
|
+
H(z(rn), {
|
|
31218
31239
|
name: "editor-more",
|
|
31219
31240
|
size: "18"
|
|
31220
31241
|
})
|
|
31221
31242
|
]),
|
|
31222
31243
|
default: N(() => [
|
|
31223
|
-
|
|
31244
|
+
O[4] || (O[4] = v("span", null, "更多", -1))
|
|
31224
31245
|
]),
|
|
31225
31246
|
_: 1
|
|
31226
31247
|
}, 8, ["plain"])
|
|
31227
31248
|
]),
|
|
31228
31249
|
default: N(() => [
|
|
31229
|
-
|
|
31230
|
-
(Y(!0), L(en, null, gn(
|
|
31231
|
-
key:
|
|
31250
|
+
v("div", nc, [
|
|
31251
|
+
(Y(!0), L(en, null, gn(z(G), (Z) => (Y(), _(yi, {
|
|
31252
|
+
key: Z.tool.label,
|
|
31232
31253
|
ref_for: !0,
|
|
31233
|
-
ref: (X) => M(X,
|
|
31254
|
+
ref: (X) => M(X, Z.tool.type),
|
|
31234
31255
|
class: "lsh-more-item",
|
|
31235
|
-
item:
|
|
31236
|
-
plain:
|
|
31237
|
-
disabled: b
|
|
31238
|
-
onClick: (X) =>
|
|
31256
|
+
item: Z,
|
|
31257
|
+
plain: x(Z.tool.type),
|
|
31258
|
+
disabled: z(b)(Z),
|
|
31259
|
+
onClick: (X) => m(Z)
|
|
31239
31260
|
}, null, 8, ["item", "plain", "disabled", "onClick"]))), 128))
|
|
31240
31261
|
])
|
|
31241
31262
|
]),
|
|
31242
31263
|
_: 1
|
|
31243
31264
|
}, 8, ["visible"])) : yn("", !0),
|
|
31244
|
-
|
|
31265
|
+
v("div", {
|
|
31245
31266
|
ref_key: "measureRef",
|
|
31246
31267
|
ref: o,
|
|
31247
31268
|
class: "lsh-toolbar-measure"
|
|
31248
31269
|
}, [
|
|
31249
|
-
(Y(!0), L(en, null, gn(
|
|
31250
|
-
key:
|
|
31270
|
+
(Y(!0), L(en, null, gn(z(f), (Z) => (Y(), _(yi, {
|
|
31271
|
+
key: Z.tool.label,
|
|
31251
31272
|
class: "lsh-tool-btn",
|
|
31252
|
-
item:
|
|
31273
|
+
item: Z
|
|
31253
31274
|
}, null, 8, ["item"]))), 128)),
|
|
31254
|
-
H(
|
|
31275
|
+
H(z(on), { class: "lsh-tool-btn" }, {
|
|
31255
31276
|
icon: N(() => [
|
|
31256
|
-
H(
|
|
31277
|
+
H(z(rn), {
|
|
31257
31278
|
name: "editor-more",
|
|
31258
31279
|
size: "18"
|
|
31259
31280
|
})
|
|
31260
31281
|
]),
|
|
31261
31282
|
default: N(() => [
|
|
31262
|
-
|
|
31283
|
+
O[5] || (O[5] = v("span", null, "更多", -1))
|
|
31263
31284
|
]),
|
|
31264
31285
|
_: 1
|
|
31265
31286
|
})
|
|
31266
31287
|
], 512),
|
|
31267
31288
|
H(Eg, {
|
|
31268
31289
|
visible: r.customStop,
|
|
31269
|
-
"onUpdate:visible":
|
|
31270
|
-
"virtual-ref": l.value.get(
|
|
31271
|
-
onSelect:
|
|
31290
|
+
"onUpdate:visible": O[1] || (O[1] = (Z) => r.customStop = Z),
|
|
31291
|
+
"virtual-ref": l.value.get(z(P).customStop.type),
|
|
31292
|
+
onSelect: C
|
|
31272
31293
|
}, null, 8, ["visible", "virtual-ref"]),
|
|
31273
31294
|
H(Lg, {
|
|
31274
31295
|
visible: r.language,
|
|
31275
|
-
"onUpdate:visible":
|
|
31276
|
-
"virtual-ref": l.value.get(
|
|
31277
|
-
options:
|
|
31278
|
-
onSelect:
|
|
31296
|
+
"onUpdate:visible": O[2] || (O[2] = (Z) => r.language = Z),
|
|
31297
|
+
"virtual-ref": l.value.get(z(P).language.type),
|
|
31298
|
+
options: z(d),
|
|
31299
|
+
onSelect: W
|
|
31279
31300
|
}, null, 8, ["visible", "virtual-ref", "options"]),
|
|
31280
31301
|
H(Fg, {
|
|
31281
31302
|
visible: r.number,
|
|
31282
|
-
"onUpdate:visible":
|
|
31283
|
-
"virtual-ref": l.value.get(
|
|
31284
|
-
options:
|
|
31285
|
-
onSelect:
|
|
31303
|
+
"onUpdate:visible": O[3] || (O[3] = (Z) => r.number = Z),
|
|
31304
|
+
"virtual-ref": l.value.get(z(P).number.type),
|
|
31305
|
+
options: z(y),
|
|
31306
|
+
onSelect: j
|
|
31286
31307
|
}, null, 8, ["visible", "virtual-ref", "options"]),
|
|
31287
31308
|
H(Xg, {
|
|
31288
31309
|
ref_key: "replaceTextModalRef",
|
|
31289
31310
|
ref: u,
|
|
31290
|
-
onConfirm:
|
|
31311
|
+
onConfirm: z(w)
|
|
31291
31312
|
}, null, 8, ["onConfirm"]),
|
|
31292
31313
|
H(Kg, {
|
|
31293
31314
|
ref_key: "markPinyinModalRef",
|
|
31294
31315
|
ref: g,
|
|
31295
|
-
onConfirm:
|
|
31316
|
+
onConfirm: z(J)
|
|
31296
31317
|
}, null, 8, ["onConfirm"]),
|
|
31297
31318
|
H($g, {
|
|
31298
31319
|
ref_key: "uploadModalRef",
|
|
31299
31320
|
ref: a,
|
|
31300
|
-
onConfirm:
|
|
31321
|
+
onConfirm: z(i)
|
|
31301
31322
|
}, null, 8, ["onConfirm"]),
|
|
31302
31323
|
H(ya, {
|
|
31303
31324
|
ref_key: "formulaModalRef",
|
|
31304
31325
|
ref: c,
|
|
31305
|
-
onConfirm:
|
|
31326
|
+
onConfirm: z(w)
|
|
31306
31327
|
}, null, 8, ["onConfirm"]),
|
|
31307
31328
|
H(na, {
|
|
31308
31329
|
ref_key: "aiRewriteModalRef",
|
|
31309
|
-
ref:
|
|
31310
|
-
onConfirm:
|
|
31330
|
+
ref: p,
|
|
31331
|
+
onConfirm: z(i)
|
|
31311
31332
|
}, null, 8, ["onConfirm"])
|
|
31312
31333
|
], 512));
|
|
31313
31334
|
}
|
|
@@ -31322,6 +31343,7 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31322
31343
|
features: { default: () => ({}) },
|
|
31323
31344
|
services: { default: () => ({}) },
|
|
31324
31345
|
getPreviewParams: {},
|
|
31346
|
+
getPlaybackSpeed: {},
|
|
31325
31347
|
showSelectionMenu: { type: Boolean, default: !0 },
|
|
31326
31348
|
showFullscreen: { type: Boolean, default: !0 }
|
|
31327
31349
|
},
|
|
@@ -31337,13 +31359,13 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31337
31359
|
return cn(
|
|
31338
31360
|
() => t.modelValue,
|
|
31339
31361
|
(a) => {
|
|
31340
|
-
var
|
|
31362
|
+
var p;
|
|
31341
31363
|
const c = Pt(a);
|
|
31342
31364
|
if (c === h) {
|
|
31343
31365
|
h = void 0;
|
|
31344
31366
|
return;
|
|
31345
31367
|
}
|
|
31346
|
-
(
|
|
31368
|
+
(p = s.value) == null || p.setContent(c);
|
|
31347
31369
|
}
|
|
31348
31370
|
), n({
|
|
31349
31371
|
clear: () => {
|
|
@@ -31367,10 +31389,10 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31367
31389
|
return (c = s.value) == null ? void 0 : c.replaceText(a);
|
|
31368
31390
|
},
|
|
31369
31391
|
handleChangeVoice: (a, c) => {
|
|
31370
|
-
var
|
|
31371
|
-
return ((
|
|
31392
|
+
var p;
|
|
31393
|
+
return ((p = s.value) == null ? void 0 : p.handleChangeVoice(a, c)) ?? Promise.resolve(!1);
|
|
31372
31394
|
}
|
|
31373
|
-
}), (a, c) => (Y(), _(
|
|
31395
|
+
}), (a, c) => (Y(), _(z(Xu), {
|
|
31374
31396
|
ref_key: "rootRef",
|
|
31375
31397
|
ref: s,
|
|
31376
31398
|
"initial-content": t.modelValue,
|
|
@@ -31381,14 +31403,15 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31381
31403
|
features: t.features,
|
|
31382
31404
|
services: t.services,
|
|
31383
31405
|
"get-preview-params": t.getPreviewParams,
|
|
31406
|
+
"get-playback-speed": t.getPlaybackSpeed,
|
|
31384
31407
|
"show-selection-menu": t.showSelectionMenu,
|
|
31385
31408
|
onChange: r,
|
|
31386
31409
|
onReady: u
|
|
31387
31410
|
}, {
|
|
31388
31411
|
default: N(() => {
|
|
31389
|
-
var
|
|
31412
|
+
var p, f, d, y, b, A, I;
|
|
31390
31413
|
return [
|
|
31391
|
-
|
|
31414
|
+
v("div", {
|
|
31392
31415
|
class: bn([
|
|
31393
31416
|
"tts-rich-text-editor lsh-tts-box",
|
|
31394
31417
|
{
|
|
@@ -31397,10 +31420,10 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31397
31420
|
}
|
|
31398
31421
|
])
|
|
31399
31422
|
}, [
|
|
31400
|
-
|
|
31401
|
-
|
|
31423
|
+
v("div", tc, [
|
|
31424
|
+
v("div", oc, [
|
|
31402
31425
|
wn(a.$slots, "toolbar-before", {
|
|
31403
|
-
editor: (
|
|
31426
|
+
editor: (p = s.value) == null ? void 0 : p.editor
|
|
31404
31427
|
}, void 0, !0),
|
|
31405
31428
|
H(ic),
|
|
31406
31429
|
wn(a.$slots, "toolbar-after", {
|
|
@@ -31413,26 +31436,26 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31413
31436
|
title: l.value ? "退出全屏" : "全屏编辑",
|
|
31414
31437
|
onClick: c[0] || (c[0] = (w) => l.value = !l.value)
|
|
31415
31438
|
}, [
|
|
31416
|
-
H(
|
|
31439
|
+
H(z(rn), {
|
|
31417
31440
|
name: `editor-fullscreen-${l.value ? "shrink" : "expand"}`,
|
|
31418
31441
|
size: "20"
|
|
31419
31442
|
}, null, 8, ["name"])
|
|
31420
31443
|
], 8, lc)) : yn("", !0)
|
|
31421
31444
|
]),
|
|
31422
|
-
|
|
31423
|
-
H(
|
|
31445
|
+
v("div", sc, [
|
|
31446
|
+
H(z(vr), { class: "editor-shell" }),
|
|
31424
31447
|
wn(a.$slots, "editor-after", {
|
|
31425
|
-
editor: (
|
|
31448
|
+
editor: (d = s.value) == null ? void 0 : d.editor
|
|
31426
31449
|
}, void 0, !0)
|
|
31427
31450
|
]),
|
|
31428
|
-
|
|
31451
|
+
v("div", hc, [
|
|
31429
31452
|
wn(a.$slots, "footer-before", {
|
|
31430
31453
|
editor: (y = s.value) == null ? void 0 : y.editor,
|
|
31431
|
-
textLength: ((
|
|
31454
|
+
textLength: ((b = s.value) == null ? void 0 : b.textLength) ?? 0
|
|
31432
31455
|
}, void 0, !0),
|
|
31433
31456
|
H(la),
|
|
31434
31457
|
wn(a.$slots, "footer-after", {
|
|
31435
|
-
editor: (
|
|
31458
|
+
editor: (A = s.value) == null ? void 0 : A.editor,
|
|
31436
31459
|
textLength: ((I = s.value) == null ? void 0 : I.textLength) ?? 0
|
|
31437
31460
|
}, void 0, !0)
|
|
31438
31461
|
])
|
|
@@ -31441,9 +31464,9 @@ const gg = { class: "lsh-header-content" }, cg = { class: "lsh-content-box" }, d
|
|
|
31441
31464
|
];
|
|
31442
31465
|
}),
|
|
31443
31466
|
_: 3
|
|
31444
|
-
}, 8, ["initial-content", "text-limit", "voice-version", "placeholder", "disabled", "features", "services", "get-preview-params", "show-selection-menu"]));
|
|
31467
|
+
}, 8, ["initial-content", "text-limit", "voice-version", "placeholder", "disabled", "features", "services", "get-preview-params", "get-playback-speed", "show-selection-menu"]));
|
|
31445
31468
|
}
|
|
31446
|
-
}), yc = /* @__PURE__ */ sn(rc, [["__scopeId", "data-v-
|
|
31469
|
+
}), yc = /* @__PURE__ */ sn(rc, [["__scopeId", "data-v-3ed36f16"]]);
|
|
31447
31470
|
export {
|
|
31448
31471
|
ce as CustomTagName,
|
|
31449
31472
|
on as CxButton,
|