@ibiz-template-plugin/ai-chat 0.0.75 → 0.0.76
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 +235 -227
- package/dist/index.legacy.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isUndefined as cf, cloneDeep as uf } from "lodash-es";
|
|
|
8
8
|
import { QXEvent as df } from "qx-util";
|
|
9
9
|
var ti = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, kn = function(n) {
|
|
10
10
|
return n && n.Math === Math && n;
|
|
11
|
-
},
|
|
11
|
+
}, Be = (
|
|
12
12
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
13
13
|
kn(typeof globalThis == "object" && globalThis) || kn(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
14
14
|
kn(typeof self == "object" && self) || kn(typeof ti == "object" && ti) || kn(typeof ti == "object" && ti) || // eslint-disable-next-line no-new-func -- fallback
|
|
@@ -43,13 +43,13 @@ var Oc = function(n, e) {
|
|
|
43
43
|
writable: !(n & 4),
|
|
44
44
|
value: e
|
|
45
45
|
};
|
|
46
|
-
}, Ac = Zs, Ic = Function.prototype, ds = Ic.call, gf = Ac && Ic.bind.bind(ds, ds),
|
|
46
|
+
}, Ac = Zs, Ic = Function.prototype, ds = Ic.call, gf = Ac && Ic.bind.bind(ds, ds), Ke = Ac ? gf : function(n) {
|
|
47
47
|
return function() {
|
|
48
48
|
return ds.apply(n, arguments);
|
|
49
49
|
};
|
|
50
|
-
}, Dc =
|
|
50
|
+
}, Dc = Ke, vf = Dc({}.toString), yf = Dc("".slice), $c = function(n) {
|
|
51
51
|
return yf(vf(n), 8, -1);
|
|
52
|
-
}, bf =
|
|
52
|
+
}, bf = Ke, wf = Ct, Cf = $c, Cr = Object, kf = bf("".split), Pc = wf(function() {
|
|
53
53
|
return !Cr("z").propertyIsEnumerable(0);
|
|
54
54
|
}) ? function(n) {
|
|
55
55
|
return Cf(n) === "String" ? kf(n, "") : Cr(n);
|
|
@@ -67,14 +67,14 @@ var Oc = function(n, e) {
|
|
|
67
67
|
return typeof n == "function";
|
|
68
68
|
}, _f = Qe, Kn = function(n) {
|
|
69
69
|
return typeof n == "object" ? n !== null : _f(n);
|
|
70
|
-
}, xr =
|
|
70
|
+
}, xr = Be, Nf = Qe, Ef = function(n) {
|
|
71
71
|
return Nf(n) ? n : void 0;
|
|
72
72
|
}, eo = function(n, e) {
|
|
73
73
|
return arguments.length < 2 ? Ef(xr[n]) : xr[n] && xr[n][e];
|
|
74
|
-
}, Of =
|
|
75
|
-
ea && (
|
|
76
|
-
!Ii && Sr && (
|
|
77
|
-
var $f = Ii, ta = $f, Pf = Ct, Rf =
|
|
74
|
+
}, Of = Ke, Af = Of({}.isPrototypeOf), If = Be, Go = If.navigator, Xo = Go && Go.userAgent, Df = Xo ? String(Xo) : "", zc = Be, Sr = Df, Yo = zc.process, Zo = zc.Deno, Qo = Yo && Yo.versions || Zo && Zo.version, ea = Qo && Qo.v8, Ve, Ii;
|
|
75
|
+
ea && (Ve = ea.split("."), Ii = Ve[0] > 0 && Ve[0] < 4 ? 1 : +(Ve[0] + Ve[1]));
|
|
76
|
+
!Ii && Sr && (Ve = Sr.match(/Edge\/(\d+)/), (!Ve || Ve[1] >= 74) && (Ve = Sr.match(/Chrome\/(\d+)/), Ve && (Ii = +Ve[1])));
|
|
77
|
+
var $f = Ii, ta = $f, Pf = Ct, Rf = Be, Lf = Rf.String, Bc = !!Object.getOwnPropertySymbols && !Pf(function() {
|
|
78
78
|
var n = Symbol("symbol detection");
|
|
79
79
|
return !Lf(n) || !(Object(n) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
80
80
|
!Symbol.sham && ta && ta < 41;
|
|
@@ -101,14 +101,14 @@ var $f = Ii, ta = $f, Pf = Ct, Rf = ze, Lf = Rf.String, Bc = !!Object.getOwnProp
|
|
|
101
101
|
if (e === "string" && Mr(t = n.toString) && !_r(i = Tr(t, n)) || Mr(t = n.valueOf) && !_r(i = Tr(t, n)) || e !== "string" && Mr(t = n.toString) && !_r(i = Tr(t, n)))
|
|
102
102
|
return i;
|
|
103
103
|
throw new Zf("Can't convert object to primitive value");
|
|
104
|
-
}, jc = { exports: {} }, na =
|
|
104
|
+
}, jc = { exports: {} }, na = Be, ep = Object.defineProperty, to = function(n, e) {
|
|
105
105
|
try {
|
|
106
106
|
ep(na, n, { value: e, configurable: !0, writable: !0 });
|
|
107
107
|
} catch (t) {
|
|
108
108
|
na[n] = e;
|
|
109
109
|
}
|
|
110
110
|
return e;
|
|
111
|
-
}, tp =
|
|
111
|
+
}, tp = Be, np = to, ia = "__core-js_shared__", ra = jc.exports = tp[ia] || np(ia, {});
|
|
112
112
|
(ra.versions || (ra.versions = [])).push({
|
|
113
113
|
version: "3.49.0",
|
|
114
114
|
mode: "global",
|
|
@@ -120,11 +120,11 @@ var no = jc.exports, sa = no, Wc = function(n, e) {
|
|
|
120
120
|
return sa[n] || (sa[n] = e || {});
|
|
121
121
|
}, ip = Lc, rp = Object, Uc = function(n) {
|
|
122
122
|
return rp(ip(n));
|
|
123
|
-
}, sp =
|
|
123
|
+
}, sp = Ke, op = Uc, ap = sp({}.hasOwnProperty), Wt = Object.hasOwn || function(e, t) {
|
|
124
124
|
return ap(op(e), t);
|
|
125
|
-
}, lp =
|
|
125
|
+
}, lp = Ke, cp = 0, up = Math.random(), dp = lp(1.1.toString), qc = function(n) {
|
|
126
126
|
return "Symbol(" + (n === void 0 ? "" : n) + ")_" + dp(++cp + up, 36);
|
|
127
|
-
}, hp =
|
|
127
|
+
}, hp = Be, fp = Wc, oa = Wt, pp = qc, mp = Bc, gp = Fc, rn = hp.Symbol, Nr = fp("wks"), vp = gp ? rn.for || rn : rn && rn.withoutSetter || pp, Kc = function(n) {
|
|
128
128
|
return oa(Nr, n) || (Nr[n] = mp && oa(rn, n) ? rn[n] : vp("Symbol." + n)), Nr[n];
|
|
129
129
|
}, yp = Qs, aa = Kn, la = Vc, bp = Yf, wp = Qf, Cp = Kc, kp = TypeError, xp = Cp("toPrimitive"), Sp = function(n, e) {
|
|
130
130
|
if (!aa(n) || la(n))
|
|
@@ -139,7 +139,7 @@ var no = jc.exports, sa = no, Wc = function(n, e) {
|
|
|
139
139
|
}, Tp = Sp, Mp = Vc, Jc = function(n) {
|
|
140
140
|
var e = Tp(n, "string");
|
|
141
141
|
return Mp(e) ? e : e + "";
|
|
142
|
-
}, _p =
|
|
142
|
+
}, _p = Be, ca = Kn, hs = _p.document, Np = ca(hs) && ca(hs.createElement), Gc = function(n) {
|
|
143
143
|
return Np ? hs.createElement(n) : {};
|
|
144
144
|
}, Ep = kt, Op = Ct, Ap = Gc, Xc = !Ep && !Op(function() {
|
|
145
145
|
return Object.defineProperty(Ap("div"), "a", {
|
|
@@ -197,13 +197,13 @@ var Xp = kt, Yp = vn, Zp = Oc, Zc = Xp ? function(n, e, t) {
|
|
|
197
197
|
EXISTS: io,
|
|
198
198
|
PROPER: t1,
|
|
199
199
|
CONFIGURABLE: n1
|
|
200
|
-
}, r1 =
|
|
200
|
+
}, r1 = Ke, s1 = Qe, ps = no, o1 = r1(Function.toString);
|
|
201
201
|
s1(ps.inspectSource) || (ps.inspectSource = function(n) {
|
|
202
202
|
return o1(n);
|
|
203
203
|
});
|
|
204
|
-
var a1 = ps.inspectSource, l1 =
|
|
204
|
+
var a1 = ps.inspectSource, l1 = Be, c1 = Qe, ha = l1.WeakMap, u1 = c1(ha) && /native code/.test(String(ha)), d1 = Wc, h1 = qc, fa = d1("keys"), tu = function(n) {
|
|
205
205
|
return fa[n] || (fa[n] = h1(n));
|
|
206
|
-
}, ro = {}, f1 = u1, nu =
|
|
206
|
+
}, ro = {}, f1 = u1, nu = Be, p1 = Kn, m1 = Zc, Dr = Wt, $r = no, g1 = tu, v1 = ro, pa = "Object already initialized", ms = nu.TypeError, y1 = nu.WeakMap, Di, Pn, $i, b1 = function(n) {
|
|
207
207
|
return $i(n) ? Pn(n) : Di(n, {});
|
|
208
208
|
}, w1 = function(n) {
|
|
209
209
|
return function(e) {
|
|
@@ -214,15 +214,15 @@ var a1 = ps.inspectSource, l1 = ze, c1 = Qe, ha = l1.WeakMap, u1 = c1(ha) && /na
|
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
216
|
if (f1 || $r.state) {
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
if (
|
|
217
|
+
var Je = $r.state || ($r.state = new y1());
|
|
218
|
+
Je.get = Je.get, Je.has = Je.has, Je.set = Je.set, Di = function(n, e) {
|
|
219
|
+
if (Je.has(n))
|
|
220
220
|
throw new ms(pa);
|
|
221
|
-
return e.facade = n,
|
|
221
|
+
return e.facade = n, Je.set(n, e), e;
|
|
222
222
|
}, Pn = function(n) {
|
|
223
|
-
return
|
|
223
|
+
return Je.get(n) || {};
|
|
224
224
|
}, $i = function(n) {
|
|
225
|
-
return
|
|
225
|
+
return Je.has(n);
|
|
226
226
|
};
|
|
227
227
|
} else {
|
|
228
228
|
var Jt = g1("state");
|
|
@@ -242,7 +242,7 @@ var C1 = {
|
|
|
242
242
|
has: $i,
|
|
243
243
|
enforce: b1,
|
|
244
244
|
getterFor: w1
|
|
245
|
-
}, so =
|
|
245
|
+
}, so = Ke, k1 = Ct, x1 = Qe, ri = Wt, gs = kt, S1 = i1.CONFIGURABLE, T1 = a1, iu = C1, M1 = iu.enforce, _1 = iu.get, ma = String, Si = Object.defineProperty, N1 = so("".slice), E1 = so("".replace), O1 = so([].join), A1 = gs && !k1(function() {
|
|
246
246
|
return Si(function() {
|
|
247
247
|
}, "length", { value: 8 }).length !== 8;
|
|
248
248
|
}), I1 = String(String).split("String"), D1 = Qc.exports = function(n, e, t) {
|
|
@@ -312,7 +312,7 @@ var $1 = Qc.exports, P1 = Qe, R1 = vn, L1 = $1, z1 = to, B1 = function(n, e, t,
|
|
|
312
312
|
// `Array.prototype.indexOf` method
|
|
313
313
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
314
314
|
indexOf: ga(!1)
|
|
315
|
-
}, nm =
|
|
315
|
+
}, nm = Ke, Pr = Wt, im = Qi, rm = tm.indexOf, sm = ro, va = nm([].push), au = function(n, e) {
|
|
316
316
|
var t = im(n), i = 0, r = [], s;
|
|
317
317
|
for (s in t)
|
|
318
318
|
!Pr(sm, s) && Pr(t, s) && va(r, s);
|
|
@@ -333,7 +333,7 @@ ru.f = Object.getOwnPropertyNames || function(e) {
|
|
|
333
333
|
};
|
|
334
334
|
var lu = {};
|
|
335
335
|
lu.f = Object.getOwnPropertySymbols;
|
|
336
|
-
var cm = eo, um =
|
|
336
|
+
var cm = eo, um = Ke, dm = ru, hm = lu, fm = er, pm = um([].concat), mm = cm("Reflect", "ownKeys") || function(e) {
|
|
337
337
|
var t = dm.f(fm(e)), i = hm.f;
|
|
338
338
|
return i ? pm(t, i(e)) : t;
|
|
339
339
|
}, ya = Wt, gm = mm, vm = Ys, ym = vn, bm = function(n, e, t) {
|
|
@@ -346,7 +346,7 @@ var cm = eo, um = qe, dm = ru, hm = lu, fm = er, pm = um([].concat), mm = cm("Re
|
|
|
346
346
|
return t === Mm ? !0 : t === Tm ? !1 : Cm(e) ? wm(e) : !!e;
|
|
347
347
|
}, xm = Jn.normalize = function(n) {
|
|
348
348
|
return String(n).replace(km, ".").toLowerCase();
|
|
349
|
-
}, Sm = Jn.data = {}, Tm = Jn.NATIVE = "N", Mm = Jn.POLYFILL = "P", _m = Jn, si =
|
|
349
|
+
}, Sm = Jn.data = {}, Tm = Jn.NATIVE = "N", Mm = Jn.POLYFILL = "P", _m = Jn, si = Be, Nm = Ys.f, Em = Zc, Om = B1, Am = to, Im = bm, Dm = _m, $m = function(n, e) {
|
|
350
350
|
var t = n.target, i = n.global, r = n.stat, s, o, a, l, c, u;
|
|
351
351
|
if (i ? o = si : r ? o = si[t] || Am(t, {}) : o = si[t] && si[t].prototype, o)
|
|
352
352
|
for (a in e) {
|
|
@@ -357,7 +357,7 @@ var cm = eo, um = qe, dm = ru, hm = lu, fm = er, pm = um([].concat), mm = cm("Re
|
|
|
357
357
|
}
|
|
358
358
|
(n.sham || l && l.sham) && Em(c, "sham", !0), Om(o, a, c, n);
|
|
359
359
|
}
|
|
360
|
-
}, Pm = $c, Rm =
|
|
360
|
+
}, Pm = $c, Rm = Ke, Lm = function(n) {
|
|
361
361
|
if (Pm(n) === "Function")
|
|
362
362
|
return Rm(n);
|
|
363
363
|
}, ba = Lm, zm = Hc, Bm = Zs, Fm = ba(ba.bind), Vm = function(n, e) {
|
|
@@ -431,7 +431,7 @@ g0({ target: "Array", proto: !0 }, {
|
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
433
|
y0("findLast");
|
|
434
|
-
var b0 =
|
|
434
|
+
var b0 = Be, w0 = Ke, C0 = function(n, e) {
|
|
435
435
|
return w0(b0[n].prototype[e]);
|
|
436
436
|
}, k0 = C0;
|
|
437
437
|
k0("Array", "findLast");
|
|
@@ -444,7 +444,7 @@ function nt(n, e) {
|
|
|
444
444
|
function lo(n) {
|
|
445
445
|
n && n.parentNode && n.parentNode.removeChild(n);
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function We(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];
|
|
@@ -460,10 +460,10 @@ function Mi(n, e, t, i, r) {
|
|
|
460
460
|
function Ma() {
|
|
461
461
|
return { current: null };
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function qe(n) {
|
|
464
464
|
return n.children;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function Ue(n, e) {
|
|
467
467
|
this.props = n, this.context = e;
|
|
468
468
|
}
|
|
469
469
|
function un(n, e) {
|
|
@@ -502,7 +502,7 @@ function wu(n, e, t, i, r, s, o, a, l, c, u) {
|
|
|
502
502
|
function S0(n, e, t, i, r) {
|
|
503
503
|
var s, o, a, l, c, u = t.length, d = u, h = 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 + h, (o = n.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Mi(null, o, null, null, null) : Gn(o) ? Mi(
|
|
505
|
+
(o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (l = s + h, (o = n.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Mi(null, o, null, null, null) : Gn(o) ? Mi(qe, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Mi(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 = T0(o, t, l, d)) != -1 && (d--, (a = t[c]) && (a.__u |= 2)), a == null || a.__v == null ? (c == -1 && (r > u ? h-- : r < u && h++), typeof o.type != "function" && (o.__u |= 4)) : c != l && (c == l - 1 ? h-- : c == l + 1 ? h++ : (c > l ? h-- : h++, 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 = un(a)), Su(a, a));
|
|
@@ -588,7 +588,7 @@ function co(n, e, t, i, r, s, o, a, l, c) {
|
|
|
588
588
|
e:
|
|
589
589
|
if (typeof W == "function")
|
|
590
590
|
try {
|
|
591
|
-
if (g = e.props, y = "prototype" in W && W.prototype.render, w = (u = W.contextType) && i[u.__c], C = u ? w ? w.props.value : u.__ : i, t.__c ? b = (d = e.__c = t.__c).__ = d.__E : (y ? e.__c = d = new W(g, C) : (e.__c = d = new
|
|
591
|
+
if (g = e.props, y = "prototype" in W && W.prototype.render, w = (u = W.contextType) && i[u.__c], C = u ? w ? w.props.value : u.__ : i, t.__c ? b = (d = e.__c = t.__c).__ = d.__E : (y ? e.__c = d = new W(g, C) : (e.__c = d = new Ue(g, C), d.constructor = W, d.render = _0), w && w.sub(d), d.props = g, d.state || (d.state = {}), d.context = C, d.__n = i, h = d.__d = !0, d.__h = [], d._sb = []), y && d.__s == null && (d.__s = d.state), y && W.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = nt({}, d.__s)), nt(d.__s, W.getDerivedStateFromProps(g, d.__s))), f = d.props, m = d.state, d.__v = e, h)
|
|
592
592
|
y && W.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), y && d.componentDidMount != null && d.__h.push(d.componentDidMount);
|
|
593
593
|
else {
|
|
594
594
|
if (y && W.getDerivedStateFromProps == null && g !== f && d.componentWillReceiveProps != null && d.componentWillReceiveProps(g, C), !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(g, d.__s, C) === !1 || e.__v == t.__v) {
|
|
@@ -611,7 +611,7 @@ function co(n, e, t, i, r, s, o, a, l, c) {
|
|
|
611
611
|
do
|
|
612
612
|
d.__d = !1, T && T(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 = nt(nt({}, i), d.getChildContext())), y && !h && d.getSnapshotBeforeUpdate != null && (v = d.getSnapshotBeforeUpdate(f, m)), E = u, u != null && u.type ===
|
|
614
|
+
d.state = d.__s, d.getChildContext != null && (i = nt(nt({}, i), d.getChildContext())), y && !h && d.getSnapshotBeforeUpdate != null && (v = d.getSnapshotBeforeUpdate(f, m)), E = u, u != null && u.type === qe && u.key == null && (E = xu(u.props.children)), a = wu(n, Gn(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), b && (d.__E = d.__ = null);
|
|
615
615
|
} catch (se) {
|
|
616
616
|
if (e.__v = null, l || s != null)
|
|
617
617
|
if (se.then) {
|
|
@@ -723,7 +723,7 @@ function _0(n, e, t) {
|
|
|
723
723
|
}
|
|
724
724
|
function Et(n, e, t) {
|
|
725
725
|
var i, r, s, o;
|
|
726
|
-
e == document && (e = document.documentElement), P.__ && P.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], co(e, n = (!i && t || e).__k =
|
|
726
|
+
e == document && (e = document.documentElement), P.__ && P.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], co(e, n = (!i && t || e).__k = We(qe, null, [n]), r || Rn, Rn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ? tr.call(e.childNodes) : null, s, !i && t ? t : r ? r.__e : e.firstChild, i, o), ku(s, n, o);
|
|
727
727
|
}
|
|
728
728
|
function N0(n) {
|
|
729
729
|
function e(t) {
|
|
@@ -760,12 +760,12 @@ tr = yu.slice, P = { __e: function(n, e, t, i) {
|
|
|
760
760
|
throw n;
|
|
761
761
|
} }, hu = 0, fu = function(n) {
|
|
762
762
|
return n != null && n.constructor == null;
|
|
763
|
-
},
|
|
763
|
+
}, Ue.prototype.setState = function(n, e) {
|
|
764
764
|
var t;
|
|
765
765
|
t = this.__s != null && this.__s != this.state ? this.__s : this.__s = nt({}, this.state), typeof n == "function" && (n = n(nt({}, t), this.props)), n && nt(t, n), n != null && this.__v && (e && this._sb.push(e), xs(this));
|
|
766
|
-
},
|
|
766
|
+
}, Ue.prototype.forceUpdate = function(n) {
|
|
767
767
|
this.__v && (this.__e = !0, n && this.__h.push(n), xs(this));
|
|
768
|
-
},
|
|
768
|
+
}, Ue.prototype.render = qe, Nt = [], pu = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, mu = function(n, e) {
|
|
769
769
|
return n.__v.__b - e.__v.__b;
|
|
770
770
|
}, Pi.__r = 0, gu = /(PointerCapture)$|Capture$/i, ao = 0, Cs = Na(!1), ks = Na(!0), vu = 0;
|
|
771
771
|
var E0 = 0;
|
|
@@ -955,7 +955,7 @@ class z {
|
|
|
955
955
|
return "--".concat(this.namespace, "-").concat(this.block, "-").concat(e);
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function Ge(n) {
|
|
959
959
|
if (typeof n != "string")
|
|
960
960
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
961
961
|
}
|
|
@@ -1001,30 +1001,30 @@ var _n = {
|
|
|
1001
1001
|
resolve: function() {
|
|
1002
1002
|
for (var e = "", t = !1, i, r = arguments.length - 1; r >= -1 && !t; r--) {
|
|
1003
1003
|
var s;
|
|
1004
|
-
r >= 0 ? s = arguments[r] : (i === void 0 && (i = process.cwd()), s = i),
|
|
1004
|
+
r >= 0 ? s = arguments[r] : (i === void 0 && (i = process.cwd()), s = i), Ge(s), s.length !== 0 && (e = s + "/" + e, t = s.charCodeAt(0) === 47);
|
|
1005
1005
|
}
|
|
1006
1006
|
return e = Ea(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
1007
1007
|
},
|
|
1008
1008
|
normalize: function(e) {
|
|
1009
|
-
if (
|
|
1009
|
+
if (Ge(e), e.length === 0)
|
|
1010
1010
|
return ".";
|
|
1011
1011
|
var t = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
1012
1012
|
return e = Ea(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && i && (e += "/"), t ? "/" + e : e;
|
|
1013
1013
|
},
|
|
1014
1014
|
isAbsolute: function(e) {
|
|
1015
|
-
return
|
|
1015
|
+
return Ge(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
1016
1016
|
},
|
|
1017
1017
|
join: function() {
|
|
1018
1018
|
if (arguments.length === 0)
|
|
1019
1019
|
return ".";
|
|
1020
1020
|
for (var e, t = 0; t < arguments.length; ++t) {
|
|
1021
1021
|
var i = arguments[t];
|
|
1022
|
-
|
|
1022
|
+
Ge(i), i.length > 0 && (e === void 0 ? e = i : e += "/" + i);
|
|
1023
1023
|
}
|
|
1024
1024
|
return e === void 0 ? "." : _n.normalize(e);
|
|
1025
1025
|
},
|
|
1026
1026
|
relative: function(e, t) {
|
|
1027
|
-
if (
|
|
1027
|
+
if (Ge(e), Ge(t), e === t || (e = _n.resolve(e), t = _n.resolve(t), e === t))
|
|
1028
1028
|
return "";
|
|
1029
1029
|
for (var i = 1; i < e.length && e.charCodeAt(i) === 47; ++i)
|
|
1030
1030
|
;
|
|
@@ -1055,7 +1055,7 @@ var _n = {
|
|
|
1055
1055
|
return e;
|
|
1056
1056
|
},
|
|
1057
1057
|
dirname: function(e) {
|
|
1058
|
-
if (
|
|
1058
|
+
if (Ge(e), e.length === 0)
|
|
1059
1059
|
return ".";
|
|
1060
1060
|
for (var t = e.charCodeAt(0), i = t === 47, r = -1, s = !0, o = e.length - 1; o >= 1; --o)
|
|
1061
1061
|
if (t = e.charCodeAt(o), t === 47) {
|
|
@@ -1070,7 +1070,7 @@ var _n = {
|
|
|
1070
1070
|
basename: function(e, t) {
|
|
1071
1071
|
if (t !== void 0 && typeof t != "string")
|
|
1072
1072
|
throw new TypeError('"ext" argument must be a string');
|
|
1073
|
-
|
|
1073
|
+
Ge(e);
|
|
1074
1074
|
var i = 0, r = -1, s = !0, o;
|
|
1075
1075
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
1076
1076
|
if (t.length === e.length && t === e)
|
|
@@ -1100,7 +1100,7 @@ var _n = {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
},
|
|
1102
1102
|
extname: function(e) {
|
|
1103
|
-
|
|
1103
|
+
Ge(e);
|
|
1104
1104
|
for (var t = -1, i = 0, r = -1, s = !0, o = 0, a = e.length - 1; a >= 0; --a) {
|
|
1105
1105
|
var l = e.charCodeAt(a);
|
|
1106
1106
|
if (l === 47) {
|
|
@@ -1122,7 +1122,7 @@ var _n = {
|
|
|
1122
1122
|
return I0("/", e);
|
|
1123
1123
|
},
|
|
1124
1124
|
parse: function(e) {
|
|
1125
|
-
|
|
1125
|
+
Ge(e);
|
|
1126
1126
|
var t = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
1127
1127
|
if (e.length === 0)
|
|
1128
1128
|
return t;
|
|
@@ -1151,7 +1151,7 @@ _n.posix = _n;
|
|
|
1151
1151
|
function lt() {
|
|
1152
1152
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function Ae() {
|
|
1155
1155
|
return "".concat(lt() + lt(), "-").concat(lt(), "-").concat(lt(), "-").concat(lt(), "-").concat(lt()).concat(lt()).concat(lt());
|
|
1156
1156
|
}
|
|
1157
1157
|
function li(n) {
|
|
@@ -1179,7 +1179,7 @@ function Tu(n, e) {
|
|
|
1179
1179
|
t += L0;
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
1182
|
-
return t += "@".concat(e ||
|
|
1182
|
+
return t += "@".concat(e || Ae(), "@").concat((/* @__PURE__ */ new Date()).getTime()), t;
|
|
1183
1183
|
}
|
|
1184
1184
|
function z0(n) {
|
|
1185
1185
|
const e = {};
|
|
@@ -2006,7 +2006,7 @@ function U0(n, e) {
|
|
|
2006
2006
|
!Q.__s && fo(t.__H, e) && (t.__ = n, t.u = e, J.__h.push(t));
|
|
2007
2007
|
}
|
|
2008
2008
|
function F(n) {
|
|
2009
|
-
return dn = 5,
|
|
2009
|
+
return dn = 5, De(function() {
|
|
2010
2010
|
return { current: n };
|
|
2011
2011
|
}, []);
|
|
2012
2012
|
}
|
|
@@ -2024,12 +2024,12 @@ function q0(n, e, t) {
|
|
|
2024
2024
|
};
|
|
2025
2025
|
}, t == null ? t : t.concat(n));
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function De(n, e) {
|
|
2028
2028
|
var t = Xn(Bt++, 7);
|
|
2029
2029
|
return fo(t.__H, e) && (t.__ = n(), t.__H = e, t.__h = n), t.__;
|
|
2030
2030
|
}
|
|
2031
2031
|
function _s(n, e) {
|
|
2032
|
-
return dn = 8,
|
|
2032
|
+
return dn = 8, De(function() {
|
|
2033
2033
|
return n;
|
|
2034
2034
|
}, e);
|
|
2035
2035
|
}
|
|
@@ -2375,7 +2375,7 @@ function zi(n) {
|
|
|
2375
2375
|
function Lu(n) {
|
|
2376
2376
|
var e = this, t = n.data, i = $(t);
|
|
2377
2377
|
i.value = t;
|
|
2378
|
-
var r =
|
|
2378
|
+
var r = De(function() {
|
|
2379
2379
|
for (var s = e.__v; s = s.__; )
|
|
2380
2380
|
if (s.__c) {
|
|
2381
2381
|
s.__c.__$f |= 4;
|
|
@@ -2477,7 +2477,7 @@ wn("unmount", function(n, e) {
|
|
|
2477
2477
|
wn("__h", function(n, e, t, i) {
|
|
2478
2478
|
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
2479
2479
|
});
|
|
2480
|
-
|
|
2480
|
+
Ue.prototype.shouldComponentUpdate = function(n, e) {
|
|
2481
2481
|
var t = this.__$u, i = t && t.s !== void 0;
|
|
2482
2482
|
for (var r in e)
|
|
2483
2483
|
return !0;
|
|
@@ -2495,13 +2495,13 @@ We.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
2495
2495
|
return !1;
|
|
2496
2496
|
};
|
|
2497
2497
|
function $(n) {
|
|
2498
|
-
return
|
|
2498
|
+
return De(function() {
|
|
2499
2499
|
return Y(n);
|
|
2500
2500
|
}, []);
|
|
2501
2501
|
}
|
|
2502
2502
|
function me(n) {
|
|
2503
2503
|
var e = F(n);
|
|
2504
|
-
return e.current = n, ir.__$f |= 4,
|
|
2504
|
+
return e.current = n, ir.__$f |= 4, De(function() {
|
|
2505
2505
|
return mo(function() {
|
|
2506
2506
|
return e.current();
|
|
2507
2507
|
});
|
|
@@ -4278,7 +4278,7 @@ const Vg = (n) => {
|
|
|
4278
4278
|
default:
|
|
4279
4279
|
t = Lg;
|
|
4280
4280
|
}
|
|
4281
|
-
return
|
|
4281
|
+
return We(t, {
|
|
4282
4282
|
item: n.item,
|
|
4283
4283
|
className: e.b(),
|
|
4284
4284
|
controller: n.controller,
|
|
@@ -4605,7 +4605,7 @@ function Ua(n, e) {
|
|
|
4605
4605
|
function qa(n, e) {
|
|
4606
4606
|
this.props = n, this.context = e;
|
|
4607
4607
|
}
|
|
4608
|
-
(qa.prototype = new
|
|
4608
|
+
(qa.prototype = new Ue()).isPureReactComponent = !0, qa.prototype.shouldComponentUpdate = function(n, e) {
|
|
4609
4609
|
return Ua(this.props, n) || Ua(this.state, e);
|
|
4610
4610
|
};
|
|
4611
4611
|
var Ka = P.__b;
|
|
@@ -4655,7 +4655,7 @@ function ui() {
|
|
|
4655
4655
|
P.unmount = function(n) {
|
|
4656
4656
|
var e = n.__c;
|
|
4657
4657
|
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), Ja && Ja(n);
|
|
4658
|
-
}, (Fr.prototype = new
|
|
4658
|
+
}, (Fr.prototype = new Ue()).__c = function(n, e) {
|
|
4659
4659
|
var t = e.__c, i = this;
|
|
4660
4660
|
i.o == null && (i.o = []), i.o.push(t);
|
|
4661
4661
|
var r = Zu(i.__v), s = !1, o = function() {
|
|
@@ -4684,8 +4684,8 @@ P.unmount = function(n) {
|
|
|
4684
4684
|
}
|
|
4685
4685
|
this.__b = null;
|
|
4686
4686
|
}
|
|
4687
|
-
var r = e.__a &&
|
|
4688
|
-
return r && (r.__u &= -33), [
|
|
4687
|
+
var r = e.__a && We(qe, null, n.fallback);
|
|
4688
|
+
return r && (r.__u &= -33), [We(qe, null, e.__a ? null : n.children), r];
|
|
4689
4689
|
};
|
|
4690
4690
|
var Ga = function(n, e, t) {
|
|
4691
4691
|
if (++t[1] === t[0] && n.l.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.l.size))
|
|
@@ -4717,13 +4717,13 @@ function Kg(n) {
|
|
|
4717
4717
|
this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), e.h.removeChild(r);
|
|
4718
4718
|
} };
|
|
4719
4719
|
}
|
|
4720
|
-
Et(
|
|
4720
|
+
Et(We(qg, { context: e.context }, n.__v), e.v);
|
|
4721
4721
|
}
|
|
4722
4722
|
function Jg(n, e) {
|
|
4723
|
-
var t =
|
|
4723
|
+
var t = We(Kg, { __v: n, h: e });
|
|
4724
4724
|
return t.containerInfo = e, t;
|
|
4725
4725
|
}
|
|
4726
|
-
(ui.prototype = new
|
|
4726
|
+
(ui.prototype = new Ue()).__a = function(n) {
|
|
4727
4727
|
var e = this, t = Zu(e.__v), i = e.l.get(n);
|
|
4728
4728
|
return i[0]++, function(r) {
|
|
4729
4729
|
var s = function() {
|
|
@@ -4747,8 +4747,8 @@ function Jg(n, e) {
|
|
|
4747
4747
|
var Gg = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Xg = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Yg = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Zg = /[A-Z0-9]/g, Qg = typeof document < "u", e2 = function(n) {
|
|
4748
4748
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
4749
4749
|
};
|
|
4750
|
-
|
|
4751
|
-
Object.defineProperty(
|
|
4750
|
+
Ue.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
4751
|
+
Object.defineProperty(Ue.prototype, n, { configurable: !0, get: function() {
|
|
4752
4752
|
return this["UNSAFE_" + n];
|
|
4753
4753
|
}, set: function(e) {
|
|
4754
4754
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
@@ -4956,8 +4956,8 @@ const di = new z("messsage-toolbar"), s2 = (n) => {
|
|
|
4956
4956
|
}
|
|
4957
4957
|
}
|
|
4958
4958
|
) : /* @__PURE__ */ p("img", { src: h.icon.imagePath });
|
|
4959
|
-
}, u =
|
|
4960
|
-
return u ? /* @__PURE__ */ p(
|
|
4959
|
+
}, u = De(() => t.state === 20 && t.completed !== !0, [t.state, t.completed]), d = e.resourceMode !== "REMOTE" || e.currentTopicDisableStorage;
|
|
4960
|
+
return u ? /* @__PURE__ */ p(qe, {}) : /* @__PURE__ */ p("div", { className: "".concat(di.b()), children: [
|
|
4961
4961
|
/* @__PURE__ */ p(
|
|
4962
4962
|
wo,
|
|
4963
4963
|
{
|
|
@@ -5127,7 +5127,7 @@ const fi = new z("chat-switch"), a2 = (n) => {
|
|
|
5127
5127
|
] }) : void 0
|
|
5128
5128
|
] });
|
|
5129
5129
|
};
|
|
5130
|
-
const
|
|
5130
|
+
const Fe = new z("chat-step-item"), l2 = (n) => {
|
|
5131
5131
|
const { element: e } = n, [t, i] = j(e.title), [r, s] = j(!1), [o, a] = j(!1), [l, c] = j(0), u = $(e.content), d = $([]), h = $({
|
|
5132
5132
|
title: k.t.value("thinkThrough"),
|
|
5133
5133
|
description: "",
|
|
@@ -5179,10 +5179,10 @@ const Be = new z("chat-step-item"), l2 = (n) => {
|
|
|
5179
5179
|
"div",
|
|
5180
5180
|
{
|
|
5181
5181
|
ref: f,
|
|
5182
|
-
className: "".concat(
|
|
5182
|
+
className: "".concat(Fe.b()),
|
|
5183
5183
|
style: { "--ibiz-chat-step-item-height": "".concat(l, "px") },
|
|
5184
5184
|
children: [
|
|
5185
|
-
/* @__PURE__ */ p("div", { className: "".concat(
|
|
5185
|
+
/* @__PURE__ */ p("div", { className: "".concat(Fe.e("left")), children: /* @__PURE__ */ p("div", { className: "".concat(Fe.e("icon")), children: [
|
|
5186
5186
|
e.status === "success" && /* @__PURE__ */ p(Eg, {}),
|
|
5187
5187
|
e.status === "failed" && /* @__PURE__ */ p(Ng, {}),
|
|
5188
5188
|
e.status === "pending" && /* @__PURE__ */ p(hg, {})
|
|
@@ -5190,17 +5190,17 @@ const Be = new z("chat-step-item"), l2 = (n) => {
|
|
|
5190
5190
|
/* @__PURE__ */ p(
|
|
5191
5191
|
"div",
|
|
5192
5192
|
{
|
|
5193
|
-
className: "".concat(
|
|
5193
|
+
className: "".concat(Fe.e("right"), " ").concat(e.status === "pending" ? "is-loadding" : ""),
|
|
5194
5194
|
children: [
|
|
5195
|
-
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
5196
|
-
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
5195
|
+
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(Fe.e("title")), title: t, children: t }),
|
|
5196
|
+
e.status !== "pending" && /* @__PURE__ */ p("div", { className: "".concat(Fe.e("content")), children: [
|
|
5197
5197
|
/* @__PURE__ */ p(
|
|
5198
5198
|
"div",
|
|
5199
5199
|
{
|
|
5200
5200
|
ref: m,
|
|
5201
|
-
className: "".concat(
|
|
5201
|
+
className: "".concat(Fe.e("content-text"), " ").concat(o ? "expanded" : ""),
|
|
5202
5202
|
children: [
|
|
5203
|
-
d.value.length > 0 && o && /* @__PURE__ */ p("div", { className: "".concat(
|
|
5203
|
+
d.value.length > 0 && o && /* @__PURE__ */ p("div", { className: "".concat(Fe.e("content-tool-call-container")), children: /* @__PURE__ */ p(
|
|
5204
5204
|
qu,
|
|
5205
5205
|
{
|
|
5206
5206
|
toolcallCompleted: !0,
|
|
@@ -5210,7 +5210,7 @@ const Be = new z("chat-step-item"), l2 = (n) => {
|
|
|
5210
5210
|
onCollapseChange: C
|
|
5211
5211
|
}
|
|
5212
5212
|
) }),
|
|
5213
|
-
h.value.description && o && /* @__PURE__ */ p("div", { className: "".concat(
|
|
5213
|
+
h.value.description && o && /* @__PURE__ */ p("div", { className: "".concat(Fe.e("content-think-container")), children: /* @__PURE__ */ p(
|
|
5214
5214
|
Uu,
|
|
5215
5215
|
{
|
|
5216
5216
|
item: h.value,
|
|
@@ -5224,7 +5224,7 @@ const Be = new z("chat-step-item"), l2 = (n) => {
|
|
|
5224
5224
|
r && /* @__PURE__ */ p(
|
|
5225
5225
|
"button",
|
|
5226
5226
|
{
|
|
5227
|
-
className: "".concat(
|
|
5227
|
+
className: "".concat(Fe.e("toggle-btn")),
|
|
5228
5228
|
onClick: () => {
|
|
5229
5229
|
w();
|
|
5230
5230
|
},
|
|
@@ -5232,7 +5232,7 @@ const Be = new z("chat-step-item"), l2 = (n) => {
|
|
|
5232
5232
|
}
|
|
5233
5233
|
)
|
|
5234
5234
|
] }),
|
|
5235
|
-
e.status === "pending" && /* @__PURE__ */ p("div", { className: "".concat(
|
|
5235
|
+
e.status === "pending" && /* @__PURE__ */ p("div", { className: "".concat(Fe.e("loadding-text")), children: k.t.value("loading") })
|
|
5236
5236
|
]
|
|
5237
5237
|
}
|
|
5238
5238
|
)
|
|
@@ -5348,7 +5348,7 @@ const Xt = new z("common-material"), d2 = (n) => {
|
|
|
5348
5348
|
}
|
|
5349
5349
|
};
|
|
5350
5350
|
return /* @__PURE__ */ p("div", { className: Xt.b(), children: [
|
|
5351
|
-
/* @__PURE__ */ p("div", { className: Xt.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((o = e.icon) == null ? void 0 : o.showIcon) && /* @__PURE__ */ p(
|
|
5351
|
+
/* @__PURE__ */ p("div", { className: Xt.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((o = e.icon) == null ? void 0 : o.showIcon) && /* @__PURE__ */ p(qe, { children: (a = e.icon) != null && a.cssClass ? /* @__PURE__ */ p("i", { className: e.icon.cssClass }) : (l = e.icon) != null && l.imagePath ? nr(e.icon.imagePath) ? /* @__PURE__ */ p(
|
|
5352
5352
|
"div",
|
|
5353
5353
|
{
|
|
5354
5354
|
dangerouslySetInnerHTML: {
|
|
@@ -5388,14 +5388,14 @@ const Vr = new z("chat-input-material-item"), Co = (n) => {
|
|
|
5388
5388
|
};
|
|
5389
5389
|
return /* @__PURE__ */ p("div", { className: "".concat(Vr.b(), " ").concat(Vr.is("disabled", n.disabled)), children: [
|
|
5390
5390
|
/* @__PURE__ */ p("div", { className: Vr.e("icon"), onClick: i, children: /* @__PURE__ */ p(mg, {}) }),
|
|
5391
|
-
|
|
5391
|
+
We(t, {
|
|
5392
5392
|
material: e,
|
|
5393
5393
|
controller: n.controller
|
|
5394
5394
|
})
|
|
5395
5395
|
] });
|
|
5396
5396
|
};
|
|
5397
5397
|
const Tt = new z("markdown-message"), h2 = (n) => {
|
|
5398
|
-
const { message: e, size: t } = n, i = $(
|
|
5398
|
+
const { message: e, size: t } = n, i = $(Ae()), r = $(null), s = $({ resources: [], remainingText: "", hasResources: !1 }), o = (g) => {
|
|
5399
5399
|
const { resources: y, remainingText: w, hasResources: C, error: x } = Nn.parseMixedContent(g);
|
|
5400
5400
|
s.value = {
|
|
5401
5401
|
resources: y,
|
|
@@ -5403,7 +5403,7 @@ const Tt = new z("markdown-message"), h2 = (n) => {
|
|
|
5403
5403
|
hasResources: C,
|
|
5404
5404
|
error: x
|
|
5405
5405
|
};
|
|
5406
|
-
}, a =
|
|
5406
|
+
}, a = De(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), l = De(() => e.state === 20 && e.completed === !0, [e.state, e.completed]);
|
|
5407
5407
|
e.think || (e.think = {
|
|
5408
5408
|
title: "",
|
|
5409
5409
|
description: "",
|
|
@@ -8446,15 +8446,15 @@ class Rs {
|
|
|
8446
8446
|
return (this.delInfo & Ei) > 0;
|
|
8447
8447
|
}
|
|
8448
8448
|
}
|
|
8449
|
-
class
|
|
8449
|
+
class Ie {
|
|
8450
8450
|
/**
|
|
8451
8451
|
Create a position map. The modifications to the document are
|
|
8452
8452
|
represented as an array of numbers, in which each group of three
|
|
8453
8453
|
represents a modified chunk as `[start, oldSize, newSize]`.
|
|
8454
8454
|
*/
|
|
8455
8455
|
constructor(e, t = !1) {
|
|
8456
|
-
if (this.ranges = e, this.inverted = t, !e.length &&
|
|
8457
|
-
return
|
|
8456
|
+
if (this.ranges = e, this.inverted = t, !e.length && Ie.empty)
|
|
8457
|
+
return Ie.empty;
|
|
8458
8458
|
}
|
|
8459
8459
|
/**
|
|
8460
8460
|
@internal
|
|
@@ -8525,7 +8525,7 @@ class Ae {
|
|
|
8525
8525
|
map positions in the post-step document to the pre-step document.
|
|
8526
8526
|
*/
|
|
8527
8527
|
invert() {
|
|
8528
|
-
return new
|
|
8528
|
+
return new Ie(this.ranges, !this.inverted);
|
|
8529
8529
|
}
|
|
8530
8530
|
/**
|
|
8531
8531
|
@internal
|
|
@@ -8539,10 +8539,10 @@ class Ae {
|
|
|
8539
8539
|
sub-document to a larger document, or vice-versa.
|
|
8540
8540
|
*/
|
|
8541
8541
|
static offset(e) {
|
|
8542
|
-
return e == 0 ?
|
|
8542
|
+
return e == 0 ? Ie.empty : new Ie(e < 0 ? [0, -e, 0] : [0, 0, e]);
|
|
8543
8543
|
}
|
|
8544
8544
|
}
|
|
8545
|
-
|
|
8545
|
+
Ie.empty = new Ie([]);
|
|
8546
8546
|
class Fn {
|
|
8547
8547
|
/**
|
|
8548
8548
|
Create a new mapping with the given position maps.
|
|
@@ -8658,7 +8658,7 @@ class Ce {
|
|
|
8658
8658
|
and the new document.
|
|
8659
8659
|
*/
|
|
8660
8660
|
getMap() {
|
|
8661
|
-
return
|
|
8661
|
+
return Ie.empty;
|
|
8662
8662
|
}
|
|
8663
8663
|
/**
|
|
8664
8664
|
Try to merge this step with another one, to be applied directly
|
|
@@ -8746,7 +8746,7 @@ class ft extends Ce {
|
|
|
8746
8746
|
return te.fromReplace(e, this.from, this.to, s);
|
|
8747
8747
|
}
|
|
8748
8748
|
invert() {
|
|
8749
|
-
return new
|
|
8749
|
+
return new je(this.from, this.to, this.mark);
|
|
8750
8750
|
}
|
|
8751
8751
|
map(e) {
|
|
8752
8752
|
let t = e.mapResult(this.from, 1), i = e.mapResult(this.to, -1);
|
|
@@ -8773,7 +8773,7 @@ class ft extends Ce {
|
|
|
8773
8773
|
}
|
|
8774
8774
|
}
|
|
8775
8775
|
Ce.jsonID("addMark", ft);
|
|
8776
|
-
class
|
|
8776
|
+
class je extends Ce {
|
|
8777
8777
|
/**
|
|
8778
8778
|
Create a mark-removing step.
|
|
8779
8779
|
*/
|
|
@@ -8789,10 +8789,10 @@ class He extends Ce {
|
|
|
8789
8789
|
}
|
|
8790
8790
|
map(e) {
|
|
8791
8791
|
let t = e.mapResult(this.from, 1), i = e.mapResult(this.to, -1);
|
|
8792
|
-
return t.deleted && i.deleted || t.pos >= i.pos ? null : new
|
|
8792
|
+
return t.deleted && i.deleted || t.pos >= i.pos ? null : new je(t.pos, i.pos, this.mark);
|
|
8793
8793
|
}
|
|
8794
8794
|
merge(e) {
|
|
8795
|
-
return e instanceof
|
|
8795
|
+
return e instanceof je && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new je(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
8796
8796
|
}
|
|
8797
8797
|
toJSON() {
|
|
8798
8798
|
return {
|
|
@@ -8808,10 +8808,10 @@ class He extends Ce {
|
|
|
8808
8808
|
static fromJSON(e, t) {
|
|
8809
8809
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
8810
8810
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
8811
|
-
return new
|
|
8811
|
+
return new je(t.from, t.to, e.markFromJSON(t.mark));
|
|
8812
8812
|
}
|
|
8813
8813
|
}
|
|
8814
|
-
Ce.jsonID("removeMark",
|
|
8814
|
+
Ce.jsonID("removeMark", je);
|
|
8815
8815
|
class pt extends Ce {
|
|
8816
8816
|
/**
|
|
8817
8817
|
Create a node mark step.
|
|
@@ -8908,7 +8908,7 @@ class ae extends Ce {
|
|
|
8908
8908
|
return this.structure && Ls(e, this.from, this.to) ? te.fail("Structure replace would overwrite content") : te.fromReplace(e, this.from, this.to, this.slice);
|
|
8909
8909
|
}
|
|
8910
8910
|
getMap() {
|
|
8911
|
-
return new
|
|
8911
|
+
return new Ie([this.from, this.to - this.from, this.slice.size]);
|
|
8912
8912
|
}
|
|
8913
8913
|
invert(e) {
|
|
8914
8914
|
return new ae(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
@@ -8963,7 +8963,7 @@ class ce extends Ce {
|
|
|
8963
8963
|
return i ? te.fromReplace(e, this.from, this.to, i) : te.fail("Content does not fit in gap");
|
|
8964
8964
|
}
|
|
8965
8965
|
getMap() {
|
|
8966
|
-
return new
|
|
8966
|
+
return new Ie([
|
|
8967
8967
|
this.from,
|
|
8968
8968
|
this.gapFrom - this.from,
|
|
8969
8969
|
this.insert,
|
|
@@ -9024,7 +9024,7 @@ function z2(n, e, t, i) {
|
|
|
9024
9024
|
if (!i.isInSet(d) && u.type.allowsMarkType(i.type)) {
|
|
9025
9025
|
let h = Math.max(c, e), f = Math.min(c + l.nodeSize, t), m = i.addToSet(d);
|
|
9026
9026
|
for (let v = 0; v < d.length; v++)
|
|
9027
|
-
d[v].isInSet(m) || (o && o.to == h && o.mark.eq(d[v]) ? o.to = f : r.push(o = new
|
|
9027
|
+
d[v].isInSet(m) || (o && o.to == h && o.mark.eq(d[v]) ? o.to = f : r.push(o = new je(h, f, d[v])));
|
|
9028
9028
|
a && a.to == h ? a.to = f : s.push(a = new ft(h, f, i));
|
|
9029
9029
|
}
|
|
9030
9030
|
}), r.forEach((l) => n.step(l)), s.forEach((l) => n.step(l));
|
|
@@ -9053,7 +9053,7 @@ function B2(n, e, t, i) {
|
|
|
9053
9053
|
h ? (h.to = c, h.step = s) : r.push({ style: d, from: Math.max(a, e), to: c, step: s });
|
|
9054
9054
|
}
|
|
9055
9055
|
}
|
|
9056
|
-
}), r.forEach((o) => n.step(new
|
|
9056
|
+
}), r.forEach((o) => n.step(new je(o.from, o.to, o.style)));
|
|
9057
9057
|
}
|
|
9058
9058
|
function xo(n, e, t, i = t.contentMatch, r = !0) {
|
|
9059
9059
|
let s = n.doc.nodeAt(e), o = [], a = e + 1;
|
|
@@ -9064,7 +9064,7 @@ function xo(n, e, t, i = t.contentMatch, r = !0) {
|
|
|
9064
9064
|
else {
|
|
9065
9065
|
i = d;
|
|
9066
9066
|
for (let h = 0; h < c.marks.length; h++)
|
|
9067
|
-
t.allowsMarkType(c.marks[h].type) || n.step(new
|
|
9067
|
+
t.allowsMarkType(c.marks[h].type) || n.step(new je(a, u, c.marks[h]));
|
|
9068
9068
|
if (r && c.isText && t.whitespace != "pre") {
|
|
9069
9069
|
let h, f = /\r?\n|\r/g, m;
|
|
9070
9070
|
for (; h = f.exec(c.text); )
|
|
@@ -9607,7 +9607,7 @@ class ln extends Ce {
|
|
|
9607
9607
|
return te.fromReplace(e, this.pos, this.pos + 1, new _(S.from(r), 0, t.isLeaf ? 0 : 1));
|
|
9608
9608
|
}
|
|
9609
9609
|
getMap() {
|
|
9610
|
-
return
|
|
9610
|
+
return Ie.empty;
|
|
9611
9611
|
}
|
|
9612
9612
|
invert(e) {
|
|
9613
9613
|
return new ln(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
@@ -9642,7 +9642,7 @@ class Vn extends Ce {
|
|
|
9642
9642
|
return te.ok(i);
|
|
9643
9643
|
}
|
|
9644
9644
|
getMap() {
|
|
9645
|
-
return
|
|
9645
|
+
return Ie.empty;
|
|
9646
9646
|
}
|
|
9647
9647
|
invert(e) {
|
|
9648
9648
|
return new Vn(this.attr, e.attrs[this.attr]);
|
|
@@ -10005,7 +10005,7 @@ class B {
|
|
|
10005
10005
|
negative, it will search backwards first.
|
|
10006
10006
|
*/
|
|
10007
10007
|
static near(e, t = 1) {
|
|
10008
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
10008
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new Re(e.node(0));
|
|
10009
10009
|
}
|
|
10010
10010
|
/**
|
|
10011
10011
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -10014,14 +10014,14 @@ class B {
|
|
|
10014
10014
|
exists.
|
|
10015
10015
|
*/
|
|
10016
10016
|
static atStart(e) {
|
|
10017
|
-
return en(e, e, 0, 0, 1) || new
|
|
10017
|
+
return en(e, e, 0, 0, 1) || new Re(e);
|
|
10018
10018
|
}
|
|
10019
10019
|
/**
|
|
10020
10020
|
Find the cursor or leaf node selection closest to the end of the
|
|
10021
10021
|
given document.
|
|
10022
10022
|
*/
|
|
10023
10023
|
static atEnd(e) {
|
|
10024
|
-
return en(e, e, e.content.size, e.childCount, -1) || new
|
|
10024
|
+
return en(e, e, e.content.size, e.childCount, -1) || new Re(e);
|
|
10025
10025
|
}
|
|
10026
10026
|
/**
|
|
10027
10027
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -10217,7 +10217,7 @@ class So {
|
|
|
10217
10217
|
return i && D.isSelectable(i) ? new D(t) : B.near(t);
|
|
10218
10218
|
}
|
|
10219
10219
|
}
|
|
10220
|
-
class
|
|
10220
|
+
class Re extends B {
|
|
10221
10221
|
/**
|
|
10222
10222
|
Create an all-selection over the given document.
|
|
10223
10223
|
*/
|
|
@@ -10239,25 +10239,25 @@ class Pe extends B {
|
|
|
10239
10239
|
@internal
|
|
10240
10240
|
*/
|
|
10241
10241
|
static fromJSON(e) {
|
|
10242
|
-
return new
|
|
10242
|
+
return new Re(e);
|
|
10243
10243
|
}
|
|
10244
10244
|
map(e) {
|
|
10245
|
-
return new
|
|
10245
|
+
return new Re(e);
|
|
10246
10246
|
}
|
|
10247
10247
|
eq(e) {
|
|
10248
|
-
return e instanceof
|
|
10248
|
+
return e instanceof Re;
|
|
10249
10249
|
}
|
|
10250
10250
|
getBookmark() {
|
|
10251
10251
|
return s6;
|
|
10252
10252
|
}
|
|
10253
10253
|
}
|
|
10254
|
-
B.jsonID("all",
|
|
10254
|
+
B.jsonID("all", Re);
|
|
10255
10255
|
const s6 = {
|
|
10256
10256
|
map() {
|
|
10257
10257
|
return this;
|
|
10258
10258
|
},
|
|
10259
10259
|
resolve(n) {
|
|
10260
|
-
return new
|
|
10260
|
+
return new Re(n);
|
|
10261
10261
|
}
|
|
10262
10262
|
};
|
|
10263
10263
|
function en(n, e, t, i, r, s = !1) {
|
|
@@ -10905,7 +10905,7 @@ const b6 = (n, e) => {
|
|
|
10905
10905
|
return !0;
|
|
10906
10906
|
}, w6 = (n, e) => {
|
|
10907
10907
|
let t = n.selection, { $from: i, $to: r } = t;
|
|
10908
|
-
if (t instanceof
|
|
10908
|
+
if (t instanceof Re || i.parent.inlineContent || r.parent.inlineContent)
|
|
10909
10909
|
return !1;
|
|
10910
10910
|
let s = Ld(r.parent.contentMatchAt(r.indexAfter()));
|
|
10911
10911
|
if (!s || !s.isTextblock)
|
|
@@ -11123,7 +11123,7 @@ function kl(n, e, t, i, r) {
|
|
|
11123
11123
|
for (var s; ; ) {
|
|
11124
11124
|
if (n == t && e == i)
|
|
11125
11125
|
return !0;
|
|
11126
|
-
if (e == (r < 0 ? 0 :
|
|
11126
|
+
if (e == (r < 0 ? 0 : Pe(n))) {
|
|
11127
11127
|
let o = n.parentNode;
|
|
11128
11128
|
if (!o || o.nodeType != 1 || Yn(n) || P6.test(n.nodeName) || n.contentEditable == "false")
|
|
11129
11129
|
return !1;
|
|
@@ -11136,12 +11136,12 @@ function kl(n, e, t, i, r) {
|
|
|
11136
11136
|
else
|
|
11137
11137
|
return !1;
|
|
11138
11138
|
else
|
|
11139
|
-
n = o, e = r < 0 ?
|
|
11139
|
+
n = o, e = r < 0 ? Pe(n) : 0;
|
|
11140
11140
|
} else
|
|
11141
11141
|
return !1;
|
|
11142
11142
|
}
|
|
11143
11143
|
}
|
|
11144
|
-
function
|
|
11144
|
+
function Pe(n) {
|
|
11145
11145
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
11146
11146
|
}
|
|
11147
11147
|
function R6(n, e) {
|
|
@@ -11151,7 +11151,7 @@ function R6(n, e) {
|
|
|
11151
11151
|
if (n.nodeType == 1 && e > 0) {
|
|
11152
11152
|
if (n.contentEditable == "false")
|
|
11153
11153
|
return null;
|
|
11154
|
-
n = n.childNodes[e - 1], e =
|
|
11154
|
+
n = n.childNodes[e - 1], e = Pe(n);
|
|
11155
11155
|
} else if (n.parentNode && !Yn(n))
|
|
11156
11156
|
e = fe(n), n = n.parentNode;
|
|
11157
11157
|
else
|
|
@@ -11173,13 +11173,13 @@ function L6(n, e) {
|
|
|
11173
11173
|
}
|
|
11174
11174
|
}
|
|
11175
11175
|
function z6(n, e, t) {
|
|
11176
|
-
for (let i = e == 0, r = e ==
|
|
11176
|
+
for (let i = e == 0, r = e == Pe(n); i || r; ) {
|
|
11177
11177
|
if (n == t)
|
|
11178
11178
|
return !0;
|
|
11179
11179
|
let s = fe(n);
|
|
11180
11180
|
if (n = n.parentNode, !n)
|
|
11181
11181
|
return !1;
|
|
11182
|
-
i = i && s == 0, r = r && s ==
|
|
11182
|
+
i = i && s == 0, r = r && s == Pe(n);
|
|
11183
11183
|
}
|
|
11184
11184
|
}
|
|
11185
11185
|
function Yn(n) {
|
|
@@ -11206,18 +11206,18 @@ function F6(n, e, t) {
|
|
|
11206
11206
|
try {
|
|
11207
11207
|
let i = n.caretPositionFromPoint(e, t);
|
|
11208
11208
|
if (i)
|
|
11209
|
-
return { node: i.offsetNode, offset: Math.min(
|
|
11209
|
+
return { node: i.offsetNode, offset: Math.min(Pe(i.offsetNode), i.offset) };
|
|
11210
11210
|
} catch (i) {
|
|
11211
11211
|
}
|
|
11212
11212
|
if (n.caretRangeFromPoint) {
|
|
11213
11213
|
let i = n.caretRangeFromPoint(e, t);
|
|
11214
11214
|
if (i)
|
|
11215
|
-
return { node: i.startContainer, offset: Math.min(
|
|
11215
|
+
return { node: i.startContainer, offset: Math.min(Pe(i.startContainer), i.startOffset) };
|
|
11216
11216
|
}
|
|
11217
11217
|
}
|
|
11218
|
-
const Ye = typeof navigator < "u" ? navigator : null, xl = typeof document < "u" ? document : null, xt = Ye && Ye.userAgent || "", Bs = /Edge\/(\d+)/.exec(xt), Fd = /MSIE \d/.exec(xt), Fs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xt), Ne = !!(Fd || Fs || Bs), vt = Fd ? document.documentMode : Fs ? +Fs[1] : Bs ? +Bs[1] : 0,
|
|
11219
|
-
|
|
11220
|
-
const Vs = !Ne && /Chrome\/(\d+)/.exec(xt), le = !!Vs, Vd = Vs ? +Vs[1] : 0, we = !Ne && !!Ye && /Apple Computer/.test(Ye.vendor), mn = we && (/Mobile\/\w+/.test(xt) || !!Ye && Ye.maxTouchPoints > 2),
|
|
11218
|
+
const Ye = typeof navigator < "u" ? navigator : null, xl = typeof document < "u" ? document : null, xt = Ye && Ye.userAgent || "", Bs = /Edge\/(\d+)/.exec(xt), Fd = /MSIE \d/.exec(xt), Fs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xt), Ne = !!(Fd || Fs || Bs), vt = Fd ? document.documentMode : Fs ? +Fs[1] : Bs ? +Bs[1] : 0, Le = !Ne && /gecko\/(\d+)/i.test(xt);
|
|
11219
|
+
Le && +(/Firefox\/(\d+)/.exec(xt) || [0, 0])[1];
|
|
11220
|
+
const Vs = !Ne && /Chrome\/(\d+)/.exec(xt), le = !!Vs, Vd = Vs ? +Vs[1] : 0, we = !Ne && !!Ye && /Apple Computer/.test(Ye.vendor), mn = we && (/Mobile\/\w+/.test(xt) || !!Ye && Ye.maxTouchPoints > 2), $e = mn || (Ye ? /Mac/.test(Ye.platform) : !1), Hd = Ye ? /Win/.test(Ye.platform) : !1, it = /Android \d/.test(xt), Zn = !!xl && "webkitFontSmoothing" in xl.documentElement.style, V6 = Zn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
11221
11221
|
function H6(n) {
|
|
11222
11222
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
11223
11223
|
return e ? {
|
|
@@ -11410,7 +11410,7 @@ function Y6(n, e) {
|
|
|
11410
11410
|
for (let c = o; i && c; c = pn(c))
|
|
11411
11411
|
c.draggable && (i = void 0);
|
|
11412
11412
|
if (o = J6(o, e), i) {
|
|
11413
|
-
if (
|
|
11413
|
+
if (Le && i.nodeType == 1 && (r = Math.min(r, i.childNodes.length), r < i.childNodes.length)) {
|
|
11414
11414
|
let u = i.childNodes[r], d;
|
|
11415
11415
|
u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && r++;
|
|
11416
11416
|
}
|
|
@@ -11435,11 +11435,11 @@ function ct(n, e) {
|
|
|
11435
11435
|
}
|
|
11436
11436
|
const Z6 = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
11437
11437
|
function Kd(n, e, t) {
|
|
11438
|
-
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Zn ||
|
|
11438
|
+
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Zn || Le;
|
|
11439
11439
|
if (i.nodeType == 3)
|
|
11440
11440
|
if (o && (Z6.test(i.nodeValue) || (t < 0 ? !r : r == i.nodeValue.length))) {
|
|
11441
11441
|
let l = ct(tt(i, r, r), t);
|
|
11442
|
-
if (
|
|
11442
|
+
if (Le && r && /\s/.test(i.nodeValue[r - 1]) && r < i.nodeValue.length) {
|
|
11443
11443
|
let c = ct(tt(i, r - 1, r - 1), -1);
|
|
11444
11444
|
if (c.top == l.top) {
|
|
11445
11445
|
let u = ct(tt(i, r, r + 1), -1);
|
|
@@ -11453,24 +11453,24 @@ function Kd(n, e, t) {
|
|
|
11453
11453
|
return t < 0 && !r ? (c++, u = -1) : t >= 0 && r == i.nodeValue.length ? (l--, u = 1) : t < 0 ? l-- : c++, xn(ct(tt(i, l, c), u), u < 0);
|
|
11454
11454
|
}
|
|
11455
11455
|
if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
11456
|
-
if (s == null && r && (t < 0 || r ==
|
|
11456
|
+
if (s == null && r && (t < 0 || r == Pe(i))) {
|
|
11457
11457
|
let l = i.childNodes[r - 1];
|
|
11458
11458
|
if (l.nodeType == 1)
|
|
11459
11459
|
return Xr(l.getBoundingClientRect(), !1);
|
|
11460
11460
|
}
|
|
11461
|
-
if (s == null && r <
|
|
11461
|
+
if (s == null && r < Pe(i)) {
|
|
11462
11462
|
let l = i.childNodes[r];
|
|
11463
11463
|
if (l.nodeType == 1)
|
|
11464
11464
|
return Xr(l.getBoundingClientRect(), !0);
|
|
11465
11465
|
}
|
|
11466
11466
|
return Xr(i.getBoundingClientRect(), t >= 0);
|
|
11467
11467
|
}
|
|
11468
|
-
if (s == null && r && (t < 0 || r ==
|
|
11469
|
-
let l = i.childNodes[r - 1], c = l.nodeType == 3 ? tt(l,
|
|
11468
|
+
if (s == null && r && (t < 0 || r == Pe(i))) {
|
|
11469
|
+
let l = i.childNodes[r - 1], c = l.nodeType == 3 ? tt(l, Pe(l) - (o ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
11470
11470
|
if (c)
|
|
11471
11471
|
return xn(ct(c, 1), !1);
|
|
11472
11472
|
}
|
|
11473
|
-
if (s == null && r <
|
|
11473
|
+
if (s == null && r < Pe(i)) {
|
|
11474
11474
|
let l = i.childNodes[r];
|
|
11475
11475
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
11476
11476
|
l = l.nextSibling;
|
|
@@ -11554,10 +11554,10 @@ let Ml = null, _l = null, Nl = !1;
|
|
|
11554
11554
|
function n3(n, e, t) {
|
|
11555
11555
|
return Ml == e && _l == t ? Nl : (Ml = e, _l = t, Nl = t == "up" || t == "down" ? Q6(n, e, t) : t3(n, e, t));
|
|
11556
11556
|
}
|
|
11557
|
-
const
|
|
11557
|
+
const ze = 0, El = 1, At = 2, Ze = 3;
|
|
11558
11558
|
class Qn {
|
|
11559
11559
|
constructor(e, t, i, r) {
|
|
11560
|
-
this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty =
|
|
11560
|
+
this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty = ze, i.pmViewDesc = this;
|
|
11561
11561
|
}
|
|
11562
11562
|
// Used to check whether a given description corresponds to a
|
|
11563
11563
|
// widget/mark/node.
|
|
@@ -11814,7 +11814,7 @@ class Qn {
|
|
|
11814
11814
|
m = b;
|
|
11815
11815
|
}
|
|
11816
11816
|
let a = this.domFromPos(e, e ? -1 : 1), l = t == e ? a : this.domFromPos(t, t ? -1 : 1), c = i.root.getSelection(), u = i.domSelectionRange(), d = !1;
|
|
11817
|
-
if ((
|
|
11817
|
+
if ((Le || we) && e == t) {
|
|
11818
11818
|
let { node: f, offset: m } = a;
|
|
11819
11819
|
if (f.nodeType == 3) {
|
|
11820
11820
|
if (d = !!(m && f.nodeValue[m - 1] == "\n"), d && m == f.nodeValue.length)
|
|
@@ -11832,14 +11832,14 @@ class Qn {
|
|
|
11832
11832
|
d = v && (v.nodeName == "BR" || v.contentEditable == "false");
|
|
11833
11833
|
}
|
|
11834
11834
|
}
|
|
11835
|
-
if (
|
|
11835
|
+
if (Le && u.focusNode && u.focusNode != l.node && u.focusNode.nodeType == 1) {
|
|
11836
11836
|
let f = u.focusNode.childNodes[u.focusOffset];
|
|
11837
11837
|
f && f.contentEditable == "false" && (r = !0);
|
|
11838
11838
|
}
|
|
11839
11839
|
if (!(r || d && we) && Ht(a.node, a.offset, u.anchorNode, u.anchorOffset) && Ht(l.node, l.offset, u.focusNode, u.focusOffset))
|
|
11840
11840
|
return;
|
|
11841
11841
|
let h = !1;
|
|
11842
|
-
if ((c.extend || e == t) && !(d &&
|
|
11842
|
+
if ((c.extend || e == t) && !(d && Le)) {
|
|
11843
11843
|
c.collapse(a.node, a.offset);
|
|
11844
11844
|
try {
|
|
11845
11845
|
e != t && c.extend(l.node, l.offset), h = !0;
|
|
@@ -11916,7 +11916,7 @@ class Gd extends Qn {
|
|
|
11916
11916
|
super(e, [], o, null), this.widget = t, this.widget = t, s = this;
|
|
11917
11917
|
}
|
|
11918
11918
|
matchesWidget(e) {
|
|
11919
|
-
return this.dirty ==
|
|
11919
|
+
return this.dirty == ze && e.type.eq(this.widget.type);
|
|
11920
11920
|
}
|
|
11921
11921
|
parseRule() {
|
|
11922
11922
|
return { ignore: !0 };
|
|
@@ -11973,11 +11973,11 @@ class jt extends Qn {
|
|
|
11973
11973
|
return this.dirty != Ze && this.mark.eq(e);
|
|
11974
11974
|
}
|
|
11975
11975
|
markDirty(e, t) {
|
|
11976
|
-
if (super.markDirty(e, t), this.dirty !=
|
|
11976
|
+
if (super.markDirty(e, t), this.dirty != ze) {
|
|
11977
11977
|
let i = this.parent;
|
|
11978
11978
|
for (; !i.node; )
|
|
11979
11979
|
i = i.parent;
|
|
11980
|
-
i.dirty < this.dirty && (i.dirty = this.dirty), this.dirty =
|
|
11980
|
+
i.dirty < this.dirty && (i.dirty = this.dirty), this.dirty = ze;
|
|
11981
11981
|
}
|
|
11982
11982
|
}
|
|
11983
11983
|
slice(e, t, i) {
|
|
@@ -12046,7 +12046,7 @@ class yt extends Qn {
|
|
|
12046
12046
|
return e;
|
|
12047
12047
|
}
|
|
12048
12048
|
matchesNode(e, t, i) {
|
|
12049
|
-
return this.dirty ==
|
|
12049
|
+
return this.dirty == ze && e.eq(this.node) && Wi(t, this.outerDeco) && i.eq(this.innerDeco);
|
|
12050
12050
|
}
|
|
12051
12051
|
get size() {
|
|
12052
12052
|
return this.node.nodeSize;
|
|
@@ -12101,7 +12101,7 @@ class yt extends Qn {
|
|
|
12101
12101
|
return this.dirty == Ze || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, i, r), !0);
|
|
12102
12102
|
}
|
|
12103
12103
|
updateInner(e, t, i, r) {
|
|
12104
|
-
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(r, this.posAtStart), this.dirty =
|
|
12104
|
+
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(r, this.posAtStart), this.dirty = ze;
|
|
12105
12105
|
}
|
|
12106
12106
|
updateOuterDeco(e) {
|
|
12107
12107
|
if (Wi(e, this.outerDeco))
|
|
@@ -12137,7 +12137,7 @@ class dr extends yt {
|
|
|
12137
12137
|
return { skip: e || !0 };
|
|
12138
12138
|
}
|
|
12139
12139
|
update(e, t, i, r) {
|
|
12140
|
-
return this.dirty == Ze || this.dirty !=
|
|
12140
|
+
return this.dirty == Ze || this.dirty != ze && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != ze || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, r.trackWrites == this.nodeDOM && (r.trackWrites = null)), this.node = e, this.dirty = ze, !0);
|
|
12141
12141
|
}
|
|
12142
12142
|
inParent() {
|
|
12143
12143
|
let e = this.parent.contentDOM;
|
|
@@ -12174,7 +12174,7 @@ class Xd extends Qn {
|
|
|
12174
12174
|
return { ignore: !0 };
|
|
12175
12175
|
}
|
|
12176
12176
|
matchesHack(e) {
|
|
12177
|
-
return this.dirty ==
|
|
12177
|
+
return this.dirty == ze && this.dom.nodeName == e;
|
|
12178
12178
|
}
|
|
12179
12179
|
get domAtom() {
|
|
12180
12180
|
return !0;
|
|
@@ -12333,7 +12333,7 @@ class o3 {
|
|
|
12333
12333
|
for (; r < o && (r == s - 1 ? this.top : this.stack[r + 1 << 1]).matchesMark(e[r]) && e[r].type.spec.spanning !== !1; )
|
|
12334
12334
|
r++;
|
|
12335
12335
|
for (; r < s; )
|
|
12336
|
-
this.destroyRest(), this.top.dirty =
|
|
12336
|
+
this.destroyRest(), this.top.dirty = ze, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
|
|
12337
12337
|
for (; s < e.length; ) {
|
|
12338
12338
|
this.stack.push(this.top, this.index + 1);
|
|
12339
12339
|
let a = -1;
|
|
@@ -12403,7 +12403,7 @@ class o3 {
|
|
|
12403
12403
|
if (!h && l.update(e, t, i, r))
|
|
12404
12404
|
return this.destroyBetween(this.index, a), l.dom != u && (this.changed = !0), this.index++, !0;
|
|
12405
12405
|
if (!h && (d = this.recreateWrapper(l, e, t, i, r, o)))
|
|
12406
|
-
return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = At, d.updateChildren(r, o + 1), d.dirty =
|
|
12406
|
+
return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = At, d.updateChildren(r, o + 1), d.dirty = ze), this.changed = !0, this.index++, !0;
|
|
12407
12407
|
break;
|
|
12408
12408
|
}
|
|
12409
12409
|
}
|
|
@@ -12721,7 +12721,7 @@ function Ll(n, e, t) {
|
|
|
12721
12721
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
12722
12722
|
let r = Ws(n.state, e);
|
|
12723
12723
|
return r && r instanceof D ? ut(n, r) : !1;
|
|
12724
|
-
} else if (!(
|
|
12724
|
+
} else if (!($e && t.indexOf("m") > -1)) {
|
|
12725
12725
|
let r = i.$head, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter, o;
|
|
12726
12726
|
if (!s || s.isText)
|
|
12727
12727
|
return !1;
|
|
@@ -12754,7 +12754,7 @@ function m3(n) {
|
|
|
12754
12754
|
if (!t)
|
|
12755
12755
|
return;
|
|
12756
12756
|
let r, s, o = !1;
|
|
12757
|
-
for (
|
|
12757
|
+
for (Le && t.nodeType == 1 && i < Ui(t) && $n(t.childNodes[i], -1) && (o = !0); ; )
|
|
12758
12758
|
if (i > 0) {
|
|
12759
12759
|
if (t.nodeType != 1)
|
|
12760
12760
|
break;
|
|
@@ -12883,7 +12883,7 @@ function zl(n, e) {
|
|
|
12883
12883
|
}
|
|
12884
12884
|
function Bl(n, e, t) {
|
|
12885
12885
|
let i = n.state.selection;
|
|
12886
|
-
if (i instanceof L && !i.empty || t.indexOf("s") > -1 ||
|
|
12886
|
+
if (i instanceof L && !i.empty || t.indexOf("s") > -1 || $e && t.indexOf("m") > -1)
|
|
12887
12887
|
return !1;
|
|
12888
12888
|
let { $from: r, $to: s } = i;
|
|
12889
12889
|
if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -12892,7 +12892,7 @@ function Bl(n, e, t) {
|
|
|
12892
12892
|
return ut(n, o);
|
|
12893
12893
|
}
|
|
12894
12894
|
if (!r.parent.inlineContent) {
|
|
12895
|
-
let o = e < 0 ? r : s, a = i instanceof
|
|
12895
|
+
let o = e < 0 ? r : s, a = i instanceof Re ? B.near(o, e) : B.findFrom(o, e);
|
|
12896
12896
|
return a ? ut(n, a) : !1;
|
|
12897
12897
|
}
|
|
12898
12898
|
return !1;
|
|
@@ -12933,24 +12933,24 @@ function w3(n) {
|
|
|
12933
12933
|
}
|
|
12934
12934
|
function C3(n, e) {
|
|
12935
12935
|
let t = e.keyCode, i = w3(e);
|
|
12936
|
-
if (t == 8 ||
|
|
12936
|
+
if (t == 8 || $e && t == 72 && i == "c")
|
|
12937
12937
|
return Fl(n, -1) || Zt(n, -1);
|
|
12938
|
-
if (t == 46 && !e.shiftKey ||
|
|
12938
|
+
if (t == 46 && !e.shiftKey || $e && t == 68 && i == "c")
|
|
12939
12939
|
return Fl(n, 1) || Zt(n, 1);
|
|
12940
12940
|
if (t == 13 || t == 27)
|
|
12941
12941
|
return !0;
|
|
12942
|
-
if (t == 37 ||
|
|
12942
|
+
if (t == 37 || $e && t == 66 && i == "c") {
|
|
12943
12943
|
let r = t == 37 ? zl(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
12944
12944
|
return Ll(n, r, i) || Zt(n, r);
|
|
12945
|
-
} else if (t == 39 ||
|
|
12945
|
+
} else if (t == 39 || $e && t == 70 && i == "c") {
|
|
12946
12946
|
let r = t == 39 ? zl(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
12947
12947
|
return Ll(n, r, i) || Zt(n, r);
|
|
12948
12948
|
} else {
|
|
12949
|
-
if (t == 38 ||
|
|
12949
|
+
if (t == 38 || $e && t == 80 && i == "c")
|
|
12950
12950
|
return Bl(n, -1, i) || Zt(n, -1);
|
|
12951
|
-
if (t == 40 ||
|
|
12951
|
+
if (t == 40 || $e && t == 78 && i == "c")
|
|
12952
12952
|
return b3(n) || Bl(n, 1, i) || Zt(n, 1);
|
|
12953
|
-
if (i == (
|
|
12953
|
+
if (i == ($e ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
12954
12954
|
return !0;
|
|
12955
12955
|
}
|
|
12956
12956
|
return !1;
|
|
@@ -13207,7 +13207,7 @@ Me.keyup = (n, e) => {
|
|
|
13207
13207
|
};
|
|
13208
13208
|
Me.keypress = (n, e) => {
|
|
13209
13209
|
let t = e;
|
|
13210
|
-
if (dh(n, t) || !t.charCode || t.ctrlKey && !t.altKey ||
|
|
13210
|
+
if (dh(n, t) || !t.charCode || t.ctrlKey && !t.altKey || $e && t.metaKey)
|
|
13211
13211
|
return;
|
|
13212
13212
|
if (n.someProp("handleKeyPress", (r) => r(n, t))) {
|
|
13213
13213
|
t.preventDefault();
|
|
@@ -13292,7 +13292,7 @@ function F3(n, e, t) {
|
|
|
13292
13292
|
function Do(n) {
|
|
13293
13293
|
return qi(n);
|
|
13294
13294
|
}
|
|
13295
|
-
const uh =
|
|
13295
|
+
const uh = $e ? "metaKey" : "ctrlKey";
|
|
13296
13296
|
Te.mousedown = (n, e) => {
|
|
13297
13297
|
let t = e;
|
|
13298
13298
|
n.input.shiftKey = t.shiftKey;
|
|
@@ -13318,7 +13318,7 @@ class V3 {
|
|
|
13318
13318
|
node: s,
|
|
13319
13319
|
pos: o,
|
|
13320
13320
|
addAttr: !!(this.target && !this.target.draggable),
|
|
13321
|
-
setUneditable: !!(this.target &&
|
|
13321
|
+
setUneditable: !!(this.target && Le && !this.target.hasAttribute("contentEditable"))
|
|
13322
13322
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
13323
13323
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
13324
13324
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), mt(e, "pointer");
|
|
@@ -13364,7 +13364,7 @@ Me.compositionstart = Me.compositionupdate = (n) => {
|
|
|
13364
13364
|
let { state: e } = n, t = e.selection.$to;
|
|
13365
13365
|
if (e.selection instanceof L && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((i) => i.type.spec.inclusive === !1) || le && Hd && j3(n)))
|
|
13366
13366
|
n.markCursor = n.state.storedMarks || t.marks(), qi(n, !0), n.markCursor = null;
|
|
13367
|
-
else if (qi(n, !e.selection.empty),
|
|
13367
|
+
else if (qi(n, !e.selection.empty), Le && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
13368
13368
|
let i = n.domSelectionRange();
|
|
13369
13369
|
for (let r = i.focusNode, s = i.focusOffset; r && r.nodeType == 1 && s != 0; ) {
|
|
13370
13370
|
let o = s < 0 ? r.lastChild : r.childNodes[s - 1];
|
|
@@ -13490,7 +13490,7 @@ class mh {
|
|
|
13490
13490
|
this.slice = e, this.move = t, this.node = i;
|
|
13491
13491
|
}
|
|
13492
13492
|
}
|
|
13493
|
-
const G3 =
|
|
13493
|
+
const G3 = $e ? "altKey" : "ctrlKey";
|
|
13494
13494
|
function gh(n, e) {
|
|
13495
13495
|
let t = n.someProp("dragCopies", (i) => !i(e));
|
|
13496
13496
|
return t != null ? t : !e[G3];
|
|
@@ -14208,7 +14208,7 @@ class n4 {
|
|
|
14208
14208
|
let d = this.registerMutation(t[u], l);
|
|
14209
14209
|
d && (s = s < 0 ? d.from : Math.min(d.from, s), o = o < 0 ? d.to : Math.max(d.to, o), d.typeOver && (a = !0));
|
|
14210
14210
|
}
|
|
14211
|
-
if (
|
|
14211
|
+
if (Le && l.length) {
|
|
14212
14212
|
let u = l.filter((d) => d.nodeName == "BR");
|
|
14213
14213
|
if (u.length == 2) {
|
|
14214
14214
|
let [d, h] = u;
|
|
@@ -14267,7 +14267,7 @@ class n4 {
|
|
|
14267
14267
|
let Ul = /* @__PURE__ */ new WeakMap(), ql = !1;
|
|
14268
14268
|
function i4(n) {
|
|
14269
14269
|
if (!Ul.has(n) && (Ul.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
14270
|
-
if (n.requiresGeckoHackNode =
|
|
14270
|
+
if (n.requiresGeckoHackNode = Le, ql)
|
|
14271
14271
|
return;
|
|
14272
14272
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ql = !0;
|
|
14273
14273
|
}
|
|
@@ -15589,7 +15589,7 @@ var sv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
15589
15589
|
}), l;
|
|
15590
15590
|
}, ov = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), av = () => ({ tr: n, dispatch: e }) => {
|
|
15591
15591
|
if (e) {
|
|
15592
|
-
const t = new
|
|
15592
|
+
const t = new Re(n.doc);
|
|
15593
15593
|
n.setSelection(t);
|
|
15594
15594
|
}
|
|
15595
15595
|
return !0;
|
|
@@ -17108,7 +17108,7 @@ var re = class Bh extends Wo {
|
|
|
17108
17108
|
const h = u.mapping;
|
|
17109
17109
|
u.steps.forEach((f, m) => {
|
|
17110
17110
|
var v, b;
|
|
17111
|
-
if (f instanceof
|
|
17111
|
+
if (f instanceof je) {
|
|
17112
17112
|
const g = h.slice(m).map(f.from, -1), y = h.slice(m).map(f.to), w = h.invert().map(g, -1), C = h.invert().map(y), x = (v = u.doc.nodeAt(g - 1)) == null ? void 0 : v.marks.some((M) => M.eq(f.mark)), T = (b = u.doc.nodeAt(y)) == null ? void 0 : b.marks.some((M) => M.eq(f.mark));
|
|
17113
17113
|
this.editor.emit("delete", {
|
|
17114
17114
|
type: "mark",
|
|
@@ -18958,7 +18958,7 @@ var H8 = /* @__PURE__ */ function(n) {
|
|
|
18958
18958
|
}, e;
|
|
18959
18959
|
}(ue);
|
|
18960
18960
|
const j8 = 500;
|
|
18961
|
-
class
|
|
18961
|
+
class He {
|
|
18962
18962
|
constructor(e, t) {
|
|
18963
18963
|
this.items = e, this.eventCount = t;
|
|
18964
18964
|
}
|
|
@@ -18982,24 +18982,24 @@ class Ve {
|
|
|
18982
18982
|
return;
|
|
18983
18983
|
}
|
|
18984
18984
|
if (r) {
|
|
18985
|
-
u.push(new
|
|
18985
|
+
u.push(new Xe(d.map));
|
|
18986
18986
|
let f = d.step.map(r.slice(s)), m;
|
|
18987
|
-
f && o.maybeStep(f).doc && (m = o.mapping.maps[o.mapping.maps.length - 1], c.push(new
|
|
18987
|
+
f && o.maybeStep(f).doc && (m = o.mapping.maps[o.mapping.maps.length - 1], c.push(new Xe(m, void 0, void 0, c.length + u.length))), s--, m && r.appendMap(m, s);
|
|
18988
18988
|
} else
|
|
18989
18989
|
o.maybeStep(d.step);
|
|
18990
18990
|
if (d.selection)
|
|
18991
|
-
return a = r ? d.selection.map(r.slice(s)) : d.selection, l = new
|
|
18991
|
+
return a = r ? d.selection.map(r.slice(s)) : d.selection, l = new He(this.items.slice(0, i).append(u.reverse().concat(c)), this.eventCount - 1), !1;
|
|
18992
18992
|
}, this.items.length, 0), { remaining: l, transform: o, selection: a };
|
|
18993
18993
|
}
|
|
18994
18994
|
// Create a new branch with the given transform added.
|
|
18995
18995
|
addTransform(e, t, i, r) {
|
|
18996
18996
|
let s = [], o = this.eventCount, a = this.items, l = !r && a.length ? a.get(a.length - 1) : null;
|
|
18997
18997
|
for (let u = 0; u < e.steps.length; u++) {
|
|
18998
|
-
let d = e.steps[u].invert(e.docs[u]), h = new
|
|
18998
|
+
let d = e.steps[u].invert(e.docs[u]), h = new Xe(e.mapping.maps[u], d, t), f;
|
|
18999
18999
|
(f = l && l.merge(h)) && (h = f, u ? s.pop() : a = a.slice(0, a.length - 1)), s.push(h), t && (o++, t = void 0), r || (l = h);
|
|
19000
19000
|
}
|
|
19001
19001
|
let c = o - i.depth;
|
|
19002
|
-
return c > U8 && (a = W8(a, c), o -= c), new
|
|
19002
|
+
return c > U8 && (a = W8(a, c), o -= c), new He(a.append(s), o);
|
|
19003
19003
|
}
|
|
19004
19004
|
remapping(e, t) {
|
|
19005
19005
|
let i = new Fn();
|
|
@@ -19009,7 +19009,7 @@ class Ve {
|
|
|
19009
19009
|
}, e, t), i;
|
|
19010
19010
|
}
|
|
19011
19011
|
addMaps(e) {
|
|
19012
|
-
return this.eventCount == 0 ? this : new
|
|
19012
|
+
return this.eventCount == 0 ? this : new He(this.items.append(e.map((t) => new Xe(t))), this.eventCount);
|
|
19013
19013
|
}
|
|
19014
19014
|
// When the collab module receives remote changes, the history has
|
|
19015
19015
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -19031,14 +19031,14 @@ class Ve {
|
|
|
19031
19031
|
let m = s.maps[f];
|
|
19032
19032
|
if (h.step) {
|
|
19033
19033
|
let v = e.steps[f].invert(e.docs[f]), b = h.selection && h.selection.map(s.slice(l + 1, f));
|
|
19034
|
-
b && a++, i.push(new
|
|
19034
|
+
b && a++, i.push(new Xe(m, v, b));
|
|
19035
19035
|
} else
|
|
19036
|
-
i.push(new
|
|
19036
|
+
i.push(new Xe(m));
|
|
19037
19037
|
}, r);
|
|
19038
19038
|
let c = [];
|
|
19039
19039
|
for (let h = t; h < o; h++)
|
|
19040
|
-
c.push(new
|
|
19041
|
-
let u = this.items.slice(0, r).append(c).append(i), d = new
|
|
19040
|
+
c.push(new Xe(s.maps[h]));
|
|
19041
|
+
let u = this.items.slice(0, r).append(c).append(i), d = new He(u, a);
|
|
19042
19042
|
return d.emptyItemCount() > j8 && (d = d.compress(this.items.length - i.length)), d;
|
|
19043
19043
|
}
|
|
19044
19044
|
emptyItemCount() {
|
|
@@ -19063,15 +19063,15 @@ class Ve {
|
|
|
19063
19063
|
if (i--, c && t.appendMap(c, i), l) {
|
|
19064
19064
|
let u = o.selection && o.selection.map(t.slice(i));
|
|
19065
19065
|
u && s++;
|
|
19066
|
-
let d = new
|
|
19066
|
+
let d = new Xe(c.invert(), l, u), h, f = r.length - 1;
|
|
19067
19067
|
(h = r.length && r[f].merge(d)) ? r[f] = h : r.push(d);
|
|
19068
19068
|
}
|
|
19069
19069
|
} else
|
|
19070
19070
|
o.map && i--;
|
|
19071
|
-
}, this.items.length, 0), new
|
|
19071
|
+
}, this.items.length, 0), new He(ue.from(r.reverse()), s);
|
|
19072
19072
|
}
|
|
19073
19073
|
}
|
|
19074
|
-
|
|
19074
|
+
He.empty = new He(ue.empty, 0);
|
|
19075
19075
|
function W8(n, e) {
|
|
19076
19076
|
let t;
|
|
19077
19077
|
return n.forEach((i, r) => {
|
|
@@ -19079,7 +19079,7 @@ function W8(n, e) {
|
|
|
19079
19079
|
return t = r, !1;
|
|
19080
19080
|
}), n.slice(t);
|
|
19081
19081
|
}
|
|
19082
|
-
class
|
|
19082
|
+
class Xe {
|
|
19083
19083
|
constructor(e, t, i, r) {
|
|
19084
19084
|
this.map = e, this.step = t, this.selection = i, this.mirrorOffset = r;
|
|
19085
19085
|
}
|
|
@@ -19087,7 +19087,7 @@ class Ge {
|
|
|
19087
19087
|
if (this.step && e.step && !e.selection) {
|
|
19088
19088
|
let t = e.step.merge(this.step);
|
|
19089
19089
|
if (t)
|
|
19090
|
-
return new
|
|
19090
|
+
return new Xe(t.getMap().invert(), t, this.selection);
|
|
19091
19091
|
}
|
|
19092
19092
|
}
|
|
19093
19093
|
}
|
|
@@ -19109,7 +19109,7 @@ function q8(n, e, t, i) {
|
|
|
19109
19109
|
return o.getMeta(zt).redo ? new dt(n.done.addTransform(t, void 0, i, Ai(e)), n.undone, cc(t.mapping.maps), n.prevTime, n.prevComposition) : new dt(n.done, n.undone.addTransform(t, void 0, i, Ai(e)), null, n.prevTime, n.prevComposition);
|
|
19110
19110
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
19111
19111
|
let a = t.getMeta("composition"), l = n.prevTime == 0 || !o && n.prevComposition != a && (n.prevTime < (t.time || 0) - i.newGroupDelay || !K8(t, n.prevRanges)), c = o ? as(n.prevRanges, t.mapping) : cc(t.mapping.maps);
|
|
19112
|
-
return new dt(n.done.addTransform(t, l ? e.selection.getBookmark() : void 0, i, Ai(e)),
|
|
19112
|
+
return new dt(n.done.addTransform(t, l ? e.selection.getBookmark() : void 0, i, Ai(e)), He.empty, c, t.time, a == null ? n.prevComposition : a);
|
|
19113
19113
|
} else
|
|
19114
19114
|
return (s = t.getMeta("rebased")) ? new dt(n.done.rebased(t, s), n.undone.rebased(t, s), as(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new dt(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), as(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
19115
19115
|
}
|
|
@@ -19169,7 +19169,7 @@ function X8(n = {}) {
|
|
|
19169
19169
|
key: zt,
|
|
19170
19170
|
state: {
|
|
19171
19171
|
init() {
|
|
19172
|
-
return new dt(
|
|
19172
|
+
return new dt(He.empty, He.empty, null, 0, -1);
|
|
19173
19173
|
},
|
|
19174
19174
|
apply(e, t, i) {
|
|
19175
19175
|
return q8(t, i, e, n);
|
|
@@ -19750,7 +19750,7 @@ const hc = new z("chat-editor"), rf = ({
|
|
|
19750
19750
|
};
|
|
19751
19751
|
}, []), /* @__PURE__ */ p("div", { className: "".concat(hc.b(), " ").concat(t ? hc.m("disabled") : ""), children: /* @__PURE__ */ p("div", { ref: a }) });
|
|
19752
19752
|
}, ie = new z("user-message-question"), ry = (n) => {
|
|
19753
|
-
const e =
|
|
19753
|
+
const e = Ae(), t = $(null), i = $(135), r = $(!0), s = $(!1), o = F(null), a = De(() => Nn.parseMixedContent(n.message.content), [n.message.content]), l = $({
|
|
19754
19754
|
resources: [],
|
|
19755
19755
|
remainingText: "",
|
|
19756
19756
|
hasResources: !1
|
|
@@ -19951,7 +19951,7 @@ const ay = new z("chat-message-item"), ly = (n) => {
|
|
|
19951
19951
|
default:
|
|
19952
19952
|
i = oy;
|
|
19953
19953
|
}
|
|
19954
|
-
return /* @__PURE__ */ p("div", { className: ay.b(), children:
|
|
19954
|
+
return /* @__PURE__ */ p("div", { className: ay.b(), children: We(i, {
|
|
19955
19955
|
size: t,
|
|
19956
19956
|
message: e,
|
|
19957
19957
|
controller: n.controller,
|
|
@@ -20226,7 +20226,7 @@ const _e = new z("chat-toolbar-item"), cy = (n) => {
|
|
|
20226
20226
|
onClick: o
|
|
20227
20227
|
} = n, [a, l] = j(!1), c = F(null), u = (y) => typeof y.hidden == "function" ? y.hidden(t) : y.hidden === !0;
|
|
20228
20228
|
if (u(e))
|
|
20229
|
-
return /* @__PURE__ */ p(
|
|
20229
|
+
return /* @__PURE__ */ p(qe, {});
|
|
20230
20230
|
const d = (y) => r ? !0 : typeof y.disabled == "function" ? y.disabled(t) : y.disabled === !0, h = (y) => {
|
|
20231
20231
|
var w, C, x, T;
|
|
20232
20232
|
if (typeof y.icon == "function")
|
|
@@ -20407,7 +20407,7 @@ const uy = new z("chat-toolbar"), Xs = (n) => {
|
|
|
20407
20407
|
v
|
|
20408
20408
|
);
|
|
20409
20409
|
}
|
|
20410
|
-
}, h =
|
|
20410
|
+
}, h = De(() => r === "content" ? (i == null ? void 0 : i.role) === "ASSISTANT" ? (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0 || e.isLoading.value : (i == null ? void 0 : i.role) === "USER" ? e.isLoading.value : !1 : !1, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed, i == null ? void 0 : i.role, e.isLoading.value]);
|
|
20411
20411
|
return /* @__PURE__ */ p("div", { className: "".concat(uy.b(), " ").concat(s || ""), children: a.map((f, m) => /* @__PURE__ */ p(
|
|
20412
20412
|
cy,
|
|
20413
20413
|
{
|
|
@@ -20441,7 +20441,7 @@ const hy = (n) => {
|
|
|
20441
20441
|
behavior: "smooth"
|
|
20442
20442
|
}), (l = n.onClick) == null || l.call(n));
|
|
20443
20443
|
}, a = dy(s, 300);
|
|
20444
|
-
return
|
|
20444
|
+
return De(() => {
|
|
20445
20445
|
t.value = {
|
|
20446
20446
|
right: "".concat(n.right, "px"),
|
|
20447
20447
|
bottom: "".concat(n.bottom, "px")
|
|
@@ -20463,10 +20463,10 @@ const hy = (n) => {
|
|
|
20463
20463
|
);
|
|
20464
20464
|
};
|
|
20465
20465
|
const gc = new z("chat-messages"), vc = (n) => {
|
|
20466
|
-
const e = F(null), t = 5, [i, r] = j(t), [s, o] = j(!1), [a, l] = j(!0), c = F(!1), u = n.controller.messages, d = F(u.value.length), h =
|
|
20466
|
+
const e = F(null), t = 5, [i, r] = j(t), [s, o] = j(!1), [a, l] = j(!0), c = F(!1), u = n.controller.messages, d = F(u.value.length), h = De(() => {
|
|
20467
20467
|
const g = Math.max(0, u.value.length - i);
|
|
20468
20468
|
return u.value.slice(g);
|
|
20469
|
-
}, [u.value, i]), f =
|
|
20469
|
+
}, [u.value, i]), f = De(() => i < u.value.length, [u.value, i]), m = () => {
|
|
20470
20470
|
const g = e.current;
|
|
20471
20471
|
g && (c.current = !0, g.scrollTo({
|
|
20472
20472
|
top: g.scrollHeight,
|
|
@@ -20974,7 +20974,7 @@ class yc {
|
|
|
20974
20974
|
async afterFecthHistory() {
|
|
20975
20975
|
if (this.opts.appendCurContent && (this.addMessage({
|
|
20976
20976
|
state: 30,
|
|
20977
|
-
messageid:
|
|
20977
|
+
messageid: Ae(),
|
|
20978
20978
|
role: "USER",
|
|
20979
20979
|
type: "DEFAULT",
|
|
20980
20980
|
content: this.opts.appendCurContent,
|
|
@@ -20993,7 +20993,7 @@ class yc {
|
|
|
20993
20993
|
if (i) {
|
|
20994
20994
|
const r = i + t.content, s = {
|
|
20995
20995
|
...t._origin,
|
|
20996
|
-
messageid:
|
|
20996
|
+
messageid: Ae(),
|
|
20997
20997
|
content: r
|
|
20998
20998
|
};
|
|
20999
20999
|
this.messages.value[e] = new _t(s), this.messages.value = [...this.messages.value];
|
|
@@ -21215,7 +21215,7 @@ class yc {
|
|
|
21215
21215
|
let t = this.stringlyMaterialResource(!0);
|
|
21216
21216
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
21217
21217
|
state: 30,
|
|
21218
|
-
messageid:
|
|
21218
|
+
messageid: Ae(),
|
|
21219
21219
|
role: "USER",
|
|
21220
21220
|
type: "DEFAULT",
|
|
21221
21221
|
content: t,
|
|
@@ -21295,22 +21295,24 @@ class yc {
|
|
|
21295
21295
|
async refreshMessage(e, t = !1) {
|
|
21296
21296
|
this.isLoading.value = !0;
|
|
21297
21297
|
try {
|
|
21298
|
-
|
|
21299
|
-
(
|
|
21300
|
-
);
|
|
21301
|
-
let r = [];
|
|
21298
|
+
let i = this.messages.value.findIndex(
|
|
21299
|
+
(o) => o.messageid === e.messageid
|
|
21300
|
+
), r = [], s;
|
|
21302
21301
|
if (t) {
|
|
21303
21302
|
if (e.state === 40) {
|
|
21304
|
-
const
|
|
21303
|
+
const o = {
|
|
21305
21304
|
...e._origin,
|
|
21306
21305
|
state: 30
|
|
21307
21306
|
};
|
|
21308
|
-
this.replaceMessage(
|
|
21307
|
+
this.replaceMessage(o, !1);
|
|
21309
21308
|
}
|
|
21310
|
-
r = this.messages.value.splice(
|
|
21311
|
-
i
|
|
21312
|
-
this.messages.value.length - i
|
|
21313
|
-
),
|
|
21309
|
+
s = this.messages.value[i], r = this.messages.value.splice(
|
|
21310
|
+
i,
|
|
21311
|
+
this.messages.value.length - i
|
|
21312
|
+
), this.addMessage({
|
|
21313
|
+
...s._origin,
|
|
21314
|
+
messageid: Ae()
|
|
21315
|
+
}), await this.opts.question(
|
|
21314
21316
|
this,
|
|
21315
21317
|
this.context,
|
|
21316
21318
|
this.params,
|
|
@@ -21326,8 +21328,11 @@ class yc {
|
|
|
21326
21328
|
this.opts.srfMcpservers
|
|
21327
21329
|
);
|
|
21328
21330
|
} else if (i === this.messages.value.length - 1) {
|
|
21329
|
-
const
|
|
21330
|
-
|
|
21331
|
+
const o = this.messages.value.pop();
|
|
21332
|
+
o && r.push(o), s = this.messages.value[this.messages.value.length - 1], s && (r.push(s), this.messages.value.pop(), this.addMessage({
|
|
21333
|
+
...s._origin,
|
|
21334
|
+
messageid: Ae()
|
|
21335
|
+
})), this.messages.value = [...this.messages.value], await this.opts.question(
|
|
21331
21336
|
this,
|
|
21332
21337
|
this.context,
|
|
21333
21338
|
this.params,
|
|
@@ -21343,10 +21348,13 @@ class yc {
|
|
|
21343
21348
|
this.opts.srfMcpservers
|
|
21344
21349
|
);
|
|
21345
21350
|
} else
|
|
21346
|
-
r = this.messages.value.splice(
|
|
21347
|
-
i
|
|
21348
|
-
this.messages.value.length - i
|
|
21349
|
-
),
|
|
21351
|
+
i >= 1 && (i -= 1, s = this.messages.value[i]), r = this.messages.value.splice(
|
|
21352
|
+
i,
|
|
21353
|
+
this.messages.value.length - i
|
|
21354
|
+
), s && this.addMessage({
|
|
21355
|
+
...s._origin,
|
|
21356
|
+
messageid: Ae()
|
|
21357
|
+
}), await this.opts.question(
|
|
21350
21358
|
this,
|
|
21351
21359
|
this.context,
|
|
21352
21360
|
this.params,
|
|
@@ -21362,12 +21370,12 @@ class yc {
|
|
|
21362
21370
|
this.opts.srfMcpservers
|
|
21363
21371
|
);
|
|
21364
21372
|
if (this.asyncToIndexDB(), this.resourceMode === "REMOTE" && this.resourceOptions && r && r.length > 0) {
|
|
21365
|
-
const
|
|
21366
|
-
|
|
21373
|
+
const o = r.filter((a) => a.realmessageid).map((a) => a.realmessageid).join(",");
|
|
21374
|
+
o && await this.resourceOptions.deleteMessage(o);
|
|
21367
21375
|
}
|
|
21368
21376
|
if (this.opts.action) {
|
|
21369
|
-
const
|
|
21370
|
-
this.opts.action("refreshmsg",
|
|
21377
|
+
const o = this.cloneMessage(e);
|
|
21378
|
+
this.opts.action("refreshmsg", o);
|
|
21371
21379
|
}
|
|
21372
21380
|
} finally {
|
|
21373
21381
|
await this.markLastUserMessage(), this.isLoading.value = !1;
|
|
@@ -21560,7 +21568,7 @@ class yc {
|
|
|
21560
21568
|
if (!a)
|
|
21561
21569
|
throw new Error(k.t.value("actionIdCannotEmpty"));
|
|
21562
21570
|
this.addMessage({
|
|
21563
|
-
messageid:
|
|
21571
|
+
messageid: Ae(),
|
|
21564
21572
|
state: 30,
|
|
21565
21573
|
type: "DEFAULT",
|
|
21566
21574
|
role: "USER",
|
|
@@ -21599,7 +21607,7 @@ class yc {
|
|
|
21599
21607
|
c
|
|
21600
21608
|
), h = (o = d == null ? void 0 : d.data) == null ? void 0 : o[0];
|
|
21601
21609
|
h && h.content && this.addMessage({
|
|
21602
|
-
messageid:
|
|
21610
|
+
messageid: Ae(),
|
|
21603
21611
|
state: 30,
|
|
21604
21612
|
type: h.type || "DEFAULT",
|
|
21605
21613
|
role: h.role || "ASSISTANT",
|
|
@@ -21663,7 +21671,7 @@ class yc {
|
|
|
21663
21671
|
u
|
|
21664
21672
|
), f = (a = h == null ? void 0 : h.data) == null ? void 0 : a[0];
|
|
21665
21673
|
f && f.content && this.addMessage({
|
|
21666
|
-
messageid:
|
|
21674
|
+
messageid: Ae(),
|
|
21667
21675
|
state: 30,
|
|
21668
21676
|
type: f.type || "DEFAULT",
|
|
21669
21677
|
role: f.role || "ASSISTANT",
|
|
@@ -21888,7 +21896,7 @@ class yc {
|
|
|
21888
21896
|
c
|
|
21889
21897
|
), f = (m = h == null ? void 0 : h.data) == null ? void 0 : m[0];
|
|
21890
21898
|
f && f.content && this.addMessage({
|
|
21891
|
-
messageid:
|
|
21899
|
+
messageid: Ae(),
|
|
21892
21900
|
state: 30,
|
|
21893
21901
|
type: f.type || "DEFAULT",
|
|
21894
21902
|
role: f.role || "ASSISTANT",
|
|
@@ -22672,7 +22680,7 @@ class wy {
|
|
|
22672
22680
|
e.chatOptions.language && k.setLanguage(e.chatOptions.language), e.chatOptions.locale && k.setLocale(e.chatOptions.locale), this.resourceOptions = e.resourceOptions, (((o = e.resourceOptions) == null ? void 0 : o.resourceMode) || "LOCAL") === "LOCAL" && await this.initIndexDB(), this.backupChatOptions = e, this.close(), this.container = document.createElement("div"), this.container.classList.add("ibiz-ai-chat"), document.body.appendChild(this.container);
|
|
22673
22681
|
const i = e.chatOptions;
|
|
22674
22682
|
Et(
|
|
22675
|
-
|
|
22683
|
+
We(us, {
|
|
22676
22684
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
22677
22685
|
containerOptions: e.containerOptions,
|
|
22678
22686
|
caption: e.mode && e.mode === "TOPIC" ? k.t.value("aiAssistant") : i.caption,
|
|
@@ -22727,7 +22735,7 @@ class wy {
|
|
|
22727
22735
|
});
|
|
22728
22736
|
const s = new yc(i, this.resourceOptions);
|
|
22729
22737
|
return this.aiTopicMap.set("".concat(r == null ? void 0 : r.id), s), e.mode && e.mode === "TOPIC" && this.aiTopic.isTempChat.value ? this.aiTopic.enterTempChat() : Et(
|
|
22730
|
-
|
|
22738
|
+
We(us, {
|
|
22731
22739
|
aiChat: s,
|
|
22732
22740
|
aiTopic: this.aiTopic,
|
|
22733
22741
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
@@ -22831,7 +22839,7 @@ class wy {
|
|
|
22831
22839
|
});
|
|
22832
22840
|
let i;
|
|
22833
22841
|
this.aiTopicMap.has("".concat(e.id)) ? (i = this.aiTopicMap.get("".concat(e.id)), i.updateAIChat()) : (i = new yc(t, this.resourceOptions), this.aiTopicMap.set("".concat(e.id), i)), this.container && (Et(null, this.container), Et(
|
|
22834
|
-
|
|
22842
|
+
We(us, {
|
|
22835
22843
|
aiChat: i,
|
|
22836
22844
|
aiTopic: this.aiTopic,
|
|
22837
22845
|
mode: (r = this.backupChatOptions) != null && r.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
@@ -23168,7 +23176,7 @@ const G = new z("chat-input"), wc = window.SpeechRecognition || window.webkitSpe
|
|
|
23168
23176
|
f(M, w);
|
|
23169
23177
|
},
|
|
23170
23178
|
children: [
|
|
23171
|
-
/* @__PURE__ */ p("span", { className: G.b("pop-action-item-icon"), children: typeof w.icon == "function" ? w.icon() : ((C = w.icon) == null ? void 0 : C.showIcon) && /* @__PURE__ */ p(
|
|
23179
|
+
/* @__PURE__ */ p("span", { className: G.b("pop-action-item-icon"), children: typeof w.icon == "function" ? w.icon() : ((C = w.icon) == null ? void 0 : C.showIcon) && /* @__PURE__ */ p(qe, { children: (x = w.icon) != null && x.cssClass ? /* @__PURE__ */ p("i", { className: w.icon.cssClass }) : (T = w.icon) != null && T.imagePath ? nr(w.icon.imagePath) ? /* @__PURE__ */ p(
|
|
23172
23180
|
"div",
|
|
23173
23181
|
{
|
|
23174
23182
|
dangerouslySetInnerHTML: {
|
|
@@ -23400,7 +23408,7 @@ const xe = new z("chat-topics"), Ty = (n) => {
|
|
|
23400
23408
|
children: /* @__PURE__ */ p(ja, {})
|
|
23401
23409
|
}
|
|
23402
23410
|
)
|
|
23403
|
-
] }) : /* @__PURE__ */ p(
|
|
23411
|
+
] }) : /* @__PURE__ */ p(qe, { children: [
|
|
23404
23412
|
/* @__PURE__ */ p("div", { className: xe.e("header"), children: [
|
|
23405
23413
|
/* @__PURE__ */ p("div", { className: xe.e("icon-container"), children: [
|
|
23406
23414
|
/* @__PURE__ */ p(
|
|
@@ -23572,7 +23580,7 @@ const br = N0({
|
|
|
23572
23580
|
enableBackFill: !0
|
|
23573
23581
|
});
|
|
23574
23582
|
var kc, xc, Sc, Tc;
|
|
23575
|
-
class us extends
|
|
23583
|
+
class us extends Ue {
|
|
23576
23584
|
constructor(t) {
|
|
23577
23585
|
var i, r;
|
|
23578
23586
|
super(t);
|