@ibiz-template-plugin/ai-chat 0.0.93 → 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +702 -692
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +11 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +10 -2
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,16 +2,16 @@ import './style.css';
|
|
|
2
2
|
var Ef = Object.defineProperty;
|
|
3
3
|
var Af = (n, e, t) => e in n ? Ef(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
4
|
var _ = (n, e, t) => (Af(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
-
import
|
|
5
|
+
import Nr from "interactjs";
|
|
6
6
|
import so from "cherry-markdown";
|
|
7
7
|
import { isUndefined as If, cloneDeep as Fc } from "lodash-es";
|
|
8
8
|
import { QXEvent as Of } from "qx-util";
|
|
9
|
-
var
|
|
9
|
+
var ci = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, _n = function(n) {
|
|
10
10
|
return n && n.Math === Math && n;
|
|
11
11
|
}, Ue = (
|
|
12
12
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
13
13
|
_n(typeof globalThis == "object" && globalThis) || _n(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
14
|
-
_n(typeof self == "object" && self) || _n(typeof
|
|
14
|
+
_n(typeof self == "object" && self) || _n(typeof ci == "object" && ci) || _n(typeof ci == "object" && ci) || // eslint-disable-next-line no-new-func -- fallback
|
|
15
15
|
function() {
|
|
16
16
|
return this;
|
|
17
17
|
}() || Function("return this")()
|
|
@@ -29,8 +29,8 @@ var ui = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
29
29
|
var n = (function() {
|
|
30
30
|
}).bind();
|
|
31
31
|
return typeof n != "function" || n.hasOwnProperty("prototype");
|
|
32
|
-
}), Rf = ao,
|
|
33
|
-
return
|
|
32
|
+
}), Rf = ao, ui = Function.prototype.call, lo = Rf ? ui.bind(ui) : function() {
|
|
33
|
+
return ui.apply(ui, arguments);
|
|
34
34
|
}, Vc = {}, Hc = {}.propertyIsEnumerable, jc = Object.getOwnPropertyDescriptor, Pf = jc && !Hc.call({ 1: 2 }, 1);
|
|
35
35
|
Vc.f = Pf ? function(e) {
|
|
36
36
|
var t = jc(this, e);
|
|
@@ -43,38 +43,38 @@ var Wc = function(n, e) {
|
|
|
43
43
|
writable: !(n & 4),
|
|
44
44
|
value: e
|
|
45
45
|
};
|
|
46
|
-
}, Uc = ao, qc = Function.prototype,
|
|
46
|
+
}, Uc = ao, qc = Function.prototype, ws = qc.call, Lf = Uc && qc.bind.bind(ws, ws), Xe = Uc ? Lf : function(n) {
|
|
47
47
|
return function() {
|
|
48
|
-
return
|
|
48
|
+
return ws.apply(n, arguments);
|
|
49
49
|
};
|
|
50
50
|
}, Kc = Xe, zf = Kc({}.toString), Bf = Kc("".slice), Jc = function(n) {
|
|
51
51
|
return Bf(zf(n), 8, -1);
|
|
52
|
-
}, Ff = Xe, Vf = Tt, Hf = Jc,
|
|
53
|
-
return !
|
|
52
|
+
}, Ff = Xe, Vf = Tt, Hf = Jc, Er = Object, jf = Ff("".split), Gc = Vf(function() {
|
|
53
|
+
return !Er("z").propertyIsEnumerable(0);
|
|
54
54
|
}) ? function(n) {
|
|
55
|
-
return Hf(n) === "String" ? jf(n, "") :
|
|
56
|
-
} :
|
|
55
|
+
return Hf(n) === "String" ? jf(n, "") : Er(n);
|
|
56
|
+
} : Er, Xc = function(n) {
|
|
57
57
|
return n == null;
|
|
58
58
|
}, Wf = Xc, Uf = TypeError, Yc = function(n) {
|
|
59
59
|
if (Wf(n))
|
|
60
60
|
throw new Uf("Can't call method on " + n);
|
|
61
61
|
return n;
|
|
62
|
-
}, qf = Gc, Kf = Yc,
|
|
62
|
+
}, qf = Gc, Kf = Yc, ar = function(n) {
|
|
63
63
|
return qf(Kf(n));
|
|
64
|
-
},
|
|
65
|
-
return typeof n == "function" || n ===
|
|
64
|
+
}, Ar = typeof document == "object" && document.all, nt = typeof Ar > "u" && Ar !== void 0 ? function(n) {
|
|
65
|
+
return typeof n == "function" || n === Ar;
|
|
66
66
|
} : function(n) {
|
|
67
67
|
return typeof n == "function";
|
|
68
|
-
}, Jf = nt,
|
|
68
|
+
}, Jf = nt, Qn = function(n) {
|
|
69
69
|
return typeof n == "object" ? n !== null : Jf(n);
|
|
70
|
-
},
|
|
70
|
+
}, Ir = Ue, Gf = nt, Xf = function(n) {
|
|
71
71
|
return Gf(n) ? n : void 0;
|
|
72
72
|
}, co = function(n, e) {
|
|
73
|
-
return arguments.length < 2 ? Xf(
|
|
74
|
-
}, Yf = Xe, Zf = Yf({}.isPrototypeOf), Qf = Ue, aa = Qf.navigator, la = aa && aa.userAgent, ep = la ? String(la) : "", Zc = Ue,
|
|
75
|
-
ha && (Ke = ha.split("."),
|
|
76
|
-
!
|
|
77
|
-
var tp =
|
|
73
|
+
return arguments.length < 2 ? Xf(Ir[n]) : Ir[n] && Ir[n][e];
|
|
74
|
+
}, Yf = Xe, Zf = Yf({}.isPrototypeOf), Qf = Ue, aa = Qf.navigator, la = aa && aa.userAgent, ep = la ? String(la) : "", Zc = Ue, Or = ep, ca = Zc.process, ua = Zc.Deno, da = ca && ca.versions || ua && ua.version, ha = da && da.v8, Ke, zi;
|
|
75
|
+
ha && (Ke = ha.split("."), zi = Ke[0] > 0 && Ke[0] < 4 ? 1 : +(Ke[0] + Ke[1]));
|
|
76
|
+
!zi && Or && (Ke = Or.match(/Edge\/(\d+)/), (!Ke || Ke[1] >= 74) && (Ke = Or.match(/Chrome\/(\d+)/), Ke && (zi = +Ke[1])));
|
|
77
|
+
var tp = zi, fa = tp, np = Tt, ip = Ue, rp = ip.String, Qc = !!Object.getOwnPropertySymbols && !np(function() {
|
|
78
78
|
var n = Symbol("symbol detection");
|
|
79
79
|
return !rp(n) || !(Object(n) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
80
80
|
!Symbol.sham && fa && fa < 41;
|
|
@@ -96,9 +96,9 @@ var tp = Bi, fa = tp, np = Tt, ip = Ue, rp = ip.String, Qc = !!Object.getOwnProp
|
|
|
96
96
|
}, gp = nu, vp = Xc, yp = function(n, e) {
|
|
97
97
|
var t = n[e];
|
|
98
98
|
return vp(t) ? void 0 : gp(t);
|
|
99
|
-
},
|
|
99
|
+
}, Dr = lo, $r = nt, Rr = Qn, bp = TypeError, wp = function(n, e) {
|
|
100
100
|
var t, i;
|
|
101
|
-
if (e === "string" &&
|
|
101
|
+
if (e === "string" && $r(t = n.toString) && !Rr(i = Dr(t, n)) || $r(t = n.valueOf) && !Rr(i = Dr(t, n)) || e !== "string" && $r(t = n.toString) && !Rr(i = Dr(t, n)))
|
|
102
102
|
return i;
|
|
103
103
|
throw new bp("Can't convert object to primitive value");
|
|
104
104
|
}, iu = { exports: {} }, pa = Ue, Cp = Object.defineProperty, uo = function(n, e) {
|
|
@@ -124,9 +124,9 @@ var ho = iu.exports, va = ho, ru = function(n, e) {
|
|
|
124
124
|
return Np(_p(e), t);
|
|
125
125
|
}, Ep = Xe, Ap = 0, Ip = Math.random(), Op = Ep(1.1.toString), ou = function(n) {
|
|
126
126
|
return "Symbol(" + (n === void 0 ? "" : n) + ")_" + Op(++Ap + Ip, 36);
|
|
127
|
-
}, Dp = Ue, $p = ru, ya = Kt, Rp = ou, Pp = Qc, Lp = eu, ln = Dp.Symbol,
|
|
128
|
-
return ya(
|
|
129
|
-
}, Bp = lo, ba =
|
|
127
|
+
}, Dp = Ue, $p = ru, ya = Kt, Rp = ou, Pp = Qc, Lp = eu, ln = Dp.Symbol, Pr = $p("wks"), zp = Lp ? ln.for || ln : ln && ln.withoutSetter || Rp, au = function(n) {
|
|
128
|
+
return ya(Pr, n) || (Pr[n] = Pp && ya(ln, n) ? ln[n] : zp("Symbol." + n)), Pr[n];
|
|
129
|
+
}, Bp = lo, ba = Qn, wa = tu, Fp = yp, Vp = wp, Hp = au, jp = TypeError, Wp = Hp("toPrimitive"), Up = function(n, e) {
|
|
130
130
|
if (!ba(n) || wa(n))
|
|
131
131
|
return n;
|
|
132
132
|
var t = Fp(n, Wp), i;
|
|
@@ -139,15 +139,15 @@ var ho = iu.exports, va = ho, ru = function(n, e) {
|
|
|
139
139
|
}, qp = Up, Kp = tu, lu = function(n) {
|
|
140
140
|
var e = qp(n, "string");
|
|
141
141
|
return Kp(e) ? e : e + "";
|
|
142
|
-
}, Jp = Ue, Ca =
|
|
143
|
-
return Gp ?
|
|
142
|
+
}, Jp = Ue, Ca = Qn, Cs = Jp.document, Gp = Ca(Cs) && Ca(Cs.createElement), cu = function(n) {
|
|
143
|
+
return Gp ? Cs.createElement(n) : {};
|
|
144
144
|
}, Xp = Mt, Yp = Tt, Zp = cu, uu = !Xp && !Yp(function() {
|
|
145
145
|
return Object.defineProperty(Zp("div"), "a", {
|
|
146
146
|
get: function() {
|
|
147
147
|
return 7;
|
|
148
148
|
}
|
|
149
149
|
}).a !== 7;
|
|
150
|
-
}), Qp = Mt, em = lo, tm = Vc, nm = Wc, im =
|
|
150
|
+
}), Qp = Mt, em = lo, tm = Vc, nm = Wc, im = ar, rm = lu, sm = Kt, om = uu, ka = Object.getOwnPropertyDescriptor;
|
|
151
151
|
oo.f = Qp ? ka : function(e, t) {
|
|
152
152
|
if (e = im(e), t = rm(t), om)
|
|
153
153
|
try {
|
|
@@ -163,25 +163,25 @@ var kn = {}, am = Mt, lm = Tt, du = am && lm(function() {
|
|
|
163
163
|
value: 42,
|
|
164
164
|
writable: !1
|
|
165
165
|
}).prototype !== 42;
|
|
166
|
-
}), cm =
|
|
166
|
+
}), cm = Qn, um = String, dm = TypeError, lr = function(n) {
|
|
167
167
|
if (cm(n))
|
|
168
168
|
return n;
|
|
169
169
|
throw new dm(um(n) + " is not an object");
|
|
170
|
-
}, hm = Mt, fm = uu, pm = du,
|
|
170
|
+
}, hm = Mt, fm = uu, pm = du, di = lr, xa = lu, mm = TypeError, Lr = Object.defineProperty, gm = Object.getOwnPropertyDescriptor, zr = "enumerable", Br = "configurable", Fr = "writable";
|
|
171
171
|
kn.f = hm ? pm ? function(e, t, i) {
|
|
172
|
-
if (
|
|
172
|
+
if (di(e), t = xa(t), di(i), typeof e == "function" && t === "prototype" && "value" in i && Fr in i && !i[Fr]) {
|
|
173
173
|
var r = gm(e, t);
|
|
174
|
-
r && r[
|
|
175
|
-
configurable:
|
|
176
|
-
enumerable:
|
|
174
|
+
r && r[Fr] && (e[t] = i.value, i = {
|
|
175
|
+
configurable: Br in i ? i[Br] : r[Br],
|
|
176
|
+
enumerable: zr in i ? i[zr] : r[zr],
|
|
177
177
|
writable: !1
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
return
|
|
181
|
-
} :
|
|
182
|
-
if (
|
|
180
|
+
return Lr(e, t, i);
|
|
181
|
+
} : Lr : function(e, t, i) {
|
|
182
|
+
if (di(e), t = xa(t), di(i), fm)
|
|
183
183
|
try {
|
|
184
|
-
return
|
|
184
|
+
return Lr(e, t, i);
|
|
185
185
|
} catch (r) {
|
|
186
186
|
}
|
|
187
187
|
if ("get" in i || "set" in i)
|
|
@@ -192,67 +192,67 @@ var vm = Mt, ym = kn, bm = Wc, hu = vm ? function(n, e, t) {
|
|
|
192
192
|
return ym.f(n, e, bm(1, t));
|
|
193
193
|
} : function(n, e, t) {
|
|
194
194
|
return n[e] = t, n;
|
|
195
|
-
}, fu = { exports: {} },
|
|
196
|
-
}).name === "something", xm = fo && (!
|
|
195
|
+
}, fu = { exports: {} }, ks = Mt, wm = Kt, pu = Function.prototype, Cm = ks && Object.getOwnPropertyDescriptor, fo = wm(pu, "name"), km = fo && (function() {
|
|
196
|
+
}).name === "something", xm = fo && (!ks || ks && Cm(pu, "name").configurable), Sm = {
|
|
197
197
|
EXISTS: fo,
|
|
198
198
|
PROPER: km,
|
|
199
199
|
CONFIGURABLE: xm
|
|
200
|
-
}, Tm = Xe, Mm = nt,
|
|
201
|
-
Mm(
|
|
200
|
+
}, Tm = Xe, Mm = nt, xs = ho, _m = Tm(Function.toString);
|
|
201
|
+
Mm(xs.inspectSource) || (xs.inspectSource = function(n) {
|
|
202
202
|
return _m(n);
|
|
203
203
|
});
|
|
204
|
-
var Nm =
|
|
204
|
+
var Nm = xs.inspectSource, Em = Ue, Am = nt, Sa = Em.WeakMap, Im = Am(Sa) && /native code/.test(String(Sa)), Om = ru, Dm = ou, Ta = Om("keys"), mu = function(n) {
|
|
205
205
|
return Ta[n] || (Ta[n] = Dm(n));
|
|
206
|
-
}, po = {}, $m = Im, gu = Ue, Rm =
|
|
207
|
-
return
|
|
206
|
+
}, po = {}, $m = Im, gu = Ue, Rm = Qn, Pm = hu, Vr = Kt, Hr = ho, Lm = mu, zm = po, Ma = "Object already initialized", Ss = gu.TypeError, Bm = gu.WeakMap, Bi, Bn, Fi, Fm = function(n) {
|
|
207
|
+
return Fi(n) ? Bn(n) : Bi(n, {});
|
|
208
208
|
}, Vm = function(n) {
|
|
209
209
|
return function(e) {
|
|
210
210
|
var t;
|
|
211
211
|
if (!Rm(e) || (t = Bn(e)).type !== n)
|
|
212
|
-
throw new
|
|
212
|
+
throw new Ss("Incompatible receiver, " + n + " required");
|
|
213
213
|
return t;
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
if ($m ||
|
|
217
|
-
var Ye =
|
|
218
|
-
Ye.get = Ye.get, Ye.has = Ye.has, Ye.set = Ye.set,
|
|
216
|
+
if ($m || Hr.state) {
|
|
217
|
+
var Ye = Hr.state || (Hr.state = new Bm());
|
|
218
|
+
Ye.get = Ye.get, Ye.has = Ye.has, Ye.set = Ye.set, Bi = function(n, e) {
|
|
219
219
|
if (Ye.has(n))
|
|
220
|
-
throw new
|
|
220
|
+
throw new Ss(Ma);
|
|
221
221
|
return e.facade = n, Ye.set(n, e), e;
|
|
222
222
|
}, Bn = function(n) {
|
|
223
223
|
return Ye.get(n) || {};
|
|
224
|
-
},
|
|
224
|
+
}, Fi = function(n) {
|
|
225
225
|
return Ye.has(n);
|
|
226
226
|
};
|
|
227
227
|
} else {
|
|
228
228
|
var Yt = Lm("state");
|
|
229
|
-
zm[Yt] = !0,
|
|
230
|
-
if (
|
|
231
|
-
throw new
|
|
229
|
+
zm[Yt] = !0, Bi = function(n, e) {
|
|
230
|
+
if (Vr(n, Yt))
|
|
231
|
+
throw new Ss(Ma);
|
|
232
232
|
return e.facade = n, Pm(n, Yt, e), e;
|
|
233
233
|
}, Bn = function(n) {
|
|
234
|
-
return
|
|
235
|
-
},
|
|
236
|
-
return
|
|
234
|
+
return Vr(n, Yt) ? n[Yt] : {};
|
|
235
|
+
}, Fi = function(n) {
|
|
236
|
+
return Vr(n, Yt);
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
var Hm = {
|
|
240
|
-
set:
|
|
240
|
+
set: Bi,
|
|
241
241
|
get: Bn,
|
|
242
|
-
has:
|
|
242
|
+
has: Fi,
|
|
243
243
|
enforce: Fm,
|
|
244
244
|
getterFor: Vm
|
|
245
|
-
}, mo = Xe, jm = Tt, Wm = nt,
|
|
246
|
-
return
|
|
245
|
+
}, mo = Xe, jm = Tt, Wm = nt, hi = Kt, Ts = Mt, Um = Sm.CONFIGURABLE, qm = Nm, vu = Hm, Km = vu.enforce, Jm = vu.get, _a = String, Ai = Object.defineProperty, Gm = mo("".slice), Xm = mo("".replace), Ym = mo([].join), Zm = Ts && !jm(function() {
|
|
246
|
+
return Ai(function() {
|
|
247
247
|
}, "length", { value: 8 }).length !== 8;
|
|
248
248
|
}), Qm = String(String).split("String"), e1 = fu.exports = function(n, e, t) {
|
|
249
|
-
Gm(_a(e), 0, 7) === "Symbol(" && (e = "[" + Xm(_a(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!
|
|
249
|
+
Gm(_a(e), 0, 7) === "Symbol(" && (e = "[" + Xm(_a(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!hi(n, "name") || Um && n.name !== e) && (Ts ? Ai(n, "name", { value: e, configurable: !0 }) : n.name = e), Zm && t && hi(t, "arity") && n.length !== t.arity && Ai(n, "length", { value: t.arity });
|
|
250
250
|
try {
|
|
251
|
-
t &&
|
|
251
|
+
t && hi(t, "constructor") && t.constructor ? Ts && Ai(n, "prototype", { writable: !1 }) : n.prototype && (n.prototype = void 0);
|
|
252
252
|
} catch (r) {
|
|
253
253
|
}
|
|
254
254
|
var i = Km(n);
|
|
255
|
-
return
|
|
255
|
+
return hi(i, "source") || (i.source = Ym(Qm, typeof e == "string" ? e : "")), n;
|
|
256
256
|
};
|
|
257
257
|
Function.prototype.toString = e1(function() {
|
|
258
258
|
return Wm(this) && Jm(this).source || qm(this);
|
|
@@ -289,7 +289,7 @@ var t1 = fu.exports, n1 = nt, i1 = kn, r1 = t1, s1 = uo, o1 = function(n, e, t,
|
|
|
289
289
|
return e > 0 ? g1(e, 9007199254740991) : 0;
|
|
290
290
|
}, y1 = v1, wu = function(n) {
|
|
291
291
|
return y1(n.length);
|
|
292
|
-
}, b1 =
|
|
292
|
+
}, b1 = ar, w1 = p1, C1 = wu, Na = function(n) {
|
|
293
293
|
return function(e, t, i) {
|
|
294
294
|
var r = b1(e), s = C1(r);
|
|
295
295
|
if (s === 0)
|
|
@@ -312,12 +312,12 @@ var t1 = fu.exports, n1 = nt, i1 = kn, r1 = t1, s1 = uo, o1 = function(n, e, t,
|
|
|
312
312
|
// `Array.prototype.indexOf` method
|
|
313
313
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
314
314
|
indexOf: Na(!1)
|
|
315
|
-
}, x1 = Xe,
|
|
315
|
+
}, x1 = Xe, jr = Kt, S1 = ar, T1 = k1.indexOf, M1 = po, Ea = x1([].push), Cu = function(n, e) {
|
|
316
316
|
var t = S1(n), i = 0, r = [], s;
|
|
317
317
|
for (s in t)
|
|
318
|
-
!
|
|
318
|
+
!jr(M1, s) && jr(t, s) && Ea(r, s);
|
|
319
319
|
for (; e.length > i; )
|
|
320
|
-
|
|
320
|
+
jr(t, s = e[i++]) && (~T1(r, s) || Ea(r, s));
|
|
321
321
|
return r;
|
|
322
322
|
}, go = [
|
|
323
323
|
"constructor",
|
|
@@ -333,7 +333,7 @@ yu.f = Object.getOwnPropertyNames || function(e) {
|
|
|
333
333
|
};
|
|
334
334
|
var ku = {};
|
|
335
335
|
ku.f = Object.getOwnPropertySymbols;
|
|
336
|
-
var A1 = co, I1 = Xe, O1 = yu, D1 = ku, $1 =
|
|
336
|
+
var A1 = co, I1 = Xe, O1 = yu, D1 = ku, $1 = lr, R1 = I1([].concat), P1 = A1("Reflect", "ownKeys") || function(e) {
|
|
337
337
|
var t = O1.f($1(e)), i = D1.f;
|
|
338
338
|
return i ? R1(t, i(e)) : t;
|
|
339
339
|
}, Aa = Kt, L1 = P1, z1 = oo, B1 = kn, F1 = function(n, e, t) {
|
|
@@ -341,14 +341,14 @@ var A1 = co, I1 = Xe, O1 = yu, D1 = ku, $1 = ur, R1 = I1([].concat), P1 = A1("Re
|
|
|
341
341
|
var a = i[o];
|
|
342
342
|
!Aa(n, a) && !(t && Aa(t, a)) && r(n, a, s(e, a));
|
|
343
343
|
}
|
|
344
|
-
}, V1 = Tt, H1 = nt, j1 = /#|\.prototype\./,
|
|
344
|
+
}, V1 = Tt, H1 = nt, j1 = /#|\.prototype\./, ei = function(n, e) {
|
|
345
345
|
var t = U1[W1(n)];
|
|
346
346
|
return t === K1 ? !0 : t === q1 ? !1 : H1(e) ? V1(e) : !!e;
|
|
347
|
-
}, W1 =
|
|
347
|
+
}, W1 = ei.normalize = function(n) {
|
|
348
348
|
return String(n).replace(j1, ".").toLowerCase();
|
|
349
|
-
}, U1 =
|
|
349
|
+
}, U1 = ei.data = {}, q1 = ei.NATIVE = "N", K1 = ei.POLYFILL = "P", J1 = ei, fi = Ue, G1 = oo.f, X1 = hu, Y1 = o1, Z1 = uo, Q1 = F1, e0 = J1, t0 = function(n, e) {
|
|
350
350
|
var t = n.target, i = n.global, r = n.stat, s, o, a, l, c, u;
|
|
351
|
-
if (i ? o =
|
|
351
|
+
if (i ? o = fi : r ? o = fi[t] || Z1(t, {}) : o = fi[t] && fi[t].prototype, o)
|
|
352
352
|
for (a in e) {
|
|
353
353
|
if (c = e[a], n.dontCallGetSet ? (u = G1(o, a), l = u && u.value) : l = o[a], s = e0(i ? a : t + (r ? "." : "#") + a, n.forced), !s && l !== void 0) {
|
|
354
354
|
if (typeof c == typeof l)
|
|
@@ -386,44 +386,44 @@ var A1 = co, I1 = Xe, O1 = yu, D1 = ku, $1 = ur, R1 = I1([].concat), P1 = A1("Re
|
|
|
386
386
|
findLastIndex: Oa(1)
|
|
387
387
|
}, xu = {}, p0 = Cu, m0 = go, g0 = Object.keys || function(e) {
|
|
388
388
|
return p0(e, m0);
|
|
389
|
-
}, v0 = Mt, y0 = du, b0 = kn, w0 =
|
|
389
|
+
}, v0 = Mt, y0 = du, b0 = kn, w0 = lr, C0 = ar, k0 = g0;
|
|
390
390
|
xu.f = v0 && !y0 ? Object.defineProperties : function(e, t) {
|
|
391
391
|
w0(e);
|
|
392
392
|
for (var i = C0(t), r = k0(t), s = r.length, o = 0, a; s > o; )
|
|
393
393
|
b0.f(e, a = r[o++], i[a]);
|
|
394
394
|
return e;
|
|
395
395
|
};
|
|
396
|
-
var x0 = co, S0 = x0("document", "documentElement"), T0 =
|
|
396
|
+
var x0 = co, S0 = x0("document", "documentElement"), T0 = lr, M0 = xu, Da = go, _0 = po, N0 = S0, E0 = cu, A0 = mu, $a = ">", Ra = "<", Ms = "prototype", _s = "script", Su = A0("IE_PROTO"), Wr = function() {
|
|
397
397
|
}, Tu = function(n) {
|
|
398
|
-
return Ra +
|
|
398
|
+
return Ra + _s + $a + n + Ra + "/" + _s + $a;
|
|
399
399
|
}, Pa = function(n) {
|
|
400
400
|
n.write(Tu("")), n.close();
|
|
401
401
|
var e = n.parentWindow.Object;
|
|
402
402
|
return n = null, e;
|
|
403
403
|
}, I0 = function() {
|
|
404
|
-
var n = E0("iframe"), e = "java" +
|
|
404
|
+
var n = E0("iframe"), e = "java" + _s + ":", t;
|
|
405
405
|
return n.style.display = "none", N0.appendChild(n), n.src = String(e), t = n.contentWindow.document, t.open(), t.write(Tu("document.F=Object")), t.close(), t.F;
|
|
406
|
-
},
|
|
406
|
+
}, pi, Ii = function() {
|
|
407
407
|
try {
|
|
408
|
-
|
|
408
|
+
pi = new ActiveXObject("htmlfile");
|
|
409
409
|
} catch (e) {
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
Ii = typeof document < "u" ? document.domain && pi ? Pa(pi) : I0() : Pa(pi);
|
|
412
412
|
for (var n = Da.length; n--; )
|
|
413
|
-
delete
|
|
414
|
-
return
|
|
413
|
+
delete Ii[Ms][Da[n]];
|
|
414
|
+
return Ii();
|
|
415
415
|
};
|
|
416
416
|
_0[Su] = !0;
|
|
417
417
|
var O0 = Object.create || function(e, t) {
|
|
418
418
|
var i;
|
|
419
|
-
return e !== null ? (
|
|
420
|
-
}, D0 = au, $0 = O0, R0 = kn.f,
|
|
421
|
-
|
|
419
|
+
return e !== null ? (Wr[Ms] = T0(e), i = new Wr(), Wr[Ms] = null, i[Su] = e) : i = Ii(), t === void 0 ? i : M0.f(i, t);
|
|
420
|
+
}, D0 = au, $0 = O0, R0 = kn.f, Ns = D0("unscopables"), Es = Array.prototype;
|
|
421
|
+
Es[Ns] === void 0 && R0(Es, Ns, {
|
|
422
422
|
configurable: !0,
|
|
423
423
|
value: $0(null)
|
|
424
424
|
});
|
|
425
425
|
var P0 = function(n) {
|
|
426
|
-
|
|
426
|
+
Es[Ns][n] = !0;
|
|
427
427
|
}, L0 = t0, z0 = f0.findLast, B0 = P0;
|
|
428
428
|
L0({ target: "Array", proto: !0 }, {
|
|
429
429
|
findLast: function(e) {
|
|
@@ -435,7 +435,7 @@ var F0 = Ue, V0 = Xe, H0 = function(n, e) {
|
|
|
435
435
|
return V0(F0[n].prototype[e]);
|
|
436
436
|
}, j0 = H0;
|
|
437
437
|
j0("Array", "findLast");
|
|
438
|
-
var
|
|
438
|
+
var cr, R, Mu, _u, Ot, La, Nu, Eu, Au, vo, As, Is, Iu, Fn = {}, Ou = [], W0 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ti = Array.isArray;
|
|
439
439
|
function st(n, e) {
|
|
440
440
|
for (var t in e)
|
|
441
441
|
n[t] = e[t];
|
|
@@ -448,12 +448,12 @@ function ke(n, e, t) {
|
|
|
448
448
|
var i, r, s, o = {};
|
|
449
449
|
for (s in e)
|
|
450
450
|
s == "key" ? i = e[s] : s == "ref" ? r = e[s] : o[s] = e[s];
|
|
451
|
-
if (arguments.length > 2 && (o.children = arguments.length > 3 ?
|
|
451
|
+
if (arguments.length > 2 && (o.children = arguments.length > 3 ? cr.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
452
452
|
for (s in n.defaultProps)
|
|
453
453
|
o[s] === void 0 && (o[s] = n.defaultProps[s]);
|
|
454
|
-
return
|
|
454
|
+
return Oi(n, o, i, r, null);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Oi(n, e, t, i, r) {
|
|
457
457
|
var s = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r == null ? ++Mu : r, __i: -1, __u: 0 };
|
|
458
458
|
return r == null && R.vnode != null && R.vnode(s), s;
|
|
459
459
|
}
|
|
@@ -485,13 +485,13 @@ function Du(n) {
|
|
|
485
485
|
return Du(n);
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
(!n.__d && (n.__d = !0) && Ot.push(n) && !
|
|
488
|
+
function Os(n) {
|
|
489
|
+
(!n.__d && (n.__d = !0) && Ot.push(n) && !Vi.__r++ || La != R.debounceRendering) && ((La = R.debounceRendering) || Nu)(Vi);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Vi() {
|
|
492
492
|
for (var n, e, t, i, r, s, o, a = 1; Ot.length; )
|
|
493
493
|
Ot.length > a && Ot.sort(Eu), n = Ot.shift(), a = Ot.length, n.__d && (t = void 0, i = void 0, r = (i = (e = n).__v).__e, s = [], o = [], e.__P && ((t = st({}, i)).__v = i.__v + 1, R.vnode && R.vnode(t), bo(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r == null ? mn(i) : r, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, Pu(s, t, o), i.__e = i.__ = null, t.__e != r && Du(t)));
|
|
494
|
-
|
|
494
|
+
Vi.__r = 0;
|
|
495
495
|
}
|
|
496
496
|
function $u(n, e, t, i, r, s, o, a, l, c, u) {
|
|
497
497
|
var d, f, p, m, v, y, g, b = i && i.__k || Ou, w = e.length;
|
|
@@ -502,7 +502,7 @@ function $u(n, e, t, i, r, s, o, a, l, c, u) {
|
|
|
502
502
|
function U0(n, e, t, i, r) {
|
|
503
503
|
var s, o, a, l, c, u = t.length, d = u, f = 0;
|
|
504
504
|
for (n.__k = new Array(r), s = 0; s < r; s++)
|
|
505
|
-
(o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (l = s + f, (o = n.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ?
|
|
505
|
+
(o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (l = s + f, (o = n.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Oi(null, o, null, null, null) : ti(o) ? Oi(We, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Oi(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = n, o.__b = n.__b + 1, a = null, (c = o.__i = q0(o, t, l, d)) != -1 && (d--, (a = t[c]) && (a.__u |= 2)), a == null || a.__v == null ? (c == -1 && (r > u ? f-- : r < u && f++), typeof o.type != "function" && (o.__u |= 4)) : c != l && (c == l - 1 ? f-- : c == l + 1 ? f++ : (c > l ? f-- : f++, o.__u |= 4))) : n.__k[s] = null;
|
|
506
506
|
if (d)
|
|
507
507
|
for (s = 0; s < u; s++)
|
|
508
508
|
(a = t[s]) != null && !(2 & a.__u) && (a.__e == i && (i = mn(a)), zu(a, a));
|
|
@@ -521,9 +521,9 @@ function Ru(n, e, t, i) {
|
|
|
521
521
|
while (e != null && e.nodeType == 8);
|
|
522
522
|
return e;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
return e = e || [], n == null || typeof n == "boolean" || (
|
|
526
|
-
|
|
524
|
+
function Hi(n, e) {
|
|
525
|
+
return e = e || [], n == null || typeof n == "boolean" || (ti(n) ? n.some(function(t) {
|
|
526
|
+
Hi(t, e);
|
|
527
527
|
}) : e.push(n)), e;
|
|
528
528
|
}
|
|
529
529
|
function q0(n, e, t, i) {
|
|
@@ -540,7 +540,7 @@ function q0(n, e, t, i) {
|
|
|
540
540
|
function Ba(n, e, t) {
|
|
541
541
|
e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || W0.test(e) ? t : t + "px";
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function mi(n, e, t, i, r) {
|
|
544
544
|
var s, o;
|
|
545
545
|
e:
|
|
546
546
|
if (e == "style")
|
|
@@ -555,7 +555,7 @@ function gi(n, e, t, i, r) {
|
|
|
555
555
|
i && t[e] == i[e] || Ba(n.style, e, t[e]);
|
|
556
556
|
}
|
|
557
557
|
else if (e[0] == "o" && e[1] == "n")
|
|
558
|
-
s = e != (e = e.replace(Au, "$1")), o = e.toLowerCase(), e = o in n || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + s] = t, t ? i ? t.u = i.u : (t.u = vo, n.addEventListener(e, s ?
|
|
558
|
+
s = e != (e = e.replace(Au, "$1")), o = e.toLowerCase(), e = o in n || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + s] = t, t ? i ? t.u = i.u : (t.u = vo, n.addEventListener(e, s ? Is : As, s)) : n.removeEventListener(e, s ? Is : As, s);
|
|
559
559
|
else {
|
|
560
560
|
if (r == "http://www.w3.org/2000/svg")
|
|
561
561
|
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
@@ -611,7 +611,7 @@ function bo(n, e, t, i, r, s, o, a, l, c) {
|
|
|
611
611
|
do
|
|
612
612
|
d.__d = !1, S && S(e), u = d.render(d.props, d.state, d.context), d.state = d.__s;
|
|
613
613
|
while (d.__d && ++M < 25);
|
|
614
|
-
d.state = d.__s, d.getChildContext != null && (i = st(st({}, i), d.getChildContext())), b && !f && d.getSnapshotBeforeUpdate != null && (v = d.getSnapshotBeforeUpdate(p, m)), E = u, u != null && u.type === We && u.key == null && (E = Lu(u.props.children)), a = $u(n,
|
|
614
|
+
d.state = d.__s, d.getChildContext != null && (i = st(st({}, i), d.getChildContext())), b && !f && d.getSnapshotBeforeUpdate != null && (v = d.getSnapshotBeforeUpdate(p, m)), E = u, u != null && u.type === We && u.key == null && (E = Lu(u.props.children)), a = $u(n, ti(E) ? E : [E], e, t, i, r, s, o, a, l, c), d.base = e.__e, e.__u &= -161, d.__h.length && o.push(d), y && (d.__E = d.__ = null);
|
|
615
615
|
} catch (ae) {
|
|
616
616
|
if (e.__v = null, l || s != null)
|
|
617
617
|
if (ae.then) {
|
|
@@ -621,18 +621,18 @@ function bo(n, e, t, i, r, s, o, a, l, c) {
|
|
|
621
621
|
} else {
|
|
622
622
|
for (H = s.length; H--; )
|
|
623
623
|
yo(s[H]);
|
|
624
|
-
|
|
624
|
+
Ds(e);
|
|
625
625
|
}
|
|
626
626
|
else
|
|
627
|
-
e.__e = t.__e, e.__k = t.__k, ae.then ||
|
|
627
|
+
e.__e = t.__e, e.__k = t.__k, ae.then || Ds(e);
|
|
628
628
|
R.__e(ae, e, t);
|
|
629
629
|
}
|
|
630
630
|
else
|
|
631
631
|
s == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : a = e.__e = K0(t.__e, e, t, i, r, s, o, l, c);
|
|
632
632
|
return (u = R.diffed) && u(e), 128 & e.__u ? void 0 : a;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(
|
|
634
|
+
function Ds(n) {
|
|
635
|
+
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(Ds);
|
|
636
636
|
}
|
|
637
637
|
function Pu(n, e, t) {
|
|
638
638
|
for (var i = 0; i < t.length; i++)
|
|
@@ -648,7 +648,7 @@ function Pu(n, e, t) {
|
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
650
|
function Lu(n) {
|
|
651
|
-
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n :
|
|
651
|
+
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n : ti(n) ? n.map(Lu) : st({}, n);
|
|
652
652
|
}
|
|
653
653
|
function K0(n, e, t, i, r, s, o, a, l) {
|
|
654
654
|
var c, u, d, f, p, m, v, y = t.props, g = e.props, b = e.type;
|
|
@@ -667,7 +667,7 @@ function K0(n, e, t, i, r, s, o, a, l) {
|
|
|
667
667
|
if (b == null)
|
|
668
668
|
y === g || a && n.data == g || (n.data = g);
|
|
669
669
|
else {
|
|
670
|
-
if (s = s &&
|
|
670
|
+
if (s = s && cr.call(n.childNodes), y = t.props || Fn, !a && s != null)
|
|
671
671
|
for (y = {}, c = 0; c < n.attributes.length; c++)
|
|
672
672
|
y[(p = n.attributes[c]).name] = p.value;
|
|
673
673
|
for (c in y)
|
|
@@ -677,17 +677,17 @@ function K0(n, e, t, i, r, s, o, a, l) {
|
|
|
677
677
|
else if (!(c in g)) {
|
|
678
678
|
if (c == "value" && "defaultValue" in g || c == "checked" && "defaultChecked" in g)
|
|
679
679
|
continue;
|
|
680
|
-
|
|
680
|
+
mi(n, c, null, p, r);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
for (c in g)
|
|
684
|
-
p = g[c], c == "children" ? f = p : c == "dangerouslySetInnerHTML" ? u = p : c == "value" ? m = p : c == "checked" ? v = p : a && typeof p != "function" || y[c] === p ||
|
|
684
|
+
p = g[c], c == "children" ? f = p : c == "dangerouslySetInnerHTML" ? u = p : c == "value" ? m = p : c == "checked" ? v = p : a && typeof p != "function" || y[c] === p || mi(n, c, p, y[c], r);
|
|
685
685
|
if (u)
|
|
686
686
|
a || d && (u.__html == d.__html || u.__html == n.innerHTML) || (n.innerHTML = u.__html), e.__k = [];
|
|
687
|
-
else if (d && (n.innerHTML = ""), $u(e.type == "template" ? n.content : n,
|
|
687
|
+
else if (d && (n.innerHTML = ""), $u(e.type == "template" ? n.content : n, ti(f) ? f : [f], e, t, i, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, s, o, s ? s[0] : t.__k && mn(t, 0), a, l), s != null)
|
|
688
688
|
for (c = s.length; c--; )
|
|
689
689
|
yo(s[c]);
|
|
690
|
-
a || (c = "value", b == "progress" && m == null ? n.removeAttribute("value") : m != null && (m !== n[c] || b == "progress" && !m || b == "option" && m != y[c]) &&
|
|
690
|
+
a || (c = "value", b == "progress" && m == null ? n.removeAttribute("value") : m != null && (m !== n[c] || b == "progress" && !m || b == "option" && m != y[c]) && mi(n, c, m, y[c], r), c = "checked", v != null && v != n[c] && mi(n, c, v, y[c], r));
|
|
691
691
|
}
|
|
692
692
|
return n;
|
|
693
693
|
}
|
|
@@ -723,7 +723,7 @@ function J0(n, e, t) {
|
|
|
723
723
|
}
|
|
724
724
|
function Ie(n, e, t) {
|
|
725
725
|
var i, r, s, o;
|
|
726
|
-
e == document && (e = document.documentElement), R.__ && R.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], bo(e, n = (!i && t || e).__k = ke(We, null, [n]), r || Fn, Fn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ?
|
|
726
|
+
e == document && (e = document.documentElement), R.__ && R.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], bo(e, n = (!i && t || e).__k = ke(We, null, [n]), r || Fn, Fn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ? cr.call(e.childNodes) : null, s, !i && t ? t : r ? r.__e : e.firstChild, i, o), Pu(s, n, o);
|
|
727
727
|
}
|
|
728
728
|
function Bu(n) {
|
|
729
729
|
function e(t) {
|
|
@@ -734,7 +734,7 @@ function Bu(n) {
|
|
|
734
734
|
i = null;
|
|
735
735
|
}, this.shouldComponentUpdate = function(s) {
|
|
736
736
|
this.props.value != s.value && i.forEach(function(o) {
|
|
737
|
-
o.__e = !0,
|
|
737
|
+
o.__e = !0, Os(o);
|
|
738
738
|
});
|
|
739
739
|
}, this.sub = function(s) {
|
|
740
740
|
i.add(s);
|
|
@@ -748,7 +748,7 @@ function Bu(n) {
|
|
|
748
748
|
return t.children(i);
|
|
749
749
|
}).contextType = e, e;
|
|
750
750
|
}
|
|
751
|
-
|
|
751
|
+
cr = Ou.slice, R = { __e: function(n, e, t, i) {
|
|
752
752
|
for (var r, s, o; e = e.__; )
|
|
753
753
|
if ((r = e.__c) && !r.__)
|
|
754
754
|
try {
|
|
@@ -762,12 +762,12 @@ dr = Ou.slice, R = { __e: function(n, e, t, i) {
|
|
|
762
762
|
return n != null && n.constructor == null;
|
|
763
763
|
}, ze.prototype.setState = function(n, e) {
|
|
764
764
|
var t;
|
|
765
|
-
t = this.__s != null && this.__s != this.state ? this.__s : this.__s = st({}, this.state), typeof n == "function" && (n = n(st({}, t), this.props)), n && st(t, n), n != null && this.__v && (e && this._sb.push(e),
|
|
765
|
+
t = this.__s != null && this.__s != this.state ? this.__s : this.__s = st({}, this.state), typeof n == "function" && (n = n(st({}, t), this.props)), n && st(t, n), n != null && this.__v && (e && this._sb.push(e), Os(this));
|
|
766
766
|
}, ze.prototype.forceUpdate = function(n) {
|
|
767
|
-
this.__v && (this.__e = !0, n && this.__h.push(n),
|
|
767
|
+
this.__v && (this.__e = !0, n && this.__h.push(n), Os(this));
|
|
768
768
|
}, ze.prototype.render = We, Ot = [], Nu = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Eu = function(n, e) {
|
|
769
769
|
return n.__v.__b - e.__v.__b;
|
|
770
|
-
},
|
|
770
|
+
}, Vi.__r = 0, Au = /(PointerCapture)$|Capture$/i, vo = 0, As = Fa(!1), Is = Fa(!0), Iu = 0;
|
|
771
771
|
var G0 = 0;
|
|
772
772
|
function h(n, e, t, i, r, s) {
|
|
773
773
|
e || (e = {});
|
|
@@ -1154,12 +1154,12 @@ function dt() {
|
|
|
1154
1154
|
function Pe() {
|
|
1155
1155
|
return "".concat(dt() + dt(), "-").concat(dt(), "-").concat(dt(), "-").concat(dt(), "-").concat(dt()).concat(dt()).concat(dt());
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function gi(n) {
|
|
1158
1158
|
const e = n.lastIndexOf("@");
|
|
1159
1159
|
return e === -1 ? n : n.substring(0, e);
|
|
1160
1160
|
}
|
|
1161
1161
|
const Q0 = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
1162
|
-
function
|
|
1162
|
+
function ni(n) {
|
|
1163
1163
|
return Q0.test(n);
|
|
1164
1164
|
}
|
|
1165
1165
|
const eg = "topic", tg = "inline", ng = "temp", ig = "unknow";
|
|
@@ -1845,7 +1845,7 @@ class lg {
|
|
|
1845
1845
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function $s(n) {
|
|
1849
1849
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1850
1850
|
}
|
|
1851
1851
|
function Vu(n, e, t, i) {
|
|
@@ -1960,21 +1960,21 @@ class cg {
|
|
|
1960
1960
|
return t;
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
var Ht,
|
|
1964
|
-
function
|
|
1965
|
-
te.__h && te.__h(
|
|
1966
|
-
var t =
|
|
1963
|
+
var Ht, Y, Ur, Ha, gn = 0, Wu = [], te = R, ja = te.__b, Wa = te.__r, Ua = te.diffed, qa = te.__c, Ka = te.unmount, Ja = te.__;
|
|
1964
|
+
function ii(n, e) {
|
|
1965
|
+
te.__h && te.__h(Y, n, gn || e), gn = 0;
|
|
1966
|
+
var t = Y.__H || (Y.__H = { __: [], __h: [] });
|
|
1967
1967
|
return n >= t.__.length && t.__.push({}), t.__[n];
|
|
1968
1968
|
}
|
|
1969
1969
|
function V(n) {
|
|
1970
1970
|
return gn = 1, ug(Uu, n);
|
|
1971
1971
|
}
|
|
1972
1972
|
function ug(n, e, t) {
|
|
1973
|
-
var i =
|
|
1973
|
+
var i = ii(Ht++, 2);
|
|
1974
1974
|
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : Uu(void 0, e), function(a) {
|
|
1975
1975
|
var l = i.__N ? i.__N[0] : i.__[0], c = i.t(l, a);
|
|
1976
1976
|
l !== c && (i.__N = [c, i.__[1]], i.__c.setState({}));
|
|
1977
|
-
}], i.__c =
|
|
1977
|
+
}], i.__c = Y, !Y.__f)) {
|
|
1978
1978
|
var r = function(a, l, c) {
|
|
1979
1979
|
if (!i.__c.__H)
|
|
1980
1980
|
return !0;
|
|
@@ -1993,25 +1993,25 @@ function ug(n, e, t) {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
}), s && s.call(this, a, l, c) || d;
|
|
1995
1995
|
};
|
|
1996
|
-
|
|
1997
|
-
var s =
|
|
1998
|
-
|
|
1996
|
+
Y.__f = !0;
|
|
1997
|
+
var s = Y.shouldComponentUpdate, o = Y.componentWillUpdate;
|
|
1998
|
+
Y.componentWillUpdate = function(a, l, c) {
|
|
1999
1999
|
if (this.__e) {
|
|
2000
2000
|
var u = s;
|
|
2001
2001
|
s = void 0, r(a, l, c), s = u;
|
|
2002
2002
|
}
|
|
2003
2003
|
o && o.call(this, a, l, c);
|
|
2004
|
-
},
|
|
2004
|
+
}, Y.shouldComponentUpdate = r;
|
|
2005
2005
|
}
|
|
2006
2006
|
return i.__N || i.__;
|
|
2007
2007
|
}
|
|
2008
2008
|
function L(n, e) {
|
|
2009
|
-
var t =
|
|
2010
|
-
!te.__s && ko(t.__H, e) && (t.__ = n, t.u = e,
|
|
2009
|
+
var t = ii(Ht++, 3);
|
|
2010
|
+
!te.__s && ko(t.__H, e) && (t.__ = n, t.u = e, Y.__H.__h.push(t));
|
|
2011
2011
|
}
|
|
2012
2012
|
function dg(n, e) {
|
|
2013
|
-
var t =
|
|
2014
|
-
!te.__s && ko(t.__H, e) && (t.__ = n, t.u = e,
|
|
2013
|
+
var t = ii(Ht++, 4);
|
|
2014
|
+
!te.__s && ko(t.__H, e) && (t.__ = n, t.u = e, Y.__h.push(t));
|
|
2015
2015
|
}
|
|
2016
2016
|
function F(n) {
|
|
2017
2017
|
return gn = 5, De(function() {
|
|
@@ -2033,7 +2033,7 @@ function hg(n, e, t) {
|
|
|
2033
2033
|
}, t == null ? t : t.concat(n));
|
|
2034
2034
|
}
|
|
2035
2035
|
function De(n, e) {
|
|
2036
|
-
var t =
|
|
2036
|
+
var t = ii(Ht++, 7);
|
|
2037
2037
|
return ko(t.__H, e) && (t.__ = n(), t.__H = e, t.__h = n), t.__;
|
|
2038
2038
|
}
|
|
2039
2039
|
function Ga(n, e) {
|
|
@@ -2042,39 +2042,39 @@ function Ga(n, e) {
|
|
|
2042
2042
|
}, e);
|
|
2043
2043
|
}
|
|
2044
2044
|
function Co(n) {
|
|
2045
|
-
var e =
|
|
2046
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
2045
|
+
var e = Y.context[n.__c], t = ii(Ht++, 9);
|
|
2046
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(Y)), e.props.value) : n.__;
|
|
2047
2047
|
}
|
|
2048
2048
|
function fg() {
|
|
2049
2049
|
for (var n; n = Wu.shift(); )
|
|
2050
2050
|
if (n.__P && n.__H)
|
|
2051
2051
|
try {
|
|
2052
|
-
n.__H.__h.forEach(
|
|
2052
|
+
n.__H.__h.forEach(Di), n.__H.__h.forEach(Rs), n.__H.__h = [];
|
|
2053
2053
|
} catch (e) {
|
|
2054
2054
|
n.__H.__h = [], te.__e(e, n.__v);
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
2057
|
te.__b = function(n) {
|
|
2058
|
-
|
|
2058
|
+
Y = null, ja && ja(n);
|
|
2059
2059
|
}, te.__ = function(n, e) {
|
|
2060
2060
|
n && e.__k && e.__k.__m && (n.__m = e.__k.__m), Ja && Ja(n, e);
|
|
2061
2061
|
}, te.__r = function(n) {
|
|
2062
2062
|
Wa && Wa(n), Ht = 0;
|
|
2063
|
-
var e = (
|
|
2064
|
-
e && (
|
|
2063
|
+
var e = (Y = n.__c).__H;
|
|
2064
|
+
e && (Ur === Y ? (e.__h = [], Y.__h = [], e.__.forEach(function(t) {
|
|
2065
2065
|
t.__N && (t.__ = t.__N), t.u = t.__N = void 0;
|
|
2066
|
-
})) : (e.__h.forEach(
|
|
2066
|
+
})) : (e.__h.forEach(Di), e.__h.forEach(Rs), e.__h = [], Ht = 0)), Ur = Y;
|
|
2067
2067
|
}, te.diffed = function(n) {
|
|
2068
2068
|
Ua && Ua(n);
|
|
2069
2069
|
var e = n.__c;
|
|
2070
2070
|
e && e.__H && (e.__H.__h.length && (Wu.push(e) !== 1 && Ha === te.requestAnimationFrame || ((Ha = te.requestAnimationFrame) || pg)(fg)), e.__H.__.forEach(function(t) {
|
|
2071
2071
|
t.u && (t.__H = t.u), t.u = void 0;
|
|
2072
|
-
})),
|
|
2072
|
+
})), Ur = Y = null;
|
|
2073
2073
|
}, te.__c = function(n, e) {
|
|
2074
2074
|
e.some(function(t) {
|
|
2075
2075
|
try {
|
|
2076
|
-
t.__h.forEach(
|
|
2077
|
-
return !i.__ ||
|
|
2076
|
+
t.__h.forEach(Di), t.__h = t.__h.filter(function(i) {
|
|
2077
|
+
return !i.__ || Rs(i);
|
|
2078
2078
|
});
|
|
2079
2079
|
} catch (i) {
|
|
2080
2080
|
e.some(function(r) {
|
|
@@ -2087,7 +2087,7 @@ te.__b = function(n) {
|
|
|
2087
2087
|
var e, t = n.__c;
|
|
2088
2088
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
2089
2089
|
try {
|
|
2090
|
-
|
|
2090
|
+
Di(i);
|
|
2091
2091
|
} catch (r) {
|
|
2092
2092
|
e = r;
|
|
2093
2093
|
}
|
|
@@ -2100,13 +2100,13 @@ function pg(n) {
|
|
|
2100
2100
|
}, i = setTimeout(t, 35);
|
|
2101
2101
|
Xa && (e = requestAnimationFrame(t));
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2104
|
-
var e =
|
|
2105
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
2103
|
+
function Di(n) {
|
|
2104
|
+
var e = Y, t = n.__c;
|
|
2105
|
+
typeof t == "function" && (n.__c = void 0, t()), Y = e;
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2108
|
-
var e =
|
|
2109
|
-
n.__c = n.__(),
|
|
2107
|
+
function Rs(n) {
|
|
2108
|
+
var e = Y;
|
|
2109
|
+
n.__c = n.__(), Y = e;
|
|
2110
2110
|
}
|
|
2111
2111
|
function ko(n, e) {
|
|
2112
2112
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
@@ -2123,7 +2123,7 @@ function xo() {
|
|
|
2123
2123
|
else {
|
|
2124
2124
|
for (var n, e = !1; Dn !== void 0; ) {
|
|
2125
2125
|
var t = Dn;
|
|
2126
|
-
for (Dn = void 0,
|
|
2126
|
+
for (Dn = void 0, Ps++; t !== void 0; ) {
|
|
2127
2127
|
var i = t.o;
|
|
2128
2128
|
if (t.o = void 0, t.f &= -3, !(8 & t.f) && Ju(t))
|
|
2129
2129
|
try {
|
|
@@ -2134,7 +2134,7 @@ function xo() {
|
|
|
2134
2134
|
t = i;
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
|
-
if (
|
|
2137
|
+
if (Ps = 0, dn--, e)
|
|
2138
2138
|
throw n;
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
@@ -2148,7 +2148,7 @@ function qu(n) {
|
|
|
2148
2148
|
j = e;
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
|
-
var Dn = void 0, dn = 0,
|
|
2151
|
+
var Dn = void 0, dn = 0, Ps = 0, ji = 0;
|
|
2152
2152
|
function Ku(n) {
|
|
2153
2153
|
if (j !== void 0) {
|
|
2154
2154
|
var e = n.n;
|
|
@@ -2217,9 +2217,9 @@ Object.defineProperty(ye.prototype, "value", { get: function() {
|
|
|
2217
2217
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
2218
2218
|
}, set: function(n) {
|
|
2219
2219
|
if (n !== this.v) {
|
|
2220
|
-
if (
|
|
2220
|
+
if (Ps > 100)
|
|
2221
2221
|
throw new Error("Cycle detected");
|
|
2222
|
-
this.v = n, this.i++,
|
|
2222
|
+
this.v = n, this.i++, ji++, dn++;
|
|
2223
2223
|
try {
|
|
2224
2224
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
2225
2225
|
e.t.N();
|
|
@@ -2228,7 +2228,7 @@ Object.defineProperty(ye.prototype, "value", { get: function() {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
2230
|
} });
|
|
2231
|
-
function
|
|
2231
|
+
function X(n, e) {
|
|
2232
2232
|
return new ye(n, e);
|
|
2233
2233
|
}
|
|
2234
2234
|
function Ju(n) {
|
|
@@ -2254,15 +2254,15 @@ function Xu(n) {
|
|
|
2254
2254
|
n.s = t;
|
|
2255
2255
|
}
|
|
2256
2256
|
function Jt(n, e) {
|
|
2257
|
-
ye.call(this, void 0), this.x = n, this.s = void 0, this.g =
|
|
2257
|
+
ye.call(this, void 0), this.x = n, this.s = void 0, this.g = ji - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
2258
2258
|
}
|
|
2259
2259
|
Jt.prototype = new ye();
|
|
2260
2260
|
Jt.prototype.h = function() {
|
|
2261
2261
|
if (this.f &= -3, 1 & this.f)
|
|
2262
2262
|
return !1;
|
|
2263
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
2263
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === ji))
|
|
2264
2264
|
return !0;
|
|
2265
|
-
if (this.g =
|
|
2265
|
+
if (this.g = ji, this.f |= 1, this.i > 0 && !Ju(this))
|
|
2266
2266
|
return this.f &= -2, !0;
|
|
2267
2267
|
var n = j;
|
|
2268
2268
|
try {
|
|
@@ -2372,13 +2372,13 @@ function Mo(n, e) {
|
|
|
2372
2372
|
var i = t.d.bind(t);
|
|
2373
2373
|
return i[Symbol.dispose] = i, i;
|
|
2374
2374
|
}
|
|
2375
|
-
var
|
|
2375
|
+
var ur, qr;
|
|
2376
2376
|
function Tn(n, e) {
|
|
2377
2377
|
R[n] = e.bind(null, R[n] || function() {
|
|
2378
2378
|
});
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2381
|
-
|
|
2380
|
+
function Wi(n) {
|
|
2381
|
+
qr && qr(), qr = n && n.S();
|
|
2382
2382
|
}
|
|
2383
2383
|
function Zu(n) {
|
|
2384
2384
|
var e = this, t = n.data, i = $(t);
|
|
@@ -2415,7 +2415,7 @@ Tn("__b", function(n, e) {
|
|
|
2415
2415
|
n(e);
|
|
2416
2416
|
});
|
|
2417
2417
|
Tn("__r", function(n, e) {
|
|
2418
|
-
|
|
2418
|
+
Wi();
|
|
2419
2419
|
var t, i = e.__c;
|
|
2420
2420
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(r) {
|
|
2421
2421
|
var s;
|
|
@@ -2424,13 +2424,13 @@ Tn("__r", function(n, e) {
|
|
|
2424
2424
|
}), s.c = function() {
|
|
2425
2425
|
i.__$f |= 1, i.setState({});
|
|
2426
2426
|
}, s;
|
|
2427
|
-
}())),
|
|
2427
|
+
}())), ur = i, Wi(t), n(e);
|
|
2428
2428
|
});
|
|
2429
2429
|
Tn("__e", function(n, e, t, i) {
|
|
2430
|
-
|
|
2430
|
+
Wi(), ur = void 0, n(e, t, i);
|
|
2431
2431
|
});
|
|
2432
2432
|
Tn("diffed", function(n, e) {
|
|
2433
|
-
|
|
2433
|
+
Wi(), ur = void 0;
|
|
2434
2434
|
var t;
|
|
2435
2435
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
2436
2436
|
var i = e.__np, r = e.props;
|
|
@@ -2452,7 +2452,7 @@ Tn("diffed", function(n, e) {
|
|
|
2452
2452
|
n(e);
|
|
2453
2453
|
});
|
|
2454
2454
|
function vg(n, e, t, i) {
|
|
2455
|
-
var r = e in n && n.ownerSVGElement === void 0, s =
|
|
2455
|
+
var r = e in n && n.ownerSVGElement === void 0, s = X(t);
|
|
2456
2456
|
return { o: function(o, a) {
|
|
2457
2457
|
s.value = o, i = a;
|
|
2458
2458
|
}, d: Mo(function() {
|
|
@@ -2504,12 +2504,12 @@ ze.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
2504
2504
|
};
|
|
2505
2505
|
function $(n) {
|
|
2506
2506
|
return De(function() {
|
|
2507
|
-
return
|
|
2507
|
+
return X(n);
|
|
2508
2508
|
}, []);
|
|
2509
2509
|
}
|
|
2510
2510
|
function ve(n) {
|
|
2511
2511
|
var e = F(n);
|
|
2512
|
-
return e.current = n,
|
|
2512
|
+
return e.current = n, ur.__$f |= 4, De(function() {
|
|
2513
2513
|
return So(function() {
|
|
2514
2514
|
return e.current();
|
|
2515
2515
|
});
|
|
@@ -2534,7 +2534,7 @@ const Qu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2534
2534
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2535
2535
|
children: /* @__PURE__ */ h("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
|
|
2536
2536
|
}
|
|
2537
|
-
), bg = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }),
|
|
2537
|
+
), bg = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Ls = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), wg = () => /* @__PURE__ */ h(
|
|
2538
2538
|
"svg",
|
|
2539
2539
|
{
|
|
2540
2540
|
className: "icon",
|
|
@@ -3072,7 +3072,7 @@ const Qu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3072
3072
|
height: "18",
|
|
3073
3073
|
children: /* @__PURE__ */ h("path", { d: "M190.208 552.576a26.176 26.176 0 0 1 0 52.288L189.44 604.8l-62.464-0.128a35.84 35.84 0 0 1-40-35.84l-0.384-433.28c0-19.968 16-35.648 35.712-35.648 1.92 0 3.84-0.256 5.632 0h62.272v0.128c13.44 0.576 24.192 11.456 24.192 24.96a25.024 25.024 0 0 1-24.192 24.96v0.448h-50.944l1.408 402.24h49.536z m736.32 37.504c-19.264 31.36-47.36 44.16-81.28 45.504a38.656 38.656 0 0 1-5.376 0.384l-205.44 0.704c13.44 39.04 22.656 85.568 22.656 129.28 0 28.416-3.2 56-9.024 82.56h-0.512a103.936 103.936 0 0 1-100.928 81.28c-57.28 0-95.488-48.128-95.488-106.112 0-3.2-0.32-6.4 0-9.536-3.008-108.352-91.264-195.52-196.224-207.488V551.68L254.08 329.6v-229.76h10.688l500.032-0.192 8.704 0.192c19.392 0 30.272 4.864 47.808 16.128 16.704 10.752 29.248 25.536 37.504 42.176 2.304 3.328 4.032 7.04 5.12 11.2l76.992 344.32a37.568 37.568 0 0 1 1.088 12.16c1.536 21.76-3.328 44.288-15.552 64.32z m-32.704-52.928l-83.008-367.744h-0.064a33.408 33.408 0 0 0-26.24-20.352c-1.536 0.192-3.072 0-4.672 0l-477.056 0.512-0.128 407.424c89.28 40.32 154.88 79.68 188.544 173.632h0.256c2.944 9.088 6.272 20.672 8.64 33.088 5.568 29.184 5.312 58.176 5.312 58.176-4.992 37.952 25.92 52.928 44.352 52.928 25.28-0.832 50.24-33.664 50.24-52.288 0 0 5.632-27.584 5.632-57.216 0.064-37.376-4.608-56.832-4.608-56.832h-0.512a307.84 307.84 0 0 0-30.464-87.04l0.384-0.256a36.16 36.16 0 0 1-3.712-16c0-19.84 19.072-21.76 38.784-21.76l238.72-0.192 14.72-0.512v-0.064c12.16 0.64 24.192-5.248 31.104-16.448a35.2 35.2 0 0 0 3.456-28.992h0.32zM267.52 96.768c2.048-0.192 2.816-0.192 1.92 0.128 1.536 0.32 2.304 0.512-1.92 0.512s-3.456-0.192-1.728-0.512c-0.768-0.32-0.192-0.32 1.728-0.128z" })
|
|
3074
3074
|
}
|
|
3075
|
-
),
|
|
3075
|
+
), Kr = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M413.610667 336.192l226.346666-125.461333-11.114666-76.586667c-5.909333-40.64 43.349333-65.344 72.384-36.309333l241.365333 241.344c29.013333 29.013333 4.373333 78.250667-36.245333 72.405333l-76.458667-10.965333-126.165333 227.029333 2.176 5.12c34.56 84.330667 27.413333 153.962667-30.208 214.549333l-4.416 4.544a42.666667 42.666667 0 0 1-60.330667 0l-139.968-139.968L153.365333 946.730667c-38.528 28.48-86.677333-18.133333-61.44-57.109334l1.706667-2.474666 234.154667-318.442667-136.810667-136.832-4.906667-5.12a42.666667 42.666667 0 0 1 2.496-57.6c62.272-62.293333 139.157333-71.445333 222.122667-34.304l2.922667 1.344zM795.733333 313.024l-68.138666-68.117333-0.96 3.136a42.666667 42.666667 0 0 1-19.52 23.04L435.306667 421.76a42.666667 42.666667 0 0 1-41.216 0.085333c-42.197333-23.146667-76.565333-29.290667-106.581334-18.218666l-2.944 1.173333 129.493334 129.493333a42.666667 42.666667 0 0 1 4.202666 55.466667l-88.661333 120.533333 120.213333-88.853333a42.666667 42.666667 0 0 1 52.821334 1.642667l2.709333 2.496 130.282667 130.282666 1.685333-4.522666c8.917333-27.008 3.242667-58.24-16.704-100.608l-2.944-6.144A42.666667 42.666667 0 0 1 618.666667 605.077333l150.912-271.573333a42.666667 42.666667 0 0 1 23.018666-19.498667l3.157334-0.981333z" }) }), Qa = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ h("path", { d: "M342.464 368.576l73.344 42.368-8.512 7.936a32 32 0 0 1-14.272 7.68l-5.44 0.832-2.88 0.192-19.456 2.24a442.88 442.88 0 0 0-53.504 10.688 245.12 245.12 0 0 0-64.32 25.984l-7.488 4.928 150.144 86.784a32 32 0 0 1 15.808 31.168l-1.024 5.312-61.568 215.168 155.584-160.896a32 32 0 0 1 34.112-7.744l4.928 2.304 152.32 87.872 1.472-8.192c4.992-38.272-7.68-83.456-31.552-128.832l-6.784-12.416a32 32 0 0 1-3.456-23.04l2.56-11.328 78.016 44.992c27.328 61.44 36.672 122.816 15.168 177.856l-5.12 11.84-6.208 11.648a32 32 0 0 1-43.712 11.712l-163.072-94.272-227.2 235.072c-21.632 22.336-57.728 3.84-55.04-24.768l1.28-6.272L336.448 600.96l-163.072-94.08a32 32 0 0 1-14.144-38.464l2.432-5.248c23.936-41.6 71.36-67.84 133.504-84.48 20.48-5.568 41.28-9.6 61.312-12.288l-14.016 2.112zM267.968 218.688l609.664 352a32 32 0 1 1-32 55.424l-609.664-352a32 32 0 1 1 32-55.424z m258.816-106.24a32 32 0 0 1 40.384-42.752l5.056 2.432 295.552 170.624a32 32 0 0 1-12.16 59.52l-83.584 9.984-31.68 138.24-57.984-33.408 32.32-140.992a32 32 0 0 1 21.76-23.424l5.632-1.216 10.56-1.344-129.28-74.624 4.16 9.856a32 32 0 0 1-3.84 31.808l-3.84 4.224L513.92 319.808l-57.984-33.472 104-96.64z" }) }), cd = () => /* @__PURE__ */ h(
|
|
3076
3076
|
"svg",
|
|
3077
3077
|
{
|
|
3078
3078
|
className: "icon",
|
|
@@ -3123,7 +3123,7 @@ const Qu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3123
3123
|
/* @__PURE__ */ h("path", { d: "M12 17h.01" })
|
|
3124
3124
|
]
|
|
3125
3125
|
}
|
|
3126
|
-
),
|
|
3126
|
+
), dr = /* @__PURE__ */ h(
|
|
3127
3127
|
"svg",
|
|
3128
3128
|
{
|
|
3129
3129
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3140,7 +3140,7 @@ const Qu = () => /* @__PURE__ */ h("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3140
3140
|
style: "margin-left: 6px;",
|
|
3141
3141
|
children: /* @__PURE__ */ h("path", { d: "M20 6 9 17l-5-5" })
|
|
3142
3142
|
}
|
|
3143
|
-
),
|
|
3143
|
+
), hr = /* @__PURE__ */ h(
|
|
3144
3144
|
"svg",
|
|
3145
3145
|
{
|
|
3146
3146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3853,7 +3853,7 @@ class Zg {
|
|
|
3853
3853
|
* @private
|
|
3854
3854
|
* @memberof I18n
|
|
3855
3855
|
*/
|
|
3856
|
-
_(this, "locale",
|
|
3856
|
+
_(this, "locale", X(
|
|
3857
3857
|
"zh-CN"
|
|
3858
3858
|
/* ZH_CN */
|
|
3859
3859
|
));
|
|
@@ -3951,7 +3951,7 @@ const Ao = (n) => {
|
|
|
3951
3951
|
title: k.t.value("copy"),
|
|
3952
3952
|
className: t.e("copy"),
|
|
3953
3953
|
onClick: (d) => l(d),
|
|
3954
|
-
children: o.value ?
|
|
3954
|
+
children: o.value ? dr : hr
|
|
3955
3955
|
}
|
|
3956
3956
|
)
|
|
3957
3957
|
]
|
|
@@ -4063,7 +4063,7 @@ const e2 = (n) => {
|
|
|
4063
4063
|
title: k.t.value("copy"),
|
|
4064
4064
|
className: e.e("copy"),
|
|
4065
4065
|
onClick: (f) => o(f),
|
|
4066
|
-
children: i.value ?
|
|
4066
|
+
children: i.value ? dr : hr
|
|
4067
4067
|
}
|
|
4068
4068
|
),
|
|
4069
4069
|
/* @__PURE__ */ h(
|
|
@@ -4223,7 +4223,7 @@ const t2 = (n) => {
|
|
|
4223
4223
|
title: k.t.value("copy"),
|
|
4224
4224
|
className: e.e("copy"),
|
|
4225
4225
|
onClick: (g) => a(g),
|
|
4226
|
-
children: r.value ?
|
|
4226
|
+
children: r.value ? dr : hr
|
|
4227
4227
|
}
|
|
4228
4228
|
),
|
|
4229
4229
|
/* @__PURE__ */ h(
|
|
@@ -4344,7 +4344,7 @@ const i2 = (n) => {
|
|
|
4344
4344
|
title: k.t.value("copy"),
|
|
4345
4345
|
className: e.e("copy"),
|
|
4346
4346
|
onClick: (p) => a(p),
|
|
4347
|
-
children: r.value ?
|
|
4347
|
+
children: r.value ? dr : hr
|
|
4348
4348
|
}
|
|
4349
4349
|
),
|
|
4350
4350
|
/* @__PURE__ */ h(
|
|
@@ -4424,7 +4424,7 @@ const Io = (n) => {
|
|
|
4424
4424
|
n.toolcallCompleted && a.value && /* @__PURE__ */ h("div", { className: r.e("toggle"), onClick: u, children: /* @__PURE__ */ h("span", { className: r.e("toggle-label"), children: o.value ? k.t.value("toolCallContraction") : k.t.value("toolCallExpansion") }) })
|
|
4425
4425
|
] });
|
|
4426
4426
|
};
|
|
4427
|
-
const
|
|
4427
|
+
const vi = new P("chat-search"), Oo = (n) => {
|
|
4428
4428
|
const {
|
|
4429
4429
|
value: e,
|
|
4430
4430
|
className: t,
|
|
@@ -4447,15 +4447,15 @@ const yi = new P("chat-search"), Oo = (n) => {
|
|
|
4447
4447
|
return /* @__PURE__ */ h(
|
|
4448
4448
|
"div",
|
|
4449
4449
|
{
|
|
4450
|
-
className: "".concat(
|
|
4450
|
+
className: "".concat(vi.b(), " ").concat(vi.is("focus", a), " ").concat(t || ""),
|
|
4451
4451
|
children: [
|
|
4452
|
-
/* @__PURE__ */ h("div", { className:
|
|
4452
|
+
/* @__PURE__ */ h("div", { className: vi.e("prefix"), children: /* @__PURE__ */ h($g, {}) }),
|
|
4453
4453
|
/* @__PURE__ */ h(
|
|
4454
4454
|
"input",
|
|
4455
4455
|
{
|
|
4456
4456
|
value: e,
|
|
4457
4457
|
ref: c,
|
|
4458
|
-
className:
|
|
4458
|
+
className: vi.e("inner"),
|
|
4459
4459
|
placeholder: i,
|
|
4460
4460
|
onFocus: () => l(!0),
|
|
4461
4461
|
onBlur: () => l(!1),
|
|
@@ -4492,7 +4492,7 @@ const we = new P("chat-single-select"), Do = (n) => {
|
|
|
4492
4492
|
icon: c,
|
|
4493
4493
|
onChange: u,
|
|
4494
4494
|
onSearch: d
|
|
4495
|
-
} = n, f = !!t.length, p = F(null), m = F(null), v = $(""), [y, g] = V(e), [b, w] = V(t), [C, x] = V(!1), [S, M] = V(!1), A = ((ut = t.find((q) => q.value === y)) == null ? void 0 : ut.label) || l;
|
|
4495
|
+
} = n, f = !!t.length && !s, p = F(null), m = F(null), v = $(""), [y, g] = V(e), [b, w] = V(t), [C, x] = V(!1), [S, M] = V(!1), A = ((ut = t.find((q) => q.value === y)) == null ? void 0 : ut.label) || l;
|
|
4496
4496
|
L(() => {
|
|
4497
4497
|
C === !1 && (v.value = "", w(t));
|
|
4498
4498
|
}, [C]), L(() => {
|
|
@@ -4501,8 +4501,8 @@ const we = new P("chat-single-select"), Do = (n) => {
|
|
|
4501
4501
|
w(t);
|
|
4502
4502
|
}, [t]), L(() => {
|
|
4503
4503
|
const q = (le) => {
|
|
4504
|
-
var
|
|
4505
|
-
!f || s || (
|
|
4504
|
+
var li, oa;
|
|
4505
|
+
!f || s || (li = m.current) != null && li.contains(le.target) || ((oa = p.current) != null && oa.contains(le.target) ? x((Nf) => !Nf) : x(!1));
|
|
4506
4506
|
};
|
|
4507
4507
|
return document.addEventListener("mousedown", q), () => {
|
|
4508
4508
|
document.removeEventListener("mousedown", q);
|
|
@@ -4517,7 +4517,7 @@ const we = new P("chat-single-select"), Do = (n) => {
|
|
|
4517
4517
|
M(!0);
|
|
4518
4518
|
let le = [];
|
|
4519
4519
|
d ? le = await d(q) : le = t.filter(
|
|
4520
|
-
(
|
|
4520
|
+
(li) => li.label.toLowerCase().includes(q.toLowerCase())
|
|
4521
4521
|
), w(le);
|
|
4522
4522
|
} catch (le) {
|
|
4523
4523
|
w([]), console.error(k.t.value("searchFailed"), le);
|
|
@@ -4745,20 +4745,20 @@ function gd(n, e, t) {
|
|
|
4745
4745
|
return gd(i, e, t);
|
|
4746
4746
|
}), n.__c && n.__c.__P === e && (n.__e && t.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
4747
4747
|
}
|
|
4748
|
-
function
|
|
4748
|
+
function Jr() {
|
|
4749
4749
|
this.__u = 0, this.o = null, this.__b = null;
|
|
4750
4750
|
}
|
|
4751
4751
|
function vd(n) {
|
|
4752
4752
|
var e = n.__.__c;
|
|
4753
4753
|
return e && e.__a && e.__a(n);
|
|
4754
4754
|
}
|
|
4755
|
-
function
|
|
4755
|
+
function yi() {
|
|
4756
4756
|
this.i = null, this.l = null;
|
|
4757
4757
|
}
|
|
4758
4758
|
R.unmount = function(n) {
|
|
4759
4759
|
var e = n.__c;
|
|
4760
4760
|
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), al && al(n);
|
|
4761
|
-
}, (
|
|
4761
|
+
}, (Jr.prototype = new ze()).__c = function(n, e) {
|
|
4762
4762
|
var t = e.__c, i = this;
|
|
4763
4763
|
i.o == null && (i.o = []), i.o.push(t);
|
|
4764
4764
|
var r = vd(i.__v), s = !1, o = function() {
|
|
@@ -4777,9 +4777,9 @@ R.unmount = function(n) {
|
|
|
4777
4777
|
}
|
|
4778
4778
|
};
|
|
4779
4779
|
i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(o, o);
|
|
4780
|
-
},
|
|
4780
|
+
}, Jr.prototype.componentWillUnmount = function() {
|
|
4781
4781
|
this.o = [];
|
|
4782
|
-
},
|
|
4782
|
+
}, Jr.prototype.render = function(n, e) {
|
|
4783
4783
|
if (this.__b) {
|
|
4784
4784
|
if (this.__v.__k) {
|
|
4785
4785
|
var t = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
@@ -4826,7 +4826,7 @@ function u2(n, e) {
|
|
|
4826
4826
|
var t = ke(c2, { __v: n, h: e });
|
|
4827
4827
|
return t.containerInfo = e, t;
|
|
4828
4828
|
}
|
|
4829
|
-
(
|
|
4829
|
+
(yi.prototype = new ze()).__a = function(n) {
|
|
4830
4830
|
var e = this, t = vd(e.__v), i = e.l.get(n);
|
|
4831
4831
|
return i[0]++, function(r) {
|
|
4832
4832
|
var s = function() {
|
|
@@ -4834,14 +4834,14 @@ function u2(n, e) {
|
|
|
4834
4834
|
};
|
|
4835
4835
|
t ? t(s) : s();
|
|
4836
4836
|
};
|
|
4837
|
-
},
|
|
4837
|
+
}, yi.prototype.render = function(n) {
|
|
4838
4838
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
4839
|
-
var e =
|
|
4839
|
+
var e = Hi(n.children);
|
|
4840
4840
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
4841
4841
|
for (var t = e.length; t--; )
|
|
4842
4842
|
this.l.set(e[t], this.i = [1, 0, this.i]);
|
|
4843
4843
|
return n.children;
|
|
4844
|
-
},
|
|
4844
|
+
}, yi.prototype.componentDidUpdate = yi.prototype.componentDidMount = function() {
|
|
4845
4845
|
var n = this;
|
|
4846
4846
|
this.l.forEach(function(e, t) {
|
|
4847
4847
|
ll(n, t, e);
|
|
@@ -4882,9 +4882,9 @@ R.vnode = function(n) {
|
|
|
4882
4882
|
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : l === "translate" && a === "no" ? a = !1 : l[0] === "o" && l[1] === "n" ? l === "ondoubleclick" ? o = "ondblclick" : l !== "onchange" || i !== "input" && i !== "textarea" || g2(t.type) ? l === "onfocus" ? o = "onfocusin" : l === "onblur" ? o = "onfocusout" : f2.test(o) && (o = l) : l = o = "oninput" : s && h2.test(o) ? o = o.replace(p2, "-$&").toLowerCase() : a === null && (a = void 0), l === "oninput" && r[o = l] && (o = "oninputCapture"), r[o] = a;
|
|
4883
4883
|
}
|
|
4884
4884
|
}
|
|
4885
|
-
i == "select" && r.multiple && Array.isArray(r.value) && (r.value =
|
|
4885
|
+
i == "select" && r.multiple && Array.isArray(r.value) && (r.value = Hi(t.children).forEach(function(c) {
|
|
4886
4886
|
c.props.selected = r.value.indexOf(c.props.value) != -1;
|
|
4887
|
-
})), i == "select" && r.defaultValue != null && (r.value =
|
|
4887
|
+
})), i == "select" && r.defaultValue != null && (r.value = Hi(t.children).forEach(function(c) {
|
|
4888
4888
|
c.props.selected = r.multiple ? r.defaultValue.indexOf(c.props.value) != -1 : r.defaultValue == c.props.value;
|
|
4889
4889
|
})), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", w2)) : (t.className && !t.class || t.class && t.className) && (r.class = r.className = t.className), e.props = r;
|
|
4890
4890
|
}(n), n.$$typeof = d2, ul && ul(n);
|
|
@@ -4911,7 +4911,7 @@ const jn = ({
|
|
|
4911
4911
|
onAction: a
|
|
4912
4912
|
// 接收行为事件回调
|
|
4913
4913
|
}) => {
|
|
4914
|
-
const l = new P("pop"), c = Co(
|
|
4914
|
+
const l = new P("pop"), c = Co(_r), [u, d] = V(s || !1), f = F(null), p = F(null), m = F(null);
|
|
4915
4915
|
L(() => {
|
|
4916
4916
|
s !== void 0 && d(s);
|
|
4917
4917
|
}, [s]), L(() => (p.current || (p.current = document.createElement("div"), p.current.className = l.b("content-container"), document.body.appendChild(p.current)), () => {
|
|
@@ -5051,7 +5051,7 @@ const Q = new P("messsage-toolbar"), C2 = (n) => {
|
|
|
5051
5051
|
if ((v = m.icon) != null && v.showIcon && ((y = m.icon) != null && y.cssClass))
|
|
5052
5052
|
return /* @__PURE__ */ h("i", { className: m.icon.cssClass });
|
|
5053
5053
|
if ((g = m.icon) != null && g.showIcon && ((b = m.icon) != null && b.imagePath))
|
|
5054
|
-
return
|
|
5054
|
+
return ni(m.icon.imagePath) ? /* @__PURE__ */ h(
|
|
5055
5055
|
"div",
|
|
5056
5056
|
{
|
|
5057
5057
|
dangerouslySetInnerHTML: {
|
|
@@ -5184,7 +5184,7 @@ const Q = new P("messsage-toolbar"), C2 = (n) => {
|
|
|
5184
5184
|
);
|
|
5185
5185
|
}
|
|
5186
5186
|
);
|
|
5187
|
-
const
|
|
5187
|
+
const bi = new P("chat-slider"), pl = (n) => {
|
|
5188
5188
|
const {
|
|
5189
5189
|
step: e = 1,
|
|
5190
5190
|
min: t = 0,
|
|
@@ -5212,16 +5212,16 @@ const wi = new P("chat-slider"), pl = (n) => {
|
|
|
5212
5212
|
c.current.onButtonDown(m);
|
|
5213
5213
|
}, 0));
|
|
5214
5214
|
};
|
|
5215
|
-
return /* @__PURE__ */ h("div", { className: "".concat(
|
|
5215
|
+
return /* @__PURE__ */ h("div", { className: "".concat(bi.b(), " ").concat(o), title: "".concat(u.value), children: [
|
|
5216
5216
|
/* @__PURE__ */ h(
|
|
5217
5217
|
"div",
|
|
5218
5218
|
{
|
|
5219
5219
|
ref: l,
|
|
5220
|
-
className:
|
|
5220
|
+
className: bi.e("runway"),
|
|
5221
5221
|
onMouseDown: p,
|
|
5222
5222
|
onTouchStart: p,
|
|
5223
5223
|
children: [
|
|
5224
|
-
/* @__PURE__ */ h("div", { className:
|
|
5224
|
+
/* @__PURE__ */ h("div", { className: bi.e("bar"), style: d.value }),
|
|
5225
5225
|
/* @__PURE__ */ h(
|
|
5226
5226
|
k2,
|
|
5227
5227
|
{
|
|
@@ -5236,10 +5236,10 @@ const wi = new P("chat-slider"), pl = (n) => {
|
|
|
5236
5236
|
]
|
|
5237
5237
|
}
|
|
5238
5238
|
),
|
|
5239
|
-
s ? /* @__PURE__ */ h("div", { className:
|
|
5239
|
+
s ? /* @__PURE__ */ h("div", { className: bi.e("text"), children: u.value }) : void 0
|
|
5240
5240
|
] });
|
|
5241
5241
|
};
|
|
5242
|
-
const
|
|
5242
|
+
const wi = new P("chat-switch"), x2 = (n) => {
|
|
5243
5243
|
const { value: e, className: t = "", showText: i = !1, onChange: r } = n, [s, o] = V(void 0), [a, l] = V(e);
|
|
5244
5244
|
L(() => {
|
|
5245
5245
|
l(e);
|
|
@@ -5248,15 +5248,15 @@ const Ci = new P("chat-switch"), x2 = (n) => {
|
|
|
5248
5248
|
let u;
|
|
5249
5249
|
a === void 0 && (u = s === 1 ? 0 : 1), o(a), l(u), r == null || r(u);
|
|
5250
5250
|
};
|
|
5251
|
-
return /* @__PURE__ */ h("div", { className: "".concat(
|
|
5251
|
+
return /* @__PURE__ */ h("div", { className: "".concat(wi.b(), " ").concat(t), children: [
|
|
5252
5252
|
/* @__PURE__ */ h(
|
|
5253
5253
|
"div",
|
|
5254
5254
|
{
|
|
5255
5255
|
onClick: c,
|
|
5256
|
-
className: "".concat(
|
|
5256
|
+
className: "".concat(wi.e("wrapper"), " ").concat(wi.is(a === 0 ? "left" : a === 1 ? "right" : "center", !0))
|
|
5257
5257
|
}
|
|
5258
5258
|
),
|
|
5259
|
-
i ? /* @__PURE__ */ h("div", { className:
|
|
5259
|
+
i ? /* @__PURE__ */ h("div", { className: wi.e("text"), children: [
|
|
5260
5260
|
a === 0 ? k.t.value("disabled") : void 0,
|
|
5261
5261
|
a === 1 ? k.t.value("enable") : void 0
|
|
5262
5262
|
] }) : void 0
|
|
@@ -5375,7 +5375,7 @@ const qe = new P("chat-step-item"), S2 = (n) => {
|
|
|
5375
5375
|
}
|
|
5376
5376
|
);
|
|
5377
5377
|
};
|
|
5378
|
-
const
|
|
5378
|
+
const Ci = new P("chat-step"), yd = (n) => {
|
|
5379
5379
|
const { items: e } = n, t = $(!1), i = $(!0), r = $([]);
|
|
5380
5380
|
L(() => {
|
|
5381
5381
|
t.value = e.length > 1, r.value = t.value && !i.value ? [e[e.length - 1]] : e;
|
|
@@ -5383,8 +5383,8 @@ const ki = new P("chat-step"), yd = (n) => {
|
|
|
5383
5383
|
const s = () => {
|
|
5384
5384
|
i.value = !i.value, r.value = t.value && !i.value ? [e[e.length - 1]] : e;
|
|
5385
5385
|
};
|
|
5386
|
-
return /* @__PURE__ */ h("div", { className: "".concat(
|
|
5387
|
-
/* @__PURE__ */ h("div", { className:
|
|
5386
|
+
return /* @__PURE__ */ h("div", { className: "".concat(Ci.b()), children: [
|
|
5387
|
+
/* @__PURE__ */ h("div", { className: Ci.e("container"), children: r.value.map((o, a) => /* @__PURE__ */ h(
|
|
5388
5388
|
S2,
|
|
5389
5389
|
{
|
|
5390
5390
|
element: o,
|
|
@@ -5393,7 +5393,7 @@ const ki = new P("chat-step"), yd = (n) => {
|
|
|
5393
5393
|
},
|
|
5394
5394
|
"".concat(o.title, "_").concat(o.content, "_").concat(a)
|
|
5395
5395
|
)) }),
|
|
5396
|
-
t.value && /* @__PURE__ */ h("div", { className:
|
|
5396
|
+
t.value && /* @__PURE__ */ h("div", { className: Ci.e("toggle"), onClick: s, children: /* @__PURE__ */ h("span", { className: Ci.e("toggle-label"), children: i.value ? k.t.value("stepFoldUp") : k.t.value("stepExpand") }) })
|
|
5397
5397
|
] });
|
|
5398
5398
|
};
|
|
5399
5399
|
const Zt = new P("ossfile-material"), T2 = (n) => {
|
|
@@ -5483,7 +5483,7 @@ const Qt = new P("common-material"), M2 = (n) => {
|
|
|
5483
5483
|
}
|
|
5484
5484
|
};
|
|
5485
5485
|
return /* @__PURE__ */ h("div", { className: Qt.b(), children: [
|
|
5486
|
-
/* @__PURE__ */ h("div", { className: Qt.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((o = e.icon) == null ? void 0 : o.showIcon) && /* @__PURE__ */ h(We, { children: (a = e.icon) != null && a.cssClass ? /* @__PURE__ */ h("i", { className: e.icon.cssClass }) : (l = e.icon) != null && l.imagePath ?
|
|
5486
|
+
/* @__PURE__ */ h("div", { className: Qt.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((o = e.icon) == null ? void 0 : o.showIcon) && /* @__PURE__ */ h(We, { children: (a = e.icon) != null && a.cssClass ? /* @__PURE__ */ h("i", { className: e.icon.cssClass }) : (l = e.icon) != null && l.imagePath ? ni(e.icon.imagePath) ? /* @__PURE__ */ h(
|
|
5487
5487
|
"div",
|
|
5488
5488
|
{
|
|
5489
5489
|
dangerouslySetInnerHTML: {
|
|
@@ -5508,7 +5508,7 @@ const Qt = new P("common-material"), M2 = (n) => {
|
|
|
5508
5508
|
] })
|
|
5509
5509
|
] });
|
|
5510
5510
|
};
|
|
5511
|
-
const
|
|
5511
|
+
const Gr = new P("chat-input-material-item"), fr = (n) => {
|
|
5512
5512
|
const { material: e } = n;
|
|
5513
5513
|
let t = null;
|
|
5514
5514
|
switch (e.type) {
|
|
@@ -5521,8 +5521,8 @@ const Yr = new P("chat-input-material-item"), mr = (n) => {
|
|
|
5521
5521
|
const i = () => {
|
|
5522
5522
|
n.controller.deleteMaterial(e);
|
|
5523
5523
|
};
|
|
5524
|
-
return /* @__PURE__ */ h("div", { className: "".concat(
|
|
5525
|
-
/* @__PURE__ */ h("div", { className:
|
|
5524
|
+
return /* @__PURE__ */ h("div", { className: "".concat(Gr.b(), " ").concat(Gr.is("disabled", n.disabled)), children: [
|
|
5525
|
+
/* @__PURE__ */ h("div", { className: Gr.e("icon"), onClick: i, children: /* @__PURE__ */ h(Ng, {}) }),
|
|
5526
5526
|
ke(t, {
|
|
5527
5527
|
material: e,
|
|
5528
5528
|
controller: n.controller
|
|
@@ -5662,7 +5662,7 @@ const Et = new P("markdown-message"), _2 = (n) => {
|
|
|
5662
5662
|
] }),
|
|
5663
5663
|
/* @__PURE__ */ h("div", { className: "".concat(Et.b("content"), " pre-wrap-container"), children: [
|
|
5664
5664
|
o.value.hasResources && /* @__PURE__ */ h("div", { className: "content-material-container", children: o.value.resources.map((w) => /* @__PURE__ */ h(
|
|
5665
|
-
|
|
5665
|
+
fr,
|
|
5666
5666
|
{
|
|
5667
5667
|
material: w,
|
|
5668
5668
|
disabled: !0,
|
|
@@ -6056,15 +6056,15 @@ class T {
|
|
|
6056
6056
|
*/
|
|
6057
6057
|
findIndex(e) {
|
|
6058
6058
|
if (e == 0)
|
|
6059
|
-
return
|
|
6059
|
+
return ki(0, e);
|
|
6060
6060
|
if (e == this.size)
|
|
6061
|
-
return
|
|
6061
|
+
return ki(this.content.length, e);
|
|
6062
6062
|
if (e > this.size || e < 0)
|
|
6063
6063
|
throw new RangeError("Position ".concat(e, " outside of fragment (").concat(this, ")"));
|
|
6064
6064
|
for (let t = 0, i = 0; ; t++) {
|
|
6065
6065
|
let r = this.child(t), s = i + r.nodeSize;
|
|
6066
6066
|
if (s >= e)
|
|
6067
|
-
return s == e ?
|
|
6067
|
+
return s == e ? ki(t + 1, s) : ki(t, i);
|
|
6068
6068
|
i = s;
|
|
6069
6069
|
}
|
|
6070
6070
|
}
|
|
@@ -6129,11 +6129,11 @@ class T {
|
|
|
6129
6129
|
}
|
|
6130
6130
|
}
|
|
6131
6131
|
T.empty = new T([], 0);
|
|
6132
|
-
const
|
|
6133
|
-
function
|
|
6134
|
-
return
|
|
6132
|
+
const Xr = { index: 0, offset: 0 };
|
|
6133
|
+
function ki(n, e) {
|
|
6134
|
+
return Xr.index = n, Xr.offset = e, Xr;
|
|
6135
6135
|
}
|
|
6136
|
-
function
|
|
6136
|
+
function Ui(n, e) {
|
|
6137
6137
|
if (n === e)
|
|
6138
6138
|
return !0;
|
|
6139
6139
|
if (!(n && typeof n == "object") || !(e && typeof e == "object"))
|
|
@@ -6145,11 +6145,11 @@ function qi(n, e) {
|
|
|
6145
6145
|
if (n.length != e.length)
|
|
6146
6146
|
return !1;
|
|
6147
6147
|
for (let i = 0; i < n.length; i++)
|
|
6148
|
-
if (!
|
|
6148
|
+
if (!Ui(n[i], e[i]))
|
|
6149
6149
|
return !1;
|
|
6150
6150
|
} else {
|
|
6151
6151
|
for (let i in n)
|
|
6152
|
-
if (!(i in e) || !
|
|
6152
|
+
if (!(i in e) || !Ui(n[i], e[i]))
|
|
6153
6153
|
return !1;
|
|
6154
6154
|
for (let i in e)
|
|
6155
6155
|
if (!(i in n))
|
|
@@ -6157,7 +6157,7 @@ function qi(n, e) {
|
|
|
6157
6157
|
}
|
|
6158
6158
|
return !0;
|
|
6159
6159
|
}
|
|
6160
|
-
let J = class
|
|
6160
|
+
let J = class zs {
|
|
6161
6161
|
/**
|
|
6162
6162
|
@internal
|
|
6163
6163
|
*/
|
|
@@ -6211,7 +6211,7 @@ let J = class Fs {
|
|
|
6211
6211
|
another mark.
|
|
6212
6212
|
*/
|
|
6213
6213
|
eq(e) {
|
|
6214
|
-
return this == e || this.type == e.type &&
|
|
6214
|
+
return this == e || this.type == e.type && Ui(this.attrs, e.attrs);
|
|
6215
6215
|
}
|
|
6216
6216
|
/**
|
|
6217
6217
|
Convert this mark to a JSON-serializeable representation.
|
|
@@ -6255,15 +6255,15 @@ let J = class Fs {
|
|
|
6255
6255
|
*/
|
|
6256
6256
|
static setFrom(e) {
|
|
6257
6257
|
if (!e || Array.isArray(e) && e.length == 0)
|
|
6258
|
-
return
|
|
6259
|
-
if (e instanceof
|
|
6258
|
+
return zs.none;
|
|
6259
|
+
if (e instanceof zs)
|
|
6260
6260
|
return [e];
|
|
6261
6261
|
let t = e.slice();
|
|
6262
6262
|
return t.sort((i, r) => i.type.rank - r.type.rank), t;
|
|
6263
6263
|
}
|
|
6264
6264
|
};
|
|
6265
6265
|
J.none = [];
|
|
6266
|
-
class
|
|
6266
|
+
class qi extends Error {
|
|
6267
6267
|
}
|
|
6268
6268
|
class N {
|
|
6269
6269
|
/**
|
|
@@ -6366,9 +6366,9 @@ function kd(n, e, t, i) {
|
|
|
6366
6366
|
}
|
|
6367
6367
|
function N2(n, e, t) {
|
|
6368
6368
|
if (t.openStart > n.depth)
|
|
6369
|
-
throw new
|
|
6369
|
+
throw new qi("Inserted content deeper than insertion position");
|
|
6370
6370
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
6371
|
-
throw new
|
|
6371
|
+
throw new qi("Inconsistent open depths");
|
|
6372
6372
|
return xd(n, e, t, 0);
|
|
6373
6373
|
}
|
|
6374
6374
|
function xd(n, e, t, i) {
|
|
@@ -6385,13 +6385,13 @@ function xd(n, e, t, i) {
|
|
|
6385
6385
|
return zt(s, Td(n, o, a, e, i));
|
|
6386
6386
|
}
|
|
6387
6387
|
else
|
|
6388
|
-
return zt(s,
|
|
6388
|
+
return zt(s, Ki(n, e, i));
|
|
6389
6389
|
}
|
|
6390
6390
|
function Sd(n, e) {
|
|
6391
6391
|
if (!e.type.compatibleContent(n.type))
|
|
6392
|
-
throw new
|
|
6392
|
+
throw new qi("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
6393
6393
|
}
|
|
6394
|
-
function
|
|
6394
|
+
function Bs(n, e, t) {
|
|
6395
6395
|
let i = n.node(t);
|
|
6396
6396
|
return Sd(i, e.node(t)), i;
|
|
6397
6397
|
}
|
|
@@ -6410,14 +6410,14 @@ function zt(n, e) {
|
|
|
6410
6410
|
return n.type.checkContent(e), n.copy(e);
|
|
6411
6411
|
}
|
|
6412
6412
|
function Td(n, e, t, i, r) {
|
|
6413
|
-
let s = n.depth > r &&
|
|
6414
|
-
return $n(null, n, r, a), s && o && e.index(r) == t.index(r) ? (Sd(s, o), Lt(zt(s, Td(n, e, t, i, r + 1)), a)) : (s && Lt(zt(s,
|
|
6413
|
+
let s = n.depth > r && Bs(n, e, r + 1), o = i.depth > r && Bs(t, i, r + 1), a = [];
|
|
6414
|
+
return $n(null, n, r, a), s && o && e.index(r) == t.index(r) ? (Sd(s, o), Lt(zt(s, Td(n, e, t, i, r + 1)), a)) : (s && Lt(zt(s, Ki(n, e, r + 1)), a), $n(e, t, r, a), o && Lt(zt(o, Ki(t, i, r + 1)), a)), $n(i, null, r, a), new T(a);
|
|
6415
6415
|
}
|
|
6416
|
-
function
|
|
6416
|
+
function Ki(n, e, t) {
|
|
6417
6417
|
let i = [];
|
|
6418
6418
|
if ($n(null, n, t, i), n.depth > t) {
|
|
6419
|
-
let r =
|
|
6420
|
-
Lt(zt(r,
|
|
6419
|
+
let r = Bs(n, e, t + 1);
|
|
6420
|
+
Lt(zt(r, Ki(n, e, t + 1)), i);
|
|
6421
6421
|
}
|
|
6422
6422
|
return $n(e, null, t, i), new T(i);
|
|
6423
6423
|
}
|
|
@@ -6615,7 +6615,7 @@ class Wn {
|
|
|
6615
6615
|
return e.blockRange(this);
|
|
6616
6616
|
for (let i = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); i >= 0; i--)
|
|
6617
6617
|
if (e.pos <= this.end(i) && (!t || t(this.node(i))))
|
|
6618
|
-
return new
|
|
6618
|
+
return new Ji(this, e, i);
|
|
6619
6619
|
return null;
|
|
6620
6620
|
}
|
|
6621
6621
|
/**
|
|
@@ -6683,7 +6683,7 @@ class A2 {
|
|
|
6683
6683
|
}
|
|
6684
6684
|
}
|
|
6685
6685
|
const I2 = 12, ml = /* @__PURE__ */ new WeakMap();
|
|
6686
|
-
class
|
|
6686
|
+
class Ji {
|
|
6687
6687
|
/**
|
|
6688
6688
|
Construct a node range. `$from` and `$to` should point into the
|
|
6689
6689
|
same node until at least the given `depth`, since a node range
|
|
@@ -6724,7 +6724,7 @@ class Gi {
|
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
6726
|
const O2 = /* @__PURE__ */ Object.create(null);
|
|
6727
|
-
let wt = class
|
|
6727
|
+
let wt = class Fs {
|
|
6728
6728
|
/**
|
|
6729
6729
|
@internal
|
|
6730
6730
|
*/
|
|
@@ -6842,21 +6842,21 @@ let wt = class Hs {
|
|
|
6842
6842
|
attributes, and marks.
|
|
6843
6843
|
*/
|
|
6844
6844
|
hasMarkup(e, t, i) {
|
|
6845
|
-
return this.type == e &&
|
|
6845
|
+
return this.type == e && Ui(this.attrs, t || e.defaultAttrs || O2) && J.sameSet(this.marks, i || J.none);
|
|
6846
6846
|
}
|
|
6847
6847
|
/**
|
|
6848
6848
|
Create a new node with the same markup as this node, containing
|
|
6849
6849
|
the given content (or empty, if no content is given).
|
|
6850
6850
|
*/
|
|
6851
6851
|
copy(e = null) {
|
|
6852
|
-
return e == this.content ? this : new
|
|
6852
|
+
return e == this.content ? this : new Fs(this.type, this.attrs, e, this.marks);
|
|
6853
6853
|
}
|
|
6854
6854
|
/**
|
|
6855
6855
|
Create a copy of this node, with the given set of marks instead
|
|
6856
6856
|
of the node's own marks.
|
|
6857
6857
|
*/
|
|
6858
6858
|
mark(e) {
|
|
6859
|
-
return e == this.marks ? this : new
|
|
6859
|
+
return e == this.marks ? this : new Fs(this.type, this.attrs, this.content, e);
|
|
6860
6860
|
}
|
|
6861
6861
|
/**
|
|
6862
6862
|
Create a copy of this node with only the content between the
|
|
@@ -7094,7 +7094,7 @@ let wt = class Hs {
|
|
|
7094
7094
|
}
|
|
7095
7095
|
};
|
|
7096
7096
|
wt.prototype.text = void 0;
|
|
7097
|
-
class
|
|
7097
|
+
class Gi extends wt {
|
|
7098
7098
|
/**
|
|
7099
7099
|
@internal
|
|
7100
7100
|
*/
|
|
@@ -7116,10 +7116,10 @@ class Xi extends wt {
|
|
|
7116
7116
|
return this.text.length;
|
|
7117
7117
|
}
|
|
7118
7118
|
mark(e) {
|
|
7119
|
-
return e == this.marks ? this : new
|
|
7119
|
+
return e == this.marks ? this : new Gi(this.type, this.attrs, this.text, e);
|
|
7120
7120
|
}
|
|
7121
7121
|
withText(e) {
|
|
7122
|
-
return e == this.text ? this : new
|
|
7122
|
+
return e == this.text ? this : new Gi(this.type, this.attrs, e, this.marks);
|
|
7123
7123
|
}
|
|
7124
7124
|
cut(e = 0, t = this.text.length) {
|
|
7125
7125
|
return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
|
|
@@ -7715,7 +7715,7 @@ class j2 {
|
|
|
7715
7715
|
return !this.hasDefault;
|
|
7716
7716
|
}
|
|
7717
7717
|
}
|
|
7718
|
-
class
|
|
7718
|
+
class pr {
|
|
7719
7719
|
/**
|
|
7720
7720
|
@internal
|
|
7721
7721
|
*/
|
|
@@ -7737,7 +7737,7 @@ class gr {
|
|
|
7737
7737
|
*/
|
|
7738
7738
|
static compile(e, t) {
|
|
7739
7739
|
let i = /* @__PURE__ */ Object.create(null), r = 0;
|
|
7740
|
-
return e.forEach((s, o) => i[s] = new
|
|
7740
|
+
return e.forEach((s, o) => i[s] = new pr(s, r++, t, o)), i;
|
|
7741
7741
|
}
|
|
7742
7742
|
/**
|
|
7743
7743
|
When there is a mark of this type in the given set, a new set
|
|
@@ -7779,7 +7779,7 @@ class $d {
|
|
|
7779
7779
|
let t = this.spec = {};
|
|
7780
7780
|
for (let r in e)
|
|
7781
7781
|
t[r] = e[r];
|
|
7782
|
-
t.nodes = pe.from(e.nodes), t.marks = pe.from(e.marks || {}), this.nodes = yl.compile(this.spec.nodes, this), this.marks =
|
|
7782
|
+
t.nodes = pe.from(e.nodes), t.marks = pe.from(e.marks || {}), this.nodes = yl.compile(this.spec.nodes, this), this.marks = pr.compile(this.spec.marks, this);
|
|
7783
7783
|
let i = /* @__PURE__ */ Object.create(null);
|
|
7784
7784
|
for (let r in this.nodes) {
|
|
7785
7785
|
if (r in this.marks)
|
|
@@ -7822,7 +7822,7 @@ class $d {
|
|
|
7822
7822
|
*/
|
|
7823
7823
|
text(e, t) {
|
|
7824
7824
|
let i = this.nodes.text;
|
|
7825
|
-
return new
|
|
7825
|
+
return new Gi(i, i.defaultAttrs, e, J.setFrom(t));
|
|
7826
7826
|
}
|
|
7827
7827
|
/**
|
|
7828
7828
|
Create a mark with the given type and attributes.
|
|
@@ -7862,7 +7862,7 @@ function W2(n) {
|
|
|
7862
7862
|
function U2(n) {
|
|
7863
7863
|
return n.style != null;
|
|
7864
7864
|
}
|
|
7865
|
-
let Rn = class
|
|
7865
|
+
let Rn = class Vs {
|
|
7866
7866
|
/**
|
|
7867
7867
|
Create a parser that targets the given schema, using the given
|
|
7868
7868
|
parsing rules.
|
|
@@ -7974,7 +7974,7 @@ let Rn = class js {
|
|
|
7974
7974
|
[priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
|
|
7975
7975
|
*/
|
|
7976
7976
|
static fromSchema(e) {
|
|
7977
|
-
return e.cached.domParser || (e.cached.domParser = new
|
|
7977
|
+
return e.cached.domParser || (e.cached.domParser = new Vs(e, Vs.schemaRules(e)));
|
|
7978
7978
|
}
|
|
7979
7979
|
};
|
|
7980
7980
|
const Rd = {
|
|
@@ -8017,11 +8017,11 @@ const Rd = {
|
|
|
8017
8017
|
script: !0,
|
|
8018
8018
|
style: !0,
|
|
8019
8019
|
title: !0
|
|
8020
|
-
}, Pd = { ol: !0, ul: !0 }, Un = 1,
|
|
8020
|
+
}, Pd = { ol: !0, ul: !0 }, Un = 1, Hs = 2, Pn = 4;
|
|
8021
8021
|
function wl(n, e, t) {
|
|
8022
|
-
return e != null ? (e ? Un : 0) | (e === "full" ?
|
|
8022
|
+
return e != null ? (e ? Un : 0) | (e === "full" ? Hs : 0) : n && n.whitespace == "pre" ? Un | Hs : t & ~Pn;
|
|
8023
8023
|
}
|
|
8024
|
-
class
|
|
8024
|
+
class xi {
|
|
8025
8025
|
constructor(e, t, i, r, s, o) {
|
|
8026
8026
|
this.type = e, this.attrs = t, this.marks = i, this.solid = r, this.options = o, this.content = [], this.activeMarks = J.none, this.match = s || (o & Pn ? null : e.contentMatch);
|
|
8027
8027
|
}
|
|
@@ -8058,7 +8058,7 @@ class Cl {
|
|
|
8058
8058
|
constructor(e, t, i) {
|
|
8059
8059
|
this.parser = e, this.options = t, this.isOpen = i, this.open = 0, this.localPreserveWS = !1;
|
|
8060
8060
|
let r = t.topNode, s, o = wl(null, t.preserveWhitespace, 0) | (i ? Pn : 0);
|
|
8061
|
-
r ? s = new
|
|
8061
|
+
r ? s = new xi(r.type, r.attrs, J.none, !0, t.topMatch || r.type.contentMatch, o) : i ? s = new xi(null, null, J.none, !0, null, o) : s = new xi(e.schema.topNodeType, null, J.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
|
|
8062
8062
|
}
|
|
8063
8063
|
get top() {
|
|
8064
8064
|
return this.nodes[this.open];
|
|
@@ -8070,7 +8070,7 @@ class Cl {
|
|
|
8070
8070
|
e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
|
|
8071
8071
|
}
|
|
8072
8072
|
addTextNode(e, t) {
|
|
8073
|
-
let i = e.nodeValue, r = this.top, s = r.options &
|
|
8073
|
+
let i = e.nodeValue, r = this.top, s = r.options & Hs ? "full" : this.localPreserveWS || (r.options & Un) > 0, { schema: o } = this.parser;
|
|
8074
8074
|
if (s === "full" || r.inlineContext(e) || /[^ \t\r\n\u000c]/.test(i)) {
|
|
8075
8075
|
if (s)
|
|
8076
8076
|
if (s === "full")
|
|
@@ -8241,7 +8241,7 @@ class Cl {
|
|
|
8241
8241
|
let a = wl(e, s, o.options);
|
|
8242
8242
|
o.options & Pn && o.content.length == 0 && (a |= Pn);
|
|
8243
8243
|
let l = J.none;
|
|
8244
|
-
return i = i.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : xl(c.type, e)) ? (l = c.addToSet(l), !1) : !0), this.nodes.push(new
|
|
8244
|
+
return i = i.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : xl(c.type, e)) ? (l = c.addToSet(l), !1) : !0), this.nodes.push(new xi(e, t, l, r, null, a)), this.open++, i;
|
|
8245
8245
|
}
|
|
8246
8246
|
// Make sure all nodes above this.open are finished and added to
|
|
8247
8247
|
// their parents
|
|
@@ -8388,7 +8388,7 @@ class Gt {
|
|
|
8388
8388
|
nodes.
|
|
8389
8389
|
*/
|
|
8390
8390
|
serializeFragment(e, t = {}, i) {
|
|
8391
|
-
i || (i =
|
|
8391
|
+
i || (i = Yr(t).createDocumentFragment());
|
|
8392
8392
|
let r = i, s = [];
|
|
8393
8393
|
return e.forEach((o) => {
|
|
8394
8394
|
if (s.length || o.marks.length) {
|
|
@@ -8417,7 +8417,7 @@ class Gt {
|
|
|
8417
8417
|
@internal
|
|
8418
8418
|
*/
|
|
8419
8419
|
serializeNodeInner(e, t) {
|
|
8420
|
-
let { dom: i, contentDOM: r } =
|
|
8420
|
+
let { dom: i, contentDOM: r } = $i(Yr(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
8421
8421
|
if (r) {
|
|
8422
8422
|
if (e.isLeaf)
|
|
8423
8423
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -8445,10 +8445,10 @@ class Gt {
|
|
|
8445
8445
|
*/
|
|
8446
8446
|
serializeMark(e, t, i = {}) {
|
|
8447
8447
|
let r = this.marks[e.type.name];
|
|
8448
|
-
return r &&
|
|
8448
|
+
return r && $i(Yr(i), r(e, t), null, e.attrs);
|
|
8449
8449
|
}
|
|
8450
8450
|
static renderSpec(e, t, i = null, r) {
|
|
8451
|
-
return
|
|
8451
|
+
return $i(e, t, i, r);
|
|
8452
8452
|
}
|
|
8453
8453
|
/**
|
|
8454
8454
|
Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
|
|
@@ -8480,7 +8480,7 @@ function Sl(n) {
|
|
|
8480
8480
|
}
|
|
8481
8481
|
return e;
|
|
8482
8482
|
}
|
|
8483
|
-
function
|
|
8483
|
+
function Yr(n) {
|
|
8484
8484
|
return n.document || window.document;
|
|
8485
8485
|
}
|
|
8486
8486
|
const Tl = /* @__PURE__ */ new WeakMap();
|
|
@@ -8504,7 +8504,7 @@ function X2(n) {
|
|
|
8504
8504
|
}
|
|
8505
8505
|
return t(n), e;
|
|
8506
8506
|
}
|
|
8507
|
-
function
|
|
8507
|
+
function $i(n, e, t, i) {
|
|
8508
8508
|
if (typeof e == "string")
|
|
8509
8509
|
return { dom: n.createTextNode(e) };
|
|
8510
8510
|
if (e.nodeType != null)
|
|
@@ -8534,7 +8534,7 @@ function Ri(n, e, t, i) {
|
|
|
8534
8534
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
8535
8535
|
return { dom: l, contentDOM: l };
|
|
8536
8536
|
} else {
|
|
8537
|
-
let { dom: p, contentDOM: m } =
|
|
8537
|
+
let { dom: p, contentDOM: m } = $i(n, f, t, i);
|
|
8538
8538
|
if (l.appendChild(p), m) {
|
|
8539
8539
|
if (a)
|
|
8540
8540
|
throw new RangeError("Multiple content holes");
|
|
@@ -8554,8 +8554,8 @@ function Ml(n) {
|
|
|
8554
8554
|
function Z2(n) {
|
|
8555
8555
|
return (n - (n & Ld)) / zd;
|
|
8556
8556
|
}
|
|
8557
|
-
const Bd = 1, Fd = 2,
|
|
8558
|
-
class
|
|
8557
|
+
const Bd = 1, Fd = 2, Ri = 4, Vd = 8;
|
|
8558
|
+
class js {
|
|
8559
8559
|
/**
|
|
8560
8560
|
@internal
|
|
8561
8561
|
*/
|
|
@@ -8574,13 +8574,13 @@ class Us {
|
|
|
8574
8574
|
Tells you whether the token before the mapped position was deleted.
|
|
8575
8575
|
*/
|
|
8576
8576
|
get deletedBefore() {
|
|
8577
|
-
return (this.delInfo & (Bd |
|
|
8577
|
+
return (this.delInfo & (Bd | Ri)) > 0;
|
|
8578
8578
|
}
|
|
8579
8579
|
/**
|
|
8580
8580
|
True when the token after the mapped position was deleted.
|
|
8581
8581
|
*/
|
|
8582
8582
|
get deletedAfter() {
|
|
8583
|
-
return (this.delInfo & (Fd |
|
|
8583
|
+
return (this.delInfo & (Fd | Ri)) > 0;
|
|
8584
8584
|
}
|
|
8585
8585
|
/**
|
|
8586
8586
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -8588,7 +8588,7 @@ class Us {
|
|
|
8588
8588
|
position).
|
|
8589
8589
|
*/
|
|
8590
8590
|
get deletedAcross() {
|
|
8591
|
-
return (this.delInfo &
|
|
8591
|
+
return (this.delInfo & Ri) > 0;
|
|
8592
8592
|
}
|
|
8593
8593
|
}
|
|
8594
8594
|
class Le {
|
|
@@ -8631,12 +8631,12 @@ class Le {
|
|
|
8631
8631
|
let f = c ? e == l ? -1 : e == d ? 1 : t : t, p = l + r + (f < 0 ? 0 : u);
|
|
8632
8632
|
if (i)
|
|
8633
8633
|
return p;
|
|
8634
|
-
let m = e == (t < 0 ? l : d) ? null : Y2(a / 3, e - l), v = e == l ? Fd : e == d ? Bd :
|
|
8635
|
-
return (t < 0 ? e != l : e != d) && (v |= Vd), new
|
|
8634
|
+
let m = e == (t < 0 ? l : d) ? null : Y2(a / 3, e - l), v = e == l ? Fd : e == d ? Bd : Ri;
|
|
8635
|
+
return (t < 0 ? e != l : e != d) && (v |= Vd), new js(p, v, m);
|
|
8636
8636
|
}
|
|
8637
8637
|
r += u - c;
|
|
8638
8638
|
}
|
|
8639
|
-
return i ? e + r : new
|
|
8639
|
+
return i ? e + r : new js(e + r, 0, null);
|
|
8640
8640
|
}
|
|
8641
8641
|
/**
|
|
8642
8642
|
@internal
|
|
@@ -8792,10 +8792,10 @@ class qn {
|
|
|
8792
8792
|
}
|
|
8793
8793
|
r |= a.delInfo, e = a.pos;
|
|
8794
8794
|
}
|
|
8795
|
-
return i ? e : new
|
|
8795
|
+
return i ? e : new js(e, r, null);
|
|
8796
8796
|
}
|
|
8797
8797
|
}
|
|
8798
|
-
const
|
|
8798
|
+
const Zr = /* @__PURE__ */ Object.create(null);
|
|
8799
8799
|
class Se {
|
|
8800
8800
|
/**
|
|
8801
8801
|
Get the step map that represents the changes made by this step,
|
|
@@ -8820,7 +8820,7 @@ class Se {
|
|
|
8820
8820
|
static fromJSON(e, t) {
|
|
8821
8821
|
if (!t || !t.stepType)
|
|
8822
8822
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
8823
|
-
let i =
|
|
8823
|
+
let i = Zr[t.stepType];
|
|
8824
8824
|
if (!i)
|
|
8825
8825
|
throw new RangeError("No step type ".concat(t.stepType, " defined"));
|
|
8826
8826
|
return i.fromJSON(e, t);
|
|
@@ -8832,9 +8832,9 @@ class Se {
|
|
|
8832
8832
|
that's unlikely to clash with steps from other modules.
|
|
8833
8833
|
*/
|
|
8834
8834
|
static jsonID(e, t) {
|
|
8835
|
-
if (e in
|
|
8835
|
+
if (e in Zr)
|
|
8836
8836
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
8837
|
-
return
|
|
8837
|
+
return Zr[e] = t, t.prototype.jsonID = e, t;
|
|
8838
8838
|
}
|
|
8839
8839
|
}
|
|
8840
8840
|
class ie {
|
|
@@ -8865,7 +8865,7 @@ class ie {
|
|
|
8865
8865
|
try {
|
|
8866
8866
|
return ie.ok(e.replace(t, i, r));
|
|
8867
8867
|
} catch (s) {
|
|
8868
|
-
if (s instanceof
|
|
8868
|
+
if (s instanceof qi)
|
|
8869
8869
|
return ie.fail(s.message);
|
|
8870
8870
|
throw s;
|
|
8871
8871
|
}
|
|
@@ -9050,7 +9050,7 @@ class ce extends Se {
|
|
|
9050
9050
|
super(), this.from = e, this.to = t, this.slice = i, this.structure = r;
|
|
9051
9051
|
}
|
|
9052
9052
|
apply(e) {
|
|
9053
|
-
return this.structure &&
|
|
9053
|
+
return this.structure && Ws(e, this.from, this.to) ? ie.fail("Structure replace would overwrite content") : ie.fromReplace(e, this.from, this.to, this.slice);
|
|
9054
9054
|
}
|
|
9055
9055
|
getMap() {
|
|
9056
9056
|
return new Le([this.from, this.to - this.from, this.slice.size]);
|
|
@@ -9099,7 +9099,7 @@ class de extends Se {
|
|
|
9099
9099
|
super(), this.from = e, this.to = t, this.gapFrom = i, this.gapTo = r, this.slice = s, this.insert = o, this.structure = a;
|
|
9100
9100
|
}
|
|
9101
9101
|
apply(e) {
|
|
9102
|
-
if (this.structure && (
|
|
9102
|
+
if (this.structure && (Ws(e, this.from, this.gapFrom) || Ws(e, this.gapTo, this.to)))
|
|
9103
9103
|
return ie.fail("Structure gap-replace would overwrite content");
|
|
9104
9104
|
let t = e.slice(this.gapFrom, this.gapTo);
|
|
9105
9105
|
if (t.openStart || t.openEnd)
|
|
@@ -9146,7 +9146,7 @@ class de extends Se {
|
|
|
9146
9146
|
}
|
|
9147
9147
|
}
|
|
9148
9148
|
Se.jsonID("replaceAround", de);
|
|
9149
|
-
function
|
|
9149
|
+
function Ws(n, e, t) {
|
|
9150
9150
|
let i = n.resolve(e), r = t - e, s = i.depth;
|
|
9151
9151
|
for (; r > 0 && s > 0 && i.indexAfter(s) == i.node(s).childCount; )
|
|
9152
9152
|
s--, r--;
|
|
@@ -9181,7 +9181,7 @@ function e6(n, e, t, i) {
|
|
|
9181
9181
|
return;
|
|
9182
9182
|
s++;
|
|
9183
9183
|
let l = null;
|
|
9184
|
-
if (i instanceof
|
|
9184
|
+
if (i instanceof pr) {
|
|
9185
9185
|
let c = o.marks, u;
|
|
9186
9186
|
for (; u = i.isInSet(c); )
|
|
9187
9187
|
(l || (l = [])).push(u), c = u.removeFromSet(c);
|
|
@@ -9381,7 +9381,7 @@ function u6(n, e) {
|
|
|
9381
9381
|
function Ud(n, e) {
|
|
9382
9382
|
return !!(n && e && !n.isLeaf && u6(n, e));
|
|
9383
9383
|
}
|
|
9384
|
-
function
|
|
9384
|
+
function mr(n, e, t = -1) {
|
|
9385
9385
|
let i = n.resolve(e);
|
|
9386
9386
|
for (let r = i.depth; ; r--) {
|
|
9387
9387
|
let s, o, a = i.index(r);
|
|
@@ -9454,7 +9454,7 @@ function qd(n, e, t) {
|
|
|
9454
9454
|
}
|
|
9455
9455
|
return null;
|
|
9456
9456
|
}
|
|
9457
|
-
function
|
|
9457
|
+
function gr(n, e, t = e, i = N.empty) {
|
|
9458
9458
|
if (e == t && !i.size)
|
|
9459
9459
|
return null;
|
|
9460
9460
|
let r = n.resolve(e), s = n.resolve(t);
|
|
@@ -9509,7 +9509,7 @@ class f6 {
|
|
|
9509
9509
|
for (let t = 1; t <= 2; t++)
|
|
9510
9510
|
for (let i = t == 1 ? e : this.unplaced.openStart; i >= 0; i--) {
|
|
9511
9511
|
let r, s = null;
|
|
9512
|
-
i ? (s =
|
|
9512
|
+
i ? (s = Qr(this.unplaced.content, i - 1).firstChild, r = s.content) : r = this.unplaced.content;
|
|
9513
9513
|
let o = r.firstChild;
|
|
9514
9514
|
for (let a = this.depth; a >= 0; a--) {
|
|
9515
9515
|
let { type: l, match: c } = this.frontier[a], u, d = null;
|
|
@@ -9523,11 +9523,11 @@ class f6 {
|
|
|
9523
9523
|
}
|
|
9524
9524
|
}
|
|
9525
9525
|
openMore() {
|
|
9526
|
-
let { content: e, openStart: t, openEnd: i } = this.unplaced, r =
|
|
9526
|
+
let { content: e, openStart: t, openEnd: i } = this.unplaced, r = Qr(e, t);
|
|
9527
9527
|
return !r.childCount || r.firstChild.isLeaf ? !1 : (this.unplaced = new N(e, t + 1, Math.max(i, r.size + t >= e.size - i ? t + 1 : 0)), !0);
|
|
9528
9528
|
}
|
|
9529
9529
|
dropNode() {
|
|
9530
|
-
let { content: e, openStart: t, openEnd: i } = this.unplaced, r =
|
|
9530
|
+
let { content: e, openStart: t, openEnd: i } = this.unplaced, r = Qr(e, t);
|
|
9531
9531
|
if (r.childCount <= 1 && t > 0) {
|
|
9532
9532
|
let s = e.size - t <= t + r.size;
|
|
9533
9533
|
this.unplaced = new N(En(e, t - 1, 1), t - 1, s ? t - 1 : i);
|
|
@@ -9568,7 +9568,7 @@ class f6 {
|
|
|
9568
9568
|
if (!this.$to.parent.isTextblock)
|
|
9569
9569
|
return -1;
|
|
9570
9570
|
let e = this.frontier[this.depth], t;
|
|
9571
|
-
if (!e.type.isTextblock || !
|
|
9571
|
+
if (!e.type.isTextblock || !es(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
9572
9572
|
return -1;
|
|
9573
9573
|
let { depth: i } = this.$to, r = this.$to.after(i);
|
|
9574
9574
|
for (; i > 1 && r == this.$to.end(--i); )
|
|
@@ -9578,10 +9578,10 @@ class f6 {
|
|
|
9578
9578
|
findCloseLevel(e) {
|
|
9579
9579
|
e:
|
|
9580
9580
|
for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
9581
|
-
let { match: i, type: r } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o =
|
|
9581
|
+
let { match: i, type: r } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = es(e, t, r, i, s);
|
|
9582
9582
|
if (o) {
|
|
9583
9583
|
for (let a = t - 1; a >= 0; a--) {
|
|
9584
|
-
let { match: l, type: c } = this.frontier[a], u =
|
|
9584
|
+
let { match: l, type: c } = this.frontier[a], u = es(e, a, c, l, !0);
|
|
9585
9585
|
if (!u || u.childCount)
|
|
9586
9586
|
continue e;
|
|
9587
9587
|
}
|
|
@@ -9617,7 +9617,7 @@ function En(n, e, t) {
|
|
|
9617
9617
|
function An(n, e, t) {
|
|
9618
9618
|
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(An(n.lastChild.content, e - 1, t)));
|
|
9619
9619
|
}
|
|
9620
|
-
function
|
|
9620
|
+
function Qr(n, e) {
|
|
9621
9621
|
for (let t = 0; t < e; t++)
|
|
9622
9622
|
n = n.firstChild.content;
|
|
9623
9623
|
return n;
|
|
@@ -9628,7 +9628,7 @@ function Jd(n, e, t) {
|
|
|
9628
9628
|
let i = n.content;
|
|
9629
9629
|
return e > 1 && (i = i.replaceChild(0, Jd(i.firstChild, e - 1, i.childCount == 1 ? t - 1 : 0))), e > 0 && (i = n.type.contentMatch.fillBefore(i).append(i), t <= 0 && (i = i.append(n.type.contentMatch.matchFragment(i).fillBefore(T.empty, !0)))), n.copy(i);
|
|
9630
9630
|
}
|
|
9631
|
-
function
|
|
9631
|
+
function es(n, e, t, i, r) {
|
|
9632
9632
|
let s = n.node(e), o = r ? n.indexAfter(e) : n.index(e);
|
|
9633
9633
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
9634
9634
|
return null;
|
|
@@ -9863,7 +9863,7 @@ class Yd {
|
|
|
9863
9863
|
given `slice`.
|
|
9864
9864
|
*/
|
|
9865
9865
|
replace(e, t = e, i = N.empty) {
|
|
9866
|
-
let r =
|
|
9866
|
+
let r = gr(this.doc, e, t, i);
|
|
9867
9867
|
return r && this.step(r), this;
|
|
9868
9868
|
}
|
|
9869
9869
|
/**
|
|
@@ -10039,7 +10039,7 @@ class Yd {
|
|
|
10039
10039
|
return Ro(this, e, t, i), this;
|
|
10040
10040
|
}
|
|
10041
10041
|
}
|
|
10042
|
-
const
|
|
10042
|
+
const ts = /* @__PURE__ */ Object.create(null);
|
|
10043
10043
|
class B {
|
|
10044
10044
|
/**
|
|
10045
10045
|
Initialize a selection with the head and anchor and ranges. If no
|
|
@@ -10175,7 +10175,7 @@ class B {
|
|
|
10175
10175
|
static fromJSON(e, t) {
|
|
10176
10176
|
if (!t || !t.type)
|
|
10177
10177
|
throw new RangeError("Invalid input for Selection.fromJSON");
|
|
10178
|
-
let i =
|
|
10178
|
+
let i = ts[t.type];
|
|
10179
10179
|
if (!i)
|
|
10180
10180
|
throw new RangeError("No selection type ".concat(t.type, " defined"));
|
|
10181
10181
|
return i.fromJSON(e, t);
|
|
@@ -10187,9 +10187,9 @@ class B {
|
|
|
10187
10187
|
clash with classes from other modules.
|
|
10188
10188
|
*/
|
|
10189
10189
|
static jsonID(e, t) {
|
|
10190
|
-
if (e in
|
|
10190
|
+
if (e in ts)
|
|
10191
10191
|
throw new RangeError("Duplicate use of selection JSON ID " + e);
|
|
10192
|
-
return
|
|
10192
|
+
return ts[e] = t, t.prototype.jsonID = e, t;
|
|
10193
10193
|
}
|
|
10194
10194
|
/**
|
|
10195
10195
|
Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
|
|
@@ -10248,7 +10248,7 @@ class z extends B {
|
|
|
10248
10248
|
return e instanceof z && e.anchor == this.anchor && e.head == this.head;
|
|
10249
10249
|
}
|
|
10250
10250
|
getBookmark() {
|
|
10251
|
-
return new
|
|
10251
|
+
return new vr(this.anchor, this.head);
|
|
10252
10252
|
}
|
|
10253
10253
|
toJSON() {
|
|
10254
10254
|
return { type: "text", anchor: this.anchor, head: this.head };
|
|
@@ -10289,12 +10289,12 @@ class z extends B {
|
|
|
10289
10289
|
}
|
|
10290
10290
|
}
|
|
10291
10291
|
B.jsonID("text", z);
|
|
10292
|
-
class
|
|
10292
|
+
class vr {
|
|
10293
10293
|
constructor(e, t) {
|
|
10294
10294
|
this.anchor = e, this.head = t;
|
|
10295
10295
|
}
|
|
10296
10296
|
map(e) {
|
|
10297
|
-
return new
|
|
10297
|
+
return new vr(e.map(this.anchor), e.map(this.head));
|
|
10298
10298
|
}
|
|
10299
10299
|
resolve(e) {
|
|
10300
10300
|
return z.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
@@ -10355,7 +10355,7 @@ class Po {
|
|
|
10355
10355
|
}
|
|
10356
10356
|
map(e) {
|
|
10357
10357
|
let { deleted: t, pos: i } = e.mapResult(this.anchor);
|
|
10358
|
-
return t ? new
|
|
10358
|
+
return t ? new vr(i, i) : new Po(i);
|
|
10359
10359
|
}
|
|
10360
10360
|
resolve(e) {
|
|
10361
10361
|
let t = e.resolve(this.anchor), i = t.nodeAfter;
|
|
@@ -10434,7 +10434,7 @@ function Al(n, e, t) {
|
|
|
10434
10434
|
o == null && (o = u);
|
|
10435
10435
|
}), n.setSelection(B.near(n.doc.resolve(o), t));
|
|
10436
10436
|
}
|
|
10437
|
-
const Il = 1,
|
|
10437
|
+
const Il = 1, Si = 2, Ol = 4;
|
|
10438
10438
|
class C6 extends Yd {
|
|
10439
10439
|
/**
|
|
10440
10440
|
@internal
|
|
@@ -10458,7 +10458,7 @@ class C6 extends Yd {
|
|
|
10458
10458
|
setSelection(e) {
|
|
10459
10459
|
if (e.$from.doc != this.doc)
|
|
10460
10460
|
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
10461
|
-
return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | Il) & ~
|
|
10461
|
+
return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | Il) & ~Si, this.storedMarks = null, this;
|
|
10462
10462
|
}
|
|
10463
10463
|
/**
|
|
10464
10464
|
Whether the selection was explicitly updated by this transaction.
|
|
@@ -10470,7 +10470,7 @@ class C6 extends Yd {
|
|
|
10470
10470
|
Set the current stored marks.
|
|
10471
10471
|
*/
|
|
10472
10472
|
setStoredMarks(e) {
|
|
10473
|
-
return this.storedMarks = e, this.updated |=
|
|
10473
|
+
return this.storedMarks = e, this.updated |= Si, this;
|
|
10474
10474
|
}
|
|
10475
10475
|
/**
|
|
10476
10476
|
Make sure the current stored marks or, if that is null, the marks
|
|
@@ -10496,13 +10496,13 @@ class C6 extends Yd {
|
|
|
10496
10496
|
Whether the stored marks were explicitly set for this transaction.
|
|
10497
10497
|
*/
|
|
10498
10498
|
get storedMarksSet() {
|
|
10499
|
-
return (this.updated &
|
|
10499
|
+
return (this.updated & Si) > 0;
|
|
10500
10500
|
}
|
|
10501
10501
|
/**
|
|
10502
10502
|
@internal
|
|
10503
10503
|
*/
|
|
10504
10504
|
addStep(e, t) {
|
|
10505
|
-
super.addStep(e, t), this.updated = this.updated & ~
|
|
10505
|
+
super.addStep(e, t), this.updated = this.updated & ~Si, this.storedMarks = null;
|
|
10506
10506
|
}
|
|
10507
10507
|
/**
|
|
10508
10508
|
Update the timestamp for the transaction.
|
|
@@ -10628,7 +10628,7 @@ const k6 = [
|
|
|
10628
10628
|
}
|
|
10629
10629
|
})
|
|
10630
10630
|
];
|
|
10631
|
-
class
|
|
10631
|
+
class ns {
|
|
10632
10632
|
constructor(e, t) {
|
|
10633
10633
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = k6.slice(), t && t.forEach((i) => {
|
|
10634
10634
|
if (this.pluginsByKey[i.key])
|
|
@@ -10729,7 +10729,7 @@ class cn {
|
|
|
10729
10729
|
Create a new state.
|
|
10730
10730
|
*/
|
|
10731
10731
|
static create(e) {
|
|
10732
|
-
let t = new
|
|
10732
|
+
let t = new ns(e.doc ? e.doc.type.schema : e.schema, e.plugins), i = new cn(t);
|
|
10733
10733
|
for (let r = 0; r < t.fields.length; r++)
|
|
10734
10734
|
i[t.fields[r].name] = t.fields[r].init(e, i);
|
|
10735
10735
|
return i;
|
|
@@ -10743,7 +10743,7 @@ class cn {
|
|
|
10743
10743
|
configuration object..
|
|
10744
10744
|
*/
|
|
10745
10745
|
reconfigure(e) {
|
|
10746
|
-
let t = new
|
|
10746
|
+
let t = new ns(this.schema, e.plugins), i = t.fields, r = new cn(t);
|
|
10747
10747
|
for (let s = 0; s < i.length; s++) {
|
|
10748
10748
|
let o = i[s].name;
|
|
10749
10749
|
r[o] = this.hasOwnProperty(o) ? this[o] : i[s].init(e, r);
|
|
@@ -10780,7 +10780,7 @@ class cn {
|
|
|
10780
10780
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
10781
10781
|
if (!e.schema)
|
|
10782
10782
|
throw new RangeError("Required config field 'schema' missing");
|
|
10783
|
-
let r = new
|
|
10783
|
+
let r = new ns(e.schema, e.plugins), s = new cn(r);
|
|
10784
10784
|
return r.fields.forEach((o) => {
|
|
10785
10785
|
if (o.name == "doc")
|
|
10786
10786
|
s.doc = wt.fromJSON(e.schema, t.doc);
|
|
@@ -10823,9 +10823,9 @@ class re {
|
|
|
10823
10823
|
return e[this.key];
|
|
10824
10824
|
}
|
|
10825
10825
|
}
|
|
10826
|
-
const
|
|
10826
|
+
const is = /* @__PURE__ */ Object.create(null);
|
|
10827
10827
|
function Qd(n) {
|
|
10828
|
-
return n in
|
|
10828
|
+
return n in is ? n + "$" + ++is[n] : (is[n] = 0, n + "$");
|
|
10829
10829
|
}
|
|
10830
10830
|
class be {
|
|
10831
10831
|
/**
|
|
@@ -10867,7 +10867,7 @@ const S6 = (n, e, t) => {
|
|
|
10867
10867
|
return !0;
|
|
10868
10868
|
if (i.parent.content.size == 0 && (yn(s, "end") || D.isSelectable(s)))
|
|
10869
10869
|
for (let o = i.depth; ; o--) {
|
|
10870
|
-
let a =
|
|
10870
|
+
let a = gr(n.doc, i.before(o), i.after(o), N.empty);
|
|
10871
10871
|
if (a && a.slice.size < a.to - a.from) {
|
|
10872
10872
|
if (e) {
|
|
10873
10873
|
let l = n.tr.step(a);
|
|
@@ -10911,7 +10911,7 @@ function th(n, e, t) {
|
|
|
10911
10911
|
return !1;
|
|
10912
10912
|
a = u;
|
|
10913
10913
|
}
|
|
10914
|
-
let c =
|
|
10914
|
+
let c = gr(n.doc, s, l, N.empty);
|
|
10915
10915
|
if (!c || c.from != s || c instanceof ce && c.slice.size >= l - s)
|
|
10916
10916
|
return !1;
|
|
10917
10917
|
if (t) {
|
|
@@ -10966,7 +10966,7 @@ const N6 = (n, e, t) => {
|
|
|
10966
10966
|
if (rh(n, r, e, 1))
|
|
10967
10967
|
return !0;
|
|
10968
10968
|
if (i.parent.content.size == 0 && (yn(s, "start") || D.isSelectable(s))) {
|
|
10969
|
-
let o =
|
|
10969
|
+
let o = gr(n.doc, i.before(), i.after(), N.empty);
|
|
10970
10970
|
if (o && o.slice.size < o.to - o.from) {
|
|
10971
10971
|
if (e) {
|
|
10972
10972
|
let a = n.tr.step(o);
|
|
@@ -11005,7 +11005,7 @@ const A6 = (n, e) => {
|
|
|
11005
11005
|
if (t.node.isTextblock || !Xt(n.doc, t.from))
|
|
11006
11006
|
return !1;
|
|
11007
11007
|
r = t.from;
|
|
11008
|
-
} else if (r =
|
|
11008
|
+
} else if (r = mr(n.doc, t.from, -1), r == null)
|
|
11009
11009
|
return !1;
|
|
11010
11010
|
if (e) {
|
|
11011
11011
|
let s = n.tr.join(r);
|
|
@@ -11018,7 +11018,7 @@ const A6 = (n, e) => {
|
|
|
11018
11018
|
if (t.node.isTextblock || !Xt(n.doc, t.to))
|
|
11019
11019
|
return !1;
|
|
11020
11020
|
i = t.to;
|
|
11021
|
-
} else if (i =
|
|
11021
|
+
} else if (i = mr(n.doc, t.to, 1), i == null)
|
|
11022
11022
|
return !1;
|
|
11023
11023
|
return e && e(n.tr.join(i).scrollIntoView()), !0;
|
|
11024
11024
|
}, O6 = (n, e) => {
|
|
@@ -11182,7 +11182,7 @@ function j6(n, e, t, i = null) {
|
|
|
11182
11182
|
if (e.$from.index(e.depth - 1) == 0)
|
|
11183
11183
|
return !1;
|
|
11184
11184
|
let l = o.resolve(e.start - 2);
|
|
11185
|
-
s = new
|
|
11185
|
+
s = new Ji(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new Ji(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), r = !0;
|
|
11186
11186
|
}
|
|
11187
11187
|
let a = Hd(s, t, i, e);
|
|
11188
11188
|
return a ? (n && W6(n, e, a, r, t), !0) : !1;
|
|
@@ -11208,7 +11208,7 @@ function U6(n) {
|
|
|
11208
11208
|
}
|
|
11209
11209
|
function q6(n, e, t, i) {
|
|
11210
11210
|
let r = n.tr, s = i.end, o = i.$to.end(i.depth);
|
|
11211
|
-
s < o && (r.step(new de(s - 1, o, s, o, new N(T.from(t.create(null, i.parent.copy())), 1, 0), 1, !0)), i = new
|
|
11211
|
+
s < o && (r.step(new de(s - 1, o, s, o, new N(T.from(t.create(null, i.parent.copy())), 1, 0), 1, !0)), i = new Ji(r.doc.resolve(i.$from.pos), r.doc.resolve(o), i.depth));
|
|
11212
11212
|
const a = Mn(i);
|
|
11213
11213
|
if (a == null)
|
|
11214
11214
|
return !1;
|
|
@@ -11255,12 +11255,12 @@ const me = function(n) {
|
|
|
11255
11255
|
let e = n.assignedSlot || n.parentNode;
|
|
11256
11256
|
return e && e.nodeType == 11 ? e.host : e;
|
|
11257
11257
|
};
|
|
11258
|
-
let
|
|
11258
|
+
let Us = null;
|
|
11259
11259
|
const rt = function(n, e, t) {
|
|
11260
|
-
let i =
|
|
11260
|
+
let i = Us || (Us = document.createRange());
|
|
11261
11261
|
return i.setEnd(n, t == null ? n.nodeValue.length : t), i.setStart(n, e || 0), i;
|
|
11262
11262
|
}, G6 = function() {
|
|
11263
|
-
|
|
11263
|
+
Us = null;
|
|
11264
11264
|
}, Ut = function(n, e, t, i) {
|
|
11265
11265
|
return t && (Rl(n, e, t, i, -1) || Rl(n, e, t, i, 1));
|
|
11266
11266
|
}, X6 = /^(img|br|input|textarea|hr)$/i;
|
|
@@ -11270,7 +11270,7 @@ function Rl(n, e, t, i, r) {
|
|
|
11270
11270
|
return !0;
|
|
11271
11271
|
if (e == (r < 0 ? 0 : Fe(n))) {
|
|
11272
11272
|
let o = n.parentNode;
|
|
11273
|
-
if (!o || o.nodeType != 1 ||
|
|
11273
|
+
if (!o || o.nodeType != 1 || ri(n) || X6.test(n.nodeName) || n.contentEditable == "false")
|
|
11274
11274
|
return !1;
|
|
11275
11275
|
e = me(n) + (r < 0 ? 0 : 1), n = o;
|
|
11276
11276
|
} else if (n.nodeType == 1) {
|
|
@@ -11297,7 +11297,7 @@ function Y6(n, e) {
|
|
|
11297
11297
|
if (n.contentEditable == "false")
|
|
11298
11298
|
return null;
|
|
11299
11299
|
n = n.childNodes[e - 1], e = Fe(n);
|
|
11300
|
-
} else if (n.parentNode && !
|
|
11300
|
+
} else if (n.parentNode && !ri(n))
|
|
11301
11301
|
e = me(n), n = n.parentNode;
|
|
11302
11302
|
else
|
|
11303
11303
|
return null;
|
|
@@ -11311,7 +11311,7 @@ function Z6(n, e) {
|
|
|
11311
11311
|
if (n.contentEditable == "false")
|
|
11312
11312
|
return null;
|
|
11313
11313
|
n = n.childNodes[e], e = 0;
|
|
11314
|
-
} else if (n.parentNode && !
|
|
11314
|
+
} else if (n.parentNode && !ri(n))
|
|
11315
11315
|
e = me(n) + 1, n = n.parentNode;
|
|
11316
11316
|
else
|
|
11317
11317
|
return null;
|
|
@@ -11327,13 +11327,13 @@ function Q6(n, e, t) {
|
|
|
11327
11327
|
i = i && s == 0, r = r && s == Fe(n);
|
|
11328
11328
|
}
|
|
11329
11329
|
}
|
|
11330
|
-
function
|
|
11330
|
+
function ri(n) {
|
|
11331
11331
|
let e;
|
|
11332
11332
|
for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
|
|
11333
11333
|
;
|
|
11334
11334
|
return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
|
|
11335
11335
|
}
|
|
11336
|
-
const
|
|
11336
|
+
const yr = function(n) {
|
|
11337
11337
|
return n.focusNode && Ut(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
|
|
11338
11338
|
};
|
|
11339
11339
|
function Dt(n, e) {
|
|
@@ -11360,9 +11360,9 @@ function t3(n, e, t) {
|
|
|
11360
11360
|
return { node: i.startContainer, offset: Math.min(Fe(i.startContainer), i.startOffset) };
|
|
11361
11361
|
}
|
|
11362
11362
|
}
|
|
11363
|
-
const et = typeof navigator < "u" ? navigator : null, Pl = typeof document < "u" ? document : null, _t = et && et.userAgent || "",
|
|
11363
|
+
const et = typeof navigator < "u" ? navigator : null, Pl = typeof document < "u" ? document : null, _t = et && et.userAgent || "", qs = /Edge\/(\d+)/.exec(_t), oh = /MSIE \d/.exec(_t), Ks = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_t), Oe = !!(oh || Ks || qs), Ct = oh ? document.documentMode : Ks ? +Ks[1] : qs ? +qs[1] : 0, He = !Oe && /gecko\/(\d+)/i.test(_t);
|
|
11364
11364
|
He && +(/Firefox\/(\d+)/.exec(_t) || [0, 0])[1];
|
|
11365
|
-
const
|
|
11365
|
+
const Js = !Oe && /Chrome\/(\d+)/.exec(_t), ue = !!Js, ah = Js ? +Js[1] : 0, xe = !Oe && !!et && /Apple Computer/.test(et.vendor), wn = xe && (/Mobile\/\w+/.test(_t) || !!et && et.maxTouchPoints > 2), Be = wn || (et ? /Mac/.test(et.platform) : !1), lh = et ? /Win/.test(et.platform) : !1, ot = /Android \d/.test(_t), si = !!Pl && "webkitFontSmoothing" in Pl.documentElement.style, n3 = si ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
11366
11366
|
function i3(n) {
|
|
11367
11367
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
11368
11368
|
return e ? {
|
|
@@ -11560,7 +11560,7 @@ function h3(n, e) {
|
|
|
11560
11560
|
u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && r++;
|
|
11561
11561
|
}
|
|
11562
11562
|
let c;
|
|
11563
|
-
|
|
11563
|
+
si && r && i.nodeType == 1 && (c = i.childNodes[r - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && r--, i == n.dom && r == i.childNodes.length - 1 && i.lastChild.nodeType == 1 && e.top > i.lastChild.getBoundingClientRect().bottom ? a = n.state.doc.content.size : (r == 0 || i.nodeType != 1 || i.childNodes[r - 1].nodeName != "BR") && (a = d3(n, i, r, e));
|
|
11564
11564
|
}
|
|
11565
11565
|
a == null && (a = u3(n, o, e));
|
|
11566
11566
|
let l = n.docView.nearestDesc(o, !0);
|
|
@@ -11580,7 +11580,7 @@ function ht(n, e) {
|
|
|
11580
11580
|
}
|
|
11581
11581
|
const f3 = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
11582
11582
|
function fh(n, e, t) {
|
|
11583
|
-
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o =
|
|
11583
|
+
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = si || He;
|
|
11584
11584
|
if (i.nodeType == 3)
|
|
11585
11585
|
if (o && (f3.test(i.nodeValue) || (t < 0 ? !r : r == i.nodeValue.length))) {
|
|
11586
11586
|
let l = ht(rt(i, r, r), t);
|
|
@@ -11601,14 +11601,14 @@ function fh(n, e, t) {
|
|
|
11601
11601
|
if (s == null && r && (t < 0 || r == Fe(i))) {
|
|
11602
11602
|
let l = i.childNodes[r - 1];
|
|
11603
11603
|
if (l.nodeType == 1)
|
|
11604
|
-
return
|
|
11604
|
+
return rs(l.getBoundingClientRect(), !1);
|
|
11605
11605
|
}
|
|
11606
11606
|
if (s == null && r < Fe(i)) {
|
|
11607
11607
|
let l = i.childNodes[r];
|
|
11608
11608
|
if (l.nodeType == 1)
|
|
11609
|
-
return
|
|
11609
|
+
return rs(l.getBoundingClientRect(), !0);
|
|
11610
11610
|
}
|
|
11611
|
-
return
|
|
11611
|
+
return rs(i.getBoundingClientRect(), t >= 0);
|
|
11612
11612
|
}
|
|
11613
11613
|
if (s == null && r && (t < 0 || r == Fe(i))) {
|
|
11614
11614
|
let l = i.childNodes[r - 1], c = l.nodeType == 3 ? rt(l, Fe(l) - (o ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
@@ -11631,7 +11631,7 @@ function Nn(n, e) {
|
|
|
11631
11631
|
let t = e ? n.left : n.right;
|
|
11632
11632
|
return { top: n.top, bottom: n.bottom, left: t, right: t };
|
|
11633
11633
|
}
|
|
11634
|
-
function
|
|
11634
|
+
function rs(n, e) {
|
|
11635
11635
|
if (n.height == 0)
|
|
11636
11636
|
return n;
|
|
11637
11637
|
let t = e ? n.top : n.bottom;
|
|
@@ -11700,7 +11700,7 @@ function v3(n, e, t) {
|
|
|
11700
11700
|
return Bl == e && Fl == t ? Vl : (Bl = e, Fl = t, Vl = t == "up" || t == "down" ? p3(n, e, t) : g3(n, e, t));
|
|
11701
11701
|
}
|
|
11702
11702
|
const je = 0, Hl = 1, $t = 2, tt = 3;
|
|
11703
|
-
class
|
|
11703
|
+
class oi {
|
|
11704
11704
|
constructor(e, t, i, r) {
|
|
11705
11705
|
this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty = je, i.pmViewDesc = this;
|
|
11706
11706
|
}
|
|
@@ -12043,7 +12043,7 @@ class ai {
|
|
|
12043
12043
|
return !1;
|
|
12044
12044
|
}
|
|
12045
12045
|
}
|
|
12046
|
-
class mh extends
|
|
12046
|
+
class mh extends oi {
|
|
12047
12047
|
constructor(e, t, i, r) {
|
|
12048
12048
|
let s, o = t.type.toDOM;
|
|
12049
12049
|
if (typeof o == "function" && (o = o(i, () => {
|
|
@@ -12086,7 +12086,7 @@ class mh extends ai {
|
|
|
12086
12086
|
return this.widget.type.side;
|
|
12087
12087
|
}
|
|
12088
12088
|
}
|
|
12089
|
-
class y3 extends
|
|
12089
|
+
class y3 extends oi {
|
|
12090
12090
|
constructor(e, t, i, r) {
|
|
12091
12091
|
super(e, [], t, null), this.textDOM = i, this.text = r;
|
|
12092
12092
|
}
|
|
@@ -12103,7 +12103,7 @@ class y3 extends ai {
|
|
|
12103
12103
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
12104
12104
|
}
|
|
12105
12105
|
}
|
|
12106
|
-
class qt extends
|
|
12106
|
+
class qt extends oi {
|
|
12107
12107
|
constructor(e, t, i, r, s) {
|
|
12108
12108
|
super(e, [], i, r), this.mark = t, this.spec = s;
|
|
12109
12109
|
}
|
|
@@ -12127,7 +12127,7 @@ class qt extends ai {
|
|
|
12127
12127
|
}
|
|
12128
12128
|
slice(e, t, i) {
|
|
12129
12129
|
let r = qt.create(this.parent, this.mark, !0, i), s = this.children, o = this.size;
|
|
12130
|
-
t < o && (s =
|
|
12130
|
+
t < o && (s = Xs(s, t, o, i)), e > 0 && (s = Xs(s, 0, e, i));
|
|
12131
12131
|
for (let a = 0; a < s.length; a++)
|
|
12132
12132
|
s[a].parent = r;
|
|
12133
12133
|
return r.children = s, r;
|
|
@@ -12139,7 +12139,7 @@ class qt extends ai {
|
|
|
12139
12139
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
12140
12140
|
}
|
|
12141
12141
|
}
|
|
12142
|
-
class kt extends
|
|
12142
|
+
class kt extends oi {
|
|
12143
12143
|
constructor(e, t, i, r, s, o, a, l, c) {
|
|
12144
12144
|
super(e, [], s, o), this.node = t, this.outerDeco = i, this.innerDeco = r, this.nodeDOM = a;
|
|
12145
12145
|
}
|
|
@@ -12168,7 +12168,7 @@ class kt extends ai {
|
|
|
12168
12168
|
u || ({ dom: u, contentDOM: d } = Gt.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
12169
12169
|
!d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
|
|
12170
12170
|
let f = u;
|
|
12171
|
-
return u = bh(u, i, t), c ? l = new b3(e, t, i, r, u, d || null, f, c, s, o + 1) : t.isText ? new
|
|
12171
|
+
return u = bh(u, i, t), c ? l = new b3(e, t, i, r, u, d || null, f, c, s, o + 1) : t.isText ? new br(e, t, i, r, u, f, s) : new kt(e, t, i, r, u, d || null, f, s, o + 1);
|
|
12172
12172
|
}
|
|
12173
12173
|
parseRule() {
|
|
12174
12174
|
if (this.node.type.spec.reparseInView)
|
|
@@ -12191,7 +12191,7 @@ class kt extends ai {
|
|
|
12191
12191
|
return e;
|
|
12192
12192
|
}
|
|
12193
12193
|
matchesNode(e, t, i) {
|
|
12194
|
-
return this.dirty == je && e.eq(this.node) &&
|
|
12194
|
+
return this.dirty == je && e.eq(this.node) && Xi(t, this.outerDeco) && i.eq(this.innerDeco);
|
|
12195
12195
|
}
|
|
12196
12196
|
get size() {
|
|
12197
12197
|
return this.node.nodeSize;
|
|
@@ -12238,7 +12238,7 @@ class kt extends ai {
|
|
|
12238
12238
|
s.pmViewDesc && (s.pmViewDesc = void 0);
|
|
12239
12239
|
}
|
|
12240
12240
|
let o = new y3(this, s, t, r);
|
|
12241
|
-
e.input.compositionNodes.push(o), this.children =
|
|
12241
|
+
e.input.compositionNodes.push(o), this.children = Xs(this.children, i, i + r.length, e, o);
|
|
12242
12242
|
}
|
|
12243
12243
|
// If this desc must be updated to match the given node decoration,
|
|
12244
12244
|
// do so and return true.
|
|
@@ -12249,10 +12249,10 @@ class kt extends ai {
|
|
|
12249
12249
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(r, this.posAtStart), this.dirty = je;
|
|
12250
12250
|
}
|
|
12251
12251
|
updateOuterDeco(e) {
|
|
12252
|
-
if (
|
|
12252
|
+
if (Xi(e, this.outerDeco))
|
|
12253
12253
|
return;
|
|
12254
12254
|
let t = this.nodeDOM.nodeType != 1, i = this.dom;
|
|
12255
|
-
this.dom = yh(this.dom, this.nodeDOM,
|
|
12255
|
+
this.dom = yh(this.dom, this.nodeDOM, Gs(this.outerDeco, this.node, t), Gs(e, this.node, t)), this.dom != i && (i.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
12256
12256
|
}
|
|
12257
12257
|
// Mark this node as being the selected node.
|
|
12258
12258
|
selectNode() {
|
|
@@ -12271,7 +12271,7 @@ function jl(n, e, t, i, r) {
|
|
|
12271
12271
|
let s = new kt(void 0, n, e, t, i, i, i, r, 0);
|
|
12272
12272
|
return s.contentDOM && s.updateChildren(r, 0), s;
|
|
12273
12273
|
}
|
|
12274
|
-
class
|
|
12274
|
+
class br extends kt {
|
|
12275
12275
|
constructor(e, t, i, r, s, o, a) {
|
|
12276
12276
|
super(e, t, i, r, s, null, o, a, 0);
|
|
12277
12277
|
}
|
|
@@ -12302,7 +12302,7 @@ class Cr extends kt {
|
|
|
12302
12302
|
}
|
|
12303
12303
|
slice(e, t, i) {
|
|
12304
12304
|
let r = this.node.cut(e, t), s = document.createTextNode(r.text);
|
|
12305
|
-
return new
|
|
12305
|
+
return new br(this.parent, r, this.outerDeco, this.innerDeco, s, s, i);
|
|
12306
12306
|
}
|
|
12307
12307
|
markDirty(e, t) {
|
|
12308
12308
|
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = tt);
|
|
@@ -12314,7 +12314,7 @@ class Cr extends kt {
|
|
|
12314
12314
|
return this.node.text == e;
|
|
12315
12315
|
}
|
|
12316
12316
|
}
|
|
12317
|
-
class gh extends
|
|
12317
|
+
class gh extends oi {
|
|
12318
12318
|
parseRule() {
|
|
12319
12319
|
return { ignore: !0 };
|
|
12320
12320
|
}
|
|
@@ -12387,7 +12387,7 @@ const Ln = function(n) {
|
|
|
12387
12387
|
};
|
|
12388
12388
|
Ln.prototype = /* @__PURE__ */ Object.create(null);
|
|
12389
12389
|
const Rt = [new Ln()];
|
|
12390
|
-
function
|
|
12390
|
+
function Gs(n, e, t) {
|
|
12391
12391
|
if (n.length == 0)
|
|
12392
12392
|
return Rt;
|
|
12393
12393
|
let i = t ? Rt[0] : new Ln(), r = [i];
|
|
@@ -12440,9 +12440,9 @@ function w3(n, e, t) {
|
|
|
12440
12440
|
}
|
|
12441
12441
|
}
|
|
12442
12442
|
function bh(n, e, t) {
|
|
12443
|
-
return yh(n, n, Rt,
|
|
12443
|
+
return yh(n, n, Rt, Gs(e, t, n.nodeType != 1));
|
|
12444
12444
|
}
|
|
12445
|
-
function
|
|
12445
|
+
function Xi(n, e) {
|
|
12446
12446
|
if (n.length != e.length)
|
|
12447
12447
|
return !1;
|
|
12448
12448
|
for (let t = 0; t < n.length; t++)
|
|
@@ -12544,7 +12544,7 @@ class C3 {
|
|
|
12544
12544
|
let c = this.preMatch.matched.get(l);
|
|
12545
12545
|
if (c != null && c != s)
|
|
12546
12546
|
return !1;
|
|
12547
|
-
let u = l.dom, d, f = this.isLocked(u) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != tt &&
|
|
12547
|
+
let u = l.dom, d, f = this.isLocked(u) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != tt && Xi(t, l.outerDeco));
|
|
12548
12548
|
if (!f && l.update(e, t, i, r))
|
|
12549
12549
|
return this.destroyBetween(this.index, a), l.dom != u && (this.changed = !0), this.index++, !0;
|
|
12550
12550
|
if (!f && (d = this.recreateWrapper(l, e, t, i, r, o)))
|
|
@@ -12557,7 +12557,7 @@ class C3 {
|
|
|
12557
12557
|
// When a node with content is replaced by a different node with
|
|
12558
12558
|
// identical content, move over its children.
|
|
12559
12559
|
recreateWrapper(e, t, i, r, s, o) {
|
|
12560
|
-
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !
|
|
12560
|
+
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Xi(i, e.outerDeco) || !r.eq(e.innerDeco))
|
|
12561
12561
|
return null;
|
|
12562
12562
|
let a = kt.create(this.top, t, i, r, s, o);
|
|
12563
12563
|
if (a.contentDOM) {
|
|
@@ -12588,7 +12588,7 @@ class C3 {
|
|
|
12588
12588
|
for (; e instanceof qt; )
|
|
12589
12589
|
t = e, e = t.children[t.children.length - 1];
|
|
12590
12590
|
(!e || // Empty textblock
|
|
12591
|
-
!(e instanceof
|
|
12591
|
+
!(e instanceof br) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((xe || ue) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
12592
12592
|
}
|
|
12593
12593
|
addHackNode(e, t) {
|
|
12594
12594
|
if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
|
|
@@ -12713,7 +12713,7 @@ function M3(n, e, t, i) {
|
|
|
12713
12713
|
}
|
|
12714
12714
|
return -1;
|
|
12715
12715
|
}
|
|
12716
|
-
function
|
|
12716
|
+
function Xs(n, e, t, i, r) {
|
|
12717
12717
|
let s = [];
|
|
12718
12718
|
for (let o = 0, a = 0; o < n.length; o++) {
|
|
12719
12719
|
let l = n[o], c = a, u = a += l.size;
|
|
@@ -12729,7 +12729,7 @@ function Fo(n, e = null) {
|
|
|
12729
12729
|
if (o < 0)
|
|
12730
12730
|
return null;
|
|
12731
12731
|
let a = i.resolve(o), l, c;
|
|
12732
|
-
if (
|
|
12732
|
+
if (yr(t)) {
|
|
12733
12733
|
for (l = o; r && !r.node; )
|
|
12734
12734
|
r = r.parent;
|
|
12735
12735
|
let d = r.node;
|
|
@@ -12785,15 +12785,15 @@ const Ul = xe || ue && ah < 63;
|
|
|
12785
12785
|
function ql(n, e) {
|
|
12786
12786
|
let { node: t, offset: i } = n.docView.domFromPos(e, 0), r = i < t.childNodes.length ? t.childNodes[i] : null, s = i ? t.childNodes[i - 1] : null;
|
|
12787
12787
|
if (xe && r && r.contentEditable == "false")
|
|
12788
|
-
return
|
|
12788
|
+
return ss(r);
|
|
12789
12789
|
if ((!r || r.contentEditable == "false") && (!s || s.contentEditable == "false")) {
|
|
12790
12790
|
if (r)
|
|
12791
|
-
return
|
|
12791
|
+
return ss(r);
|
|
12792
12792
|
if (s)
|
|
12793
|
-
return
|
|
12793
|
+
return ss(s);
|
|
12794
12794
|
}
|
|
12795
12795
|
}
|
|
12796
|
-
function
|
|
12796
|
+
function ss(n) {
|
|
12797
12797
|
return n.contentEditable = "true", xe && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
12798
12798
|
}
|
|
12799
12799
|
function Kl(n) {
|
|
@@ -12846,7 +12846,7 @@ function E3(n) {
|
|
|
12846
12846
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
12847
12847
|
return Ut(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
12848
12848
|
}
|
|
12849
|
-
function
|
|
12849
|
+
function Ys(n, e) {
|
|
12850
12850
|
let { $anchor: t, $head: i } = n.selection, r = e > 0 ? t.max(i) : t.min(i), s = r.parent.inlineContent ? r.depth ? n.doc.resolve(e > 0 ? r.after() : r.before()) : null : r;
|
|
12851
12851
|
return s && B.findFrom(s, e);
|
|
12852
12852
|
}
|
|
@@ -12864,14 +12864,14 @@ function Xl(n, e, t) {
|
|
|
12864
12864
|
return pt(n, new z(i.$anchor, o));
|
|
12865
12865
|
} else if (i.empty) {
|
|
12866
12866
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
12867
|
-
let r =
|
|
12867
|
+
let r = Ys(n.state, e);
|
|
12868
12868
|
return r && r instanceof D ? pt(n, r) : !1;
|
|
12869
12869
|
} else if (!(Be && t.indexOf("m") > -1)) {
|
|
12870
12870
|
let r = i.$head, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter, o;
|
|
12871
12871
|
if (!s || s.isText)
|
|
12872
12872
|
return !1;
|
|
12873
12873
|
let a = e < 0 ? r.pos - s.nodeSize : r.pos;
|
|
12874
|
-
return s.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? D.isSelectable(s) ? pt(n, new D(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) :
|
|
12874
|
+
return s.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? D.isSelectable(s) ? pt(n, new D(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) : si ? pt(n, new z(n.state.doc.resolve(e < 0 ? a : a + s.nodeSize))) : !1 : !1;
|
|
12875
12875
|
}
|
|
12876
12876
|
} else
|
|
12877
12877
|
return !1;
|
|
@@ -12879,12 +12879,12 @@ function Xl(n, e, t) {
|
|
|
12879
12879
|
if (i instanceof D && i.node.isInline)
|
|
12880
12880
|
return pt(n, new z(e > 0 ? i.$to : i.$from));
|
|
12881
12881
|
{
|
|
12882
|
-
let r =
|
|
12882
|
+
let r = Ys(n.state, e);
|
|
12883
12883
|
return r ? pt(n, r) : !1;
|
|
12884
12884
|
}
|
|
12885
12885
|
}
|
|
12886
12886
|
}
|
|
12887
|
-
function
|
|
12887
|
+
function Yi(n) {
|
|
12888
12888
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
12889
12889
|
}
|
|
12890
12890
|
function zn(n, e) {
|
|
@@ -12899,7 +12899,7 @@ function A3(n) {
|
|
|
12899
12899
|
if (!t)
|
|
12900
12900
|
return;
|
|
12901
12901
|
let r, s, o = !1;
|
|
12902
|
-
for (He && t.nodeType == 1 && i <
|
|
12902
|
+
for (He && t.nodeType == 1 && i < Yi(t) && zn(t.childNodes[i], -1) && (o = !0); ; )
|
|
12903
12903
|
if (i > 0) {
|
|
12904
12904
|
if (t.nodeType != 1)
|
|
12905
12905
|
break;
|
|
@@ -12920,7 +12920,7 @@ function A3(n) {
|
|
|
12920
12920
|
for (; a && zn(a, -1); )
|
|
12921
12921
|
r = t.parentNode, s = me(a), a = a.previousSibling;
|
|
12922
12922
|
if (a)
|
|
12923
|
-
t = a, i =
|
|
12923
|
+
t = a, i = Yi(t);
|
|
12924
12924
|
else {
|
|
12925
12925
|
if (t = t.parentNode, t == n.dom)
|
|
12926
12926
|
break;
|
|
@@ -12928,13 +12928,13 @@ function A3(n) {
|
|
|
12928
12928
|
}
|
|
12929
12929
|
}
|
|
12930
12930
|
}
|
|
12931
|
-
o ?
|
|
12931
|
+
o ? Zs(n, t, i) : r && Zs(n, r, s);
|
|
12932
12932
|
}
|
|
12933
12933
|
function I3(n) {
|
|
12934
12934
|
let e = n.domSelectionRange(), t = e.focusNode, i = e.focusOffset;
|
|
12935
12935
|
if (!t)
|
|
12936
12936
|
return;
|
|
12937
|
-
let r =
|
|
12937
|
+
let r = Yi(t), s, o;
|
|
12938
12938
|
for (; ; )
|
|
12939
12939
|
if (i < r) {
|
|
12940
12940
|
if (t.nodeType != 1)
|
|
@@ -12952,7 +12952,7 @@ function I3(n) {
|
|
|
12952
12952
|
for (; a && zn(a, 1); )
|
|
12953
12953
|
s = a.parentNode, o = me(a) + 1, a = a.nextSibling;
|
|
12954
12954
|
if (a)
|
|
12955
|
-
t = a, i = 0, r =
|
|
12955
|
+
t = a, i = 0, r = Yi(t);
|
|
12956
12956
|
else {
|
|
12957
12957
|
if (t = t.parentNode, t == n.dom)
|
|
12958
12958
|
break;
|
|
@@ -12960,14 +12960,14 @@ function I3(n) {
|
|
|
12960
12960
|
}
|
|
12961
12961
|
}
|
|
12962
12962
|
}
|
|
12963
|
-
s &&
|
|
12963
|
+
s && Zs(n, s, o);
|
|
12964
12964
|
}
|
|
12965
12965
|
function xh(n) {
|
|
12966
12966
|
let e = n.pmViewDesc;
|
|
12967
12967
|
return e && e.node && e.node.isBlock;
|
|
12968
12968
|
}
|
|
12969
12969
|
function O3(n, e) {
|
|
12970
|
-
for (; n && e == n.childNodes.length && !
|
|
12970
|
+
for (; n && e == n.childNodes.length && !ri(n); )
|
|
12971
12971
|
e = me(n) + 1, n = n.parentNode;
|
|
12972
12972
|
for (; n && e < n.childNodes.length; ) {
|
|
12973
12973
|
let t = n.childNodes[e];
|
|
@@ -12979,7 +12979,7 @@ function O3(n, e) {
|
|
|
12979
12979
|
}
|
|
12980
12980
|
}
|
|
12981
12981
|
function D3(n, e) {
|
|
12982
|
-
for (; n && !e && !
|
|
12982
|
+
for (; n && !e && !ri(n); )
|
|
12983
12983
|
e = me(n), n = n.parentNode;
|
|
12984
12984
|
for (; n && e; ) {
|
|
12985
12985
|
let t = n.childNodes[e - 1];
|
|
@@ -12990,7 +12990,7 @@ function D3(n, e) {
|
|
|
12990
12990
|
n = t, e = n.childNodes.length;
|
|
12991
12991
|
}
|
|
12992
12992
|
}
|
|
12993
|
-
function
|
|
12993
|
+
function Zs(n, e, t) {
|
|
12994
12994
|
if (e.nodeType != 3) {
|
|
12995
12995
|
let s, o;
|
|
12996
12996
|
(o = O3(e, t)) ? (e = o, t = 0) : (s = D3(e, t)) && (e = s, t = s.nodeValue.length);
|
|
@@ -12998,7 +12998,7 @@ function eo(n, e, t) {
|
|
|
12998
12998
|
let i = n.domSelection();
|
|
12999
12999
|
if (!i)
|
|
13000
13000
|
return;
|
|
13001
|
-
if (
|
|
13001
|
+
if (yr(i)) {
|
|
13002
13002
|
let s = document.createRange();
|
|
13003
13003
|
s.setEnd(e, t), s.setStart(e, t), i.removeAllRanges(), i.addRange(s);
|
|
13004
13004
|
} else
|
|
@@ -13032,7 +13032,7 @@ function Zl(n, e, t) {
|
|
|
13032
13032
|
return !1;
|
|
13033
13033
|
let { $from: r, $to: s } = i;
|
|
13034
13034
|
if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
13035
|
-
let o =
|
|
13035
|
+
let o = Ys(n.state, e);
|
|
13036
13036
|
if (o && o instanceof D)
|
|
13037
13037
|
return pt(n, o);
|
|
13038
13038
|
}
|
|
@@ -13151,7 +13151,7 @@ function Sh(n, e, t, i, r) {
|
|
|
13151
13151
|
} else
|
|
13152
13152
|
n.someProp("transformPastedHTML", (d) => {
|
|
13153
13153
|
t = d(t, n);
|
|
13154
|
-
}), o = F3(t),
|
|
13154
|
+
}), o = F3(t), si && V3(o);
|
|
13155
13155
|
let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
13156
13156
|
if (u && u[3])
|
|
13157
13157
|
for (let d = +u[3]; d > 0; d--) {
|
|
@@ -13226,12 +13226,12 @@ function _h(n, e) {
|
|
|
13226
13226
|
let t = n.content.replaceChild(n.childCount - 1, _h(n.lastChild, e - 1)), i = n.contentMatchAt(n.childCount).fillBefore(T.empty, !0);
|
|
13227
13227
|
return n.copy(t.append(i));
|
|
13228
13228
|
}
|
|
13229
|
-
function
|
|
13229
|
+
function Qs(n, e, t, i, r, s) {
|
|
13230
13230
|
let o = e < 0 ? n.firstChild : n.lastChild, a = o.content;
|
|
13231
|
-
return n.childCount > 1 && (s = 0), r < i - 1 && (a =
|
|
13231
|
+
return n.childCount > 1 && (s = 0), r < i - 1 && (a = Qs(a, e, t, i, r + 1, s)), r >= t && (a = e < 0 ? o.contentMatchAt(0).fillBefore(a, s <= r).append(a) : a.append(o.contentMatchAt(o.childCount).fillBefore(T.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(a));
|
|
13232
13232
|
}
|
|
13233
13233
|
function tc(n, e, t) {
|
|
13234
|
-
return e < n.openStart && (n = new N(
|
|
13234
|
+
return e < n.openStart && (n = new N(Qs(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new N(Qs(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
13235
13235
|
}
|
|
13236
13236
|
const Nh = {
|
|
13237
13237
|
thead: ["table"],
|
|
@@ -13248,10 +13248,10 @@ let nc = null;
|
|
|
13248
13248
|
function Eh() {
|
|
13249
13249
|
return nc || (nc = document.implementation.createHTMLDocument("title"));
|
|
13250
13250
|
}
|
|
13251
|
-
let
|
|
13251
|
+
let as = null;
|
|
13252
13252
|
function B3(n) {
|
|
13253
13253
|
let e = window.trustedTypes;
|
|
13254
|
-
return e ? (
|
|
13254
|
+
return e ? (as || (as = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), as.createHTML(n)) : n;
|
|
13255
13255
|
}
|
|
13256
13256
|
function F3(n) {
|
|
13257
13257
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
@@ -13300,7 +13300,7 @@ function U3(n) {
|
|
|
13300
13300
|
K3(n, i) && !jo(n, i) && (n.editable || !(i.type in Ee)) && t(n, i);
|
|
13301
13301
|
}, j3[e] ? { passive: !0 } : void 0);
|
|
13302
13302
|
}
|
|
13303
|
-
xe && n.dom.addEventListener("input", () => null),
|
|
13303
|
+
xe && n.dom.addEventListener("input", () => null), eo(n);
|
|
13304
13304
|
}
|
|
13305
13305
|
function bt(n, e) {
|
|
13306
13306
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
@@ -13311,7 +13311,7 @@ function q3(n) {
|
|
|
13311
13311
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
13312
13312
|
clearTimeout(n.input.composingTimeout), clearTimeout(n.input.lastIOSEnterFallbackTimeout);
|
|
13313
13313
|
}
|
|
13314
|
-
function
|
|
13314
|
+
function eo(n) {
|
|
13315
13315
|
n.someProp("handleDOMEvents", (e) => {
|
|
13316
13316
|
for (let t in e)
|
|
13317
13317
|
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (i) => jo(n, i));
|
|
@@ -13364,7 +13364,7 @@ Ee.keypress = (n, e) => {
|
|
|
13364
13364
|
!/[\r\n]/.test(r) && !n.someProp("handleTextInput", (o) => o(n, i.$from.pos, i.$to.pos, r, s)) && n.dispatch(s()), t.preventDefault();
|
|
13365
13365
|
}
|
|
13366
13366
|
};
|
|
13367
|
-
function
|
|
13367
|
+
function wr(n) {
|
|
13368
13368
|
return { left: n.clientX, top: n.clientY };
|
|
13369
13369
|
}
|
|
13370
13370
|
function G3(n, e) {
|
|
@@ -13435,7 +13435,7 @@ function t4(n, e, t) {
|
|
|
13435
13435
|
}
|
|
13436
13436
|
}
|
|
13437
13437
|
function Uo(n) {
|
|
13438
|
-
return
|
|
13438
|
+
return Zi(n);
|
|
13439
13439
|
}
|
|
13440
13440
|
const Ah = Be ? "metaKey" : "ctrlKey";
|
|
13441
13441
|
Ne.mousedown = (n, e) => {
|
|
@@ -13443,7 +13443,7 @@ Ne.mousedown = (n, e) => {
|
|
|
13443
13443
|
n.input.shiftKey = t.shiftKey;
|
|
13444
13444
|
let i = Uo(n), r = Date.now(), s = "singleClick";
|
|
13445
13445
|
r - n.input.lastClick.time < 500 && G3(t, n.input.lastClick) && !t[Ah] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: r, x: t.clientX, y: t.clientY, type: s, button: t.button };
|
|
13446
|
-
let o = n.posAtCoords(
|
|
13446
|
+
let o = n.posAtCoords(wr(t));
|
|
13447
13447
|
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new n4(n, o, t, !!i)) : (s == "doubleClick" ? Q3 : e4)(n, o.pos, o.inside, t) ? t.preventDefault() : bt(n, "pointer"));
|
|
13448
13448
|
};
|
|
13449
13449
|
class n4 {
|
|
@@ -13475,7 +13475,7 @@ class n4 {
|
|
|
13475
13475
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
13476
13476
|
return;
|
|
13477
13477
|
let t = this.pos;
|
|
13478
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(
|
|
13478
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(wr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? bt(this.view, "pointer") : Z3(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
13479
13479
|
xe && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
13480
13480
|
// cursor, but still report that the node is selected
|
|
13481
13481
|
// when asked through getSelection. You'll then get a
|
|
@@ -13508,8 +13508,8 @@ Ee.compositionstart = Ee.compositionupdate = (n) => {
|
|
|
13508
13508
|
n.domObserver.flush();
|
|
13509
13509
|
let { state: e } = n, t = e.selection.$to;
|
|
13510
13510
|
if (e.selection instanceof z && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((i) => i.type.spec.inclusive === !1) || ue && lh && r4(n)))
|
|
13511
|
-
n.markCursor = n.state.storedMarks || t.marks(),
|
|
13512
|
-
else if (
|
|
13511
|
+
n.markCursor = n.state.storedMarks || t.marks(), Zi(n, !0), n.markCursor = null;
|
|
13512
|
+
else if (Zi(n, !e.selection.empty), He && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
13513
13513
|
let i = n.domSelectionRange();
|
|
13514
13514
|
for (let r = i.focusNode, s = i.focusOffset; r && r.nodeType == 1 && s != 0; ) {
|
|
13515
13515
|
let o = s < 0 ? r.lastChild : r.childNodes[s - 1];
|
|
@@ -13538,7 +13538,7 @@ Ee.compositionend = (n, e) => {
|
|
|
13538
13538
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Oh(n, 20));
|
|
13539
13539
|
};
|
|
13540
13540
|
function Oh(n, e) {
|
|
13541
|
-
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() =>
|
|
13541
|
+
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Zi(n), e));
|
|
13542
13542
|
}
|
|
13543
13543
|
function Dh(n) {
|
|
13544
13544
|
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = o4()); n.input.compositionNodes.length > 0; )
|
|
@@ -13567,7 +13567,7 @@ function o4() {
|
|
|
13567
13567
|
let n = document.createEvent("Event");
|
|
13568
13568
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
13569
13569
|
}
|
|
13570
|
-
function
|
|
13570
|
+
function Zi(n, e = !1) {
|
|
13571
13571
|
if (!(ot && n.domObserver.flushingSoon >= 0)) {
|
|
13572
13572
|
if (n.domObserver.forceFlush(), Dh(n), e || n.docView && n.docView.dirty) {
|
|
13573
13573
|
let t = Fo(n), i = n.state.selection;
|
|
@@ -13644,7 +13644,7 @@ Ne.dragstart = (n, e) => {
|
|
|
13644
13644
|
let t = e, i = n.input.mouseDown;
|
|
13645
13645
|
if (i && i.done(), !t.dataTransfer)
|
|
13646
13646
|
return;
|
|
13647
|
-
let r = n.state.selection, s = r.empty ? null : n.posAtCoords(
|
|
13647
|
+
let r = n.state.selection, s = r.empty ? null : n.posAtCoords(wr(t)), o;
|
|
13648
13648
|
if (!(s && s.pos >= r.from && s.pos <= (r instanceof D ? r.to - 1 : r.to))) {
|
|
13649
13649
|
if (i && i.mightDrag)
|
|
13650
13650
|
o = D.create(n.state.doc, i.mightDrag.pos);
|
|
@@ -13673,7 +13673,7 @@ Ee.drop = (n, e) => {
|
|
|
13673
13673
|
function d4(n, e, t) {
|
|
13674
13674
|
if (!e.dataTransfer)
|
|
13675
13675
|
return;
|
|
13676
|
-
let i = n.posAtCoords(
|
|
13676
|
+
let i = n.posAtCoords(wr(e));
|
|
13677
13677
|
if (!i)
|
|
13678
13678
|
return;
|
|
13679
13679
|
let r = n.state.doc.resolve(i.pos), s = t && t.slice;
|
|
@@ -13741,7 +13741,7 @@ function Xn(n, e) {
|
|
|
13741
13741
|
return !1;
|
|
13742
13742
|
return !0;
|
|
13743
13743
|
}
|
|
13744
|
-
class
|
|
13744
|
+
class Qi {
|
|
13745
13745
|
constructor(e, t) {
|
|
13746
13746
|
this.toDOM = e, this.spec = t || Bt, this.side = this.spec.side || 0;
|
|
13747
13747
|
}
|
|
@@ -13753,7 +13753,7 @@ class er {
|
|
|
13753
13753
|
return !0;
|
|
13754
13754
|
}
|
|
13755
13755
|
eq(e) {
|
|
13756
|
-
return this == e || e instanceof
|
|
13756
|
+
return this == e || e instanceof Qi && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Xn(this.spec, e.spec));
|
|
13757
13757
|
}
|
|
13758
13758
|
destroy(e) {
|
|
13759
13759
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -13834,7 +13834,7 @@ class _e {
|
|
|
13834
13834
|
widget's current document position.
|
|
13835
13835
|
*/
|
|
13836
13836
|
static widget(e, t, i) {
|
|
13837
|
-
return new _e(e, e, new
|
|
13837
|
+
return new _e(e, e, new Qi(t, i));
|
|
13838
13838
|
}
|
|
13839
13839
|
/**
|
|
13840
13840
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -13868,7 +13868,7 @@ class _e {
|
|
|
13868
13868
|
@internal
|
|
13869
13869
|
*/
|
|
13870
13870
|
get widget() {
|
|
13871
|
-
return this.type instanceof
|
|
13871
|
+
return this.type instanceof Qi;
|
|
13872
13872
|
}
|
|
13873
13873
|
}
|
|
13874
13874
|
const on = [], Bt = {};
|
|
@@ -13885,7 +13885,7 @@ class Z {
|
|
|
13885
13885
|
you must make a copy if you want need to preserve that.
|
|
13886
13886
|
*/
|
|
13887
13887
|
static create(e, t) {
|
|
13888
|
-
return t.length ?
|
|
13888
|
+
return t.length ? er(t, e, 0, Bt) : Ce;
|
|
13889
13889
|
}
|
|
13890
13890
|
/**
|
|
13891
13891
|
Find all decorations in this set which touch the given range
|
|
@@ -13944,7 +13944,7 @@ class Z {
|
|
|
13944
13944
|
if (u = zh(t, a, c)) {
|
|
13945
13945
|
for (r || (r = this.children.slice()); s < r.length && r[s] < l; )
|
|
13946
13946
|
s += 3;
|
|
13947
|
-
r[s] == l ? r[s + 2] = r[s + 2].addInner(a, u, c + 1) : r.splice(s, 0, l, l + a.nodeSize,
|
|
13947
|
+
r[s] == l ? r[s + 2] = r[s + 2].addInner(a, u, c + 1) : r.splice(s, 0, l, l + a.nodeSize, er(u, a, c + 1, Bt)), s += 3;
|
|
13948
13948
|
}
|
|
13949
13949
|
});
|
|
13950
13950
|
let o = Lh(s ? Bh(t) : t, -i);
|
|
@@ -14140,7 +14140,7 @@ function h4(n, e, t, i, r, s, o) {
|
|
|
14140
14140
|
l = !0;
|
|
14141
14141
|
}
|
|
14142
14142
|
if (l) {
|
|
14143
|
-
let c = f4(a, n, e, t, r, s, o), u =
|
|
14143
|
+
let c = f4(a, n, e, t, r, s, o), u = er(c, i, 0, o);
|
|
14144
14144
|
e = u.local;
|
|
14145
14145
|
for (let d = 0; d < a.length; d += 3)
|
|
14146
14146
|
a[d + 1] < 0 && (a.splice(d, 3), d -= 3);
|
|
@@ -14190,13 +14190,13 @@ function Bh(n) {
|
|
|
14190
14190
|
n[t] != null && e.push(n[t]);
|
|
14191
14191
|
return e;
|
|
14192
14192
|
}
|
|
14193
|
-
function
|
|
14193
|
+
function er(n, e, t, i) {
|
|
14194
14194
|
let r = [], s = !1;
|
|
14195
14195
|
e.forEach((a, l) => {
|
|
14196
14196
|
let c = zh(n, a, l + t);
|
|
14197
14197
|
if (c) {
|
|
14198
14198
|
s = !0;
|
|
14199
|
-
let u =
|
|
14199
|
+
let u = er(c, a, t + l + 1, i);
|
|
14200
14200
|
u != Ce && r.push(l, l + a.nodeSize, u);
|
|
14201
14201
|
}
|
|
14202
14202
|
});
|
|
@@ -14231,7 +14231,7 @@ function ic(n, e, t) {
|
|
|
14231
14231
|
e++;
|
|
14232
14232
|
n.splice(e, 0, t);
|
|
14233
14233
|
}
|
|
14234
|
-
function
|
|
14234
|
+
function ls(n) {
|
|
14235
14235
|
let e = [];
|
|
14236
14236
|
return n.someProp("decorations", (t) => {
|
|
14237
14237
|
let i = t(n.state);
|
|
@@ -14373,7 +14373,7 @@ class v4 {
|
|
|
14373
14373
|
}
|
|
14374
14374
|
}
|
|
14375
14375
|
let c = null;
|
|
14376
|
-
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 &&
|
|
14376
|
+
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && yr(i) && (c = Fo(e)) && c.eq(B.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, lt(e), this.currentSelection.set(i), e.scrollToSelection()) : (s > -1 || r) && (s > -1 && (e.docView.markDirty(s, o), y4(e)), this.handleDOMChange(s, o, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(i) || lt(e), this.currentSelection.set(i));
|
|
14377
14377
|
}
|
|
14378
14378
|
registerMutation(e, t) {
|
|
14379
14379
|
if (t.indexOf(e.target) > -1)
|
|
@@ -14443,7 +14443,7 @@ function w4(n, e) {
|
|
|
14443
14443
|
}
|
|
14444
14444
|
function C4(n, e, t) {
|
|
14445
14445
|
let { node: i, fromOffset: r, toOffset: s, from: o, to: a } = n.docView.parseRange(e, t), l = n.domSelectionRange(), c, u = l.anchorNode;
|
|
14446
|
-
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: l.anchorOffset }],
|
|
14446
|
+
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: l.anchorOffset }], yr(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), ue && n.input.lastKeyCode === 8)
|
|
14447
14447
|
for (let y = s; y > r; y--) {
|
|
14448
14448
|
let g = i.childNodes[y - 1], b = g.pmViewDesc;
|
|
14449
14449
|
if (g.nodeName == "BR" && !b) {
|
|
@@ -14586,7 +14586,7 @@ function M4(n, e, t, i, r) {
|
|
|
14586
14586
|
if (
|
|
14587
14587
|
// The content must have shrunk
|
|
14588
14588
|
t - e <= r.pos - i.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
14589
|
-
|
|
14589
|
+
cs(i, !0, !1) < r.pos
|
|
14590
14590
|
)
|
|
14591
14591
|
return !1;
|
|
14592
14592
|
let s = n.resolve(e);
|
|
@@ -14596,10 +14596,10 @@ function M4(n, e, t, i, r) {
|
|
|
14596
14596
|
}
|
|
14597
14597
|
if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
|
|
14598
14598
|
return !1;
|
|
14599
|
-
let o = n.resolve(
|
|
14600
|
-
return !o.parent.isTextblock || o.pos > t ||
|
|
14599
|
+
let o = n.resolve(cs(s, !0, !0));
|
|
14600
|
+
return !o.parent.isTextblock || o.pos > t || cs(o, !0, !1) < t ? !1 : i.parent.content.cut(i.parentOffset).eq(o.parent.content);
|
|
14601
14601
|
}
|
|
14602
|
-
function
|
|
14602
|
+
function cs(n, e, t) {
|
|
14603
14603
|
let i = n.depth, r = e ? n.end() : n.pos;
|
|
14604
14604
|
for (; i > 0 && (e || n.indexAfter(i) == n.node(i).childCount); )
|
|
14605
14605
|
i--, r++, e = !1;
|
|
@@ -14643,7 +14643,7 @@ class Fh {
|
|
|
14643
14643
|
added to the document.
|
|
14644
14644
|
*/
|
|
14645
14645
|
constructor(e, t) {
|
|
14646
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new W3(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(fc), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = dc(this), uc(this), this.nodeViews = hc(this), this.docView = jl(this.state.doc, cc(this),
|
|
14646
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new W3(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(fc), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = dc(this), uc(this), this.nodeViews = hc(this), this.docView = jl(this.state.doc, cc(this), ls(this), this.dom, this), this.domObserver = new v4(this, (i, r, s, o) => S4(this, i, r, s, o)), this.domObserver.start(), U3(this), this.updatePluginViews();
|
|
14647
14647
|
}
|
|
14648
14648
|
/**
|
|
14649
14649
|
Holds `true` when a
|
|
@@ -14671,7 +14671,7 @@ class Fh {
|
|
|
14671
14671
|
the DOM.
|
|
14672
14672
|
*/
|
|
14673
14673
|
update(e) {
|
|
14674
|
-
e.handleDOMEvents != this._props.handleDOMEvents &&
|
|
14674
|
+
e.handleDOMEvents != this._props.handleDOMEvents && eo(this);
|
|
14675
14675
|
let t = this._props;
|
|
14676
14676
|
this._props = e, e.plugins && (e.plugins.forEach(fc), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
|
|
14677
14677
|
}
|
|
@@ -14705,8 +14705,8 @@ class Fh {
|
|
|
14705
14705
|
let p = hc(this);
|
|
14706
14706
|
E4(p, this.nodeViews) && (this.nodeViews = p, s = !0);
|
|
14707
14707
|
}
|
|
14708
|
-
(a || t.handleDOMEvents != this._props.handleDOMEvents) &&
|
|
14709
|
-
let l =
|
|
14708
|
+
(a || t.handleDOMEvents != this._props.handleDOMEvents) && eo(this), this.editable = dc(this), uc(this);
|
|
14709
|
+
let l = ls(this), c = cc(this), u = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = s || !this.docView.matchesNode(e.doc, c, l);
|
|
14710
14710
|
(d || !e.selection.eq(r.selection)) && (o = !0);
|
|
14711
14711
|
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && s3(this);
|
|
14712
14712
|
if (o) {
|
|
@@ -14937,7 +14937,7 @@ class Fh {
|
|
|
14937
14937
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
14938
14938
|
*/
|
|
14939
14939
|
destroy() {
|
|
14940
|
-
this.docView && (q3(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [],
|
|
14940
|
+
this.docView && (q3(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ls(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, G6());
|
|
14941
14941
|
}
|
|
14942
14942
|
/**
|
|
14943
14943
|
This is true when the view has been
|
|
@@ -15069,7 +15069,7 @@ var St = {
|
|
|
15069
15069
|
220: "\\",
|
|
15070
15070
|
221: "]",
|
|
15071
15071
|
222: "'"
|
|
15072
|
-
},
|
|
15072
|
+
}, tr = {
|
|
15073
15073
|
48: ")",
|
|
15074
15074
|
49: "!",
|
|
15075
15075
|
50: "@",
|
|
@@ -15100,11 +15100,11 @@ for (var ge = 0; ge < 10; ge++)
|
|
|
15100
15100
|
for (var ge = 1; ge <= 24; ge++)
|
|
15101
15101
|
St[ge + 111] = "F" + ge;
|
|
15102
15102
|
for (var ge = 65; ge <= 90; ge++)
|
|
15103
|
-
St[ge] = String.fromCharCode(ge + 32),
|
|
15104
|
-
for (var
|
|
15105
|
-
|
|
15103
|
+
St[ge] = String.fromCharCode(ge + 32), tr[ge] = String.fromCharCode(ge);
|
|
15104
|
+
for (var us in St)
|
|
15105
|
+
tr.hasOwnProperty(us) || (tr[us] = St[us]);
|
|
15106
15106
|
function O4(n) {
|
|
15107
|
-
var e = A4 && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || I4 && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ?
|
|
15107
|
+
var e = A4 && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || I4 && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? tr : St)[n.keyCode] || n.key || "Unidentified";
|
|
15108
15108
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
15109
15109
|
}
|
|
15110
15110
|
const D4 = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), $4 = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -15135,7 +15135,7 @@ function P4(n) {
|
|
|
15135
15135
|
e[R4(t)] = n[t];
|
|
15136
15136
|
return e;
|
|
15137
15137
|
}
|
|
15138
|
-
function
|
|
15138
|
+
function ds(n, e, t = !0) {
|
|
15139
15139
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
15140
15140
|
}
|
|
15141
15141
|
function L4(n) {
|
|
@@ -15144,18 +15144,18 @@ function L4(n) {
|
|
|
15144
15144
|
function Vh(n) {
|
|
15145
15145
|
let e = P4(n);
|
|
15146
15146
|
return function(t, i) {
|
|
15147
|
-
let r = O4(i), s, o = e[
|
|
15147
|
+
let r = O4(i), s, o = e[ds(r, i)];
|
|
15148
15148
|
if (o && o(t.state, t.dispatch, t))
|
|
15149
15149
|
return !0;
|
|
15150
15150
|
if (r.length == 1 && r != " ") {
|
|
15151
15151
|
if (i.shiftKey) {
|
|
15152
|
-
let a = e[
|
|
15152
|
+
let a = e[ds(r, i, !1)];
|
|
15153
15153
|
if (a && a(t.state, t.dispatch, t))
|
|
15154
15154
|
return !0;
|
|
15155
15155
|
}
|
|
15156
15156
|
if ((i.altKey || i.metaKey || i.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
15157
15157
|
!($4 && i.ctrlKey && i.altKey) && (s = St[i.keyCode]) && s != r) {
|
|
15158
|
-
let a = e[
|
|
15158
|
+
let a = e[ds(s, i)];
|
|
15159
15159
|
if (a && a(t.state, t.dispatch, t))
|
|
15160
15160
|
return !0;
|
|
15161
15161
|
}
|
|
@@ -15167,7 +15167,7 @@ var z4 = Object.defineProperty, Jo = (n, e) => {
|
|
|
15167
15167
|
for (var t in e)
|
|
15168
15168
|
z4(n, t, { get: e[t], enumerable: !0 });
|
|
15169
15169
|
};
|
|
15170
|
-
function
|
|
15170
|
+
function Cr(n) {
|
|
15171
15171
|
const { state: e, transaction: t } = n;
|
|
15172
15172
|
let { selection: i } = t, { doc: r } = t, { storedMarks: s } = t;
|
|
15173
15173
|
return {
|
|
@@ -15192,7 +15192,7 @@ function xr(n) {
|
|
|
15192
15192
|
}
|
|
15193
15193
|
};
|
|
15194
15194
|
}
|
|
15195
|
-
var
|
|
15195
|
+
var kr = class {
|
|
15196
15196
|
constructor(n) {
|
|
15197
15197
|
this.editor = n.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = n.state;
|
|
15198
15198
|
}
|
|
@@ -15243,7 +15243,7 @@ var Sr = class {
|
|
|
15243
15243
|
tr: n,
|
|
15244
15244
|
editor: i,
|
|
15245
15245
|
view: s,
|
|
15246
|
-
state:
|
|
15246
|
+
state: Cr({
|
|
15247
15247
|
state: r,
|
|
15248
15248
|
transaction: n
|
|
15249
15249
|
}),
|
|
@@ -15388,12 +15388,12 @@ var q4 = (n) => ({ tr: e, state: t, dispatch: i }) => {
|
|
|
15388
15388
|
function Go(n) {
|
|
15389
15389
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
15390
15390
|
}
|
|
15391
|
-
function
|
|
15391
|
+
function nr(n, e, t = { strict: !0 }) {
|
|
15392
15392
|
const i = Object.keys(e);
|
|
15393
15393
|
return i.length ? i.every((r) => t.strict ? e[r] === n[r] : Go(e[r]) ? e[r].test(n[r]) : e[r] === n[r]) : !0;
|
|
15394
15394
|
}
|
|
15395
15395
|
function jh(n, e, t = {}) {
|
|
15396
|
-
return n.find((i) => i.type === e &&
|
|
15396
|
+
return n.find((i) => i.type === e && nr(
|
|
15397
15397
|
// Only check equality for the attributes that are provided
|
|
15398
15398
|
Object.fromEntries(Object.keys(t).map((r) => [r, i.attrs[r]])),
|
|
15399
15399
|
t
|
|
@@ -15492,7 +15492,7 @@ var ev = (n = null, e = {}) => ({ editor: t, view: i, tr: r, dispatch: s }) => {
|
|
|
15492
15492
|
}
|
|
15493
15493
|
return n;
|
|
15494
15494
|
};
|
|
15495
|
-
function
|
|
15495
|
+
function Ti(n) {
|
|
15496
15496
|
if (typeof window > "u")
|
|
15497
15497
|
throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
|
|
15498
15498
|
const e = "<body>".concat(n, "</body>"), t = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
@@ -15539,13 +15539,13 @@ function Yn(n, e, t) {
|
|
|
15539
15539
|
}
|
|
15540
15540
|
})
|
|
15541
15541
|
});
|
|
15542
|
-
if (t.slice ? Rn.fromSchema(l).parseSlice(
|
|
15542
|
+
if (t.slice ? Rn.fromSchema(l).parseSlice(Ti(n), t.parseOptions) : Rn.fromSchema(l).parse(Ti(n), t.parseOptions), t.errorOnInvalidContent && o)
|
|
15543
15543
|
throw new Error("[tiptap error]: Invalid HTML content", {
|
|
15544
15544
|
cause: new Error("Invalid element found: ".concat(a))
|
|
15545
15545
|
});
|
|
15546
15546
|
}
|
|
15547
15547
|
const s = Rn.fromSchema(e);
|
|
15548
|
-
return t.slice ? s.parseSlice(
|
|
15548
|
+
return t.slice ? s.parseSlice(Ti(n), t.parseOptions).content : s.parse(Ti(n), t.parseOptions);
|
|
15549
15549
|
}
|
|
15550
15550
|
return Yn("", e, t);
|
|
15551
15551
|
}
|
|
@@ -15631,14 +15631,14 @@ var rv = (n) => !("type" in n), sv = (n, e, t) => ({ tr: i, dispatch: r, editor:
|
|
|
15631
15631
|
return !0;
|
|
15632
15632
|
}, ov = () => ({ state: n, dispatch: e }) => A6(n, e), av = () => ({ state: n, dispatch: e }) => I6(n, e), lv = () => ({ state: n, dispatch: e }) => S6(n, e), cv = () => ({ state: n, dispatch: e }) => N6(n, e), uv = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
15633
15633
|
try {
|
|
15634
|
-
const i =
|
|
15634
|
+
const i = mr(n.doc, n.selection.$from.pos, -1);
|
|
15635
15635
|
return i == null ? !1 : (t.join(i, 2), e && e(t), !0);
|
|
15636
15636
|
} catch (i) {
|
|
15637
15637
|
return !1;
|
|
15638
15638
|
}
|
|
15639
15639
|
}, dv = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
15640
15640
|
try {
|
|
15641
|
-
const i =
|
|
15641
|
+
const i = mr(n.doc, n.selection.$from.pos, 1);
|
|
15642
15642
|
return i == null ? !1 : (t.join(i, 2), e && e(t), !0);
|
|
15643
15643
|
} catch (i) {
|
|
15644
15644
|
return !1;
|
|
@@ -15698,7 +15698,7 @@ function Zn(n, e, t = {}) {
|
|
|
15698
15698
|
to: m
|
|
15699
15699
|
});
|
|
15700
15700
|
});
|
|
15701
|
-
const l = r - i, c = a.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) =>
|
|
15701
|
+
const l = r - i, c = a.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => nr(d.node.attrs, t, { strict: !1 }));
|
|
15702
15702
|
return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= l;
|
|
15703
15703
|
}
|
|
15704
15704
|
var gv = (n, e = {}) => ({ state: t, dispatch: i }) => {
|
|
@@ -15708,7 +15708,7 @@ var gv = (n, e = {}) => ({ state: t, dispatch: i }) => {
|
|
|
15708
15708
|
const i = fe(n, e.schema);
|
|
15709
15709
|
return U6(i)(e, t);
|
|
15710
15710
|
}, bv = () => ({ state: n, dispatch: e }) => D6(n, e);
|
|
15711
|
-
function
|
|
15711
|
+
function xr(n, e) {
|
|
15712
15712
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
15713
15713
|
}
|
|
15714
15714
|
function mc(n, e) {
|
|
@@ -15717,7 +15717,7 @@ function mc(n, e) {
|
|
|
15717
15717
|
}
|
|
15718
15718
|
var wv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
|
|
15719
15719
|
let s = null, o = null;
|
|
15720
|
-
const a =
|
|
15720
|
+
const a = xr(
|
|
15721
15721
|
typeof n == "string" ? n : n.name,
|
|
15722
15722
|
i.schema
|
|
15723
15723
|
);
|
|
@@ -15739,7 +15739,7 @@ var wv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
15739
15739
|
}
|
|
15740
15740
|
return !0;
|
|
15741
15741
|
}, xv = () => ({ state: n, dispatch: e }) => _6(n, e), Sv = () => ({ state: n, dispatch: e }) => E6(n, e), Tv = () => ({ state: n, dispatch: e }) => L6(n, e), Mv = () => ({ state: n, dispatch: e }) => F6(n, e), _v = () => ({ state: n, dispatch: e }) => B6(n, e);
|
|
15742
|
-
function
|
|
15742
|
+
function to(n, e, t = {}, i = {}) {
|
|
15743
15743
|
return Yn(n, e, {
|
|
15744
15744
|
slice: !1,
|
|
15745
15745
|
parseOptions: t,
|
|
@@ -15749,7 +15749,7 @@ function io(n, e, t = {}, i = {}) {
|
|
|
15749
15749
|
var Nv = (n, { errorOnInvalidContent: e, emitUpdate: t = !0, parseOptions: i = {} } = {}) => ({ editor: r, tr: s, dispatch: o, commands: a }) => {
|
|
15750
15750
|
const { doc: l } = s;
|
|
15751
15751
|
if (i.preserveWhitespace !== "full") {
|
|
15752
|
-
const c =
|
|
15752
|
+
const c = to(n, r.schema, i, {
|
|
15753
15753
|
errorOnInvalidContent: e != null ? e : r.options.enableContentCheck
|
|
15754
15754
|
});
|
|
15755
15755
|
return o && s.replaceWith(0, l.content.size, c).setMeta("preventUpdate", !t), !0;
|
|
@@ -15898,7 +15898,7 @@ function Yh(n) {
|
|
|
15898
15898
|
});
|
|
15899
15899
|
}), e;
|
|
15900
15900
|
}
|
|
15901
|
-
function
|
|
15901
|
+
function Sr(...n) {
|
|
15902
15902
|
return n.filter((e) => !!e).reduce((e, t) => {
|
|
15903
15903
|
const i = { ...e };
|
|
15904
15904
|
return Object.entries(t).forEach(([r, s]) => {
|
|
@@ -15923,10 +15923,10 @@ function Mr(...n) {
|
|
|
15923
15923
|
}), i;
|
|
15924
15924
|
}, {});
|
|
15925
15925
|
}
|
|
15926
|
-
function
|
|
15926
|
+
function ir(n, e) {
|
|
15927
15927
|
return e.filter((t) => t.type === n.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(n.attrs) || {} : {
|
|
15928
15928
|
[t.name]: n.attrs[t.name]
|
|
15929
|
-
}).reduce((t, i) =>
|
|
15929
|
+
}).reduce((t, i) => Sr(t, i), {});
|
|
15930
15930
|
}
|
|
15931
15931
|
function Dv(n) {
|
|
15932
15932
|
return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
|
|
@@ -15999,7 +15999,7 @@ function $v(n, e) {
|
|
|
15999
15999
|
const v = I(c, "renderHTML", d);
|
|
16000
16000
|
v && (p.toDOM = (g) => v({
|
|
16001
16001
|
node: g,
|
|
16002
|
-
HTMLAttributes:
|
|
16002
|
+
HTMLAttributes: ir(g, u)
|
|
16003
16003
|
}));
|
|
16004
16004
|
const y = I(c, "renderText", d);
|
|
16005
16005
|
return y && (p.toText = y), [c.name, p];
|
|
@@ -16032,7 +16032,7 @@ function $v(n, e) {
|
|
|
16032
16032
|
const v = I(c, "renderHTML", d);
|
|
16033
16033
|
return v && (p.toDOM = (y) => v({
|
|
16034
16034
|
mark: y,
|
|
16035
|
-
HTMLAttributes:
|
|
16035
|
+
HTMLAttributes: ir(y, u)
|
|
16036
16036
|
})), [c.name, p];
|
|
16037
16037
|
})
|
|
16038
16038
|
);
|
|
@@ -16097,7 +16097,7 @@ function Lv(n, e) {
|
|
|
16097
16097
|
return o ? { ...o.attrs } : {};
|
|
16098
16098
|
}
|
|
16099
16099
|
function zv(n, e) {
|
|
16100
|
-
const t =
|
|
16100
|
+
const t = xr(
|
|
16101
16101
|
typeof e == "string" ? e : e.name,
|
|
16102
16102
|
n.schema
|
|
16103
16103
|
);
|
|
@@ -16143,10 +16143,10 @@ function Vv(n) {
|
|
|
16143
16143
|
});
|
|
16144
16144
|
}), Fv(i);
|
|
16145
16145
|
}
|
|
16146
|
-
function
|
|
16146
|
+
function hs(n, e) {
|
|
16147
16147
|
return e.nodes[n] || e.marks[n] || null;
|
|
16148
16148
|
}
|
|
16149
|
-
function
|
|
16149
|
+
function Pi(n, e, t) {
|
|
16150
16150
|
return Object.fromEntries(
|
|
16151
16151
|
Object.entries(t).filter(([i]) => {
|
|
16152
16152
|
const r = n.find((s) => s.type === e && s.name === i);
|
|
@@ -16168,10 +16168,10 @@ var Hv = (n, e = 500) => {
|
|
|
16168
16168
|
t += r.isAtom && !r.isText ? u : u.slice(0, Math.max(0, i - s));
|
|
16169
16169
|
}), t;
|
|
16170
16170
|
};
|
|
16171
|
-
function
|
|
16171
|
+
function no(n, e, t = {}) {
|
|
16172
16172
|
const { empty: i, ranges: r } = n.selection, s = e ? ct(e, n.schema) : null;
|
|
16173
16173
|
if (i)
|
|
16174
|
-
return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) =>
|
|
16174
|
+
return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) => nr(d.attrs, t, { strict: !1 }));
|
|
16175
16175
|
let o = 0;
|
|
16176
16176
|
const a = [];
|
|
16177
16177
|
if (r.forEach(({ $from: d, $to: f }) => {
|
|
@@ -16190,14 +16190,14 @@ function ro(n, e, t = {}) {
|
|
|
16190
16190
|
});
|
|
16191
16191
|
}), o === 0)
|
|
16192
16192
|
return !1;
|
|
16193
|
-
const l = a.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) =>
|
|
16193
|
+
const l = a.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => nr(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = a.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
16194
16194
|
return (l > 0 ? l + c : l) >= o;
|
|
16195
16195
|
}
|
|
16196
16196
|
function jv(n, e, t = {}) {
|
|
16197
16197
|
if (!e)
|
|
16198
|
-
return Zn(n, null, t) ||
|
|
16199
|
-
const i =
|
|
16200
|
-
return i === "node" ? Zn(n, e, t) : i === "mark" ?
|
|
16198
|
+
return Zn(n, null, t) || no(n, null, t);
|
|
16199
|
+
const i = xr(e, n.schema);
|
|
16200
|
+
return i === "node" ? Zn(n, e, t) : i === "mark" ? no(n, e, t) : !1;
|
|
16201
16201
|
}
|
|
16202
16202
|
function bc(n, e) {
|
|
16203
16203
|
return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
|
|
@@ -16213,7 +16213,7 @@ function wc(n, e) {
|
|
|
16213
16213
|
}, s = G(I(i, "group", r));
|
|
16214
16214
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
16215
16215
|
}
|
|
16216
|
-
function
|
|
16216
|
+
function Tr(n, {
|
|
16217
16217
|
checkChildren: e = !0,
|
|
16218
16218
|
ignoreWhitespace: t = !1
|
|
16219
16219
|
} = {}) {
|
|
@@ -16233,7 +16233,7 @@ function _r(n, {
|
|
|
16233
16233
|
if (e) {
|
|
16234
16234
|
let r = !0;
|
|
16235
16235
|
return n.content.forEach((s) => {
|
|
16236
|
-
r !== !1 && (
|
|
16236
|
+
r !== !1 && (Tr(s, { ignoreWhitespace: t, checkChildren: e }) || (r = !1));
|
|
16237
16237
|
}), r;
|
|
16238
16238
|
}
|
|
16239
16239
|
return !1;
|
|
@@ -16358,7 +16358,7 @@ function Cc(n, e) {
|
|
|
16358
16358
|
}
|
|
16359
16359
|
}
|
|
16360
16360
|
var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor: r }) => {
|
|
16361
|
-
const { selection: s, doc: o } = e, { $from: a, $to: l } = s, c = r.extensionManager.attributes, u =
|
|
16361
|
+
const { selection: s, doc: o } = e, { $from: a, $to: l } = s, c = r.extensionManager.attributes, u = Pi(c, a.node().type.name, a.node().attrs);
|
|
16362
16362
|
if (s instanceof D && s.node.isBlock)
|
|
16363
16363
|
return !a.parentOffset || !hn(o, a.pos) ? !1 : (i && (n && Cc(t, r.extensionManager.splittableMarks), e.split(a.pos).scrollIntoView()), !0);
|
|
16364
16364
|
if (!a.parent.isBlock)
|
|
@@ -16404,7 +16404,7 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16404
16404
|
// eslint-disable-next-line no-nested-ternary
|
|
16405
16405
|
l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3
|
|
16406
16406
|
), C = {
|
|
16407
|
-
...
|
|
16407
|
+
...Pi(f, l.node().type.name, l.node().attrs),
|
|
16408
16408
|
...e
|
|
16409
16409
|
}, x = ((o = a.contentMatch.defaultType) == null ? void 0 : o.createAndFill(C)) || void 0;
|
|
16410
16410
|
g = g.append(T.from(a.createAndFill(null, x) || void 0));
|
|
@@ -16420,10 +16420,10 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16420
16420
|
return !0;
|
|
16421
16421
|
}
|
|
16422
16422
|
const p = c.pos === l.end() ? d.contentMatchAt(0).defaultType : null, m = {
|
|
16423
|
-
...
|
|
16423
|
+
...Pi(f, d.type.name, d.attrs),
|
|
16424
16424
|
...e
|
|
16425
16425
|
}, v = {
|
|
16426
|
-
...
|
|
16426
|
+
...Pi(f, l.node().type.name, l.node().attrs),
|
|
16427
16427
|
...e
|
|
16428
16428
|
};
|
|
16429
16429
|
t.delete(l.pos, c.pos);
|
|
@@ -16441,7 +16441,7 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16441
16441
|
t.ensureMarks(x);
|
|
16442
16442
|
}
|
|
16443
16443
|
return !0;
|
|
16444
|
-
},
|
|
16444
|
+
}, fs = (n, e) => {
|
|
16445
16445
|
const t = Yo((o) => o.type === e)(n.selection);
|
|
16446
16446
|
if (!t)
|
|
16447
16447
|
return !0;
|
|
@@ -16450,7 +16450,7 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16450
16450
|
return !0;
|
|
16451
16451
|
const r = n.doc.nodeAt(i);
|
|
16452
16452
|
return t.node.type === (r == null ? void 0 : r.type) && Xt(n.doc, t.pos) && n.join(t.pos), !0;
|
|
16453
|
-
},
|
|
16453
|
+
}, ps = (n, e) => {
|
|
16454
16454
|
const t = Yo((o) => o.type === e)(n.selection);
|
|
16455
16455
|
if (!t)
|
|
16456
16456
|
return !0;
|
|
@@ -16468,15 +16468,15 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16468
16468
|
if (x.node.type === p)
|
|
16469
16469
|
return c.liftListItem(m);
|
|
16470
16470
|
if (wc(x.node.type.name, d) && p.validContent(x.node.content) && a)
|
|
16471
|
-
return l().command(() => (s.setNodeMarkup(x.pos, p), !0)).command(() =>
|
|
16471
|
+
return l().command(() => (s.setNodeMarkup(x.pos, p), !0)).command(() => fs(s, p)).command(() => ps(s, p)).run();
|
|
16472
16472
|
}
|
|
16473
|
-
return !t || !C || !a ? l().command(() => u().wrapInList(p, i) ? !0 : c.clearNodes()).wrapInList(p, i).command(() =>
|
|
16473
|
+
return !t || !C || !a ? l().command(() => u().wrapInList(p, i) ? !0 : c.clearNodes()).wrapInList(p, i).command(() => fs(s, p)).command(() => ps(s, p)).run() : l().command(() => {
|
|
16474
16474
|
const S = u().wrapInList(p, i), M = C.filter((A) => f.includes(A.type.name));
|
|
16475
16475
|
return s.ensureMarks(M), S ? !0 : c.clearNodes();
|
|
16476
|
-
}).wrapInList(p, i).command(() =>
|
|
16476
|
+
}).wrapInList(p, i).command(() => fs(s, p)).command(() => ps(s, p)).run();
|
|
16477
16477
|
}, r8 = (n, e = {}, t = {}) => ({ state: i, commands: r }) => {
|
|
16478
16478
|
const { extendEmptyMarkRange: s = !1 } = t, o = ct(n, i.schema);
|
|
16479
|
-
return
|
|
16479
|
+
return no(i, o, e) ? r.unsetMark(o, { extendEmptyMarkRange: s }) : r.setMark(o, e);
|
|
16480
16480
|
}, s8 = (n, e, t = {}) => ({ state: i, commands: r }) => {
|
|
16481
16481
|
const s = fe(n, i.schema), o = fe(e, i.schema), a = Zn(i, s, t);
|
|
16482
16482
|
let l;
|
|
@@ -16534,7 +16534,7 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16534
16534
|
}), !0;
|
|
16535
16535
|
}, d8 = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
|
|
16536
16536
|
let s = null, o = null;
|
|
16537
|
-
const a =
|
|
16537
|
+
const a = xr(
|
|
16538
16538
|
typeof n == "string" ? n : n.name,
|
|
16539
16539
|
i.schema
|
|
16540
16540
|
);
|
|
@@ -16622,7 +16622,7 @@ var t8 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16622
16622
|
const i = [t.text];
|
|
16623
16623
|
return i.index = t.index, i.input = n, i.data = t.data, t.replaceWith && (t.text.includes(t.replaceWith) || console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'), i.push(t.replaceWith)), i;
|
|
16624
16624
|
};
|
|
16625
|
-
function
|
|
16625
|
+
function Mi(n) {
|
|
16626
16626
|
var e;
|
|
16627
16627
|
const { editor: t, from: i, to: r, text: s, rules: o, plugin: a } = n, { view: l } = t;
|
|
16628
16628
|
if (l.composing)
|
|
@@ -16641,13 +16641,13 @@ function _i(n) {
|
|
|
16641
16641
|
const p = g8(d, f.find);
|
|
16642
16642
|
if (!p)
|
|
16643
16643
|
return;
|
|
16644
|
-
const m = l.state.tr, v =
|
|
16644
|
+
const m = l.state.tr, v = Cr({
|
|
16645
16645
|
state: l.state,
|
|
16646
16646
|
transaction: m
|
|
16647
16647
|
}), y = {
|
|
16648
16648
|
from: i - (p[0].length - s.length),
|
|
16649
16649
|
to: r
|
|
16650
|
-
}, { commands: g, chain: b, can: w } = new
|
|
16650
|
+
}, { commands: g, chain: b, can: w } = new kr({
|
|
16651
16651
|
editor: t,
|
|
16652
16652
|
state: v
|
|
16653
16653
|
});
|
|
@@ -16681,7 +16681,7 @@ function v8(n) {
|
|
|
16681
16681
|
let { text: u } = l;
|
|
16682
16682
|
typeof u == "string" ? u = u : u = Qo(T.from(u), o.schema);
|
|
16683
16683
|
const { from: d } = l, f = d + u.length;
|
|
16684
|
-
|
|
16684
|
+
Mi({
|
|
16685
16685
|
editor: e,
|
|
16686
16686
|
from: d,
|
|
16687
16687
|
to: f,
|
|
@@ -16694,7 +16694,7 @@ function v8(n) {
|
|
|
16694
16694
|
},
|
|
16695
16695
|
props: {
|
|
16696
16696
|
handleTextInput(r, s, o, a) {
|
|
16697
|
-
return
|
|
16697
|
+
return Mi({
|
|
16698
16698
|
editor: e,
|
|
16699
16699
|
from: s,
|
|
16700
16700
|
to: o,
|
|
@@ -16706,7 +16706,7 @@ function v8(n) {
|
|
|
16706
16706
|
handleDOMEvents: {
|
|
16707
16707
|
compositionend: (r) => (setTimeout(() => {
|
|
16708
16708
|
const { $cursor: s } = r.state.selection;
|
|
16709
|
-
s &&
|
|
16709
|
+
s && Mi({
|
|
16710
16710
|
editor: e,
|
|
16711
16711
|
from: s.pos,
|
|
16712
16712
|
to: s.pos,
|
|
@@ -16722,7 +16722,7 @@ function v8(n) {
|
|
|
16722
16722
|
if (s.key !== "Enter")
|
|
16723
16723
|
return !1;
|
|
16724
16724
|
const { $cursor: o } = r.state.selection;
|
|
16725
|
-
return o ?
|
|
16725
|
+
return o ? Mi({
|
|
16726
16726
|
editor: e,
|
|
16727
16727
|
from: o.pos,
|
|
16728
16728
|
to: o.pos,
|
|
@@ -16740,13 +16740,13 @@ function v8(n) {
|
|
|
16740
16740
|
function y8(n) {
|
|
16741
16741
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
16742
16742
|
}
|
|
16743
|
-
function
|
|
16743
|
+
function _i(n) {
|
|
16744
16744
|
return y8(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
16745
16745
|
}
|
|
16746
16746
|
function rf(n, e) {
|
|
16747
16747
|
const t = { ...n };
|
|
16748
|
-
return
|
|
16749
|
-
|
|
16748
|
+
return _i(n) && _i(e) && Object.keys(e).forEach((i) => {
|
|
16749
|
+
_i(e[i]) && _i(n[i]) ? t[i] = rf(n[i], e[i]) : t[i] = e[i];
|
|
16750
16750
|
}), t;
|
|
16751
16751
|
}
|
|
16752
16752
|
var ta = class {
|
|
@@ -16832,7 +16832,7 @@ var C8 = (n, e, t) => {
|
|
|
16832
16832
|
}) : [];
|
|
16833
16833
|
};
|
|
16834
16834
|
function k8(n) {
|
|
16835
|
-
const { editor: e, state: t, from: i, to: r, rule: s, pasteEvent: o, dropEvent: a } = n, { commands: l, chain: c, can: u } = new
|
|
16835
|
+
const { editor: e, state: t, from: i, to: r, rule: s, pasteEvent: o, dropEvent: a } = n, { commands: l, chain: c, can: u } = new kr({
|
|
16836
16836
|
editor: e,
|
|
16837
16837
|
state: t
|
|
16838
16838
|
}), d = [];
|
|
@@ -16864,7 +16864,7 @@ function k8(n) {
|
|
|
16864
16864
|
});
|
|
16865
16865
|
}), d.every((p) => p !== null);
|
|
16866
16866
|
}
|
|
16867
|
-
var
|
|
16867
|
+
var Ni = null, x8 = (n) => {
|
|
16868
16868
|
var e;
|
|
16869
16869
|
const t = new ClipboardEvent("paste", {
|
|
16870
16870
|
clipboardData: new DataTransfer()
|
|
@@ -16886,7 +16886,7 @@ function S8(n) {
|
|
|
16886
16886
|
rule: p,
|
|
16887
16887
|
pasteEvt: m
|
|
16888
16888
|
}) => {
|
|
16889
|
-
const v = u.tr, y =
|
|
16889
|
+
const v = u.tr, y = Cr({
|
|
16890
16890
|
state: u,
|
|
16891
16891
|
transaction: v
|
|
16892
16892
|
});
|
|
@@ -16912,9 +16912,9 @@ function S8(n) {
|
|
|
16912
16912
|
view(d) {
|
|
16913
16913
|
const f = (m) => {
|
|
16914
16914
|
var v;
|
|
16915
|
-
i = (v = d.dom.parentElement) != null && v.contains(m.target) ? d.dom.parentElement : null, i && (
|
|
16915
|
+
i = (v = d.dom.parentElement) != null && v.contains(m.target) ? d.dom.parentElement : null, i && (Ni = e);
|
|
16916
16916
|
}, p = () => {
|
|
16917
|
-
|
|
16917
|
+
Ni && (Ni = null);
|
|
16918
16918
|
};
|
|
16919
16919
|
return window.addEventListener("dragstart", f), window.addEventListener("dragend", p), {
|
|
16920
16920
|
destroy() {
|
|
@@ -16926,7 +16926,7 @@ function S8(n) {
|
|
|
16926
16926
|
handleDOMEvents: {
|
|
16927
16927
|
drop: (d, f) => {
|
|
16928
16928
|
if (s = i === d.dom.parentElement, a = f, !s) {
|
|
16929
|
-
const p =
|
|
16929
|
+
const p = Ni;
|
|
16930
16930
|
p != null && p.isEditable && setTimeout(() => {
|
|
16931
16931
|
const m = p.state.selection;
|
|
16932
16932
|
m && p.commands.deleteRange({ from: m.from, to: m.to });
|
|
@@ -16969,7 +16969,7 @@ function S8(n) {
|
|
|
16969
16969
|
}
|
|
16970
16970
|
}));
|
|
16971
16971
|
}
|
|
16972
|
-
var
|
|
16972
|
+
var Mr = class {
|
|
16973
16973
|
constructor(n, e) {
|
|
16974
16974
|
this.splittableMarks = [], this.editor = e, this.baseExtensions = n, this.extensions = Zh(n), this.schema = $v(this.extensions, e), this.setupExtensions();
|
|
16975
16975
|
}
|
|
@@ -16984,7 +16984,7 @@ var Nr = class {
|
|
|
16984
16984
|
options: e.options,
|
|
16985
16985
|
storage: this.editor.extensionStorage[e.name],
|
|
16986
16986
|
editor: this.editor,
|
|
16987
|
-
type:
|
|
16987
|
+
type: hs(e.name, this.schema)
|
|
16988
16988
|
}, i = I(e, "addCommands", t);
|
|
16989
16989
|
return i ? {
|
|
16990
16990
|
...n,
|
|
@@ -17004,7 +17004,7 @@ var Nr = class {
|
|
|
17004
17004
|
options: i.options,
|
|
17005
17005
|
storage: this.editor.extensionStorage[i.name],
|
|
17006
17006
|
editor: n,
|
|
17007
|
-
type:
|
|
17007
|
+
type: hs(i.name, this.schema)
|
|
17008
17008
|
}, s = [], o = I(
|
|
17009
17009
|
i,
|
|
17010
17010
|
"addKeyboardShortcuts",
|
|
@@ -17078,7 +17078,7 @@ var Nr = class {
|
|
|
17078
17078
|
if (!o)
|
|
17079
17079
|
return [];
|
|
17080
17080
|
const a = (l, c, u, d, f) => {
|
|
17081
|
-
const p =
|
|
17081
|
+
const p = ir(l, i);
|
|
17082
17082
|
return o({
|
|
17083
17083
|
// pass-through
|
|
17084
17084
|
node: l,
|
|
@@ -17110,7 +17110,7 @@ var Nr = class {
|
|
|
17110
17110
|
if (!s)
|
|
17111
17111
|
return [];
|
|
17112
17112
|
const o = (a, l, c) => {
|
|
17113
|
-
const u =
|
|
17113
|
+
const u = ir(a, i);
|
|
17114
17114
|
return s()({
|
|
17115
17115
|
// pass-through
|
|
17116
17116
|
mark: a,
|
|
@@ -17144,7 +17144,7 @@ var Nr = class {
|
|
|
17144
17144
|
options: e.options,
|
|
17145
17145
|
storage: this.editor.extensionStorage[e.name],
|
|
17146
17146
|
editor: this.editor,
|
|
17147
|
-
type:
|
|
17147
|
+
type: hs(e.name, this.schema)
|
|
17148
17148
|
};
|
|
17149
17149
|
e.type === "mark" && ((t = G(I(e, "keepOnSplit", i))) == null || t) && this.splittableMarks.push(e.name);
|
|
17150
17150
|
const r = I(e, "onBeforeCreate", i), s = I(e, "onCreate", i), o = I(e, "onUpdate", i), a = I(
|
|
@@ -17156,9 +17156,9 @@ var Nr = class {
|
|
|
17156
17156
|
});
|
|
17157
17157
|
}
|
|
17158
17158
|
};
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17159
|
+
Mr.resolve = Zh;
|
|
17160
|
+
Mr.sort = ea;
|
|
17161
|
+
Mr.flatten = Zo;
|
|
17162
17162
|
var T8 = {};
|
|
17163
17163
|
Jo(T8, {
|
|
17164
17164
|
ClipboardTextSerializer: () => af,
|
|
@@ -17396,12 +17396,12 @@ var oe = class of extends ta {
|
|
|
17396
17396
|
if (!i || r)
|
|
17397
17397
|
return;
|
|
17398
17398
|
const { empty: s, from: o, to: a } = e.selection, l = B.atStart(e.doc).from, c = B.atEnd(e.doc).to;
|
|
17399
|
-
if (s || !(o === l && a === c) || !
|
|
17399
|
+
if (s || !(o === l && a === c) || !Tr(t.doc))
|
|
17400
17400
|
return;
|
|
17401
|
-
const f = t.tr, p =
|
|
17401
|
+
const f = t.tr, p = Cr({
|
|
17402
17402
|
state: t,
|
|
17403
17403
|
transaction: f
|
|
17404
|
-
}), { commands: m } = new
|
|
17404
|
+
}), { commands: m } = new kr({
|
|
17405
17405
|
editor: this.editor,
|
|
17406
17406
|
state: p
|
|
17407
17407
|
});
|
|
@@ -17838,13 +17838,13 @@ var E8 = class extends p8 {
|
|
|
17838
17838
|
direction: this.options.textDirection
|
|
17839
17839
|
})
|
|
17840
17840
|
].filter((r) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[r.name] !== !1 : !0) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
|
|
17841
|
-
this.extensionManager = new
|
|
17841
|
+
this.extensionManager = new Mr(i, this);
|
|
17842
17842
|
}
|
|
17843
17843
|
/**
|
|
17844
17844
|
* Creates an command manager.
|
|
17845
17845
|
*/
|
|
17846
17846
|
createCommandManager() {
|
|
17847
|
-
this.commandManager = new
|
|
17847
|
+
this.commandManager = new kr({
|
|
17848
17848
|
editor: this
|
|
17849
17849
|
});
|
|
17850
17850
|
}
|
|
@@ -17860,7 +17860,7 @@ var E8 = class extends p8 {
|
|
|
17860
17860
|
createDoc() {
|
|
17861
17861
|
let n;
|
|
17862
17862
|
try {
|
|
17863
|
-
n =
|
|
17863
|
+
n = to(this.options.content, this.schema, this.options.parseOptions, {
|
|
17864
17864
|
errorOnInvalidContent: this.options.enableContentCheck
|
|
17865
17865
|
});
|
|
17866
17866
|
} catch (e) {
|
|
@@ -17872,7 +17872,7 @@ var E8 = class extends p8 {
|
|
|
17872
17872
|
disableCollaboration: () => {
|
|
17873
17873
|
"collaboration" in this.storage && typeof this.storage.collaboration == "object" && this.storage.collaboration && (this.storage.collaboration.isDisabled = !0), this.options.extensions = this.options.extensions.filter((t) => t.name !== "collaboration"), this.createExtensionManager();
|
|
17874
17874
|
}
|
|
17875
|
-
}), n =
|
|
17875
|
+
}), n = to(this.options.content, this.schema, this.options.parseOptions, {
|
|
17876
17876
|
errorOnInvalidContent: !1
|
|
17877
17877
|
});
|
|
17878
17878
|
}
|
|
@@ -18012,7 +18012,7 @@ var E8 = class extends p8 {
|
|
|
18012
18012
|
* Check if there is no content.
|
|
18013
18013
|
*/
|
|
18014
18014
|
get isEmpty() {
|
|
18015
|
-
return
|
|
18015
|
+
return Tr(this.state.doc);
|
|
18016
18016
|
}
|
|
18017
18017
|
/**
|
|
18018
18018
|
* Destroy the editor.
|
|
@@ -18658,7 +18658,7 @@ function V8(n, e, t = {}) {
|
|
|
18658
18658
|
}
|
|
18659
18659
|
}), s.docChanged && e.view.dispatch(s);
|
|
18660
18660
|
}
|
|
18661
|
-
var
|
|
18661
|
+
var ai = class yf extends ta {
|
|
18662
18662
|
constructor() {
|
|
18663
18663
|
super(...arguments), this.type = "node";
|
|
18664
18664
|
}
|
|
@@ -18677,7 +18677,7 @@ var li = class yf extends ta {
|
|
|
18677
18677
|
const t = typeof e == "function" ? e() : e;
|
|
18678
18678
|
return super.extend(t);
|
|
18679
18679
|
}
|
|
18680
|
-
}, H8 =
|
|
18680
|
+
}, H8 = ai.create({
|
|
18681
18681
|
name: "doc",
|
|
18682
18682
|
topNode: !0,
|
|
18683
18683
|
content: "block+",
|
|
@@ -18916,12 +18916,12 @@ function J8() {
|
|
|
18916
18916
|
});
|
|
18917
18917
|
}
|
|
18918
18918
|
const G8 = Vh({
|
|
18919
|
-
ArrowLeft:
|
|
18920
|
-
ArrowRight:
|
|
18921
|
-
ArrowUp:
|
|
18922
|
-
ArrowDown:
|
|
18919
|
+
ArrowLeft: Ei("horiz", -1),
|
|
18920
|
+
ArrowRight: Ei("horiz", 1),
|
|
18921
|
+
ArrowUp: Ei("vert", -1),
|
|
18922
|
+
ArrowDown: Ei("vert", 1)
|
|
18923
18923
|
});
|
|
18924
|
-
function
|
|
18924
|
+
function Ei(n, e) {
|
|
18925
18925
|
const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
18926
18926
|
return function(i, r, s) {
|
|
18927
18927
|
let o = i.selection, a = e > 0 ? o.$to : o.$from, l = o.empty;
|
|
@@ -18961,10 +18961,10 @@ function Z8(n) {
|
|
|
18961
18961
|
let e = document.createElement("div");
|
|
18962
18962
|
return e.className = "ProseMirror-gapcursor", Z.create(n.doc, [_e.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
18963
18963
|
}
|
|
18964
|
-
var
|
|
18964
|
+
var rr = 200, he = function() {
|
|
18965
18965
|
};
|
|
18966
18966
|
he.prototype.append = function(e) {
|
|
18967
|
-
return e.length ? (e = he.from(e), !this.length && e || e.length <
|
|
18967
|
+
return e.length ? (e = he.from(e), !this.length && e || e.length < rr && this.leafAppend(e) || this.length < rr && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
18968
18968
|
};
|
|
18969
18969
|
he.prototype.prepend = function(e) {
|
|
18970
18970
|
return e.length ? he.from(e).append(this) : this;
|
|
@@ -19013,10 +19013,10 @@ var wf = /* @__PURE__ */ function(n) {
|
|
|
19013
19013
|
if (r(this.values[l], a + l) === !1)
|
|
19014
19014
|
return !1;
|
|
19015
19015
|
}, e.prototype.leafAppend = function(r) {
|
|
19016
|
-
if (this.length + r.length <=
|
|
19016
|
+
if (this.length + r.length <= rr)
|
|
19017
19017
|
return new e(this.values.concat(r.flatten()));
|
|
19018
19018
|
}, e.prototype.leafPrepend = function(r) {
|
|
19019
|
-
if (this.length + r.length <=
|
|
19019
|
+
if (this.length + r.length <= rr)
|
|
19020
19020
|
return new e(r.flatten().concat(this.values));
|
|
19021
19021
|
}, t.length.get = function() {
|
|
19022
19022
|
return this.values.length;
|
|
@@ -19207,12 +19207,12 @@ function iy(n, e, t, i) {
|
|
|
19207
19207
|
if (t.steps.length == 0)
|
|
19208
19208
|
return n;
|
|
19209
19209
|
if (o && o.getMeta(Vt))
|
|
19210
|
-
return o.getMeta(Vt).redo ? new mt(n.done.addTransform(t, void 0, i,
|
|
19210
|
+
return o.getMeta(Vt).redo ? new mt(n.done.addTransform(t, void 0, i, Li(e)), n.undone, kc(t.mapping.maps), n.prevTime, n.prevComposition) : new mt(n.done, n.undone.addTransform(t, void 0, i, Li(e)), null, n.prevTime, n.prevComposition);
|
|
19211
19211
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
19212
|
-
let a = t.getMeta("composition"), l = n.prevTime == 0 || !o && n.prevComposition != a && (n.prevTime < (t.time || 0) - i.newGroupDelay || !ry(t, n.prevRanges)), c = o ?
|
|
19213
|
-
return new mt(n.done.addTransform(t, l ? e.selection.getBookmark() : void 0, i,
|
|
19212
|
+
let a = t.getMeta("composition"), l = n.prevTime == 0 || !o && n.prevComposition != a && (n.prevTime < (t.time || 0) - i.newGroupDelay || !ry(t, n.prevRanges)), c = o ? ms(n.prevRanges, t.mapping) : kc(t.mapping.maps);
|
|
19213
|
+
return new mt(n.done.addTransform(t, l ? e.selection.getBookmark() : void 0, i, Li(e)), Je.empty, c, t.time, a == null ? n.prevComposition : a);
|
|
19214
19214
|
} else
|
|
19215
|
-
return (s = t.getMeta("rebased")) ? new mt(n.done.rebased(t, s), n.undone.rebased(t, s),
|
|
19215
|
+
return (s = t.getMeta("rebased")) ? new mt(n.done.rebased(t, s), n.undone.rebased(t, s), ms(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new mt(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), ms(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
19216
19216
|
}
|
|
19217
19217
|
function ry(n, e) {
|
|
19218
19218
|
if (!e)
|
|
@@ -19231,7 +19231,7 @@ function kc(n) {
|
|
|
19231
19231
|
n[t].forEach((i, r, s, o) => e.push(s, o));
|
|
19232
19232
|
return e;
|
|
19233
19233
|
}
|
|
19234
|
-
function
|
|
19234
|
+
function ms(n, e) {
|
|
19235
19235
|
if (!n)
|
|
19236
19236
|
return null;
|
|
19237
19237
|
let t = [];
|
|
@@ -19242,24 +19242,24 @@ function vs(n, e) {
|
|
|
19242
19242
|
return t;
|
|
19243
19243
|
}
|
|
19244
19244
|
function sy(n, e, t) {
|
|
19245
|
-
let i =
|
|
19245
|
+
let i = Li(e), r = Vt.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, i);
|
|
19246
19246
|
if (!s)
|
|
19247
19247
|
return null;
|
|
19248
19248
|
let o = s.selection.resolve(s.transform.doc), a = (t ? n.done : n.undone).addTransform(s.transform, e.selection.getBookmark(), r, i), l = new mt(t ? a : s.remaining, t ? s.remaining : a, null, 0, -1);
|
|
19249
19249
|
return s.transform.setSelection(o).setMeta(Vt, { redo: t, historyState: l });
|
|
19250
19250
|
}
|
|
19251
|
-
let
|
|
19252
|
-
function
|
|
19251
|
+
let gs = !1, xc = null;
|
|
19252
|
+
function Li(n) {
|
|
19253
19253
|
let e = n.plugins;
|
|
19254
19254
|
if (xc != e) {
|
|
19255
|
-
|
|
19255
|
+
gs = !1, xc = e;
|
|
19256
19256
|
for (let t = 0; t < e.length; t++)
|
|
19257
19257
|
if (e[t].spec.historyPreserveItems) {
|
|
19258
|
-
|
|
19258
|
+
gs = !0;
|
|
19259
19259
|
break;
|
|
19260
19260
|
}
|
|
19261
19261
|
}
|
|
19262
|
-
return
|
|
19262
|
+
return gs;
|
|
19263
19263
|
}
|
|
19264
19264
|
const Vt = new be("history"), oy = new be("closeHistory");
|
|
19265
19265
|
function ay(n = {}) {
|
|
@@ -19465,7 +19465,7 @@ var ly = oe.create({
|
|
|
19465
19465
|
return null;
|
|
19466
19466
|
const s = this.editor.isEmpty;
|
|
19467
19467
|
return n.descendants((o, a) => {
|
|
19468
|
-
const l = i >= a && i <= a + o.nodeSize, c = !o.isLeaf &&
|
|
19468
|
+
const l = i >= a && i <= a + o.nodeSize, c = !o.isLeaf && Tr(o);
|
|
19469
19469
|
if ((l || !this.options.showOnlyCurrent) && c) {
|
|
19470
19470
|
const u = [this.options.emptyNodeClass];
|
|
19471
19471
|
s && u.push(this.options.emptyEditorClass);
|
|
@@ -19578,7 +19578,7 @@ var cy = oe.create({
|
|
|
19578
19578
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
19579
19579
|
};
|
|
19580
19580
|
}
|
|
19581
|
-
}), uy = ly, dy =
|
|
19581
|
+
}), uy = ly, dy = ai.create({
|
|
19582
19582
|
name: "text",
|
|
19583
19583
|
group: "inline",
|
|
19584
19584
|
parseMarkdown: (n) => ({
|
|
@@ -19586,7 +19586,7 @@ var cy = oe.create({
|
|
|
19586
19586
|
text: n.text || ""
|
|
19587
19587
|
}),
|
|
19588
19588
|
renderMarkdown: (n) => n.text || ""
|
|
19589
|
-
}), hy = dy, fy =
|
|
19589
|
+
}), hy = dy, fy = ai.create({
|
|
19590
19590
|
name: "paragraph",
|
|
19591
19591
|
priority: 1e3,
|
|
19592
19592
|
addOptions() {
|
|
@@ -19600,7 +19600,7 @@ var cy = oe.create({
|
|
|
19600
19600
|
return [{ tag: "p" }];
|
|
19601
19601
|
},
|
|
19602
19602
|
renderHTML({ HTMLAttributes: n }) {
|
|
19603
|
-
return ["p",
|
|
19603
|
+
return ["p", Sr(this.options.HTMLAttributes, n), 0];
|
|
19604
19604
|
},
|
|
19605
19605
|
parseMarkdown: (n, e) => {
|
|
19606
19606
|
const t = n.tokens || [];
|
|
@@ -19622,7 +19622,7 @@ var cy = oe.create({
|
|
|
19622
19622
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
19623
19623
|
};
|
|
19624
19624
|
}
|
|
19625
|
-
}), py = fy, my =
|
|
19625
|
+
}), py = fy, my = ai.create({
|
|
19626
19626
|
name: "hardBreak",
|
|
19627
19627
|
markdownTokenName: "br",
|
|
19628
19628
|
addOptions() {
|
|
@@ -19639,7 +19639,7 @@ var cy = oe.create({
|
|
|
19639
19639
|
return [{ tag: "br" }];
|
|
19640
19640
|
},
|
|
19641
19641
|
renderHTML({ HTMLAttributes: n }) {
|
|
19642
|
-
return ["br",
|
|
19642
|
+
return ["br", Sr(this.options.HTMLAttributes, n)];
|
|
19643
19643
|
},
|
|
19644
19644
|
renderText() {
|
|
19645
19645
|
return "\n";
|
|
@@ -19674,7 +19674,7 @@ var cy = oe.create({
|
|
|
19674
19674
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
19675
19675
|
};
|
|
19676
19676
|
}
|
|
19677
|
-
}), gy = my, vy = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, yy =
|
|
19677
|
+
}), gy = my, vy = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, yy = ai.create({
|
|
19678
19678
|
name: "image",
|
|
19679
19679
|
addOptions() {
|
|
19680
19680
|
return {
|
|
@@ -19718,7 +19718,7 @@ var cy = oe.create({
|
|
|
19718
19718
|
];
|
|
19719
19719
|
},
|
|
19720
19720
|
renderHTML({ HTMLAttributes: n }) {
|
|
19721
|
-
return ["img",
|
|
19721
|
+
return ["img", Sr(this.options.HTMLAttributes, n)];
|
|
19722
19722
|
},
|
|
19723
19723
|
parseMarkdown: (n, e) => e.createNode("image", {
|
|
19724
19724
|
src: n.href,
|
|
@@ -20060,7 +20060,7 @@ const nn = new P("chat-editor"), sa = ({
|
|
|
20060
20060
|
onClick: p,
|
|
20061
20061
|
children: /* @__PURE__ */ h("div", { className: se.em("content", "warning"), children: [
|
|
20062
20062
|
/* @__PURE__ */ h("div", { className: "warning-icon", title: k.t.value("retry"), children: /* @__PURE__ */ h(zg, {}) }),
|
|
20063
|
-
/* @__PURE__ */ h("div", { className: "refresh-icon", title: k.t.value("retry"), children: /* @__PURE__ */ h(
|
|
20063
|
+
/* @__PURE__ */ h("div", { className: "refresh-icon", title: k.t.value("retry"), children: /* @__PURE__ */ h(Ls, {}) })
|
|
20064
20064
|
] })
|
|
20065
20065
|
}
|
|
20066
20066
|
),
|
|
@@ -20106,7 +20106,7 @@ const nn = new P("chat-editor"), sa = ({
|
|
|
20106
20106
|
] })
|
|
20107
20107
|
] }) : /* @__PURE__ */ h("div", { className: se.em("content", "body"), children: [
|
|
20108
20108
|
l.value.hasResources && /* @__PURE__ */ h("div", { className: se.em("content", "material"), children: l.value.resources.map((b) => /* @__PURE__ */ h(
|
|
20109
|
-
|
|
20109
|
+
fr,
|
|
20110
20110
|
{
|
|
20111
20111
|
material: b,
|
|
20112
20112
|
disabled: !0,
|
|
@@ -20277,7 +20277,7 @@ const At = new P("error-message"), Sy = (n) => {
|
|
|
20277
20277
|
] }),
|
|
20278
20278
|
/* @__PURE__ */ h("div", { className: "".concat(At.b("content"), " pre-wrap-container"), children: [
|
|
20279
20279
|
a.value.hasResources && /* @__PURE__ */ h("div", { className: "content-material-container", children: a.value.resources.map((p) => /* @__PURE__ */ h(
|
|
20280
|
-
|
|
20280
|
+
fr,
|
|
20281
20281
|
{
|
|
20282
20282
|
material: p,
|
|
20283
20283
|
disabled: !0,
|
|
@@ -20536,7 +20536,7 @@ class It {
|
|
|
20536
20536
|
return this.data.captionComputed || !1;
|
|
20537
20537
|
}
|
|
20538
20538
|
}
|
|
20539
|
-
class
|
|
20539
|
+
class vs {
|
|
20540
20540
|
constructor(e) {
|
|
20541
20541
|
this.material = e;
|
|
20542
20542
|
}
|
|
@@ -20630,7 +20630,7 @@ const Ae = new P("chat-toolbar-item"), Ny = (n) => {
|
|
|
20630
20630
|
if ((w = b.icon) != null && w.showIcon && ((C = b.icon) != null && C.cssClass))
|
|
20631
20631
|
return /* @__PURE__ */ h("i", { className: b.icon.cssClass });
|
|
20632
20632
|
if ((x = b.icon) != null && x.showIcon && ((S = b.icon) != null && S.imagePath))
|
|
20633
|
-
return
|
|
20633
|
+
return ni(b.icon.imagePath) ? /* @__PURE__ */ h(
|
|
20634
20634
|
"div",
|
|
20635
20635
|
{
|
|
20636
20636
|
dangerouslySetInnerHTML: {
|
|
@@ -20705,8 +20705,8 @@ const Ae = new P("chat-toolbar-item"), Ny = (n) => {
|
|
|
20705
20705
|
}
|
|
20706
20706
|
);
|
|
20707
20707
|
};
|
|
20708
|
-
const Ey = new P("chat-toolbar"),
|
|
20709
|
-
const { controller: e, items: t = [], data: i, type: r, className: s } = n, o = Co(
|
|
20708
|
+
const Ey = new P("chat-toolbar"), sr = (n) => {
|
|
20709
|
+
const { controller: e, items: t = [], data: i, type: r, className: s } = n, o = Co(_r);
|
|
20710
20710
|
let a = [];
|
|
20711
20711
|
const l = [
|
|
20712
20712
|
{
|
|
@@ -20731,7 +20731,7 @@ const Ey = new P("chat-toolbar"), Qn = (n) => {
|
|
|
20731
20731
|
{
|
|
20732
20732
|
label: k.t.value("refresh"),
|
|
20733
20733
|
title: k.t.value("refresh"),
|
|
20734
|
-
icon: () => /* @__PURE__ */ h(
|
|
20734
|
+
icon: () => /* @__PURE__ */ h(Ls, {}),
|
|
20735
20735
|
onClick: () => {
|
|
20736
20736
|
e.refreshMessage(i);
|
|
20737
20737
|
}
|
|
@@ -20760,7 +20760,7 @@ const Ey = new P("chat-toolbar"), Qn = (n) => {
|
|
|
20760
20760
|
{
|
|
20761
20761
|
label: k.t.value("refresh"),
|
|
20762
20762
|
title: k.t.value("refresh"),
|
|
20763
|
-
icon: () => /* @__PURE__ */ h(
|
|
20763
|
+
icon: () => /* @__PURE__ */ h(Ls, {}),
|
|
20764
20764
|
hidden: () => !!e.reEditContent.value,
|
|
20765
20765
|
onClick: () => {
|
|
20766
20766
|
e.refreshMessage(i, !0);
|
|
@@ -20858,7 +20858,7 @@ const Iy = (n) => {
|
|
|
20858
20858
|
}
|
|
20859
20859
|
);
|
|
20860
20860
|
};
|
|
20861
|
-
const Nc = new P("chat-messages"),
|
|
20861
|
+
const Nc = new P("chat-messages"), io = (n) => {
|
|
20862
20862
|
const e = F(null), t = 5, [i, r] = V(t), [s, o] = V(!1), [a, l] = V(!0), c = F(!1), u = n.controller.messages, d = F(u.value.length), f = De(() => {
|
|
20863
20863
|
const g = Math.max(0, u.value.length - i);
|
|
20864
20864
|
return u.value.slice(g);
|
|
@@ -20910,7 +20910,7 @@ const Nc = new P("chat-messages"), or = (n) => {
|
|
|
20910
20910
|
message: g,
|
|
20911
20911
|
controller: n.controller,
|
|
20912
20912
|
children: /* @__PURE__ */ h(
|
|
20913
|
-
|
|
20913
|
+
sr,
|
|
20914
20914
|
{
|
|
20915
20915
|
type: "content",
|
|
20916
20916
|
mode: "DEFAULT",
|
|
@@ -20998,8 +20998,9 @@ class Ec {
|
|
|
20998
20998
|
* @date 2023-10-15 19:10:34
|
|
20999
20999
|
* @param {IChatOptions} opts 聊天配置
|
|
21000
21000
|
* @param {IChatOptions} resourceOptions 资源配置
|
|
21001
|
+
* @param {ITopicOptions} topicOptions 会话配置
|
|
21001
21002
|
*/
|
|
21002
|
-
constructor(e, t) {
|
|
21003
|
+
constructor(e, t, i) {
|
|
21003
21004
|
/**
|
|
21004
21005
|
* 事件触发器
|
|
21005
21006
|
* @type {EventBase}
|
|
@@ -21012,7 +21013,7 @@ class Ec {
|
|
|
21012
21013
|
* @date 2023-10-16 16:10:29
|
|
21013
21014
|
* @type {Signal<ChatMessage[]>}
|
|
21014
21015
|
*/
|
|
21015
|
-
_(this, "messages",
|
|
21016
|
+
_(this, "messages", X([]));
|
|
21016
21017
|
/**
|
|
21017
21018
|
* 素材列表
|
|
21018
21019
|
*
|
|
@@ -21020,7 +21021,7 @@ class Ec {
|
|
|
21020
21021
|
* @date 2025-02-27 18:02:46
|
|
21021
21022
|
* @type {Signal<IMaterial[]>}
|
|
21022
21023
|
*/
|
|
21023
|
-
_(this, "materials",
|
|
21024
|
+
_(this, "materials", X([]));
|
|
21024
21025
|
/**
|
|
21025
21026
|
* 聊天框输入值
|
|
21026
21027
|
*
|
|
@@ -21028,27 +21029,27 @@ class Ec {
|
|
|
21028
21029
|
* @date 2023-10-16 15:10:43
|
|
21029
21030
|
* @type {Signal<string>}
|
|
21030
21031
|
*/
|
|
21031
|
-
_(this, "input",
|
|
21032
|
+
_(this, "input", X(""));
|
|
21032
21033
|
/**
|
|
21033
21034
|
* 输入框是否展开
|
|
21034
21035
|
* @type {Signal<boolean>}
|
|
21035
21036
|
*/
|
|
21036
|
-
_(this, "inputExpand",
|
|
21037
|
+
_(this, "inputExpand", X(!1));
|
|
21037
21038
|
/**
|
|
21038
21039
|
* 重新编辑内容
|
|
21039
21040
|
* @type {Signal<string>}
|
|
21040
21041
|
*/
|
|
21041
|
-
_(this, "reEditContent",
|
|
21042
|
+
_(this, "reEditContent", X(""));
|
|
21042
21043
|
/**
|
|
21043
21044
|
* 重新编辑内容是否改变
|
|
21044
21045
|
* @type {Signal<boolean>}
|
|
21045
21046
|
*/
|
|
21046
|
-
_(this, "reEditContentChanged",
|
|
21047
|
+
_(this, "reEditContentChanged", X(!1));
|
|
21047
21048
|
/**
|
|
21048
21049
|
* 最后一个用户消息ID
|
|
21049
21050
|
* @type {Signal<string | undefined>}
|
|
21050
21051
|
*/
|
|
21051
|
-
_(this, "lastUserMsgID",
|
|
21052
|
+
_(this, "lastUserMsgID", X(void 0));
|
|
21052
21053
|
/**
|
|
21053
21054
|
* 是否加载中
|
|
21054
21055
|
*
|
|
@@ -21056,7 +21057,7 @@ class Ec {
|
|
|
21056
21057
|
* @date 2025-03-10 18:03:42
|
|
21057
21058
|
* @type {Signal<boolean>}
|
|
21058
21059
|
*/
|
|
21059
|
-
_(this, "isLoading",
|
|
21060
|
+
_(this, "isLoading", X(!1));
|
|
21060
21061
|
/**
|
|
21061
21062
|
* 是否启用选择知识库
|
|
21062
21063
|
*
|
|
@@ -21064,11 +21065,11 @@ class Ec {
|
|
|
21064
21065
|
* @date 2026-02-03 16:38:09
|
|
21065
21066
|
* @type {Signal<boolean>}
|
|
21066
21067
|
*/
|
|
21067
|
-
_(this, "enableKnowledgeBaseSelect",
|
|
21068
|
+
_(this, "enableKnowledgeBaseSelect", X(!1));
|
|
21068
21069
|
/**
|
|
21069
21070
|
* 是否启用知识库
|
|
21070
21071
|
*/
|
|
21071
|
-
_(this, "enableKnowledgeBaseState",
|
|
21072
|
+
_(this, "enableKnowledgeBaseState", X(!1));
|
|
21072
21073
|
/**
|
|
21073
21074
|
* 是否启用设置召回参数
|
|
21074
21075
|
*
|
|
@@ -21076,7 +21077,7 @@ class Ec {
|
|
|
21076
21077
|
* @date 2026-02-03 16:39:00
|
|
21077
21078
|
* @type {Signal<boolean>}
|
|
21078
21079
|
*/
|
|
21079
|
-
_(this, "enableRecallConfigSetting",
|
|
21080
|
+
_(this, "enableRecallConfigSetting", X(!1));
|
|
21080
21081
|
/**
|
|
21081
21082
|
* 是否允许切换AI代理
|
|
21082
21083
|
*/
|
|
@@ -21092,7 +21093,7 @@ class Ec {
|
|
|
21092
21093
|
*
|
|
21093
21094
|
* @type {Signal<AIAgent[]>}
|
|
21094
21095
|
*/
|
|
21095
|
-
_(this, "agentList",
|
|
21096
|
+
_(this, "agentList", X([]));
|
|
21096
21097
|
/**
|
|
21097
21098
|
* 视图参数
|
|
21098
21099
|
*
|
|
@@ -21162,15 +21163,15 @@ class Ec {
|
|
|
21162
21163
|
/**
|
|
21163
21164
|
* 选中知识库
|
|
21164
21165
|
*/
|
|
21165
|
-
_(this, "selectionKnowledgeBases",
|
|
21166
|
+
_(this, "selectionKnowledgeBases", X([]));
|
|
21166
21167
|
/**
|
|
21167
21168
|
* 当前可选知识库
|
|
21168
21169
|
*/
|
|
21169
|
-
_(this, "knowledgeBases",
|
|
21170
|
+
_(this, "knowledgeBases", X([]));
|
|
21170
21171
|
/**
|
|
21171
21172
|
* 智能体召回配置
|
|
21172
21173
|
*/
|
|
21173
|
-
_(this, "reCallConfig",
|
|
21174
|
+
_(this, "reCallConfig", X({
|
|
21174
21175
|
chunkrerank: 2,
|
|
21175
21176
|
maxchunks: void 0,
|
|
21176
21177
|
chunkthreshold: void 0,
|
|
@@ -21180,7 +21181,13 @@ class Ec {
|
|
|
21180
21181
|
* 当前正在处理的消息ID
|
|
21181
21182
|
*/
|
|
21182
21183
|
_(this, "streamingMsgID");
|
|
21183
|
-
|
|
21184
|
+
/**
|
|
21185
|
+
* @description 是否已完成初始化
|
|
21186
|
+
* @type {Signal<boolean>}
|
|
21187
|
+
* @memberof AiChatController
|
|
21188
|
+
*/
|
|
21189
|
+
_(this, "inited", X(!1));
|
|
21190
|
+
this.opts = e, this.resourceOptions = t, this.topicOptions = i, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.aiTopic = e.aiTopic, this.topicId = e.topicId, this.topic = e.topic, this.enableAIAgentChange = !!e.enableAIAgentChange, this.chatMode = e.srfMode, this.chatScope = e.srfScope, this.chatSessionid = e.sessionid, this.enableKnowledgeBaseSelect.value = !!e.enableKnowledgeBaseSelect, this.enableKnowledgeBaseState.value = this.enableKnowledgeBaseSelect.value, this.enableRecallConfigSetting.value = !!e.enableRecallConfigSetting, this.initAIChat();
|
|
21184
21191
|
}
|
|
21185
21192
|
/**
|
|
21186
21193
|
* AI资源模式
|
|
@@ -21209,7 +21216,7 @@ class Ec {
|
|
|
21209
21216
|
if (e && e.captionMode)
|
|
21210
21217
|
return e.captionMode;
|
|
21211
21218
|
}
|
|
21212
|
-
return "default";
|
|
21219
|
+
return this.topicOptions && this.topicOptions.captionMode ? this.topicOptions.captionMode : "default";
|
|
21213
21220
|
}
|
|
21214
21221
|
/**
|
|
21215
21222
|
* 当前话题标题
|
|
@@ -21233,7 +21240,7 @@ class Ec {
|
|
|
21233
21240
|
* 初始化
|
|
21234
21241
|
*/
|
|
21235
21242
|
async initAIChat() {
|
|
21236
|
-
this.messages.value = [], await this.initAIChatAgent(), await this.initAIChatKnowledge(), await this.fecthHistory();
|
|
21243
|
+
this.inited.value = !1, this.messages.value = [], await this.initAIChatAgent(), await this.initAIChatKnowledge(), await this.fecthHistory(), this.inited.value = !0;
|
|
21237
21244
|
}
|
|
21238
21245
|
/**
|
|
21239
21246
|
* 初始化AI代理列表
|
|
@@ -21456,7 +21463,7 @@ class Ec {
|
|
|
21456
21463
|
}
|
|
21457
21464
|
}
|
|
21458
21465
|
}
|
|
21459
|
-
await this.markLastUserMessage();
|
|
21466
|
+
await this.markLastUserMessage(), this.opts.captionComputedMode && this.opts.captionComputedMode === "history" && await this.updateTopicCaption();
|
|
21460
21467
|
}
|
|
21461
21468
|
/**
|
|
21462
21469
|
* 更新数据到indexdb
|
|
@@ -21710,7 +21717,7 @@ class Ec {
|
|
|
21710
21717
|
this.getQueryRecallConfig(),
|
|
21711
21718
|
this.opts.appendCurData,
|
|
21712
21719
|
this.opts.srfMcpservers
|
|
21713
|
-
), await this.markLastUserMessage(), await this.updateTopicCaption(), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
21720
|
+
), await this.markLastUserMessage(), this.opts.captionComputedMode && (this.opts.captionComputedMode === "history" || this.opts.captionComputedMode === "question") && await this.updateTopicCaption(), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
21714
21721
|
} finally {
|
|
21715
21722
|
this.isLoading.value = !1;
|
|
21716
21723
|
}
|
|
@@ -21980,7 +21987,7 @@ class Ec {
|
|
|
21980
21987
|
* @param {IMaterial} data
|
|
21981
21988
|
*/
|
|
21982
21989
|
addMaterial(e) {
|
|
21983
|
-
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new
|
|
21990
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new vs(e)];
|
|
21984
21991
|
}
|
|
21985
21992
|
/**
|
|
21986
21993
|
* 替换素材资源
|
|
@@ -21992,7 +21999,7 @@ class Ec {
|
|
|
21992
21999
|
*/
|
|
21993
22000
|
replaceMaterial(e, t) {
|
|
21994
22001
|
const i = this.materials.value.findIndex((r) => r.id === e);
|
|
21995
|
-
i !== -1 ? (this.materials.value[i] = new
|
|
22002
|
+
i !== -1 ? (this.materials.value[i] = new vs(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new vs(t)];
|
|
21996
22003
|
}
|
|
21997
22004
|
/**
|
|
21998
22005
|
* 删除指定素材资源
|
|
@@ -22418,7 +22425,7 @@ class Py {
|
|
|
22418
22425
|
* @date 2025-02-20 16:02:38
|
|
22419
22426
|
* @type {Signal<ChatTopic[]>}
|
|
22420
22427
|
*/
|
|
22421
|
-
_(this, "topics",
|
|
22428
|
+
_(this, "topics", X([]));
|
|
22422
22429
|
/**
|
|
22423
22430
|
* 激活话题
|
|
22424
22431
|
*
|
|
@@ -22426,7 +22433,7 @@ class Py {
|
|
|
22426
22433
|
* @date 2025-02-24 16:02:44
|
|
22427
22434
|
* @type {(Signal<ITopic | undefined>)}
|
|
22428
22435
|
*/
|
|
22429
|
-
_(this, "activedTopic",
|
|
22436
|
+
_(this, "activedTopic", X(void 0));
|
|
22430
22437
|
/**
|
|
22431
22438
|
* 折叠话题侧边栏
|
|
22432
22439
|
*
|
|
@@ -22434,14 +22441,14 @@ class Py {
|
|
|
22434
22441
|
* @date 2026-02-05 11:33:34
|
|
22435
22442
|
* @type {Signal<boolean>}
|
|
22436
22443
|
*/
|
|
22437
|
-
_(this, "topicSidebarCollapse",
|
|
22444
|
+
_(this, "topicSidebarCollapse", X(!1));
|
|
22438
22445
|
/**
|
|
22439
22446
|
* 侧边栏宽度
|
|
22440
22447
|
* @author tony001
|
|
22441
22448
|
* @date 2026-02-05 13:48:34
|
|
22442
22449
|
* @type {Signal<number>}
|
|
22443
22450
|
*/
|
|
22444
|
-
_(this, "topicSidebarWidth",
|
|
22451
|
+
_(this, "topicSidebarWidth", X(0));
|
|
22445
22452
|
/**
|
|
22446
22453
|
* 是否是临时会话
|
|
22447
22454
|
*
|
|
@@ -22449,7 +22456,7 @@ class Py {
|
|
|
22449
22456
|
* @date 2026-02-05 17:26:34
|
|
22450
22457
|
* @type {Signal<boolean>}
|
|
22451
22458
|
*/
|
|
22452
|
-
_(this, "isTempChat",
|
|
22459
|
+
_(this, "isTempChat", X(!1));
|
|
22453
22460
|
/**
|
|
22454
22461
|
* 当前话题配置备份
|
|
22455
22462
|
*
|
|
@@ -22694,7 +22701,7 @@ class Py {
|
|
|
22694
22701
|
const i = this.getCurrentTopicByID(e);
|
|
22695
22702
|
if (!i)
|
|
22696
22703
|
return;
|
|
22697
|
-
const r =
|
|
22704
|
+
const r = gi(i.id), s = this.topics.value.filter((d) => d.id.startsWith(r));
|
|
22698
22705
|
t && i.aiChat && (i.data.aiChat = {
|
|
22699
22706
|
...i.aiChat,
|
|
22700
22707
|
...t
|
|
@@ -22831,7 +22838,7 @@ class Py {
|
|
|
22831
22838
|
const e = this.backupOptions.aiChat;
|
|
22832
22839
|
this.newTopic(this.backupOptions.id, {
|
|
22833
22840
|
activeAIAgentID: e.activeAIAgentID,
|
|
22834
|
-
sessionid: "".concat(
|
|
22841
|
+
sessionid: "".concat(gi(
|
|
22835
22842
|
e.sessionid
|
|
22836
22843
|
), "@").concat((/* @__PURE__ */ new Date()).getTime())
|
|
22837
22844
|
});
|
|
@@ -22839,7 +22846,7 @@ class Py {
|
|
|
22839
22846
|
const e = this.activedTopic.value.aiChat;
|
|
22840
22847
|
this.newTopic(this.activedTopic.value.id, {
|
|
22841
22848
|
activeAIAgentID: e.activeAIAgentID,
|
|
22842
|
-
sessionid: "".concat(
|
|
22849
|
+
sessionid: "".concat(gi(e.sessionid), "@").concat((/* @__PURE__ */ new Date()).getTime())
|
|
22843
22850
|
});
|
|
22844
22851
|
}
|
|
22845
22852
|
}
|
|
@@ -22851,7 +22858,7 @@ class Py {
|
|
|
22851
22858
|
console.error(k.t.value("temporarySessionFailed"));
|
|
22852
22859
|
return;
|
|
22853
22860
|
}
|
|
22854
|
-
const e =
|
|
22861
|
+
const e = gi(this.backupOptions.id), t = Fu("TEMP"), i = Math.max(
|
|
22855
22862
|
...this.topics.value.map((a) => a.sequence)
|
|
22856
22863
|
), r = {
|
|
22857
22864
|
...this.backupOptions.aiChat,
|
|
@@ -23025,7 +23032,7 @@ class zy extends Sf {
|
|
|
23025
23032
|
};
|
|
23026
23033
|
}
|
|
23027
23034
|
}
|
|
23028
|
-
class
|
|
23035
|
+
class or {
|
|
23029
23036
|
static getMaterialHelper(e, t) {
|
|
23030
23037
|
switch (e) {
|
|
23031
23038
|
case "ossfile":
|
|
@@ -23165,7 +23172,11 @@ class Tf {
|
|
|
23165
23172
|
topic: r,
|
|
23166
23173
|
aiTopic: this.aiTopic
|
|
23167
23174
|
});
|
|
23168
|
-
const s = new Ec(
|
|
23175
|
+
const s = new Ec(
|
|
23176
|
+
i,
|
|
23177
|
+
this.resourceOptions,
|
|
23178
|
+
e.topicOptions
|
|
23179
|
+
);
|
|
23169
23180
|
return this.aiTopicMap.set("".concat(r == null ? void 0 : r.id), s), e.mode && e.mode === "TOPIC" && this.aiTopic.isTempChat.value ? this.aiTopic.enterTempChat() : this.renderChatContent(e, i, s), s;
|
|
23170
23181
|
}
|
|
23171
23182
|
/**
|
|
@@ -23210,6 +23221,7 @@ class Tf {
|
|
|
23210
23221
|
* @memberof ChatBaseController
|
|
23211
23222
|
*/
|
|
23212
23223
|
switchAiChatController(e) {
|
|
23224
|
+
var r;
|
|
23213
23225
|
const t = {
|
|
23214
23226
|
...this.backupChatOptions.chatOptions
|
|
23215
23227
|
};
|
|
@@ -23223,7 +23235,7 @@ class Tf {
|
|
|
23223
23235
|
questionToolbarItems: e.aiChat.questionToolbarItems,
|
|
23224
23236
|
otherToolbarItems: e.aiChat.otherToolbarItems,
|
|
23225
23237
|
appendCurData: e.aiChat.appendCurData,
|
|
23226
|
-
appendCurContent:
|
|
23238
|
+
appendCurContent: void 0,
|
|
23227
23239
|
activeAIAgentID: e.aiChat.activeAIAgentID,
|
|
23228
23240
|
enableAIAgentChange: e.aiChat.enableAIAgentChange,
|
|
23229
23241
|
srfMode: e.aiChat.srfMode,
|
|
@@ -23239,7 +23251,11 @@ class Tf {
|
|
|
23239
23251
|
openLinkView: this.backupChatOptions.chatOptions.openLinkView
|
|
23240
23252
|
});
|
|
23241
23253
|
let i;
|
|
23242
|
-
this.aiTopicMap.has("".concat(e.id)) ? (i = this.aiTopicMap.get("".concat(e.id)), i.updateAIChat()) : (i = new Ec(
|
|
23254
|
+
this.aiTopicMap.has("".concat(e.id)) ? (i = this.aiTopicMap.get("".concat(e.id)), i.updateAIChat()) : (i = new Ec(
|
|
23255
|
+
t,
|
|
23256
|
+
this.resourceOptions,
|
|
23257
|
+
(r = this.backupChatOptions) == null ? void 0 : r.topicOptions
|
|
23258
|
+
), this.aiTopicMap.set("".concat(e.id), i)), this.renderSwitchedContent(t, i);
|
|
23243
23259
|
}
|
|
23244
23260
|
/**
|
|
23245
23261
|
* @description 关闭聊天窗口
|
|
@@ -23278,7 +23294,7 @@ class By extends Tf {
|
|
|
23278
23294
|
setupContainer(t, i) {
|
|
23279
23295
|
var r, s, o;
|
|
23280
23296
|
this.close(), this.container = document.createElement("div"), this.container.classList.add("ibiz-ai-chat"), document.body.appendChild(this.container), Ie(
|
|
23281
|
-
ke(
|
|
23297
|
+
ke(ys, {
|
|
23282
23298
|
mode: t.mode ? t.mode : "DEFAULT",
|
|
23283
23299
|
containerOptions: t.containerOptions,
|
|
23284
23300
|
caption: i.caption,
|
|
@@ -23320,7 +23336,7 @@ class By extends Tf {
|
|
|
23320
23336
|
renderChatContent(t, i, r) {
|
|
23321
23337
|
var s, o, a, l;
|
|
23322
23338
|
Ie(
|
|
23323
|
-
ke(
|
|
23339
|
+
ke(ys, {
|
|
23324
23340
|
aiChat: r,
|
|
23325
23341
|
aiTopic: this.aiTopic,
|
|
23326
23342
|
mode: t.mode ? t.mode : "DEFAULT",
|
|
@@ -23371,7 +23387,7 @@ class By extends Tf {
|
|
|
23371
23387
|
renderSwitchedContent(t, i) {
|
|
23372
23388
|
var r, s, o, a, l, c, u, d, f, p;
|
|
23373
23389
|
this.container && (Ie(null, this.container), Ie(
|
|
23374
|
-
ke(
|
|
23390
|
+
ke(ys, {
|
|
23375
23391
|
aiChat: i,
|
|
23376
23392
|
aiTopic: this.aiTopic,
|
|
23377
23393
|
mode: (r = this.backupChatOptions) != null && r.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
@@ -23474,7 +23490,7 @@ class Fy extends Tf {
|
|
|
23474
23490
|
this.container
|
|
23475
23491
|
);
|
|
23476
23492
|
Ie(
|
|
23477
|
-
ke(
|
|
23493
|
+
ke(bs, {
|
|
23478
23494
|
mode: t.mode ? t.mode : "DEFAULT",
|
|
23479
23495
|
caption: i.caption,
|
|
23480
23496
|
enableBackFill: (r = t.containerOptions) == null ? void 0 : r.enableBackFill,
|
|
@@ -23507,7 +23523,7 @@ class Fy extends Tf {
|
|
|
23507
23523
|
this.container
|
|
23508
23524
|
);
|
|
23509
23525
|
Ie(
|
|
23510
|
-
ke(
|
|
23526
|
+
ke(bs, {
|
|
23511
23527
|
aiChat: r,
|
|
23512
23528
|
aiTopic: this.aiTopic,
|
|
23513
23529
|
mode: t.mode ? t.mode : "DEFAULT",
|
|
@@ -23534,7 +23550,7 @@ class Fy extends Tf {
|
|
|
23534
23550
|
renderSwitchedContent(t, i) {
|
|
23535
23551
|
var r, s, o, a, l;
|
|
23536
23552
|
this.container && (Ie(null, this.container), Ie(
|
|
23537
|
-
ke(
|
|
23553
|
+
ke(bs, {
|
|
23538
23554
|
aiChat: i,
|
|
23539
23555
|
aiTopic: this.aiTopic,
|
|
23540
23556
|
mode: (r = this.backupChatOptions) != null && r.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
@@ -23565,7 +23581,7 @@ function Qy() {
|
|
|
23565
23581
|
const Vy = new P("chat-input-material"), Mf = (n) => {
|
|
23566
23582
|
const e = n.controller.materials;
|
|
23567
23583
|
return /* @__PURE__ */ h("div", { className: Vy.b(), children: e.value.map((t) => /* @__PURE__ */ h(
|
|
23568
|
-
|
|
23584
|
+
fr,
|
|
23569
23585
|
{
|
|
23570
23586
|
material: t,
|
|
23571
23587
|
disabled: !1,
|
|
@@ -23695,10 +23711,10 @@ const $e = new P("chat-agent-setting"), Hy = (n) => {
|
|
|
23695
23711
|
a ? /* @__PURE__ */ h("div", { className: $e.e("dropdown"), ref: o, children: /* @__PURE__ */ h("ul", { className: $e.em("dropdown", "list"), children: i.map((p) => f(p)) }) }) : null
|
|
23696
23712
|
] });
|
|
23697
23713
|
};
|
|
23698
|
-
const K = new P("chat-input"), Ac = window.SpeechRecognition || window.webkitSpeechRecognition,
|
|
23714
|
+
const K = new P("chat-input"), Ac = window.SpeechRecognition || window.webkitSpeechRecognition, ro = (n) => {
|
|
23699
23715
|
var w;
|
|
23700
23716
|
const [e, t] = V(!1);
|
|
23701
|
-
Co(
|
|
23717
|
+
Co(_r);
|
|
23702
23718
|
const i = n.controller.input, r = $(!1), s = F(), o = F(null);
|
|
23703
23719
|
Ac && !s.current && (s.current = new Ac(), s.current.onstart = () => {
|
|
23704
23720
|
r.value = !0;
|
|
@@ -23733,12 +23749,12 @@ const K = new P("chat-input"), Ac = window.SpeechRecognition || window.webkitSpe
|
|
|
23733
23749
|
if (C.code === "Enter" && C.key === "Enter" && C.shiftKey === !1)
|
|
23734
23750
|
return c(), !0;
|
|
23735
23751
|
}, f = async (C) => {
|
|
23736
|
-
await
|
|
23752
|
+
await or.getMaterialHelper(
|
|
23737
23753
|
"ossfile",
|
|
23738
23754
|
n.controller
|
|
23739
23755
|
).excuteAction(C), t(!1);
|
|
23740
23756
|
}, p = async (C, x) => {
|
|
23741
|
-
await
|
|
23757
|
+
await or.getMaterialHelper(
|
|
23742
23758
|
"common",
|
|
23743
23759
|
n.controller
|
|
23744
23760
|
).excuteAction(C, x), t(!1);
|
|
@@ -23846,7 +23862,7 @@ const K = new P("chat-input"), Ac = window.SpeechRecognition || window.webkitSpe
|
|
|
23846
23862
|
p(A, C);
|
|
23847
23863
|
},
|
|
23848
23864
|
children: [
|
|
23849
|
-
/* @__PURE__ */ h("span", { className: K.b("pop-action-item-icon"), children: typeof C.icon == "function" ? C.icon() : ((x = C.icon) == null ? void 0 : x.showIcon) && /* @__PURE__ */ h(We, { children: (S = C.icon) != null && S.cssClass ? /* @__PURE__ */ h("i", { className: C.icon.cssClass }) : (M = C.icon) != null && M.imagePath ?
|
|
23865
|
+
/* @__PURE__ */ h("span", { className: K.b("pop-action-item-icon"), children: typeof C.icon == "function" ? C.icon() : ((x = C.icon) == null ? void 0 : x.showIcon) && /* @__PURE__ */ h(We, { children: (S = C.icon) != null && S.cssClass ? /* @__PURE__ */ h("i", { className: C.icon.cssClass }) : (M = C.icon) != null && M.imagePath ? ni(C.icon.imagePath) ? /* @__PURE__ */ h(
|
|
23850
23866
|
"div",
|
|
23851
23867
|
{
|
|
23852
23868
|
dangerouslySetInnerHTML: {
|
|
@@ -23917,7 +23933,7 @@ const Re = new P("chat-topic-item"), jy = (n) => {
|
|
|
23917
23933
|
{
|
|
23918
23934
|
id: "PINNED",
|
|
23919
23935
|
caption: i.isTop ? k.t.value("unpin") : k.t.value("pinTop"),
|
|
23920
|
-
icon: i.isTop ? /* @__PURE__ */ h(Qa, {}) : /* @__PURE__ */ h(
|
|
23936
|
+
icon: i.isTop ? /* @__PURE__ */ h(Qa, {}) : /* @__PURE__ */ h(Kr, {})
|
|
23921
23937
|
},
|
|
23922
23938
|
{ id: "RENAME", caption: k.t.value("rename"), icon: /* @__PURE__ */ h(Ya, {}) },
|
|
23923
23939
|
{
|
|
@@ -23929,7 +23945,7 @@ const Re = new P("chat-topic-item"), jy = (n) => {
|
|
|
23929
23945
|
{
|
|
23930
23946
|
id: "PINNED",
|
|
23931
23947
|
caption: i.isTop ? k.t.value("unpin") : k.t.value("pinTop"),
|
|
23932
|
-
icon: i.isTop ? /* @__PURE__ */ h(Qa, {}) : /* @__PURE__ */ h(
|
|
23948
|
+
icon: i.isTop ? /* @__PURE__ */ h(Qa, {}) : /* @__PURE__ */ h(Kr, {})
|
|
23933
23949
|
},
|
|
23934
23950
|
{ id: "RENAME", caption: k.t.value("rename"), icon: /* @__PURE__ */ h(Ya, {}) }
|
|
23935
23951
|
];
|
|
@@ -23970,7 +23986,7 @@ const Re = new P("chat-topic-item"), jy = (n) => {
|
|
|
23970
23986
|
}
|
|
23971
23987
|
) : /* @__PURE__ */ h("div", { className: Re.em("caption", "readonly"), children: [
|
|
23972
23988
|
/* @__PURE__ */ h("span", { className: Re.em("caption", "text"), children: i.caption }),
|
|
23973
|
-
i.isTop ? /* @__PURE__ */ h("span", { className: Re.em("caption", "icon"), children: /* @__PURE__ */ h(
|
|
23989
|
+
i.isTop ? /* @__PURE__ */ h("span", { className: Re.em("caption", "icon"), children: /* @__PURE__ */ h(Kr, {}) }) : null
|
|
23974
23990
|
] }) }),
|
|
23975
23991
|
!d.value && /* @__PURE__ */ h("div", { className: Re.e("icon"), children: [
|
|
23976
23992
|
/* @__PURE__ */ h(
|
|
@@ -24214,7 +24230,7 @@ const rn = new P("chat-minimize"), Wy = (n) => {
|
|
|
24214
24230
|
const m = localStorage.getItem(ne.MINIMIZE_STYLY_CHCHE);
|
|
24215
24231
|
if (m) {
|
|
24216
24232
|
const v = JSON.parse(m);
|
|
24217
|
-
|
|
24233
|
+
$s(v) && Object.assign(a, v);
|
|
24218
24234
|
}
|
|
24219
24235
|
d(), f();
|
|
24220
24236
|
}, []), L(() => {
|
|
@@ -24250,12 +24266,12 @@ const rn = new P("chat-minimize"), Wy = (n) => {
|
|
|
24250
24266
|
}
|
|
24251
24267
|
);
|
|
24252
24268
|
};
|
|
24253
|
-
const
|
|
24269
|
+
const _r = Bu({
|
|
24254
24270
|
zIndex: 10,
|
|
24255
24271
|
enableBackFill: !0
|
|
24256
24272
|
});
|
|
24257
24273
|
var Dc, $c, Rc, Pc;
|
|
24258
|
-
class
|
|
24274
|
+
class ys extends ze {
|
|
24259
24275
|
constructor(t) {
|
|
24260
24276
|
var i, r;
|
|
24261
24277
|
super(t);
|
|
@@ -24420,7 +24436,7 @@ class ws extends ze {
|
|
|
24420
24436
|
* @memberof ChatContainer
|
|
24421
24437
|
*/
|
|
24422
24438
|
registerDragDialogBorder() {
|
|
24423
|
-
|
|
24439
|
+
Nr(this.containerRef.current).resizable({
|
|
24424
24440
|
// 可拖拽的边缘
|
|
24425
24441
|
edges: {
|
|
24426
24442
|
top: !0,
|
|
@@ -24431,9 +24447,9 @@ class ws extends ze {
|
|
|
24431
24447
|
margin: 6,
|
|
24432
24448
|
modifiers: [
|
|
24433
24449
|
// 保持在父对象内部
|
|
24434
|
-
|
|
24450
|
+
Nr.modifiers.restrictEdges({ outer: document.body }),
|
|
24435
24451
|
// 缩放最小宽度
|
|
24436
|
-
|
|
24452
|
+
Nr.modifiers.restrictSize({
|
|
24437
24453
|
min: { width: this.data.minWidth, height: this.data.minHeight }
|
|
24438
24454
|
})
|
|
24439
24455
|
],
|
|
@@ -24467,7 +24483,7 @@ class ws extends ze {
|
|
|
24467
24483
|
const t = localStorage.getItem(ne.STYLE_CACHE);
|
|
24468
24484
|
if (t) {
|
|
24469
24485
|
const i = JSON.parse(t);
|
|
24470
|
-
i.side &&
|
|
24486
|
+
i.side && $s(i.side) && i.window && $s(i.window) && Object.assign(this.data, i);
|
|
24471
24487
|
}
|
|
24472
24488
|
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
24473
24489
|
}
|
|
@@ -24531,7 +24547,7 @@ class ws extends ze {
|
|
|
24531
24547
|
t.stopPropagation();
|
|
24532
24548
|
}
|
|
24533
24549
|
render() {
|
|
24534
|
-
return /* @__PURE__ */ h(
|
|
24550
|
+
return /* @__PURE__ */ h(_r.Provider, { value: this.containerContext, children: /* @__PURE__ */ h("div", { className: "".concat(this.ns.b()), children: [
|
|
24535
24551
|
/* @__PURE__ */ h(
|
|
24536
24552
|
"div",
|
|
24537
24553
|
{
|
|
@@ -24623,14 +24639,14 @@ class ws extends ze {
|
|
|
24623
24639
|
},
|
|
24624
24640
|
children: [
|
|
24625
24641
|
/* @__PURE__ */ h("div", { className: this.ns.b("content"), children: /* @__PURE__ */ h(
|
|
24626
|
-
|
|
24642
|
+
io,
|
|
24627
24643
|
{
|
|
24628
24644
|
controller: this.props.aiChat,
|
|
24629
24645
|
toolbarItems: this.props.contentToolbarItems
|
|
24630
24646
|
}
|
|
24631
24647
|
) }),
|
|
24632
24648
|
/* @__PURE__ */ h(
|
|
24633
|
-
|
|
24649
|
+
sr,
|
|
24634
24650
|
{
|
|
24635
24651
|
type: "footer",
|
|
24636
24652
|
mode: this.props.mode,
|
|
@@ -24645,7 +24661,7 @@ class ws extends ze {
|
|
|
24645
24661
|
}
|
|
24646
24662
|
),
|
|
24647
24663
|
/* @__PURE__ */ h("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ h(
|
|
24648
|
-
|
|
24664
|
+
ro,
|
|
24649
24665
|
{
|
|
24650
24666
|
controller: this.props.aiChat,
|
|
24651
24667
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -24656,14 +24672,14 @@ class ws extends ze {
|
|
|
24656
24672
|
)
|
|
24657
24673
|
] }) : /* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "default")), children: [
|
|
24658
24674
|
/* @__PURE__ */ h("div", { className: this.ns.b("content"), children: /* @__PURE__ */ h(
|
|
24659
|
-
|
|
24675
|
+
io,
|
|
24660
24676
|
{
|
|
24661
24677
|
controller: this.props.aiChat,
|
|
24662
24678
|
toolbarItems: this.props.contentToolbarItems
|
|
24663
24679
|
}
|
|
24664
24680
|
) }),
|
|
24665
24681
|
/* @__PURE__ */ h(
|
|
24666
|
-
|
|
24682
|
+
sr,
|
|
24667
24683
|
{
|
|
24668
24684
|
type: "footer",
|
|
24669
24685
|
mode: this.props.mode,
|
|
@@ -24678,7 +24694,7 @@ class ws extends ze {
|
|
|
24678
24694
|
}
|
|
24679
24695
|
),
|
|
24680
24696
|
/* @__PURE__ */ h("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ h(
|
|
24681
|
-
|
|
24697
|
+
ro,
|
|
24682
24698
|
{
|
|
24683
24699
|
controller: this.props.aiChat,
|
|
24684
24700
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -24704,7 +24720,7 @@ const Uy = Bu({
|
|
|
24704
24720
|
enableBackFill: !0
|
|
24705
24721
|
});
|
|
24706
24722
|
var Lc, zc, Bc;
|
|
24707
|
-
class
|
|
24723
|
+
class bs extends ze {
|
|
24708
24724
|
constructor() {
|
|
24709
24725
|
super(...arguments);
|
|
24710
24726
|
_(this, "ns", new P("flat-chat-container"));
|
|
@@ -24715,96 +24731,88 @@ class Cs extends ze {
|
|
|
24715
24731
|
enableBackFill: ((Lc = this.props) == null ? void 0 : Lc.enableBackFill) !== void 0 && ((zc = this.props) == null ? void 0 : zc.enableBackFill) !== null ? (Bc = this.props) == null ? void 0 : Bc.enableBackFill : !0
|
|
24716
24732
|
});
|
|
24717
24733
|
}
|
|
24718
|
-
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24726
|
-
|
|
24727
|
-
|
|
24728
|
-
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
/* @__PURE__ */ h(
|
|
24737
|
-
"div",
|
|
24738
|
-
{
|
|
24739
|
-
className: "".concat(this.ns.be("main", "right")),
|
|
24740
|
-
style: {
|
|
24741
|
-
width: this.props.hideTopicSidebar ? "100%" : "calc(100% - ".concat(this.props.aiTopic.topicSidebarWidth.value, "px)")
|
|
24742
|
-
},
|
|
24743
|
-
children: [
|
|
24744
|
-
/* @__PURE__ */ h("div", { className: this.ns.b("content"), children: /* @__PURE__ */ h(
|
|
24745
|
-
or,
|
|
24746
|
-
{
|
|
24747
|
-
controller: this.props.aiChat,
|
|
24748
|
-
toolbarItems: this.props.contentToolbarItems
|
|
24749
|
-
}
|
|
24750
|
-
) }),
|
|
24751
|
-
/* @__PURE__ */ h(
|
|
24752
|
-
Qn,
|
|
24753
|
-
{
|
|
24754
|
-
type: "footer",
|
|
24755
|
-
mode: this.props.mode,
|
|
24756
|
-
hideTopicSidebar: this.props.hideTopicSidebar,
|
|
24757
|
-
data: this.props.aiTopic.activedTopic.value,
|
|
24758
|
-
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is(
|
|
24759
|
-
"has-materials",
|
|
24760
|
-
this.props.aiChat.materials.value.length > 0
|
|
24761
|
-
)),
|
|
24762
|
-
controller: this.props.aiChat,
|
|
24763
|
-
items: this.props.footerToolbarItems
|
|
24764
|
-
}
|
|
24765
|
-
),
|
|
24766
|
-
/* @__PURE__ */ h("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ h(
|
|
24767
|
-
lr,
|
|
24768
|
-
{
|
|
24769
|
-
controller: this.props.aiChat,
|
|
24770
|
-
questionToolbarItems: this.props.questionToolbarItems
|
|
24771
|
-
}
|
|
24772
|
-
) })
|
|
24773
|
-
]
|
|
24774
|
-
}
|
|
24775
|
-
)
|
|
24776
|
-
] }) : /* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "default")), children: [
|
|
24734
|
+
/**
|
|
24735
|
+
* @description 绘制loading
|
|
24736
|
+
* @returns {*}
|
|
24737
|
+
* @memberof FlatChatContainer
|
|
24738
|
+
*/
|
|
24739
|
+
renderLoading() {
|
|
24740
|
+
return /* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "loading")), children: [
|
|
24741
|
+
/* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "spinner")) }),
|
|
24742
|
+
/* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "text")), children: k.t.value("loading") })
|
|
24743
|
+
] });
|
|
24744
|
+
}
|
|
24745
|
+
/**
|
|
24746
|
+
* @description 绘制内容
|
|
24747
|
+
* @memberof FlatChatContainer
|
|
24748
|
+
*/
|
|
24749
|
+
renderContent() {
|
|
24750
|
+
if (this.props.aiChat)
|
|
24751
|
+
return this.props.aiChat.inited.value ? [
|
|
24777
24752
|
/* @__PURE__ */ h("div", { className: this.ns.b("content"), children: /* @__PURE__ */ h(
|
|
24778
|
-
|
|
24753
|
+
io,
|
|
24779
24754
|
{
|
|
24780
24755
|
controller: this.props.aiChat,
|
|
24781
24756
|
toolbarItems: this.props.contentToolbarItems
|
|
24782
24757
|
}
|
|
24783
|
-
) }),
|
|
24758
|
+
) }, 1),
|
|
24784
24759
|
/* @__PURE__ */ h(
|
|
24785
|
-
|
|
24760
|
+
sr,
|
|
24786
24761
|
{
|
|
24787
24762
|
type: "footer",
|
|
24788
24763
|
mode: this.props.mode,
|
|
24789
24764
|
hideTopicSidebar: this.props.hideTopicSidebar,
|
|
24790
|
-
data:
|
|
24765
|
+
data: this.props.aiTopic.activedTopic.value,
|
|
24791
24766
|
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is(
|
|
24792
24767
|
"has-materials",
|
|
24793
24768
|
this.props.aiChat.materials.value.length > 0
|
|
24794
24769
|
)),
|
|
24795
24770
|
controller: this.props.aiChat,
|
|
24796
24771
|
items: this.props.footerToolbarItems
|
|
24797
|
-
}
|
|
24772
|
+
},
|
|
24773
|
+
2
|
|
24798
24774
|
),
|
|
24799
24775
|
/* @__PURE__ */ h("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ h(
|
|
24800
|
-
|
|
24776
|
+
ro,
|
|
24801
24777
|
{
|
|
24802
24778
|
controller: this.props.aiChat,
|
|
24803
24779
|
questionToolbarItems: this.props.questionToolbarItems
|
|
24804
24780
|
}
|
|
24805
|
-
) })
|
|
24806
|
-
]
|
|
24807
|
-
|
|
24781
|
+
) }, 3)
|
|
24782
|
+
] : this.renderLoading();
|
|
24783
|
+
}
|
|
24784
|
+
render() {
|
|
24785
|
+
return /* @__PURE__ */ h(Uy.Provider, { value: this.containerContext, children: /* @__PURE__ */ h(
|
|
24786
|
+
"div",
|
|
24787
|
+
{
|
|
24788
|
+
className: "".concat(this.ns.b(), " ").concat(this.ns.is("empty-message", !(this.props.aiChat && this.props.aiChat.messages.value.length > 0))),
|
|
24789
|
+
children: [
|
|
24790
|
+
/* @__PURE__ */ h("div", { className: this.ns.b("header"), children: /* @__PURE__ */ h("div", { className: this.ns.b("header-caption"), children: this.props.caption || k.t.value("aiAssistant") }) }),
|
|
24791
|
+
this.props.isLoading ? this.renderLoading() : this.props.mode === "TOPIC" ? /* @__PURE__ */ h("div", { className: "".concat(this.ns.b("main")), children: [
|
|
24792
|
+
!this.props.hideTopicSidebar && /* @__PURE__ */ h(
|
|
24793
|
+
"div",
|
|
24794
|
+
{
|
|
24795
|
+
className: "".concat(this.ns.be("main", "left")),
|
|
24796
|
+
style: {
|
|
24797
|
+
width: "".concat(this.props.aiTopic.topicSidebarWidth.value, "px")
|
|
24798
|
+
},
|
|
24799
|
+
children: /* @__PURE__ */ h(_f, { controller: this.props.aiTopic })
|
|
24800
|
+
}
|
|
24801
|
+
),
|
|
24802
|
+
/* @__PURE__ */ h(
|
|
24803
|
+
"div",
|
|
24804
|
+
{
|
|
24805
|
+
className: "".concat(this.ns.be("main", "right")),
|
|
24806
|
+
style: {
|
|
24807
|
+
width: this.props.hideTopicSidebar ? "100%" : "calc(100% - ".concat(this.props.aiTopic.topicSidebarWidth.value, "px)")
|
|
24808
|
+
},
|
|
24809
|
+
children: this.renderContent()
|
|
24810
|
+
}
|
|
24811
|
+
)
|
|
24812
|
+
] }) : /* @__PURE__ */ h("div", { className: "".concat(this.ns.be("main", "default")), children: this.renderContent() })
|
|
24813
|
+
]
|
|
24814
|
+
}
|
|
24815
|
+
) });
|
|
24808
24816
|
}
|
|
24809
24817
|
}
|
|
24810
24818
|
const Ic = window.SpeechRecognition || window.webkitSpeechRecognition, W = new P("simple-chat-input"), qy = (n) => {
|
|
@@ -24824,10 +24832,12 @@ const Ic = window.SpeechRecognition || window.webkitSpeechRecognition, W = new P
|
|
|
24824
24832
|
}, l = ve(() => Vn(i.value).length <= 0), c = () => {
|
|
24825
24833
|
var w, C, x;
|
|
24826
24834
|
try {
|
|
24827
|
-
|
|
24835
|
+
const S = Vn(i.value);
|
|
24836
|
+
i.value = "", (w = o.current) == null || w.chain().clearContent().run();
|
|
24828
24837
|
const M = n.controller.stringlyMaterialResource(!0);
|
|
24829
|
-
|
|
24838
|
+
(x = (C = n.controller.opts).action) == null || x.call(C, "send", {
|
|
24830
24839
|
content: S,
|
|
24840
|
+
resources: M,
|
|
24831
24841
|
agentId: n.controller.activeAIAgentID,
|
|
24832
24842
|
knowledgeId: n.controller.getQueryKnowledgeBases()
|
|
24833
24843
|
});
|
|
@@ -24837,12 +24847,12 @@ const Ic = window.SpeechRecognition || window.webkitSpeechRecognition, W = new P
|
|
|
24837
24847
|
}, u = (w) => {
|
|
24838
24848
|
!l.value && w.code === "Enter" && w.key === "Enter" && w.shiftKey === !1 && c();
|
|
24839
24849
|
}, d = async (w) => {
|
|
24840
|
-
await
|
|
24850
|
+
await or.getMaterialHelper(
|
|
24841
24851
|
"ossfile",
|
|
24842
24852
|
n.controller
|
|
24843
24853
|
).excuteAction(w), t(!1);
|
|
24844
24854
|
}, f = async (w, C) => {
|
|
24845
|
-
await
|
|
24855
|
+
await or.getMaterialHelper(
|
|
24846
24856
|
"common",
|
|
24847
24857
|
n.controller
|
|
24848
24858
|
).excuteAction(w, C), t(!1);
|
|
@@ -24895,7 +24905,7 @@ const Ic = window.SpeechRecognition || window.webkitSpeechRecognition, W = new P
|
|
|
24895
24905
|
className: W.be("popup", "item"),
|
|
24896
24906
|
onClick: (M) => f(M, w),
|
|
24897
24907
|
children: [
|
|
24898
|
-
/* @__PURE__ */ h("div", { className: W.bem("popup", "item", "icon"), children: typeof w.icon == "function" ? w.icon() : ((C = w.icon) == null ? void 0 : C.showIcon) && /* @__PURE__ */ h(We, { children: (x = w.icon) != null && x.cssClass ? /* @__PURE__ */ h("i", { className: w.icon.cssClass }) : (S = w.icon) != null && S.imagePath ?
|
|
24908
|
+
/* @__PURE__ */ h("div", { className: W.bem("popup", "item", "icon"), children: typeof w.icon == "function" ? w.icon() : ((C = w.icon) == null ? void 0 : C.showIcon) && /* @__PURE__ */ h(We, { children: (x = w.icon) != null && x.cssClass ? /* @__PURE__ */ h("i", { className: w.icon.cssClass }) : (S = w.icon) != null && S.imagePath ? ni(w.icon.imagePath) ? /* @__PURE__ */ h(
|
|
24899
24909
|
"div",
|
|
24900
24910
|
{
|
|
24901
24911
|
dangerouslySetInnerHTML: {
|
|
@@ -24963,8 +24973,8 @@ const Ic = window.SpeechRecognition || window.webkitSpeechRecognition, W = new P
|
|
|
24963
24973
|
fd,
|
|
24964
24974
|
{
|
|
24965
24975
|
className: "".concat(W.e("action"), " ").concat(W.em("action", "knowledge"), " ").concat(W.is(
|
|
24966
|
-
"
|
|
24967
|
-
|
|
24976
|
+
"active",
|
|
24977
|
+
n.controller.enableKnowledgeBaseState.value
|
|
24968
24978
|
)),
|
|
24969
24979
|
enableSearch: !0,
|
|
24970
24980
|
popperStyle: { height: "220px" },
|
|
@@ -25000,8 +25010,8 @@ class Oc extends ze {
|
|
|
25000
25010
|
}
|
|
25001
25011
|
}
|
|
25002
25012
|
export {
|
|
25003
|
-
|
|
25004
|
-
|
|
25013
|
+
ys as ChatContainer,
|
|
25014
|
+
bs as FlatChatContainer,
|
|
25005
25015
|
Zy as chat,
|
|
25006
25016
|
Qy as createFlatChat
|
|
25007
25017
|
};
|