diff --git a/MystEditor.js b/MystEditor.js index b0fbf52..d033287 100644 --- a/MystEditor.js +++ b/MystEditor.js @@ -1,6 +1,6 @@ -var q2e = Object.defineProperty; -var Y2e = (t, e, r) => e in t ? q2e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var Mr = (t, e, r) => (Y2e(t, typeof e != "symbol" ? e + "" : e, r), r), W2e = (t, e, r) => { +var X2e = Object.defineProperty; +var H2e = (t, e, r) => e in t ? X2e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; +var Cr = (t, e, r) => (H2e(t, typeof e != "symbol" ? e + "" : e, r), r), Z2e = (t, e, r) => { if (!e.has(t)) throw TypeError("Cannot " + r); }; @@ -9,14 +9,14 @@ var Kw = (t, e, r) => { throw TypeError("Cannot add the same private member more than once"); e instanceof WeakSet ? e.add(t) : e.set(t, r); }; -var dv = (t, e, r) => (W2e(t, e, "access private method"), r); -var Dx, Ut, _j, Aj, qd, RB, Lj, O7, Rj, o2 = {}, Mj = [], G2e = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, kT = Array.isArray; -function Vu(t, e) { +var dv = (t, e, r) => (Z2e(t, e, "access private method"), r); +var Dx, Ut, Lj, Rj, Yd, DB, Mj, T7, Dj, o2 = {}, Pj = [], j2e = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ST = Array.isArray; +function qu(t, e) { for (var r in e) t[r] = e[r]; return t; } -function Dj(t) { +function Nj(t) { var e = t.parentNode; e && e.removeChild(t); } @@ -30,10 +30,10 @@ function iu(t, e, r) { return Ay(t, a, n, i, null); } function Ay(t, e, r, n, i) { - var s = { type: t, props: e, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i == null ? ++_j : i, __i: -1, __u: 0 }; + var s = { type: t, props: e, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i == null ? ++Lj : i, __i: -1, __u: 0 }; return i == null && Ut.vnode != null && Ut.vnode(s), s; } -function X2e() { +function K2e() { return { current: null }; } function su(t) { @@ -42,15 +42,15 @@ function su(t) { function Ul(t, e) { this.props = t, this.context = e; } -function rm(t, e) { +function nm(t, e) { if (e == null) - return t.__ ? rm(t.__, t.__i + 1) : null; + return t.__ ? nm(t.__, t.__i + 1) : null; for (var r; e < t.__k.length; e++) if ((r = t.__k[e]) != null && r.__e != null) return r.__e; - return typeof t.type == "function" ? rm(t) : null; + return typeof t.type == "function" ? nm(t) : null; } -function Pj(t) { +function Ij(t) { var e, r; if ((t = t.__) != null && t.__c != null) { for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) @@ -58,47 +58,47 @@ function Pj(t) { t.__e = t.__c.base = r.__e; break; } - return Pj(t); + return Ij(t); } } -function k7(t) { - (!t.__d && (t.__d = !0) && qd.push(t) && !lk.__r++ || RB !== Ut.debounceRendering) && ((RB = Ut.debounceRendering) || Lj)(lk); +function C7(t) { + (!t.__d && (t.__d = !0) && Yd.push(t) && !lk.__r++ || DB !== Ut.debounceRendering) && ((DB = Ut.debounceRendering) || Mj)(lk); } function lk() { var t, e, r, n, i, s, a, o, l; - for (qd.sort(O7); t = qd.shift(); ) - t.__d && (e = qd.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = Vu({}, i)).__v = i.__v + 1, Ut.vnode && Ut.vnode(n), RM(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? rm(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, $j(o, n, l), n.__e != s && Pj(n)), qd.length > e && qd.sort(O7)); + for (Yd.sort(T7); t = Yd.shift(); ) + t.__d && (e = Yd.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = qu({}, i)).__v = i.__v + 1, Ut.vnode && Ut.vnode(n), DM(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? nm(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, Fj(o, n, l), n.__e != s && Ij(n)), Yd.length > e && Yd.sort(T7)); lk.__r = 0; } -function Nj(t, e, r, n, i, s, a, o, l, u, h) { - var f, d, p, g, m, v = n && n.__k || Mj, y = e.length; - for (r.__d = l, H2e(r, e, v), l = r.__d, f = 0; f < y; f++) - (p = r.__k[f]) != null && typeof p != "boolean" && typeof p != "function" && (d = p.__i === -1 ? o2 : v[p.__i] || o2, p.__i = f, RM(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && MM(d.ref, null, p), h.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), 65536 & p.__u || d.__k === p.__k ? l = Ij(p, l, t) : typeof p.type == "function" && p.__d !== void 0 ? l = p.__d : g && (l = g.nextSibling), p.__d = void 0, p.__u &= -196609); +function $j(t, e, r, n, i, s, a, o, l, u, h) { + var f, d, p, g, m, v = n && n.__k || Pj, y = e.length; + for (r.__d = l, J2e(r, e, v), l = r.__d, f = 0; f < y; f++) + (p = r.__k[f]) != null && typeof p != "boolean" && typeof p != "function" && (d = p.__i === -1 ? o2 : v[p.__i] || o2, p.__i = f, DM(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && PM(d.ref, null, p), h.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), 65536 & p.__u || d.__k === p.__k ? l = Bj(p, l, t) : typeof p.type == "function" && p.__d !== void 0 ? l = p.__d : g && (l = g.nextSibling), p.__d = void 0, p.__u &= -196609); r.__d = l, r.__e = m; } -function H2e(t, e, r) { +function J2e(t, e, r) { var n, i, s, a, o, l = e.length, u = r.length, h = u, f = 0; for (t.__k = [], n = 0; n < l; n++) - (i = t.__k[n] = (i = e[n]) == null || typeof i == "boolean" || typeof i == "function" ? null : typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? Ay(null, i, null, null, i) : kT(i) ? Ay(su, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? Ay(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = Z2e(i, r, a = n + f, h), i.__i = o, s = null, o !== -1 && (h--, (s = r[o]) && (s.__u |= 131072)), s == null || s.__v === null ? (o == -1 && f--, typeof i.type != "function" && (i.__u |= 65536)) : o !== a && (o === a + 1 ? f++ : o > a ? h > l - a ? f += o - a : f-- : f = o < a && o == a - 1 ? o - a : 0, o !== n + f && (i.__u |= 65536))) : (s = r[n]) && s.key == null && s.__e && (s.__e == t.__d && (t.__d = rm(s)), S7(s, s, !1), r[n] = null, h--); + (i = t.__k[n] = (i = e[n]) == null || typeof i == "boolean" || typeof i == "function" ? null : typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? Ay(null, i, null, null, i) : ST(i) ? Ay(su, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? Ay(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = ebe(i, r, a = n + f, h), i.__i = o, s = null, o !== -1 && (h--, (s = r[o]) && (s.__u |= 131072)), s == null || s.__v === null ? (o == -1 && f--, typeof i.type != "function" && (i.__u |= 65536)) : o !== a && (o === a + 1 ? f++ : o > a ? h > l - a ? f += o - a : f-- : f = o < a && o == a - 1 ? o - a : 0, o !== n + f && (i.__u |= 65536))) : (s = r[n]) && s.key == null && s.__e && (s.__e == t.__d && (t.__d = nm(s)), E7(s, s, !1), r[n] = null, h--); if (h) for (n = 0; n < u; n++) - (s = r[n]) != null && (131072 & s.__u) == 0 && (s.__e == t.__d && (t.__d = rm(s)), S7(s, s)); + (s = r[n]) != null && (131072 & s.__u) == 0 && (s.__e == t.__d && (t.__d = nm(s)), E7(s, s)); } -function Ij(t, e, r) { +function Bj(t, e, r) { var n, i; if (typeof t.type == "function") { for (n = t.__k, i = 0; n && i < n.length; i++) - n[i] && (n[i].__ = t, e = Ij(n[i], e, r)); + n[i] && (n[i].__ = t, e = Bj(n[i], e, r)); return e; } return t.__e != e && (r.insertBefore(t.__e, e || null), e = t.__e), e && e.nextSibling; } -function Hu(t, e) { - return e = e || [], t == null || typeof t == "boolean" || (kT(t) ? t.some(function(r) { - Hu(r, e); +function Zu(t, e) { + return e = e || [], t == null || typeof t == "boolean" || (ST(t) ? t.some(function(r) { + Zu(r, e); }) : e.push(t)), e; } -function Z2e(t, e, r, n) { +function ebe(t, e, r, n) { var i = t.key, s = t.type, a = r - 1, o = r + 1, l = e[r]; if (l === null || l && i == l.key && s === l.type) return r; @@ -117,8 +117,8 @@ function Z2e(t, e, r, n) { } return -1; } -function MB(t, e, r) { - e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || G2e.test(e) ? r : r + "px"; +function PB(t, e, r) { + e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || j2e.test(e) ? r : r + "px"; } function Jw(t, e, r, n, i) { var s; @@ -129,13 +129,13 @@ function Jw(t, e, r, n, i) { else { if (typeof n == "string" && (t.style.cssText = n = ""), n) for (e in n) - r && e in r || MB(t.style, e, ""); + r && e in r || PB(t.style, e, ""); if (r) for (e in r) - n && r[e] === n[e] || MB(t.style, e, r[e]); + n && r[e] === n[e] || PB(t.style, e, r[e]); } else if (e[0] === "o" && e[1] === "n") - s = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = r, r ? n ? r.u = n.u : (r.u = Date.now(), t.addEventListener(e, s ? PB : DB, s)) : t.removeEventListener(e, s ? PB : DB, s); + s = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = r, r ? n ? r.u = n.u : (r.u = Date.now(), t.addEventListener(e, s ? IB : NB, s)) : t.removeEventListener(e, s ? IB : NB, s); else { if (i) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); @@ -148,7 +148,7 @@ function Jw(t, e, r, n, i) { typeof r == "function" || (r == null || r === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, r)); } } -function DB(t) { +function NB(t) { var e = this.l[t.type + !1]; if (t.t) { if (t.t <= e.u) @@ -157,10 +157,10 @@ function DB(t) { t.t = Date.now(); return e(Ut.event ? Ut.event(t) : t); } -function PB(t) { +function IB(t) { return this.l[t.type + !0](Ut.event ? Ut.event(t) : t); } -function RM(t, e, r, n, i, s, a, o, l, u) { +function DM(t, e, r, n, i, s, a, o, l, u) { var h, f, d, p, g, m, v, y, b, w, O, S, C, T, A, E = e.type; if (e.constructor !== void 0) return null; @@ -168,7 +168,7 @@ function RM(t, e, r, n, i, s, a, o, l, u) { e: if (typeof E == "function") try { - if (y = e.props, b = (h = E.contextType) && n[h.__c], w = h ? b ? b.props.value : h.__ : n, r.__c ? v = (f = e.__c = r.__c).__ = f.__E : ("prototype" in E && E.prototype.render ? e.__c = f = new E(y, w) : (e.__c = f = new Ul(y, w), f.constructor = E, f.render = K2e), b && b.sub(f), f.props = y, f.state || (f.state = {}), f.context = w, f.__n = n, d = f.__d = !0, f.__h = [], f._sb = []), f.__s == null && (f.__s = f.state), E.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = Vu({}, f.__s)), Vu(f.__s, E.getDerivedStateFromProps(y, f.__s))), p = f.props, g = f.state, f.__v = e, d) + if (y = e.props, b = (h = E.contextType) && n[h.__c], w = h ? b ? b.props.value : h.__ : n, r.__c ? v = (f = e.__c = r.__c).__ = f.__E : ("prototype" in E && E.prototype.render ? e.__c = f = new E(y, w) : (e.__c = f = new Ul(y, w), f.constructor = E, f.render = rbe), b && b.sub(f), f.props = y, f.state || (f.state = {}), f.context = w, f.__n = n, d = f.__d = !0, f.__h = [], f._sb = []), f.__s == null && (f.__s = f.state), E.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = qu({}, f.__s)), qu(f.__s, E.getDerivedStateFromProps(y, f.__s))), p = f.props, g = f.state, f.__v = e, d) E.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), f.componentDidMount != null && f.__h.push(f.componentDidMount); else { if (E.getDerivedStateFromProps == null && y !== p && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, w), !f.__e && (f.shouldComponentUpdate != null && f.shouldComponentUpdate(y, f.__s, w) === !1 || e.__v === r.__v)) { @@ -191,18 +191,18 @@ function RM(t, e, r, n, i, s, a, o, l, u) { do f.__d = !1, S && S(e), h = f.render(f.props, f.state, f.context), f.state = f.__s; while (f.__d && ++C < 25); - f.state = f.__s, f.getChildContext != null && (n = Vu(Vu({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), Nj(t, kT(A = h != null && h.type === su && h.key == null ? h.props.children : h) ? A : [A], e, r, n, i, s, a, o, l, u), f.base = e.__e, e.__u &= -161, f.__h.length && a.push(f), v && (f.__E = f.__ = null); + f.state = f.__s, f.getChildContext != null && (n = qu(qu({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), $j(t, ST(A = h != null && h.type === su && h.key == null ? h.props.children : h) ? A : [A], e, r, n, i, s, a, o, l, u), f.base = e.__e, e.__u &= -161, f.__h.length && a.push(f), v && (f.__E = f.__ = null); } catch (R) { e.__v = null, l || s != null ? (e.__e = o, e.__u |= l ? 160 : 32, s[s.indexOf(o)] = null) : (e.__e = r.__e, e.__k = r.__k), Ut.__e(R, e, r); } else - s == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = j2e(r.__e, e, r, n, i, s, a, l, u); + s == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = tbe(r.__e, e, r, n, i, s, a, l, u); (h = Ut.diffed) && h(e); } -function $j(t, e, r) { +function Fj(t, e, r) { e.__d = void 0; for (var n = 0; n < r.length; n++) - MM(r[n], r[++n], r[++n]); + PM(r[n], r[++n], r[++n]); Ut.__c && Ut.__c(e, t), t.some(function(i) { try { t = i.__h, i.__h = [], t.some(function(s) { @@ -213,7 +213,7 @@ function $j(t, e, r) { } }); } -function j2e(t, e, r, n, i, s, a, o, l) { +function tbe(t, e, r, n, i, s, a, o, l) { var u, h, f, d, p, g, m, v = r.props, y = e.props, b = e.type; if (b === "svg" && (i = !0), s != null) { for (u = 0; u < s.length; u++) @@ -239,23 +239,23 @@ function j2e(t, e, r, n, i, s, a, o, l) { p = y[u], u == "children" ? d = p : u == "dangerouslySetInnerHTML" ? h = p : u == "value" ? g = p : u == "checked" ? m = p : u === "key" || o && typeof p != "function" || v[u] === p || Jw(t, u, p, v[u], i); if (h) o || f && (h.__html === f.__html || h.__html === t.innerHTML) || (t.innerHTML = h.__html), e.__k = []; - else if (f && (t.innerHTML = ""), Nj(t, kT(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && rm(r, 0), o, l), s != null) + else if (f && (t.innerHTML = ""), $j(t, ST(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && nm(r, 0), o, l), s != null) for (u = s.length; u--; ) - s[u] != null && Dj(s[u]); + s[u] != null && Nj(s[u]); o || (u = "value", g !== void 0 && (g !== t[u] || b === "progress" && !g || b === "option" && g !== v[u]) && Jw(t, u, g, v[u], !1), u = "checked", m !== void 0 && m !== t[u] && Jw(t, u, m, v[u], !1)); } return t; } -function MM(t, e, r) { +function PM(t, e, r) { try { typeof t == "function" ? t(e) : t.current = e; } catch (n) { Ut.__e(n, r); } } -function S7(t, e, r) { +function E7(t, e, r) { var n, i; - if (Ut.unmount && Ut.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || MM(n, null, e)), (n = t.__c) != null) { + if (Ut.unmount && Ut.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || PM(n, null, e)), (n = t.__c) != null) { if (n.componentWillUnmount) try { n.componentWillUnmount(); @@ -266,27 +266,27 @@ function S7(t, e, r) { } if (n = t.__k) for (i = 0; i < n.length; i++) - n[i] && S7(n[i], e, r || typeof t.type != "function"); - r || t.__e == null || Dj(t.__e), t.__ = t.__e = t.__d = void 0; + n[i] && E7(n[i], e, r || typeof t.type != "function"); + r || t.__e == null || Nj(t.__e), t.__ = t.__e = t.__d = void 0; } -function K2e(t, e, r) { +function rbe(t, e, r) { return this.constructor(t, r); } function jc(t, e, r) { var n, i, s, a; - Ut.__ && Ut.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], RM(e, t = (!n && r || e).__k = iu(su, null, [t]), i || o2, o2, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? Dx.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), $j(s, t, a); + Ut.__ && Ut.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], DM(e, t = (!n && r || e).__k = iu(su, null, [t]), i || o2, o2, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? Dx.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), Fj(s, t, a); } -function Bj(t, e) { - jc(t, e, Bj); +function zj(t, e) { + jc(t, e, zj); } -function J2e(t, e, r) { - var n, i, s, a, o = Vu({}, t.props); +function nbe(t, e, r) { + var n, i, s, a, o = qu({}, t.props); for (s in t.type && t.type.defaultProps && (a = t.type.defaultProps), e) s == "key" ? n = e[s] : s == "ref" ? i = e[s] : o[s] = e[s] === void 0 && a !== void 0 ? a[s] : e[s]; return arguments.length > 2 && (o.children = arguments.length > 3 ? Dx.call(arguments, 2) : r), Ay(t.type, o, n || t.key, i || t.ref, null); } -function Fj(t, e) { - var r = { __c: e = "__cC" + Rj++, __: t, Consumer: function(n, i) { +function Qj(t, e) { + var r = { __c: e = "__cC" + Dj++, __: t, Consumer: function(n, i) { return n.children(i); }, Provider: function(n) { var i, s; @@ -294,7 +294,7 @@ function Fj(t, e) { return s; }, this.shouldComponentUpdate = function(a) { this.props.value !== a.value && i.some(function(o) { - o.__e = !0, k7(o); + o.__e = !0, C7(o); }); }, this.sub = function(a) { i.push(a); @@ -306,7 +306,7 @@ function Fj(t, e) { } }; return r.Provider.__ = r.Consumer.contextType = r; } -Dx = Mj.slice, Ut = { __e: function(t, e, r, n) { +Dx = Pj.slice, Ut = { __e: function(t, e, r, n) { for (var i, s, a; e = e.__; ) if ((i = e.__c) && !i.__) try { @@ -316,28 +316,28 @@ Dx = Mj.slice, Ut = { __e: function(t, e, r, n) { t = o; } throw t; -} }, _j = 0, Aj = function(t) { +} }, Lj = 0, Rj = function(t) { return t != null && t.constructor == null; }, Ul.prototype.setState = function(t, e) { var r; - r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Vu({}, this.state), typeof t == "function" && (t = t(Vu({}, r), this.props)), t && Vu(r, t), t != null && this.__v && (e && this._sb.push(e), k7(this)); + r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = qu({}, this.state), typeof t == "function" && (t = t(qu({}, r), this.props)), t && qu(r, t), t != null && this.__v && (e && this._sb.push(e), C7(this)); }, Ul.prototype.forceUpdate = function(t) { - this.__v && (this.__e = !0, t && this.__h.push(t), k7(this)); -}, Ul.prototype.render = su, qd = [], Lj = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, O7 = function(t, e) { + this.__v && (this.__e = !0, t && this.__h.push(t), C7(this)); +}, Ul.prototype.render = su, Yd = [], Mj = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, T7 = function(t, e) { return t.__v.__b - e.__v.__b; -}, lk.__r = 0, Rj = 0; -var Mf, Mn, o_, NB, nm = 0, zj = [], q4 = [], IB = Ut.__b, $B = Ut.__r, BB = Ut.diffed, FB = Ut.__c, zB = Ut.unmount; -function g1(t, e) { - Ut.__h && Ut.__h(Mn, t, nm || e), nm = 0; +}, lk.__r = 0, Dj = 0; +var Df, Mn, u_, $B, im = 0, Uj = [], q4 = [], BB = Ut.__b, FB = Ut.__r, zB = Ut.diffed, QB = Ut.__c, UB = Ut.unmount; +function m1(t, e) { + Ut.__h && Ut.__h(Mn, t, im || e), im = 0; var r = Mn.__H || (Mn.__H = { __: [], __h: [] }); return t >= r.__.length && r.__.push({ __V: q4 }), r.__[t]; } function fi(t) { - return nm = 1, ST(Qj, t); + return im = 1, TT(Vj, t); } -function ST(t, e, r) { - var n = g1(Mf++, 2); - if (n.t = t, !n.__c && (n.__ = [r ? r(e) : Qj(void 0, e), function(o) { +function TT(t, e, r) { + var n = m1(Df++, 2); + if (n.t = t, !n.__c && (n.__ = [r ? r(e) : Vj(void 0, e), function(o) { var l = n.__N ? n.__N[0] : n.__[0], u = n.t(l, o); l !== u && (n.__N = [u, n.__[1]], n.__c.setState({})); }], n.__c = Mn, !Mn.u)) { @@ -372,20 +372,20 @@ function ST(t, e, r) { return n.__N || n.__; } function ri(t, e) { - var r = g1(Mf++, 3); - !Ut.__s && DM(r.__H, e) && (r.__ = t, r.i = e, Mn.__H.__h.push(r)); + var r = m1(Df++, 3); + !Ut.__s && NM(r.__H, e) && (r.__ = t, r.i = e, Mn.__H.__h.push(r)); } -function TT(t, e) { - var r = g1(Mf++, 4); - !Ut.__s && DM(r.__H, e) && (r.__ = t, r.i = e, Mn.__h.push(r)); +function CT(t, e) { + var r = m1(Df++, 4); + !Ut.__s && NM(r.__H, e) && (r.__ = t, r.i = e, Mn.__h.push(r)); } function Ss(t) { - return nm = 5, vi(function() { + return im = 5, vi(function() { return { current: t }; }, []); } -function ebe(t, e, r) { - nm = 6, TT(function() { +function ibe(t, e, r) { + im = 6, CT(function() { return typeof t == "function" ? (t(e()), function() { return t(null); }) : t ? (t.current = e(), function() { @@ -394,23 +394,23 @@ function ebe(t, e, r) { }, r == null ? r : r.concat(t)); } function vi(t, e) { - var r = g1(Mf++, 7); - return DM(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; + var r = m1(Df++, 7); + return NM(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; } function ck(t, e) { - return nm = 8, vi(function() { + return im = 8, vi(function() { return t; }, e); } function cc(t) { - var e = Mn.context[t.__c], r = g1(Mf++, 9); + var e = Mn.context[t.__c], r = m1(Df++, 9); return r.c = t, e ? (r.__ == null && (r.__ = !0, e.sub(Mn)), e.props.value) : t.__; } -function T7(t, e) { +function _7(t, e) { Ut.useDebugValue && Ut.useDebugValue(e ? e(t) : t); } -function tbe() { - var t = g1(Mf++, 11); +function sbe() { + var t = m1(Df++, 11); if (!t.__) { for (var e = Mn.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__; @@ -419,43 +419,43 @@ function tbe() { } return t.__; } -function rbe() { - for (var t; t = zj.shift(); ) +function abe() { + for (var t; t = Uj.shift(); ) if (t.__P && t.__H) try { - t.__H.__h.forEach(Y4), t.__H.__h.forEach(C7), t.__H.__h = []; + t.__H.__h.forEach(Y4), t.__H.__h.forEach(A7), t.__H.__h = []; } catch (e) { t.__H.__h = [], Ut.__e(e, t.__v); } } Ut.__b = function(t) { - Mn = null, IB && IB(t); + Mn = null, BB && BB(t); }, Ut.__r = function(t) { - $B && $B(t), Mf = 0; + FB && FB(t), Df = 0; var e = (Mn = t.__c).__H; - e && (o_ === Mn ? (e.__h = [], Mn.__h = [], e.__.forEach(function(r) { + e && (u_ === Mn ? (e.__h = [], Mn.__h = [], e.__.forEach(function(r) { r.__N && (r.__ = r.__N), r.__V = q4, r.__N = r.i = void 0; - })) : (e.__h.forEach(Y4), e.__h.forEach(C7), e.__h = [], Mf = 0)), o_ = Mn; + })) : (e.__h.forEach(Y4), e.__h.forEach(A7), e.__h = [], Df = 0)), u_ = Mn; }, Ut.diffed = function(t) { - BB && BB(t); + zB && zB(t); var e = t.__c; - e && e.__H && (e.__H.__h.length && (zj.push(e) !== 1 && NB === Ut.requestAnimationFrame || ((NB = Ut.requestAnimationFrame) || nbe)(rbe)), e.__H.__.forEach(function(r) { + e && e.__H && (e.__H.__h.length && (Uj.push(e) !== 1 && $B === Ut.requestAnimationFrame || (($B = Ut.requestAnimationFrame) || obe)(abe)), e.__H.__.forEach(function(r) { r.i && (r.__H = r.i), r.__V !== q4 && (r.__ = r.__V), r.i = void 0, r.__V = q4; - })), o_ = Mn = null; + })), u_ = Mn = null; }, Ut.__c = function(t, e) { e.some(function(r) { try { r.__h.forEach(Y4), r.__h = r.__h.filter(function(n) { - return !n.__ || C7(n); + return !n.__ || A7(n); }); } catch (n) { e.some(function(i) { i.__h && (i.__h = []); }), e = [], Ut.__e(n, r.__v); } - }), FB && FB(t, e); + }), QB && QB(t, e); }, Ut.unmount = function(t) { - zB && zB(t); + UB && UB(t); var e, r = t.__c; r && r.__H && (r.__H.__.forEach(function(n) { try { @@ -465,27 +465,27 @@ Ut.__b = function(t) { } }), r.__H = void 0, e && Ut.__e(e, r.__v)); }; -var QB = typeof requestAnimationFrame == "function"; -function nbe(t) { +var VB = typeof requestAnimationFrame == "function"; +function obe(t) { var e, r = function() { - clearTimeout(n), QB && cancelAnimationFrame(e), setTimeout(t); + clearTimeout(n), VB && cancelAnimationFrame(e), setTimeout(t); }, n = setTimeout(r, 100); - QB && (e = requestAnimationFrame(r)); + VB && (e = requestAnimationFrame(r)); } function Y4(t) { var e = Mn, r = t.__c; typeof r == "function" && (t.__c = void 0, r()), Mn = e; } -function C7(t) { +function A7(t) { var e = Mn; t.__c = t.__(), Mn = e; } -function DM(t, e) { +function NM(t, e) { return !t || t.length !== e.length || e.some(function(r, n) { return r !== t[n]; }); } -function Qj(t, e) { +function Vj(t, e) { return typeof e == "function" ? e(t) : e; } var eo = function() { @@ -498,29 +498,29 @@ var eo = function() { return e; }, eo.apply(this, arguments); }; -function im(t, e, r) { +function sm(t, e, r) { if (r || arguments.length === 2) for (var n = 0, i = e.length, s; n < i; n++) (s || !(n in e)) && (s || (s = Array.prototype.slice.call(e, 0, n)), s[n] = e[n]); return t.concat(s || Array.prototype.slice.call(e)); } -function ibe(t) { +function lbe(t) { var e = /* @__PURE__ */ Object.create(null); return function(r) { return e[r] === void 0 && (e[r] = t(r)), e[r]; }; } -var sbe = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, abe = /* @__PURE__ */ ibe( +var cbe = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, ube = /* @__PURE__ */ lbe( function(t) { - return sbe.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; + return cbe.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; } ); -function Uj(t, e) { +function qj(t, e) { for (var r in e) t[r] = e[r]; return t; } -function E7(t, e) { +function L7(t, e) { for (var r in t) if (r !== "__source" && !(r in e)) return !0; @@ -529,73 +529,73 @@ function E7(t, e) { return !0; return !1; } -function _7(t) { +function R7(t) { this.props = t; } -function obe(t, e) { +function hbe(t, e) { function r(i) { var s = this.props.ref, a = s == i.ref; - return !a && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !a : E7(this.props, i); + return !a && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !a : L7(this.props, i); } function n(i) { return this.shouldComponentUpdate = r, iu(t, i); } return n.displayName = "Memo(" + (t.displayName || t.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n; } -(_7.prototype = new Ul()).isPureReactComponent = !0, _7.prototype.shouldComponentUpdate = function(t, e) { - return E7(this.props, t) || E7(this.state, e); +(R7.prototype = new Ul()).isPureReactComponent = !0, R7.prototype.shouldComponentUpdate = function(t, e) { + return L7(this.props, t) || L7(this.state, e); }; -var UB = Ut.__b; +var qB = Ut.__b; Ut.__b = function(t) { - t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), UB && UB(t); + t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), qB && qB(t); }; -var lbe = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; -function cbe(t) { +var fbe = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; +function dbe(t) { function e(r) { - var n = Uj({}, r); + var n = qj({}, r); return delete n.ref, t(n, r.ref || null); } - return e.$$typeof = lbe, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; + return e.$$typeof = fbe, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; } -var VB = function(t, e) { - return t == null ? null : Hu(Hu(t).map(e)); -}, ube = { map: VB, forEach: VB, count: function(t) { - return t ? Hu(t).length : 0; +var YB = function(t, e) { + return t == null ? null : Zu(Zu(t).map(e)); +}, pbe = { map: YB, forEach: YB, count: function(t) { + return t ? Zu(t).length : 0; }, only: function(t) { - var e = Hu(t); + var e = Zu(t); if (e.length !== 1) throw "Children.only"; return e[0]; -}, toArray: Hu }, hbe = Ut.__e; +}, toArray: Zu }, gbe = Ut.__e; Ut.__e = function(t, e, r, n) { if (t.then) { for (var i, s = e; s = s.__; ) if ((i = s.__c) && i.__c) return e.__e == null && (e.__e = r.__e, e.__k = r.__k), i.__c(t, e); } - hbe(t, e, r, n); + gbe(t, e, r, n); }; -var qB = Ut.unmount; -function Vj(t, e, r) { +var WB = Ut.unmount; +function Yj(t, e, r) { return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(n) { typeof n.__c == "function" && n.__c(); - }), t.__c.__H = null), (t = Uj({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { - return Vj(n, e, r); + }), t.__c.__H = null), (t = qj({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { + return Yj(n, e, r); })), t; } -function qj(t, e, r) { +function Wj(t, e, r) { return t && r && (t.__v = null, t.__k = t.__k && t.__k.map(function(n) { - return qj(n, e, r); + return Wj(n, e, r); }), t.__c && t.__c.__P === e && (t.__e && r.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = r)), t; } function W4() { this.__u = 0, this.t = null, this.__b = null; } -function Yj(t) { +function Gj(t) { var e = t.__.__c; return e && e.__a && e.__a(t); } -function fbe(t) { +function mbe(t) { var e, r, n; function i(s) { if (e || (e = t()).then(function(a) { @@ -615,11 +615,11 @@ function Kv() { } Ut.unmount = function(t) { var e = t.__c; - e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), qB && qB(t); + e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), WB && WB(t); }, (W4.prototype = new Ul()).__c = function(t, e) { var r = e.__c, n = this; n.t == null && (n.t = []), n.t.push(r); - var i = Yj(n.__v), s = !1, a = function() { + var i = Gj(n.__v), s = !1, a = function() { s || (s = !0, r.__R = null, i ? i(o) : o()); }; r.__R = a; @@ -627,7 +627,7 @@ Ut.unmount = function(t) { if (!--n.__u) { if (n.state.__a) { var l = n.state.__a; - n.__v.__k[0] = qj(l, l.__c.__P, l.__c.__O); + n.__v.__k[0] = Wj(l, l.__c.__P, l.__c.__O); } var u; for (n.setState({ __a: n.__b = null }); u = n.t.pop(); ) @@ -641,14 +641,14 @@ Ut.unmount = function(t) { if (this.__b) { if (this.__v.__k) { var r = document.createElement("div"), n = this.__v.__k[0].__c; - this.__v.__k[0] = Vj(this.__b, r, n.__O = n.__P); + this.__v.__k[0] = Yj(this.__b, r, n.__O = n.__P); } this.__b = null; } var i = e.__a && iu(su, null, t.fallback); return i && (i.__u &= -33), [iu(su, null, e.__a ? null : t.children), i]; }; -var YB = function(t, e, r) { +var GB = function(t, e, r) { if (++r[1] === r[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size)) for (r = t.u; r; ) { for (; r.length > 3; ) @@ -658,12 +658,12 @@ var YB = function(t, e, r) { t.u = r = r[2]; } }; -function dbe(t) { +function vbe(t) { return this.getChildContext = function() { return t.context; }, t.children; } -function pbe(t) { +function ybe(t) { var e = this, r = t.i; e.componentWillUnmount = function() { jc(null, e.l), e.l = null, e.i = null; @@ -673,23 +673,23 @@ function pbe(t) { this.childNodes.push(n), e.i.appendChild(n); }, removeChild: function(n) { this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n); - } }), jc(iu(dbe, { context: e.context }, t.__v), e.l); + } }), jc(iu(vbe, { context: e.context }, t.__v), e.l); } -function gbe(t, e) { - var r = iu(pbe, { __v: t, i: e }); +function bbe(t, e) { + var r = iu(ybe, { __v: t, i: e }); return r.containerInfo = e, r; } (Kv.prototype = new Ul()).__a = function(t) { - var e = this, r = Yj(e.__v), n = e.o.get(t); + var e = this, r = Gj(e.__v), n = e.o.get(t); return n[0]++, function(i) { var s = function() { - e.props.revealOrder ? (n.push(i), YB(e, t, n)) : i(); + e.props.revealOrder ? (n.push(i), GB(e, t, n)) : i(); }; r ? r(s) : s(); }; }, Kv.prototype.render = function(t) { this.u = null, this.o = /* @__PURE__ */ new Map(); - var e = Hu(t.children); + var e = Zu(t.children); t.revealOrder && t.revealOrder[0] === "b" && e.reverse(); for (var r = e.length; r--; ) this.o.set(e[r], this.u = [1, 0, this.u]); @@ -697,17 +697,17 @@ function gbe(t, e) { }, Kv.prototype.componentDidUpdate = Kv.prototype.componentDidMount = function() { var t = this; this.o.forEach(function(e, r) { - YB(t, r, e); + GB(t, r, e); }); }; -var Wj = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, mbe = /^(?: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]/, vbe = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ybe = /[A-Z0-9]/g, bbe = typeof document < "u", xbe = function(t) { +var Xj = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, xbe = /^(?: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]/, wbe = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Obe = /[A-Z0-9]/g, kbe = typeof document < "u", Sbe = function(t) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t); }; -function wbe(t, e, r) { +function Tbe(t, e, r) { return e.__k == null && (e.textContent = ""), jc(t, e), typeof r == "function" && r(), t ? t.__c : null; } -function Obe(t, e, r) { - return Bj(t, e), typeof r == "function" && r(), t ? t.__c : null; +function Cbe(t, e, r) { + return zj(t, e), typeof r == "function" && r(), t ? t.__c : null; } Ul.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) { Object.defineProperty(Ul.prototype, t, { configurable: !0, get: function() { @@ -716,95 +716,95 @@ Ul.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceive Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e }); } }); }); -var WB = Ut.event; -function kbe() { +var XB = Ut.event; +function Ebe() { } -function Sbe() { +function _be() { return this.cancelBubble; } -function Tbe() { +function Abe() { return this.defaultPrevented; } Ut.event = function(t) { - return WB && (t = WB(t)), t.persist = kbe, t.isPropagationStopped = Sbe, t.isDefaultPrevented = Tbe, t.nativeEvent = t; + return XB && (t = XB(t)), t.persist = Ebe, t.isPropagationStopped = _be, t.isDefaultPrevented = Abe, t.nativeEvent = t; }; -var PM, Cbe = { enumerable: !1, configurable: !0, get: function() { +var IM, Lbe = { enumerable: !1, configurable: !0, get: function() { return this.class; -} }, GB = Ut.vnode; +} }, HB = Ut.vnode; Ut.vnode = function(t) { typeof t.type == "string" && function(e) { var r = e.props, n = e.type, i = {}; for (var s in r) { var a = r[s]; - if (!(s === "value" && "defaultValue" in r && a == null || bbe && s === "children" && n === "noscript" || s === "class" || s === "className")) { + if (!(s === "value" && "defaultValue" in r && a == null || kbe && s === "children" && n === "noscript" || s === "class" || s === "className")) { var o = s.toLowerCase(); - s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : o === "ondoubleclick" ? s = "ondblclick" : o !== "onchange" || n !== "input" && n !== "textarea" || xbe(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : vbe.test(s) ? s = o : n.indexOf("-") === -1 && mbe.test(s) ? s = s.replace(ybe, "-$&").toLowerCase() : a === null && (a = void 0) : o = s = "oninput", o === "oninput" && i[s = o] && (s = "oninputCapture"), i[s] = a; + s === "defaultValue" && "value" in r && r.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : o === "ondoubleclick" ? s = "ondblclick" : o !== "onchange" || n !== "input" && n !== "textarea" || Sbe(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : wbe.test(s) ? s = o : n.indexOf("-") === -1 && xbe.test(s) ? s = s.replace(Obe, "-$&").toLowerCase() : a === null && (a = void 0) : o = s = "oninput", o === "oninput" && i[s = o] && (s = "oninputCapture"), i[s] = a; } } - n == "select" && i.multiple && Array.isArray(i.value) && (i.value = Hu(r.children).forEach(function(l) { + n == "select" && i.multiple && Array.isArray(i.value) && (i.value = Zu(r.children).forEach(function(l) { l.props.selected = i.value.indexOf(l.props.value) != -1; - })), n == "select" && i.defaultValue != null && (i.value = Hu(r.children).forEach(function(l) { + })), n == "select" && i.defaultValue != null && (i.value = Zu(r.children).forEach(function(l) { l.props.selected = i.multiple ? i.defaultValue.indexOf(l.props.value) != -1 : i.defaultValue == l.props.value; - })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", Cbe)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; - }(t), t.$$typeof = Wj, GB && GB(t); + })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", Lbe)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; + }(t), t.$$typeof = Xj, HB && HB(t); }; -var XB = Ut.__r; +var ZB = Ut.__r; Ut.__r = function(t) { - XB && XB(t), PM = t.__c; + ZB && ZB(t), IM = t.__c; }; -var HB = Ut.diffed; +var jB = Ut.diffed; Ut.diffed = function(t) { - HB && HB(t); + jB && jB(t); var e = t.props, r = t.__e; - r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value), PM = null; + r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value), IM = null; }; -var Ebe = { ReactCurrentDispatcher: { current: { readContext: function(t) { - return PM.__n[t.__c].props.value; +var Rbe = { ReactCurrentDispatcher: { current: { readContext: function(t) { + return IM.__n[t.__c].props.value; } } } }; -function _be(t) { +function Mbe(t) { return iu.bind(null, t); } -function CT(t) { - return !!t && t.$$typeof === Wj; +function ET(t) { + return !!t && t.$$typeof === Xj; } -function Abe(t) { - return CT(t) && t.type === su; +function Dbe(t) { + return ET(t) && t.type === su; } -function Lbe(t) { - return CT(t) ? J2e.apply(null, arguments) : t; +function Pbe(t) { + return ET(t) ? nbe.apply(null, arguments) : t; } -function Rbe(t) { +function Nbe(t) { return !!t.__k && (jc(null, t), !0); } -function Mbe(t) { +function Ibe(t) { return t && (t.base || t.nodeType === 1 && t) || null; } -var Dbe = function(t, e) { +var $be = function(t, e) { return t(e); -}, Pbe = function(t, e) { +}, Bbe = function(t, e) { return t(e); -}, Nbe = su; -function Gj(t) { +}, Fbe = su; +function Hj(t) { t(); } -function Ibe(t) { +function zbe(t) { return t; } -function $be() { - return [!1, Gj]; +function Qbe() { + return [!1, Hj]; } -var Bbe = TT, Fbe = CT; -function zbe(t, e) { +var Ube = CT, Vbe = ET; +function qbe(t, e) { var r = e(), n = fi({ h: { __: r, v: e } }), i = n[0].h, s = n[1]; - return TT(function() { - i.__ = r, i.v = e, l_(i) && s({ h: i }); + return CT(function() { + i.__ = r, i.v = e, h_(i) && s({ h: i }); }, [t, r, e]), ri(function() { - return l_(i) && s({ h: i }), t(function() { - l_(i) && s({ h: i }); + return h_(i) && s({ h: i }), t(function() { + h_(i) && s({ h: i }); }); }, [t]), r; } -function l_(t) { +function h_(t) { var e, r, n = t.v, i = t.__; try { var s = n(); @@ -813,11 +813,11 @@ function l_(t) { return !0; } } -var C0 = { useState: fi, useId: tbe, useReducer: ST, useEffect: ri, useLayoutEffect: TT, useInsertionEffect: Bbe, useTransition: $be, useDeferredValue: Ibe, useSyncExternalStore: zbe, startTransition: Gj, useRef: Ss, useImperativeHandle: ebe, useMemo: vi, useCallback: ck, useContext: cc, useDebugValue: T7, version: "17.0.2", Children: ube, render: wbe, hydrate: Obe, unmountComponentAtNode: Rbe, createPortal: gbe, createElement: iu, createContext: Fj, createFactory: _be, cloneElement: Lbe, createRef: X2e, Fragment: su, isValidElement: CT, isElement: Fbe, isFragment: Abe, findDOMNode: Mbe, Component: Ul, PureComponent: _7, memo: obe, forwardRef: cbe, flushSync: Pbe, unstable_batchedUpdates: Dbe, StrictMode: Nbe, Suspense: W4, SuspenseList: Kv, lazy: fbe, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ebe }, wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function Xj(t) { +var E0 = { useState: fi, useId: sbe, useReducer: TT, useEffect: ri, useLayoutEffect: CT, useInsertionEffect: Ube, useTransition: Qbe, useDeferredValue: zbe, useSyncExternalStore: qbe, startTransition: Hj, useRef: Ss, useImperativeHandle: ibe, useMemo: vi, useCallback: ck, useContext: cc, useDebugValue: _7, version: "17.0.2", Children: pbe, render: Tbe, hydrate: Cbe, unmountComponentAtNode: Nbe, createPortal: bbe, createElement: iu, createContext: Qj, createFactory: Mbe, cloneElement: Pbe, createRef: K2e, Fragment: su, isValidElement: ET, isElement: Vbe, isFragment: Dbe, findDOMNode: Ibe, Component: Ul, PureComponent: R7, memo: hbe, forwardRef: dbe, flushSync: Bbe, unstable_batchedUpdates: $be, StrictMode: Fbe, Suspense: W4, SuspenseList: Kv, lazy: mbe, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Rbe }, wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function Zj(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -function Hj(t) { +function jj(t) { var e = t.default; if (typeof e == "function") { var r = function() { @@ -838,7 +838,7 @@ function Hj(t) { }); }), r; } -var Qbe = function(e, r, n, i) { +var Ybe = function(e, r, n, i) { var s = n ? n.call(i, e, r) : void 0; if (s !== void 0) return !!s; @@ -858,17 +858,17 @@ var Qbe = function(e, r, n, i) { return !1; } return !0; -}, An = "-ms-", Ly = "-moz-", jr = "-webkit-", Zj = "comm", ET = "rule", NM = "decl", Ube = "@import", jj = "@keyframes", Vbe = "@layer", qbe = Math.abs, IM = String.fromCharCode, A7 = Object.assign; -function Ybe(t, e) { +}, An = "-ms-", Ly = "-moz-", jr = "-webkit-", Kj = "comm", _T = "rule", $M = "decl", Wbe = "@import", Jj = "@keyframes", Gbe = "@layer", Xbe = Math.abs, BM = String.fromCharCode, M7 = Object.assign; +function Hbe(t, e) { return rs(t, 0) ^ 45 ? (((e << 2 ^ rs(t, 0)) << 2 ^ rs(t, 1)) << 2 ^ rs(t, 2)) << 2 ^ rs(t, 3) : 0; } -function Kj(t) { +function eK(t) { return t.trim(); } -function Iu(t, e) { +function $u(t, e) { return (t = e.exec(t)) ? t[0] : t; } -function Lr(t, e, r) { +function Rr(t, e, r) { return t.replace(e, r); } function G4(t, e) { @@ -877,57 +877,57 @@ function G4(t, e) { function rs(t, e) { return t.charCodeAt(e) | 0; } -function sm(t, e, r) { +function am(t, e, r) { return t.slice(e, r); } function Mc(t) { return t.length; } -function Jj(t) { +function tK(t) { return t.length; } function Jv(t, e) { return e.push(t), t; } -function Wbe(t, e) { +function Zbe(t, e) { return t.map(e).join(""); } -function ZB(t, e) { +function KB(t, e) { return t.filter(function(r) { - return !Iu(r, e); + return !$u(r, e); }); } -var _T = 1, am = 1, eK = 0, cl = 0, ki = 0, m1 = ""; -function AT(t, e, r, n, i, s, a, o) { - return { value: t, root: e, parent: r, type: n, props: i, children: s, line: _T, column: am, length: a, return: "", siblings: o }; +var AT = 1, om = 1, rK = 0, cl = 0, ki = 0, v1 = ""; +function LT(t, e, r, n, i, s, a, o) { + return { value: t, root: e, parent: r, type: n, props: i, children: s, line: AT, column: om, length: a, return: "", siblings: o }; } -function Gh(t, e) { - return A7(AT("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); +function Xh(t, e) { + return M7(LT("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); } -function Up(t) { +function Vp(t) { for (; t.root; ) - t = Gh(t.root, { children: [t] }); + t = Xh(t.root, { children: [t] }); Jv(t, t.siblings); } -function Gbe() { +function jbe() { return ki; } -function Xbe() { - return ki = cl > 0 ? rs(m1, --cl) : 0, am--, ki === 10 && (am = 1, _T--), ki; +function Kbe() { + return ki = cl > 0 ? rs(v1, --cl) : 0, om--, ki === 10 && (om = 1, AT--), ki; } function Vl() { - return ki = cl < eK ? rs(m1, cl++) : 0, am++, ki === 10 && (am = 1, _T++), ki; + return ki = cl < rK ? rs(v1, cl++) : 0, om++, ki === 10 && (om = 1, AT++), ki; } -function y0() { - return rs(m1, cl); +function b0() { + return rs(v1, cl); } function X4() { return cl; } -function LT(t, e) { - return sm(m1, t, e); +function RT(t, e) { + return am(v1, t, e); } -function L7(t) { +function D7(t) { switch (t) { case 0: case 9: @@ -959,36 +959,36 @@ function L7(t) { } return 0; } -function Hbe(t) { - return _T = am = 1, eK = Mc(m1 = t), cl = 0, []; +function Jbe(t) { + return AT = om = 1, rK = Mc(v1 = t), cl = 0, []; } -function Zbe(t) { - return m1 = "", t; +function exe(t) { + return v1 = "", t; } -function c_(t) { - return Kj(LT(cl - 1, R7(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); +function f_(t) { + return eK(RT(cl - 1, P7(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); } -function jbe(t) { - for (; (ki = y0()) && ki < 33; ) +function txe(t) { + for (; (ki = b0()) && ki < 33; ) Vl(); - return L7(t) > 2 || L7(ki) > 3 ? "" : " "; + return D7(t) > 2 || D7(ki) > 3 ? "" : " "; } -function Kbe(t, e) { +function rxe(t, e) { for (; --e && Vl() && !(ki < 48 || ki > 102 || ki > 57 && ki < 65 || ki > 70 && ki < 97); ) ; - return LT(t, X4() + (e < 6 && y0() == 32 && Vl() == 32)); + return RT(t, X4() + (e < 6 && b0() == 32 && Vl() == 32)); } -function R7(t) { +function P7(t) { for (; Vl(); ) switch (ki) { case t: return cl; case 34: case 39: - t !== 34 && t !== 39 && R7(ki); + t !== 34 && t !== 39 && P7(ki); break; case 40: - t === 41 && R7(t); + t === 41 && P7(t); break; case 92: Vl(); @@ -996,47 +996,47 @@ function R7(t) { } return cl; } -function Jbe(t, e) { +function nxe(t, e) { for (; Vl() && t + ki !== 47 + 10; ) - if (t + ki === 42 + 42 && y0() === 47) + if (t + ki === 42 + 42 && b0() === 47) break; - return "/*" + LT(e, cl - 1) + "*" + IM(t === 47 ? t : Vl()); + return "/*" + RT(e, cl - 1) + "*" + BM(t === 47 ? t : Vl()); } -function exe(t) { - for (; !L7(y0()); ) +function ixe(t) { + for (; !D7(b0()); ) Vl(); - return LT(t, cl); + return RT(t, cl); } -function txe(t) { - return Zbe(H4("", null, null, null, [""], t = Hbe(t), 0, [0], t)); +function sxe(t) { + return exe(H4("", null, null, null, [""], t = Jbe(t), 0, [0], t)); } function H4(t, e, r, n, i, s, a, o, l) { for (var u = 0, h = 0, f = a, d = 0, p = 0, g = 0, m = 1, v = 1, y = 1, b = 0, w = "", O = i, S = s, C = n, T = w; v; ) switch (g = b, b = Vl()) { case 40: if (g != 108 && rs(T, f - 1) == 58) { - G4(T += Lr(c_(b), "&", "&\f"), "&\f") != -1 && (y = -1); + G4(T += Rr(f_(b), "&", "&\f"), "&\f") != -1 && (y = -1); break; } case 34: case 39: case 91: - T += c_(b); + T += f_(b); break; case 9: case 10: case 13: case 32: - T += jbe(g); + T += txe(g); break; case 92: - T += Kbe(X4() - 1, 7); + T += rxe(X4() - 1, 7); continue; case 47: - switch (y0()) { + switch (b0()) { case 42: case 47: - Jv(rxe(Jbe(Vl(), X4()), e, r, l), l); + Jv(axe(nxe(Vl(), X4()), e, r, l), l); break; default: T += "/"; @@ -1052,12 +1052,12 @@ function H4(t, e, r, n, i, s, a, o, l) { case 125: v = 0; case 59 + h: - y == -1 && (T = Lr(T, /\f/g, "")), p > 0 && Mc(T) - f && Jv(p > 32 ? KB(T + ";", n, r, f - 1, l) : KB(Lr(T, " ", "") + ";", n, r, f - 2, l), l); + y == -1 && (T = Rr(T, /\f/g, "")), p > 0 && Mc(T) - f && Jv(p > 32 ? eF(T + ";", n, r, f - 1, l) : eF(Rr(T, " ", "") + ";", n, r, f - 2, l), l); break; case 59: T += ";"; default: - if (Jv(C = jB(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) + if (Jv(C = JB(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) if (h === 0) H4(T, e, C, C, O, s, f, o, S); else @@ -1066,7 +1066,7 @@ function H4(t, e, r, n, i, s, a, o, l) { case 108: case 109: case 115: - H4(t, C, C, n && Jv(jB(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); + H4(t, C, C, n && Jv(JB(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); break; default: H4(T, C, C, C, [""], S, 0, o, S); @@ -1080,10 +1080,10 @@ function H4(t, e, r, n, i, s, a, o, l) { if (m < 1) { if (b == 123) --m; - else if (b == 125 && m++ == 0 && Xbe() == 125) + else if (b == 125 && m++ == 0 && Kbe() == 125) continue; } - switch (T += IM(b), b * m) { + switch (T += BM(b), b * m) { case 38: y = h > 0 ? 1 : (T += "\f", -1); break; @@ -1091,7 +1091,7 @@ function H4(t, e, r, n, i, s, a, o, l) { o[u++] = (Mc(T) - 1) * y, y = 1; break; case 64: - y0() === 45 && (T += c_(Vl())), d = y0(), h = f = Mc(w = T += exe(X4())), b++; + b0() === 45 && (T += f_(Vl())), d = b0(), h = f = Mc(w = T += ixe(X4())), b++; break; case 45: g === 45 && Mc(T) == 2 && (m = 0); @@ -1099,20 +1099,20 @@ function H4(t, e, r, n, i, s, a, o, l) { } return s; } -function jB(t, e, r, n, i, s, a, o, l, u, h, f) { - for (var d = i - 1, p = i === 0 ? s : [""], g = Jj(p), m = 0, v = 0, y = 0; m < n; ++m) - for (var b = 0, w = sm(t, d + 1, d = qbe(v = a[m])), O = t; b < g; ++b) - (O = Kj(v > 0 ? p[b] + " " + w : Lr(w, /&\f/g, p[b]))) && (l[y++] = O); - return AT(t, e, r, i === 0 ? ET : o, l, u, h, f); +function JB(t, e, r, n, i, s, a, o, l, u, h, f) { + for (var d = i - 1, p = i === 0 ? s : [""], g = tK(p), m = 0, v = 0, y = 0; m < n; ++m) + for (var b = 0, w = am(t, d + 1, d = Xbe(v = a[m])), O = t; b < g; ++b) + (O = eK(v > 0 ? p[b] + " " + w : Rr(w, /&\f/g, p[b]))) && (l[y++] = O); + return LT(t, e, r, i === 0 ? _T : o, l, u, h, f); } -function rxe(t, e, r, n) { - return AT(t, e, r, Zj, IM(Gbe()), sm(t, 2, -2), 0, n); +function axe(t, e, r, n) { + return LT(t, e, r, Kj, BM(jbe()), am(t, 2, -2), 0, n); } -function KB(t, e, r, n, i) { - return AT(t, e, r, NM, sm(t, 0, n), sm(t, n + 1, -1), n, i); +function eF(t, e, r, n, i) { + return LT(t, e, r, $M, am(t, 0, n), am(t, n + 1, -1), n, i); } -function tK(t, e, r) { - switch (Ybe(t, e)) { +function nK(t, e, r) { + switch (Hbe(t, e)) { case 5103: return jr + "print-" + t + t; case 5737: @@ -1152,11 +1152,11 @@ function tK(t, e, r) { case 5936: switch (rs(t, e + 11)) { case 114: - return jr + t + An + Lr(t, /[svh]\w+-[tblr]{2}/, "tb") + t; + return jr + t + An + Rr(t, /[svh]\w+-[tblr]{2}/, "tb") + t; case 108: - return jr + t + An + Lr(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t; + return jr + t + An + Rr(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t; case 45: - return jr + t + An + Lr(t, /[svh]\w+-[tblr]{2}/, "lr") + t; + return jr + t + An + Rr(t, /[svh]\w+-[tblr]{2}/, "lr") + t; } case 6828: case 4268: @@ -1165,48 +1165,48 @@ function tK(t, e, r) { case 6165: return jr + t + An + "flex-" + t + t; case 5187: - return jr + t + Lr(t, /(\w+).+(:[^]+)/, jr + "box-$1$2" + An + "flex-$1$2") + t; + return jr + t + Rr(t, /(\w+).+(:[^]+)/, jr + "box-$1$2" + An + "flex-$1$2") + t; case 5443: - return jr + t + An + "flex-item-" + Lr(t, /flex-|-self/g, "") + (Iu(t, /flex-|baseline/) ? "" : An + "grid-row-" + Lr(t, /flex-|-self/g, "")) + t; + return jr + t + An + "flex-item-" + Rr(t, /flex-|-self/g, "") + ($u(t, /flex-|baseline/) ? "" : An + "grid-row-" + Rr(t, /flex-|-self/g, "")) + t; case 4675: - return jr + t + An + "flex-line-pack" + Lr(t, /align-content|flex-|-self/g, "") + t; + return jr + t + An + "flex-line-pack" + Rr(t, /align-content|flex-|-self/g, "") + t; case 5548: - return jr + t + An + Lr(t, "shrink", "negative") + t; + return jr + t + An + Rr(t, "shrink", "negative") + t; case 5292: - return jr + t + An + Lr(t, "basis", "preferred-size") + t; + return jr + t + An + Rr(t, "basis", "preferred-size") + t; case 6060: - return jr + "box-" + Lr(t, "-grow", "") + jr + t + An + Lr(t, "grow", "positive") + t; + return jr + "box-" + Rr(t, "-grow", "") + jr + t + An + Rr(t, "grow", "positive") + t; case 4554: - return jr + Lr(t, /([^-])(transform)/g, "$1" + jr + "$2") + t; + return jr + Rr(t, /([^-])(transform)/g, "$1" + jr + "$2") + t; case 6187: - return Lr(Lr(Lr(t, /(zoom-|grab)/, jr + "$1"), /(image-set)/, jr + "$1"), t, "") + t; + return Rr(Rr(Rr(t, /(zoom-|grab)/, jr + "$1"), /(image-set)/, jr + "$1"), t, "") + t; case 5495: case 3959: - return Lr(t, /(image-set\([^]*)/, jr + "$1$`$1"); + return Rr(t, /(image-set\([^]*)/, jr + "$1$`$1"); case 4968: - return Lr(Lr(t, /(.+:)(flex-)?(.*)/, jr + "box-pack:$3" + An + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + jr + t + t; + return Rr(Rr(t, /(.+:)(flex-)?(.*)/, jr + "box-pack:$3" + An + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + jr + t + t; case 4200: - if (!Iu(t, /flex-|baseline/)) - return An + "grid-column-align" + sm(t, e) + t; + if (!$u(t, /flex-|baseline/)) + return An + "grid-column-align" + am(t, e) + t; break; case 2592: case 3360: - return An + Lr(t, "template-", "") + t; + return An + Rr(t, "template-", "") + t; case 4384: case 3616: return r && r.some(function(n, i) { - return e = i, Iu(n.props, /grid-\w+-end/); - }) ? ~G4(t + (r = r[e].value), "span") ? t : An + Lr(t, "-start", "") + t + An + "grid-row-span:" + (~G4(r, "span") ? Iu(r, /\d+/) : +Iu(r, /\d+/) - +Iu(t, /\d+/)) + ";" : An + Lr(t, "-start", "") + t; + return e = i, $u(n.props, /grid-\w+-end/); + }) ? ~G4(t + (r = r[e].value), "span") ? t : An + Rr(t, "-start", "") + t + An + "grid-row-span:" + (~G4(r, "span") ? $u(r, /\d+/) : +$u(r, /\d+/) - +$u(t, /\d+/)) + ";" : An + Rr(t, "-start", "") + t; case 4896: case 4128: return r && r.some(function(n) { - return Iu(n.props, /grid-\w+-start/); - }) ? t : An + Lr(Lr(t, "-end", "-span"), "span ", "") + t; + return $u(n.props, /grid-\w+-start/); + }) ? t : An + Rr(Rr(t, "-end", "-span"), "span ", "") + t; case 4095: case 3583: case 4068: case 2532: - return Lr(t, /(.+)-inline(.+)/, jr + "$1$2") + t; + return Rr(t, /(.+)-inline(.+)/, jr + "$1$2") + t; case 8116: case 7059: case 5753: @@ -1225,26 +1225,26 @@ function tK(t, e, r) { if (rs(t, e + 4) !== 45) break; case 102: - return Lr(t, /(.+:)(.+)-([^]+)/, "$1" + jr + "$2-$3$1" + Ly + (rs(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; + return Rr(t, /(.+:)(.+)-([^]+)/, "$1" + jr + "$2-$3$1" + Ly + (rs(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; case 115: - return ~G4(t, "stretch") ? tK(Lr(t, "stretch", "fill-available"), e, r) + t : t; + return ~G4(t, "stretch") ? nK(Rr(t, "stretch", "fill-available"), e, r) + t : t; } break; case 5152: case 5920: - return Lr(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, i, s, a, o, l, u) { + return Rr(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, i, s, a, o, l, u) { return An + i + ":" + s + u + (a ? An + i + "-span:" + (o ? l : +l - +s) + u : "") + t; }); case 4949: if (rs(t, e + 6) === 121) - return Lr(t, ":", ":" + jr) + t; + return Rr(t, ":", ":" + jr) + t; break; case 6444: switch (rs(t, rs(t, 14) === 45 ? 18 : 11)) { case 120: - return Lr(t, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + jr + (rs(t, 14) === 45 ? "inline-" : "") + "box$3$1" + jr + "$2$3$1" + An + "$2box$3") + t; + return Rr(t, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + jr + (rs(t, 14) === 45 ? "inline-" : "") + "box$3$1" + jr + "$2$3$1" + An + "$2box$3") + t; case 100: - return Lr(t, ":", ":" + An) + t; + return Rr(t, ":", ":" + An) + t; } break; case 5719: @@ -1252,7 +1252,7 @@ function tK(t, e, r) { case 2135: case 3927: case 2391: - return Lr(t, "scroll-", "scroll-snap-") + t; + return Rr(t, "scroll-", "scroll-snap-") + t; } return t; } @@ -1261,62 +1261,62 @@ function uk(t, e) { r += e(t[n], n, t, e) || ""; return r; } -function nxe(t, e, r, n) { +function oxe(t, e, r, n) { switch (t.type) { - case Vbe: + case Gbe: if (t.children.length) break; - case Ube: - case NM: + case Wbe: + case $M: return t.return = t.return || t.value; - case Zj: + case Kj: return ""; - case jj: + case Jj: return t.return = t.value + "{" + uk(t.children, n) + "}"; - case ET: + case _T: if (!Mc(t.value = t.props.join(","))) return ""; } return Mc(r = uk(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; } -function ixe(t) { - var e = Jj(t); +function lxe(t) { + var e = tK(t); return function(r, n, i, s) { for (var a = "", o = 0; o < e; o++) a += t[o](r, n, i, s) || ""; return a; }; } -function sxe(t) { +function cxe(t) { return function(e) { e.root || (e = e.return) && t(e); }; } -function axe(t, e, r, n) { +function uxe(t, e, r, n) { if (t.length > -1 && !t.return) switch (t.type) { - case NM: - t.return = tK(t.value, t.length, r); + case $M: + t.return = nK(t.value, t.length, r); return; - case jj: - return uk([Gh(t, { value: Lr(t.value, "@", "@" + jr) })], n); - case ET: + case Jj: + return uk([Xh(t, { value: Rr(t.value, "@", "@" + jr) })], n); + case _T: if (t.length) - return Wbe(r = t.props, function(i) { - switch (Iu(i, n = /(::plac\w+|:read-\w+)/)) { + return Zbe(r = t.props, function(i) { + switch ($u(i, n = /(::plac\w+|:read-\w+)/)) { case ":read-only": case ":read-write": - Up(Gh(t, { props: [Lr(i, /:(read-\w+)/, ":" + Ly + "$1")] })), Up(Gh(t, { props: [i] })), A7(t, { props: ZB(r, n) }); + Vp(Xh(t, { props: [Rr(i, /:(read-\w+)/, ":" + Ly + "$1")] })), Vp(Xh(t, { props: [i] })), M7(t, { props: KB(r, n) }); break; case "::placeholder": - Up(Gh(t, { props: [Lr(i, /:(plac\w+)/, ":" + jr + "input-$1")] })), Up(Gh(t, { props: [Lr(i, /:(plac\w+)/, ":" + Ly + "$1")] })), Up(Gh(t, { props: [Lr(i, /:(plac\w+)/, An + "input-$1")] })), Up(Gh(t, { props: [i] })), A7(t, { props: ZB(r, n) }); + Vp(Xh(t, { props: [Rr(i, /:(plac\w+)/, ":" + jr + "input-$1")] })), Vp(Xh(t, { props: [Rr(i, /:(plac\w+)/, ":" + Ly + "$1")] })), Vp(Xh(t, { props: [Rr(i, /:(plac\w+)/, An + "input-$1")] })), Vp(Xh(t, { props: [i] })), M7(t, { props: KB(r, n) }); break; } return ""; }); } } -var oxe = { +var hxe = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, @@ -1363,8 +1363,8 @@ var oxe = { strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 -}, E0 = typeof process < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", rK = "active", nK = "data-styled-version", RT = "6.1.2", $M = `/*!sc*/ -`, BM = typeof window < "u" && "HTMLElement" in window, lxe = Boolean(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && {} !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== "" ? {}.REACT_APP_SC_DISABLE_SPEEDY !== "false" && {}.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && {} !== void 0 && {}.SC_DISABLE_SPEEDY !== void 0 && {}.SC_DISABLE_SPEEDY !== "" ? {}.SC_DISABLE_SPEEDY !== "false" && {}.SC_DISABLE_SPEEDY : {}.NODE_ENV !== "production"), JB = /invalid hook call/i, eO = /* @__PURE__ */ new Set(), cxe = function(t, e) { +}, _0 = typeof process < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", iK = "active", sK = "data-styled-version", MT = "6.1.2", FM = `/*!sc*/ +`, zM = typeof window < "u" && "HTMLElement" in window, fxe = Boolean(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && {} !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== "" ? {}.REACT_APP_SC_DISABLE_SPEEDY !== "false" && {}.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && {} !== void 0 && {}.SC_DISABLE_SPEEDY !== void 0 && {}.SC_DISABLE_SPEEDY !== "" ? {}.SC_DISABLE_SPEEDY !== "false" && {}.SC_DISABLE_SPEEDY : {}.NODE_ENV !== "production"), tF = /invalid hook call/i, eO = /* @__PURE__ */ new Set(), dxe = function(t, e) { if ({}.NODE_ENV !== "production") { var r = e ? ' with the id of "'.concat(e, '"') : "", n = "The component ".concat(t).concat(r, ` has been created dynamically. `) + `You may see this warning because you've called styled inside another component. @@ -1374,67 +1374,67 @@ To resolve this only create new StyledComponents outside of any render method an console.error = function(a) { for (var o = [], l = 1; l < arguments.length; l++) o[l - 1] = arguments[l]; - JB.test(a) ? (s = !1, eO.delete(n)) : i.apply(void 0, im([a], o, !1)); + tF.test(a) ? (s = !1, eO.delete(n)) : i.apply(void 0, sm([a], o, !1)); }, Ss(), s && !eO.has(n) && (console.warn(n), eO.add(n)); } catch (a) { - JB.test(a.message) && eO.delete(n); + tF.test(a.message) && eO.delete(n); } finally { console.error = i; } } -}, MT = Object.freeze([]), om = Object.freeze({}); -function uxe(t, e, r) { - return r === void 0 && (r = om), t.theme !== r.theme && t.theme || e || r.theme; +}, DT = Object.freeze([]), lm = Object.freeze({}); +function pxe(t, e, r) { + return r === void 0 && (r = lm), t.theme !== r.theme && t.theme || e || r.theme; } -var M7 = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), hxe = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, fxe = /(^-|-$)/g; -function eF(t) { - return t.replace(hxe, "-").replace(fxe, ""); +var N7 = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), gxe = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, mxe = /(^-|-$)/g; +function rF(t) { + return t.replace(gxe, "-").replace(mxe, ""); } -var dxe = /(a)(d)/gi, tO = 52, tF = function(t) { +var vxe = /(a)(d)/gi, tO = 52, nF = function(t) { return String.fromCharCode(t + (t > 25 ? 39 : 97)); }; -function D7(t) { +function I7(t) { var e, r = ""; for (e = Math.abs(t); e > tO; e = e / tO | 0) - r = tF(e % tO) + r; - return (tF(e % tO) + r).replace(dxe, "$1-$2"); + r = nF(e % tO) + r; + return (nF(e % tO) + r).replace(vxe, "$1-$2"); } -var u_, iK = 5381, Yd = function(t, e) { +var d_, aK = 5381, Wd = function(t, e) { for (var r = e.length; r; ) t = 33 * t ^ e.charCodeAt(--r); return t; -}, sK = function(t) { - return Yd(iK, t); +}, oK = function(t) { + return Wd(aK, t); }; -function pxe(t) { - return D7(sK(t) >>> 0); +function yxe(t) { + return I7(oK(t) >>> 0); } -function aK(t) { +function lK(t) { return {}.NODE_ENV !== "production" && typeof t == "string" && t || t.displayName || t.name || "Component"; } -function h_(t) { +function p_(t) { return typeof t == "string" && ({}.NODE_ENV === "production" || t.charAt(0) === t.charAt(0).toLowerCase()); } -var oK = typeof Symbol == "function" && Symbol.for, lK = oK ? Symbol.for("react.memo") : 60115, gxe = oK ? Symbol.for("react.forward_ref") : 60112, mxe = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, vxe = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, cK = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, yxe = ((u_ = {})[gxe] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, u_[lK] = cK, u_); -function rF(t) { - return ("type" in (e = t) && e.type.$$typeof) === lK ? cK : "$$typeof" in t ? yxe[t.$$typeof] : mxe; +var cK = typeof Symbol == "function" && Symbol.for, uK = cK ? Symbol.for("react.memo") : 60115, bxe = cK ? Symbol.for("react.forward_ref") : 60112, xxe = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, wxe = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, hK = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Oxe = ((d_ = {})[bxe] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, d_[uK] = hK, d_); +function iF(t) { + return ("type" in (e = t) && e.type.$$typeof) === uK ? hK : "$$typeof" in t ? Oxe[t.$$typeof] : xxe; var e; } -var bxe = Object.defineProperty, xxe = Object.getOwnPropertyNames, nF = Object.getOwnPropertySymbols, wxe = Object.getOwnPropertyDescriptor, Oxe = Object.getPrototypeOf, iF = Object.prototype; -function uK(t, e, r) { +var kxe = Object.defineProperty, Sxe = Object.getOwnPropertyNames, sF = Object.getOwnPropertySymbols, Txe = Object.getOwnPropertyDescriptor, Cxe = Object.getPrototypeOf, aF = Object.prototype; +function fK(t, e, r) { if (typeof e != "string") { - if (iF) { - var n = Oxe(e); - n && n !== iF && uK(t, n, r); + if (aF) { + var n = Cxe(e); + n && n !== aF && fK(t, n, r); } - var i = xxe(e); - nF && (i = i.concat(nF(e))); - for (var s = rF(t), a = rF(e), o = 0; o < i.length; ++o) { + var i = Sxe(e); + sF && (i = i.concat(sF(e))); + for (var s = iF(t), a = iF(e), o = 0; o < i.length; ++o) { var l = i[o]; - if (!(l in vxe || r && r[l] || a && l in a || s && l in s)) { - var u = wxe(e, l); + if (!(l in wxe || r && r[l] || a && l in a || s && l in s)) { + var u = Txe(e, l); try { - bxe(t, l, u); + kxe(t, l, u); } catch { } } @@ -1442,40 +1442,40 @@ function uK(t, e, r) { } return t; } -function lm(t) { +function cm(t) { return typeof t == "function"; } -function FM(t) { +function QM(t) { return typeof t == "object" && "styledComponentId" in t; } -function n0(t, e) { +function i0(t, e) { return t && e ? "".concat(t, " ").concat(e) : t || e || ""; } -function sF(t, e) { +function oF(t, e) { if (t.length === 0) return ""; for (var r = t[0], n = 1; n < t.length; n++) r += e ? e + t[n] : t[n]; return r; } -function cm(t) { +function um(t) { return t !== null && typeof t == "object" && t.constructor.name === Object.name && !("props" in t && t.$$typeof); } -function P7(t, e, r) { - if (r === void 0 && (r = !1), !r && !cm(t) && !Array.isArray(t)) +function $7(t, e, r) { + if (r === void 0 && (r = !1), !r && !um(t) && !Array.isArray(t)) return e; if (Array.isArray(e)) for (var n = 0; n < e.length; n++) - t[n] = P7(t[n], e[n]); - else if (cm(e)) + t[n] = $7(t[n], e[n]); + else if (um(e)) for (var n in e) - t[n] = P7(t[n], e[n]); + t[n] = $7(t[n], e[n]); return t; } -function zM(t, e) { +function UM(t, e) { Object.defineProperty(t, "toString", { value: e }); } -var kxe = {}.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. +var Exe = {}.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. `, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle. @@ -1517,7 +1517,7 @@ as for instance in your render method then you may be running into this limitati `, 17: `CSSStyleSheet could not be found on HTMLStyleElement. Has styled-components' style tag been unmounted or altered by another script? `, 18: "ThemeProvider: Please make sure your useTheme hook is within a ``" } : {}; -function Sxe() { +function _xe() { for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e]; for (var r = t[0], n = [], i = 1, s = t.length; i < s; i += 1) @@ -1526,12 +1526,12 @@ function Sxe() { r = r.replace(/%[a-z]/, a); }), r; } -function v1(t) { +function y1(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; - return {}.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(Sxe.apply(void 0, im([kxe[t]], e, !1)).trim()); + return {}.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(_xe.apply(void 0, sm([Exe[t]], e, !1)).trim()); } -var Txe = function() { +var Axe = function() { function t(e) { this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e; } @@ -1543,7 +1543,7 @@ var Txe = function() { if (e >= this.groupSizes.length) { for (var n = this.groupSizes, i = n.length, s = i; e >= s; ) if ((s <<= 1) < 0) - throw v1(16, "".concat(e)); + throw y1(16, "".concat(e)); this.groupSizes = new Uint32Array(s), this.groupSizes.set(n), this.length = s; for (var a = i; a < s; a++) this.groupSizes[a] = 0; @@ -1562,7 +1562,7 @@ var Txe = function() { if (e >= this.length || this.groupSizes[e] === 0) return r; for (var n = this.groupSizes[e], i = this.indexOfGroup(e), s = i + n, a = i; a < s; a++) - r += "".concat(this.tag.getRule(a)).concat($M); + r += "".concat(this.tag.getRule(a)).concat(FM); return r; }, t; }(), Z4 = /* @__PURE__ */ new Map(), hk = /* @__PURE__ */ new Map(), j4 = 1, rO = function(t) { @@ -1572,40 +1572,40 @@ var Txe = function() { j4++; var e = j4++; if ({}.NODE_ENV !== "production" && ((0 | e) < 0 || e > 1073741824)) - throw v1(16, "".concat(e)); + throw y1(16, "".concat(e)); return Z4.set(t, e), hk.set(e, t), e; -}, Cxe = function(t, e) { +}, Lxe = function(t, e) { j4 = e + 1, Z4.set(t, e), hk.set(e, t); -}, Exe = "style[".concat(E0, "][").concat(nK, '="').concat(RT, '"]'), _xe = new RegExp("^".concat(E0, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Axe = function(t, e, r) { +}, Rxe = "style[".concat(_0, "][").concat(sK, '="').concat(MT, '"]'), Mxe = new RegExp("^".concat(_0, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Dxe = function(t, e, r) { for (var n, i = r.split(","), s = 0, a = i.length; s < a; s++) (n = i[s]) && t.registerName(e, n); -}, Lxe = function(t, e) { - for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split($M), i = [], s = 0, a = n.length; s < a; s++) { +}, Pxe = function(t, e) { + for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split(FM), i = [], s = 0, a = n.length; s < a; s++) { var o = n[s].trim(); if (o) { - var l = o.match(_xe); + var l = o.match(Mxe); if (l) { var u = 0 | parseInt(l[1], 10), h = l[2]; - u !== 0 && (Cxe(h, u), Axe(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; + u !== 0 && (Lxe(h, u), Dxe(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; } else i.push(o); } } }; -function Rxe() { +function Nxe() { return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null; } -var hK = function(t) { +var dK = function(t) { var e = document.head, r = t || e, n = document.createElement("style"), i = function(o) { - var l = Array.from(o.querySelectorAll("style[".concat(E0, "]"))); + var l = Array.from(o.querySelectorAll("style[".concat(_0, "]"))); return l[l.length - 1]; }(r), s = i !== void 0 ? i.nextSibling : null; - n.setAttribute(E0, rK), n.setAttribute(nK, RT); - var a = Rxe(); + n.setAttribute(_0, iK), n.setAttribute(sK, MT); + var a = Nxe(); return a && n.setAttribute("nonce", a), r.insertBefore(n, s), n; -}, Mxe = function() { +}, Ixe = function() { function t(e) { - this.element = hK(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) { + this.element = dK(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) { if (r.sheet) return r.sheet; for (var n = document.styleSheets, i = 0, s = n.length; i < s; i++) { @@ -1613,7 +1613,7 @@ var hK = function(t) { if (a.ownerNode === r) return a; } - throw v1(17); + throw y1(17); }(this.element), this.length = 0; } return t.prototype.insertRule = function(e, r) { @@ -1628,9 +1628,9 @@ var hK = function(t) { var r = this.sheet.cssRules[e]; return r && r.cssText ? r.cssText : ""; }, t; -}(), Dxe = function() { +}(), $xe = function() { function t(e) { - this.element = hK(e), this.nodes = this.element.childNodes, this.length = 0; + this.element = dK(e), this.nodes = this.element.childNodes, this.length = 0; } return t.prototype.insertRule = function(e, r) { if (e <= this.length && e >= 0) { @@ -1643,7 +1643,7 @@ var hK = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.nodes[e].textContent : ""; }, t; -}(), Pxe = function() { +}(), Bxe = function() { function t(e) { this.rules = [], this.length = 0; } @@ -1654,16 +1654,16 @@ var hK = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.rules[e] : ""; }, t; -}(), aF = BM, Nxe = { isServer: !BM, useCSSOMInjection: !lxe }, fK = function() { +}(), lF = zM, Fxe = { isServer: !zM, useCSSOMInjection: !fxe }, pK = function() { function t(e, r, n) { - e === void 0 && (e = om), r === void 0 && (r = {}); + e === void 0 && (e = lm), r === void 0 && (r = {}); var i = this; - this.options = eo(eo({}, Nxe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && BM && aF && (aF = !1, function(s) { - for (var a = document.querySelectorAll(Exe), o = 0, l = a.length; o < l; o++) { + this.options = eo(eo({}, Fxe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && zM && lF && (lF = !1, function(s) { + for (var a = document.querySelectorAll(Rxe), o = 0, l = a.length; o < l; o++) { var u = a[o]; - u && u.getAttribute(E0) !== rK && (Lxe(s, u), u.parentNode && u.parentNode.removeChild(u)); + u && u.getAttribute(_0) !== iK && (Pxe(s, u), u.parentNode && u.parentNode.removeChild(u)); } - }(this)), zM(this, function() { + }(this)), UM(this, function() { return function(s) { for (var a = s.getTag(), o = a.length, l = "", u = function(f) { var d = function(y) { @@ -1674,10 +1674,10 @@ var hK = function(t) { var p = s.names.get(d), g = a.getGroup(f); if (p === void 0 || g.length === 0) return "continue"; - var m = "".concat(E0, ".g").concat(f, '[id="').concat(d, '"]'), v = ""; + var m = "".concat(_0, ".g").concat(f, '[id="').concat(d, '"]'), v = ""; p !== void 0 && p.forEach(function(y) { y.length > 0 && (v += "".concat(y, ",")); - }), l += "".concat(g).concat(m, '{content:"').concat(v, '"}').concat($M); + }), l += "".concat(g).concat(m, '{content:"').concat(v, '"}').concat(FM); }, h = 0; h < o; h++) u(h); return l; @@ -1693,8 +1693,8 @@ var hK = function(t) { }, t.prototype.getTag = function() { return this.tag || (this.tag = (e = function(r) { var n = r.useCSSOMInjection, i = r.target; - return r.isServer ? new Pxe(i) : n ? new Mxe(i) : new Dxe(i); - }(this.options), new Txe(e))); + return r.isServer ? new Bxe(i) : n ? new Ixe(i) : new $xe(i); + }(this.options), new Axe(e))); var e; }, t.prototype.hasNameForId = function(e, r) { return this.names.has(e) && this.names.get(e).has(r); @@ -1714,161 +1714,161 @@ var hK = function(t) { }, t.prototype.clearTag = function() { this.tag = void 0; }, t; -}(), Ixe = /&/g, $xe = /^\s*\/\/.*$/gm; -function dK(t, e) { +}(), zxe = /&/g, Qxe = /^\s*\/\/.*$/gm; +function gK(t, e) { return t.map(function(r) { return r.type === "rule" && (r.value = "".concat(e, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(e, " ")), r.props = r.props.map(function(n) { return "".concat(e, " ").concat(n); - })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = dK(r.children, e)), r; + })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = gK(r.children, e)), r; }); } -function pK(t) { - var e, r, n, i = t === void 0 ? om : t, s = i.options, a = s === void 0 ? om : s, o = i.plugins, l = o === void 0 ? MT : o, u = function(d, p, g) { +function mK(t) { + var e, r, n, i = t === void 0 ? lm : t, s = i.options, a = s === void 0 ? lm : s, o = i.plugins, l = o === void 0 ? DT : o, u = function(d, p, g) { return g === r || g.startsWith(r) && g.endsWith(r) && g.replaceAll(r, "").length > 0 ? ".".concat(e) : d; }, h = l.slice(); h.push(function(d) { - d.type === ET && d.value.includes("&") && (d.props[0] = d.props[0].replace(Ixe, r).replace(n, u)); - }), a.prefix && h.push(axe), h.push(nxe); + d.type === _T && d.value.includes("&") && (d.props[0] = d.props[0].replace(zxe, r).replace(n, u)); + }), a.prefix && h.push(uxe), h.push(oxe); var f = function(d, p, g, m) { p === void 0 && (p = ""), g === void 0 && (g = ""), m === void 0 && (m = "&"), e = m, r = p, n = new RegExp("\\".concat(r, "\\b"), "g"); - var v = d.replace($xe, ""), y = txe(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); - a.namespace && (y = dK(y, a.namespace)); + var v = d.replace(Qxe, ""), y = sxe(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); + a.namespace && (y = gK(y, a.namespace)); var b = []; - return uk(y, ixe(h.concat(sxe(function(w) { + return uk(y, lxe(h.concat(cxe(function(w) { return b.push(w); })))), b; }; return f.hash = l.length ? l.reduce(function(d, p) { - return p.name || v1(15), Yd(d, p.name); - }, iK).toString() : "", f; + return p.name || y1(15), Wd(d, p.name); + }, aK).toString() : "", f; } -var Bxe = new fK(), N7 = pK(), QM = C0.createContext({ shouldForwardProp: void 0, styleSheet: Bxe, stylis: N7 }); -QM.Consumer; -var Fxe = C0.createContext(void 0); -function I7() { - return cc(QM); +var Uxe = new pK(), B7 = mK(), VM = E0.createContext({ shouldForwardProp: void 0, styleSheet: Uxe, stylis: B7 }); +VM.Consumer; +var Vxe = E0.createContext(void 0); +function F7() { + return cc(VM); } -function gK(t) { - var e = fi(t.stylisPlugins), r = e[0], n = e[1], i = I7().styleSheet, s = vi(function() { +function vK(t) { + var e = fi(t.stylisPlugins), r = e[0], n = e[1], i = F7().styleSheet, s = vi(function() { var l = i; return t.sheet ? l = t.sheet : t.target && (l = l.reconstructWithOptions({ target: t.target }, !1)), t.disableCSSOMInjection && (l = l.reconstructWithOptions({ useCSSOMInjection: !1 })), l; }, [t.disableCSSOMInjection, t.sheet, t.target, i]), a = vi(function() { - return pK({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); + return mK({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); }, [t.enableVendorPrefixes, t.namespace, r]); ri(function() { - Qbe(r, t.stylisPlugins) || n(t.stylisPlugins); + Ybe(r, t.stylisPlugins) || n(t.stylisPlugins); }, [t.stylisPlugins]); var o = vi(function() { return { shouldForwardProp: t.shouldForwardProp, styleSheet: s, stylis: a }; }, [t.shouldForwardProp, s, a]); - return C0.createElement(QM.Provider, { value: o }, C0.createElement(Fxe.Provider, { value: a }, t.children)); + return E0.createElement(VM.Provider, { value: o }, E0.createElement(Vxe.Provider, { value: a }, t.children)); } -var oF = function() { +var cF = function() { function t(e, r) { var n = this; this.inject = function(i, s) { - s === void 0 && (s = N7); + s === void 0 && (s = B7); var a = n.name + s.hash; i.hasNameForId(n.id, a) || i.insertRules(n.id, a, s(n.rules, a, "@keyframes")); - }, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = r, zM(this, function() { - throw v1(12, String(n.name)); + }, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = r, UM(this, function() { + throw y1(12, String(n.name)); }); } return t.prototype.getName = function(e) { - return e === void 0 && (e = N7), this.name + e.hash; + return e === void 0 && (e = B7), this.name + e.hash; }, t; -}(), zxe = function(t) { +}(), qxe = function(t) { return t >= "A" && t <= "Z"; }; -function lF(t) { +function uF(t) { for (var e = "", r = 0; r < t.length; r++) { var n = t[r]; if (r === 1 && n === "-" && t[0] === "-") return t; - zxe(n) ? e += "-" + n.toLowerCase() : e += n; + qxe(n) ? e += "-" + n.toLowerCase() : e += n; } return e.startsWith("ms-") ? "-" + e : e; } -var mK = function(t) { +var yK = function(t) { return t == null || t === !1 || t === ""; -}, vK = function(t) { +}, bK = function(t) { var e, r, n = []; for (var i in t) { var s = t[i]; - t.hasOwnProperty(i) && !mK(s) && (Array.isArray(s) && s.isCss || lm(s) ? n.push("".concat(lF(i), ":"), s, ";") : cm(s) ? n.push.apply(n, im(im(["".concat(i, " {")], vK(s), !1), ["}"], !1)) : n.push("".concat(lF(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in oxe || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); + t.hasOwnProperty(i) && !yK(s) && (Array.isArray(s) && s.isCss || cm(s) ? n.push("".concat(uF(i), ":"), s, ";") : um(s) ? n.push.apply(n, sm(sm(["".concat(i, " {")], bK(s), !1), ["}"], !1)) : n.push("".concat(uF(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in hxe || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); } return n; }; -function b0(t, e, r, n) { - if (mK(t)) +function x0(t, e, r, n) { + if (yK(t)) return []; - if (FM(t)) + if (QM(t)) return [".".concat(t.styledComponentId)]; - if (lm(t)) { - if (!lm(s = t) || s.prototype && s.prototype.isReactComponent || !e) + if (cm(t)) { + if (!cm(s = t) || s.prototype && s.prototype.isReactComponent || !e) return [t]; var i = t(e); - return {}.NODE_ENV === "production" || typeof i != "object" || Array.isArray(i) || i instanceof oF || cm(i) || i === null || console.error("".concat(aK(t), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), b0(i, e, r, n); + return {}.NODE_ENV === "production" || typeof i != "object" || Array.isArray(i) || i instanceof cF || um(i) || i === null || console.error("".concat(lK(t), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), x0(i, e, r, n); } var s; - return t instanceof oF ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : cm(t) ? vK(t) : Array.isArray(t) ? Array.prototype.concat.apply(MT, t.map(function(a) { - return b0(a, e, r, n); + return t instanceof cF ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : um(t) ? bK(t) : Array.isArray(t) ? Array.prototype.concat.apply(DT, t.map(function(a) { + return x0(a, e, r, n); })) : [t.toString()]; } -function Qxe(t) { +function Yxe(t) { for (var e = 0; e < t.length; e += 1) { var r = t[e]; - if (lm(r) && !FM(r)) + if (cm(r) && !QM(r)) return !1; } return !0; } -var Uxe = sK(RT), Vxe = function() { +var Wxe = oK(MT), Gxe = function() { function t(e, r, n) { - this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && Qxe(e), this.componentId = r, this.baseHash = Yd(Uxe, r), this.baseStyle = n, fK.registerId(r); + this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && Yxe(e), this.componentId = r, this.baseHash = Wd(Wxe, r), this.baseStyle = n, pK.registerId(r); } return t.prototype.generateAndInjectStyles = function(e, r, n) { var i = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, r, n) : ""; if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) - i = n0(i, this.staticRulesId); + i = i0(i, this.staticRulesId); else { - var s = sF(b0(this.rules, e, r, n)), a = D7(Yd(this.baseHash, s) >>> 0); + var s = oF(x0(this.rules, e, r, n)), a = I7(Wd(this.baseHash, s) >>> 0); if (!r.hasNameForId(this.componentId, a)) { var o = n(s, ".".concat(a), void 0, this.componentId); r.insertRules(this.componentId, a, o); } - i = n0(i, a), this.staticRulesId = a; + i = i0(i, a), this.staticRulesId = a; } else { - for (var l = Yd(this.baseHash, n.hash), u = "", h = 0; h < this.rules.length; h++) { + for (var l = Wd(this.baseHash, n.hash), u = "", h = 0; h < this.rules.length; h++) { var f = this.rules[h]; if (typeof f == "string") - u += f, {}.NODE_ENV !== "production" && (l = Yd(l, f)); + u += f, {}.NODE_ENV !== "production" && (l = Wd(l, f)); else if (f) { - var d = sF(b0(f, e, r, n)); - l = Yd(l, d + h), u += d; + var d = oF(x0(f, e, r, n)); + l = Wd(l, d + h), u += d; } } if (u) { - var p = D7(l >>> 0); - r.hasNameForId(this.componentId, p) || r.insertRules(this.componentId, p, n(u, ".".concat(p), void 0, this.componentId)), i = n0(i, p); + var p = I7(l >>> 0); + r.hasNameForId(this.componentId, p) || r.insertRules(this.componentId, p, n(u, ".".concat(p), void 0, this.componentId)), i = i0(i, p); } } return i; }, t; -}(), yK = C0.createContext(void 0); -yK.Consumer; -var f_ = {}, cF = /* @__PURE__ */ new Set(); -function qxe(t, e, r) { - var n = FM(t), i = t, s = !h_(t), a = e.attrs, o = a === void 0 ? MT : a, l = e.componentId, u = l === void 0 ? function(O, S) { - var C = typeof O != "string" ? "sc" : eF(O); - f_[C] = (f_[C] || 0) + 1; - var T = "".concat(C, "-").concat(pxe(RT + C + f_[C])); +}(), xK = E0.createContext(void 0); +xK.Consumer; +var g_ = {}, hF = /* @__PURE__ */ new Set(); +function Xxe(t, e, r) { + var n = QM(t), i = t, s = !p_(t), a = e.attrs, o = a === void 0 ? DT : a, l = e.componentId, u = l === void 0 ? function(O, S) { + var C = typeof O != "string" ? "sc" : rF(O); + g_[C] = (g_[C] || 0) + 1; + var T = "".concat(C, "-").concat(yxe(MT + C + g_[C])); return S ? "".concat(S, "-").concat(T) : T; }(e.displayName, e.parentComponentId) : l, h = e.displayName, f = h === void 0 ? function(O) { - return h_(O) ? "styled.".concat(O) : "Styled(".concat(aK(O), ")"); - }(t) : h, d = e.displayName && e.componentId ? "".concat(eF(e.displayName), "-").concat(e.componentId) : e.componentId || u, p = n && i.attrs ? i.attrs.concat(o).filter(Boolean) : o, g = e.shouldForwardProp; + return p_(O) ? "styled.".concat(O) : "Styled(".concat(lK(O), ")"); + }(t) : h, d = e.displayName && e.componentId ? "".concat(rF(e.displayName), "-").concat(e.componentId) : e.componentId || u, p = n && i.attrs ? i.attrs.concat(o).filter(Boolean) : o, g = e.shouldForwardProp; if (n && i.shouldForwardProp) { var m = i.shouldForwardProp; if (e.shouldForwardProp) { @@ -1879,43 +1879,43 @@ function qxe(t, e, r) { } else g = m; } - var y = new Vxe(r, d, n ? i.componentStyle : void 0); + var y = new Gxe(r, d, n ? i.componentStyle : void 0); function b(O, S) { return function(C, T, A) { - var E = C.attrs, R = C.componentStyle, _ = C.defaultProps, L = C.foldedComponentIds, $ = C.styledComponentId, k = C.target, N = C0.useContext(yK), M = I7(), D = C.shouldForwardProp || M.shouldForwardProp; - ({}).NODE_ENV !== "production" && T7($); + var E = C.attrs, R = C.componentStyle, _ = C.defaultProps, L = C.foldedComponentIds, $ = C.styledComponentId, k = C.target, N = E0.useContext(xK), M = F7(), D = C.shouldForwardProp || M.shouldForwardProp; + ({}).NODE_ENV !== "production" && _7($); var P = function(W, ee, Y) { for (var re, se = eo(eo({}, ee), { className: void 0, theme: Y }), U = 0; U < W.length; U += 1) { - var Z = lm(re = W[U]) ? re(se) : re; + var Z = cm(re = W[U]) ? re(se) : re; for (var G in Z) - se[G] = G === "className" ? n0(se[G], Z[G]) : G === "style" ? eo(eo({}, se[G]), Z[G]) : Z[G]; + se[G] = G === "className" ? i0(se[G], Z[G]) : G === "style" ? eo(eo({}, se[G]), Z[G]) : Z[G]; } - return ee.className && (se.className = n0(se.className, ee.className)), se; - }(E, T, uxe(T, N, _) || om), I = P.as || k, F = {}; + return ee.className && (se.className = i0(se.className, ee.className)), se; + }(E, T, pxe(T, N, _) || lm), I = P.as || k, F = {}; for (var B in P) - P[B] === void 0 || B[0] === "$" || B === "as" || B === "theme" || (B === "forwardedAs" ? F.as = P.forwardedAs : D && !D(B, I) || (F[B] = P[B], D || {}.NODE_ENV !== "development" || abe(B) || cF.has(B) || !M7.has(I) || (cF.add(B), console.warn('styled-components: it looks like an unknown prop "'.concat(B, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))))); + P[B] === void 0 || B[0] === "$" || B === "as" || B === "theme" || (B === "forwardedAs" ? F.as = P.forwardedAs : D && !D(B, I) || (F[B] = P[B], D || {}.NODE_ENV !== "development" || ube(B) || hF.has(B) || !N7.has(I) || (hF.add(B), console.warn('styled-components: it looks like an unknown prop "'.concat(B, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))))); var Q = function(W, ee) { - var Y = I7(), re = W.generateAndInjectStyles(ee, Y.styleSheet, Y.stylis); - return {}.NODE_ENV !== "production" && T7(re), re; + var Y = F7(), re = W.generateAndInjectStyles(ee, Y.styleSheet, Y.stylis); + return {}.NODE_ENV !== "production" && _7(re), re; }(R, P); ({}).NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(Q); - var q = n0(L, $); - return Q && (q += " " + Q), P.className && (q += " " + P.className), F[h_(I) && !M7.has(I) ? "class" : "className"] = q, F.ref = A, iu(I, F); + var q = i0(L, $); + return Q && (q += " " + Q), P.className && (q += " " + P.className), F[p_(I) && !N7.has(I) ? "class" : "className"] = q, F.ref = A, iu(I, F); }(w, O, S); } b.displayName = f; - var w = C0.forwardRef(b); - return w.attrs = p, w.componentStyle = y, w.displayName = f, w.shouldForwardProp = g, w.foldedComponentIds = n ? n0(i.foldedComponentIds, i.styledComponentId) : "", w.styledComponentId = d, w.target = n ? i.target : t, Object.defineProperty(w, "defaultProps", { get: function() { + var w = E0.forwardRef(b); + return w.attrs = p, w.componentStyle = y, w.displayName = f, w.shouldForwardProp = g, w.foldedComponentIds = n ? i0(i.foldedComponentIds, i.styledComponentId) : "", w.styledComponentId = d, w.target = n ? i.target : t, Object.defineProperty(w, "defaultProps", { get: function() { return this._foldedDefaultProps; }, set: function(O) { this._foldedDefaultProps = n ? function(S) { for (var C = [], T = 1; T < arguments.length; T++) C[T - 1] = arguments[T]; for (var A = 0, E = C; A < E.length; A++) - P7(S, E[A], !0); + $7(S, E[A], !0); return S; }({}, i.defaultProps, O) : O; - } }), {}.NODE_ENV !== "production" && (cxe(f, d), w.warnTooManyClasses = function(O, S) { + } }), {}.NODE_ENV !== "production" && (dxe(f, d), w.warnTooManyClasses = function(O, S) { var C = {}, T = !1; return function(A) { if (!T && (C[A] = !0, Object.keys(C).length >= 200)) { @@ -1932,50 +1932,50 @@ Example: `), T = !0, C = {}; } }; - }(f, d)), zM(w, function() { + }(f, d)), UM(w, function() { return ".".concat(w.styledComponentId); - }), s && uK(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; + }), s && fK(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; } -function uF(t, e) { +function fF(t, e) { for (var r = [t[0]], n = 0, i = e.length; n < i; n += 1) r.push(e[n], t[n + 1]); return r; } -var hF = function(t) { +var dF = function(t) { return Object.assign(t, { isCss: !0 }); }; function Ry(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; - if (lm(t) || cm(t)) - return hF(b0(uF(MT, im([t], e, !0)))); + if (cm(t) || um(t)) + return dF(x0(fF(DT, sm([t], e, !0)))); var n = t; - return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? b0(n) : hF(b0(uF(n, e))); + return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? x0(n) : dF(x0(fF(n, e))); } -function $7(t, e, r) { - if (r === void 0 && (r = om), !e) - throw v1(1, e); +function z7(t, e, r) { + if (r === void 0 && (r = lm), !e) + throw y1(1, e); var n = function(i) { for (var s = [], a = 1; a < arguments.length; a++) s[a - 1] = arguments[a]; - return t(e, r, Ry.apply(void 0, im([i], s, !1))); + return t(e, r, Ry.apply(void 0, sm([i], s, !1))); }; return n.attrs = function(i) { - return $7(t, e, eo(eo({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); + return z7(t, e, eo(eo({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); }, n.withConfig = function(i) { - return $7(t, e, eo(eo({}, r), i)); + return z7(t, e, eo(eo({}, r), i)); }, n; } -var bK = function(t) { - return $7(qxe, t); -}, Jt = bK; -M7.forEach(function(t) { - Jt[t] = bK(t); +var wK = function(t) { + return z7(Xxe, t); +}, Jt = wK; +N7.forEach(function(t) { + Jt[t] = wK(t); }); ({}).NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native. Perhaps you're looking to import 'styled-components/native'? Read more about this at https://www.styled-components.com/docs/basics#react-native`); -var nO = "__sc-".concat(E0, "__"); +var nO = "__sc-".concat(_0, "__"); ({}).NODE_ENV !== "production" && {}.NODE_ENV !== "test" && typeof window < "u" && (window[nO] || (window[nO] = 0), window[nO] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason. See https://s-c.sh/2BAXzed for more info.`), window[nO] += 1); @@ -1991,7 +1991,7 @@ class qr { return this.lineInner(e, !0, 1, 0); } replace(e, r, n) { - [e, r] = um(this, e, r); + [e, r] = hm(this, e, r); let i = []; return this.decompose(0, e, i, 2), n.length && n.decompose(0, n.length, i, 3), this.decompose(r, this.length, i, 1), Nc.from(i, this.length - (r - e) + n.length); } @@ -1999,7 +1999,7 @@ class qr { return this.replace(this.length, this.length, e); } slice(e, r = this.length) { - [e, r] = um(this, e, r); + [e, r] = hm(this, e, r); let n = []; return this.decompose(e, r, n, 0), Nc.from(n, r - e); } @@ -2020,7 +2020,7 @@ class qr { return new My(this, e); } iterRange(e, r = this.length) { - return new xK(this, e, r); + return new OK(this, e, r); } iterLines(e, r) { let n; @@ -2031,7 +2031,7 @@ class qr { let i = this.line(e).from; n = this.iterRange(i, Math.max(i, r == this.lines + 1 ? this.length : r <= 1 ? 0 : this.line(r - 1).to)); } - return new wK(n); + return new kK(n); } toString() { return this.sliceString(0); @@ -2049,7 +2049,7 @@ class qr { } } class ui extends qr { - constructor(e, r = Yxe(e)) { + constructor(e, r = Hxe(e)) { super(), this.text = e, this.length = r; } get lines() { @@ -2062,12 +2062,12 @@ class ui extends qr { for (let s = 0; ; s++) { let a = this.text[s], o = i + a.length; if ((r ? n : o) >= e) - return new Wxe(i, o, n, a); + return new Zxe(i, o, n, a); i = o + 1, n++; } } decompose(e, r, n, i) { - let s = e <= 0 && r >= this.length ? this : new ui(fF(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); + let s = e <= 0 && r >= this.length ? this : new ui(pF(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); if (i & 1) { let a = n.pop(), o = K4(s.text, a.text.slice(), 0, s.length); if (o.length <= 32) @@ -2082,13 +2082,13 @@ class ui extends qr { replace(e, r, n) { if (!(n instanceof ui)) return super.replace(e, r, n); - [e, r] = um(this, e, r); - let i = K4(this.text, K4(n.text, fF(this.text, 0, e)), r), s = this.length + n.length - (r - e); + [e, r] = hm(this, e, r); + let i = K4(this.text, K4(n.text, pF(this.text, 0, e)), r), s = this.length + n.length - (r - e); return i.length <= 32 ? new ui(i, s) : Nc.from(ui.split(i, []), s); } sliceString(e, r = this.length, n = ` `) { - [e, r] = um(this, e, r); + [e, r] = hm(this, e, r); let i = ""; for (let s = 0, a = 0; s <= r && a < this.text.length; a++) { let o = this.text[a], l = s + o.length; @@ -2135,7 +2135,7 @@ class Nc extends qr { } } replace(e, r, n) { - if ([e, r] = um(this, e, r), n.lines < this.lines) + if ([e, r] = hm(this, e, r), n.lines < this.lines) for (let i = 0, s = 0; i < this.children.length; i++) { let a = this.children[i], o = s + a.length; if (e >= s && r <= o) { @@ -2152,7 +2152,7 @@ class Nc extends qr { } sliceString(e, r = this.length, n = ` `) { - [e, r] = um(this, e, r); + [e, r] = hm(this, e, r); let i = ""; for (let s = 0, a = 0; s < this.children.length && a <= r; s++) { let o = this.children[s], l = a + o.length; @@ -2205,7 +2205,7 @@ class Nc extends qr { } } qr.empty = /* @__PURE__ */ new ui([""], 0); -function Yxe(t) { +function Hxe(t) { let e = -1; for (let r of t) e += r.length + 1; @@ -2218,7 +2218,7 @@ function K4(t, e, r = 0, n = 1e9) { } return e; } -function fF(t, e, r) { +function pF(t, e, r) { return K4(t, [""], e, r); } class My { @@ -2252,7 +2252,7 @@ class My { return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir); } } -class xK { +class OK { constructor(e, r, n) { this.value = "", this.done = !1, this.cursor = new My(e, r > n ? -1 : 1), this.pos = r > n ? e.length : 0, this.from = Math.min(r, n), this.to = Math.max(r, n); } @@ -2272,7 +2272,7 @@ class xK { return this.cursor.lineBreak && this.value != ""; } } -class wK { +class kK { constructor(e) { this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1; } @@ -2286,10 +2286,10 @@ class wK { } typeof Symbol < "u" && (qr.prototype[Symbol.iterator] = function() { return this.iter(); -}, My.prototype[Symbol.iterator] = xK.prototype[Symbol.iterator] = wK.prototype[Symbol.iterator] = function() { +}, My.prototype[Symbol.iterator] = OK.prototype[Symbol.iterator] = kK.prototype[Symbol.iterator] = function() { return this; }); -class Wxe { +class Zxe { constructor(e, r, n, i) { this.from = e, this.to = r, this.number = n, this.text = i; } @@ -2297,37 +2297,37 @@ class Wxe { return this.to - this.from; } } -function um(t, e, r) { +function hm(t, e, r) { return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, r))]; } -let Eg = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1); -for (let t = 1; t < Eg.length; t++) - Eg[t] += Eg[t - 1]; -function Gxe(t) { - for (let e = 1; e < Eg.length; e += 2) - if (Eg[e] > t) - return Eg[e - 1] <= t; +let _g = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1); +for (let t = 1; t < _g.length; t++) + _g[t] += _g[t - 1]; +function jxe(t) { + for (let e = 1; e < _g.length; e += 2) + if (_g[e] > t) + return _g[e - 1] <= t; return !1; } -function dF(t) { +function gF(t) { return t >= 127462 && t <= 127487; } -const pF = 8205; +const mF = 8205; function Os(t, e, r = !0, n = !0) { - return (r ? OK : Xxe)(t, e, n); + return (r ? SK : Kxe)(t, e, n); } -function OK(t, e, r) { +function SK(t, e, r) { if (e == t.length) return e; - e && kK(t.charCodeAt(e)) && SK(t.charCodeAt(e - 1)) && e--; + e && TK(t.charCodeAt(e)) && CK(t.charCodeAt(e - 1)) && e--; let n = bs(t, e); for (e += Ho(n); e < t.length; ) { let i = bs(t, e); - if (n == pF || i == pF || r && Gxe(i)) + if (n == mF || i == mF || r && jxe(i)) e += Ho(i), n = i; - else if (dF(i)) { + else if (gF(i)) { let s = 0, a = e - 2; - for (; a >= 0 && dF(bs(t, a)); ) + for (; a >= 0 && gF(bs(t, a)); ) s++, a -= 2; if (s % 2 == 0) break; @@ -2337,35 +2337,35 @@ function OK(t, e, r) { } return e; } -function Xxe(t, e, r) { +function Kxe(t, e, r) { for (; e > 0; ) { - let n = OK(t, e - 2, r); + let n = SK(t, e - 2, r); if (n < e) return n; e--; } return 0; } -function kK(t) { +function TK(t) { return t >= 56320 && t < 57344; } -function SK(t) { +function CK(t) { return t >= 55296 && t < 56320; } function bs(t, e) { let r = t.charCodeAt(e); - if (!SK(r) || e + 1 == t.length) + if (!CK(r) || e + 1 == t.length) return r; let n = t.charCodeAt(e + 1); - return kK(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; + return TK(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; } -function UM(t) { +function qM(t) { return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320)); } function Ho(t) { return t < 65536 ? 1 : 2; } -const B7 = /\r\n?|\n/; +const Q7 = /\r\n?|\n/; var Fi = /* @__PURE__ */ function(t) { return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t; }(Fi || (Fi = {})); @@ -2397,7 +2397,7 @@ class Kc { } } iterChangedRanges(e, r = !1) { - F7(this, e, r); + U7(this, e, r); } get invertedDesc() { let e = []; @@ -2408,10 +2408,10 @@ class Kc { return new Kc(e); } composeDesc(e) { - return this.empty ? e : e.empty ? this : TK(this, e); + return this.empty ? e : e.empty ? this : EK(this, e); } mapDesc(e, r = !1) { - return e.empty ? this : z7(this, e, r); + return e.empty ? this : V7(this, e, r); } mapPos(e, r = -1, n = Fi.Simple) { let i = 0, s = 0; @@ -2470,10 +2470,10 @@ class wi extends Kc { apply(e) { if (this.length != e.length) throw new RangeError("Applying change set to a document with the wrong length"); - return F7(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; + return U7(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; } mapDesc(e, r = !1) { - return z7(this, e, r, !0); + return V7(this, e, r, !0); } invert(e) { let r = this.sections.slice(), n = []; @@ -2491,13 +2491,13 @@ class wi extends Kc { return new wi(r, n); } compose(e) { - return this.empty ? e : e.empty ? this : TK(this, e, !0); + return this.empty ? e : e.empty ? this : EK(this, e, !0); } map(e, r = !1) { - return e.empty ? this : z7(this, e, r, !0); + return e.empty ? this : V7(this, e, r, !0); } iterChanges(e, r = !1) { - F7(this, e, r); + U7(this, e, r); } get desc() { return Kc.create(this.sections); @@ -2513,7 +2513,7 @@ class wi extends Kc { let h = Math.min(s.len, l - o); Ws(i, h, -1); let f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0; - Ws(r, h, f), f > 0 && of(n, r, s.text), s.forward(h), o += h; + Ws(r, h, f), f > 0 && lf(n, r, s.text), s.forward(h), o += h; } let u = e[a++]; for (; o < u; ) { @@ -2557,10 +2557,10 @@ class wi extends Kc { let { from: f, to: d = f, insert: p } = h; if (f > d || f < 0 || d > r) throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${r})`); - let g = p ? typeof p == "string" ? qr.of(p.split(n || B7)) : p : qr.empty, m = g.length; + let g = p ? typeof p == "string" ? qr.of(p.split(n || Q7)) : p : qr.empty, m = g.length; if (f == d && m == 0) return; - f < a && l(), f > a && Ws(i, f - a, -1), Ws(i, d - f, m), of(s, i, g), a = d; + f < a && l(), f > a && Ws(i, f - a, -1), Ws(i, d - f, m), lf(s, i, g), a = d; } } return u(e), l(!o), o; @@ -2600,7 +2600,7 @@ function Ws(t, e, r, n = !1) { let i = t.length - 2; i >= 0 && r <= 0 && r == t[i + 1] ? t[i] += e : e == 0 && t[i] == 0 ? t[i + 1] += r : n ? (t[i] += e, t[i + 1] += r) : t.push(e, r); } -function of(t, e, r) { +function lf(t, e, r) { if (r.length == 0) return; let n = e.length - 2 >> 1; @@ -2612,7 +2612,7 @@ function of(t, e, r) { t.push(r); } } -function F7(t, e, r) { +function U7(t, e, r) { let n = t.inserted; for (let i = 0, s = 0, a = 0; a < t.sections.length; ) { let o = t.sections[a++], l = t.sections[a++]; @@ -2626,7 +2626,7 @@ function F7(t, e, r) { } } } -function z7(t, e, r, n = !1) { +function V7(t, e, r, n = !1) { let i = [], s = n ? [] : null, a = new l2(t), o = new l2(e); for (let l = -1; ; ) if (a.ins == -1 && o.ins == -1) { @@ -2636,7 +2636,7 @@ function z7(t, e, r, n = !1) { let u = o.len; for (Ws(i, o.ins, -1); u; ) { let h = Math.min(a.len, u); - a.ins >= 0 && l < a.i && a.len <= h && (Ws(i, 0, a.ins), s && of(s, i, a.text), l = a.i), a.forward(h), u -= h; + a.ins >= 0 && l < a.i && a.len <= h && (Ws(i, 0, a.ins), s && lf(s, i, a.text), l = a.i), a.forward(h), u -= h; } o.next(); } else if (a.ins >= 0) { @@ -2649,14 +2649,14 @@ function z7(t, e, r, n = !1) { h -= o.len, o.next(); else break; - Ws(i, u, l < a.i ? a.ins : 0), s && l < a.i && of(s, i, a.text), l = a.i, a.forward(a.len - h); + Ws(i, u, l < a.i ? a.ins : 0), s && l < a.i && lf(s, i, a.text), l = a.i, a.forward(a.len - h); } else { if (a.done && o.done) return s ? wi.createSet(i, s) : Kc.create(i); throw new Error("Mismatched change set lengths"); } } -function TK(t, e, r = !1) { +function EK(t, e, r = !1) { let n = [], i = r ? [] : null, s = new l2(t), a = new l2(e); for (let o = !1; ; ) { if (s.done && a.done) @@ -2664,7 +2664,7 @@ function TK(t, e, r = !1) { if (s.ins == 0) Ws(n, s.len, 0, o), s.next(); else if (a.len == 0 && !a.done) - Ws(n, 0, a.ins, o), i && of(i, n, a.text), a.next(); + Ws(n, 0, a.ins, o), i && lf(i, n, a.text), a.next(); else { if (s.done || a.done) throw new Error("Mismatched change set lengths"); @@ -2672,9 +2672,9 @@ function TK(t, e, r = !1) { let l = Math.min(s.len2, a.len), u = n.length; if (s.ins == -1) { let h = a.ins == -1 ? -1 : a.off ? 0 : a.ins; - Ws(n, l, h, o), i && h && of(i, n, a.text); + Ws(n, l, h, o), i && h && lf(i, n, a.text); } else - a.ins == -1 ? (Ws(n, s.off ? 0 : s.len, l, o), i && of(i, n, s.textBit(l))) : (Ws(n, s.off ? 0 : s.len, a.off ? 0 : a.ins, o), i && !a.off && of(i, n, a.text)); + a.ins == -1 ? (Ws(n, s.off ? 0 : s.len, l, o), i && lf(i, n, s.textBit(l))) : (Ws(n, s.off ? 0 : s.len, a.off ? 0 : a.ins, o), i && !a.off && lf(i, n, a.text)); o = (s.ins > l || a.ins >= 0 && a.len > l) && (o || n.length > u), s.forward2(l), a.forward(l); } } @@ -2709,7 +2709,7 @@ class l2 { this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e); } } -class i0 { +class s0 { constructor(e, r, n) { this.from = e, this.to = r, this.flags = n; } @@ -2735,7 +2735,7 @@ class i0 { } map(e, r = -1) { let n, i; - return this.empty ? n = i = e.mapPos(this.from, r) : (n = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), n == this.from && i == this.to ? this : new i0(n, i, this.flags); + return this.empty ? n = i = e.mapPos(this.from, r) : (n = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), n == this.from && i == this.to ? this : new s0(n, i, this.flags); } extend(e, r = e) { if (e <= this.anchor && r >= this.anchor) @@ -2755,7 +2755,7 @@ class i0 { return je.range(e.anchor, e.head); } static create(e, r, n) { - return new i0(e, r, n); + return new s0(e, r, n); } } class je { @@ -2792,7 +2792,7 @@ class je { static fromJSON(e) { if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length) throw new RangeError("Invalid JSON representation for EditorSelection"); - return new je(e.ranges.map((r) => i0.fromJSON(r)), e.main); + return new je(e.ranges.map((r) => s0.fromJSON(r)), e.main); } static single(e, r = e) { return new je([je.range(e, r)], 0); @@ -2809,11 +2809,11 @@ class je { return new je(e, r); } static cursor(e, r = 0, n, i) { - return i0.create(e, e, (r == 0 ? 0 : r < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (i != null ? i : 16777215) << 6); + return s0.create(e, e, (r == 0 ? 0 : r < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (i != null ? i : 16777215) << 6); } static range(e, r, n, i) { let s = (n != null ? n : 16777215) << 6 | (i == null ? 7 : Math.min(6, i)); - return r < e ? i0.create(r, e, 48 | s) : i0.create(e, r, (r > e ? 8 : 0) | s); + return r < e ? s0.create(r, e, 48 | s) : s0.create(e, r, (r > e ? 8 : 0) | s); } static normalized(e, r = 0) { let n = e[r]; @@ -2828,21 +2828,21 @@ class je { return new je(e, r); } } -function CK(t, e) { +function _K(t, e) { for (let r of t.ranges) if (r.to > e) throw new RangeError("Selection points outside of document"); } -let VM = 0; +let YM = 0; class $t { constructor(e, r, n, i, s) { - this.combine = e, this.compareInput = r, this.compare = n, this.isStatic = i, this.id = VM++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s; + this.combine = e, this.compareInput = r, this.compare = n, this.isStatic = i, this.id = YM++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s; } get reader() { return this; } static define(e = {}) { - return new $t(e.combine || ((r) => r), e.compareInput || ((r, n) => r === n), e.compare || (e.combine ? (r, n) => r === n : qM), !!e.static, e.enables); + return new $t(e.combine || ((r) => r), e.compareInput || ((r, n) => r === n), e.compare || (e.combine ? (r, n) => r === n : WM), !!e.static, e.enables); } of(e) { return new J4([], this, 0, e); @@ -2861,12 +2861,12 @@ class $t { return r || (r = (n) => n), this.compute([e], (n) => r(n.field(e))); } } -function qM(t, e) { +function WM(t, e) { return t == e || t.length == e.length && t.every((r, n) => r === e[n]); } class J4 { constructor(e, r, n, i) { - this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = VM++; + this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = YM++; } dynamicSlot(e) { var r; @@ -2878,9 +2878,9 @@ class J4 { return f.values[a] = n(f), 1; }, update(f, d) { - if (l && d.docChanged || u && (d.docChanged || d.selection) || Q7(f, h)) { + if (l && d.docChanged || u && (d.docChanged || d.selection) || q7(f, h)) { let p = n(f); - if (o ? !gF(p, f.values[a], i) : !i(p, f.values[a])) + if (o ? !vF(p, f.values[a], i) : !i(p, f.values[a])) return f.values[a] = p, 1; } return 0; @@ -2889,7 +2889,7 @@ class J4 { let p, g = d.config.address[s]; if (g != null) { let m = dk(d, g); - if (this.dependencies.every((v) => v instanceof $t ? d.facet(v) === f.facet(v) : v instanceof Xn ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? gF(p = n(f), m, i) : i(p = n(f), m))) + if (this.dependencies.every((v) => v instanceof $t ? d.facet(v) === f.facet(v) : v instanceof Xn ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? vF(p = n(f), m, i) : i(p = n(f), m))) return f.values[a] = m, 0; } else p = n(f); @@ -2898,7 +2898,7 @@ class J4 { }; } } -function gF(t, e, r) { +function vF(t, e, r) { if (t.length != e.length) return !1; for (let n = 0; n < t.length; n++) @@ -2906,13 +2906,13 @@ function gF(t, e, r) { return !1; return !0; } -function Q7(t, e) { +function q7(t, e) { let r = !1; for (let n of e) Dy(t, n) & 1 && (r = !0); return r; } -function Hxe(t, e, r) { +function Jxe(t, e, r) { let n = r.map((l) => t[l.id]), i = r.map((l) => l.type), s = n.filter((l) => !(l & 1)), a = t[e.id] >> 1; function o(l) { let u = []; @@ -2933,31 +2933,31 @@ function Hxe(t, e, r) { return l.values[a] = o(l), 1; }, update(l, u) { - if (!Q7(l, s)) + if (!q7(l, s)) return 0; let h = o(l); return e.compare(h, l.values[a]) ? 0 : (l.values[a] = h, 1); }, reconfigure(l, u) { - let h = Q7(l, n), f = u.config.facets[e.id], d = u.facet(e); - if (f && !h && qM(r, f)) + let h = q7(l, n), f = u.config.facets[e.id], d = u.facet(e); + if (f && !h && WM(r, f)) return l.values[a] = d, 0; let p = o(l); return e.compare(p, d) ? (l.values[a] = d, 0) : (l.values[a] = p, 1); } }; } -const mF = /* @__PURE__ */ $t.define({ static: !0 }); +const yF = /* @__PURE__ */ $t.define({ static: !0 }); class Xn { constructor(e, r, n, i, s) { this.id = e, this.createF = r, this.updateF = n, this.compareF = i, this.spec = s, this.provides = void 0; } static define(e) { - let r = new Xn(VM++, e.create, e.update, e.compare || ((n, i) => n === i), e); + let r = new Xn(YM++, e.create, e.update, e.compare || ((n, i) => n === i), e); return e.provide && (r.provides = e.provide(r)), r; } create(e) { - let r = e.facet(mF).find((n) => n.field == this); + let r = e.facet(yF).find((n) => n.field == this); return ((r == null ? void 0 : r.create) || this.createF)(e); } slot(e) { @@ -2972,40 +2972,40 @@ class Xn { }; } init(e) { - return [this, mF.of({ field: this, create: e })]; + return [this, yF.of({ field: this, create: e })]; } get extension() { return this; } } -const Wd = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; +const Gd = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; function pv(t) { - return (e) => new EK(e, t); + return (e) => new AK(e, t); } const uc = { - highest: /* @__PURE__ */ pv(Wd.highest), - high: /* @__PURE__ */ pv(Wd.high), - default: /* @__PURE__ */ pv(Wd.default), - low: /* @__PURE__ */ pv(Wd.low), - lowest: /* @__PURE__ */ pv(Wd.lowest) + highest: /* @__PURE__ */ pv(Gd.highest), + high: /* @__PURE__ */ pv(Gd.high), + default: /* @__PURE__ */ pv(Gd.default), + low: /* @__PURE__ */ pv(Gd.low), + lowest: /* @__PURE__ */ pv(Gd.lowest) }; -class EK { +class AK { constructor(e, r) { this.inner = e, this.prec = r; } } -class fp { +class dp { of(e) { - return new U7(this, e); + return new Y7(this, e); } reconfigure(e) { - return fp.reconfigure.of({ compartment: this, extension: e }); + return dp.reconfigure.of({ compartment: this, extension: e }); } get(e) { return e.config.compartments.get(this); } } -class U7 { +class Y7 { constructor(e, r) { this.compartment = e, this.inner = r; } @@ -3021,7 +3021,7 @@ class fk { } static resolve(e, r, n) { let i = [], s = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ new Map(); - for (let d of Zxe(e, r, a)) + for (let d of ewe(e, r, a)) d instanceof Xn ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d); let o = /* @__PURE__ */ Object.create(null), l = [], u = []; for (let d of i) @@ -3030,7 +3030,7 @@ class fk { for (let d in s) { let p = s[d], g = p[0].facet, m = h && h[d] || []; if (p.every((v) => v.type == 0)) - if (o[g.id] = l.length << 1 | 1, qM(m, p)) + if (o[g.id] = l.length << 1 | 1, WM(m, p)) l.push(n.facet(g)); else { let v = g.combine(p.map((y) => y.value)); @@ -3039,14 +3039,14 @@ class fk { else { for (let v of p) v.type == 0 ? (o[v.id] = l.length << 1 | 1, l.push(v.value)) : (o[v.id] = u.length << 1, u.push((y) => v.dynamicSlot(y))); - o[g.id] = u.length << 1, u.push((v) => Hxe(v, g, p)); + o[g.id] = u.length << 1, u.push((v) => Jxe(v, g, p)); } } let f = u.map((d) => d(o)); return new fk(e, a, f, o, l, s); } } -function Zxe(t, e, r) { +function ewe(t, e, r) { let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map(); function s(a, o) { let l = i.get(a); @@ -3054,22 +3054,22 @@ function Zxe(t, e, r) { if (l <= o) return; let u = n[l].indexOf(a); - u > -1 && n[l].splice(u, 1), a instanceof U7 && r.delete(a.compartment); + u > -1 && n[l].splice(u, 1), a instanceof Y7 && r.delete(a.compartment); } if (i.set(a, o), Array.isArray(a)) for (let u of a) s(u, o); - else if (a instanceof U7) { + else if (a instanceof Y7) { if (r.has(a.compartment)) throw new RangeError("Duplicate use of compartment in extensions"); let u = e.get(a.compartment) || a.inner; r.set(a.compartment, u), s(u, o); - } else if (a instanceof EK) + } else if (a instanceof AK) s(a.inner, a.prec); else if (a instanceof Xn) n[o].push(a), a.provides && s(a.provides, o); else if (a instanceof J4) - n[o].push(a), a.facet.extensions && s(a.facet.extensions, Wd.default); + n[o].push(a), a.facet.extensions && s(a.facet.extensions, Gd.default); else { let u = a.extension; if (!u) @@ -3077,7 +3077,7 @@ function Zxe(t, e, r) { s(u, o); } } - return s(t, Wd.default), n.reduce((a, o) => a.concat(o)); + return s(t, Gd.default), n.reduce((a, o) => a.concat(o)); } function Dy(t, e) { if (e & 1) @@ -3094,13 +3094,13 @@ function Dy(t, e) { function dk(t, e) { return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1]; } -const _K = /* @__PURE__ */ $t.define(), V7 = /* @__PURE__ */ $t.define({ +const LK = /* @__PURE__ */ $t.define(), W7 = /* @__PURE__ */ $t.define({ combine: (t) => t.some((e) => e), static: !0 -}), AK = /* @__PURE__ */ $t.define({ +}), RK = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : void 0, static: !0 -}), LK = /* @__PURE__ */ $t.define(), RK = /* @__PURE__ */ $t.define(), MK = /* @__PURE__ */ $t.define(), DK = /* @__PURE__ */ $t.define({ +}), MK = /* @__PURE__ */ $t.define(), DK = /* @__PURE__ */ $t.define(), PK = /* @__PURE__ */ $t.define(), NK = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : !1 }); class co { @@ -3108,15 +3108,15 @@ class co { this.type = e, this.value = r; } static define() { - return new jxe(); + return new twe(); } } -class jxe { +class twe { of(e) { return new co(this, e); } } -class Kxe { +class rwe { constructor(e) { this.map = e; } @@ -3136,7 +3136,7 @@ class or { return this.type == e; } static define(e = {}) { - return new Kxe(e.map || ((r) => r)); + return new rwe(e.map || ((r) => r)); } static mapEffects(e, r) { if (!e.length) @@ -3153,7 +3153,7 @@ or.reconfigure = /* @__PURE__ */ or.define(); or.appendConfig = /* @__PURE__ */ or.define(); class Ei { constructor(e, r, n, i, s, a) { - this.startState = e, this.changes = r, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = a, this._doc = null, this._state = null, n && CK(n, r.newLength), s.some((o) => o.type == Ei.time) || (this.annotations = s.concat(Ei.time.of(Date.now()))); + this.startState = e, this.changes = r, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = a, this._doc = null, this._state = null, n && _K(n, r.newLength), s.some((o) => o.type == Ei.time) || (this.annotations = s.concat(Ei.time.of(Date.now()))); } static create(e, r, n, i, s, a) { return new Ei(e, r, n, i, s, a); @@ -3187,7 +3187,7 @@ Ei.time = /* @__PURE__ */ co.define(); Ei.userEvent = /* @__PURE__ */ co.define(); Ei.addToHistory = /* @__PURE__ */ co.define(); Ei.remote = /* @__PURE__ */ co.define(); -function Jxe(t, e) { +function nwe(t, e) { let r = []; for (let n = 0, i = 0; ; ) { let s, a; @@ -3200,7 +3200,7 @@ function Jxe(t, e) { !r.length || r[r.length - 1] < s ? r.push(s, a) : r[r.length - 1] < a && (r[r.length - 1] = a); } } -function PK(t, e, r) { +function IK(t, e, r) { var n; let i, s, a; return r ? (i = e.changes, s = wi.empty(e.changes.length), a = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), s = t.changes.mapDesc(e.changes, !0), a = t.changes.compose(i)), { @@ -3211,36 +3211,36 @@ function PK(t, e, r) { scrollIntoView: t.scrollIntoView || e.scrollIntoView }; } -function q7(t, e, r) { - let n = e.selection, i = _g(e.annotations); +function G7(t, e, r) { + let n = e.selection, i = Ag(e.annotations); return e.userEvent && (i = i.concat(Ei.userEvent.of(e.userEvent))), { - changes: e.changes instanceof wi ? e.changes : wi.of(e.changes || [], r, t.facet(AK)), + changes: e.changes instanceof wi ? e.changes : wi.of(e.changes || [], r, t.facet(RK)), selection: n && (n instanceof je ? n : je.single(n.anchor, n.head)), - effects: _g(e.effects), + effects: Ag(e.effects), annotations: i, scrollIntoView: !!e.scrollIntoView }; } -function NK(t, e, r) { - let n = q7(t, e.length ? e[0] : {}, t.doc.length); +function $K(t, e, r) { + let n = G7(t, e.length ? e[0] : {}, t.doc.length); e.length && e[0].filter === !1 && (r = !1); for (let s = 1; s < e.length; s++) { e[s].filter === !1 && (r = !1); let a = !!e[s].sequential; - n = PK(n, q7(t, e[s], a ? n.changes.newLength : t.doc.length), a); + n = IK(n, G7(t, e[s], a ? n.changes.newLength : t.doc.length), a); } let i = Ei.create(t, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView); - return twe(r ? ewe(i) : i); + return swe(r ? iwe(i) : i); } -function ewe(t) { +function iwe(t) { let e = t.startState, r = !0; - for (let i of e.facet(LK)) { + for (let i of e.facet(MK)) { let s = i(t); if (s === !1) { r = !1; break; } - Array.isArray(s) && (r = r === !0 ? s : Jxe(r, s)); + Array.isArray(s) && (r = r === !0 ? s : nwe(r, s)); } if (r !== !0) { let i, s; @@ -3252,49 +3252,49 @@ function ewe(t) { } t = Ei.create(e, i, t.selection && t.selection.map(s), or.mapEffects(t.effects, s), t.annotations, t.scrollIntoView); } - let n = e.facet(RK); + let n = e.facet(DK); for (let i = n.length - 1; i >= 0; i--) { let s = n[i](t); - s instanceof Ei ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Ei ? t = s[0] : t = NK(e, _g(s), !1); + s instanceof Ei ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Ei ? t = s[0] : t = $K(e, Ag(s), !1); } return t; } -function twe(t) { - let e = t.startState, r = e.facet(MK), n = t; +function swe(t) { + let e = t.startState, r = e.facet(PK), n = t; for (let i = r.length - 1; i >= 0; i--) { let s = r[i](t); - s && Object.keys(s).length && (n = PK(n, q7(e, s, t.changes.newLength), !0)); + s && Object.keys(s).length && (n = IK(n, G7(e, s, t.changes.newLength), !0)); } return n == t ? t : Ei.create(e, t.changes, t.selection, n.effects, n.annotations, n.scrollIntoView); } -const rwe = []; -function _g(t) { - return t == null ? rwe : Array.isArray(t) ? t : [t]; +const awe = []; +function Ag(t) { + return t == null ? awe : Array.isArray(t) ? t : [t]; } var Fn = /* @__PURE__ */ function(t) { return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t; }(Fn || (Fn = {})); -const nwe = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; -let Y7; +const owe = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; +let X7; try { - Y7 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); + X7 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch { } -function iwe(t) { - if (Y7) - return Y7.test(t); +function lwe(t) { + if (X7) + return X7.test(t); for (let e = 0; e < t.length; e++) { let r = t[e]; - if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || nwe.test(r))) + if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || owe.test(r))) return !0; } return !1; } -function swe(t) { +function cwe(t) { return (e) => { if (!/\S/.test(e)) return Fn.Space; - if (iwe(e)) + if (lwe(e)) return Fn.Word; for (let r = 0; r < t.length; r++) if (e.indexOf(t[r]) > -1) @@ -3319,15 +3319,15 @@ class Sr { return Dy(this, n), dk(this, n); } update(...e) { - return NK(this, e, !0); + return $K(this, e, !0); } applyTransaction(e) { let r = this.config, { base: n, compartments: i } = r; for (let o of e.effects) - o.is(fp.reconfigure) ? (r && (i = /* @__PURE__ */ new Map(), r.compartments.forEach((l, u) => i.set(u, l)), r = null), i.set(o.value.compartment, o.value.extension)) : o.is(or.reconfigure) ? (r = null, n = o.value) : o.is(or.appendConfig) && (r = null, n = _g(n).concat(o.value)); + o.is(dp.reconfigure) ? (r && (i = /* @__PURE__ */ new Map(), r.compartments.forEach((l, u) => i.set(u, l)), r = null), i.set(o.value.compartment, o.value.extension)) : o.is(or.reconfigure) ? (r = null, n = o.value) : o.is(or.appendConfig) && (r = null, n = Ag(n).concat(o.value)); let s; r ? s = e.startState.values.slice() : (r = fk.resolve(n, i, this), s = new Sr(r, this.doc, this.selection, r.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); - let a = e.startState.facet(V7) ? e.newSelection : e.newSelection.asSingle(); + let a = e.startState.facet(W7) ? e.newSelection : e.newSelection.asSingle(); new Sr(r, e.newDoc, a, s, (o, l) => l.update(o, e), e); } replaceSelection(e) { @@ -3337,13 +3337,13 @@ class Sr { })); } changeByRange(e) { - let r = this.selection, n = e(r.ranges[0]), i = this.changes(n.changes), s = [n.range], a = _g(n.effects); + let r = this.selection, n = e(r.ranges[0]), i = this.changes(n.changes), s = [n.range], a = Ag(n.effects); for (let o = 1; o < r.ranges.length; o++) { let l = e(r.ranges[o]), u = this.changes(l.changes), h = u.map(i); for (let d = 0; d < o; d++) s[d] = s[d].map(h); let f = i.mapDesc(u, !0); - s.push(l.range.map(f)), i = i.compose(h), a = or.mapEffects(a, h).concat(or.mapEffects(_g(l.effects), f)); + s.push(l.range.map(f)), i = i.compose(h), a = or.mapEffects(a, h).concat(or.mapEffects(Ag(l.effects), f)); } return { changes: i, @@ -3355,7 +3355,7 @@ class Sr { return e instanceof wi ? e : wi.of(e, this.doc.length, this.facet(Sr.lineSeparator)); } toText(e) { - return qr.of(e.split(this.facet(Sr.lineSeparator) || B7)); + return qr.of(e.split(this.facet(Sr.lineSeparator) || Q7)); } sliceDoc(e = 0, r = this.doc.length) { return this.doc.sliceString(e, r, this.lineBreak); @@ -3394,8 +3394,8 @@ class Sr { }); } static create(e = {}) { - let r = fk.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof qr ? e.doc : qr.of((e.doc || "").split(r.staticFacet(Sr.lineSeparator) || B7)), i = e.selection ? e.selection instanceof je ? e.selection : je.single(e.selection.anchor, e.selection.head) : je.single(0); - return CK(i, n.length), r.staticFacet(V7) || (i = i.asSingle()), new Sr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); + let r = fk.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof qr ? e.doc : qr.of((e.doc || "").split(r.staticFacet(Sr.lineSeparator) || Q7)), i = e.selection ? e.selection instanceof je ? e.selection : je.single(e.selection.anchor, e.selection.head) : je.single(0); + return _K(i, n.length), r.staticFacet(W7) || (i = i.asSingle()), new Sr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); } get tabSize() { return this.facet(Sr.tabSize); @@ -3405,7 +3405,7 @@ class Sr { `; } get readOnly() { - return this.facet(DK); + return this.facet(NK); } phrase(e, ...r) { for (let n of this.facet(Sr.phrases)) @@ -3422,13 +3422,13 @@ class Sr { } languageDataAt(e, r, n = -1) { let i = []; - for (let s of this.facet(_K)) + for (let s of this.facet(LK)) for (let a of s(this, r, n)) Object.prototype.hasOwnProperty.call(a, e) && i.push(a[e]); return i; } charCategorizer(e) { - return swe(this.languageDataAt("wordChars", e).join("")); + return cwe(this.languageDataAt("wordChars", e).join("")); } wordAt(e) { let { text: r, from: n, length: i } = this.doc.lineAt(e), s = this.charCategorizer(e), a = e - n, o = e - n; @@ -3447,24 +3447,24 @@ class Sr { return a == o ? null : je.range(a + n, o + n); } } -Sr.allowMultipleSelections = V7; +Sr.allowMultipleSelections = W7; Sr.tabSize = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : 4 }); -Sr.lineSeparator = AK; -Sr.readOnly = DK; +Sr.lineSeparator = RK; +Sr.readOnly = NK; Sr.phrases = /* @__PURE__ */ $t.define({ compare(t, e) { let r = Object.keys(t), n = Object.keys(e); return r.length == n.length && r.every((i) => t[i] == e[i]); } }); -Sr.languageData = _K; -Sr.changeFilter = LK; -Sr.transactionFilter = RK; -Sr.transactionExtender = MK; -fp.reconfigure = /* @__PURE__ */ or.define(); -function pu(t, e, r = {}) { +Sr.languageData = LK; +Sr.changeFilter = MK; +Sr.transactionFilter = DK; +Sr.transactionExtender = PK; +dp.reconfigure = /* @__PURE__ */ or.define(); +function gu(t, e, r = {}) { let n = {}; for (let i of t) for (let s of Object.keys(i)) { @@ -3481,7 +3481,7 @@ function pu(t, e, r = {}) { n[i] === void 0 && (n[i] = e[i]); return n; } -class _0 { +class A0 { eq(e) { return this == e; } @@ -3489,9 +3489,9 @@ class _0 { return c2.create(e, r, this); } } -_0.prototype.startSide = _0.prototype.endSide = 0; -_0.prototype.point = !1; -_0.prototype.mapMode = Fi.TrackDel; +A0.prototype.startSide = A0.prototype.endSide = 0; +A0.prototype.point = !1; +A0.prototype.mapMode = Fi.TrackDel; class c2 { constructor(e, r, n) { this.from = e, this.to = r, this.value = n; @@ -3500,10 +3500,10 @@ class c2 { return new c2(e, r, n); } } -function W7(t, e) { +function H7(t, e) { return t.from - e.from || t.value.startSide - e.value.startSide; } -class YM { +class GM { constructor(e, r, n, i) { this.from = e, this.to = r, this.value = n, this.maxPoint = i; } @@ -3538,7 +3538,7 @@ class YM { continue; (p - d || u.endSide - u.startSide) < 0 || (a < 0 && (a = d), u.point && (o = Math.max(o, p - d)), n.push(u), i.push(d - a), s.push(p - a)); } - return { mapped: n.length ? new YM(i, s, n, o) : null, pos: a }; + return { mapped: n.length ? new GM(i, s, n, o) : null, pos: a }; } } class $r { @@ -3567,9 +3567,9 @@ class $r { let { add: r = [], sort: n = !1, filterFrom: i = 0, filterTo: s = this.length } = e, a = e.filter; if (r.length == 0 && !a) return this; - if (n && (r = r.slice().sort(W7)), this.isEmpty) + if (n && (r = r.slice().sort(H7)), this.isEmpty) return r.length ? $r.of(r) : this; - let o = new IK(this, null, -1).goto(0), l = 0, u = [], h = new os(); + let o = new BK(this, null, -1).goto(0), l = 0, u = [], h = new os(); for (; o.value || l < r.length; ) if (l < r.length && (o.from - r[l].from || o.startSide - r[l].value.startSide) >= 0) { let f = r[l++]; @@ -3614,8 +3614,8 @@ class $r { return u2.from(e).goto(r); } static compare(e, r, n, i, s = -1) { - let a = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = r.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), l = vF(a, o, n), u = new gv(a, l, s), h = new gv(o, l, s); - n.iterGaps((f, d, p) => yF(u, f, h, d, p, i)), n.empty && n.length == 0 && yF(u, 0, h, 0, 0, i); + let a = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = r.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), l = bF(a, o, n), u = new gv(a, l, s), h = new gv(o, l, s); + n.iterGaps((f, d, p) => xF(u, f, h, d, p, i)), n.empty && n.length == 0 && xF(u, 0, h, 0, 0, i); } static eq(e, r, n = 0, i) { i == null && (i = 1e9 - 1); @@ -3624,9 +3624,9 @@ class $r { return !1; if (!s.length) return !0; - let o = vF(s, a), l = new gv(s, o, 0).goto(n), u = new gv(a, o, 0).goto(n); + let o = bF(s, a), l = new gv(s, o, 0).goto(n), u = new gv(a, o, 0).goto(n); for (; ; ) { - if (l.to != u.to || !G7(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) + if (l.to != u.to || !Z7(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) return !1; if (l.to > i) return !0; @@ -3649,18 +3649,18 @@ class $r { } static of(e, r = !1) { let n = new os(); - for (let i of e instanceof c2 ? [e] : r ? awe(e) : e) + for (let i of e instanceof c2 ? [e] : r ? uwe(e) : e) n.add(i.from, i.to, i.value); return n.finish(); } } $r.empty = /* @__PURE__ */ new $r([], [], null, -1); -function awe(t) { +function uwe(t) { if (t.length > 1) for (let e = t[0], r = 1; r < t.length; r++) { let n = t[r]; - if (W7(e, n) > 0) - return t.slice().sort(W7); + if (H7(e, n) > 0) + return t.slice().sort(H7); e = n; } return t; @@ -3668,7 +3668,7 @@ function awe(t) { $r.empty.nextLayer = $r.empty; class os { finishChunk(e) { - this.chunks.push(new YM(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []); + this.chunks.push(new GM(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []); } constructor() { this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null; @@ -3699,7 +3699,7 @@ class os { return this.from = null, r; } } -function vF(t, e, r) { +function bF(t, e, r) { let n = /* @__PURE__ */ new Map(); for (let s of t) for (let a = 0; a < s.chunk.length; a++) @@ -3712,7 +3712,7 @@ function vF(t, e, r) { } return i; } -class IK { +class BK { constructor(e, r, n, i = 0) { this.layer = e, this.skip = r, this.minPoint = n, this.rank = i; } @@ -3776,7 +3776,7 @@ class u2 { let i = []; for (let s = 0; s < e.length; s++) for (let a = e[s]; !a.isEmpty; a = a.nextLayer) - a.maxPoint >= n && i.push(new IK(a, r, n, s)); + a.maxPoint >= n && i.push(new BK(a, r, n, s)); return i.length == 1 ? i[0] : new u2(i); } get startSide() { @@ -3786,14 +3786,14 @@ class u2 { for (let n of this.heap) n.goto(e, r); for (let n = this.heap.length >> 1; n >= 0; n--) - d_(this.heap, n); + m_(this.heap, n); return this.next(), this; } forward(e, r) { for (let n of this.heap) n.forward(e, r); for (let n = this.heap.length >> 1; n >= 0; n--) - d_(this.heap, n); + m_(this.heap, n); (this.to - e || this.value.endSide - r) < 0 && this.next(); } next() { @@ -3801,11 +3801,11 @@ class u2 { this.from = this.to = 1e9, this.value = null, this.rank = -1; else { let e = this.heap[0]; - this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), d_(this.heap, 0); + this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), m_(this.heap, 0); } } } -function d_(t, e) { +function m_(t, e) { for (let r = t[e]; ; ) { let n = (e << 1) + 1; if (n >= t.length) @@ -3829,13 +3829,13 @@ class gv { this.cursor.forward(e, r); } removeActive(e) { - iO(this.active, e), iO(this.activeTo, e), iO(this.activeRank, e), this.minActive = bF(this.active, this.activeTo); + iO(this.active, e), iO(this.activeTo, e), iO(this.activeRank, e), this.minActive = wF(this.active, this.activeTo); } addActive(e) { let r = 0, { value: n, to: i, rank: s } = this.cursor; for (; r < this.activeRank.length && this.activeRank[r] <= s; ) r++; - sO(this.active, r, n), sO(this.activeTo, r, i), sO(this.activeRank, r, s), e && sO(e, r, this.cursor.from), this.minActive = bF(this.active, this.activeTo); + sO(this.active, r, n), sO(this.activeTo, r, i), sO(this.activeRank, r, s), e && sO(e, r, this.cursor.from), this.minActive = wF(this.active, this.activeTo); } next() { let e = this.to, r = this.point; @@ -3890,17 +3890,17 @@ class gv { return r; } } -function yF(t, e, r, n, i, s) { +function xF(t, e, r, n, i, s) { t.goto(e), r.goto(n); let a = n + i, o = n, l = n - e; for (; ; ) { let u = t.to + l - r.to || t.endSide - r.endSide, h = u < 0 ? t.to + l : r.to, f = Math.min(h, a); - if (t.point || r.point ? t.point && r.point && (t.point == r.point || t.point.eq(r.point)) && G7(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, f, t.point, r.point) : f > o && !G7(t.active, r.active) && s.compareRange(o, f, t.active, r.active), h > a) + if (t.point || r.point ? t.point && r.point && (t.point == r.point || t.point.eq(r.point)) && Z7(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, f, t.point, r.point) : f > o && !Z7(t.active, r.active) && s.compareRange(o, f, t.active, r.active), h > a) break; o = h, u <= 0 && t.next(), u >= 0 && r.next(); } } -function G7(t, e) { +function Z7(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -3918,7 +3918,7 @@ function sO(t, e, r) { t[n + 1] = t[n]; t[e] = r; } -function bF(t, e) { +function wF(t, e) { let r = -1, n = 1e9; for (let i = 0; i < e.length; i++) (e[i] - n || t[i].endSide - t[r].endSide) < 0 && (r = i, n = e[i]); @@ -3930,7 +3930,7 @@ function tc(t, e, r = t.length) { t.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = Os(t, i)); return n; } -function X7(t, e, r, n) { +function j7(t, e, r, n) { for (let i = 0, s = 0; ; ) { if (s >= e) return i; @@ -3940,8 +3940,8 @@ function X7(t, e, r, n) { } return n === !0 ? -1 : t.length; } -const H7 = "\u037C", xF = typeof Symbol > "u" ? "__" + H7 : Symbol.for(H7), Z7 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), wF = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; -class ah { +const K7 = "\u037C", OF = typeof Symbol > "u" ? "__" + K7 : Symbol.for(K7), J7 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), kF = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; +class oh { constructor(e, r) { this.rules = []; let { finish: n } = r || {}; @@ -3977,29 +3977,29 @@ class ah { `); } static newName() { - let e = wF[xF] || 1; - return wF[xF] = e + 1, H7 + e.toString(36); + let e = kF[OF] || 1; + return kF[OF] = e + 1, K7 + e.toString(36); } static mount(e, r, n) { - let i = e[Z7], s = n && n.nonce; - i ? s && i.setNonce(s) : i = new owe(e, s), i.mount(Array.isArray(r) ? r : [r]); + let i = e[J7], s = n && n.nonce; + i ? s && i.setNonce(s) : i = new hwe(e, s), i.mount(Array.isArray(r) ? r : [r]); } } -let OF = /* @__PURE__ */ new Map(); -class owe { +let SF = /* @__PURE__ */ new Map(); +class hwe { constructor(e, r) { let n = e.ownerDocument || e, i = n.defaultView; if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) { - let s = OF.get(n); + let s = SF.get(n); if (s) - return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[Z7] = s; - this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], OF.set(n, this); + return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[J7] = s; + this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], SF.set(n, this); } else { this.styleTag = n.createElement("style"), r && this.styleTag.setAttribute("nonce", r); let s = e.head || e; s.insertBefore(this.styleTag, s.firstChild); } - this.modules = [], e[Z7] = this; + this.modules = [], e[J7] = this; } mount(e) { let r = this.sheet, n = 0, i = 0; @@ -4027,7 +4027,7 @@ class owe { this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e); } } -var Df = { +var Pf = { 8: "Backspace", 9: "Tab", 10: "Enter", @@ -4105,27 +4105,27 @@ var Df = { 220: "|", 221: "}", 222: '"' -}, lwe = typeof navigator < "u" && /Mac/.test(navigator.platform), cwe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); +}, fwe = typeof navigator < "u" && /Mac/.test(navigator.platform), dwe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); for (var xs = 0; xs < 10; xs++) - Df[48 + xs] = Df[96 + xs] = String(xs); + Pf[48 + xs] = Pf[96 + xs] = String(xs); for (var xs = 1; xs <= 24; xs++) - Df[xs + 111] = "F" + xs; + Pf[xs + 111] = "F" + xs; for (var xs = 65; xs <= 90; xs++) - Df[xs] = String.fromCharCode(xs + 32), h2[xs] = String.fromCharCode(xs); -for (var p_ in Df) - h2.hasOwnProperty(p_) || (h2[p_] = Df[p_]); -function uwe(t) { - var e = lwe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cwe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? h2 : Df)[t.keyCode] || t.key || "Unidentified"; + Pf[xs] = String.fromCharCode(xs + 32), h2[xs] = String.fromCharCode(xs); +for (var v_ in Pf) + h2.hasOwnProperty(v_) || (h2[v_] = Pf[v_]); +function pwe(t) { + var e = fwe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || dwe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? h2 : Pf)[t.keyCode] || t.key || "Unidentified"; return r == "Esc" && (r = "Escape"), r == "Del" && (r = "Delete"), r == "Left" && (r = "ArrowLeft"), r == "Up" && (r = "ArrowUp"), r == "Right" && (r = "ArrowRight"), r == "Down" && (r = "ArrowDown"), r; } function pk(t) { let e; return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection(); } -function j7(t, e) { +function e8(t, e) { return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1; } -function hwe(t) { +function gwe(t) { let e = t.activeElement; for (; e && e.shadowRoot; ) e = e.shadowRoot.activeElement; @@ -4135,27 +4135,27 @@ function e5(t, e) { if (!e.anchorNode) return !1; try { - return j7(t, e.anchorNode); + return e8(t, e.anchorNode); } catch { return !1; } } function f2(t) { - return t.nodeType == 3 ? A0(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : []; + return t.nodeType == 3 ? L0(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : []; } function gk(t, e, r, n) { - return r ? kF(t, e, r, n, -1) || kF(t, e, r, n, 1) : !1; + return r ? TF(t, e, r, n, -1) || TF(t, e, r, n, 1) : !1; } function d2(t) { for (var e = 0; ; e++) if (t = t.previousSibling, !t) return e; } -function kF(t, e, r, n, i) { +function TF(t, e, r, n, i) { for (; ; ) { if (t == r && e == n) return !0; - if (e == (i < 0 ? 0 : oh(t))) { + if (e == (i < 0 ? 0 : lh(t))) { if (t.nodeName == "DIV") return !1; let s = t.parentNode; @@ -4165,19 +4165,19 @@ function kF(t, e, r, n, i) { } else if (t.nodeType == 1) { if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false") return !1; - e = i < 0 ? oh(t) : 0; + e = i < 0 ? lh(t) : 0; } else return !1; } } -function oh(t) { +function lh(t) { return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length; } -function WM(t, e) { +function XM(t, e) { let r = e ? t.left : t.right; return { left: r, right: r, top: t.top, bottom: t.bottom }; } -function fwe(t) { +function mwe(t) { return { left: 0, right: t.innerWidth, @@ -4185,24 +4185,24 @@ function fwe(t) { bottom: t.innerHeight }; } -function $K(t, e) { +function FK(t, e) { let r = e.width / t.offsetWidth, n = e.height / t.offsetHeight; return (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.width - t.offsetWidth) < 1) && (r = 1), (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.height - t.offsetHeight) < 1) && (n = 1), { scaleX: r, scaleY: n }; } -function dwe(t, e, r, n, i, s, a, o) { +function vwe(t, e, r, n, i, s, a, o) { let l = t.ownerDocument, u = l.defaultView || window; for (let h = t, f = !1; h && !f; ) if (h.nodeType == 1) { let d, p = h == l.body, g = 1, m = 1; if (p) - d = fwe(u); + d = mwe(u); else { if (/^(fixed|sticky)$/.test(getComputedStyle(h).position) && (f = !0), h.scrollHeight <= h.clientHeight && h.scrollWidth <= h.clientWidth) { h = h.assignedSlot || h.parentNode; continue; } let b = h.getBoundingClientRect(); - ({ scaleX: g, scaleY: m } = $K(h, b)), d = { + ({ scaleX: g, scaleY: m } = FK(h, b)), d = { left: b.left, right: b.left + h.clientWidth * g, top: b.top, @@ -4244,7 +4244,7 @@ function dwe(t, e, r, n, i, s, a, o) { else break; } -function pwe(t) { +function ywe(t) { let e = t.ownerDocument; for (let r = t.parentNode; r && r != e.body; ) if (r.nodeType == 1) { @@ -4257,7 +4257,7 @@ function pwe(t) { break; return null; } -class gwe { +class bwe { constructor() { this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0; } @@ -4266,45 +4266,45 @@ class gwe { } setRange(e) { let { anchorNode: r, focusNode: n } = e; - this.set(r, Math.min(e.anchorOffset, r ? oh(r) : 0), n, Math.min(e.focusOffset, n ? oh(n) : 0)); + this.set(r, Math.min(e.anchorOffset, r ? lh(r) : 0), n, Math.min(e.focusOffset, n ? lh(n) : 0)); } set(e, r, n, i) { this.anchorNode = e, this.anchorOffset = r, this.focusNode = n, this.focusOffset = i; } } -let Vp = null; -function BK(t) { +let qp = null; +function zK(t) { if (t.setActive) return t.setActive(); - if (Vp) - return t.focus(Vp); + if (qp) + return t.focus(qp); let e = []; for (let r = t; r && (e.push(r, r.scrollTop, r.scrollLeft), r != r.ownerDocument); r = r.parentNode) ; - if (t.focus(Vp == null ? { + if (t.focus(qp == null ? { get preventScroll() { - return Vp = { preventScroll: !0 }, !0; + return qp = { preventScroll: !0 }, !0; } - } : void 0), !Vp) { - Vp = !1; + } : void 0), !qp) { + qp = !1; for (let r = 0; r < e.length; ) { let n = e[r++], i = e[r++], s = e[r++]; n.scrollTop != i && (n.scrollTop = i), n.scrollLeft != s && (n.scrollLeft = s); } } } -let SF; -function A0(t, e, r = e) { - let n = SF || (SF = document.createRange()); +let CF; +function L0(t, e, r = e) { + let n = CF || (CF = document.createRange()); return n.setEnd(t, r), n.setStart(t, e), n; } -function Ag(t, e, r) { +function Lg(t, e, r) { let n = { key: e, code: e, keyCode: r, which: r, cancelable: !0 }, i = new KeyboardEvent("keydown", n); i.synthetic = !0, t.dispatchEvent(i); let s = new KeyboardEvent("keyup", n); return s.synthetic = !0, t.dispatchEvent(s), i.defaultPrevented || s.defaultPrevented; } -function mwe(t) { +function xwe(t) { for (; t; ) { if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host)) return t; @@ -4312,27 +4312,27 @@ function mwe(t) { } return null; } -function FK(t) { +function QK(t) { for (; t.attributes.length; ) t.removeAttributeNode(t.attributes[0]); } -function vwe(t, e) { +function wwe(t, e) { let r = e.focusNode, n = e.focusOffset; if (!r || e.anchorNode != r || e.anchorOffset != n) return !1; - for (n = Math.min(n, oh(r)); ; ) + for (n = Math.min(n, lh(r)); ; ) if (n) { if (r.nodeType != 1) return !1; let i = r.childNodes[n - 1]; - i.contentEditable == "false" ? n-- : (r = i, n = oh(r)); + i.contentEditable == "false" ? n-- : (r = i, n = lh(r)); } else { if (r == t) return !0; n = d2(r), r = r.parentNode; } } -function zK(t) { +function UK(t) { return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4); } class Hs { @@ -4346,7 +4346,7 @@ class Hs { return new Hs(e.parentNode, d2(e) + 1, r); } } -const GM = []; +const HM = []; class Dn { constructor() { this.parent = null, this.dom = null, this.flags = 2; @@ -4385,13 +4385,13 @@ class Dn { } if (s = i ? i.nextSibling : n.firstChild, r && !r.written && r.node == n && s != a.dom && (r.written = !0), a.dom.parentNode == n) for (; s && s != a.dom; ) - s = TF(s); + s = EF(s); else n.insertBefore(a.dom, s); i = a.dom; } for (s = i ? i.nextSibling : n.firstChild, s && r && r.node == n && (r.written = !0); s; ) - s = TF(s); + s = EF(s); } else if (this.flags & 1) for (let n of this.children) n.flags & 7 && (n.sync(e, r), n.flags &= -8); @@ -4403,7 +4403,7 @@ class Dn { if (e == this.dom) n = this.dom.childNodes[r]; else { - let i = oh(e) == 0 ? 0 : r == 0 ? -1 : 1; + let i = lh(e) == 0 ? 0 : r == 0 ? -1 : 1; for (; ; ) { let s = e.parentNode; if (s == this.dom) @@ -4468,7 +4468,7 @@ class Dn { e = r; } } - replaceChildren(e, r, n = GM) { + replaceChildren(e, r, n = HM) { this.markDirty(); for (let i = e; i < r; i++) { let s = this.children[i]; @@ -4485,7 +4485,7 @@ class Dn { return !1; } childCursor(e = this.length) { - return new QK(this.children, e, this.children.length); + return new VK(this.children, e, this.children.length); } childPos(e, r = 1) { return this.childCursor().findPos(e, r); @@ -4525,11 +4525,11 @@ class Dn { } } Dn.prototype.breakAfter = 0; -function TF(t) { +function EF(t) { let e = t.nextSibling; return t.parentNode.removeChild(t), e; } -class QK { +class VK { constructor(e, r, n) { this.children = e, this.pos = r, this.i = n, this.off = 0; } @@ -4542,7 +4542,7 @@ class QK { } } } -function UK(t, e, r, n, i, s, a, o, l) { +function qK(t, e, r, n, i, s, a, o, l) { let { children: u } = t, h = u.length ? u[e] : null, f = s.length ? s[s.length - 1] : null, d = f ? f.breakAfter : a; if (!(e == n && h && !a && !d && s.length < 2 && h.merge(r, i, s.length ? f : null, r == 0, o, l))) { if (n < u.length) { @@ -4559,33 +4559,33 @@ function UK(t, e, r, n, i, s, a, o, l) { !s.length && e && n < u.length && !u[e - 1].breakAfter && u[n].merge(0, 0, u[e - 1], !1, o, l) && e--, (e < n || s.length) && t.replaceChildren(e, n, s); } } -function VK(t, e, r, n, i, s) { +function YK(t, e, r, n, i, s) { let a = t.childCursor(), { i: o, off: l } = a.findPos(r, 1), { i: u, off: h } = a.findPos(e, -1), f = e - r; for (let d of n) f += d.length; - t.length += f, UK(t, u, h, o, l, n, 0, i, s); + t.length += f, qK(t, u, h, o, l, n, 0, i, s); } -let Co = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, K7 = typeof document < "u" ? document : { documentElement: { style: {} } }; -const J7 = /* @__PURE__ */ /Edge\/(\d+)/.exec(Co.userAgent), qK = /* @__PURE__ */ /MSIE \d/.test(Co.userAgent), e8 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Co.userAgent), DT = !!(qK || e8 || J7), CF = !DT && /* @__PURE__ */ /gecko\/(\d+)/i.test(Co.userAgent), g_ = !DT && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Co.userAgent), EF = "webkitFontSmoothing" in K7.documentElement.style, YK = !DT && /* @__PURE__ */ /Apple Computer/.test(Co.vendor), _F = YK && (/* @__PURE__ */ /Mobile\/\w+/.test(Co.userAgent) || Co.maxTouchPoints > 2); +let Co = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, t8 = typeof document < "u" ? document : { documentElement: { style: {} } }; +const r8 = /* @__PURE__ */ /Edge\/(\d+)/.exec(Co.userAgent), WK = /* @__PURE__ */ /MSIE \d/.test(Co.userAgent), n8 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Co.userAgent), PT = !!(WK || n8 || r8), _F = !PT && /* @__PURE__ */ /gecko\/(\d+)/i.test(Co.userAgent), y_ = !PT && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Co.userAgent), AF = "webkitFontSmoothing" in t8.documentElement.style, GK = !PT && /* @__PURE__ */ /Apple Computer/.test(Co.vendor), LF = GK && (/* @__PURE__ */ /Mobile\/\w+/.test(Co.userAgent) || Co.maxTouchPoints > 2); var Vt = { - mac: _F || /* @__PURE__ */ /Mac/.test(Co.platform), + mac: LF || /* @__PURE__ */ /Mac/.test(Co.platform), windows: /* @__PURE__ */ /Win/.test(Co.platform), linux: /* @__PURE__ */ /Linux|X11/.test(Co.platform), - ie: DT, - ie_version: qK ? K7.documentMode || 6 : e8 ? +e8[1] : J7 ? +J7[1] : 0, - gecko: CF, - gecko_version: CF ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Co.userAgent) || [0, 0])[1] : 0, - chrome: !!g_, - chrome_version: g_ ? +g_[1] : 0, - ios: _F, + ie: PT, + ie_version: WK ? t8.documentMode || 6 : n8 ? +n8[1] : r8 ? +r8[1] : 0, + gecko: _F, + gecko_version: _F ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Co.userAgent) || [0, 0])[1] : 0, + chrome: !!y_, + chrome_version: y_ ? +y_[1] : 0, + ios: LF, android: /* @__PURE__ */ /Android\b/.test(Co.userAgent), - webkit: EF, - safari: YK, - webkit_version: EF ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, - tabSize: K7.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" + webkit: AF, + safari: GK, + webkit_version: AF ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, + tabSize: t8.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" }; -const ywe = 256; -class lh extends Dn { +const Owe = 256; +class ch extends Dn { constructor(e) { super(), this.text = e; } @@ -4602,10 +4602,10 @@ class lh extends Dn { e.nodeType == 3 && this.createDOM(e); } merge(e, r, n) { - return this.flags & 8 || n && (!(n instanceof lh) || this.length - (r - e) + n.length > ywe || n.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (n ? n.text : "") + this.text.slice(r), this.markDirty(), !0); + return this.flags & 8 || n && (!(n instanceof ch) || this.length - (r - e) + n.length > Owe || n.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (n ? n.text : "") + this.text.slice(r), this.markDirty(), !0); } split(e) { - let r = new lh(this.text.slice(e)); + let r = new ch(this.text.slice(e)); return this.text = this.text.slice(0, e), this.markDirty(), r.flags |= this.flags & 8, r; } localPosFromDOM(e, r) { @@ -4618,17 +4618,17 @@ class lh extends Dn { return { from: n, to: n + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; } coordsAt(e, r) { - return bwe(this.dom, e, r); + return kwe(this.dom, e, r); } } -class ch extends Dn { +class uh extends Dn { constructor(e, r = [], n = 0) { super(), this.mark = e, this.children = r, this.length = n; for (let i of r) i.setParent(this); } setAttrs(e) { - if (FK(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs) + if (QK(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs) for (let r in this.mark.attrs) e.setAttribute(r, this.mark.attrs[r]); return e; @@ -4643,7 +4643,7 @@ class ch extends Dn { this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, r); } merge(e, r, n, i, s, a) { - return n && (!(n instanceof ch && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (VK(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); + return n && (!(n instanceof uh && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (YK(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); } split(e) { let r = [], n = 0, i = -1, s = 0; @@ -4652,35 +4652,35 @@ class ch extends Dn { l > e && r.push(n < e ? o.split(e - n) : o), i < 0 && n >= e && (i = s), n = l, s++; } let a = this.length - e; - return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new ch(this.mark, r, a); + return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new uh(this.mark, r, a); } domAtPos(e) { - return WK(this, e); + return XK(this, e); } coordsAt(e, r) { - return XK(this, e, r); + return ZK(this, e, r); } } -function bwe(t, e, r) { +function kwe(t, e, r) { let n = t.nodeValue.length; e > n && (e = n); let i = e, s = e, a = 0; e == 0 && r < 0 || e == n && r >= 0 ? Vt.chrome || Vt.gecko || (e ? (i--, a = 1) : s < n && (s++, a = -1)) : r < 0 ? i-- : s < n && s++; - let o = A0(t, i, s).getClientRects(); + let o = L0(t, i, s).getClientRects(); if (!o.length) return null; let l = o[(a ? a < 0 : r >= 0) ? 0 : o.length - 1]; - return Vt.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? WM(l, a < 0) : l || null; + return Vt.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? XM(l, a < 0) : l || null; } -class lf extends Dn { +class cf extends Dn { static create(e, r, n) { - return new lf(e, r, n); + return new cf(e, r, n); } constructor(e, r, n) { super(), this.widget = e, this.length = r, this.side = n, this.prevWidget = null; } split(e) { - let r = lf.create(this.widget, this.length - e, this.side); + let r = cf.create(this.widget, this.length - e, this.side); return this.length -= e, r; } sync(e) { @@ -4690,10 +4690,10 @@ class lf extends Dn { return this.side; } merge(e, r, n, i, s, a) { - return n && (!(n instanceof lf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); + return n && (!(n instanceof cf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); } become(e) { - return e instanceof lf && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1; + return e instanceof cf && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1; } ignoreMutation() { return !0; @@ -4726,7 +4726,7 @@ class lf extends Dn { let a = this.side ? this.side < 0 : e > 0; for (let o = a ? i.length - 1 : 0; s = i[o], !(e > 0 ? o == 0 : o == i.length - 1 || s.top < s.bottom); o += a ? -1 : 1) ; - return WM(s, !a); + return XM(s, !a); } get isEditable() { return !1; @@ -4741,7 +4741,7 @@ class lf extends Dn { super.destroy(), this.dom && this.widget.destroy(this.dom); } } -class hm extends Dn { +class fm extends Dn { constructor(e) { super(), this.side = e; } @@ -4752,10 +4752,10 @@ class hm extends Dn { return !1; } become(e) { - return e instanceof hm && e.side == this.side; + return e instanceof fm && e.side == this.side; } split() { - return new hm(this.side); + return new fm(this.side); } sync() { if (!this.dom) { @@ -4785,8 +4785,8 @@ class hm extends Dn { return !0; } } -lh.prototype.children = lf.prototype.children = hm.prototype.children = GM; -function WK(t, e) { +ch.prototype.children = cf.prototype.children = fm.prototype.children = HM; +function XK(t, e) { let r = t.dom, { children: n } = t, i = 0; for (let s = 0; i < n.length; i++) { let a = n[i], o = s + a.length; @@ -4810,11 +4810,11 @@ function WK(t, e) { } return new Hs(r, 0); } -function GK(t, e, r) { +function HK(t, e, r) { let n, { children: i } = t; - r > 0 && e instanceof ch && i.length && (n = i[i.length - 1]) instanceof ch && n.mark.eq(e.mark) ? GK(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; + r > 0 && e instanceof uh && i.length && (n = i[i.length - 1]) instanceof uh && n.mark.eq(e.mark) ? HK(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; } -function XK(t, e, r) { +function ZK(t, e, r) { let n = null, i = -1, s = null, a = -1; function o(u, h) { for (let f = 0, d = 0; f < u.children.length && d <= h; f++) { @@ -4824,25 +4824,25 @@ function XK(t, e, r) { } o(t, e); let l = (r < 0 ? n : s) || n || s; - return l ? l.coordsAt(Math.max(0, l == n ? i : a), r) : xwe(t); + return l ? l.coordsAt(Math.max(0, l == n ? i : a), r) : Swe(t); } -function xwe(t) { +function Swe(t) { let e = t.dom.lastChild; if (!e) return t.dom.getBoundingClientRect(); let r = f2(e); return r[r.length - 1] || null; } -function t8(t, e) { +function i8(t, e) { for (let r in t) r == "class" && e.class ? e.class += " " + t.class : r == "style" && e.style ? e.style += ";" + t.style : e[r] = t[r]; return e; } -const AF = /* @__PURE__ */ Object.create(null); -function XM(t, e, r) { +const RF = /* @__PURE__ */ Object.create(null); +function ZM(t, e, r) { if (t == e) return !0; - t || (t = AF), e || (e = AF); + t || (t = RF), e || (e = RF); let n = Object.keys(t), i = Object.keys(e); if (n.length - (r && n.indexOf(r) > -1 ? 1 : 0) != i.length - (r && i.indexOf(r) > -1 ? 1 : 0)) return !1; @@ -4851,7 +4851,7 @@ function XM(t, e, r) { return !1; return !0; } -function r8(t, e, r) { +function s8(t, e, r) { let n = !1; if (e) for (let i in e) @@ -4861,7 +4861,7 @@ function r8(t, e, r) { e && e[i] == r[i] || (n = !0, i == "style" ? t.style.cssText = r[i] : t.setAttribute(i, r[i])); return n; } -function wwe(t) { +function Twe(t) { let e = /* @__PURE__ */ Object.create(null); for (let r = 0; r < t.attributes.length; r++) { let n = t.attributes[r]; @@ -4879,7 +4879,7 @@ class Pi extends Dn { return !1; this.dom || n.transferDOM(this); } - return i && this.setDeco(n ? n.attrs : null), VK(this, e, r, n ? n.children.slice() : [], s, a), !0; + return i && this.setDeco(n ? n.attrs : null), YK(this, e, r, n ? n.children.slice() : [], s, a), !0; } split(e) { let r = new Pi(); @@ -4897,28 +4897,28 @@ class Pi extends Dn { !this.dom || (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null); } setDeco(e) { - XM(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); + ZM(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); } append(e, r) { - GK(this, e, r); + HK(this, e, r); } addLineDeco(e) { let r = e.spec.attributes, n = e.spec.class; - r && (this.attrs = t8(r, this.attrs || {})), n && (this.attrs = t8({ class: n }, this.attrs || {})); + r && (this.attrs = i8(r, this.attrs || {})), n && (this.attrs = i8({ class: n }, this.attrs || {})); } domAtPos(e) { - return WK(this, e); + return XK(this, e); } reuseDOM(e) { e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6); } sync(e, r) { var n; - this.dom ? this.flags & 4 && (FK(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (r8(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, r); + this.dom ? this.flags & 4 && (QK(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (s8(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, r); let i = this.dom.lastChild; - for (; i && Dn.get(i) instanceof ch; ) + for (; i && Dn.get(i) instanceof uh; ) i = i.lastChild; - if (!i || !this.length || i.nodeName != "BR" && ((n = Dn.get(i)) === null || n === void 0 ? void 0 : n.isEditable) == !1 && (!Vt.ios || !this.children.some((s) => s instanceof lh))) { + if (!i || !this.length || i.nodeName != "BR" && ((n = Dn.get(i)) === null || n === void 0 ? void 0 : n.isEditable) == !1 && (!Vt.ios || !this.children.some((s) => s instanceof ch))) { let s = document.createElement("BR"); s.cmIgnore = !0, this.dom.appendChild(s); } @@ -4928,7 +4928,7 @@ class Pi extends Dn { return null; let e = 0, r; for (let n of this.children) { - if (!(n instanceof lh) || /[^ -~]/.test(n.text)) + if (!(n instanceof ch) || /[^ -~]/.test(n.text)) return null; let i = f2(n.dom); if (i.length != 1) @@ -4942,7 +4942,7 @@ class Pi extends Dn { } : null; } coordsAt(e, r) { - let n = XK(this, e, r); + let n = ZK(this, e, r); if (!this.children.length && n && this.parent) { let { heightOracle: i } = this.parent.view.viewState, s = n.bottom - n.top; if (Math.abs(s - i.lineHeight) < 2 && i.textHeight < s) { @@ -4972,12 +4972,12 @@ class Pi extends Dn { return null; } } -class bf extends Dn { +class xf extends Dn { constructor(e, r, n) { super(), this.widget = e, this.length = r, this.deco = n, this.breakAfter = 0, this.prevWidget = null; } merge(e, r, n, i, s, a) { - return n && (!(n instanceof bf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); + return n && (!(n instanceof xf) || !this.widget.compare(n.widget) || e > 0 && s <= 0 || r < this.length && a <= 0) ? !1 : (this.length = e + (n ? n.length : 0) + (this.length - r), !0); } domAtPos(e) { return e == 0 ? Hs.before(this.dom) : Hs.after(this.dom, e == this.length); @@ -4985,11 +4985,11 @@ class bf extends Dn { split(e) { let r = this.length - e; this.length = e; - let n = new bf(this.widget, r, this.deco); + let n = new xf(this.widget, r, this.deco); return n.breakAfter = this.breakAfter, n; } get children() { - return GM; + return HM; } sync(e) { (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.dom.contentEditable = "false"); @@ -5001,7 +5001,7 @@ class bf extends Dn { return null; } become(e) { - return e instanceof bf && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1; + return e instanceof xf && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1; } ignoreMutation() { return !0; @@ -5057,7 +5057,7 @@ class uo { var Ca = /* @__PURE__ */ function(t) { return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t; }(Ca || (Ca = {})); -class It extends _0 { +class It extends A0 { constructor(e, r, n, i) { super(), this.startSide = e, this.endSide = r, this.widget = n, this.spec = i; } @@ -5069,17 +5069,17 @@ class It extends _0 { } static widget(e) { let r = Math.max(-1e4, Math.min(1e4, e.side || 0)), n = !!e.block; - return r += n && !e.inlineOrder ? r > 0 ? 3e8 : -4e8 : r > 0 ? 1e8 : -1e8, new Pf(e, r, r, n, e.widget || null, !1); + return r += n && !e.inlineOrder ? r > 0 ? 3e8 : -4e8 : r > 0 ? 1e8 : -1e8, new Nf(e, r, r, n, e.widget || null, !1); } static replace(e) { let r = !!e.block, n, i; if (e.isBlockGap) n = -5e8, i = 4e8; else { - let { start: s, end: a } = HK(e, r); + let { start: s, end: a } = jK(e, r); n = (s ? r ? -3e8 : -1 : 5e8) - 1, i = (a ? r ? 2e8 : 1 : -6e8) + 1; } - return new Pf(e, n, i, r, e.widget || null, !0); + return new Nf(e, n, i, r, e.widget || null, !0); } static line(e) { return new Nx(e); @@ -5094,12 +5094,12 @@ class It extends _0 { It.none = $r.empty; class Px extends It { constructor(e) { - let { start: r, end: n } = HK(e); + let { start: r, end: n } = jK(e); super(r ? -1 : 5e8, n ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null; } eq(e) { var r, n; - return this == e || e instanceof Px && this.tagName == e.tagName && (this.class || ((r = this.attrs) === null || r === void 0 ? void 0 : r.class)) == (e.class || ((n = e.attrs) === null || n === void 0 ? void 0 : n.class)) && XM(this.attrs, e.attrs, "class"); + return this == e || e instanceof Px && this.tagName == e.tagName && (this.class || ((r = this.attrs) === null || r === void 0 ? void 0 : r.class)) == (e.class || ((n = e.attrs) === null || n === void 0 ? void 0 : n.class)) && ZM(this.attrs, e.attrs, "class"); } range(e, r = e) { if (e >= r) @@ -5113,7 +5113,7 @@ class Nx extends It { super(-2e8, -2e8, null, e); } eq(e) { - return e instanceof Nx && this.spec.class == e.spec.class && XM(this.spec.attributes, e.spec.attributes); + return e instanceof Nx && this.spec.class == e.spec.class && ZM(this.spec.attributes, e.spec.attributes); } range(e, r = e) { if (r != e) @@ -5123,7 +5123,7 @@ class Nx extends It { } Nx.prototype.mapMode = Fi.TrackBefore; Nx.prototype.point = !0; -class Pf extends It { +class Nf extends It { constructor(e, r, n, i, s, a) { super(r, n, s, e), this.block = i, this.isReplace = a, this.mapMode = i ? r <= 0 ? Fi.TrackBefore : Fi.TrackAfter : Fi.TrackDel; } @@ -5134,7 +5134,7 @@ class Pf extends It { return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0); } eq(e) { - return e instanceof Pf && Owe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; + return e instanceof Nf && Cwe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; } range(e, r = e) { if (this.isReplace && (e > r || e == r && this.startSide > 0 && this.endSide <= 0)) @@ -5144,15 +5144,15 @@ class Pf extends It { return super.range(e, r); } } -Pf.prototype.point = !0; -function HK(t, e = !1) { +Nf.prototype.point = !0; +function jK(t, e = !1) { let { inclusiveStart: r, inclusiveEnd: n } = t; return r == null && (r = t.inclusive), n == null && (n = t.inclusive), { start: r != null ? r : e, end: n != null ? n : e }; } -function Owe(t, e) { +function Cwe(t, e) { return t == e || !!(t && e && t.compare(e)); } -function n8(t, e, r, n = 0) { +function a8(t, e, r, n = 0) { let i = r.length - 1; i >= 0 && r[i] + n >= t ? r[i] = Math.max(r[i], e) : r.push(t, e); } @@ -5164,19 +5164,19 @@ class Py { if (this.content.length == 0) return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; let e = this.content[this.content.length - 1]; - return !(e.breakAfter || e instanceof bf && e.deco.endSide < 0); + return !(e.breakAfter || e instanceof xf && e.deco.endSide < 0); } getLine() { return this.curLine || (this.content.push(this.curLine = new Pi()), this.atCursorPos = !0), this.curLine; } flushBuffer(e = this.bufferMarks) { - this.pendingBuffer && (this.curLine.append(aO(new hm(-1), e), e.length), this.pendingBuffer = 0); + this.pendingBuffer && (this.curLine.append(aO(new fm(-1), e), e.length), this.pendingBuffer = 0); } addBlockWidget(e) { this.flushBuffer(), this.curLine = null, this.content.push(e); } finish(e) { - this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof bf) && this.getLine(); + this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof xf) && this.getLine(); } buildText(e, r, n) { for (; e > 0; ) { @@ -5191,26 +5191,26 @@ class Py { this.text = s, this.textOff = 0; } let i = Math.min(this.text.length - this.textOff, e, 512); - this.flushBuffer(r.slice(r.length - n)), this.getLine().append(aO(new lh(this.text.slice(this.textOff, this.textOff + i)), r), n), this.atCursorPos = !0, this.textOff += i, e -= i, n = 0; + this.flushBuffer(r.slice(r.length - n)), this.getLine().append(aO(new ch(this.text.slice(this.textOff, this.textOff + i)), r), n), this.atCursorPos = !0, this.textOff += i, e -= i, n = 0; } } span(e, r, n, i) { this.buildText(r - e, n, i), this.pos = r, this.openStart < 0 && (this.openStart = i); } point(e, r, n, i, s, a) { - if (this.disallowBlockEffectsFor[a] && n instanceof Pf) { + if (this.disallowBlockEffectsFor[a] && n instanceof Nf) { if (n.block) throw new RangeError("Block decorations may not be specified via plugins"); if (r > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins"); } let o = r - e; - if (n instanceof Pf) + if (n instanceof Nf) if (n.block) - n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new bf(n.widget || new LF("div"), o, n)); + n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new xf(n.widget || new MF("div"), o, n)); else { - let l = lf.create(n.widget || new LF("span"), o, o ? 0 : n.startSide), u = this.atCursorPos && !l.isEditable && s <= i.length && (e < r || n.startSide > 0), h = !l.isEditable && (e < r || s > i.length || n.startSide <= 0), f = this.getLine(); - this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(aO(new hm(1), i), s), s = i.length + Math.max(0, s - i.length)), f.append(aO(l, i), s), this.atCursorPos = h, this.pendingBuffer = h ? e < r || s > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice()); + let l = cf.create(n.widget || new MF("span"), o, o ? 0 : n.startSide), u = this.atCursorPos && !l.isEditable && s <= i.length && (e < r || n.startSide > 0), h = !l.isEditable && (e < r || s > i.length || n.startSide <= 0), f = this.getLine(); + this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(aO(new fm(1), i), s), s = i.length + Math.max(0, s - i.length)), f.append(aO(l, i), s), this.atCursorPos = h, this.pendingBuffer = h ? e < r || s > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice()); } else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(n); @@ -5223,10 +5223,10 @@ class Py { } function aO(t, e) { for (let r of e) - t = new ch(r, [t], t.length); + t = new uh(r, [t], t.length); return t; } -class LF extends uo { +class MF extends uo { constructor(e) { super(), this.tag = e; } @@ -5243,29 +5243,29 @@ class LF extends uo { return !0; } } -const ZK = /* @__PURE__ */ $t.define(), jK = /* @__PURE__ */ $t.define(), KK = /* @__PURE__ */ $t.define(), JK = /* @__PURE__ */ $t.define(), i8 = /* @__PURE__ */ $t.define(), eJ = /* @__PURE__ */ $t.define(), tJ = /* @__PURE__ */ $t.define(), rJ = /* @__PURE__ */ $t.define({ +const KK = /* @__PURE__ */ $t.define(), JK = /* @__PURE__ */ $t.define(), eJ = /* @__PURE__ */ $t.define(), tJ = /* @__PURE__ */ $t.define(), o8 = /* @__PURE__ */ $t.define(), rJ = /* @__PURE__ */ $t.define(), nJ = /* @__PURE__ */ $t.define(), iJ = /* @__PURE__ */ $t.define({ combine: (t) => t.some((e) => e) -}), nJ = /* @__PURE__ */ $t.define({ +}), sJ = /* @__PURE__ */ $t.define({ combine: (t) => t.some((e) => e) }); -class Lg { +class Rg { constructor(e, r = "nearest", n = "nearest", i = 5, s = 5, a = !1) { this.range = e, this.y = r, this.x = n, this.yMargin = i, this.xMargin = s, this.isSnapshot = a; } map(e) { - return e.empty ? this : new Lg(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); + return e.empty ? this : new Rg(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); } clip(e) { - return this.range.to <= e.doc.length ? this : new Lg(je.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); + return this.range.to <= e.doc.length ? this : new Rg(je.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); } } const oO = /* @__PURE__ */ or.define({ map: (t, e) => t.map(e) }); function al(t, e, r) { - let n = t.facet(JK); + let n = t.facet(tJ); n.length ? n[0](e) : window.onerror ? window.onerror(String(e), r, void 0, void 0, e) : r ? console.error(r + ":", e) : console.error(e); } -const PT = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : !0 }); -let kwe = 0; +const NT = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : !0 }); +let Ewe = 0; const ey = /* @__PURE__ */ $t.define(); class hn { constructor(e, r, n, i, s) { @@ -5273,7 +5273,7 @@ class hn { } static define(e, r) { const { eventHandlers: n, eventObservers: i, provide: s, decorations: a } = r || {}; - return new hn(kwe++, e, n, i, (o) => { + return new hn(Ewe++, e, n, i, (o) => { let l = [ey.of(o)]; return a && l.push(p2.of((u) => { let h = u.plugin(o); @@ -5285,7 +5285,7 @@ class hn { return hn.define((n) => new e(n), r); } } -class m_ { +class b_ { constructor(e) { this.spec = e, this.mustUpdate = null, this.value = null; } @@ -5326,9 +5326,9 @@ class m_ { this.spec = this.value = null; } } -const iJ = /* @__PURE__ */ $t.define(), HM = /* @__PURE__ */ $t.define(), p2 = /* @__PURE__ */ $t.define(), ZM = /* @__PURE__ */ $t.define(), sJ = /* @__PURE__ */ $t.define(); -function RF(t, e, r) { - let n = t.state.facet(sJ); +const aJ = /* @__PURE__ */ $t.define(), jM = /* @__PURE__ */ $t.define(), p2 = /* @__PURE__ */ $t.define(), KM = /* @__PURE__ */ $t.define(), oJ = /* @__PURE__ */ $t.define(); +function DF(t, e, r) { + let n = t.state.facet(oJ); if (!n.length) return n; let i = n.map((a) => a instanceof Function ? a(t) : a), s = []; @@ -5350,10 +5350,10 @@ function RF(t, e, r) { } }), s; } -const aJ = /* @__PURE__ */ $t.define(); -function oJ(t) { +const lJ = /* @__PURE__ */ $t.define(); +function cJ(t) { let e = 0, r = 0, n = 0, i = 0; - for (let s of t.state.facet(aJ)) { + for (let s of t.state.facet(lJ)) { let a = s(t); a && (a.left != null && (e = Math.max(e, a.left)), a.right != null && (r = Math.max(r, a.right)), a.top != null && (n = Math.max(n, a.top)), a.bottom != null && (i = Math.max(i, a.bottom))); } @@ -5433,25 +5433,25 @@ class mk { var Wn = /* @__PURE__ */ function(t) { return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t; }(Wn || (Wn = {})); -const g2 = Wn.LTR, lJ = Wn.RTL; -function cJ(t) { +const g2 = Wn.LTR, uJ = Wn.RTL; +function hJ(t) { let e = []; for (let r = 0; r < t.length; r++) e.push(1 << +t[r]); return e; } -const Swe = /* @__PURE__ */ cJ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Twe = /* @__PURE__ */ cJ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), s8 = /* @__PURE__ */ Object.create(null), wc = []; +const _we = /* @__PURE__ */ hJ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Awe = /* @__PURE__ */ hJ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), l8 = /* @__PURE__ */ Object.create(null), wc = []; for (let t of ["()", "[]", "{}"]) { let e = /* @__PURE__ */ t.charCodeAt(0), r = /* @__PURE__ */ t.charCodeAt(1); - s8[e] = r, s8[r] = -e; + l8[e] = r, l8[r] = -e; } -function Cwe(t) { - return t <= 247 ? Swe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Twe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; +function Lwe(t) { + return t <= 247 ? _we[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Awe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; } -const Ewe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; -class cf { +const Rwe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; +class uf { get dir() { - return this.level % 2 ? lJ : g2; + return this.level % 2 ? uJ : g2; } constructor(e, r, n) { this.from = e, this.to = r, this.level = n; @@ -5474,22 +5474,22 @@ class cf { return s; } } -function uJ(t, e) { +function fJ(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) { let n = t[r], i = e[r]; - if (n.from != i.from || n.to != i.to || n.direction != i.direction || !uJ(n.inner, i.inner)) + if (n.from != i.from || n.to != i.to || n.direction != i.direction || !fJ(n.inner, i.inner)) return !1; } return !0; } const pn = []; -function _we(t, e, r, n, i) { +function Mwe(t, e, r, n, i) { for (let s = 0; s <= n.length; s++) { let a = s ? n[s - 1].to : e, o = s < n.length ? n[s].from : r, l = s ? 256 : i; for (let u = a, h = l, f = l; u < o; u++) { - let d = Cwe(t.charCodeAt(u)); + let d = Lwe(t.charCodeAt(u)); d == 512 ? d = h : d == 8 && f == 4 && (d = 16), pn[u] = d == 4 ? 2 : d, d & 7 && (f = d), h = d; } for (let u = a, h = l, f = l; u < o; u++) { @@ -5510,12 +5510,12 @@ function _we(t, e, r, n, i) { } } } -function Awe(t, e, r, n, i) { +function Dwe(t, e, r, n, i) { let s = i == 1 ? 2 : 1; for (let a = 0, o = 0, l = 0; a <= n.length; a++) { let u = a ? n[a - 1].to : e, h = a < n.length ? n[a].from : r; for (let f = u, d, p, g; f < h; f++) - if (p = s8[d = t.charCodeAt(f)]) + if (p = l8[d = t.charCodeAt(f)]) if (p < 0) { for (let m = o - 3; m >= 0; m -= 3) if (wc[m + 1] == -p) { @@ -5546,7 +5546,7 @@ function Awe(t, e, r, n, i) { } } } -function Lwe(t, e, r, n) { +function Pwe(t, e, r, n) { for (let i = 0, s = n; i <= r.length; i++) { let a = i ? r[i - 1].to : t, o = i < r.length ? r[i].from : e; for (let l = a; l < o; ) { @@ -5571,7 +5571,7 @@ function Lwe(t, e, r, n) { } } } -function a8(t, e, r, n, i, s, a) { +function c8(t, e, r, n, i, s, a) { let o = n % 2 ? 2 : 1; if (n % 2 == i % 2) for (let l = e, u = 0; l < r; ) { @@ -5602,9 +5602,9 @@ function a8(t, e, r, n, i, s, a) { if (u++, d) d.push(m); else { - m.from > l && a.push(new cf(l, m.from, p)); + m.from > l && a.push(new uf(l, m.from, p)); let v = m.direction == g2 != !(p % 2); - o8(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; + u8(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; } g = m.to; } else { @@ -5612,7 +5612,7 @@ function a8(t, e, r, n, i, s, a) { break; g++; } - d ? a8(t, l, g, n + 1, i, d, a) : l < g && a.push(new cf(l, g, p)), l = g; + d ? c8(t, l, g, n + 1, i, d, a) : l < g && a.push(new uf(l, g, p)), l = g; } else for (let l = r, u = s.length; l > e; ) { @@ -5643,9 +5643,9 @@ function a8(t, e, r, n, i, s, a) { if (d) d.push(m); else { - m.to < l && a.push(new cf(m.to, l, p)); + m.to < l && a.push(new uf(m.to, l, p)); let v = m.direction == g2 != !(p % 2); - o8(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; + u8(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; } g = m.from; } else { @@ -5653,29 +5653,29 @@ function a8(t, e, r, n, i, s, a) { break; g--; } - d ? a8(t, g, l, n + 1, i, d, a) : g < l && a.push(new cf(g, l, p)), l = g; + d ? c8(t, g, l, n + 1, i, d, a) : g < l && a.push(new uf(g, l, p)), l = g; } } -function o8(t, e, r, n, i, s, a) { +function u8(t, e, r, n, i, s, a) { let o = e % 2 ? 2 : 1; - _we(t, i, s, n, o), Awe(t, i, s, n, o), Lwe(i, s, n, o), a8(t, i, s, e, r, n, a); + Mwe(t, i, s, n, o), Dwe(t, i, s, n, o), Pwe(i, s, n, o), c8(t, i, s, e, r, n, a); } -function Rwe(t, e, r) { +function Nwe(t, e, r) { if (!t) - return [new cf(0, 0, e == lJ ? 1 : 0)]; - if (e == g2 && !r.length && !Ewe.test(t)) - return hJ(t.length); + return [new uf(0, 0, e == uJ ? 1 : 0)]; + if (e == g2 && !r.length && !Rwe.test(t)) + return dJ(t.length); if (r.length) for (; t.length > pn.length; ) pn[pn.length] = 256; let n = [], i = e == g2 ? 0 : 1; - return o8(t, i, i, r, 0, t.length, n), n; + return u8(t, i, i, r, 0, t.length, n), n; } -function hJ(t) { - return [new cf(0, t, 0)]; +function dJ(t) { + return [new uf(0, t, 0)]; } -let fJ = ""; -function Mwe(t, e, r, n, i) { +let pJ = ""; +function Iwe(t, e, r, n, i) { var s; let a = n.head - t.from, o = -1; if (a == 0) { @@ -5688,16 +5688,16 @@ function Mwe(t, e, r, n, i) { let d = e[e.length - 1]; d.level != r && (a = d.side(!0, r), o = e.length - 1); } - o < 0 && (o = cf.find(e, a, (s = n.bidiLevel) !== null && s !== void 0 ? s : -1, n.assoc)); + o < 0 && (o = uf.find(e, a, (s = n.bidiLevel) !== null && s !== void 0 ? s : -1, n.assoc)); let l = e[o]; a == l.side(i, r) && (l = e[o += i ? 1 : -1], a = l.side(!i, r)); let u = i == (l.dir == r), h = Os(t.text, a, u); - if (fJ = t.text.slice(Math.min(a, h), Math.max(a, h)), h > l.from && h < l.to) + if (pJ = t.text.slice(Math.min(a, h), Math.max(a, h)), h > l.from && h < l.to) return je.cursor(h + t.from, u ? -1 : 1, l.level); let f = o == (i ? e.length - 1 : 0) ? null : e[o + (i ? 1 : -1)]; return !f && l.level != r ? je.cursor(i ? t.to : t.from, i ? -1 : 1, r) : f && f.level < l.level ? je.cursor(f.side(!i, r) + t.from, i ? 1 : -1, f.level) : je.cursor(h + t.from, i ? -1 : 1, l.level); } -class MF extends Dn { +class PF extends Dn { get length() { return this.view.state.doc.length; } @@ -5709,15 +5709,15 @@ class MF extends Dn { let n = e.changedRanges; this.minWidth > 0 && n.length && (n.every(({ fromA: u, toA: h }) => h < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0); let i = -1; - this.view.inputState.composing >= 0 && (!((r = this.domChanged) === null || r === void 0) && r.newSel ? i = this.domChanged.newSel.head : !Fwe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); - let s = i > -1 ? Pwe(this.view, e.changes, i) : null; + this.view.inputState.composing >= 0 && (!((r = this.domChanged) === null || r === void 0) && r.newSel ? i = this.domChanged.newSel.head : !Vwe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); + let s = i > -1 ? Bwe(this.view, e.changes, i) : null; if (this.domChanged = null, this.hasComposition) { this.markedForComposition.clear(); let { from: u, to: h } = this.hasComposition; n = new ol(u, h, e.changes.mapPos(u, -1), e.changes.mapPos(h, 1)).addToSet(n.slice()); } this.hasComposition = s ? { from: s.range.fromB, to: s.range.toB } : null, (Vt.ie || Vt.chrome) && !s && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); - let a = this.decorations, o = this.updateDeco(), l = $we(a, o, e.changes); + let a = this.decorations, o = this.updateDeco(), l = Qwe(a, o, e.changes); return n = ol.extendWithRanges(n, l), !(this.flags & 7) && n.length == 0 ? !1 : (this.updateInner(n, e.startState.doc.length, s), e.transactions.length && (this.lastUpdate = Date.now()), !0); } updateInner(e, r, n) { @@ -5731,7 +5731,7 @@ class MF extends Dn { let s = []; if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) for (let a of this.children) - a instanceof bf && a.widget instanceof DF && s.push(a.dom); + a instanceof xf && a.widget instanceof NF && s.push(a.dom); i.updateGaps(s); } updateChildren(e, r, n) { @@ -5749,15 +5749,15 @@ class MF extends Dn { } else ({ content: d, breakAtStart: p, openStart: g, openEnd: m } = Py.build(this.view.state.doc, h, f, this.decorations, this.dynamicDecorationMap)); let { i: v, off: y } = s.findPos(u, 1), { i: b, off: w } = s.findPos(l, -1); - UK(this, b, w, v, y, d, p, g, m); + qK(this, b, w, v, y, d, p, g, m); } n && this.fixCompositionDOM(n); } compositionView(e) { - let r = new lh(e.text.nodeValue); + let r = new ch(e.text.nodeValue); r.flags |= 8; for (let { deco: i } of e.marks) - r = new ch(i, [r], r.length); + r = new uh(i, [r], r.length); let n = new Pi(); return n.append(r, 0), n; } @@ -5779,20 +5779,20 @@ class MF extends Dn { let a = this.forceSelection; this.forceSelection = !1; let o = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(o.anchor)), u = o.empty ? l : this.moveToLine(this.domAtPos(o.head)); - if (Vt.gecko && o.empty && !this.hasComposition && Dwe(l)) { + if (Vt.gecko && o.empty && !this.hasComposition && $we(l)) { let f = document.createTextNode(""); this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new Hs(f, 0), a = !0; } let h = this.view.observer.selectionRange; (a || !h.focusNode || !gk(l.node, l.offset, h.anchorNode, h.anchorOffset) || !gk(u.node, u.offset, h.focusNode, h.focusOffset)) && (this.view.observer.ignore(() => { - Vt.android && Vt.chrome && this.dom.contains(h.focusNode) && Bwe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); + Vt.android && Vt.chrome && this.dom.contains(h.focusNode) && Uwe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); let f = pk(this.view.root); if (f) if (o.empty) { if (Vt.gecko) { - let d = Nwe(l.node, l.offset); + let d = Fwe(l.node, l.offset); if (d && d != 3) { - let p = pJ(l.node, l.offset, d == 1 ? 1 : -1); + let p = mJ(l.node, l.offset, d == 1 ? 1 : -1); p && (l = new Hs(p.node, p.offset)); } } @@ -5893,12 +5893,12 @@ class MF extends Dn { } n = l; } - if (!(i instanceof lh)) + if (!(i instanceof ch)) return null; let s = Os(i.text, n); if (s == n) return null; - let a = A0(i.dom, n, s).getClientRects(); + let a = L0(i.dom, n, s).getClientRects(); for (let o = 0; o < a.length; o++) { let l = a[o]; if (o == a.length - 1 || l.top < l.bottom && l.left < l.right) @@ -5946,7 +5946,7 @@ class MF extends Dn { } childCursor(e = this.length) { let r = this.children.length; - return r && (e -= this.children[--r].length), new QK(this.children, e, r); + return r && (e -= this.children[--r].length), new VK(this.children, e, r); } computeBlockGapDeco() { let e = [], r = this.view.viewState; @@ -5955,7 +5955,7 @@ class MF extends Dn { if (a > n) { let o = (r.lineBlockAt(a).bottom - r.lineBlockAt(n).top) / this.view.scaleY; e.push(It.replace({ - widget: new DF(o), + widget: new NF(o), block: !0, inclusive: !0, isBlockGap: !0 @@ -5992,19 +5992,19 @@ class MF extends Dn { right: Math.max(n.right, i.right), bottom: Math.max(n.bottom, i.bottom) }); - let s = oJ(this.view), a = { + let s = cJ(this.view), a = { left: n.left - s.left, top: n.top - s.top, right: n.right + s.right, bottom: n.bottom + s.bottom }, { offsetWidth: o, offsetHeight: l } = this.view.scrollDOM; - dwe(this.view.scrollDOM, a, r.head < r.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, o), -o), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == Wn.LTR); + vwe(this.view.scrollDOM, a, r.head < r.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, o), -o), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == Wn.LTR); } } -function Dwe(t) { +function $we(t) { return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false"); } -class DF extends uo { +class NF extends uo { constructor(e) { super(), this.height = e; } @@ -6022,15 +6022,15 @@ class DF extends uo { return this.height; } } -function dJ(t, e) { - let r = t.observer.selectionRange, n = r.focusNode && pJ(r.focusNode, r.focusOffset, 0); +function gJ(t, e) { + let r = t.observer.selectionRange, n = r.focusNode && mJ(r.focusNode, r.focusOffset, 0); if (!n) return null; let i = e - n.offset; return { from: i, to: i + n.node.nodeValue.length, node: n.node }; } -function Pwe(t, e, r) { - let n = dJ(t, r); +function Bwe(t, e, r) { + let n = gJ(t, r); if (!n) return null; let { node: i, from: s, to: a } = n, o = i.nodeValue; @@ -6039,7 +6039,7 @@ function Pwe(t, e, r) { let l = e.invertedDesc, u = new ol(l.mapPos(s), l.mapPos(a), s, a), h = []; for (let f = i.parentNode; ; f = f.parentNode) { let d = Dn.get(f); - if (d instanceof ch) + if (d instanceof uh) h.push({ node: f, deco: d.mark }); else { if (d instanceof Pi || f.nodeName == "DIV" && f.parentNode == t.contentDOM) @@ -6047,7 +6047,7 @@ function Pwe(t, e, r) { if (f != t.contentDOM) h.push({ node: f, deco: new Px({ inclusive: !0, - attributes: wwe(f), + attributes: Twe(f), tagName: f.tagName.toLowerCase() }) }); else @@ -6055,13 +6055,13 @@ function Pwe(t, e, r) { } } } -function pJ(t, e, r) { +function mJ(t, e, r) { if (r <= 0) for (let n = t, i = e; ; ) { if (n.nodeType == 3) return { node: n, offset: i }; if (n.nodeType == 1 && i > 0) - n = n.childNodes[i - 1], i = oh(n); + n = n.childNodes[i - 1], i = lh(n); else break; } @@ -6076,37 +6076,37 @@ function pJ(t, e, r) { } return null; } -function Nwe(t, e) { +function Fwe(t, e) { return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0); } -let Iwe = class { +let zwe = class { constructor() { this.changes = []; } compareRange(e, r) { - n8(e, r, this.changes); + a8(e, r, this.changes); } comparePoint(e, r) { - n8(e, r, this.changes); + a8(e, r, this.changes); } }; -function $we(t, e, r) { - let n = new Iwe(); +function Qwe(t, e, r) { + let n = new zwe(); return $r.compare(t, e, r, n), n.changes; } -function Bwe(t, e) { +function Uwe(t, e) { for (let r = t; r && r != e; r = r.assignedSlot || r.parentNode) if (r.nodeType == 1 && r.contentEditable == "false") return !0; return !1; } -function Fwe(t, e) { +function Vwe(t, e) { let r = !1; return e && t.iterChangedRanges((n, i) => { n < e.to && i > e.from && (r = !0); }), r; } -function zwe(t, e, r = 1) { +function qwe(t, e, r = 1) { let n = t.charCategorizer(e), i = t.doc.lineAt(e), s = e - i.from; if (i.length == 0) return je.cursor(e); @@ -6128,53 +6128,53 @@ function zwe(t, e, r = 1) { } return je.range(a + i.from, o + i.from); } -function Qwe(t, e) { +function Ywe(t, e) { return e.left > t ? e.left - t : Math.max(0, t - e.right); } -function Uwe(t, e) { +function Wwe(t, e) { return e.top > t ? e.top - t : Math.max(0, t - e.bottom); } -function v_(t, e) { +function x_(t, e) { return t.top < e.bottom - 1 && t.bottom > e.top + 1; } -function PF(t, e) { +function IF(t, e) { return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t; } -function NF(t, e) { +function $F(t, e) { return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t; } -function l8(t, e, r) { +function h8(t, e, r) { let n, i, s, a, o = !1, l, u, h, f; for (let g = t.firstChild; g; g = g.nextSibling) { let m = f2(g); for (let v = 0; v < m.length; v++) { let y = m[v]; - i && v_(i, y) && (y = PF(NF(y, i.bottom), i.top)); - let b = Qwe(e, y), w = Uwe(r, y); + i && x_(i, y) && (y = IF($F(y, i.bottom), i.top)); + let b = Ywe(e, y), w = Wwe(r, y); if (b == 0 && w == 0) - return g.nodeType == 3 ? IF(g, e, r) : l8(g, e, r); + return g.nodeType == 3 ? BF(g, e, r) : h8(g, e, r); if (!n || a > w || a == w && s > b) { n = g, i = y, s = b, a = w; let O = w ? r < y.top ? -1 : 1 : b ? e < y.left ? -1 : 1 : 0; o = !O || (O > 0 ? v < m.length - 1 : v > 0); } - b == 0 ? r > y.bottom && (!h || h.bottom < y.bottom) ? (l = g, h = y) : r < y.top && (!f || f.top > y.top) && (u = g, f = y) : h && v_(h, y) ? h = NF(h, y.bottom) : f && v_(f, y) && (f = PF(f, y.top)); + b == 0 ? r > y.bottom && (!h || h.bottom < y.bottom) ? (l = g, h = y) : r < y.top && (!f || f.top > y.top) && (u = g, f = y) : h && x_(h, y) ? h = $F(h, y.bottom) : f && x_(f, y) && (f = IF(f, y.top)); } } if (h && h.bottom >= r ? (n = l, i = h) : f && f.top <= r && (n = u, i = f), !n) return { node: t, offset: 0 }; let d = Math.max(i.left, Math.min(i.right, e)); if (n.nodeType == 3) - return IF(n, d, r); + return BF(n, d, r); if (o && n.contentEditable != "false") - return l8(n, d, r); + return h8(n, d, r); let p = Array.prototype.indexOf.call(t.childNodes, n) + (e >= (i.left + i.right) / 2 ? 1 : 0); return { node: t, offset: p }; } -function IF(t, e, r) { +function BF(t, e, r) { let n = t.nodeValue.length, i = -1, s = 1e9, a = 0; for (let o = 0; o < n; o++) { - let l = A0(t, o, o + 1).getClientRects(); + let l = L0(t, o, o + 1).getClientRects(); for (let u = 0; u < l.length; u++) { let h = l[u]; if (h.top == h.bottom) @@ -6183,7 +6183,7 @@ function IF(t, e, r) { let f = (h.top > r ? h.top - r : r - h.bottom) - 1; if (h.left - 1 <= e && h.right + 1 >= e && f < s) { let d = e >= (h.left + h.right) / 2, p = d; - if ((Vt.chrome || Vt.gecko) && A0(t, o).getBoundingClientRect().left == h.right && (p = !d), f <= 0) + if ((Vt.chrome || Vt.gecko) && L0(t, o).getBoundingClientRect().left == h.right && (p = !d), f <= 0) return { node: t, offset: o + (p ? 1 : 0) }; i = o + (p ? 1 : 0), s = f; } @@ -6191,7 +6191,7 @@ function IF(t, e, r) { } return { node: t, offset: i > -1 ? i : a > 0 ? t.nodeValue.length : 0 }; } -function gJ(t, e, r, n = -1) { +function vJ(t, e, r, n = -1) { var i, s; let a = t.contentDOM.getBoundingClientRect(), o = a.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: h, y: f } = e, d = f - o; if (d < 0) @@ -6207,9 +6207,9 @@ function gJ(t, e, r, n = -1) { f = o + d; let p = l.from; if (p < t.viewport.from) - return t.viewport.from == 0 ? 0 : r ? null : $F(t, a, l, h, f); + return t.viewport.from == 0 ? 0 : r ? null : FF(t, a, l, h, f); if (p > t.viewport.to) - return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : $F(t, a, l, h, f); + return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : FF(t, a, l, h, f); let g = t.dom.ownerDocument, m = t.root.elementFromPoint ? t.root : g, v = m.elementFromPoint(h, f); v && !t.contentDOM.contains(v) && (v = null), v || (h = Math.max(a.left + 1, Math.min(a.right - 1, h)), v = m.elementFromPoint(h, f), v && !t.contentDOM.contains(v) && (v = null)); let y, b = -1; @@ -6219,14 +6219,14 @@ function gJ(t, e, r, n = -1) { O && ({ offsetNode: y, offset: b } = O); } else if (g.caretRangeFromPoint) { let O = g.caretRangeFromPoint(h, f); - O && ({ startContainer: y, startOffset: b } = O, (!t.contentDOM.contains(y) || Vt.safari && Vwe(y, b, h) || Vt.chrome && qwe(y, b, h)) && (y = void 0)); + O && ({ startContainer: y, startOffset: b } = O, (!t.contentDOM.contains(y) || Vt.safari && Gwe(y, b, h) || Vt.chrome && Xwe(y, b, h)) && (y = void 0)); } } if (!y || !t.docView.dom.contains(y)) { let O = Pi.find(t.docView, p); if (!O) return d > l.top + l.height / 2 ? l.to : l.from; - ({ node: y, offset: b } = l8(O.dom, h, f)); + ({ node: y, offset: b } = h8(O.dom, h, f)); } let w = t.docView.nearest(y); if (!w) @@ -6237,25 +6237,25 @@ function gJ(t, e, r, n = -1) { } else return w.localPosFromDOM(y, b) + w.posAtStart; } -function $F(t, e, r, n, i) { +function FF(t, e, r, n, i) { let s = Math.round((n - e.left) * t.defaultCharacterWidth); if (t.lineWrapping && r.height > t.defaultLineHeight * 1.5) { let o = t.viewState.heightOracle.textHeight, l = Math.floor((i - r.top - (t.defaultLineHeight - o) * 0.5) / o); s += l * t.viewState.heightOracle.lineLength; } let a = t.state.sliceDoc(r.from, r.to); - return r.from + X7(a, s, t.state.tabSize); + return r.from + j7(a, s, t.state.tabSize); } -function Vwe(t, e, r) { +function Gwe(t, e, r) { let n; if (t.nodeType != 3 || e != (n = t.nodeValue.length)) return !1; for (let i = t.nextSibling; i; i = i.nextSibling) if (i.nodeType != 1 || i.nodeName != "BR") return !1; - return A0(t, n - 1, n).getBoundingClientRect().left > r; + return L0(t, n - 1, n).getBoundingClientRect().left > r; } -function qwe(t, e, r) { +function Xwe(t, e, r) { if (e != 0) return !1; for (let i = t; ; ) { @@ -6266,10 +6266,10 @@ function qwe(t, e, r) { break; i = s; } - let n = t.nodeType == 1 ? t.getBoundingClientRect() : A0(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect(); + let n = t.nodeType == 1 ? t.getBoundingClientRect() : L0(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect(); return r - n.left > 5; } -function c8(t, e) { +function f8(t, e) { let r = t.lineBlockAt(e); if (Array.isArray(r.type)) { for (let n of r.type) @@ -6278,8 +6278,8 @@ function c8(t, e) { } return r; } -function Ywe(t, e, r, n) { - let i = c8(t, e.head), s = !n || i.type != Ca.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head); +function Hwe(t, e, r, n) { + let i = f8(t, e.head), s = !n || i.type != Ca.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head); if (s) { let a = t.dom.getBoundingClientRect(), o = t.textDirectionAt(i.from), l = t.posAtCoords({ x: r == (o == Wn.LTR) ? a.right - 1 : a.left + 1, @@ -6290,10 +6290,10 @@ function Ywe(t, e, r, n) { } return je.cursor(r ? i.to : i.from, r ? -1 : 1); } -function BF(t, e, r, n) { +function zF(t, e, r, n) { let i = t.state.doc.lineAt(e.head), s = t.bidiSpans(i), a = t.textDirectionAt(i.from); for (let o = e, l = null; ; ) { - let u = Mwe(i, s, a, o, r), h = fJ; + let u = Iwe(i, s, a, o, r), h = pJ; if (!u) { if (i.number == (r ? t.state.doc.lines : 1)) return o; @@ -6311,14 +6311,14 @@ function BF(t, e, r, n) { o = u; } } -function Wwe(t, e, r) { +function Zwe(t, e, r) { let n = t.state.charCategorizer(e), i = n(r); return (s) => { let a = n(s); return i == Fn.Space && (i = a), i == a; }; } -function Gwe(t, e, r, n) { +function jwe(t, e, r, n) { let i = e.head, s = r ? 1 : -1; if (i == (r ? t.state.doc.length : 0)) return je.cursor(i, e.assoc); @@ -6331,7 +6331,7 @@ function Gwe(t, e, r, n) { } let f = l.left + a, d = n != null ? n : t.viewState.heightOracle.textHeight >> 1; for (let p = 0; ; p += 10) { - let g = o + (d + p) * s, m = gJ(t, { x: f, y: g }, !1, s); + let g = o + (d + p) * s, m = vJ(t, { x: f, y: g }, !1, s); if (g < l.top || g > l.bottom || (s < 0 ? m < i : m > i)) { let v = t.docView.coordsForChar(m), y = !v || g < v.top ? -1 : 1; return je.cursor(m, y, void 0, a); @@ -6352,19 +6352,19 @@ function t5(t, e, r) { return e; } } -function y_(t, e, r) { - let n = t5(t.state.facet(ZM).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); +function w_(t, e, r) { + let n = t5(t.state.facet(KM).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); return n == r.from ? r : je.cursor(n, n < r.from ? 1 : -1); } -class Xwe { +class Kwe { setSelectionOrigin(e) { this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now(); } constructor(e) { - this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastEscPress = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, Vt.safari && e.contentDOM.addEventListener("input", () => null), Vt.gecko && uOe(e.contentDOM.ownerDocument); + this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastEscPress = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, Vt.safari && e.contentDOM.addEventListener("input", () => null), Vt.gecko && pOe(e.contentDOM.ownerDocument); } handleEvent(e) { - !rOe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e); + !aOe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e); } runHandlers(e, r) { let n = this.handlers[e]; @@ -6382,7 +6382,7 @@ class Xwe { } } ensureHandlers(e) { - let r = Hwe(e), n = this.handlers, i = this.view.contentDOM; + let r = Jwe(e), n = this.handlers, i = this.view.contentDOM; for (let s in r) if (s != "scroll") { let a = !r[s].handlers.length, o = n[s]; @@ -6395,14 +6395,14 @@ class Xwe { keydown(e) { if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && Date.now() < this.lastEscPress + 2e3) return !0; - if (e.keyCode != 27 && vJ.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), Vt.android && Vt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) + if (e.keyCode != 27 && bJ.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), Vt.android && Vt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0; let r; - return Vt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = mJ.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || Zwe.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = r || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1); + return Vt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = yJ.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || eOe.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = r || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1); } flushIOSKey() { let e = this.pendingIOSKey; - return e ? (this.pendingIOSKey = void 0, Ag(this.view.contentDOM, e.key, e.keyCode)) : !1; + return e ? (this.pendingIOSKey = void 0, Lg(this.view.contentDOM, e.key, e.keyCode)) : !1; } ignoreDuringComposition(e) { return /^key/.test(e.type) ? this.composing > 0 ? !0 : Vt.safari && !Vt.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1; @@ -6417,7 +6417,7 @@ class Xwe { this.mouseSelection && this.mouseSelection.destroy(); } } -function FF(t, e) { +function QF(t, e) { return (r, n) => { try { return e.call(t, n, r); @@ -6426,7 +6426,7 @@ function FF(t, e) { } }; } -function Hwe(t) { +function Jwe(t) { let e = /* @__PURE__ */ Object.create(null); function r(n) { return e[n] || (e[n] = { observers: [], handlers: [] }); @@ -6436,12 +6436,12 @@ function Hwe(t) { if (i && i.domEventHandlers) for (let s in i.domEventHandlers) { let a = i.domEventHandlers[s]; - a && r(s).handlers.push(FF(n.value, a)); + a && r(s).handlers.push(QF(n.value, a)); } if (i && i.domEventObservers) for (let s in i.domEventObservers) { let a = i.domEventObservers[s]; - a && r(s).observers.push(FF(n.value, a)); + a && r(s).observers.push(QF(n.value, a)); } } for (let n in rc) @@ -6450,23 +6450,23 @@ function Hwe(t) { r(n).observers.push(nc[n]); return e; } -const mJ = [ +const yJ = [ { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" }, { key: "Enter", keyCode: 13, inputType: "insertParagraph" }, { key: "Enter", keyCode: 13, inputType: "insertLineBreak" }, { key: "Delete", keyCode: 46, inputType: "deleteContentForward" } -], Zwe = "dthko", vJ = [16, 17, 18, 20, 91, 92, 224, 225], lO = 6; +], eOe = "dthko", bJ = [16, 17, 18, 20, 91, 92, 224, 225], lO = 6; function cO(t) { return Math.max(0, t) * 0.7 + 8; } -function jwe(t, e) { +function tOe(t, e) { return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY)); } -class Kwe { +class rOe { constructor(e, r, n, i) { - this.view = e, this.startEvent = r, this.style = n, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = r, this.scrollParent = pwe(e.contentDOM), this.atoms = e.state.facet(ZM).map((a) => a(e)); + this.view = e, this.startEvent = r, this.style = n, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = r, this.scrollParent = ywe(e.contentDOM), this.atoms = e.state.facet(KM).map((a) => a(e)); let s = e.contentDOM.ownerDocument; - s.addEventListener("mousemove", this.move = this.move.bind(this)), s.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = r.shiftKey, this.multiple = e.state.facet(Sr.allowMultipleSelections) && Jwe(e, r), this.dragging = tOe(e, r) && wJ(r) == 1 ? null : !1; + s.addEventListener("mousemove", this.move = this.move.bind(this)), s.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = r.shiftKey, this.multiple = e.state.facet(Sr.allowMultipleSelections) && nOe(e, r), this.dragging = sOe(e, r) && kJ(r) == 1 ? null : !1; } start(e) { this.dragging === !1 && this.select(e); @@ -6475,10 +6475,10 @@ class Kwe { var r; if (e.buttons == 0) return this.destroy(); - if (this.dragging || this.dragging == null && jwe(this.startEvent, e) < 10) + if (this.dragging || this.dragging == null && tOe(this.startEvent, e) < 10) return; this.select(this.lastEvent = e); - let n = 0, i = 0, s = ((r = this.scrollParent) === null || r === void 0 ? void 0 : r.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, a = oJ(this.view); + let n = 0, i = 0, s = ((r = this.scrollParent) === null || r === void 0 ? void 0 : r.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, a = cJ(this.view); e.clientX - a.left <= s.left + lO ? n = -cO(s.left - e.clientX) : e.clientX + a.right >= s.right - lO && (n = cO(e.clientX - s.right)), e.clientY - a.top <= s.top + lO ? i = -cO(s.top - e.clientY) : e.clientY + a.bottom >= s.bottom - lO && (i = cO(e.clientY - s.bottom)), this.setScrollSpeed(n, i); } up(e) { @@ -6521,15 +6521,15 @@ class Kwe { this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20); } } -function Jwe(t, e) { - let r = t.state.facet(ZK); +function nOe(t, e) { + let r = t.state.facet(KK); return r.length ? r[0](e) : Vt.mac ? e.metaKey : e.ctrlKey; } -function eOe(t, e) { - let r = t.state.facet(jK); +function iOe(t, e) { + let r = t.state.facet(JK); return r.length ? r[0](e) : Vt.mac ? !e.altKey : !e.ctrlKey; } -function tOe(t, e) { +function sOe(t, e) { let { main: r } = t.state.selection; if (r.empty) return !1; @@ -6544,7 +6544,7 @@ function tOe(t, e) { } return !1; } -function rOe(t, e) { +function aOe(t, e) { if (!e.bubbles) return !0; if (e.defaultPrevented) @@ -6554,19 +6554,19 @@ function rOe(t, e) { return !1; return !0; } -const rc = /* @__PURE__ */ Object.create(null), nc = /* @__PURE__ */ Object.create(null), yJ = Vt.ie && Vt.ie_version < 15 || Vt.ios && Vt.webkit_version < 604; -function nOe(t) { +const rc = /* @__PURE__ */ Object.create(null), nc = /* @__PURE__ */ Object.create(null), xJ = Vt.ie && Vt.ie_version < 15 || Vt.ios && Vt.webkit_version < 604; +function oOe(t) { let e = t.dom.parentNode; if (!e) return; let r = e.appendChild(document.createElement("textarea")); r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus(), setTimeout(() => { - t.focus(), r.remove(), bJ(t, r.value); + t.focus(), r.remove(), wJ(t, r.value); }, 50); } -function bJ(t, e) { +function wJ(t, e) { let { state: r } = t, n, i = 1, s = r.toText(e), a = s.lines == r.selection.ranges.length; - if (u8 != null && r.selection.ranges.every((l) => l.empty) && u8 == s.toString()) { + if (d8 != null && r.selection.ranges.every((l) => l.empty) && d8 == s.toString()) { let l = -1; n = r.changeByRange((u) => { let h = r.doc.lineAt(u.from); @@ -6606,30 +6606,30 @@ rc.mousedown = (t, e) => { if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3) return !1; let r = null; - for (let n of t.state.facet(KK)) + for (let n of t.state.facet(eJ)) if (r = n(t, e), r) break; - if (!r && e.button == 0 && (r = aOe(t, e)), r) { + if (!r && e.button == 0 && (r = uOe(t, e)), r) { let n = !t.hasFocus; - t.inputState.startMouseSelection(new Kwe(t, e, r, n)), n && t.observer.ignore(() => BK(t.contentDOM)); + t.inputState.startMouseSelection(new rOe(t, e, r, n)), n && t.observer.ignore(() => zK(t.contentDOM)); let i = t.inputState.mouseSelection; if (i) return i.start(e), i.dragging === !1; } return !1; }; -function zF(t, e, r, n) { +function UF(t, e, r, n) { if (n == 1) return je.cursor(e, r); if (n == 2) - return zwe(t.state, e, r); + return qwe(t.state, e, r); { let i = Pi.find(t.docView, e), s = t.state.doc.lineAt(i ? i.posAtEnd : e), a = i ? i.posAtStart : s.from, o = i ? i.posAtEnd : s.to; return o < t.state.doc.length && o == s.to && o++, je.range(a, o); } } -let xJ = (t, e) => t >= e.top && t <= e.bottom, QF = (t, e, r) => xJ(e, r) && t >= r.left && t <= r.right; -function iOe(t, e, r, n) { +let OJ = (t, e) => t >= e.top && t <= e.bottom, VF = (t, e, r) => OJ(e, r) && t >= r.left && t <= r.right; +function lOe(t, e, r, n) { let i = Pi.find(t.docView, e); if (!i) return 1; @@ -6639,40 +6639,40 @@ function iOe(t, e, r, n) { if (s == i.length) return -1; let a = i.coordsAt(s, -1); - if (a && QF(r, n, a)) + if (a && VF(r, n, a)) return -1; let o = i.coordsAt(s, 1); - return o && QF(r, n, o) ? 1 : a && xJ(n, a) ? -1 : 1; + return o && VF(r, n, o) ? 1 : a && OJ(n, a) ? -1 : 1; } -function UF(t, e) { +function qF(t, e) { let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1); - return { pos: r, bias: iOe(t, r, e.clientX, e.clientY) }; + return { pos: r, bias: lOe(t, r, e.clientX, e.clientY) }; } -const sOe = Vt.ie && Vt.ie_version <= 11; -let VF = null, qF = 0, YF = 0; -function wJ(t) { - if (!sOe) +const cOe = Vt.ie && Vt.ie_version <= 11; +let YF = null, WF = 0, GF = 0; +function kJ(t) { + if (!cOe) return t.detail; - let e = VF, r = YF; - return VF = t, YF = Date.now(), qF = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (qF + 1) % 3 : 1; + let e = YF, r = GF; + return YF = t, GF = Date.now(), WF = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (WF + 1) % 3 : 1; } -function aOe(t, e) { - let r = UF(t, e), n = wJ(e), i = t.state.selection; +function uOe(t, e) { + let r = qF(t, e), n = kJ(e), i = t.state.selection; return { update(s) { s.docChanged && (r.pos = s.changes.mapPos(r.pos), i = i.map(s.changes)); }, get(s, a, o) { - let l = UF(t, s), u, h = zF(t, l.pos, l.bias, n); + let l = qF(t, s), u, h = UF(t, l.pos, l.bias, n); if (r.pos != l.pos && !a) { - let f = zF(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); + let f = UF(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); h = d < h.from ? je.range(d, p) : je.range(p, d); } - return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = oOe(i, l.pos)) ? u : o ? i.addRange(h) : je.create([h]); + return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = hOe(i, l.pos)) ? u : o ? i.addRange(h) : je.create([h]); } }; } -function oOe(t, e) { +function hOe(t, e) { for (let r = 0; r < t.ranges.length; r++) { let { from: n, to: i } = t.ranges[r]; if (n <= e && i >= e) @@ -6693,10 +6693,10 @@ rc.dragstart = (t, e) => { return n.mouseSelection && (n.mouseSelection.dragging = !0), n.draggedContent = r, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(r.from, r.to)), e.dataTransfer.effectAllowed = "copyMove"), !1; }; rc.dragend = (t) => (t.inputState.draggedContent = null, !1); -function WF(t, e, r, n) { +function XF(t, e, r, n) { if (!r) return; - let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: s } = t.inputState, a = n && s && eOe(t, e) ? { from: s.from, to: s.to } : null, o = { from: i, insert: r }, l = t.state.changes(a ? [a, o] : o); + let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: s } = t.inputState, a = n && s && iOe(t, e) ? { from: s.from, to: s.to } : null, o = { from: i, insert: r }, l = t.state.changes(a ? [a, o] : o); t.focus(), t.dispatch({ changes: l, selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) }, @@ -6711,7 +6711,7 @@ rc.drop = (t, e) => { let r = e.dataTransfer.files; if (r && r.length) { let n = Array(r.length), i = 0, s = () => { - ++i == r.length && WF(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); + ++i == r.length && XF(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); }; for (let a = 0; a < r.length; a++) { let o = new FileReader(); @@ -6723,7 +6723,7 @@ rc.drop = (t, e) => { } else { let n = e.dataTransfer.getData("Text"); if (n) - return WF(t, e, n, !0), !0; + return XF(t, e, n, !0), !0; } return !1; }; @@ -6731,10 +6731,10 @@ rc.paste = (t, e) => { if (t.state.readOnly) return !0; t.observer.flush(); - let r = yJ ? null : e.clipboardData; - return r ? (bJ(t, r.getData("text/plain") || r.getData("text/uri-text")), !0) : (nOe(t), !1); + let r = xJ ? null : e.clipboardData; + return r ? (wJ(t, r.getData("text/plain") || r.getData("text/uri-text")), !0) : (oOe(t), !1); }; -function lOe(t, e) { +function fOe(t, e) { let r = t.dom.parentNode; if (!r) return; @@ -6743,7 +6743,7 @@ function lOe(t, e) { n.remove(), t.focus(); }, 50); } -function cOe(t) { +function dOe(t) { let e = [], r = [], n = !1; for (let i of t.selection.ranges) i.empty || (e.push(t.sliceDoc(i.from, i.to)), r.push(i)); @@ -6757,42 +6757,42 @@ function cOe(t) { } return { text: e.join(t.lineBreak), ranges: r, linewise: n }; } -let u8 = null; +let d8 = null; rc.copy = rc.cut = (t, e) => { - let { text: r, ranges: n, linewise: i } = cOe(t.state); + let { text: r, ranges: n, linewise: i } = dOe(t.state); if (!r && !i) return !1; - u8 = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ + d8 = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ changes: n, scrollIntoView: !0, userEvent: "delete.cut" }); - let s = yJ ? null : e.clipboardData; - return s ? (s.clearData(), s.setData("text/plain", r), !0) : (lOe(t, r), !1); + let s = xJ ? null : e.clipboardData; + return s ? (s.clearData(), s.setData("text/plain", r), !0) : (fOe(t, r), !1); }; -const OJ = /* @__PURE__ */ co.define(); -function kJ(t, e) { +const SJ = /* @__PURE__ */ co.define(); +function TJ(t, e) { let r = []; - for (let n of t.facet(tJ)) { + for (let n of t.facet(nJ)) { let i = n(t, e); i && r.push(i); } - return r ? t.update({ effects: r, annotations: OJ.of(!0) }) : null; + return r ? t.update({ effects: r, annotations: SJ.of(!0) }) : null; } -function SJ(t) { +function CJ(t) { setTimeout(() => { let e = t.hasFocus; if (e != t.inputState.notifiedFocused) { - let r = kJ(t.state, e); + let r = TJ(t.state, e); r ? t.dispatch(r) : t.update([]); } }, 10); } nc.focus = (t) => { - t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), SJ(t); + t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), CJ(t); }; nc.blur = (t) => { - t.observer.clearSelectionRange(), SJ(t); + t.observer.clearSelectionRange(), CJ(t); }; nc.compositionstart = nc.compositionupdate = (t) => { t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0); @@ -6808,7 +6808,7 @@ nc.contextmenu = (t) => { rc.beforeinput = (t, e) => { var r; let n; - if (Vt.chrome && Vt.android && (n = mJ.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(n.key, n.keyCode), n.key == "Backspace" || n.key == "Delete")) { + if (Vt.chrome && Vt.android && (n = yJ.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(n.key, n.keyCode), n.key == "Backspace" || n.key == "Delete")) { let i = ((r = window.visualViewport) === null || r === void 0 ? void 0 : r.height) || 0; setTimeout(() => { var s; @@ -6817,14 +6817,14 @@ rc.beforeinput = (t, e) => { } return !1; }; -const GF = /* @__PURE__ */ new Set(); -function uOe(t) { - GF.has(t) || (GF.add(t), t.addEventListener("copy", () => { +const HF = /* @__PURE__ */ new Set(); +function pOe(t) { + HF.has(t) || (HF.add(t), t.addEventListener("copy", () => { }), t.addEventListener("cut", () => { })); } -const XF = ["pre-wrap", "normal", "pre-line", "break-spaces"]; -class hOe { +const ZF = ["pre-wrap", "normal", "pre-line", "break-spaces"]; +class gOe { constructor(e) { this.lineWrapping = e, this.doc = qr.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1; } @@ -6839,7 +6839,7 @@ class hOe { return this.doc = e, this; } mustRefreshForWrapping(e) { - return XF.indexOf(e) > -1 != this.lineWrapping; + return ZF.indexOf(e) > -1 != this.lineWrapping; } mustRefreshForHeights(e) { let r = !1; @@ -6850,7 +6850,7 @@ class hOe { return r; } refresh(e, r, n, i, s, a) { - let o = XF.indexOf(e) > -1, l = Math.round(r) != Math.round(this.lineHeight) || this.lineWrapping != o; + let o = ZF.indexOf(e) > -1, l = Math.round(r) != Math.round(this.lineHeight) || this.lineWrapping != o; if (this.lineWrapping = o, this.lineHeight = r, this.charWidth = n, this.textHeight = i, this.lineLength = s, l) { this.heightSamples = {}; for (let u = 0; u < a.length; u++) { @@ -6861,7 +6861,7 @@ class hOe { return l; } } -class fOe { +class mOe { constructor(e, r) { this.from = e, this.heights = r, this.index = 0; } @@ -6883,7 +6883,7 @@ class Ic { return this.top + this.height; } get widget() { - return this._content instanceof Pf ? this._content.widget : null; + return this._content instanceof Nf ? this._content.widget : null; } get widgetLineBreaks() { return typeof this._content == "number" ? this._content : 0; @@ -6926,7 +6926,7 @@ class Ea { for (f += p.to - u, u = p.to; o > 0 && d.from <= i[o - 1].toA; ) l = i[o - 1].fromA, h = i[o - 1].fromB, o--, l < d.from && (d = s.lineAt(l, Rn.ByPosNoHeight, n, 0, 0)); h += d.from - l, l = d.from; - let g = jM.build(n.setDoc(a), e, h, f); + let g = JM.build(n.setDoc(a), e, h, f); s = s.replace(l, u, g); } return s.updateHeight(n, 0); @@ -6956,11 +6956,11 @@ class Ea { o && (s += o.size); } let a = 0; - return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new dOe(Ea.of(e.slice(0, r)), a, Ea.of(e.slice(n))); + return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new vOe(Ea.of(e.slice(0, r)), a, Ea.of(e.slice(n))); } } Ea.prototype.size = 1; -class TJ extends Ea { +class EJ extends Ea { constructor(e, r, n) { super(e, r), this.deco = n; } @@ -6980,7 +6980,7 @@ class TJ extends Ea { return `block(${this.length})`; } } -class wo extends TJ { +class wo extends EJ { constructor(e, r) { super(e, r, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0; } @@ -7085,7 +7085,7 @@ class ys extends Ea { return `gap(${this.length})`; } } -class dOe extends Ea { +class vOe extends Ea { constructor(e, r, n) { super(e.length + r + n.length, e.height + n.height, r | (e.outdated || n.outdated ? 2 : 0)), this.left = e, this.right = n, this.size = e.size + n.size; } @@ -7123,9 +7123,9 @@ class dOe extends Ea { let a = s.length; for (let o of n) s.push(o); - if (e > 0 && HF(s, a - 1), r < this.length) { + if (e > 0 && jF(s, a - 1), r < this.length) { let o = s.length; - this.decomposeRight(r, s), HF(s, o); + this.decomposeRight(r, s), jF(s, o); } return Ea.of(s); } @@ -7152,12 +7152,12 @@ class dOe extends Ea { return this.left + (this.break ? " " : "-") + this.right; } } -function HF(t, e) { +function jF(t, e) { let r, n; t[e] == null && (r = t[e - 1]) instanceof ys && (n = t[e + 1]) instanceof ys && t.splice(e - 1, 3, new ys(r.length + 1 + n.length)); } -const pOe = 5; -class jM { +const yOe = 5; +class JM { constructor(e, r) { this.pos = e, this.oracle = r, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e; } @@ -7176,7 +7176,7 @@ class jM { let i = n.widget ? n.widget.estimatedHeight : 0, s = n.widget ? n.widget.lineBreaks : 0; i < 0 && (i = this.oracle.lineHeight); let a = r - e; - n.block ? this.addBlock(new TJ(a, i, n)) : (a || s || i >= pOe) && this.addLineDeco(i, s, a); + n.block ? this.addBlock(new EJ(a, i, n)) : (a || s || i >= yOe) && this.addLineDeco(i, s, a); } else r > e && this.span(e, r); this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to); @@ -7217,25 +7217,25 @@ class jM { return this.nodes; } static build(e, r, n, i) { - let s = new jM(n, e); + let s = new JM(n, e); return $r.spans(r, n, i, s, 0), s.finish(n); } } -function gOe(t, e, r) { - let n = new mOe(); +function bOe(t, e, r) { + let n = new xOe(); return $r.compare(t, e, r, n, 0), n.changes; } -class mOe { +class xOe { constructor() { this.changes = []; } compareRange() { } comparePoint(e, r, n, i) { - (e < r || n && n.heightRelevant || i && i.heightRelevant) && n8(e, r, this.changes, 5); + (e < r || n && n.heightRelevant || i && i.heightRelevant) && a8(e, r, this.changes, 5); } } -function vOe(t, e) { +function wOe(t, e) { let r = t.getBoundingClientRect(), n = t.ownerDocument, i = n.defaultView || window, s = Math.max(0, r.left), a = Math.min(i.innerWidth, r.right), o = Math.max(0, r.top), l = Math.min(i.innerHeight, r.bottom); for (let u = t.parentNode; u && u != n.body; ) if (u.nodeType == 1) { @@ -7256,7 +7256,7 @@ function vOe(t, e) { bottom: Math.max(o, l) - (r.top + e) }; } -function yOe(t, e) { +function OOe(t, e) { let r = t.getBoundingClientRect(); return { left: 0, @@ -7265,7 +7265,7 @@ function yOe(t, e) { bottom: r.bottom - (r.top + e) }; } -class b_ { +class O_ { constructor(e, r, n) { this.from = e, this.to = r, this.size = n; } @@ -7281,11 +7281,11 @@ class b_ { } draw(e, r) { return It.replace({ - widget: new bOe(this.size * (r ? e.scaleY : e.scaleX), r) + widget: new kOe(this.size * (r ? e.scaleY : e.scaleX), r) }).range(this.from, this.to); } } -class bOe extends uo { +class kOe extends uo { constructor(e, r) { super(), this.size = e, this.vertical = r; } @@ -7300,11 +7300,11 @@ class bOe extends uo { return this.vertical ? this.size : -1; } } -class ZF { +class KF { constructor(e) { - this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !0, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = jF, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = Wn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; - let r = e.facet(HM).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); - this.heightOracle = new hOe(r), this.stateDeco = e.facet(p2).filter((n) => typeof n != "function"), this.heightMap = Ea.empty().applyChanges(this.stateDeco, qr.empty, this.heightOracle.setDoc(e.doc), [new ol(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = It.set(this.lineGaps.map((n) => n.draw(this, !1))), this.computeVisibleRanges(); + this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !0, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = JF, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = Wn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; + let r = e.facet(jM).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); + this.heightOracle = new gOe(r), this.stateDeco = e.facet(p2).filter((n) => typeof n != "function"), this.heightMap = Ea.empty().applyChanges(this.stateDeco, qr.empty, this.heightOracle.setDoc(e.doc), [new ol(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = It.set(this.lineGaps.map((n) => n.draw(this, !1))), this.computeVisibleRanges(); } updateForViewport() { let e = [this.viewport], { main: r } = this.state.selection; @@ -7315,7 +7315,7 @@ class ZF { e.push(new uO(s, a)); } } - this.viewports = e.sort((n, i) => n.from - i.from), this.scaler = this.heightMap.height <= 7e6 ? jF : new OOe(this.heightOracle, this.heightMap, this.viewports); + this.viewports = e.sort((n, i) => n.from - i.from), this.scaler = this.heightMap.height <= 7e6 ? JF : new COe(this.heightOracle, this.heightMap, this.viewports); } updateViewportLines() { this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => { @@ -7326,12 +7326,12 @@ class ZF { this.state = e.state; let n = this.stateDeco; this.stateDeco = this.state.facet(p2).filter((h) => typeof h != "function"); - let i = e.changedRanges, s = ol.extendWithRanges(i, gOe(n, this.stateDeco, e ? e.changes : wi.empty(this.state.doc.length))), a = this.heightMap.height, o = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); + let i = e.changedRanges, s = ol.extendWithRanges(i, bOe(n, this.stateDeco, e ? e.changes : wi.empty(this.state.doc.length))), a = this.heightMap.height, o = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s), this.heightMap.height != a && (e.flags |= 2), o ? (this.scrollAnchorPos = e.changes.mapPos(o.from, -1), this.scrollAnchorHeight = o.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height); let l = s.length ? this.mapViewport(this.viewport, e.changes) : this.viewport; (r && (r.range.head < l.from || r.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, r)); let u = !e.changes.empty || e.flags & 2 || l.from != this.viewport.from || l.to != this.viewport.to; - this.viewport = l, this.updateForViewport(), u && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), r && (this.scrollTarget = r), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(nJ) && (this.mustEnforceCursorAssoc = !0); + this.viewport = l, this.updateForViewport(), u && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), r && (this.scrollTarget = r), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(sJ) && (this.mustEnforceCursorAssoc = !0); } measure(e) { let r = e.contentDOM, n = window.getComputedStyle(r), i = this.heightOracle, s = n.whiteSpace; @@ -7340,14 +7340,14 @@ class ZF { this.contentDOMHeight = o.height, this.mustMeasureContent = !1; let u = 0, h = 0; if (o.width && o.height) { - let { scaleX: O, scaleY: S } = $K(r, o); + let { scaleX: O, scaleY: S } = FK(r, o); (this.scaleX != O || this.scaleY != S) && (this.scaleX = O, this.scaleY = S, u |= 8, a = l = !0); } let f = (parseInt(n.paddingTop) || 0) * this.scaleY, d = (parseInt(n.paddingBottom) || 0) * this.scaleY; (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8); let p = e.scrollDOM.scrollTop * this.scaleY; - this.scrollTop != p && (this.scrollAnchorHeight = -1, this.scrollTop = p), this.scrolledToBottom = zK(e.scrollDOM); - let g = (this.printing ? yOe : vOe)(r, this.paddingTop), m = g.top - this.pixelViewport.top, v = g.bottom - this.pixelViewport.bottom; + this.scrollTop != p && (this.scrollAnchorHeight = -1, this.scrollTop = p), this.scrolledToBottom = UK(e.scrollDOM); + let g = (this.printing ? OOe : wOe)(r, this.paddingTop), m = g.top - this.pixelViewport.top, v = g.bottom - this.pixelViewport.bottom; this.pixelViewport = g; let y = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; if (y != this.inView && (this.inView = y, y && (l = !0)), !this.inView && !this.scrollTarget) @@ -7362,7 +7362,7 @@ class ZF { m > 0 && v > 0 ? h = Math.max(m, v) : m < 0 && v < 0 && (h = Math.min(m, v)), i.heightChanged = !1; for (let S of this.viewports) { let C = S.from == this.viewport.from ? O : e.docView.measureVisibleLineHeights(S); - this.heightMap = (a ? Ea.empty().applyChanges(this.stateDeco, qr.empty, this.heightOracle, [new ol(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new fOe(S.from, C)); + this.heightMap = (a ? Ea.empty().applyChanges(this.stateDeco, qr.empty, this.heightOracle, [new ol(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new mOe(S.from, C)); } i.heightChanged && (u |= 2); } @@ -7401,7 +7401,7 @@ class ZF { return e; let n = []; for (let i of e) - r.touchesRange(i.from, i.to) || n.push(new b_(r.mapPos(i.from), r.mapPos(i.to), i.size)); + r.touchesRange(i.from, i.to) || n.push(new O_(r.mapPos(i.from), r.mapPos(i.to), i.size)); return n; } ensureLineGaps(e, r) { @@ -7418,20 +7418,20 @@ class ZF { l(u, v - 10, f, d), l(v + 10, h, f, d); return; } - let m = wOe(e, (v) => v.from >= f.from && v.to <= f.to && Math.abs(v.from - u) < s && Math.abs(v.to - h) < s && !g.some((y) => v.from < y && v.to > y)); + let m = TOe(e, (v) => v.from >= f.from && v.to <= f.to && Math.abs(v.from - u) < s && Math.abs(v.to - h) < s && !g.some((y) => v.from < y && v.to > y)); if (!m) { if (h < f.to && r && n && r.visibleRanges.some((v) => v.from <= h && v.to >= h)) { let v = r.moveToLineBoundary(je.cursor(h), !1, !0).head; v > u && (h = v); } - m = new b_(u, h, this.gapSize(f, u, h, d)); + m = new O_(u, h, this.gapSize(f, u, h, d)); } o.push(m); }; for (let u of this.viewportLines) { if (u.length < a) continue; - let h = xOe(u.from, u.to, this.stateDeco); + let h = SOe(u.from, u.to, this.stateDeco); if (h.total < a) continue; let f = this.scrollTarget ? this.scrollTarget.range.head : null, d, p; @@ -7461,7 +7461,7 @@ class ZF { return this.heightOracle.lineWrapping ? e.height * s : i.total * this.heightOracle.charWidth * s; } updateLineGaps(e) { - b_.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = It.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); + O_.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = It.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); } computeVisibleRanges() { let e = this.stateDeco; @@ -7502,7 +7502,7 @@ class uO { this.from = e, this.to = r; } } -function xOe(t, e, r) { +function SOe(t, e, r) { let n = [], i = t, s = 0; return $r.spans(r, t, e, { span() { @@ -7536,12 +7536,12 @@ function fO(t, e) { } return r / t.total; } -function wOe(t, e) { +function TOe(t, e) { for (let r of t) if (e(r)) return r; } -const jF = { +const JF = { toDOM(t) { return t; }, @@ -7550,7 +7550,7 @@ const jF = { }, scale: 1 }; -class OOe { +class COe { constructor(e, r, n) { let i = 0, s = 0, a = 0; this.viewports = n.map(({ from: o, to: l }) => { @@ -7587,9 +7587,9 @@ function ry(t, e) { let r = e.toDOM(t.top), n = e.toDOM(t.bottom); return new Ic(t.from, t.length, r, n - r, Array.isArray(t._content) ? t._content.map((i) => ry(i, e)) : t._content); } -const dO = /* @__PURE__ */ $t.define({ combine: (t) => t.join(" ") }), h8 = /* @__PURE__ */ $t.define({ combine: (t) => t.indexOf(!0) > -1 }), f8 = /* @__PURE__ */ ah.newName(), CJ = /* @__PURE__ */ ah.newName(), EJ = /* @__PURE__ */ ah.newName(), _J = { "&light": "." + CJ, "&dark": "." + EJ }; -function d8(t, e, r) { - return new ah(e, { +const dO = /* @__PURE__ */ $t.define({ combine: (t) => t.join(" ") }), p8 = /* @__PURE__ */ $t.define({ combine: (t) => t.indexOf(!0) > -1 }), g8 = /* @__PURE__ */ oh.newName(), _J = /* @__PURE__ */ oh.newName(), AJ = /* @__PURE__ */ oh.newName(), LJ = { "&light": "." + _J, "&dark": "." + AJ }; +function m8(t, e, r) { + return new oh(e, { finish(n) { return /&/.test(n) ? n.replace(/&\w*/, (i) => { if (i == "&") @@ -7601,7 +7601,7 @@ function d8(t, e, r) { } }); } -const kOe = /* @__PURE__ */ d8("." + f8, { +const EOe = /* @__PURE__ */ m8("." + g8, { "&": { position: "relative !important", boxSizing: "border-box", @@ -7832,8 +7832,8 @@ const kOe = /* @__PURE__ */ d8("." + f8, { border: "1px solid #555", backgroundColor: "inherit" } -}, _J), ny = "\uFFFF"; -class SOe { +}, LJ), ny = "\uFFFF"; +class _Oe { constructor(e, r) { this.points = e, this.text = "", this.lineSeparator = r.facet(Sr.lineSeparator); } @@ -7855,7 +7855,7 @@ class SOe { if (a == r) break; let o = Dn.get(i), l = Dn.get(a); - (o && l ? o.breakAfter : (o ? o.breakAfter : KF(i)) || KF(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; + (o && l ? o.breakAfter : (o ? o.breakAfter : ez(i)) || ez(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; } return this.findPointBefore(n, r), this; } @@ -7890,54 +7890,54 @@ class SOe { } findPointInside(e, r) { for (let n of this.points) - (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (TOe(e, n.node, n.offset) ? r : 0)); + (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (AOe(e, n.node, n.offset) ? r : 0)); } } -function TOe(t, e, r) { +function AOe(t, e, r) { for (; ; ) { - if (!e || r < oh(e)) + if (!e || r < lh(e)) return !1; if (e == t) return !0; r = d2(e) + 1, e = e.parentNode; } } -function KF(t) { +function ez(t) { return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName); } -class JF { +class tz { constructor(e, r) { this.node = e, this.offset = r, this.pos = -1; } } -class COe { +class LOe { constructor(e, r, n, i) { this.typeOver = i, this.bounds = null, this.text = ""; let { impreciseHead: s, impreciseAnchor: a } = e.docView; if (e.state.readOnly && r > -1) this.newSel = null; else if (r > -1 && (this.bounds = e.docView.domBoundsAround(r, n, 0))) { - let o = s || a ? [] : AOe(e), l = new SOe(o, e.state); - l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = LOe(o, this.bounds.from); + let o = s || a ? [] : DOe(e), l = new _Oe(o, e.state); + l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = POe(o, this.bounds.from); } else { - let o = e.observer.selectionRange, l = s && s.node == o.focusNode && s.offset == o.focusOffset || !j7(e.contentDOM, o.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(o.focusNode, o.focusOffset), u = a && a.node == o.anchorNode && a.offset == o.anchorOffset || !j7(e.contentDOM, o.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(o.anchorNode, o.anchorOffset); + let o = e.observer.selectionRange, l = s && s.node == o.focusNode && s.offset == o.focusOffset || !e8(e.contentDOM, o.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(o.focusNode, o.focusOffset), u = a && a.node == o.anchorNode && a.offset == o.anchorOffset || !e8(e.contentDOM, o.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(o.anchorNode, o.anchorOffset); this.newSel = je.single(u, l); } } } -function AJ(t, e) { +function RJ(t, e) { let r, { newSel: n } = e, i = t.state.selection.main, s = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1; if (e.bounds) { let { from: a, to: o } = e.bounds, l = i.from, u = null; (s === 8 || Vt.android && e.text.length < o - a) && (l = i.to, u = "end"); - let h = _Oe(t.state.doc.sliceString(a, o, ny), e.text, l - a, u); + let h = MOe(t.state.doc.sliceString(a, o, ny), e.text, l - a, u); h && (Vt.chrome && s == 13 && h.toB == h.from + 2 && e.text.slice(h.from, h.toB) == ny + ny && h.toB--, r = { from: a + h.from, to: a + h.toA, insert: qr.of(e.text.slice(h.from, h.toB).split(ny)) }); } else - n && (!t.hasFocus && t.state.facet(PT) || n.main.eq(i)) && (n = null); + n && (!t.hasFocus && t.state.facet(NT) || n.main.eq(i)) && (n = null); if (!r && !n) return !1; if (!r && e.typeOver && !i.empty && n && n.main.empty ? r = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : r && r.from >= i.from && r.to <= i.to && (r.from != i.from || r.to != i.to) && i.to - i.from - (r.to - r.from) <= 4 ? r = { @@ -7946,19 +7946,19 @@ function AJ(t, e) { insert: t.state.doc.slice(i.from, r.from).append(r.insert).append(t.state.doc.slice(r.to, i.to)) } : (Vt.mac || Vt.android) && r && r.from == r.to && r.from == i.head - 1 && /^\. ?$/.test(r.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (n && r.insert.length == 2 && (n = je.single(n.main.anchor - 1, n.main.head - 1)), r = { from: i.from, to: i.to, insert: qr.of([" "]) }) : Vt.chrome && r && r.from == r.to && r.from == i.head && r.insert.toString() == ` ` && t.lineWrapping && (n && (n = je.single(n.main.anchor - 1, n.main.head - 1)), r = { from: i.from, to: i.to, insert: qr.of([" "]) }), r) { - if (Vt.ios && t.inputState.flushIOSKey() || Vt.android && (r.from == i.from && r.to == i.to && r.insert.length == 1 && r.insert.lines == 2 && Ag(t.contentDOM, "Enter", 13) || (r.from == i.from - 1 && r.to == i.to && r.insert.length == 0 || s == 8 && r.insert.length < r.to - r.from && r.to > i.head) && Ag(t.contentDOM, "Backspace", 8) || r.from == i.from && r.to == i.to + 1 && r.insert.length == 0 && Ag(t.contentDOM, "Delete", 46))) + if (Vt.ios && t.inputState.flushIOSKey() || Vt.android && (r.from == i.from && r.to == i.to && r.insert.length == 1 && r.insert.lines == 2 && Lg(t.contentDOM, "Enter", 13) || (r.from == i.from - 1 && r.to == i.to && r.insert.length == 0 || s == 8 && r.insert.length < r.to - r.from && r.to > i.head) && Lg(t.contentDOM, "Backspace", 8) || r.from == i.from && r.to == i.to + 1 && r.insert.length == 0 && Lg(t.contentDOM, "Delete", 46))) return !0; let a = r.insert.toString(); t.inputState.composing >= 0 && t.inputState.composing++; - let o, l = () => o || (o = EOe(t, r, n)); - return t.state.facet(eJ).some((u) => u(t, r.from, r.to, a, l)) || t.dispatch(l()), !0; + let o, l = () => o || (o = ROe(t, r, n)); + return t.state.facet(rJ).some((u) => u(t, r.from, r.to, a, l)) || t.dispatch(l()), !0; } else if (n && !n.main.eq(i)) { let a = !1, o = "select"; return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (a = !0), o = t.inputState.lastSelectionOrigin), t.dispatch({ selection: n, scrollIntoView: a, userEvent: o }), !0; } else return !1; } -function EOe(t, e, r) { +function ROe(t, e, r) { let n, i = t.state, s = i.selection.main; if (e.from >= s.from && e.to <= s.to && e.to - e.from >= (s.to - s.from) / 3 && (!r || r.main.empty && r.main.from == e.from + e.insert.length) && t.inputState.composing < 0) { let o = s.from < e.from ? i.sliceDoc(s.from, e.from) : "", l = s.to > e.to ? i.sliceDoc(e.to, s.to) : ""; @@ -7966,7 +7966,7 @@ function EOe(t, e, r) { } else { let o = i.changes(e), l = r && r.main.to <= o.newLength ? r.main : void 0; if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= s.to && e.to >= s.to - 10) { - let u = t.state.sliceDoc(e.from, e.to), h, f = r && dJ(t, r.main.head); + let u = t.state.sliceDoc(e.from, e.to), h, f = r && gJ(t, r.main.head); if (f) { let g = e.insert.length - (e.to - e.from); h = { from: f.from, to: f.to - g }; @@ -7994,7 +7994,7 @@ function EOe(t, e, r) { let a = "input.type"; return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, a += ".compose", t.inputState.compositionFirstChange && (a += ".start", t.inputState.compositionFirstChange = !1)), i.update(n, { userEvent: a, scrollIntoView: !0 }); } -function _Oe(t, e, r, n) { +function MOe(t, e, r, n) { let i = Math.min(t.length, e.length), s = 0; for (; s < i && t.charCodeAt(s) == e.charCodeAt(s); ) s++; @@ -8016,33 +8016,33 @@ function _Oe(t, e, r, n) { } return { from: s, toA: a, toB: o }; } -function AOe(t) { +function DOe(t) { let e = []; if (t.root.activeElement != t.contentDOM) return e; let { anchorNode: r, anchorOffset: n, focusNode: i, focusOffset: s } = t.observer.selectionRange; - return r && (e.push(new JF(r, n)), (i != r || s != n) && e.push(new JF(i, s))), e; + return r && (e.push(new tz(r, n)), (i != r || s != n) && e.push(new tz(i, s))), e; } -function LOe(t, e) { +function POe(t, e) { if (t.length == 0) return null; let r = t[0].pos, n = t.length == 2 ? t[1].pos : r; return r > -1 && n > -1 ? je.single(r + e, n + e) : null; } -const ROe = { +const NOe = { childList: !0, characterData: !0, subtree: !0, attributes: !0, characterDataOldValue: !0 -}, x_ = Vt.ie && Vt.ie_version <= 11; -class MOe { +}, k_ = Vt.ie && Vt.ie_version <= 11; +class IOe { constructor(e) { - this.view = e, this.active = !1, this.selectionRange = new gwe(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((r) => { + this.view = e, this.active = !1, this.selectionRange = new bwe(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((r) => { for (let n of r) this.queue.push(n); (Vt.ie && Vt.ie_version <= 11 || Vt.ios && e.composing) && r.some((n) => n.type == "childList" && n.removedNodes.length || n.type == "characterData" && n.oldValue.length > n.target.nodeValue.length) ? this.flushSoon() : this.flush(); - }), x_ && (this.onCharData = (r) => { + }), k_ && (this.onCharData = (r) => { this.queue.push({ target: r.target, type: "characterData", @@ -8086,7 +8086,7 @@ class MOe { if (!this.readSelectionRange() || this.delayedAndroidKey) return; let { view: n } = this, i = this.selectionRange; - if (n.state.facet(PT) ? n.root.activeElement != this.dom : !e5(n.dom, i)) + if (n.state.facet(NT) ? n.root.activeElement != this.dom : !e5(n.dom, i)) return; let s = i.anchorNode && n.docView.nearest(i.anchorNode); if (s && s.ignoreEvent(e)) { @@ -8096,11 +8096,11 @@ class MOe { (Vt.ie && Vt.ie_version <= 11 || Vt.android && Vt.chrome) && !n.state.selection.main.empty && i.focusNode && gk(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1); } readSelectionRange() { - let { view: e } = this, r = Vt.safari && e.root.nodeType == 11 && hwe(this.dom.ownerDocument) == this.dom && DOe(this.view) || pk(e.root); + let { view: e } = this, r = Vt.safari && e.root.nodeType == 11 && gwe(this.dom.ownerDocument) == this.dom && $Oe(this.view) || pk(e.root); if (!r || this.selectionRange.eq(r)) return !1; let n = e5(this.dom, r); - return n && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && vwe(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), n && (this.selectionChanged = !0), !0); + return n && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && wwe(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), n && (this.selectionChanged = !0), !0); } setSelectionRange(e, r) { this.selectionRange.set(e.node, e.offset, r.node, r.offset), this.selectionChanged = !1; @@ -8135,10 +8135,10 @@ class MOe { } } start() { - this.active || (this.observer.observe(this.dom, ROe), x_ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); + this.active || (this.observer.observe(this.dom, NOe), k_ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); } stop() { - !this.active || (this.active = !1, this.observer.disconnect(), x_ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); + !this.active || (this.active = !1, this.observer.disconnect(), k_ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); } clear() { this.processRecords(), this.queue.length = 0, this.selectionChanged = !1; @@ -8148,7 +8148,7 @@ class MOe { if (!this.delayedAndroidKey) { let i = () => { let s = this.delayedAndroidKey; - s && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = s.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && s.force && Ag(this.dom, s.key, s.keyCode)); + s && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = s.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && s.force && Lg(this.dom, s.key, s.keyCode)); }; this.flushingAndroidKey = this.view.win.requestAnimationFrame(i); } @@ -8189,7 +8189,7 @@ class MOe { if (e < 0 && !i) return null; e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1; - let s = new COe(this.view, e, r, n); + let s = new LOe(this.view, e, r, n); return this.view.docView.domChanged = { newSel: s.newSel ? s.newSel.main : null }, s; } flush(e = !0) { @@ -8199,7 +8199,7 @@ class MOe { let r = this.readChange(); if (!r) return this.view.requestMeasure(), !1; - let n = this.view.state, i = AJ(this.view, r); + let n = this.view.state, i = RJ(this.view, r); return this.view.state == n && this.view.update([]), i; } readMutation(e) { @@ -8207,7 +8207,7 @@ class MOe { if (!r || r.ignoreMutation(e)) return null; if (r.markDirty(e.type == "attributes"), e.type == "attributes" && (r.flags |= 4), e.type == "childList") { - let n = ez(r, e.previousSibling || e.target.previousSibling, -1), i = ez(r, e.nextSibling || e.target.nextSibling, 1); + let n = rz(r, e.previousSibling || e.target.previousSibling, -1), i = rz(r, e.nextSibling || e.target.nextSibling, 1); return { from: n ? r.posAfter(n) : r.posAtStart, to: i ? r.posBefore(i) : r.posAtEnd, @@ -8233,7 +8233,7 @@ class MOe { this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey); } } -function ez(t, e, r) { +function rz(t, e, r) { for (; e; ) { let n = Dn.get(e); if (n && n.parent == t) @@ -8243,7 +8243,7 @@ function ez(t, e, r) { } return null; } -function DOe(t) { +function $Oe(t) { let e = null; function r(l) { l.preventDefault(), l.stopImmediatePropagation(), e = l.getTargetRanges()[0]; @@ -8281,10 +8281,10 @@ class kt { constructor(e = {}) { this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom); let { dispatch: r } = e; - this.dispatchTransactions = e.dispatchTransactions || r && ((n) => n.forEach((i) => r(i, this))) || ((n) => this.update(n)), this.dispatch = this.dispatch.bind(this), this._root = e.root || mwe(e.parent) || document, this.viewState = new ZF(e.state || Sr.create(e)), e.scrollTo && e.scrollTo.is(oO) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(ey).map((n) => new m_(n)); + this.dispatchTransactions = e.dispatchTransactions || r && ((n) => n.forEach((i) => r(i, this))) || ((n) => this.update(n)), this.dispatch = this.dispatch.bind(this), this._root = e.root || xwe(e.parent) || document, this.viewState = new KF(e.state || Sr.create(e)), e.scrollTo && e.scrollTo.is(oO) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(ey).map((n) => new b_(n)); for (let n of this.plugins) n.update(this); - this.observer = new MOe(this), this.inputState = new Xwe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new MF(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(); + this.observer = new IOe(this), this.inputState = new Kwe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new PF(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(); } dispatch(...e) { let r = e.length == 1 && e[0] instanceof Ei ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)]; @@ -8304,7 +8304,7 @@ class kt { return; } let a = this.hasFocus, o = 0, l = null; - e.some((d) => d.annotation(OJ)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = kJ(s, a), l || (o = 1)); + e.some((d) => d.annotation(SJ)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = TJ(s, a), l || (o = 1)); let u = this.observer.delayedAndroidKey, h = null; if (u ? (this.observer.clearDelayedAndroidKey(), h = this.observer.readChange(), (h && !this.state.doc.eq(s.doc) || !this.state.selection.eq(s.selection)) && (h = null)) : this.observer.clear(), s.facet(Sr.phrases) != this.state.facet(Sr.phrases)) return this.setState(s); @@ -8315,7 +8315,7 @@ class kt { for (let d of e) { if (f && (f = f.map(d.changes)), d.scrollIntoView) { let { main: p } = d.state.selection; - f = new Lg(p.empty ? p : je.cursor(p.head, p.head > p.anchor ? -1 : 1)); + f = new Rg(p.empty ? p : je.cursor(p.head, p.head > p.anchor ? -1 : 1)); } for (let p of d.effects) p.is(oO) && (f = p.value.clip(this.state)); @@ -8325,14 +8325,14 @@ class kt { this.updateState = 0; } if (i.startState.facet(dO) != i.state.facet(dO) && (this.viewState.mustMeasureContent = !0), (r || n || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), !i.empty) - for (let d of this.state.facet(i8)) + for (let d of this.state.facet(o8)) try { d(i); } catch (p) { al(this.state, p, "update listener"); } (l || h) && Promise.resolve().then(() => { - l && this.state == l.startState && this.dispatch(l), h && !AJ(this, h) && u.force && Ag(this.contentDOM, u.key, u.keyCode); + l && this.state == l.startState && this.dispatch(l), h && !RJ(this, h) && u.force && Lg(this.contentDOM, u.key, u.keyCode); }); } setState(e) { @@ -8347,10 +8347,10 @@ class kt { try { for (let n of this.plugins) n.destroy(this); - this.viewState = new ZF(e), this.plugins = e.facet(ey).map((n) => new m_(n)), this.pluginMap.clear(); + this.viewState = new KF(e), this.plugins = e.facet(ey).map((n) => new b_(n)), this.pluginMap.clear(); for (let n of this.plugins) n.update(this); - this.docView.destroy(), this.docView = new MF(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; + this.docView.destroy(), this.docView = new PF(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; } finally { this.updateState = 0; } @@ -8363,7 +8363,7 @@ class kt { for (let s of n) { let a = r.indexOf(s); if (a < 0) - i.push(new m_(s)); + i.push(new b_(s)); else { let o = this.plugins[a]; o.mustUpdate = e, i.push(o); @@ -8392,7 +8392,7 @@ class kt { try { for (let o = 0; ; o++) { if (a < 0) - if (zK(n)) + if (UK(n)) s = -1, a = this.viewState.heightMap.height; else { let p = this.viewState.scrollAnchorAt(i); @@ -8412,12 +8412,12 @@ class kt { try { return p.read(this); } catch (g) { - return al(this.state, g), tz; + return al(this.state, g), nz; } }), f = mk.create(this, this.state, []), d = !1; f.flags |= l, r ? r.flags |= l : r = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f)); for (let p = 0; p < u.length; p++) - if (h[p] != tz) + if (h[p] != nz) try { let g = u[p]; g.write && g.write(h[p], this); @@ -8443,29 +8443,29 @@ class kt { this.updateState = 0, this.measureScheduled = -1; } if (r && !r.empty) - for (let o of this.state.facet(i8)) + for (let o of this.state.facet(o8)) o(r); } get themeClasses() { - return f8 + " " + (this.state.facet(h8) ? EJ : CJ) + " " + this.state.facet(dO); + return g8 + " " + (this.state.facet(p8) ? AJ : _J) + " " + this.state.facet(dO); } updateAttrs() { - let e = rz(this, iJ, { + let e = iz(this, aJ, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), r = { spellcheck: "false", autocorrect: "off", autocapitalize: "off", translate: "no", - contenteditable: this.state.facet(PT) ? "true" : "false", + contenteditable: this.state.facet(NT) ? "true" : "false", class: "cm-content", style: `${Vt.tabSize}: ${this.state.tabSize}`, role: "textbox", "aria-multiline": "true" }; - this.state.readOnly && (r["aria-readonly"] = "true"), rz(this, HM, r); + this.state.readOnly && (r["aria-readonly"] = "true"), iz(this, jM, r); let n = this.observer.ignore(() => { - let i = r8(this.contentDOM, this.contentAttrs, r), s = r8(this.dom, this.editorAttrs, e); + let i = s8(this.contentDOM, this.contentAttrs, r), s = s8(this.dom, this.editorAttrs, e); return i || s; }); return this.editorAttrs = e, this.contentAttrs = r, n; @@ -8483,7 +8483,7 @@ class kt { mountStyles() { this.styleModules = this.state.facet(ty); let e = this.state.facet(kt.cspNonce); - ah.mount(this.root, this.styleModules.concat(kOe).reverse(), e ? { nonce: e } : void 0); + oh.mount(this.root, this.styleModules.concat(EOe).reverse(), e ? { nonce: e } : void 0); } readMeasured() { if (this.updateState == 2) @@ -8536,16 +8536,16 @@ class kt { return this.viewState.contentHeight; } moveByChar(e, r, n) { - return y_(this, e, BF(this, e, r, n)); + return w_(this, e, zF(this, e, r, n)); } moveByGroup(e, r) { - return y_(this, e, BF(this, e, r, (n) => Wwe(this, e.head, n))); + return w_(this, e, zF(this, e, r, (n) => Zwe(this, e.head, n))); } moveToLineBoundary(e, r, n = !0) { - return Ywe(this, e, r, n); + return Hwe(this, e, r, n); } moveVertically(e, r, n) { - return y_(this, e, Gwe(this, e, r, n)); + return w_(this, e, jwe(this, e, r, n)); } domAtPos(e) { return this.docView.domAtPos(e); @@ -8554,15 +8554,15 @@ class kt { return this.docView.posFromDOM(e, r); } posAtCoords(e, r = !0) { - return this.readMeasured(), gJ(this, e, r); + return this.readMeasured(), vJ(this, e, r); } coordsAtPos(e, r = 1) { this.readMeasured(); let n = this.docView.coordsAt(e, r); if (!n || n.left == n.right) return n; - let i = this.state.doc.lineAt(e), s = this.bidiSpans(i), a = s[cf.find(s, e - i.from, -1, r)]; - return WM(n, a.dir == Wn.LTR == r > 0); + let i = this.state.doc.lineAt(e), s = this.bidiSpans(i), a = s[uf.find(s, e - i.from, -1, r)]; + return XM(n, a.dir == Wn.LTR == r > 0); } coordsForChar(e) { return this.readMeasured(), this.docView.coordsForChar(e); @@ -8577,20 +8577,20 @@ class kt { return this.viewState.defaultTextDirection; } textDirectionAt(e) { - return !this.state.facet(rJ) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); + return !this.state.facet(iJ) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); } get lineWrapping() { return this.viewState.heightOracle.lineWrapping; } bidiSpans(e) { - if (e.length > POe) - return hJ(e.length); + if (e.length > BOe) + return dJ(e.length); let r = this.textDirectionAt(e.from), n; for (let s of this.bidiCache) - if (s.from == e.from && s.dir == r && (s.fresh || uJ(s.isolates, n = RF(this, e.from, e.to)))) + if (s.from == e.from && s.dir == r && (s.fresh || fJ(s.isolates, n = DF(this, e.from, e.to)))) return s.order; - n || (n = RF(this, e.from, e.to)); - let i = Rwe(e.text, r, n); + n || (n = DF(this, e.from, e.to)); + let i = Nwe(e.text, r, n); return this.bidiCache.push(new vk(e.from, e.to, r, n, !0, i)), i; } get hasFocus() { @@ -8599,7 +8599,7 @@ class kt { } focus() { this.observer.ignore(() => { - BK(this.contentDOM), this.docView.updateSelection(); + zK(this.contentDOM), this.docView.updateSelection(); }); } setRoot(e) { @@ -8611,11 +8611,11 @@ class kt { this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0; } static scrollIntoView(e, r = {}) { - return oO.of(new Lg(typeof e == "number" ? je.cursor(e) : e, r.y, r.x, r.yMargin, r.xMargin)); + return oO.of(new Rg(typeof e == "number" ? je.cursor(e) : e, r.y, r.x, r.yMargin, r.xMargin)); } scrollSnapshot() { let { scrollTop: e, scrollLeft: r } = this.scrollDOM, n = this.viewState.scrollAnchorAt(e); - return oO.of(new Lg(je.cursor(n.from), "start", "start", n.top - e, r, !0)); + return oO.of(new Rg(je.cursor(n.from), "start", "start", n.top - e, r, !0)); } static domEventHandlers(e) { return hn.define(() => ({}), { eventHandlers: e }); @@ -8624,11 +8624,11 @@ class kt { return hn.define(() => ({}), { eventObservers: e }); } static theme(e, r) { - let n = ah.newName(), i = [dO.of(n), ty.of(d8(`.${n}`, e))]; - return r && r.dark && i.push(h8.of(!0)), i; + let n = oh.newName(), i = [dO.of(n), ty.of(m8(`.${n}`, e))]; + return r && r.dark && i.push(p8.of(!0)), i; } static baseTheme(e) { - return uc.lowest(ty.of(d8("." + f8, e, _J))); + return uc.lowest(ty.of(m8("." + g8, e, LJ))); } static findFromDOM(e) { var r; @@ -8637,26 +8637,26 @@ class kt { } } kt.styleModule = ty; -kt.inputHandler = eJ; -kt.focusChangeEffect = tJ; -kt.perLineTextDirection = rJ; -kt.exceptionSink = JK; -kt.updateListener = i8; -kt.editable = PT; -kt.mouseSelectionStyle = KK; -kt.dragMovesSelection = jK; -kt.clickAddsSelectionRange = ZK; +kt.inputHandler = rJ; +kt.focusChangeEffect = nJ; +kt.perLineTextDirection = iJ; +kt.exceptionSink = tJ; +kt.updateListener = o8; +kt.editable = NT; +kt.mouseSelectionStyle = eJ; +kt.dragMovesSelection = JK; +kt.clickAddsSelectionRange = KK; kt.decorations = p2; -kt.atomicRanges = ZM; -kt.bidiIsolatedRanges = sJ; -kt.scrollMargins = aJ; -kt.darkTheme = h8; +kt.atomicRanges = KM; +kt.bidiIsolatedRanges = oJ; +kt.scrollMargins = lJ; +kt.darkTheme = p8; kt.cspNonce = /* @__PURE__ */ $t.define({ combine: (t) => t.length ? t[0] : "" }); -kt.contentAttributes = HM; -kt.editorAttributes = iJ; +kt.contentAttributes = jM; +kt.editorAttributes = aJ; kt.lineWrapping = /* @__PURE__ */ kt.contentAttributes.of({ class: "cm-lineWrapping" }); kt.announce = /* @__PURE__ */ or.define(); -const POe = 4096, tz = {}; +const BOe = 4096, nz = {}; class vk { constructor(e, r, n, i, s, a) { this.from = e, this.to = r, this.dir = n, this.isolates = i, this.fresh = s, this.order = a; @@ -8672,15 +8672,15 @@ class vk { return n; } } -function rz(t, e, r) { +function iz(t, e, r) { for (let n = t.state.facet(e), i = n.length - 1; i >= 0; i--) { let s = n[i], a = typeof s == "function" ? s(t) : s; - a && t8(a, r); + a && i8(a, r); } return r; } -const NOe = Vt.mac ? "mac" : Vt.windows ? "win" : Vt.linux ? "linux" : "key"; -function IOe(t, e) { +const FOe = Vt.mac ? "mac" : Vt.windows ? "win" : Vt.linux ? "linux" : "key"; +function zOe(t, e) { const r = t.split(/-(?!$)/); let n = r[r.length - 1]; n == "Space" && (n = " "); @@ -8705,21 +8705,21 @@ function IOe(t, e) { function pO(t, e, r) { return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), r !== !1 && e.shiftKey && (t = "Shift-" + t), t; } -const $Oe = /* @__PURE__ */ uc.default(/* @__PURE__ */ kt.domEventHandlers({ +const QOe = /* @__PURE__ */ uc.default(/* @__PURE__ */ kt.domEventHandlers({ keydown(t, e) { - return RJ(LJ(e.state), t, e, "editor"); + return DJ(MJ(e.state), t, e, "editor"); } -})), Zu = /* @__PURE__ */ $t.define({ enables: $Oe }), nz = /* @__PURE__ */ new WeakMap(); -function LJ(t) { - let e = t.facet(Zu), r = nz.get(e); - return r || nz.set(e, r = zOe(e.reduce((n, i) => n.concat(i), []))), r; +})), ju = /* @__PURE__ */ $t.define({ enables: QOe }), sz = /* @__PURE__ */ new WeakMap(); +function MJ(t) { + let e = t.facet(ju), r = sz.get(e); + return r || sz.set(e, r = qOe(e.reduce((n, i) => n.concat(i), []))), r; } -function BOe(t, e, r) { - return RJ(LJ(t.state), e, t, r); +function UOe(t, e, r) { + return DJ(MJ(t.state), e, t, r); } -let Jh = null; -const FOe = 4e3; -function zOe(t, e = NOe) { +let ef = null; +const VOe = 4e3; +function qOe(t, e = FOe) { let r = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null), i = (a, o) => { let l = n[a]; if (l == null) @@ -8728,17 +8728,17 @@ function zOe(t, e = NOe) { throw new Error("Key binding " + a + " is used both as a regular binding and as a multi-stroke prefix"); }, s = (a, o, l, u, h) => { var f, d; - let p = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), g = o.split(/ (?!$)/).map((y) => IOe(y, e)); + let p = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), g = o.split(/ (?!$)/).map((y) => zOe(y, e)); for (let y = 1; y < g.length; y++) { let b = g.slice(0, y).join(" "); i(b, !0), p[b] || (p[b] = { preventDefault: !0, stopPropagation: !1, run: [(w) => { - let O = Jh = { view: w, prefix: b, scope: a }; + let O = ef = { view: w, prefix: b, scope: a }; return setTimeout(() => { - Jh == O && (Jh = null); - }, FOe), !0; + ef == O && (ef = null); + }, VOe), !0; }] }); } @@ -8767,9 +8767,9 @@ function zOe(t, e = NOe) { } return r; } -function RJ(t, e, r, n) { - let i = uwe(e), s = bs(i, 0), a = Ho(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; - Jh && Jh.view == r && Jh.scope == n && (o = Jh.prefix + " ", vJ.indexOf(e.keyCode) < 0 && (u = !0, Jh = null)); +function DJ(t, e, r, n) { + let i = pwe(e), s = bs(i, 0), a = Ho(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; + ef && ef.view == r && ef.scope == n && (o = ef.prefix + " ", bJ.indexOf(e.keyCode) < 0 && (u = !0, ef = null)); let f = /* @__PURE__ */ new Set(), d = (v) => { if (v) { for (let y of v.run) @@ -8779,7 +8779,7 @@ function RJ(t, e, r, n) { } return !1; }, p = t[n], g, m; - return p && (d(p[o + pO(i, e, !a)]) ? l = !0 : a && (e.altKey || e.metaKey || e.ctrlKey) && !(Vt.windows && e.ctrlKey && e.altKey) && (g = Df[e.keyCode]) && g != i ? (d(p[o + pO(g, e, !0)]) || e.shiftKey && (m = h2[e.keyCode]) != i && m != g && d(p[o + pO(m, e, !1)])) && (l = !0) : a && e.shiftKey && d(p[o + pO(i, e, !0)]) && (l = !0), !l && d(p._any) && (l = !0)), u && (l = !0), l && h && e.stopPropagation(), l; + return p && (d(p[o + pO(i, e, !a)]) ? l = !0 : a && (e.altKey || e.metaKey || e.ctrlKey) && !(Vt.windows && e.ctrlKey && e.altKey) && (g = Pf[e.keyCode]) && g != i ? (d(p[o + pO(g, e, !0)]) || e.shiftKey && (m = h2[e.keyCode]) != i && m != g && d(p[o + pO(m, e, !1)])) && (l = !0) : a && e.shiftKey && d(p[o + pO(i, e, !0)]) && (l = !0), !l && d(p._any) && (l = !0)), u && (l = !0), l && h && e.stopPropagation(), l; } class Ix { constructor(e, r, n, i, s) { @@ -8803,17 +8803,17 @@ class Ix { let i = e.coordsAtPos(n.head, n.assoc || 1); if (!i) return []; - let s = MJ(e); + let s = PJ(e); return [new Ix(r, i.left - s.left, i.top - s.top, null, i.bottom - i.top)]; } else - return QOe(e, r, n); + return YOe(e, r, n); } } -function MJ(t) { +function PJ(t) { let e = t.scrollDOM.getBoundingClientRect(); return { left: (t.textDirection == Wn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY }; } -function iz(t, e, r) { +function az(t, e, r) { let n = je.cursor(e); return { from: Math.max(r.from, t.moveToLineBoundary(n, !1, !0).from), @@ -8821,11 +8821,11 @@ function iz(t, e, r) { type: Ca.Text }; } -function QOe(t, e, r) { +function YOe(t, e, r) { if (r.to <= t.viewport.from || r.from >= t.viewport.to) return []; - let n = Math.max(r.from, t.viewport.from), i = Math.min(r.to, t.viewport.to), s = t.textDirection == Wn.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = MJ(t), u = a.querySelector(".cm-line"), h = u && window.getComputedStyle(u), f = o.left + (h ? parseInt(h.paddingLeft) + Math.min(0, parseInt(h.textIndent)) : 0), d = o.right - (h ? parseInt(h.paddingRight) : 0), p = c8(t, n), g = c8(t, i), m = p.type == Ca.Text ? p : null, v = g.type == Ca.Text ? g : null; - if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = iz(t, n, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = iz(t, i, v)), m && v && m.from == v.from) + let n = Math.max(r.from, t.viewport.from), i = Math.min(r.to, t.viewport.to), s = t.textDirection == Wn.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = PJ(t), u = a.querySelector(".cm-line"), h = u && window.getComputedStyle(u), f = o.left + (h ? parseInt(h.paddingLeft) + Math.min(0, parseInt(h.textIndent)) : 0), d = o.right - (h ? parseInt(h.paddingRight) : 0), p = f8(t, n), g = f8(t, i), m = p.type == Ca.Text ? p : null, v = g.type == Ca.Text ? g : null; + if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = az(t, n, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = az(t, i, v)), m && v && m.from == v.from) return b(w(r.from, r.to, m)); { let S = m ? w(r.from, null, m) : O(p, !1), C = v ? w(null, r.to, v) : O(g, !0), T = []; @@ -8867,10 +8867,10 @@ function QOe(t, e, r) { return { top: T, bottom: T, horizontal: [] }; } } -function UOe(t, e) { +function WOe(t, e) { return t.constructor == e.constructor && t.eq(e); } -class VOe { +class GOe { constructor(e, r) { this.view = e, this.layer = r, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), r.above && this.dom.classList.add("cm-layer-above"), r.class && this.dom.classList.add(r.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), r.mount && r.mount(this.dom, e); } @@ -8891,7 +8891,7 @@ class VOe { (e != this.scaleX || r != this.scaleY) && (this.scaleX = e, this.scaleY = r, this.dom.style.transform = `scale(${1 / e}, ${1 / r})`); } draw(e) { - if (e.length != this.drawn.length || e.some((r, n) => !UOe(r, this.drawn[n]))) { + if (e.length != this.drawn.length || e.some((r, n) => !WOe(r, this.drawn[n]))) { let r = this.dom.firstChild, n = 0; for (let i of e) i.update && r && i.constructor && this.drawn[n].constructor && i.update(r, this.drawn[n]) ? (r = r.nextSibling, n++) : this.dom.insertBefore(i.draw(), r); @@ -8907,15 +8907,15 @@ class VOe { } } const n5 = /* @__PURE__ */ $t.define(); -function DJ(t) { +function NJ(t) { return [ - hn.define((e) => new VOe(e, t)), + hn.define((e) => new GOe(e, t)), n5.of(t) ]; } -const PJ = !Vt.ios, m2 = /* @__PURE__ */ $t.define({ +const IJ = !Vt.ios, m2 = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { + return gu(t, { cursorBlinkRate: 1200, drawRangeCursor: !0 }, { @@ -8924,25 +8924,25 @@ const PJ = !Vt.ios, m2 = /* @__PURE__ */ $t.define({ }); } }); -function NJ(t = {}) { +function $J(t = {}) { return [ m2.of(t), - qOe, - YOe, - WOe, - nJ.of(!0) + XOe, + HOe, + ZOe, + sJ.of(!0) ]; } -function IJ(t) { +function BJ(t) { return t.startState.facet(m2) != t.state.facet(m2); } -const qOe = /* @__PURE__ */ DJ({ +const XOe = /* @__PURE__ */ NJ({ above: !0, markers(t) { let { state: e } = t, r = e.facet(m2), n = []; for (let i of e.selection.ranges) { let s = i == e.selection.main; - if (i.empty ? !s || PJ : r.drawRangeCursor) { + if (i.empty ? !s || IJ : r.drawRangeCursor) { let a = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", o = i.empty ? i : je.cursor(i.head, i.head > i.anchor ? -1 : 1); for (let l of Ix.forRange(t, a, o)) n.push(l); @@ -8952,34 +8952,34 @@ const qOe = /* @__PURE__ */ DJ({ }, update(t, e) { t.transactions.some((n) => n.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"); - let r = IJ(t); - return r && sz(t.state, e), t.docChanged || t.selectionSet || r; + let r = BJ(t); + return r && oz(t.state, e), t.docChanged || t.selectionSet || r; }, mount(t, e) { - sz(e.state, t); + oz(e.state, t); }, class: "cm-cursorLayer" }); -function sz(t, e) { +function oz(t, e) { e.style.animationDuration = t.facet(m2).cursorBlinkRate + "ms"; } -const YOe = /* @__PURE__ */ DJ({ +const HOe = /* @__PURE__ */ NJ({ above: !1, markers(t) { return t.state.selection.ranges.map((e) => e.empty ? [] : Ix.forRange(t, "cm-selectionBackground", e)).reduce((e, r) => e.concat(r)); }, update(t, e) { - return t.docChanged || t.selectionSet || t.viewportChanged || IJ(t); + return t.docChanged || t.selectionSet || t.viewportChanged || BJ(t); }, class: "cm-selectionLayer" -}), p8 = { +}), v8 = { ".cm-line": { "& ::selection": { backgroundColor: "transparent !important" }, "&::selection": { backgroundColor: "transparent !important" } } }; -PJ && (p8[".cm-line"].caretColor = "transparent !important", p8[".cm-content"] = { caretColor: "transparent !important" }); -const WOe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ kt.theme(p8)), $J = /* @__PURE__ */ or.define({ +IJ && (v8[".cm-line"].caretColor = "transparent !important", v8[".cm-content"] = { caretColor: "transparent !important" }); +const ZOe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ kt.theme(v8)), FJ = /* @__PURE__ */ or.define({ map(t, e) { return t == null ? null : e.mapPos(t); } @@ -8988,9 +8988,9 @@ const WOe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ kt.theme(p8)), $J = /* @_ return null; }, update(t, e) { - return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is($J) ? n.value : r, t); + return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is(FJ) ? n.value : r, t); } -}), GOe = /* @__PURE__ */ hn.fromClass(class { +}), jOe = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }; } @@ -9020,7 +9020,7 @@ const WOe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ kt.theme(p8)), $J = /* @_ this.cursor && this.cursor.remove(); } setDropPos(t) { - this.view.state.field(iy) != t && this.view.dispatch({ effects: $J.of(t) }); + this.view.state.field(iy) != t && this.view.dispatch({ effects: FJ.of(t) }); } }, { eventObservers: { @@ -9038,17 +9038,17 @@ const WOe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ kt.theme(p8)), $J = /* @_ } } }); -function XOe() { - return [iy, GOe]; +function KOe() { + return [iy, jOe]; } -function az(t, e, r, n, i) { +function lz(t, e, r, n, i) { e.lastIndex = 0; for (let s = t.iterRange(r, n), a = r, o; !s.next().done; a += s.value.length) if (!s.lineBreak) for (; o = e.exec(s.value); ) i(a + o.index, o); } -function HOe(t, e) { +function JOe(t, e) { let r = t.visibleRanges; if (r.length == 1 && r[0].from == t.viewport.from && r[0].to == t.viewport.to) return r; @@ -9057,7 +9057,7 @@ function HOe(t, e) { i = Math.max(t.state.doc.lineAt(i).from, i - e), s = Math.min(t.state.doc.lineAt(s).to, s + e), n.length && n[n.length - 1].to >= i ? n[n.length - 1].to = s : n.push({ from: i, to: s }); return n; } -class ZOe { +class e4e { constructor(e) { const { regexp: r, decoration: n, decorate: i, boundary: s, maxLength: a = 1e3 } = e; if (!r.global) @@ -9077,8 +9077,8 @@ class ZOe { } createDeco(e) { let r = new os(), n = r.add.bind(r); - for (let { from: i, to: s } of HOe(e, this.maxLength)) - az(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); + for (let { from: i, to: s } of JOe(e, this.maxLength)) + lz(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); return r.finish(); } updateDeco(e, r) { @@ -9109,15 +9109,15 @@ class ZOe { for (this.regexp.lastIndex = h - l.from; (p = this.regexp.exec(l.text)) && p.index < f - l.from; ) this.addMatch(p, e, p.index + l.from, g); else - az(e.state.doc, this.regexp, h, f, (m, v) => this.addMatch(v, e, m, g)); + lz(e.state.doc, this.regexp, h, f, (m, v) => this.addMatch(v, e, m, g)); r = r.update({ filterFrom: h, filterTo: f, filter: (m, v) => m < h || v > f, add: d }); } } return r; } } -const g8 = /x/.unicode != null ? "gu" : "g", jOe = /* @__PURE__ */ new RegExp(`[\0-\b --\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, g8), KOe = { +const y8 = /x/.unicode != null ? "gu" : "g", t4e = /* @__PURE__ */ new RegExp(`[\0-\b +-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, y8), r4e = { 0: "null", 7: "bell", 8: "backspace", @@ -9140,46 +9140,46 @@ const g8 = /x/.unicode != null ? "gu" : "g", jOe = /* @__PURE__ */ new RegExp(`[ 65279: "zero width no-break space", 65532: "object replacement" }; -let w_ = null; -function JOe() { +let S_ = null; +function n4e() { var t; - if (w_ == null && typeof document < "u" && document.body) { + if (S_ == null && typeof document < "u" && document.body) { let e = document.body.style; - w_ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; + S_ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; } - return w_ || !1; + return S_ || !1; } const i5 = /* @__PURE__ */ $t.define({ combine(t) { - let e = pu(t, { + let e = gu(t, { render: null, - specialChars: jOe, + specialChars: t4e, addSpecialChars: null }); - return (e.replaceTabs = !JOe()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, g8)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, g8)), e; + return (e.replaceTabs = !n4e()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, y8)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, y8)), e; } }); -function BJ(t = {}) { - return [i5.of(t), e4e()]; +function zJ(t = {}) { + return [i5.of(t), i4e()]; } -let oz = null; -function e4e() { - return oz || (oz = hn.fromClass(class { +let cz = null; +function i4e() { + return cz || (cz = hn.fromClass(class { constructor(t) { this.view = t, this.decorations = It.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(i5)), this.decorations = this.decorator.createDeco(t); } makeDecorator(t) { - return new ZOe({ + return new e4e({ regexp: t.specialChars, decoration: (e, r, n) => { let { doc: i } = r.state, s = bs(e[0], 0); if (s == 9) { let a = i.lineAt(n), o = r.state.tabSize, l = tc(a.text, o, n - a.from); return It.replace({ - widget: new i4e((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) + widget: new l4e((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) }); } - return this.decorationCache[s] || (this.decorationCache[s] = It.replace({ widget: new n4e(t, s) })); + return this.decorationCache[s] || (this.decorationCache[s] = It.replace({ widget: new o4e(t, s) })); }, boundary: t.replaceTabs ? void 0 : /[^]/ }); @@ -9192,11 +9192,11 @@ function e4e() { decorations: (t) => t.decorations })); } -const t4e = "\u2022"; -function r4e(t) { - return t >= 32 ? t4e : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); +const s4e = "\u2022"; +function a4e(t) { + return t >= 32 ? s4e : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); } -class n4e extends uo { +class o4e extends uo { constructor(e, r) { super(), this.options = e, this.code = r; } @@ -9204,7 +9204,7 @@ class n4e extends uo { return e.code == this.code; } toDOM(e) { - let r = r4e(this.code), n = e.state.phrase("Control character") + " " + (KOe[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, n, r); + let r = a4e(this.code), n = e.state.phrase("Control character") + " " + (r4e[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, n, r); if (i) return i; let s = document.createElement("span"); @@ -9214,7 +9214,7 @@ class n4e extends uo { return !1; } } -class i4e extends uo { +class l4e extends uo { constructor(e) { super(), this.width = e; } @@ -9229,10 +9229,10 @@ class i4e extends uo { return !1; } } -function FJ() { - return a4e; +function QJ() { + return u4e; } -const s4e = /* @__PURE__ */ It.line({ class: "cm-activeLine" }), a4e = /* @__PURE__ */ hn.fromClass(class { +const c4e = /* @__PURE__ */ It.line({ class: "cm-activeLine" }), u4e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -9243,16 +9243,16 @@ const s4e = /* @__PURE__ */ It.line({ class: "cm-activeLine" }), a4e = /* @__PUR let e = -1, r = []; for (let n of t.state.selection.ranges) { let i = t.lineBlockAt(n.head); - i.from > e && (r.push(s4e.range(i.from)), e = i.from); + i.from > e && (r.push(c4e.range(i.from)), e = i.from); } return It.set(r); } }, { decorations: (t) => t.decorations -}), m8 = 2e3; -function o4e(t, e, r) { +}), b8 = 2e3; +function h4e(t, e, r) { let n = Math.min(e.line, r.line), i = Math.max(e.line, r.line), s = []; - if (e.off > m8 || r.off > m8 || e.col < 0 || r.col < 0) { + if (e.off > b8 || r.off > b8 || e.col < 0 || r.col < 0) { let a = Math.min(e.off, r.off), o = Math.max(e.off, r.off); for (let l = n; l <= i; l++) { let u = t.doc.line(l); @@ -9261,27 +9261,27 @@ function o4e(t, e, r) { } else { let a = Math.min(e.col, r.col), o = Math.max(e.col, r.col); for (let l = n; l <= i; l++) { - let u = t.doc.line(l), h = X7(u.text, a, t.tabSize, !0); + let u = t.doc.line(l), h = j7(u.text, a, t.tabSize, !0); if (h < 0) s.push(je.cursor(u.to)); else { - let f = X7(u.text, o, t.tabSize); + let f = j7(u.text, o, t.tabSize); s.push(je.range(u.from + h, u.from + f)); } } } return s; } -function l4e(t, e) { +function f4e(t, e) { let r = t.coordsAtPos(t.viewport.from); return r ? Math.round(Math.abs((r.left - e) / t.defaultCharacterWidth)) : -1; } -function lz(t, e) { - let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), n = t.state.doc.lineAt(r), i = r - n.from, s = i > m8 ? -1 : i == n.length ? l4e(t, e.clientX) : tc(n.text, t.state.tabSize, r - n.from); +function uz(t, e) { + let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), n = t.state.doc.lineAt(r), i = r - n.from, s = i > b8 ? -1 : i == n.length ? f4e(t, e.clientX) : tc(n.text, t.state.tabSize, r - n.from); return { line: n.number, col: s, off: i }; } -function c4e(t, e) { - let r = lz(t, e), n = t.state.selection; +function d4e(t, e) { + let r = uz(t, e), n = t.state.selection; return r ? { update(i) { if (i.docChanged) { @@ -9290,26 +9290,26 @@ function c4e(t, e) { } }, get(i, s, a) { - let o = lz(t, i); + let o = uz(t, i); if (!o) return n; - let l = o4e(t.state, r, o); + let l = h4e(t.state, r, o); return l.length ? a ? je.create(l.concat(n.ranges)) : je.create(l) : n; } } : null; } -function u4e(t) { +function p4e(t) { let e = (t == null ? void 0 : t.eventFilter) || ((r) => r.altKey && r.button == 0); - return kt.mouseSelectionStyle.of((r, n) => e(n) ? c4e(r, n) : null); + return kt.mouseSelectionStyle.of((r, n) => e(n) ? d4e(r, n) : null); } -const h4e = { +const g4e = { Alt: [18, (t) => !!t.altKey], Control: [17, (t) => !!t.ctrlKey], Shift: [16, (t) => !!t.shiftKey], Meta: [91, (t) => !!t.metaKey] -}, f4e = { style: "cursor: crosshair" }; -function d4e(t = {}) { - let [e, r] = h4e[t.key || "Alt"], n = hn.fromClass(class { +}, m4e = { style: "cursor: crosshair" }; +function v4e(t = {}) { + let [e, r] = g4e[t.key || "Alt"], n = hn.fromClass(class { constructor(i) { this.view = i, this.isDown = !1; } @@ -9333,12 +9333,12 @@ function d4e(t = {}) { n, kt.contentAttributes.of((i) => { var s; - return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? f4e : null; + return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? m4e : null; }) ]; } const mv = "-10000px"; -class zJ { +class UJ { constructor(e, r, n) { this.facet = r, this.createTooltipView = n, this.input = e.state.facet(r), this.tooltips = this.input.filter((i) => i), this.tooltipViews = this.tooltips.map(n); } @@ -9371,24 +9371,24 @@ class zJ { return r && (o.forEach((l, u) => r[u] = l), r.length = o.length), this.input = i, this.tooltips = s, this.tooltipViews = a, !0; } } -function p4e(t) { +function y4e(t) { let { win: e } = t; return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth }; } -const O_ = /* @__PURE__ */ $t.define({ +const T_ = /* @__PURE__ */ $t.define({ combine: (t) => { var e, r, n; return { position: Vt.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed", parent: ((r = t.find((i) => i.parent)) === null || r === void 0 ? void 0 : r.parent) || null, - tooltipSpace: ((n = t.find((i) => i.tooltipSpace)) === null || n === void 0 ? void 0 : n.tooltipSpace) || p4e + tooltipSpace: ((n = t.find((i) => i.tooltipSpace)) === null || n === void 0 ? void 0 : n.tooltipSpace) || y4e }; } -}), cz = /* @__PURE__ */ new WeakMap(), KM = /* @__PURE__ */ hn.fromClass(class { +}), hz = /* @__PURE__ */ new WeakMap(), eD = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1; - let e = t.state.facet(O_); - this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.manager = new zJ(t, JM, (r) => this.createTooltip(r)), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((r) => { + let e = t.state.facet(T_); + this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.manager = new UJ(t, tD, (r) => this.createTooltip(r)), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((r) => { Date.now() > this.lastTransaction - 50 && r.length > 0 && r[r.length - 1].intersectionRatio < 1 && this.measureSoon(); }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure(); } @@ -9411,7 +9411,7 @@ const O_ = /* @__PURE__ */ $t.define({ t.transactions.length && (this.lastTransaction = Date.now()); let e = this.manager.update(t, this.above); e && this.observeIntersection(); - let r = e || t.geometryChanged, n = t.state.facet(O_); + let r = e || t.geometryChanged, n = t.state.facet(T_); if (n.position != this.position && !this.madeAbsolute) { this.position = n.position; for (let i of this.manager.tooltipViews) @@ -9467,7 +9467,7 @@ const O_ = /* @__PURE__ */ $t.define({ return a.getCoords ? a.getCoords(i.pos) : this.view.coordsAtPos(i.pos); }), size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()), - space: this.view.state.facet(O_).tooltipSpace(this.view), + space: this.view.state.facet(T_).tooltipSpace(this.view), scaleX: e, scaleY: r, makeAbsolute: n @@ -9487,7 +9487,7 @@ const O_ = /* @__PURE__ */ $t.define({ h.style.top = mv; continue; } - let p = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = p ? 7 : 0, m = d.right - d.left, v = (e = cz.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || m4e, b = this.view.textDirection == Wn.LTR, w = d.width > n.right - n.left ? b ? n.left : n.right - d.width : b ? Math.min(f.left - (p ? 14 : 0) + y.x, n.right - m) : Math.max(n.left, f.left - m + (p ? 14 : 0) - y.x), O = this.above[o]; + let p = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = p ? 7 : 0, m = d.right - d.left, v = (e = hz.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || x4e, b = this.view.textDirection == Wn.LTR, w = d.width > n.right - n.left ? b ? n.left : n.right - d.width : b ? Math.min(f.left - (p ? 14 : 0) + y.x, n.right - m) : Math.max(n.left, f.left - m + (p ? 14 : 0) - y.x), O = this.above[o]; !l.strictSide && (O ? f.top - (d.bottom - d.top) - y.y < n.top : f.bottom + (d.bottom - d.top) + y.y > n.bottom) && O == n.bottom - f.bottom > f.top - n.top && (O = this.above[o] = !O); let S = (O ? f.top - n.top : n.bottom - f.bottom) - g; if (S < v && u.resize !== !1) { @@ -9495,7 +9495,7 @@ const O_ = /* @__PURE__ */ $t.define({ h.style.top = mv; continue; } - cz.set(u, v), h.style.height = (v = S) / s + "px"; + hz.set(u, v), h.style.height = (v = S) / s + "px"; } else h.style.height && (h.style.height = ""); let C = O ? f.top - v - g - y.y : f.bottom + g + y.y, T = w + m; @@ -9520,7 +9520,7 @@ const O_ = /* @__PURE__ */ $t.define({ this.maybeMeasure(); } } -}), g4e = /* @__PURE__ */ kt.baseTheme({ +}), b4e = /* @__PURE__ */ kt.baseTheme({ ".cm-tooltip": { zIndex: 100, boxSizing: "border-box" @@ -9581,15 +9581,15 @@ const O_ = /* @__PURE__ */ $t.define({ borderBottomColor: "transparent" } } -}), m4e = { x: 0, y: 0 }, JM = /* @__PURE__ */ $t.define({ - enables: [KM, g4e] +}), x4e = { x: 0, y: 0 }, tD = /* @__PURE__ */ $t.define({ + enables: [eD, b4e] }), yk = /* @__PURE__ */ $t.define(); -class NT { +class IT { static create(e) { - return new NT(e); + return new IT(e); } constructor(e) { - this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new zJ(e, yk, (r) => this.createHostedView(r)); + this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new UJ(e, yk, (r) => this.createHostedView(r)); } createHostedView(e) { let r = e.create(this.view); @@ -9638,7 +9638,7 @@ class NT { return this.passProp("resize"); } } -const v4e = /* @__PURE__ */ JM.compute([yk], (t) => { +const w4e = /* @__PURE__ */ tD.compute([yk], (t) => { let e = t.facet(yk).filter((r) => r); return e.length === 0 ? null : { pos: Math.min(...e.map((r) => r.pos)), @@ -9646,12 +9646,12 @@ const v4e = /* @__PURE__ */ JM.compute([yk], (t) => { var n; return (n = r.end) !== null && n !== void 0 ? n : r.pos; })), - create: NT.create, + create: IT.create, above: e[0].above, arrow: e.some((r) => r.arrow) }; }); -class y4e { +class O4e { constructor(e, r, n, i, s) { this.view = e, this.source = r, this.field = n, this.setHover = i, this.hoverTime = s, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this)); } @@ -9673,7 +9673,7 @@ class y4e { if (!n) return; let i, s = 1; - if (n instanceof lf) + if (n instanceof cf) i = n.posAtStart; else { if (i = e.posAtCoords(r), i == null) @@ -9694,16 +9694,16 @@ class y4e { a && e.dispatch({ effects: this.setHover.of(a) }); } get tooltip() { - let e = this.view.plugin(KM), r = e ? e.manager.tooltips.findIndex((n) => n.create == NT.create) : -1; + let e = this.view.plugin(eD), r = e ? e.manager.tooltips.findIndex((n) => n.create == IT.create) : -1; return r > -1 ? e.manager.tooltipViews[r] : null; } mousemove(e) { var r; this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime)); let { active: n, tooltip: i } = this; - if (n && i && !b4e(i.dom, e) || this.pending) { + if (n && i && !k4e(i.dom, e) || this.pending) { let { pos: s } = n || this.pending, a = (r = n == null ? void 0 : n.end) !== null && r !== void 0 ? r : s; - (s == a ? this.view.posAtCoords(this.lastMove) != s : !x4e(this.view, s, a, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of(null) }), this.pending = null); + (s == a ? this.view.posAtCoords(this.lastMove) != s : !S4e(this.view, s, a, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of(null) }), this.pending = null); } } mouseleave(e) { @@ -9725,18 +9725,18 @@ class y4e { } } const gO = 4; -function b4e(t, e) { +function k4e(t, e) { let r = t.getBoundingClientRect(); return e.clientX >= r.left - gO && e.clientX <= r.right + gO && e.clientY >= r.top - gO && e.clientY <= r.bottom + gO; } -function x4e(t, e, r, n, i, s) { +function S4e(t, e, r, n, i, s) { let a = t.scrollDOM.getBoundingClientRect(), o = t.documentTop + t.documentPadding.top + t.contentHeight; if (a.left > n || a.right < n || a.top > i || Math.min(a.bottom, o) < i) return !1; let l = t.posAtCoords({ x: n, y: i }, !1); return l >= e && l <= r; } -function w4e(t, e = {}) { +function T4e(t, e = {}) { let r = or.define(), n = Xn.define({ create() { return null; @@ -9752,25 +9752,25 @@ function w4e(t, e = {}) { o.pos = a, i.end != null && (o.end = s.changes.mapPos(i.end)), i = o; } for (let a of s.effects) - a.is(r) && (i = a.value), a.is(O4e) && (i = null); + a.is(r) && (i = a.value), a.is(C4e) && (i = null); return i; }, provide: (i) => yk.from(i) }); return [ n, - hn.define((i) => new y4e(i, t, n, r, e.hoverTime || 300)), - v4e + hn.define((i) => new O4e(i, t, n, r, e.hoverTime || 300)), + w4e ]; } -function QJ(t, e) { - let r = t.plugin(KM); +function VJ(t, e) { + let r = t.plugin(eD); if (!r) return null; let n = r.manager.tooltips.indexOf(e); return n < 0 ? null : r.manager.tooltipViews[n]; } -const O4e = /* @__PURE__ */ or.define(), uz = /* @__PURE__ */ $t.define({ +const C4e = /* @__PURE__ */ or.define(), fz = /* @__PURE__ */ $t.define({ combine(t) { let e, r; for (let n of t) @@ -9779,19 +9779,19 @@ const O4e = /* @__PURE__ */ or.define(), uz = /* @__PURE__ */ $t.define({ } }); function v2(t, e) { - let r = t.plugin(UJ), n = r ? r.specs.indexOf(e) : -1; + let r = t.plugin(qJ), n = r ? r.specs.indexOf(e) : -1; return n > -1 ? r.panels[n] : null; } -const UJ = /* @__PURE__ */ hn.fromClass(class { +const qJ = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.input = t.state.facet(y2), this.specs = this.input.filter((r) => r), this.panels = this.specs.map((r) => r(t)); - let e = t.state.facet(uz); + let e = t.state.facet(fz); this.top = new mO(t, !0, e.topContainer), this.bottom = new mO(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((r) => r.top)), this.bottom.sync(this.panels.filter((r) => !r.top)); for (let r of this.panels) r.dom.classList.add("cm-panel"), r.mount && r.mount(); } update(t) { - let e = t.state.facet(uz); + let e = t.state.facet(fz); this.top.container != e.topContainer && (this.top.sync([]), this.top = new mO(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new mO(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses(); let r = t.state.facet(y2); if (r != this.input) { @@ -9839,12 +9839,12 @@ class mO { for (let r of this.panels) if (r.dom.parentNode == this.dom) { for (; e != r.dom; ) - e = hz(e); + e = dz(e); e = e.nextSibling; } else this.dom.insertBefore(r.dom, e); for (; e; ) - e = hz(e); + e = dz(e); } scrollMargin() { return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top); @@ -9858,14 +9858,14 @@ class mO { } } } -function hz(t) { +function dz(t) { let e = t.nextSibling; return t.remove(), e; } const y2 = /* @__PURE__ */ $t.define({ - enables: UJ + enables: qJ }); -class ul extends _0 { +class ul extends A0 { compare(e) { return this == e || this.constructor == e.constructor && this.eq(e); } @@ -9880,7 +9880,7 @@ ul.prototype.toDOM = void 0; ul.prototype.mapMode = Fi.TrackBefore; ul.prototype.startSide = ul.prototype.endSide = -1; ul.prototype.point = !0; -const s5 = /* @__PURE__ */ $t.define(), k4e = { +const s5 = /* @__PURE__ */ $t.define(), E4e = { class: "", renderEmptyElements: !1, elementStyle: "", @@ -9892,42 +9892,42 @@ const s5 = /* @__PURE__ */ $t.define(), k4e = { updateSpacer: null, domEventHandlers: {} }, Ny = /* @__PURE__ */ $t.define(); -function IT(t) { - return [VJ(), Ny.of(Object.assign(Object.assign({}, k4e), t))]; +function $T(t) { + return [YJ(), Ny.of(Object.assign(Object.assign({}, E4e), t))]; } -const v8 = /* @__PURE__ */ $t.define({ +const x8 = /* @__PURE__ */ $t.define({ combine: (t) => t.some((e) => e) }); -function VJ(t) { +function YJ(t) { let e = [ - S4e + _4e ]; - return t && t.fixed === !1 && e.push(v8.of(!0)), e; + return t && t.fixed === !1 && e.push(x8.of(!0)), e; } -const S4e = /* @__PURE__ */ hn.fromClass(class { +const _4e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { - this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Ny).map((e) => new dz(t, e)); + this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Ny).map((e) => new gz(t, e)); for (let e of this.gutters) this.dom.appendChild(e.dom); - this.fixed = !t.state.facet(v8), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM); + this.fixed = !t.state.facet(x8), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM); } update(t) { if (this.updateGutters(t)) { let e = this.prevViewport, r = t.view.viewport, n = Math.min(e.to, r.to) - Math.max(e.from, r.from); this.syncGutters(n < (r.to - r.from) * 0.8); } - t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight + "px"), this.view.state.facet(v8) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport; + t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight + "px"), this.view.state.facet(x8) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport; } syncGutters(t) { let e = this.dom.nextSibling; t && this.dom.remove(); - let r = $r.iter(this.view.state.facet(s5), this.view.viewport.from), n = [], i = this.gutters.map((s) => new T4e(s, this.view.viewport, -this.view.documentPadding.top)); + let r = $r.iter(this.view.state.facet(s5), this.view.viewport.from), n = [], i = this.gutters.map((s) => new A4e(s, this.view.viewport, -this.view.documentPadding.top)); for (let s of this.view.viewportLineBlocks) if (n.length && (n = []), Array.isArray(s.type)) { let a = !0; for (let o of s.type) if (o.type == Ca.Text && a) { - y8(r, n, o.from); + w8(r, n, o.from); for (let l of i) l.line(this.view, o, n); a = !1; @@ -9935,7 +9935,7 @@ const S4e = /* @__PURE__ */ hn.fromClass(class { for (let l of i) l.widget(this.view, o); } else if (s.type == Ca.Text) { - y8(r, n, s.from); + w8(r, n, s.from); for (let a of i) a.line(this.view, s, n); } else if (s.widget) @@ -9955,7 +9955,7 @@ const S4e = /* @__PURE__ */ hn.fromClass(class { let i = []; for (let s of r) { let a = e.indexOf(s); - a < 0 ? i.push(new dz(this.view, s)) : (this.gutters[a].update(t), i.push(this.gutters[a])); + a < 0 ? i.push(new gz(this.view, s)) : (this.gutters[a].update(t), i.push(this.gutters[a])); } for (let s of this.gutters) s.dom.remove(), i.indexOf(s) < 0 && s.destroy(); @@ -9976,21 +9976,21 @@ const S4e = /* @__PURE__ */ hn.fromClass(class { return !r || r.gutters.length == 0 || !r.fixed ? null : e.textDirection == Wn.LTR ? { left: r.dom.offsetWidth * e.scaleX } : { right: r.dom.offsetWidth * e.scaleX }; }) }); -function fz(t) { +function pz(t) { return Array.isArray(t) ? t : [t]; } -function y8(t, e, r) { +function w8(t, e, r) { for (; t.value && t.from <= r; ) t.from == r && e.push(t.value), t.next(); } -class T4e { +class A4e { constructor(e, r, n) { this.gutter = e, this.height = n, this.i = 0, this.cursor = $r.iter(e.markers, r.from); } addElement(e, r, n) { let { gutter: i } = this, s = (r.top - this.height) / e.scaleY, a = r.height / e.scaleY; if (this.i == i.elements.length) { - let o = new qJ(e, a, s, n); + let o = new WJ(e, a, s, n); i.elements.push(o), i.dom.appendChild(o.dom); } else i.elements[this.i].update(e, a, s, n); @@ -9998,7 +9998,7 @@ class T4e { } line(e, r, n) { let i = []; - y8(this.cursor, i, r.from), n.length && (i = i.concat(n)); + w8(this.cursor, i, r.from), n.length && (i = i.concat(n)); let s = this.gutter.config.lineMarker(e, r, i); s && i.unshift(s); let a = this.gutter; @@ -10016,7 +10016,7 @@ class T4e { } } } -class dz { +class gz { constructor(e, r) { this.view = e, this.config = r, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : ""); for (let n in r.domEventHandlers) @@ -10032,11 +10032,11 @@ class dz { let o = e.lineBlockAtHeight(a - e.documentTop); r.domEventHandlers[n](e, o, i) && i.preventDefault(); }); - this.markers = fz(r.markers(e)), r.initialSpacer && (this.spacer = new qJ(e, 0, 0, [r.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); + this.markers = pz(r.markers(e)), r.initialSpacer && (this.spacer = new WJ(e, 0, 0, [r.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); } update(e) { let r = this.markers; - if (this.markers = fz(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) { + if (this.markers = pz(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) { let i = this.config.updateSpacer(this.spacer.markers[0], e); i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]); } @@ -10048,12 +10048,12 @@ class dz { e.destroy(); } } -class qJ { +class WJ { constructor(e, r, n, i) { this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, r, n, i); } update(e, r, n, i) { - this.height != r && (this.height = r, this.dom.style.height = r + "px"), this.above != n && (this.dom.style.marginTop = (this.above = n) ? n + "px" : ""), C4e(this.markers, i) || this.setMarkers(e, i); + this.height != r && (this.height = r, this.dom.style.height = r + "px"), this.above != n && (this.dom.style.marginTop = (this.above = n) ? n + "px" : ""), L4e(this.markers, i) || this.setMarkers(e, i); } setMarkers(e, r) { let n = "cm-gutterElement", i = this.dom.firstChild; @@ -10087,7 +10087,7 @@ class qJ { this.setMarkers(null, []); } } -function C4e(t, e) { +function L4e(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -10095,9 +10095,9 @@ function C4e(t, e) { return !1; return !0; } -const E4e = /* @__PURE__ */ $t.define(), fg = /* @__PURE__ */ $t.define({ +const R4e = /* @__PURE__ */ $t.define(), dg = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { formatNumber: String, domEventHandlers: {} }, { + return gu(t, { formatNumber: String, domEventHandlers: {} }, { domEventHandlers(e, r) { let n = Object.assign({}, e); for (let i in r) { @@ -10109,7 +10109,7 @@ const E4e = /* @__PURE__ */ $t.define(), fg = /* @__PURE__ */ $t.define({ }); } }); -class k_ extends ul { +class C_ extends ul { constructor(e) { super(), this.number = e; } @@ -10120,59 +10120,59 @@ class k_ extends ul { return document.createTextNode(this.number); } } -function S_(t, e) { - return t.state.facet(fg).formatNumber(e, t.state); +function E_(t, e) { + return t.state.facet(dg).formatNumber(e, t.state); } -const _4e = /* @__PURE__ */ Ny.compute([fg], (t) => ({ +const M4e = /* @__PURE__ */ Ny.compute([dg], (t) => ({ class: "cm-lineNumbers", renderEmptyElements: !1, markers(e) { - return e.state.facet(E4e); + return e.state.facet(R4e); }, lineMarker(e, r, n) { - return n.some((i) => i.toDOM) ? null : new k_(S_(e, e.state.doc.lineAt(r.from).number)); + return n.some((i) => i.toDOM) ? null : new C_(E_(e, e.state.doc.lineAt(r.from).number)); }, widgetMarker: () => null, - lineMarkerChange: (e) => e.startState.facet(fg) != e.state.facet(fg), + lineMarkerChange: (e) => e.startState.facet(dg) != e.state.facet(dg), initialSpacer(e) { - return new k_(S_(e, pz(e.state.doc.lines))); + return new C_(E_(e, mz(e.state.doc.lines))); }, updateSpacer(e, r) { - let n = S_(r.view, pz(r.view.state.doc.lines)); - return n == e.number ? e : new k_(n); + let n = E_(r.view, mz(r.view.state.doc.lines)); + return n == e.number ? e : new C_(n); }, - domEventHandlers: t.facet(fg).domEventHandlers + domEventHandlers: t.facet(dg).domEventHandlers })); -function A4e(t = {}) { +function D4e(t = {}) { return [ - fg.of(t), - VJ(), - _4e + dg.of(t), + YJ(), + M4e ]; } -function pz(t) { +function mz(t) { let e = 9; for (; e < t; ) e = e * 10 + 9; return e; } -const L4e = /* @__PURE__ */ new class extends ul { +const P4e = /* @__PURE__ */ new class extends ul { constructor() { super(...arguments), this.elementClass = "cm-activeLineGutter"; } -}(), R4e = /* @__PURE__ */ s5.compute(["selection"], (t) => { +}(), N4e = /* @__PURE__ */ s5.compute(["selection"], (t) => { let e = [], r = -1; for (let n of t.selection.ranges) { let i = t.doc.lineAt(n.head).from; - i > r && (r = i, e.push(L4e.range(i))); + i > r && (r = i, e.push(P4e.range(i))); } return $r.of(e); }); -function M4e() { - return R4e; +function I4e() { + return N4e; } -const YJ = 1024; -let D4e = 0; +const GJ = 1024; +let $4e = 0; class Jo { constructor(e, r) { this.from = e, this.to = r; @@ -10180,7 +10180,7 @@ class Jo { } class yr { constructor(e = {}) { - this.id = D4e++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { + this.id = $4e++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { throw new Error("This node type doesn't define a deserialize function"); }); } @@ -10212,13 +10212,13 @@ class b2 { return e && e.props && e.props[yr.mounted.id]; } } -const P4e = /* @__PURE__ */ Object.create(null); +const B4e = /* @__PURE__ */ Object.create(null); class Yi { constructor(e, r, n, i = 0) { this.name = e, this.props = r, this.id = n, this.flags = i; } static define(e) { - let r = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : P4e, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Yi(e.name || "", r, e.id, n); + let r = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : B4e, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Yi(e.name || "", r, e.id, n); if (e.props) { for (let s of e.props) if (Array.isArray(s) || (s = s(i)), s) { @@ -10288,7 +10288,7 @@ class $x { return new $x(r); } } -const vO = /* @__PURE__ */ new WeakMap(), gz = /* @__PURE__ */ new WeakMap(); +const vO = /* @__PURE__ */ new WeakMap(), vz = /* @__PURE__ */ new WeakMap(); var Sn; (function(t) { t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays"; @@ -10327,11 +10327,11 @@ class nn { return vO.set(this, n), n; } resolveInner(e, r = 0) { - let n = x2(gz.get(this) || this.topNode, e, r, !0); - return gz.set(this, n), n; + let n = x2(vz.get(this) || this.topNode, e, r, !0); + return vz.set(this, n), n; } resolveStack(e, r = 0) { - return $4e(this, e, r); + return Q4e(this, e, r); } iterate(e) { let { enter: r, leave: n, from: i = 0, to: s = this.length } = e, a = e.mode || 0, o = (a & Sn.IncludeAnonymous) > 0; @@ -10360,14 +10360,14 @@ class nn { return e; } balance(e = {}) { - return this.children.length <= 8 ? this : rD(Yi.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new nn(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new nn(Yi.none, r, n, i))); + return this.children.length <= 8 ? this : iD(Yi.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new nn(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new nn(Yi.none, r, n, i))); } static build(e) { - return B4e(e); + return U4e(e); } } nn.empty = new nn(Yi.none, [], [], 0); -class eD { +class rD { constructor(e, r) { this.buffer = e, this.index = r; } @@ -10390,10 +10390,10 @@ class eD { this.index -= 4; } fork() { - return new eD(this.buffer, this.index); + return new rD(this.buffer, this.index); } } -class Nf { +class If { constructor(e, r, n) { this.buffer = e, this.length = r, this.set = n; } @@ -10417,7 +10417,7 @@ class Nf { } findChild(e, r, n, i, s) { let { buffer: a } = this, o = -1; - for (let l = e; l != r && !(WJ(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) + for (let l = e; l != r && !(XJ(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) ; return o; } @@ -10428,10 +10428,10 @@ class Nf { let u = s[l++] = i[o++] - n; s[l++] = i[o++] - e, a = Math.max(a, u); } - return new Nf(s, a, this.set); + return new If(s, a, this.set); } } -function WJ(t, e, r, n) { +function XJ(t, e, r, n) { switch (t) { case -2: return r < e; @@ -10465,16 +10465,16 @@ function x2(t, e, r, n) { t = a; } } -class GJ { +class HJ { cursor(e = 0) { return new bk(this, e); } getChild(e, r = null, n = null) { - let i = mz(this, e, r, n); + let i = yz(this, e, r, n); return i.length ? i[0] : null; } getChildren(e, r = null, n = null) { - return mz(this, e, r, n); + return yz(this, e, r, n); } resolve(e, r = 0) { return x2(this, e, r, !1); @@ -10483,7 +10483,7 @@ class GJ { return x2(this, e, r, !0); } matchContext(e) { - return b8(this.parent, e); + return O8(this.parent, e); } enterUnfinishedNodesBefore(e) { let r = this.childBefore(e), n = this; @@ -10502,7 +10502,7 @@ class GJ { return this.parent; } } -class ea extends GJ { +class ea extends HJ { constructor(e, r, n, i) { super(), this._tree = e, this.from = r, this.index = n, this._parent = i; } @@ -10519,14 +10519,14 @@ class ea extends GJ { for (let a = this; ; ) { for (let { children: o, positions: l } = a._tree, u = r > 0 ? o.length : -1; e != u; e += r) { let h = o[e], f = l[e] + a.from; - if (!!WJ(i, n, f, f + h.length)) { - if (h instanceof Nf) { + if (!!XJ(i, n, f, f + h.length)) { + if (h instanceof If) { if (s & Sn.ExcludeBuffers) continue; let d = h.findChild(0, h.buffer.length, r, n - f, i); if (d > -1) - return new Fc(new N4e(a, h, e, f), null, d); - } else if (s & Sn.IncludeAnonymous || !h.type.isAnonymous || tD(h)) { + return new Fc(new F4e(a, h, e, f), null, d); + } else if (s & Sn.IncludeAnonymous || !h.type.isAnonymous || nD(h)) { let d; if (!(s & Sn.IgnoreMounts) && (d = b2.get(h)) && !d.overlay) return new ea(d.tree, f, e, a); @@ -10586,7 +10586,7 @@ class ea extends GJ { return this._tree.toString(); } } -function mz(t, e, r, n) { +function yz(t, e, r, n) { let i = t.cursor(), s = []; if (!i.firstChild()) return s; @@ -10602,7 +10602,7 @@ function mz(t, e, r, n) { return n == null ? s : []; } } -function b8(t, e, r = e.length - 1) { +function O8(t, e, r = e.length - 1) { for (let n = t; r >= 0; n = n.parent) { if (!n) return !1; @@ -10614,12 +10614,12 @@ function b8(t, e, r = e.length - 1) { } return !0; } -class N4e { +class F4e { constructor(e, r, n, i) { this.parent = e, this.buffer = r, this.index = n, this.start = i; } } -class Fc extends GJ { +class Fc extends HJ { get name() { return this.type.name; } @@ -10683,7 +10683,7 @@ class Fc extends GJ { return this.context.buffer.childString(this.index); } } -function XJ(t) { +function ZJ(t) { if (!t.length) return null; let e = 0, r = t[0]; @@ -10692,17 +10692,17 @@ function XJ(t) { (a.from > r.from || a.to < r.to) && (r = a, e = s); } let n = r instanceof ea && r.index < 0 ? null : r.parent, i = t.slice(); - return n ? i[e] = n : i.splice(e, 1), new I4e(i, r); + return n ? i[e] = n : i.splice(e, 1), new z4e(i, r); } -class I4e { +class z4e { constructor(e, r) { this.heads = e, this.node = r; } get next() { - return XJ(this.heads); + return ZJ(this.heads); } } -function $4e(t, e, r) { +function Q4e(t, e, r) { let n = t.resolveInner(e, r), i = null; for (let s = n instanceof ea ? n : n.context.parent; s; s = s.parent) if (s.index < 0) { @@ -10715,7 +10715,7 @@ function $4e(t, e, r) { (i || (i = [n])).push(x2(o, e, r, !1)); } } - return i ? XJ(i) : n; + return i ? ZJ(i) : n; } class bk { get name() { @@ -10812,7 +10812,7 @@ class bk { if (r > -1) for (let s = r + e, a = e < 0 ? -1 : n._tree.children.length; s != a; s += e) { let o = n._tree.children[s]; - if (this.mode & Sn.IncludeAnonymous || o instanceof Nf || !o.type.isAnonymous || tD(o)) + if (this.mode & Sn.IncludeAnonymous || o instanceof If || !o.type.isAnonymous || nD(o)) return !1; } return !0; @@ -10885,11 +10885,11 @@ class bk { } matchContext(e) { if (!this.buffer) - return b8(this.node.parent, e); + return O8(this.node.parent, e); let { buffer: r } = this.buffer, { types: n } = r.set; for (let i = e.length - 1, s = this.stack.length - 1; i >= 0; s--) { if (s < 0) - return b8(this._tree, e, i); + return O8(this._tree, e, i); let a = n[r.buffer[this.stack[s]]]; if (!a.isAnonymous) { if (e[i] && e[i] != a.name) @@ -10900,12 +10900,12 @@ class bk { return !0; } } -function tD(t) { - return t.children.some((e) => e instanceof Nf || !e.type.isAnonymous || tD(e)); +function nD(t) { + return t.children.some((e) => e instanceof If || !e.type.isAnonymous || nD(e)); } -function B4e(t) { +function U4e(t) { var e; - let { buffer: r, nodeSet: n, maxBufferLength: i = YJ, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new eD(r, r.length) : r, l = n.types, u = 0, h = 0; + let { buffer: r, nodeSet: n, maxBufferLength: i = GJ, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new rD(r, r.length) : r, l = n.types, u = 0, h = 0; function f(S, C, T, A, E, R) { let { id: _, start: L, end: $, size: k } = o, N = h, M = u; for (; k < 0; ) @@ -10926,7 +10926,7 @@ function B4e(t) { let B = new Uint16Array(I.size - I.skip), Q = o.pos - I.size, q = B.length; for (; o.pos > Q; ) q = y(I.start, B, q); - P = new Nf(B, $ - I.start, n), F = I.start - S; + P = new If(B, $ - I.start, n), F = I.start - S; } else { let B = o.pos - k; o.next(); @@ -10935,7 +10935,7 @@ function B4e(t) { W >= 0 && o.id == W && o.size >= 0 ? (o.end <= Y - i && (g(Q, q, L, ee, o.end, Y, W, N, M), ee = Q.length, Y = o.end), o.next()) : R > 2500 ? d(L, B, Q, q) : f(L, B, Q, q, W, R + 1); if (W >= 0 && ee > 0 && ee < Q.length && g(Q, q, L, ee, L, Y, W, N, M), Q.reverse(), q.reverse(), W > -1 && ee > 0) { let re = p(D, M); - P = rD(D, Q, q, 0, Q.length, 0, $ - L, re, re); + P = iD(D, Q, q, 0, Q.length, 0, $ - L, re, re); } else P = m(D, Q, q, $ - L, N - $, M); } @@ -10957,7 +10957,7 @@ function B4e(t) { let L = new Uint16Array(R * 4), $ = E[E.length - 2]; for (let k = E.length - 3, N = 0; k >= 0; k -= 3) L[N++] = E[k], L[N++] = E[k + 1] - $, L[N++] = E[k + 2] - $, L[N++] = N; - T.push(new Nf(L, E[2] - $, n)), A.push($ - S); + T.push(new If(L, E[2] - $, n)), A.push($ - S); } } function p(S, C) { @@ -11035,11 +11035,11 @@ function B4e(t) { let O = (e = t.length) !== null && e !== void 0 ? e : b.length ? w[0] + b[0].length : 0; return new nn(l[t.topID], b.reverse(), w.reverse(), O); } -const vz = /* @__PURE__ */ new WeakMap(); +const bz = /* @__PURE__ */ new WeakMap(); function a5(t, e) { - if (!t.isAnonymous || e instanceof Nf || e.type != t) + if (!t.isAnonymous || e instanceof If || e.type != t) return 1; - let r = vz.get(e); + let r = bz.get(e); if (r == null) { r = 1; for (let n of e.children) { @@ -11049,11 +11049,11 @@ function a5(t, e) { } r += a5(t, n); } - vz.set(e, r); + bz.set(e, r); } return r; } -function rD(t, e, r, n, i, s, a, o, l) { +function iD(t, e, r, n, i, s, a, o, l) { let u = 0; for (let g = n; g < i; g++) u += a5(t, e[g]); @@ -11076,14 +11076,14 @@ function rD(t, e, r, n, i, s, a, o, l) { f.push(g[O]); } else { let T = m[w - 1] + g[w - 1].length - S; - f.push(rD(t, g, m, O, w, S, T, null, l)); + f.push(iD(t, g, m, O, w, S, T, null, l)); } d.push(S + b - s); } } return p(e, r, n, i, 0), (o || l)(f, d, a); } -class HJ { +class jJ { constructor() { this.map = /* @__PURE__ */ new WeakMap(); } @@ -11108,7 +11108,7 @@ class HJ { return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree); } } -class ju { +class Ku { constructor(e, r, n, i, s = !1, a = !1) { this.from = e, this.to = r, this.tree = n, this.offset = i, this.open = (s ? 1 : 0) | (a ? 2 : 0); } @@ -11119,7 +11119,7 @@ class ju { return (this.open & 2) > 0; } static addTree(e, r = [], n = !1) { - let i = [new ju(0, e.length, e, 0, !1, n)]; + let i = [new Ku(0, e.length, e, 0, !1, n)]; for (let s of r) s.to > e.length && i.push(s); return i; @@ -11135,7 +11135,7 @@ class ju { let d = a; if (l >= d.from || f <= d.to || u) { let p = Math.max(d.from, l) - u, g = Math.min(d.to, f) - u; - d = p >= g ? null : new ju(p, g, d.tree, d.offset + u, o > 0, !!h); + d = p >= g ? null : new Ku(p, g, d.tree, d.offset + u, o > 0, !!h); } if (d && i.push(d), a.to > f) break; @@ -11148,9 +11148,9 @@ class ju { return i; } } -class nD { +class sD { startParse(e, r, n) { - return typeof e == "string" && (e = new F4e(e)), n = n ? n.length ? n.map((i) => new Jo(i.from, i.to)) : [new Jo(0, 0)] : [new Jo(0, e.length)], this.createParse(e, r || [], n); + return typeof e == "string" && (e = new V4e(e)), n = n ? n.length ? n.map((i) => new Jo(i.from, i.to)) : [new Jo(0, 0)] : [new Jo(0, e.length)], this.createParse(e, r || [], n); } parse(e, r, n) { let i = this.startParse(e, r, n); @@ -11161,7 +11161,7 @@ class nD { } } } -class F4e { +class V4e { constructor(e) { this.string = e; } @@ -11178,25 +11178,25 @@ class F4e { return this.string.slice(e, r); } } -function ZJ(t) { - return (e, r, n, i) => new Q4e(e, t, r, n, i); +function KJ(t) { + return (e, r, n, i) => new Y4e(e, t, r, n, i); } -class yz { +class xz { constructor(e, r, n, i, s) { this.parser = e, this.parse = r, this.overlay = n, this.target = i, this.from = s; } } -function bz(t) { +function wz(t) { if (!t.length || t.some((e) => e.from >= e.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(t)); } -class z4e { +class q4e { constructor(e, r, n, i, s, a, o) { this.parser = e, this.predicate = r, this.mounts = n, this.index = i, this.start = s, this.target = a, this.prev = o, this.depth = 0, this.ranges = []; } } -const x8 = new yr({ perNode: !0 }); -class Q4e { +const k8 = new yr({ perNode: !0 }); +class Y4e { constructor(e, r, n, i, s) { this.nest = r, this.input = n, this.fragments = i, this.ranges = s, this.inner = [], this.innerDone = 0, this.baseTree = null, this.stoppedAt = null, this.baseParse = e; } @@ -11211,7 +11211,7 @@ class Q4e { } if (this.innerDone == this.inner.length) { let n = this.baseTree; - return this.stoppedAt != null && (n = new nn(n.type, n.children, n.positions, n.length, n.propValues.concat([[x8, this.stoppedAt]]))), n; + return this.stoppedAt != null && (n = new nn(n.type, n.children, n.positions, n.length, n.propValues.concat([[k8, this.stoppedAt]]))), n; } let e = this.inner[this.innerDone], r = e.parse.advance(); if (r) { @@ -11237,7 +11237,7 @@ class Q4e { this.inner[r].parse.stopAt(e); } startInner() { - let e = new q4e(this.fragments), r = null, n = null, i = new bk(new ea(this.baseTree, this.ranges[0].from, 0, null), Sn.IncludeAnonymous | Sn.IgnoreMounts); + let e = new X4e(this.fragments), r = null, n = null, i = new bk(new ea(this.baseTree, this.ranges[0].from, 0, null), Sn.IncludeAnonymous | Sn.IgnoreMounts); e: for (let s, a; ; ) { let o = !0, l; @@ -11253,16 +11253,16 @@ class Q4e { } } o = !1; - } else if (n && (a = U4e(n.ranges, i.from, i.to))) + } else if (n && (a = W4e(n.ranges, i.from, i.to))) o = a != 2; else if (!i.type.isAnonymous && (s = this.nest(i, this.input)) && (i.from < i.to || !s.overlay)) { - i.tree || V4e(i); + i.tree || G4e(i); let u = e.findMounts(i.from, s.parser); if (typeof s.overlay == "function") - r = new z4e(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); + r = new q4e(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); else { - let h = Oz(this.ranges, s.overlay || (i.from < i.to ? [new Jo(i.from, i.to)] : [])); - h.length && bz(h), (h.length || !s.overlay) && this.inner.push(new yz(s.parser, h.length ? s.parser.startParse(this.input, kz(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Jo(f.from - i.from, f.to - i.from)) : null, i.tree, h.length ? h[0].from : i.from)), s.overlay ? h.length && (n = { ranges: h, depth: 0, prev: n }) : o = !1; + let h = Sz(this.ranges, s.overlay || (i.from < i.to ? [new Jo(i.from, i.to)] : [])); + h.length && wz(h), (h.length || !s.overlay) && this.inner.push(new xz(s.parser, h.length ? s.parser.startParse(this.input, Tz(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Jo(f.from - i.from, f.to - i.from)) : null, i.tree, h.length ? h[0].from : i.from)), s.overlay ? h.length && (n = { ranges: h, depth: 0, prev: n }) : o = !1; } } else if (r && (l = r.predicate(i)) && (l === !0 && (l = new Jo(i.from, i.to)), l.from < l.to)) { let u = r.ranges.length - 1; @@ -11275,15 +11275,15 @@ class Q4e { if (!i.parent()) break e; if (r && !--r.depth) { - let u = Oz(this.ranges, r.ranges); - u.length && (bz(u), this.inner.splice(r.index, 0, new yz(r.parser, r.parser.startParse(this.input, kz(r.mounts, u), u), r.ranges.map((h) => new Jo(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; + let u = Sz(this.ranges, r.ranges); + u.length && (wz(u), this.inner.splice(r.index, 0, new xz(r.parser, r.parser.startParse(this.input, Tz(r.mounts, u), u), r.ranges.map((h) => new Jo(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; } n && !--n.depth && (n = n.prev); } } } } -function U4e(t, e, r) { +function W4e(t, e, r) { for (let n of t) { if (n.from >= r) break; @@ -11292,13 +11292,13 @@ function U4e(t, e, r) { } return 0; } -function xz(t, e, r, n, i, s) { +function Oz(t, e, r, n, i, s) { if (e < r) { let a = t.buffer[e + 1]; n.push(t.slice(e, r, a)), i.push(a - s); } } -function V4e(t) { +function G4e(t) { let { node: e } = t, r = [], n = e.context.buffer; do r.push(t.index), t.parent(); @@ -11306,11 +11306,11 @@ function V4e(t) { let i = t.tree, s = i.children.indexOf(n), a = i.children[s], o = a.buffer, l = [s]; function u(h, f, d, p, g, m) { let v = r[m], y = [], b = []; - xz(a, h, v, y, b, p); + Oz(a, h, v, y, b, p); let w = o[v + 1], O = o[v + 2]; l.push(y.length); let S = m ? u(v + 4, o[v + 3], a.set.types[o[v]], w, O - w, m - 1) : e.toTree(); - return y.push(S), b.push(w - p), xz(a, o[v + 3], f, y, b, p), new nn(d, y, b, g); + return y.push(S), b.push(w - p), Oz(a, o[v + 3], f, y, b, p), new nn(d, y, b, g); } i.children[s] = u(0, o.length, Yi.none, 0, a.length, r.length - 1); for (let h of l) { @@ -11318,7 +11318,7 @@ function V4e(t) { t.yield(new ea(f, d + t.from, h, t._tree)); } } -class wz { +class kz { constructor(e, r) { this.offset = r, this.done = !1, this.cursor = e.cursor(Sn.IncludeAnonymous | Sn.IgnoreMounts); } @@ -11340,12 +11340,12 @@ class wz { return !1; } } -class q4e { +class X4e { constructor(e) { var r; if (this.fragments = e, this.curTo = 0, this.fragI = 0, e.length) { let n = this.curFrag = e[0]; - this.curTo = (r = n.tree.prop(x8)) !== null && r !== void 0 ? r : n.to, this.inner = new wz(n.tree, -n.offset); + this.curTo = (r = n.tree.prop(k8)) !== null && r !== void 0 ? r : n.to, this.inner = new kz(n.tree, -n.offset); } else this.curFrag = this.inner = null; } @@ -11360,7 +11360,7 @@ class q4e { this.curFrag = this.inner = null; else { let r = this.curFrag = this.fragments[this.fragI]; - this.curTo = (e = r.tree.prop(x8)) !== null && e !== void 0 ? e : r.to, this.inner = new wz(r.tree, -r.offset); + this.curTo = (e = r.tree.prop(k8)) !== null && e !== void 0 ? e : r.to, this.inner = new kz(r.tree, -r.offset); } } findMounts(e, r) { @@ -11386,7 +11386,7 @@ class q4e { return i; } } -function Oz(t, e) { +function Sz(t, e) { let r = null, n = e; for (let i = 1, s = 0; i < t.length; i++) { let a = t[i - 1].to, o = t[i].from; @@ -11399,7 +11399,7 @@ function Oz(t, e) { } return n; } -function Y4e(t, e, r, n) { +function H4e(t, e, r, n) { let i = 0, s = 0, a = !1, o = !1, l = -1e9, u = []; for (; ; ) { let h = i == t.length ? 1e9 : a ? t[i].to : t[i].from, f = s == e.length ? 1e9 : o ? e[s].to : e[s].from; @@ -11413,27 +11413,27 @@ function Y4e(t, e, r, n) { } return u; } -function kz(t, e) { +function Tz(t, e) { let r = []; for (let { pos: n, mount: i, frag: s } of t) { let a = n + (i.overlay ? i.overlay[0].from : 0), o = a + i.tree.length, l = Math.max(s.from, a), u = Math.min(s.to, o); if (i.overlay) { - let h = i.overlay.map((d) => new Jo(d.from + n, d.to + n)), f = Y4e(e, h, l, u); + let h = i.overlay.map((d) => new Jo(d.from + n, d.to + n)), f = H4e(e, h, l, u); for (let d = 0, p = l; ; d++) { let g = d == f.length, m = g ? u : f[d].from; - if (m > p && r.push(new ju(p, m, i.tree, -a, s.from >= p || s.openStart, s.to <= m || s.openEnd)), g) + if (m > p && r.push(new Ku(p, m, i.tree, -a, s.from >= p || s.openStart, s.to <= m || s.openEnd)), g) break; p = f[d].to; } } else - r.push(new ju(l, u, i.tree, -a, s.from >= a || s.openStart, s.to <= o || s.openEnd)); + r.push(new Ku(l, u, i.tree, -a, s.from >= a || s.openStart, s.to <= o || s.openEnd)); } return r; } -let W4e = 0; +let Z4e = 0; class Il { constructor(e, r, n) { - this.set = e, this.base = r, this.modified = n, this.id = W4e++; + this.set = e, this.base = r, this.modified = n, this.id = Z4e++; } static define(e) { if (e != null && e.base) @@ -11449,21 +11449,21 @@ class Il { return (r) => r.modified.indexOf(e) > -1 ? r : xk.get(r.base || r, r.modified.concat(e).sort((n, i) => n.id - i.id)); } } -let G4e = 0; +let j4e = 0; class xk { constructor() { - this.instances = [], this.id = G4e++; + this.instances = [], this.id = j4e++; } static get(e, r) { if (!r.length) return e; - let n = r[0].instances.find((o) => o.base == e && X4e(r, o.modified)); + let n = r[0].instances.find((o) => o.base == e && K4e(r, o.modified)); if (n) return n; let i = [], s = new Il(i, e, r); for (let o of r) o.instances.push(s); - let a = H4e(r); + let a = J4e(r); for (let o of e.set) if (!o.modified.length) for (let l of a) @@ -11471,10 +11471,10 @@ class xk { return s; } } -function X4e(t, e) { +function K4e(t, e) { return t.length == e.length && t.every((r, n) => r == e[n]); } -function H4e(t) { +function J4e(t) { let e = [[]]; for (let r = 0; r < t.length; r++) for (let n = 0, i = e.length; n < i; n++) @@ -11515,9 +11515,9 @@ function fd(t) { e[u] = h.sort(e[u]); } } - return jJ.add(e); + return JJ.add(e); } -const jJ = new yr(); +const JJ = new yr(); class wk { constructor(e, r, n, i) { this.tags = e, this.mode = r, this.context = n, this.next = i; @@ -11536,7 +11536,7 @@ class wk { } } wk.empty = new wk([], 2, null); -function KJ(t, e) { +function eee(t, e) { let r = /* @__PURE__ */ Object.create(null); for (let s of t) if (!Array.isArray(s.tag)) @@ -11561,7 +11561,7 @@ function KJ(t, e) { scope: n }; } -function Z4e(t, e) { +function e5e(t, e) { let r = null; for (let n of t) { let i = n.style(e); @@ -11569,11 +11569,11 @@ function Z4e(t, e) { } return r; } -function j4e(t, e, r, n = 0, i = t.length) { - let s = new K4e(n, Array.isArray(e) ? e : [e], r); +function t5e(t, e, r, n = 0, i = t.length) { + let s = new r5e(n, Array.isArray(e) ? e : [e], r); s.highlightRange(t.cursor(), n, i, "", s.highlighters), s.flush(i); } -class K4e { +class r5e { constructor(e, r, n) { this.at = e, this.highlighters = r, this.span = n, this.class = ""; } @@ -11588,7 +11588,7 @@ class K4e { if (o >= n || l <= r) return; a.isTop && (s = this.highlighters.filter((p) => !p.scope || p.scope(a))); - let u = i, h = J4e(e) || wk.empty, f = Z4e(s, h.tags); + let u = i, h = n5e(e) || wk.empty, f = e5e(s, h.tags); if (f && (u && (u += " "), u += f, h.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(r, o), u), h.opaque) return; let d = e.tree && e.tree.prop(yr.mounted); @@ -11617,40 +11617,40 @@ class K4e { } } } -function J4e(t) { - let e = t.type.prop(jJ); +function n5e(t) { + let e = t.type.prop(JJ); for (; e && e.context && !t.matchContext(e.context); ) e = e.next; return e || null; } -const Rt = Il.define, yO = Rt(), Hh = Rt(), Sz = Rt(Hh), Tz = Rt(Hh), Zh = Rt(), bO = Rt(Zh), T_ = Rt(Zh), Ec = Rt(), Cd = Rt(Ec), Oc = Rt(), kc = Rt(), w8 = Rt(), vv = Rt(w8), xO = Rt(), Se = { +const Rt = Il.define, yO = Rt(), Zh = Rt(), Cz = Rt(Zh), Ez = Rt(Zh), jh = Rt(), bO = Rt(jh), __ = Rt(jh), Ec = Rt(), Ed = Rt(Ec), Oc = Rt(), kc = Rt(), S8 = Rt(), vv = Rt(S8), xO = Rt(), Se = { comment: yO, lineComment: Rt(yO), blockComment: Rt(yO), docComment: Rt(yO), - name: Hh, - variableName: Rt(Hh), - typeName: Sz, - tagName: Rt(Sz), - propertyName: Tz, - attributeName: Rt(Tz), - className: Rt(Hh), - labelName: Rt(Hh), - namespace: Rt(Hh), - macroName: Rt(Hh), - literal: Zh, + name: Zh, + variableName: Rt(Zh), + typeName: Cz, + tagName: Rt(Cz), + propertyName: Ez, + attributeName: Rt(Ez), + className: Rt(Zh), + labelName: Rt(Zh), + namespace: Rt(Zh), + macroName: Rt(Zh), + literal: jh, string: bO, docString: Rt(bO), character: Rt(bO), attributeValue: Rt(bO), - number: T_, - integer: Rt(T_), - float: Rt(T_), - bool: Rt(Zh), - regexp: Rt(Zh), - escape: Rt(Zh), - color: Rt(Zh), - url: Rt(Zh), + number: __, + integer: Rt(__), + float: Rt(__), + bool: Rt(jh), + regexp: Rt(jh), + escape: Rt(jh), + color: Rt(jh), + url: Rt(jh), keyword: Oc, self: Rt(Oc), null: Rt(Oc), @@ -11671,21 +11671,21 @@ const Rt = Il.define, yO = Rt(), Hh = Rt(), Sz = Rt(Hh), Tz = Rt(Hh), Zh = Rt(), definitionOperator: Rt(kc), typeOperator: Rt(kc), controlOperator: Rt(kc), - punctuation: w8, - separator: Rt(w8), + punctuation: S8, + separator: Rt(S8), bracket: vv, angleBracket: Rt(vv), squareBracket: Rt(vv), paren: Rt(vv), brace: Rt(vv), content: Ec, - heading: Cd, - heading1: Rt(Cd), - heading2: Rt(Cd), - heading3: Rt(Cd), - heading4: Rt(Cd), - heading5: Rt(Cd), - heading6: Rt(Cd), + heading: Ed, + heading1: Rt(Ed), + heading2: Rt(Ed), + heading3: Rt(Ed), + heading4: Rt(Ed), + heading5: Rt(Ed), + heading6: Rt(Ed), contentSeparator: Rt(Ec), list: Rt(Ec), quote: Rt(Ec), @@ -11709,7 +11709,7 @@ const Rt = Il.define, yO = Rt(), Hh = Rt(), Sz = Rt(Hh), Tz = Rt(Hh), Zh = Rt(), local: Il.defineModifier(), special: Il.defineModifier() }; -KJ([ +eee([ { tag: Se.link, class: "tok-link" }, { tag: Se.heading, class: "tok-heading" }, { tag: Se.emphasis, class: "tok-emphasis" }, @@ -11741,25 +11741,25 @@ KJ([ { tag: Se.invalid, class: "tok-invalid" }, { tag: Se.punctuation, class: "tok-punctuation" } ]); -var C_; -const s0 = /* @__PURE__ */ new yr(); -function iD(t) { +var A_; +const a0 = /* @__PURE__ */ new yr(); +function aD(t) { return $t.define({ combine: t ? (e) => e.concat(t) : void 0 }); } -const sD = /* @__PURE__ */ new yr(); +const oD = /* @__PURE__ */ new yr(); class el { constructor(e, r, n = [], i = "") { this.data = e, this.name = i, Sr.prototype.hasOwnProperty("tree") || Object.defineProperty(Sr.prototype, "tree", { get() { return Cn(this); } }), this.parser = r, this.extension = [ - $f.of(this), + Bf.of(this), Sr.languageData.of((s, a, o) => { - let l = Cz(s, a, o), u = l.type.prop(s0); + let l = _z(s, a, o), u = l.type.prop(a0); if (!u) return []; - let h = s.facet(u), f = l.type.prop(sD); + let h = s.facet(u), f = l.type.prop(oD); if (f) { let d = l.resolve(a - l.from, o); for (let p of f) @@ -11773,22 +11773,22 @@ class el { ].concat(n); } isActiveAt(e, r, n = -1) { - return Cz(e, r, n).type.prop(s0) == this.data; + return _z(e, r, n).type.prop(a0) == this.data; } findRegions(e) { - let r = e.facet($f); + let r = e.facet(Bf); if ((r == null ? void 0 : r.data) == this.data) return [{ from: 0, to: e.doc.length }]; if (!r || !r.allowsNesting) return []; let n = [], i = (s, a) => { - if (s.prop(s0) == this.data) { + if (s.prop(a0) == this.data) { n.push({ from: a, to: a + s.length }); return; } let o = s.prop(yr.mounted); if (o) { - if (o.tree.prop(s0) == this.data) { + if (o.tree.prop(a0) == this.data) { if (o.overlay) for (let l of o.overlay) n.push({ from: l.from + a, to: l.to + a }); @@ -11813,25 +11813,25 @@ class el { } } el.setState = /* @__PURE__ */ or.define(); -function Cz(t, e, r) { - let n = t.facet($f), i = Cn(t).topNode; +function _z(t, e, r) { + let n = t.facet(Bf), i = Cn(t).topNode; if (!n || n.allowsNesting) for (let s = i; s; s = s.enter(e, r, Sn.ExcludeBuffers)) s.type.isTop && (i = s); return i; } -class If extends el { +class $f extends el { constructor(e, r, n) { super(e, r, [], n), this.parser = r; } static define(e) { - let r = iD(e.languageData); - return new If(r, e.parser.configure({ - props: [s0.add((n) => n.isTop ? r : void 0)] + let r = aD(e.languageData); + return new $f(r, e.parser.configure({ + props: [a0.add((n) => n.isTop ? r : void 0)] }), e.name); } configure(e, r) { - return new If(this.data, this.parser.configure(e), r || this.name); + return new $f(this.data, this.parser.configure(e), r || this.name); } get allowsNesting() { return this.parser.hasWrappers(); @@ -11841,7 +11841,7 @@ function Cn(t) { let e = t.field(el.state, !1); return e ? e.tree : nn.empty; } -class e5e { +class i5e { constructor(e) { this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter(); } @@ -11871,7 +11871,7 @@ class w2 { return new w2(e, r, [], nn.empty, 0, n, [], null); } startParse() { - return this.parser.startParse(new e5e(this.state.doc), this.fragments); + return this.parser.startParse(new i5e(this.state.doc), this.fragments); } work(e, r) { return r != null && r >= this.state.doc.length && (r = void 0), this.tree != nn.empty && this.isDone(r != null ? r : this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => { @@ -11883,7 +11883,7 @@ class w2 { for (this.parse || (this.parse = this.startParse()), r != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > r) && r < this.state.doc.length && this.parse.stopAt(r); ; ) { let i = this.parse.advance(); if (i) - if (this.fragments = this.withoutTempSkipped(ju.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (n = this.parse.stoppedAt) !== null && n !== void 0 ? n : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (r != null ? r : this.state.doc.length)) + if (this.fragments = this.withoutTempSkipped(Ku.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (n = this.parse.stoppedAt) !== null && n !== void 0 ? n : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (r != null ? r : this.state.doc.length)) this.parse = this.startParse(); else return !0; @@ -11897,7 +11897,7 @@ class w2 { this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => { for (; !(r = this.parse.advance()); ) ; - }), this.treeLen = e, this.tree = r, this.fragments = this.withoutTempSkipped(ju.addTree(this.tree, this.fragments, !0)), this.parse = null); + }), this.treeLen = e, this.tree = r, this.fragments = this.withoutTempSkipped(Ku.addTree(this.tree, this.fragments, !0)), this.parse = null); } withContext(e) { let r = yv; @@ -11910,14 +11910,14 @@ class w2 { } withoutTempSkipped(e) { for (let r; r = this.tempSkipped.pop(); ) - e = Ez(e, r.from, r.to); + e = Az(e, r.from, r.to); return e; } changes(e, r) { let { fragments: n, tree: i, treeLen: s, viewport: a, skipped: o } = this; if (this.takeTree(), !e.empty) { let l = []; - if (e.iterChangedRanges((u, h, f, d) => l.push({ fromA: u, toA: h, fromB: f, toB: d })), n = ju.applyChanges(n, l), i = nn.empty, s = 0, a = { from: e.mapPos(a.from, -1), to: e.mapPos(a.to, 1) }, this.skipped.length) { + if (e.iterChangedRanges((u, h, f, d) => l.push({ fromA: u, toA: h, fromB: f, toB: d })), n = Ku.applyChanges(n, l), i = nn.empty, s = 0, a = { from: e.mapPos(a.from, -1), to: e.mapPos(a.to, 1) }, this.skipped.length) { o = []; for (let u of this.skipped) { let h = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1); @@ -11934,7 +11934,7 @@ class w2 { let r = this.skipped.length; for (let n = 0; n < this.skipped.length; n++) { let { from: i, to: s } = this.skipped[n]; - i < e.to && s > e.from && (this.fragments = Ez(this.fragments, i, s), this.skipped.splice(n--, 1)); + i < e.to && s > e.from && (this.fragments = Az(this.fragments, i, s), this.skipped.splice(n--, 1)); } return this.skipped.length >= r ? !1 : (this.reset(), !0); } @@ -11945,7 +11945,7 @@ class w2 { this.skipped.push({ from: e, to: r }); } static getSkippingParser(e) { - return new class extends nD { + return new class extends sD { createParse(r, n, i) { let s = i[0].from, a = i[i.length - 1].to; return { @@ -11975,10 +11975,10 @@ class w2 { return yv; } } -function Ez(t, e, r) { - return ju.applyChanges(t, [{ fromA: e, toA: r, fromB: e, toB: r }]); +function Az(t, e, r) { + return Ku.applyChanges(t, [{ fromA: e, toA: r, fromB: e, toB: r }]); } -class fm { +class dm { constructor(e) { this.context = e, this.tree = e.tree; } @@ -11986,33 +11986,33 @@ class fm { if (!e.docChanged && this.tree == this.context.tree) return this; let r = this.context.changes(e.changes, e.state), n = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), r.viewport.to); - return r.work(20, n) || r.takeTree(), new fm(r); + return r.work(20, n) || r.takeTree(), new dm(r); } static init(e) { - let r = Math.min(3e3, e.doc.length), n = w2.create(e.facet($f).parser, e, { from: 0, to: r }); - return n.work(20, r) || n.takeTree(), new fm(n); + let r = Math.min(3e3, e.doc.length), n = w2.create(e.facet(Bf).parser, e, { from: 0, to: r }); + return n.work(20, r) || n.takeTree(), new dm(n); } } el.state = /* @__PURE__ */ Xn.define({ - create: fm.init, + create: dm.init, update(t, e) { for (let r of e.effects) if (r.is(el.setState)) return r.value; - return e.startState.facet($f) != e.state.facet($f) ? fm.init(e.state) : t.apply(e); + return e.startState.facet(Bf) != e.state.facet(Bf) ? dm.init(e.state) : t.apply(e); } }); -let JJ = (t) => { +let tee = (t) => { let e = setTimeout(() => t(), 500); return () => clearTimeout(e); }; -typeof requestIdleCallback < "u" && (JJ = (t) => { +typeof requestIdleCallback < "u" && (tee = (t) => { let e = -1, r = setTimeout(() => { e = requestIdleCallback(t, { timeout: 500 - 100 }); }, 100); return () => e < 0 ? clearTimeout(r) : cancelIdleCallback(e); }); -const E_ = typeof navigator < "u" && ((C_ = navigator.scheduling) === null || C_ === void 0 ? void 0 : C_.isInputPending) ? () => navigator.scheduling.isInputPending() : null, t5e = /* @__PURE__ */ hn.fromClass(class { +const L_ = typeof navigator < "u" && ((A_ = navigator.scheduling) === null || A_ === void 0 ? void 0 : A_.isInputPending) ? () => navigator.scheduling.isInputPending() : null, s5e = /* @__PURE__ */ hn.fromClass(class { constructor(e) { this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork(); } @@ -12024,7 +12024,7 @@ const E_ = typeof navigator < "u" && ((C_ = navigator.scheduling) === null || C_ if (this.working) return; let { state: e } = this.view, r = e.field(el.state); - (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = JJ(this.work)); + (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = tee(this.work)); } work(e) { this.working = null; @@ -12034,8 +12034,8 @@ const E_ = typeof navigator < "u" && ((C_ = navigator.scheduling) === null || C_ let { state: n, viewport: { to: i } } = this.view, s = n.field(el.state); if (s.tree == s.context.tree && s.context.isDone(i + 1e5)) return; - let a = Date.now() + Math.min(this.chunkBudget, 100, e && !E_ ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => E_ && E_() || Date.now() > a, i + (o ? 0 : 1e5)); - this.chunkBudget -= Date.now() - r, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: el.setState.of(new fm(s.context)) })), this.chunkBudget > 0 && !(l && !o) && this.scheduleWork(), this.checkAsyncSchedule(s.context); + let a = Date.now() + Math.min(this.chunkBudget, 100, e && !L_ ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => L_ && L_() || Date.now() > a, i + (o ? 0 : 1e5)); + this.chunkBudget -= Date.now() - r, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: el.setState.of(new dm(s.context)) })), this.chunkBudget > 0 && !(l && !o) && this.scheduleWork(), this.checkAsyncSchedule(s.context); } checkAsyncSchedule(e) { e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((r) => al(this.view.state, r)).then(() => this.workScheduled--), e.scheduleOn = null); @@ -12050,20 +12050,20 @@ const E_ = typeof navigator < "u" && ((C_ = navigator.scheduling) === null || C_ eventHandlers: { focus() { this.scheduleWork(); } } -}), $f = /* @__PURE__ */ $t.define({ +}), Bf = /* @__PURE__ */ $t.define({ combine(t) { return t.length ? t[0] : null; }, enables: (t) => [ el.state, - t5e, + s5e, kt.contentAttributes.compute([t], (e) => { let r = e.facet(t); return r && r.name ? { "data-language": r.name } : {}; }) ] }); -class dm { +class pm { constructor(e, r = []) { this.language = e, this.support = r, this.extension = [e, r]; } @@ -12113,7 +12113,7 @@ class Ok { return null; } } -const r5e = /* @__PURE__ */ $t.define(), Bx = /* @__PURE__ */ $t.define({ +const a5e = /* @__PURE__ */ $t.define(), Bx = /* @__PURE__ */ $t.define({ combine: (t) => { if (!t.length) return " "; @@ -12138,17 +12138,17 @@ function O2(t, e) { r += i; return r; } -function aD(t, e) { - t instanceof Sr && (t = new $T(t)); - for (let n of t.state.facet(r5e)) { +function lD(t, e) { + t instanceof Sr && (t = new BT(t)); + for (let n of t.state.facet(a5e)) { let i = n(t, e); if (i !== void 0) return i; } let r = Cn(t.state); - return r.length >= e ? n5e(t, r, e) : null; + return r.length >= e ? o5e(t, r, e) : null; } -class $T { +class BT { constructor(e, r = {}) { this.state = e, this.options = r, this.unit = kk(e); } @@ -12182,8 +12182,8 @@ class $T { return this.options.simulateBreak || null; } } -const y1 = /* @__PURE__ */ new yr(); -function n5e(t, e, r) { +const b1 = /* @__PURE__ */ new yr(); +function o5e(t, e, r) { let n = e.resolveStack(r), i = n.node.enterUnfinishedNodesBefore(r); if (i != n.node) { let s = []; @@ -12192,34 +12192,34 @@ function n5e(t, e, r) { for (let a = s.length - 1; a >= 0; a--) n = { node: s[a], next: n }; } - return eee(n, t, r); + return ree(n, t, r); } -function eee(t, e, r) { +function ree(t, e, r) { for (let n = t; n; n = n.next) { - let i = s5e(n.node); + let i = c5e(n.node); if (i) - return i(oD.create(e, r, n)); + return i(cD.create(e, r, n)); } return 0; } -function i5e(t) { +function l5e(t) { return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak; } -function s5e(t) { - let e = t.type.prop(y1); +function c5e(t) { + let e = t.type.prop(b1); if (e) return e; let r = t.firstChild, n; if (r && (n = r.type.prop(yr.closedBy))) { let i = t.lastChild, s = i && n.indexOf(i.name) > -1; - return (a) => tee(a, !0, 1, void 0, s && !i5e(a) ? i.from : void 0); + return (a) => nee(a, !0, 1, void 0, s && !l5e(a) ? i.from : void 0); } - return t.parent == null ? a5e : null; + return t.parent == null ? u5e : null; } -function a5e() { +function u5e() { return 0; } -class oD extends $T { +class cD extends BT { constructor(e, r, n) { super(e.state, e.options), this.base = e, this.pos = r, this.context = n; } @@ -12227,7 +12227,7 @@ class oD extends $T { return this.context.node; } static create(e, r, n) { - return new oD(e, r, n); + return new cD(e, r, n); } get textAfter() { return this.textAfterPos(this.pos); @@ -12241,23 +12241,23 @@ class oD extends $T { let n = e.resolve(r.from); for (; n.parent && n.parent.from == n.from; ) n = n.parent; - if (o5e(n, e)) + if (h5e(n, e)) break; r = this.state.doc.lineAt(n.from); } return this.lineIndent(r.from); } continue() { - return eee(this.context.next, this.base, this.pos); + return ree(this.context.next, this.base, this.pos); } } -function o5e(t, e) { +function h5e(t, e) { for (let r = e; r; r = r.parent) if (t == r) return !0; return !1; } -function l5e(t) { +function f5e(t) { let e = t.node, r = e.childAfter(e.from), n = e.lastChild; if (!r) return null; @@ -12271,22 +12271,22 @@ function l5e(t) { o = l.to; } } -function O8({ closing: t, align: e = !0, units: r = 1 }) { - return (n) => tee(n, e, r, t); +function T8({ closing: t, align: e = !0, units: r = 1 }) { + return (n) => nee(n, e, r, t); } -function tee(t, e, r, n, i) { - let s = t.textAfter, a = s.match(/^\s*/)[0].length, o = n && s.slice(a, a + n.length) == n || i == t.pos + a, l = e ? l5e(t) : null; +function nee(t, e, r, n, i) { + let s = t.textAfter, a = s.match(/^\s*/)[0].length, o = n && s.slice(a, a + n.length) == n || i == t.pos + a, l = e ? f5e(t) : null; return l ? o ? t.column(l.from) : t.column(l.to) : t.baseIndent + (o ? 0 : t.unit * r); } -const c5e = (t) => t.baseIndent; +const d5e = (t) => t.baseIndent; function o5({ except: t, units: e = 1 } = {}) { return (r) => { let n = t && t.test(r.textAfter); return r.baseIndent + (n ? 0 : e * r.unit); }; } -const u5e = 200; -function h5e() { +const p5e = 200; +function g5e() { return Sr.transactionFilter.of((t) => { if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete")) return t; @@ -12294,7 +12294,7 @@ function h5e() { if (!e.length) return t; let r = t.newDoc, { head: n } = t.newSelection.main, i = r.lineAt(n); - if (n > i.from + u5e) + if (n > i.from + p5e) return t; let s = r.sliceString(i.from, n); if (!e.some((u) => u.test(s))) @@ -12305,7 +12305,7 @@ function h5e() { if (h.from == o) continue; o = h.from; - let f = aD(a, h.from); + let f = lD(a, h.from); if (f == null) continue; let d = /^\s*/.exec(h.text)[0], p = O2(a, f); @@ -12314,12 +12314,12 @@ function h5e() { return l.length ? [t, { changes: l, sequential: !0 }] : t; }); } -const ree = /* @__PURE__ */ $t.define(), dp = /* @__PURE__ */ new yr(); -function lD(t) { +const iee = /* @__PURE__ */ $t.define(), pp = /* @__PURE__ */ new yr(); +function uD(t) { let e = t.firstChild, r = t.lastChild; return e && e.to < r.from ? { from: e.to, to: r.type.isError ? t.to : r.from } : null; } -function f5e(t, e, r) { +function m5e(t, e, r) { let n = Cn(t); if (n.length < r) return null; @@ -12330,49 +12330,49 @@ function f5e(t, e, r) { continue; if (s && o.from < e) break; - let l = o.type.prop(dp); - if (l && (o.to < n.length - 50 || n.length == t.doc.length || !d5e(o))) { + let l = o.type.prop(pp); + if (l && (o.to < n.length - 50 || n.length == t.doc.length || !v5e(o))) { let u = l(o, t); u && u.from <= r && u.from >= e && u.to > r && (s = u); } } return s; } -function d5e(t) { +function v5e(t) { let e = t.lastChild; return e && e.to == t.to && e.type.isError; } function k2(t, e, r) { - for (let n of t.facet(ree)) { + for (let n of t.facet(iee)) { let i = n(t, e, r); if (i) return i; } - return f5e(t, e, r); + return m5e(t, e, r); } -function nee(t, e) { +function see(t, e) { let r = e.mapPos(t.from, 1), n = e.mapPos(t.to, -1); return r >= n ? void 0 : { from: r, to: n }; } -const uh = /* @__PURE__ */ or.define({ map: nee }), pp = /* @__PURE__ */ or.define({ map: nee }); -function iee(t) { +const hh = /* @__PURE__ */ or.define({ map: see }), gp = /* @__PURE__ */ or.define({ map: see }); +function aee(t) { let e = []; for (let { head: r } of t.state.selection.ranges) e.some((n) => n.from <= r && n.to >= r) || e.push(t.lineBlockAt(r)); return e; } -const Bf = /* @__PURE__ */ Xn.define({ +const Ff = /* @__PURE__ */ Xn.define({ create() { return It.none; }, update(t, e) { t = t.map(e.changes); for (let r of e.effects) - if (r.is(uh) && !g5e(t, r.value.from, r.value.to)) { - let { preparePlaceholder: n } = e.state.facet(cD), i = n ? It.replace({ widget: new O5e(n(e.state, r.value)) }) : _z; + if (r.is(hh) && !b5e(t, r.value.from, r.value.to)) { + let { preparePlaceholder: n } = e.state.facet(hD), i = n ? It.replace({ widget: new C5e(n(e.state, r.value)) }) : Lz; t = t.update({ add: [i.range(r.value.from, r.value.to)] }); } else - r.is(pp) && (t = t.update({ + r.is(gp) && (t = t.update({ filter: (n, i) => r.value.from != n || r.value.to != i, filterFrom: r.value.from, filterTo: r.value.to @@ -12404,100 +12404,100 @@ const Bf = /* @__PURE__ */ Xn.define({ let n = t[r++], i = t[r++]; if (typeof n != "number" || typeof i != "number") throw new RangeError("Invalid JSON for fold state"); - e.push(_z.range(n, i)); + e.push(Lz.range(n, i)); } return It.set(e, !0); } }); -function p5e(t) { - return t.field(Bf, !1) || $r.empty; +function y5e(t) { + return t.field(Ff, !1) || $r.empty; } function Sk(t, e, r) { var n; let i = null; - return (n = t.field(Bf, !1)) === null || n === void 0 || n.between(e, r, (s, a) => { + return (n = t.field(Ff, !1)) === null || n === void 0 || n.between(e, r, (s, a) => { (!i || i.from > s) && (i = { from: s, to: a }); }), i; } -function g5e(t, e, r) { +function b5e(t, e, r) { let n = !1; return t.between(e, e, (i, s) => { i == e && s == r && (n = !0); }), n; } -function see(t, e) { - return t.field(Bf, !1) ? e : e.concat(or.appendConfig.of(oee())); +function oee(t, e) { + return t.field(Ff, !1) ? e : e.concat(or.appendConfig.of(cee())); } -const m5e = (t) => { - for (let e of iee(t)) { +const x5e = (t) => { + for (let e of aee(t)) { let r = k2(t.state, e.from, e.to); if (r) - return t.dispatch({ effects: see(t.state, [uh.of(r), aee(t, r)]) }), !0; + return t.dispatch({ effects: oee(t.state, [hh.of(r), lee(t, r)]) }), !0; } return !1; -}, v5e = (t) => { - if (!t.state.field(Bf, !1)) +}, w5e = (t) => { + if (!t.state.field(Ff, !1)) return !1; let e = []; - for (let r of iee(t)) { + for (let r of aee(t)) { let n = Sk(t.state, r.from, r.to); - n && e.push(pp.of(n), aee(t, n, !1)); + n && e.push(gp.of(n), lee(t, n, !1)); } return e.length && t.dispatch({ effects: e }), e.length > 0; }; -function aee(t, e, r = !0) { +function lee(t, e, r = !0) { let n = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number; return kt.announce.of(`${t.state.phrase(r ? "Folded lines" : "Unfolded lines")} ${n} ${t.state.phrase("to")} ${i}.`); } -const y5e = (t) => { +const O5e = (t) => { let { state: e } = t, r = []; for (let n = 0; n < e.doc.length; ) { let i = t.lineBlockAt(n), s = k2(e, i.from, i.to); - s && r.push(uh.of(s)), n = (s ? t.lineBlockAt(s.to) : i).to + 1; + s && r.push(hh.of(s)), n = (s ? t.lineBlockAt(s.to) : i).to + 1; } - return r.length && t.dispatch({ effects: see(t.state, r) }), !!r.length; -}, b5e = (t) => { - let e = t.state.field(Bf, !1); + return r.length && t.dispatch({ effects: oee(t.state, r) }), !!r.length; +}, k5e = (t) => { + let e = t.state.field(Ff, !1); if (!e || !e.size) return !1; let r = []; return e.between(0, t.state.doc.length, (n, i) => { - r.push(pp.of({ from: n, to: i })); + r.push(gp.of({ from: n, to: i })); }), t.dispatch({ effects: r }), !0; -}, x5e = [ - { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: m5e }, - { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: v5e }, - { key: "Ctrl-Alt-[", run: y5e }, - { key: "Ctrl-Alt-]", run: b5e } -], w5e = { +}, S5e = [ + { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: x5e }, + { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: w5e }, + { key: "Ctrl-Alt-[", run: O5e }, + { key: "Ctrl-Alt-]", run: k5e } +], T5e = { placeholderDOM: null, preparePlaceholder: null, placeholderText: "\u2026" -}, cD = /* @__PURE__ */ $t.define({ +}, hD = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, w5e); + return gu(t, T5e); } }); -function oee(t) { - let e = [Bf, T5e]; - return t && e.push(cD.of(t)), e; +function cee(t) { + let e = [Ff, A5e]; + return t && e.push(hD.of(t)), e; } -function lee(t, e) { - let { state: r } = t, n = r.facet(cD), i = (a) => { +function uee(t, e) { + let { state: r } = t, n = r.facet(hD), i = (a) => { let o = t.lineBlockAt(t.posAtDOM(a.target)), l = Sk(t.state, o.from, o.to); - l && t.dispatch({ effects: pp.of(l) }), a.preventDefault(); + l && t.dispatch({ effects: gp.of(l) }), a.preventDefault(); }; if (n.placeholderDOM) return n.placeholderDOM(t, i, e); let s = document.createElement("span"); return s.textContent = n.placeholderText, s.setAttribute("aria-label", r.phrase("folded code")), s.title = r.phrase("unfold"), s.className = "cm-foldPlaceholder", s.onclick = i, s; } -const _z = /* @__PURE__ */ It.replace({ widget: /* @__PURE__ */ new class extends uo { +const Lz = /* @__PURE__ */ It.replace({ widget: /* @__PURE__ */ new class extends uo { toDOM(t) { - return lee(t, null); + return uee(t, null); } }() }); -class O5e extends uo { +class C5e extends uo { constructor(e) { super(), this.value = e; } @@ -12505,17 +12505,17 @@ class O5e extends uo { return this.value == e.value; } toDOM(e) { - return lee(e, this.value); + return uee(e, this.value); } } -const k5e = { +const E5e = { openText: "\u2304", closedText: "\u203A", markerDOM: null, domEventHandlers: {}, foldingChanged: () => !1 }; -class __ extends ul { +class R_ extends ul { constructor(e, r) { super(), this.config = e, this.open = r; } @@ -12529,13 +12529,13 @@ class __ extends ul { return r.textContent = this.open ? this.config.openText : this.config.closedText, r.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), r; } } -function S5e(t = {}) { - let e = Object.assign(Object.assign({}, k5e), t), r = new __(e, !0), n = new __(e, !1), i = hn.fromClass(class { +function _5e(t = {}) { + let e = Object.assign(Object.assign({}, E5e), t), r = new R_(e, !0), n = new R_(e, !1), i = hn.fromClass(class { constructor(a) { this.from = a.viewport.from, this.markers = this.buildMarkers(a); } update(a) { - (a.docChanged || a.viewportChanged || a.startState.facet($f) != a.state.facet($f) || a.startState.field(Bf, !1) != a.state.field(Bf, !1) || Cn(a.startState) != Cn(a.state) || e.foldingChanged(a)) && (this.markers = this.buildMarkers(a.view)); + (a.docChanged || a.viewportChanged || a.startState.facet(Bf) != a.state.facet(Bf) || a.startState.field(Ff, !1) != a.state.field(Ff, !1) || Cn(a.startState) != Cn(a.state) || e.foldingChanged(a)) && (this.markers = this.buildMarkers(a.view)); } buildMarkers(a) { let o = new os(); @@ -12548,29 +12548,29 @@ function S5e(t = {}) { }), { domEventHandlers: s } = e; return [ i, - IT({ + $T({ class: "cm-foldGutter", markers(a) { var o; return ((o = a.plugin(i)) === null || o === void 0 ? void 0 : o.markers) || $r.empty; }, initialSpacer() { - return new __(e, !1); + return new R_(e, !1); }, domEventHandlers: Object.assign(Object.assign({}, s), { click: (a, o, l) => { if (s.click && s.click(a, o, l)) return !0; let u = Sk(a.state, o.from, o.to); if (u) - return a.dispatch({ effects: pp.of(u) }), !0; + return a.dispatch({ effects: gp.of(u) }), !0; let h = k2(a.state, o.from, o.to); - return h ? (a.dispatch({ effects: uh.of(h) }), !0) : !1; + return h ? (a.dispatch({ effects: hh.of(h) }), !0) : !1; } }) }), - oee() + cee() ]; } -const T5e = /* @__PURE__ */ kt.baseTheme({ +const A5e = /* @__PURE__ */ kt.baseTheme({ ".cm-foldPlaceholder": { backgroundColor: "#eee", border: "1px solid #ddd", @@ -12585,45 +12585,45 @@ const T5e = /* @__PURE__ */ kt.baseTheme({ cursor: "pointer" } }); -class BT { +class FT { constructor(e, r) { this.specs = e; let n; function i(o) { - let l = ah.newName(); + let l = oh.newName(); return (n || (n = /* @__PURE__ */ Object.create(null)))["." + l] = o, l; } const s = typeof r.all == "string" ? r.all : r.all ? i(r.all) : void 0, a = r.scope; - this.scope = a instanceof el ? (o) => o.prop(s0) == a.data : a ? (o) => o == a : void 0, this.style = KJ(e.map((o) => ({ + this.scope = a instanceof el ? (o) => o.prop(a0) == a.data : a ? (o) => o == a : void 0, this.style = eee(e.map((o) => ({ tag: o.tag, class: o.class || i(Object.assign({}, o, { tag: null })) })), { all: s - }).style, this.module = n ? new ah(n) : null, this.themeType = r.themeType; + }).style, this.module = n ? new oh(n) : null, this.themeType = r.themeType; } static define(e, r) { - return new BT(e, r || {}); + return new FT(e, r || {}); } } -const k8 = /* @__PURE__ */ $t.define(), cee = /* @__PURE__ */ $t.define({ +const C8 = /* @__PURE__ */ $t.define(), hee = /* @__PURE__ */ $t.define({ combine(t) { return t.length ? [t[0]] : null; } }); -function A_(t) { - let e = t.facet(k8); - return e.length ? e : t.facet(cee); +function M_(t) { + let e = t.facet(C8); + return e.length ? e : t.facet(hee); } -function uee(t, e) { - let r = [E5e], n; - return t instanceof BT && (t.module && r.push(kt.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(cee.of(t)) : n ? r.push(k8.computeN([kt.darkTheme], (i) => i.facet(kt.darkTheme) == (n == "dark") ? [t] : [])) : r.push(k8.of(t)), r; +function fee(t, e) { + let r = [R5e], n; + return t instanceof FT && (t.module && r.push(kt.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(hee.of(t)) : n ? r.push(C8.computeN([kt.darkTheme], (i) => i.facet(kt.darkTheme) == (n == "dark") ? [t] : [])) : r.push(C8.of(t)), r; } -class C5e { +class L5e { constructor(e) { - this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Cn(e.state), this.decorations = this.buildDeco(e, A_(e.state)); + this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Cn(e.state), this.decorations = this.buildDeco(e, M_(e.state)); } update(e) { - let r = Cn(e.state), n = A_(e.state), i = n != A_(e.startState); + let r = Cn(e.state), n = M_(e.state), i = n != M_(e.startState); r.length < e.view.viewport.to && !i && r.type == this.tree.type ? this.decorations = this.decorations.map(e.changes) : (r != this.tree || e.viewportChanged || i) && (this.tree = r, this.decorations = this.buildDeco(e.view, n)); } buildDeco(e, r) { @@ -12631,15 +12631,15 @@ class C5e { return It.none; let n = new os(); for (let { from: i, to: s } of e.visibleRanges) - j4e(this.tree, r, (a, o, l) => { + t5e(this.tree, r, (a, o, l) => { n.add(a, o, this.markCache[l] || (this.markCache[l] = It.mark({ class: l }))); }, i, s); return n.finish(); } } -const E5e = /* @__PURE__ */ uc.high(/* @__PURE__ */ hn.fromClass(C5e, { +const R5e = /* @__PURE__ */ uc.high(/* @__PURE__ */ hn.fromClass(L5e, { decorations: (t) => t.decorations -})), hee = /* @__PURE__ */ BT.define([ +})), dee = /* @__PURE__ */ FT.define([ { tag: Se.meta, color: "#404740" @@ -12717,31 +12717,31 @@ const E5e = /* @__PURE__ */ uc.high(/* @__PURE__ */ hn.fromClass(C5e, { tag: Se.invalid, color: "#f00" } -]), _5e = /* @__PURE__ */ kt.baseTheme({ +]), M5e = /* @__PURE__ */ kt.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } -}), fee = 1e4, dee = "()[]{}", pee = /* @__PURE__ */ $t.define({ +}), pee = 1e4, gee = "()[]{}", mee = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { + return gu(t, { afterCursor: !0, - brackets: dee, - maxScanDistance: fee, - renderMatch: R5e + brackets: gee, + maxScanDistance: pee, + renderMatch: N5e }); } -}), A5e = /* @__PURE__ */ It.mark({ class: "cm-matchingBracket" }), L5e = /* @__PURE__ */ It.mark({ class: "cm-nonmatchingBracket" }); -function R5e(t) { - let e = [], r = t.matched ? A5e : L5e; +}), D5e = /* @__PURE__ */ It.mark({ class: "cm-matchingBracket" }), P5e = /* @__PURE__ */ It.mark({ class: "cm-nonmatchingBracket" }); +function N5e(t) { + let e = [], r = t.matched ? D5e : P5e; return e.push(r.range(t.start.from, t.start.to)), t.end && e.push(r.range(t.end.from, t.end.to)), e; } -const M5e = /* @__PURE__ */ Xn.define({ +const I5e = /* @__PURE__ */ Xn.define({ create() { return It.none; }, update(t, e) { if (!e.docChanged && !e.selection) return t; - let r = [], n = e.state.facet(pee); + let r = [], n = e.state.facet(mee); for (let i of e.state.selection.ranges) { if (!i.empty) continue; @@ -12751,15 +12751,15 @@ const M5e = /* @__PURE__ */ Xn.define({ return It.set(r, !0); }, provide: (t) => kt.decorations.from(t) -}), D5e = [ - M5e, - _5e +}), $5e = [ + I5e, + M5e ]; -function P5e(t = {}) { - return [pee.of(t), D5e]; +function B5e(t = {}) { + return [mee.of(t), $5e]; } -const gee = /* @__PURE__ */ new yr(); -function S8(t, e, r) { +const vee = /* @__PURE__ */ new yr(); +function E8(t, e, r) { let n = t.prop(e < 0 ? yr.openedBy : yr.closedBy); if (n) return n; @@ -12770,35 +12770,35 @@ function S8(t, e, r) { } return null; } -function T8(t) { - let e = t.type.prop(gee); +function _8(t) { + let e = t.type.prop(vee); return e ? e(t.node) : t; } function zc(t, e, r, n = {}) { - let i = n.maxScanDistance || fee, s = n.brackets || dee, a = Cn(t), o = a.resolveInner(e, r); + let i = n.maxScanDistance || pee, s = n.brackets || gee, a = Cn(t), o = a.resolveInner(e, r); for (let l = o; l; l = l.parent) { - let u = S8(l.type, r, s); + let u = E8(l.type, r, s); if (u && l.from < l.to) { - let h = T8(l); + let h = _8(l); if (h && (r > 0 ? e >= h.from && e < h.to : e > h.from && e <= h.to)) - return N5e(t, e, r, l, h, u, s); + return F5e(t, e, r, l, h, u, s); } } - return I5e(t, e, r, a, o.type, i, s); + return z5e(t, e, r, a, o.type, i, s); } -function N5e(t, e, r, n, i, s, a) { +function F5e(t, e, r, n, i, s, a) { let o = n.parent, l = { from: i.from, to: i.to }, u = 0, h = o == null ? void 0 : o.cursor(); if (h && (r < 0 ? h.childBefore(n.from) : h.childAfter(n.to))) do if (r < 0 ? h.to <= n.from : h.from >= n.to) { if (u == 0 && s.indexOf(h.type.name) > -1 && h.from < h.to) { - let f = T8(h); + let f = _8(h); return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 }; - } else if (S8(h.type, r, a)) + } else if (E8(h.type, r, a)) u++; - else if (S8(h.type, -r, a)) { + else if (E8(h.type, -r, a)) { if (u == 0) { - let f = T8(h); + let f = _8(h); return { start: l, end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0, @@ -12811,7 +12811,7 @@ function N5e(t, e, r, n, i, s, a) { while (r < 0 ? h.prevSibling() : h.nextSibling()); return { start: l, matched: !1 }; } -function I5e(t, e, r, n, i, s, a) { +function z5e(t, e, r, n, i, s, a) { let o = r < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = a.indexOf(o); if (l < 0 || l % 2 == 0 != r > 0) return null; @@ -12835,7 +12835,7 @@ function I5e(t, e, r, n, i, s, a) { } return h.done ? { start: u, matched: !1 } : null; } -const $5e = /* @__PURE__ */ Object.create(null), Az = [Yi.none], Lz = [], Rz = /* @__PURE__ */ Object.create(null), B5e = /* @__PURE__ */ Object.create(null); +const Q5e = /* @__PURE__ */ Object.create(null), Rz = [Yi.none], Mz = [], Dz = /* @__PURE__ */ Object.create(null), U5e = /* @__PURE__ */ Object.create(null); for (let [t, e] of [ ["variable", "variableName"], ["variable-2", "variableName.special"], @@ -12850,38 +12850,38 @@ for (let [t, e] of [ ["header", "heading"], ["property", "propertyName"] ]) - B5e[t] = /* @__PURE__ */ F5e($5e, e); -function L_(t, e) { - Lz.indexOf(t) > -1 || (Lz.push(t), console.warn(e)); + U5e[t] = /* @__PURE__ */ V5e(Q5e, e); +function D_(t, e) { + Mz.indexOf(t) > -1 || (Mz.push(t), console.warn(e)); } -function F5e(t, e) { +function V5e(t, e) { let r = []; for (let o of e.split(" ")) { let l = []; for (let u of o.split(".")) { let h = t[u] || Se[u]; - h ? typeof h == "function" ? l.length ? l = l.map(h) : L_(u, `Modifier ${u} used at start of tag`) : l.length ? L_(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : L_(u, `Unknown highlighting tag ${u}`); + h ? typeof h == "function" ? l.length ? l = l.map(h) : D_(u, `Modifier ${u} used at start of tag`) : l.length ? D_(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : D_(u, `Unknown highlighting tag ${u}`); } for (let u of l) r.push(u); } if (!r.length) return 0; - let n = e.replace(/ /g, "_"), i = n + " " + r.map((o) => o.id), s = Rz[i]; + let n = e.replace(/ /g, "_"), i = n + " " + r.map((o) => o.id), s = Dz[i]; if (s) return s.id; - let a = Rz[i] = Yi.define({ - id: Az.length, + let a = Dz[i] = Yi.define({ + id: Rz.length, name: n, props: [fd({ [n]: r })] }); - return Az.push(a), a.id; + return Rz.push(a), a.id; } -const z5e = (t) => { - let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = hD(t.state, r.from); - return n.line ? Q5e(t) : n.block ? V5e(t) : !1; +const q5e = (t) => { + let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = dD(t.state, r.from); + return n.line ? Y5e(t) : n.block ? G5e(t) : !1; }; -function uD(t, e) { +function fD(t, e) { return ({ state: r, dispatch: n }) => { if (r.readOnly) return !1; @@ -12889,13 +12889,13 @@ function uD(t, e) { return i ? (n(r.update(i)), !0) : !1; }; } -const Q5e = /* @__PURE__ */ uD(W5e, 0), U5e = /* @__PURE__ */ uD(mee, 0), V5e = /* @__PURE__ */ uD((t, e) => mee(t, e, Y5e(e)), 0); -function hD(t, e) { +const Y5e = /* @__PURE__ */ fD(Z5e, 0), W5e = /* @__PURE__ */ fD(yee, 0), G5e = /* @__PURE__ */ fD((t, e) => yee(t, e, H5e(e)), 0); +function dD(t, e) { let r = t.languageDataAt("commentTokens", e); return r.length ? r[0] : {}; } const bv = 50; -function q5e(t, { open: e, close: r }, n, i) { +function X5e(t, { open: e, close: r }, n, i) { let s = t.sliceDoc(n - bv, n), a = t.sliceDoc(i, i + bv), o = /\s*$/.exec(s)[0].length, l = /^\s*/.exec(a)[0].length, u = s.length - o; if (s.slice(u - e.length, u) == e && a.slice(l, l + r.length) == r) return { @@ -12916,7 +12916,7 @@ function q5e(t, { open: e, close: r }, n, i) { } } : null; } -function Y5e(t) { +function H5e(t) { let e = []; for (let r of t.selection.ranges) { let n = t.doc.lineAt(r.from), i = r.to <= n.to ? n : t.doc.lineAt(r.to), s = e.length - 1; @@ -12924,11 +12924,11 @@ function Y5e(t) { } return e; } -function mee(t, e, r = e.selection.ranges) { - let n = r.map((s) => hD(e, s.from).block); +function yee(t, e, r = e.selection.ranges) { + let n = r.map((s) => dD(e, s.from).block); if (!n.every((s) => s)) return null; - let i = r.map((s, a) => q5e(e, n[a], s.from, s.to)); + let i = r.map((s, a) => X5e(e, n[a], s.from, s.to)); if (t != 2 && !i.every((s) => s)) return { changes: e.changes(r.map((s, a) => i[a] ? [] : [{ from: s.from, insert: n[a].open + " " }, { from: s.to, insert: " " + n[a].close }])) }; if (t != 1 && i.some((s) => s)) { @@ -12942,10 +12942,10 @@ function mee(t, e, r = e.selection.ranges) { } return null; } -function W5e(t, e, r = e.selection.ranges) { +function Z5e(t, e, r = e.selection.ranges) { let n = [], i = -1; for (let { from: s, to: a } of r) { - let o = n.length, l = 1e9, u = hD(e, s).line; + let o = n.length, l = 1e9, u = dD(e, s).line; if (!!u) { for (let h = s; h <= a; ) { let f = e.doc.lineAt(h); @@ -12979,9 +12979,9 @@ function W5e(t, e, r = e.selection.ranges) { } return null; } -const C8 = /* @__PURE__ */ co.define(), G5e = /* @__PURE__ */ co.define(), X5e = /* @__PURE__ */ $t.define(), vee = /* @__PURE__ */ $t.define({ +const A8 = /* @__PURE__ */ co.define(), j5e = /* @__PURE__ */ co.define(), K5e = /* @__PURE__ */ $t.define(), bee = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { + return gu(t, { minDepth: 100, newGroupDelay: 500, joinToEvent: (e, r) => r @@ -12991,17 +12991,17 @@ const C8 = /* @__PURE__ */ co.define(), G5e = /* @__PURE__ */ co.define(), X5e = joinToEvent: (e, r) => (n, i) => e(n, i) || r(n, i) }); } -}), yee = /* @__PURE__ */ Xn.define({ +}), xee = /* @__PURE__ */ Xn.define({ create() { return Qc.empty; }, update(t, e) { - let r = e.state.facet(vee), n = e.annotation(C8); + let r = e.state.facet(bee), n = e.annotation(A8); if (n) { let l = to.fromTransaction(e, n.selection), u = n.side, h = u == 0 ? t.undone : t.done; - return l ? h = Ck(h, h.length, r.minDepth, l) : h = wee(h, e.startState.selection), new Qc(u == 0 ? n.rest : h, u == 0 ? h : n.rest); + return l ? h = Ck(h, h.length, r.minDepth, l) : h = kee(h, e.startState.selection), new Qc(u == 0 ? n.rest : h, u == 0 ? h : n.rest); } - let i = e.annotation(G5e); + let i = e.annotation(j5e); if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Ei.addToHistory) === !1) return e.changes.empty ? t : t.addMapping(e.changes.desc); let s = to.fromTransaction(e), a = e.annotation(Ei.time), o = e.annotation(Ei.userEvent); @@ -13014,30 +13014,30 @@ const C8 = /* @__PURE__ */ co.define(), G5e = /* @__PURE__ */ co.define(), X5e = return new Qc(t.done.map(to.fromJSON), t.undone.map(to.fromJSON)); } }); -function fD(t = {}) { +function pD(t = {}) { return [ - yee, - vee.of(t), + xee, + bee.of(t), kt.domEventHandlers({ beforeinput(e, r) { - let n = e.inputType == "historyUndo" ? bee : e.inputType == "historyRedo" ? Tk : null; + let n = e.inputType == "historyUndo" ? wee : e.inputType == "historyRedo" ? Tk : null; return n ? (e.preventDefault(), n(r)) : !1; } }) ]; } -function FT(t, e) { +function zT(t, e) { return function({ state: r, dispatch: n }) { if (!e && r.readOnly) return !1; - let i = r.field(yee, !1); + let i = r.field(xee, !1); if (!i) return !1; let s = i.pop(t, r, e); return s ? (n(s), !0) : !1; }; } -const bee = /* @__PURE__ */ FT(0, !1), Tk = /* @__PURE__ */ FT(1, !1), H5e = /* @__PURE__ */ FT(0, !0), Z5e = /* @__PURE__ */ FT(1, !0); +const wee = /* @__PURE__ */ zT(0, !1), Tk = /* @__PURE__ */ zT(1, !1), J5e = /* @__PURE__ */ zT(0, !0), eke = /* @__PURE__ */ zT(1, !0); class to { constructor(e, r, n, i, s) { this.changes = e, this.effects = r, this.mapped = n, this.startSelection = i, this.selectionsAfter = s; @@ -13059,7 +13059,7 @@ class to { } static fromTransaction(e, r) { let n = tl; - for (let i of e.startState.facet(X5e)) { + for (let i of e.startState.facet(K5e)) { let s = i(e); s.length && (n = n.concat(s)); } @@ -13073,7 +13073,7 @@ function Ck(t, e, r, n) { let i = e + 1 > r + 20 ? e - r - 1 : 0, s = t.slice(i, e); return s.push(n), s; } -function j5e(t, e) { +function tke(t, e) { let r = [], n = !1; return t.iterChangedRanges((i, s) => r.push(i, s)), e.iterChangedRanges((i, s, a, o) => { for (let l = 0; l < r.length; ) { @@ -13082,30 +13082,30 @@ function j5e(t, e) { } }), n; } -function K5e(t, e) { +function rke(t, e) { return t.ranges.length == e.ranges.length && t.ranges.filter((r, n) => r.empty != e.ranges[n].empty).length === 0; } -function xee(t, e) { +function Oee(t, e) { return t.length ? e.length ? t.concat(e) : t : e; } -const tl = [], J5e = 200; -function wee(t, e) { +const tl = [], nke = 200; +function kee(t, e) { if (t.length) { - let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - J5e)); + let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - nke)); return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), Ck(t, t.length - 1, 1e9, r.setSelAfter(n))); } else return [to.selection([e])]; } -function eke(t) { +function ike(t) { let e = t[t.length - 1], r = t.slice(); return r[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), r; } -function R_(t, e) { +function P_(t, e) { if (!t.length) return t; let r = t.length, n = tl; for (; r; ) { - let i = tke(t[r - 1], e, n); + let i = ske(t[r - 1], e, n); if (i.changes && !i.changes.empty || i.effects.length) { let s = t.slice(0, r); return s[r - 1] = i, s; @@ -13114,14 +13114,14 @@ function R_(t, e) { } return n.length ? [to.selection(n)] : tl; } -function tke(t, e, r) { - let n = xee(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : tl, r); +function ske(t, e, r) { + let n = Oee(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : tl, r); if (!t.changes) return to.selection(n); let i = t.changes.map(e), s = e.mapDesc(t.changes, !0), a = t.mapped ? t.mapped.composeDesc(s) : s; return new to(i, or.mapEffects(t.effects, e), a, t.startSelection.map(s), n); } -const rke = /^(input\.type|delete)($|\.)/; +const ake = /^(input\.type|delete)($|\.)/; class Qc { constructor(e, r, n = 0, i = void 0) { this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = i; @@ -13131,14 +13131,14 @@ class Qc { } addChanges(e, r, n, i, s) { let a = this.done, o = a[a.length - 1]; - return o && o.changes && !o.changes.empty && e.changes && (!n || rke.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, j5e(o.changes, e.changes)) || n == "input.type.compose") ? a = Ck(a, a.length - 1, i.minDepth, new to(e.changes.compose(o.changes), xee(e.effects, o.effects), o.mapped, o.startSelection, tl)) : a = Ck(a, a.length, i.minDepth, e), new Qc(a, tl, r, n); + return o && o.changes && !o.changes.empty && e.changes && (!n || ake.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, tke(o.changes, e.changes)) || n == "input.type.compose") ? a = Ck(a, a.length - 1, i.minDepth, new to(e.changes.compose(o.changes), Oee(e.effects, o.effects), o.mapped, o.startSelection, tl)) : a = Ck(a, a.length, i.minDepth, e), new Qc(a, tl, r, n); } addSelection(e, r, n, i) { let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : tl; - return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && K5e(s[s.length - 1], e) ? this : new Qc(wee(this.done, e), this.undone, r, n); + return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && rke(s[s.length - 1], e) ? this : new Qc(kee(this.done, e), this.undone, r, n); } addMapping(e) { - return new Qc(R_(this.done, e), R_(this.undone, e), this.prevTime, this.prevUserEvent); + return new Qc(P_(this.done, e), P_(this.undone, e), this.prevTime, this.prevUserEvent); } pop(e, r, n) { let i = e == 0 ? this.done : this.undone; @@ -13148,17 +13148,17 @@ class Qc { if (n && s.selectionsAfter.length) return r.update({ selection: s.selectionsAfter[s.selectionsAfter.length - 1], - annotations: C8.of({ side: e, rest: eke(i), selection: a }), + annotations: A8.of({ side: e, rest: ike(i), selection: a }), userEvent: e == 0 ? "select.undo" : "select.redo", scrollIntoView: !0 }); if (s.changes) { let o = i.length == 1 ? tl : i.slice(0, i.length - 1); - return s.mapped && (o = R_(o, s.mapped)), r.update({ + return s.mapped && (o = P_(o, s.mapped)), r.update({ changes: s.changes, selection: s.startSelection, effects: s.effects, - annotations: C8.of({ side: e, rest: o, selection: a }), + annotations: A8.of({ side: e, rest: o, selection: a }), filter: !1, userEvent: e == 0 ? "undo" : "redo", scrollIntoView: !0 @@ -13168,65 +13168,65 @@ class Qc { } } Qc.empty = /* @__PURE__ */ new Qc(tl, tl); -const Oee = [ - { key: "Mod-z", run: bee, preventDefault: !0 }, +const See = [ + { key: "Mod-z", run: wee, preventDefault: !0 }, { key: "Mod-y", mac: "Mod-Shift-z", run: Tk, preventDefault: !0 }, { linux: "Ctrl-Shift-z", run: Tk, preventDefault: !0 }, - { key: "Mod-u", run: H5e, preventDefault: !0 }, - { key: "Alt-u", mac: "Mod-Shift-u", run: Z5e, preventDefault: !0 } + { key: "Mod-u", run: J5e, preventDefault: !0 }, + { key: "Alt-u", mac: "Mod-Shift-u", run: eke, preventDefault: !0 } ]; -function b1(t, e) { +function x1(t, e) { return je.create(t.ranges.map(e), t.mainIndex); } -function gu(t, e) { +function mu(t, e) { return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" }); } function hc({ state: t, dispatch: e }, r) { - let n = b1(t.selection, r); - return n.eq(t.selection) ? !1 : (e(gu(t, n)), !0); + let n = x1(t.selection, r); + return n.eq(t.selection) ? !1 : (e(mu(t, n)), !0); } -function zT(t, e) { +function QT(t, e) { return je.cursor(e ? t.to : t.from); } -function kee(t, e) { - return hc(t, (r) => r.empty ? t.moveByChar(r, e) : zT(r, e)); +function Tee(t, e) { + return hc(t, (r) => r.empty ? t.moveByChar(r, e) : QT(r, e)); } function sa(t) { return t.textDirectionAt(t.state.selection.main.head) == Wn.LTR; } -const See = (t) => kee(t, !sa(t)), Tee = (t) => kee(t, sa(t)); -function Cee(t, e) { - return hc(t, (r) => r.empty ? t.moveByGroup(r, e) : zT(r, e)); +const Cee = (t) => Tee(t, !sa(t)), Eee = (t) => Tee(t, sa(t)); +function _ee(t, e) { + return hc(t, (r) => r.empty ? t.moveByGroup(r, e) : QT(r, e)); } -const nke = (t) => Cee(t, !sa(t)), ike = (t) => Cee(t, sa(t)); -function ske(t, e, r) { +const oke = (t) => _ee(t, !sa(t)), lke = (t) => _ee(t, sa(t)); +function cke(t, e, r) { if (e.type.prop(r)) return !0; let n = e.to - e.from; return n && (n > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild; } -function QT(t, e, r) { +function UT(t, e, r) { let n = Cn(t).resolveInner(e.head), i = r ? yr.closedBy : yr.openedBy; for (let l = e.head; ; ) { let u = r ? n.childAfter(l) : n.childBefore(l); if (!u) break; - ske(t, u, i) ? n = u : l = r ? u.to : u.from; + cke(t, u, i) ? n = u : l = r ? u.to : u.from; } let s = n.type.prop(i), a, o; return s && (a = r ? zc(t, n.from, 1) : zc(t, n.to, -1)) && a.matched ? o = r ? a.end.to : a.end.from : o = r ? n.to : n.from, je.cursor(o, r ? -1 : 1); } -const ake = (t) => hc(t, (e) => QT(t.state, e, !sa(t))), oke = (t) => hc(t, (e) => QT(t.state, e, sa(t))); -function Eee(t, e) { +const uke = (t) => hc(t, (e) => UT(t.state, e, !sa(t))), hke = (t) => hc(t, (e) => UT(t.state, e, sa(t))); +function Aee(t, e) { return hc(t, (r) => { if (!r.empty) - return zT(r, e); + return QT(r, e); let n = t.moveVertically(r, e); return n.head != r.head ? n : t.moveToLineBoundary(r, e); }); } -const _ee = (t) => Eee(t, !1), Aee = (t) => Eee(t, !0); -function Lee(t) { +const Lee = (t) => Aee(t, !1), Ree = (t) => Aee(t, !0); +function Mee(t) { let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, r = 0, n = 0, i; if (e) { for (let s of t.state.facet(kt.scrollMargins)) { @@ -13243,8 +13243,8 @@ function Lee(t) { height: Math.max(t.defaultLineHeight, i - 5) }; } -function Ree(t, e) { - let r = Lee(t), { state: n } = t, i = b1(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : zT(a, e)); +function Dee(t, e) { + let r = Mee(t), { state: n } = t, i = x1(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : QT(a, e)); if (i.eq(n.selection)) return !1; let s; @@ -13252,9 +13252,9 @@ function Ree(t, e) { let a = t.coordsAtPos(n.selection.main.head), o = t.scrollDOM.getBoundingClientRect(), l = o.top + r.marginTop, u = o.bottom - r.marginBottom; a && a.top > l && a.bottom < u && (s = kt.scrollIntoView(i.main.head, { y: "start", yMargin: a.top - l })); } - return t.dispatch(gu(n, i), { effects: s }), !0; + return t.dispatch(mu(n, i), { effects: s }), !0; } -const Mz = (t) => Ree(t, !1), E8 = (t) => Ree(t, !0); +const Pz = (t) => Dee(t, !1), L8 = (t) => Dee(t, !0); function dd(t, e, r) { let n = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, r); if (i.head == e.head && i.head != (r ? n.to : n.from) && (i = t.moveToLineBoundary(e, r, !1)), !r && i.head == n.from && n.length) { @@ -13263,9 +13263,9 @@ function dd(t, e, r) { } return i; } -const lke = (t) => hc(t, (e) => dd(t, e, !0)), cke = (t) => hc(t, (e) => dd(t, e, !1)), uke = (t) => hc(t, (e) => dd(t, e, !sa(t))), hke = (t) => hc(t, (e) => dd(t, e, sa(t))), fke = (t) => hc(t, (e) => je.cursor(t.lineBlockAt(e.head).from, 1)), dke = (t) => hc(t, (e) => je.cursor(t.lineBlockAt(e.head).to, -1)); -function pke(t, e, r) { - let n = !1, i = b1(t.selection, (s) => { +const fke = (t) => hc(t, (e) => dd(t, e, !0)), dke = (t) => hc(t, (e) => dd(t, e, !1)), pke = (t) => hc(t, (e) => dd(t, e, !sa(t))), gke = (t) => hc(t, (e) => dd(t, e, sa(t))), mke = (t) => hc(t, (e) => je.cursor(t.lineBlockAt(e.head).from, 1)), vke = (t) => hc(t, (e) => je.cursor(t.lineBlockAt(e.head).to, -1)); +function yke(t, e, r) { + let n = !1, i = x1(t.selection, (s) => { let a = zc(t, s.head, -1) || zc(t, s.head, 1) || s.head > 0 && zc(t, s.head - 1, 1) || s.head < t.doc.length && zc(t, s.head + 1, -1); if (!a || !a.end) return s; @@ -13273,36 +13273,36 @@ function pke(t, e, r) { let o = a.start.from == s.head ? a.end.to : a.end.from; return r ? je.range(s.anchor, o) : je.cursor(o); }); - return n ? (e(gu(t, i)), !0) : !1; + return n ? (e(mu(t, i)), !0) : !1; } -const gke = ({ state: t, dispatch: e }) => pke(t, e, !1); +const bke = ({ state: t, dispatch: e }) => yke(t, e, !1); function kl(t, e) { - let r = b1(t.state.selection, (n) => { + let r = x1(t.state.selection, (n) => { let i = e(n); return je.range(n.anchor, i.head, i.goalColumn, i.bidiLevel || void 0); }); - return r.eq(t.state.selection) ? !1 : (t.dispatch(gu(t.state, r)), !0); + return r.eq(t.state.selection) ? !1 : (t.dispatch(mu(t.state, r)), !0); } -function Mee(t, e) { +function Pee(t, e) { return kl(t, (r) => t.moveByChar(r, e)); } -const Dee = (t) => Mee(t, !sa(t)), Pee = (t) => Mee(t, sa(t)); -function Nee(t, e) { +const Nee = (t) => Pee(t, !sa(t)), Iee = (t) => Pee(t, sa(t)); +function $ee(t, e) { return kl(t, (r) => t.moveByGroup(r, e)); } -const mke = (t) => Nee(t, !sa(t)), vke = (t) => Nee(t, sa(t)), yke = (t) => kl(t, (e) => QT(t.state, e, !sa(t))), bke = (t) => kl(t, (e) => QT(t.state, e, sa(t))); -function Iee(t, e) { +const xke = (t) => $ee(t, !sa(t)), wke = (t) => $ee(t, sa(t)), Oke = (t) => kl(t, (e) => UT(t.state, e, !sa(t))), kke = (t) => kl(t, (e) => UT(t.state, e, sa(t))); +function Bee(t, e) { return kl(t, (r) => t.moveVertically(r, e)); } -const $ee = (t) => Iee(t, !1), Bee = (t) => Iee(t, !0); -function Fee(t, e) { - return kl(t, (r) => t.moveVertically(r, e, Lee(t).height)); +const Fee = (t) => Bee(t, !1), zee = (t) => Bee(t, !0); +function Qee(t, e) { + return kl(t, (r) => t.moveVertically(r, e, Mee(t).height)); } -const Dz = (t) => Fee(t, !1), Pz = (t) => Fee(t, !0), xke = (t) => kl(t, (e) => dd(t, e, !0)), wke = (t) => kl(t, (e) => dd(t, e, !1)), Oke = (t) => kl(t, (e) => dd(t, e, !sa(t))), kke = (t) => kl(t, (e) => dd(t, e, sa(t))), Ske = (t) => kl(t, (e) => je.cursor(t.lineBlockAt(e.head).from)), Tke = (t) => kl(t, (e) => je.cursor(t.lineBlockAt(e.head).to)), Nz = ({ state: t, dispatch: e }) => (e(gu(t, { anchor: 0 })), !0), Iz = ({ state: t, dispatch: e }) => (e(gu(t, { anchor: t.doc.length })), !0), $z = ({ state: t, dispatch: e }) => (e(gu(t, { anchor: t.selection.main.anchor, head: 0 })), !0), Bz = ({ state: t, dispatch: e }) => (e(gu(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Cke = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Eke = ({ state: t, dispatch: e }) => { - let r = UT(t).map(({ from: n, to: i }) => je.range(n, Math.min(i + 1, t.doc.length))); +const Nz = (t) => Qee(t, !1), Iz = (t) => Qee(t, !0), Ske = (t) => kl(t, (e) => dd(t, e, !0)), Tke = (t) => kl(t, (e) => dd(t, e, !1)), Cke = (t) => kl(t, (e) => dd(t, e, !sa(t))), Eke = (t) => kl(t, (e) => dd(t, e, sa(t))), _ke = (t) => kl(t, (e) => je.cursor(t.lineBlockAt(e.head).from)), Ake = (t) => kl(t, (e) => je.cursor(t.lineBlockAt(e.head).to)), $z = ({ state: t, dispatch: e }) => (e(mu(t, { anchor: 0 })), !0), Bz = ({ state: t, dispatch: e }) => (e(mu(t, { anchor: t.doc.length })), !0), Fz = ({ state: t, dispatch: e }) => (e(mu(t, { anchor: t.selection.main.anchor, head: 0 })), !0), zz = ({ state: t, dispatch: e }) => (e(mu(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Lke = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Rke = ({ state: t, dispatch: e }) => { + let r = VT(t).map(({ from: n, to: i }) => je.range(n, Math.min(i + 1, t.doc.length))); return e(t.update({ selection: je.create(r), userEvent: "select" })), !0; -}, _ke = ({ state: t, dispatch: e }) => { - let r = b1(t.selection, (n) => { +}, Mke = ({ state: t, dispatch: e }) => { + let r = x1(t.selection, (n) => { var i; let s = Cn(t).resolveStack(n.from, 1); for (let a = s; a; a = a.next) { @@ -13312,10 +13312,10 @@ const Dz = (t) => Fee(t, !1), Pz = (t) => Fee(t, !0), xke = (t) => kl(t, (e) => } return n; }); - return e(gu(t, r)), !0; -}, Ake = ({ state: t, dispatch: e }) => { + return e(mu(t, r)), !0; +}, Dke = ({ state: t, dispatch: e }) => { let r = t.selection, n = null; - return r.ranges.length > 1 ? n = je.create([r.main]) : r.main.empty || (n = je.create([je.cursor(r.main.head)])), n ? (e(gu(t, n)), !0) : !1; + return r.ranges.length > 1 ? n = je.create([r.main]) : r.main.empty || (n = je.create([je.cursor(r.main.head)])), n ? (e(mu(t, n)), !0) : !1; }; function Fx(t, e) { if (t.state.readOnly) @@ -13343,7 +13343,7 @@ function wO(t, e, r) { }); return e; } -const zee = (t, e) => Fx(t, (r) => { +const Uee = (t, e) => Fx(t, (r) => { let n = r.from, { state: i } = t, s = i.doc.lineAt(n), a, o; if (!e && n > s.from && n < s.from + 200 && !/[^ \t]/.test(a = s.text.slice(0, n - s.from))) { if (a[a.length - 1] == " ") @@ -13355,7 +13355,7 @@ const zee = (t, e) => Fx(t, (r) => { } else o = Os(s.text, n - s.from, e, e) + s.from, o == n && s.number != (e ? i.doc.lines : 1) ? o += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(s.text.slice(o - s.from, n - s.from)) && (o = Os(s.text, o - s.from, !1, !1) + s.from); return o; -}), _8 = (t) => zee(t, !1), Qee = (t) => zee(t, !0), Uee = (t, e) => Fx(t, (r) => { +}), R8 = (t) => Uee(t, !1), Vee = (t) => Uee(t, !0), qee = (t, e) => Fx(t, (r) => { let n = r.head, { state: i } = t, s = i.doc.lineAt(n), a = i.charCategorizer(n); for (let o = null; ; ) { if (n == (e ? s.to : s.from)) { @@ -13368,16 +13368,16 @@ const zee = (t, e) => Fx(t, (r) => { (u != " " || n != r.head) && (o = h), n = l; } return n; -}), Vee = (t) => Uee(t, !1), Lke = (t) => Uee(t, !0), Rke = (t) => Fx(t, (e) => { +}), Yee = (t) => qee(t, !1), Pke = (t) => qee(t, !0), Nke = (t) => Fx(t, (e) => { let r = t.lineBlockAt(e.head).to; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), Mke = (t) => Fx(t, (e) => { +}), Ike = (t) => Fx(t, (e) => { let r = t.moveToLineBoundary(e, !1).head; return e.head > r ? r : Math.max(0, e.head - 1); -}), Dke = (t) => Fx(t, (e) => { +}), $ke = (t) => Fx(t, (e) => { let r = t.moveToLineBoundary(e, !0).head; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), Pke = ({ state: t, dispatch: e }) => { +}), Bke = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => ({ @@ -13385,7 +13385,7 @@ const zee = (t, e) => Fx(t, (r) => { range: je.cursor(n.from) })); return e(t.update(r, { scrollIntoView: !0, userEvent: "input" })), !0; -}, Nke = ({ state: t, dispatch: e }) => { +}, Fke = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => { @@ -13399,7 +13399,7 @@ const zee = (t, e) => Fx(t, (r) => { }); return r.changes.empty ? !1 : (e(t.update(r, { scrollIntoView: !0, userEvent: "move.character" })), !0); }; -function UT(t) { +function VT(t) { let e = [], r = -1; for (let n of t.selection.ranges) { let i = t.doc.lineAt(n.from), s = t.doc.lineAt(n.to); @@ -13412,11 +13412,11 @@ function UT(t) { } return e; } -function qee(t, e, r) { +function Wee(t, e, r) { if (t.readOnly) return !1; let n = [], i = []; - for (let s of UT(t)) { + for (let s of VT(t)) { if (r ? s.to == t.doc.length : s.from == 0) continue; let a = t.doc.lineAt(r ? s.to + 1 : s.from - 1), o = a.length + 1; @@ -13437,36 +13437,36 @@ function qee(t, e, r) { userEvent: "move.line" })), !0) : !1; } -const Ike = ({ state: t, dispatch: e }) => qee(t, e, !1), $ke = ({ state: t, dispatch: e }) => qee(t, e, !0); -function Yee(t, e, r) { +const zke = ({ state: t, dispatch: e }) => Wee(t, e, !1), Qke = ({ state: t, dispatch: e }) => Wee(t, e, !0); +function Gee(t, e, r) { if (t.readOnly) return !1; let n = []; - for (let i of UT(t)) + for (let i of VT(t)) r ? n.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : n.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) }); return e(t.update({ changes: n, scrollIntoView: !0, userEvent: "input.copyline" })), !0; } -const Bke = ({ state: t, dispatch: e }) => Yee(t, e, !1), Fke = ({ state: t, dispatch: e }) => Yee(t, e, !0), zke = (t) => { +const Uke = ({ state: t, dispatch: e }) => Gee(t, e, !1), Vke = ({ state: t, dispatch: e }) => Gee(t, e, !0), qke = (t) => { if (t.state.readOnly) return !1; - let { state: e } = t, r = e.changes(UT(e).map(({ from: i, to: s }) => (i > 0 ? i-- : s < e.doc.length && s++, { from: i, to: s }))), n = b1(e.selection, (i) => t.moveVertically(i, !0)).map(r); + let { state: e } = t, r = e.changes(VT(e).map(({ from: i, to: s }) => (i > 0 ? i-- : s < e.doc.length && s++, { from: i, to: s }))), n = x1(e.selection, (i) => t.moveVertically(i, !0)).map(r); return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0; }; -function Qke(t, e) { +function Yke(t, e) { if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1))) return { from: e, to: e }; let r = Cn(t).resolveInner(e), n = r.childBefore(e), i = r.childAfter(e), s; return n && i && n.to <= e && i.from >= e && (s = n.type.prop(yr.closedBy)) && s.indexOf(i.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(n.to, i.from)) ? { from: n.to, to: i.from } : null; } -const Uke = /* @__PURE__ */ Wee(!1), Vke = /* @__PURE__ */ Wee(!0); -function Wee(t) { +const Wke = /* @__PURE__ */ Xee(!1), Gke = /* @__PURE__ */ Xee(!0); +function Xee(t) { return ({ state: e, dispatch: r }) => { if (e.readOnly) return !1; let n = e.changeByRange((i) => { - let { from: s, to: a } = i, o = e.doc.lineAt(s), l = !t && s == a && Qke(e, s); + let { from: s, to: a } = i, o = e.doc.lineAt(s), l = !t && s == a && Yke(e, s); t && (s = a = (a <= o.to ? o : e.doc.lineAt(a)).to); - let u = new $T(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = aD(u, s); + let u = new BT(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = lD(u, s); for (h == null && (h = tc(/^\s*/.exec(e.doc.lineAt(s).text)[0], e.tabSize)); a < o.to && /\s/.test(o.text[a - o.from]); ) a++; l ? { from: s, to: a } = l : s > o.from && s < o.from + 100 && !/\S/.test(o.text.slice(0, s)) && (s = o.from); @@ -13479,7 +13479,7 @@ function Wee(t) { return r(e.update(n, { scrollIntoView: !0, userEvent: "input" })), !0; }; } -function dD(t, e) { +function gD(t, e) { let r = -1; return t.changeByRange((n) => { let i = []; @@ -13494,14 +13494,14 @@ function dD(t, e) { }; }); } -const qke = ({ state: t, dispatch: e }) => { +const Xke = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; - let r = /* @__PURE__ */ Object.create(null), n = new $T(t, { overrideIndentation: (s) => { + let r = /* @__PURE__ */ Object.create(null), n = new BT(t, { overrideIndentation: (s) => { let a = r[s]; return a == null ? -1 : a; - } }), i = dD(t, (s, a, o) => { - let l = aD(n, s.from); + } }), i = gD(t, (s, a, o) => { + let l = lD(n, s.from); if (l == null) return; /\S/.test(s.text) || (l = 0); @@ -13509,9 +13509,9 @@ const qke = ({ state: t, dispatch: e }) => { (u != h || o.from < s.from + u.length) && (r[s.from] = l, a.push({ from: s.from, to: s.from + u.length, insert: h })); }); return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0; -}, Gee = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(dD(t, (r, n) => { +}, Hee = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(gD(t, (r, n) => { n.push({ from: r.from, insert: t.facet(Bx) }); -}), { userEvent: "input.indent" })), !0), Xee = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(dD(t, (r, n) => { +}), { userEvent: "input.indent" })), !0), Zee = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(gD(t, (r, n) => { let i = /^\s*/.exec(r.text)[0]; if (!i) return; @@ -13519,66 +13519,66 @@ const qke = ({ state: t, dispatch: e }) => { for (; a < i.length && a < o.length && i.charCodeAt(a) == o.charCodeAt(a); ) a++; n.push({ from: r.from + a, to: r.from + i.length, insert: o.slice(a) }); -}), { userEvent: "delete.dedent" })), !0), Yke = [ - { key: "Ctrl-b", run: See, shift: Dee, preventDefault: !0 }, - { key: "Ctrl-f", run: Tee, shift: Pee }, - { key: "Ctrl-p", run: _ee, shift: $ee }, - { key: "Ctrl-n", run: Aee, shift: Bee }, - { key: "Ctrl-a", run: fke, shift: Ske }, - { key: "Ctrl-e", run: dke, shift: Tke }, - { key: "Ctrl-d", run: Qee }, - { key: "Ctrl-h", run: _8 }, - { key: "Ctrl-k", run: Rke }, - { key: "Ctrl-Alt-h", run: Vee }, - { key: "Ctrl-o", run: Pke }, - { key: "Ctrl-t", run: Nke }, - { key: "Ctrl-v", run: E8 } -], Wke = /* @__PURE__ */ [ - { key: "ArrowLeft", run: See, shift: Dee, preventDefault: !0 }, - { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: nke, shift: mke, preventDefault: !0 }, - { mac: "Cmd-ArrowLeft", run: uke, shift: Oke, preventDefault: !0 }, - { key: "ArrowRight", run: Tee, shift: Pee, preventDefault: !0 }, - { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: ike, shift: vke, preventDefault: !0 }, - { mac: "Cmd-ArrowRight", run: hke, shift: kke, preventDefault: !0 }, - { key: "ArrowUp", run: _ee, shift: $ee, preventDefault: !0 }, - { mac: "Cmd-ArrowUp", run: Nz, shift: $z }, - { mac: "Ctrl-ArrowUp", run: Mz, shift: Dz }, - { key: "ArrowDown", run: Aee, shift: Bee, preventDefault: !0 }, - { mac: "Cmd-ArrowDown", run: Iz, shift: Bz }, - { mac: "Ctrl-ArrowDown", run: E8, shift: Pz }, - { key: "PageUp", run: Mz, shift: Dz }, - { key: "PageDown", run: E8, shift: Pz }, - { key: "Home", run: cke, shift: wke, preventDefault: !0 }, - { key: "Mod-Home", run: Nz, shift: $z }, - { key: "End", run: lke, shift: xke, preventDefault: !0 }, - { key: "Mod-End", run: Iz, shift: Bz }, - { key: "Enter", run: Uke }, - { key: "Mod-a", run: Cke }, - { key: "Backspace", run: _8, shift: _8 }, - { key: "Delete", run: Qee }, - { key: "Mod-Backspace", mac: "Alt-Backspace", run: Vee }, - { key: "Mod-Delete", mac: "Alt-Delete", run: Lke }, - { mac: "Mod-Backspace", run: Mke }, - { mac: "Mod-Delete", run: Dke } -].concat(/* @__PURE__ */ Yke.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Hee = /* @__PURE__ */ [ - { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: ake, shift: yke }, - { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: oke, shift: bke }, - { key: "Alt-ArrowUp", run: Ike }, - { key: "Shift-Alt-ArrowUp", run: Bke }, - { key: "Alt-ArrowDown", run: $ke }, - { key: "Shift-Alt-ArrowDown", run: Fke }, - { key: "Escape", run: Ake }, - { key: "Mod-Enter", run: Vke }, - { key: "Alt-l", mac: "Ctrl-l", run: Eke }, - { key: "Mod-i", run: _ke, preventDefault: !0 }, - { key: "Mod-[", run: Xee }, - { key: "Mod-]", run: Gee }, - { key: "Mod-Alt-\\", run: qke }, - { key: "Shift-Mod-k", run: zke }, - { key: "Shift-Mod-\\", run: gke }, - { key: "Mod-/", run: z5e }, - { key: "Alt-A", run: U5e } -].concat(Wke), Gke = { key: "Tab", run: Gee, shift: Xee }; +}), { userEvent: "delete.dedent" })), !0), Hke = [ + { key: "Ctrl-b", run: Cee, shift: Nee, preventDefault: !0 }, + { key: "Ctrl-f", run: Eee, shift: Iee }, + { key: "Ctrl-p", run: Lee, shift: Fee }, + { key: "Ctrl-n", run: Ree, shift: zee }, + { key: "Ctrl-a", run: mke, shift: _ke }, + { key: "Ctrl-e", run: vke, shift: Ake }, + { key: "Ctrl-d", run: Vee }, + { key: "Ctrl-h", run: R8 }, + { key: "Ctrl-k", run: Nke }, + { key: "Ctrl-Alt-h", run: Yee }, + { key: "Ctrl-o", run: Bke }, + { key: "Ctrl-t", run: Fke }, + { key: "Ctrl-v", run: L8 } +], Zke = /* @__PURE__ */ [ + { key: "ArrowLeft", run: Cee, shift: Nee, preventDefault: !0 }, + { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: oke, shift: xke, preventDefault: !0 }, + { mac: "Cmd-ArrowLeft", run: pke, shift: Cke, preventDefault: !0 }, + { key: "ArrowRight", run: Eee, shift: Iee, preventDefault: !0 }, + { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: lke, shift: wke, preventDefault: !0 }, + { mac: "Cmd-ArrowRight", run: gke, shift: Eke, preventDefault: !0 }, + { key: "ArrowUp", run: Lee, shift: Fee, preventDefault: !0 }, + { mac: "Cmd-ArrowUp", run: $z, shift: Fz }, + { mac: "Ctrl-ArrowUp", run: Pz, shift: Nz }, + { key: "ArrowDown", run: Ree, shift: zee, preventDefault: !0 }, + { mac: "Cmd-ArrowDown", run: Bz, shift: zz }, + { mac: "Ctrl-ArrowDown", run: L8, shift: Iz }, + { key: "PageUp", run: Pz, shift: Nz }, + { key: "PageDown", run: L8, shift: Iz }, + { key: "Home", run: dke, shift: Tke, preventDefault: !0 }, + { key: "Mod-Home", run: $z, shift: Fz }, + { key: "End", run: fke, shift: Ske, preventDefault: !0 }, + { key: "Mod-End", run: Bz, shift: zz }, + { key: "Enter", run: Wke }, + { key: "Mod-a", run: Lke }, + { key: "Backspace", run: R8, shift: R8 }, + { key: "Delete", run: Vee }, + { key: "Mod-Backspace", mac: "Alt-Backspace", run: Yee }, + { key: "Mod-Delete", mac: "Alt-Delete", run: Pke }, + { mac: "Mod-Backspace", run: Ike }, + { mac: "Mod-Delete", run: $ke } +].concat(/* @__PURE__ */ Hke.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), jee = /* @__PURE__ */ [ + { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: uke, shift: Oke }, + { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: hke, shift: kke }, + { key: "Alt-ArrowUp", run: zke }, + { key: "Shift-Alt-ArrowUp", run: Uke }, + { key: "Alt-ArrowDown", run: Qke }, + { key: "Shift-Alt-ArrowDown", run: Vke }, + { key: "Escape", run: Dke }, + { key: "Mod-Enter", run: Gke }, + { key: "Alt-l", mac: "Ctrl-l", run: Rke }, + { key: "Mod-i", run: Mke, preventDefault: !0 }, + { key: "Mod-[", run: Zee }, + { key: "Mod-]", run: Hee }, + { key: "Mod-Alt-\\", run: Xke }, + { key: "Shift-Mod-k", run: qke }, + { key: "Shift-Mod-\\", run: bke }, + { key: "Mod-/", run: q5e }, + { key: "Alt-A", run: W5e } +].concat(Zke), jke = { key: "Tab", run: Hee, shift: Zee }; function kn() { var t = arguments[0]; typeof t == "string" && (t = document.createElement(t)); @@ -13592,10 +13592,10 @@ function kn() { e++; } for (; e < arguments.length; e++) - Zee(t, arguments[e]); + Kee(t, arguments[e]); return t; } -function Zee(t, e) { +function Kee(t, e) { if (typeof e == "string") t.appendChild(document.createTextNode(e)); else if (e != null) @@ -13603,14 +13603,14 @@ function Zee(t, e) { t.appendChild(e); else if (Array.isArray(e)) for (var r = 0; r < e.length; r++) - Zee(t, e[r]); + Kee(t, e[r]); else throw new RangeError("Unsupported child node: " + e); } -const Fz = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; -class pm { +const Qz = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; +class gm { constructor(e, r, n = 0, i = e.length, s, a) { - this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, i), this.bufferStart = n, this.normalize = s ? (o) => s(Fz(o)) : Fz, this.query = this.normalize(r); + this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, i), this.bufferStart = n, this.normalize = s ? (o) => s(Qz(o)) : Qz, this.query = this.normalize(r); } peek() { if (this.bufferPos == this.buffer.length) { @@ -13630,7 +13630,7 @@ class pm { let e = this.peek(); if (e < 0) return this.done = !0, this; - let r = UM(e), n = this.bufferStart + this.bufferPos; + let r = qM(e), n = this.bufferStart + this.bufferPos; this.bufferPos += Ho(e); let i = this.normalize(r); for (let s = 0, a = n; ; s++) { @@ -13653,15 +13653,15 @@ class pm { return this.query.charCodeAt(0) == e && (this.query.length == 1 ? n = { from: r, to: r + 1 } : this.matches.push(1, r)), n && this.test && !this.test(n.from, n.to, this.buffer, this.bufferStart) && (n = null), n; } } -typeof Symbol < "u" && (pm.prototype[Symbol.iterator] = function() { +typeof Symbol < "u" && (gm.prototype[Symbol.iterator] = function() { return this; }); -const jee = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, pD = "gm" + (/x/.unicode == null ? "" : "u"); -class Kee { +const Jee = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, mD = "gm" + (/x/.unicode == null ? "" : "u"); +class ete { constructor(e, r, n, i = 0, s = e.length) { - if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = jee, /\\[sWDnr]|\n|\r|\[\^/.test(r)) - return new Jee(e, r, n, i, s); - this.re = new RegExp(r, pD + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = e.iter(); + if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = Jee, /\\[sWDnr]|\n|\r|\[\^/.test(r)) + return new tte(e, r, n, i, s); + this.re = new RegExp(r, mD + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = e.iter(); let a = e.lineAt(i); this.curLineStart = a.from, this.matchPos = Ek(e, i), this.getLine(this.curLineStart); } @@ -13687,8 +13687,8 @@ class Kee { } } } -const M_ = /* @__PURE__ */ new WeakMap(); -class Rg { +const N_ = /* @__PURE__ */ new WeakMap(); +class Mg { constructor(e, r) { this.from = e, this.text = r; } @@ -13696,20 +13696,20 @@ class Rg { return this.from + this.text.length; } static get(e, r, n) { - let i = M_.get(e); + let i = N_.get(e); if (!i || i.from >= n || i.to <= r) { - let o = new Rg(r, e.sliceString(r, n)); - return M_.set(e, o), o; + let o = new Mg(r, e.sliceString(r, n)); + return N_.set(e, o), o; } if (i.from == r && i.to == n) return i; let { text: s, from: a } = i; - return a > r && (s = e.sliceString(r, a) + s, a = r), i.to < n && (s += e.sliceString(i.to, n)), M_.set(e, new Rg(a, s)), new Rg(r, s.slice(r - a, n - a)); + return a > r && (s = e.sliceString(r, a) + s, a = r), i.to < n && (s += e.sliceString(i.to, n)), N_.set(e, new Mg(a, s)), new Mg(r, s.slice(r - a, n - a)); } } -class Jee { +class tte { constructor(e, r, n, i, s) { - this.text = e, this.to = s, this.done = !1, this.value = jee, this.matchPos = Ek(e, i), this.re = new RegExp(r, pD + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Rg.get(e, i, this.chunkEnd(i + 5e3)); + this.text = e, this.to = s, this.done = !1, this.value = Jee, this.matchPos = Ek(e, i), this.re = new RegExp(r, mD + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Mg.get(e, i, this.chunkEnd(i + 5e3)); } chunkEnd(e) { return e >= this.to ? this.to : this.text.lineAt(e).to; @@ -13724,16 +13724,16 @@ class Jee { } if (this.flat.to == this.to) return this.done = !0, this; - this.flat = Rg.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2)); + this.flat = Mg.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2)); } } } -typeof Symbol < "u" && (Kee.prototype[Symbol.iterator] = Jee.prototype[Symbol.iterator] = function() { +typeof Symbol < "u" && (ete.prototype[Symbol.iterator] = tte.prototype[Symbol.iterator] = function() { return this; }); -function Xke(t) { +function Kke(t) { try { - return new RegExp(t, pD), !0; + return new RegExp(t, mD), !0; } catch { return !1; } @@ -13746,7 +13746,7 @@ function Ek(t, e) { e++; return e; } -function A8(t) { +function M8(t) { let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), r = kn("input", { class: "cm-textfield", name: "line", value: e }), n = kn("form", { class: "cm-gotoLine", onkeydown: (s) => { @@ -13774,7 +13774,7 @@ function A8(t) { } return { dom: n }; } -const _k = /* @__PURE__ */ or.define(), zz = /* @__PURE__ */ Xn.define({ +const _k = /* @__PURE__ */ or.define(), Uz = /* @__PURE__ */ Xn.define({ create() { return !0; }, @@ -13783,45 +13783,45 @@ const _k = /* @__PURE__ */ or.define(), zz = /* @__PURE__ */ Xn.define({ r.is(_k) && (t = r.value); return t; }, - provide: (t) => y2.from(t, (e) => e ? A8 : null) -}), Hke = (t) => { - let e = v2(t, A8); + provide: (t) => y2.from(t, (e) => e ? M8 : null) +}), Jke = (t) => { + let e = v2(t, M8); if (!e) { let r = [_k.of(!0)]; - t.state.field(zz, !1) == null && r.push(or.appendConfig.of([zz, Zke])), t.dispatch({ effects: r }), e = v2(t, A8); + t.state.field(Uz, !1) == null && r.push(or.appendConfig.of([Uz, e3e])), t.dispatch({ effects: r }), e = v2(t, M8); } return e && e.dom.querySelector("input").select(), !0; -}, Zke = /* @__PURE__ */ kt.baseTheme({ +}, e3e = /* @__PURE__ */ kt.baseTheme({ ".cm-panel.cm-gotoLine": { padding: "2px 6px 4px", "& label": { fontSize: "80%" } } -}), jke = { +}), t3e = { highlightWordAroundCursor: !1, minSelectionLength: 1, maxMatches: 100, wholeWords: !1 -}, ete = /* @__PURE__ */ $t.define({ +}, rte = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, jke, { + return gu(t, t3e, { highlightWordAroundCursor: (e, r) => e || r, minSelectionLength: Math.min, maxMatches: Math.min }); } }); -function Kke(t) { - let e = [n3e, r3e]; - return t && e.push(ete.of(t)), e; +function r3e(t) { + let e = [o3e, a3e]; + return t && e.push(rte.of(t)), e; } -const Jke = /* @__PURE__ */ It.mark({ class: "cm-selectionMatch" }), e3e = /* @__PURE__ */ It.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); -function Qz(t, e, r, n) { +const n3e = /* @__PURE__ */ It.mark({ class: "cm-selectionMatch" }), i3e = /* @__PURE__ */ It.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); +function Vz(t, e, r, n) { return (r == 0 || t(e.sliceDoc(r - 1, r)) != Fn.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != Fn.Word); } -function t3e(t, e, r, n) { +function s3e(t, e, r, n) { return t(e.sliceDoc(r, r + 1)) == Fn.Word && t(e.sliceDoc(n - 1, n)) == Fn.Word; } -const r3e = /* @__PURE__ */ hn.fromClass(class { +const a3e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -13829,7 +13829,7 @@ const r3e = /* @__PURE__ */ hn.fromClass(class { (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view)); } getDeco(t) { - let e = t.state.facet(ete), { state: r } = t, n = r.selection; + let e = t.state.facet(rte), { state: r } = t, n = r.selection; if (n.ranges.length > 1) return It.none; let i = n.main, s, a = null; @@ -13845,17 +13845,17 @@ const r3e = /* @__PURE__ */ hn.fromClass(class { if (l < e.minSelectionLength || l > 200) return It.none; if (e.wholeWords) { - if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(Qz(a, r, i.from, i.to) && t3e(a, r, i.from, i.to))) + if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(Vz(a, r, i.from, i.to) && s3e(a, r, i.from, i.to))) return It.none; } else if (s = r.sliceDoc(i.from, i.to).trim(), !s) return It.none; } let o = []; for (let l of t.visibleRanges) { - let u = new pm(r.doc, s, l.from, l.to); + let u = new gm(r.doc, s, l.from, l.to); for (; !u.next().done; ) { let { from: h, to: f } = u.value; - if ((!a || Qz(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(e3e.range(h, f)) : (h >= i.to || f <= i.from) && o.push(Jke.range(h, f)), o.length > e.maxMatches)) + if ((!a || Vz(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(i3e.range(h, f)) : (h >= i.to || f <= i.from) && o.push(n3e.range(h, f)), o.length > e.maxMatches)) return It.none; } } @@ -13863,20 +13863,20 @@ const r3e = /* @__PURE__ */ hn.fromClass(class { } }, { decorations: (t) => t.decorations -}), n3e = /* @__PURE__ */ kt.baseTheme({ +}), o3e = /* @__PURE__ */ kt.baseTheme({ ".cm-selectionMatch": { backgroundColor: "#99ff7780" }, ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" } -}), i3e = ({ state: t, dispatch: e }) => { +}), l3e = ({ state: t, dispatch: e }) => { let { selection: r } = t, n = je.create(r.ranges.map((i) => t.wordAt(i.head) || je.cursor(i.head)), r.mainIndex); return n.eq(r) ? !1 : (e(t.update({ selection: n })), !0); }; -function s3e(t, e) { +function c3e(t, e) { let { main: r, ranges: n } = t.selection, i = t.wordAt(r.head), s = i && i.from == r.from && i.to == r.to; - for (let a = !1, o = new pm(t.doc, e, n[n.length - 1].to); ; ) + for (let a = !1, o = new gm(t.doc, e, n[n.length - 1].to); ; ) if (o.next(), o.done) { if (a) return null; - o = new pm(t.doc, e, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0; + o = new gm(t.doc, e, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0; } else { if (a && n.some((l) => l.from == o.value.from)) continue; @@ -13888,34 +13888,34 @@ function s3e(t, e) { return o.value; } } -const a3e = ({ state: t, dispatch: e }) => { +const u3e = ({ state: t, dispatch: e }) => { let { ranges: r } = t.selection; if (r.some((s) => s.from === s.to)) - return i3e({ state: t, dispatch: e }); + return l3e({ state: t, dispatch: e }); let n = t.sliceDoc(r[0].from, r[0].to); if (t.selection.ranges.some((s) => t.sliceDoc(s.from, s.to) != n)) return !1; - let i = s3e(t, n); + let i = c3e(t, n); return i ? (e(t.update({ selection: t.selection.addRange(je.range(i.from, i.to), !1), effects: kt.scrollIntoView(i.to) })), !0) : !1; -}, x1 = /* @__PURE__ */ $t.define({ +}, w1 = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { + return gu(t, { top: !1, caseSensitive: !1, literal: !1, regexp: !1, wholeWord: !1, - createPanel: (e) => new y3e(e), + createPanel: (e) => new O3e(e), scrollToMatch: (e) => kt.scrollIntoView(e) }); } }); -class tte { +class nte { constructor(e) { - this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || Xke(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord; + this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || Kke(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord; } unquote(e) { return this.literal ? e : e.replace(/\\([nrt\\])/g, (r, n) => n == "n" ? ` @@ -13925,35 +13925,35 @@ class tte { return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord; } create() { - return this.regexp ? new u3e(this) : new l3e(this); + return this.regexp ? new p3e(this) : new f3e(this); } getCursor(e, r = 0, n) { let i = e.doc ? e : Sr.create({ doc: e }); - return n == null && (n = i.doc.length), this.regexp ? ig(this, i, r, n) : ng(this, i, r, n); + return n == null && (n = i.doc.length), this.regexp ? sg(this, i, r, n) : ig(this, i, r, n); } } -class rte { +class ite { constructor(e) { this.spec = e; } } -function ng(t, e, r, n) { - return new pm(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? o3e(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); +function ig(t, e, r, n) { + return new gm(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? h3e(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); } -function o3e(t, e) { +function h3e(t, e) { return (r, n, i, s) => ((s > r || s + i.length < n) && (s = Math.max(0, r - 2), i = t.sliceString(s, Math.min(t.length, n + 2))), (e(Ak(i, r - s)) != Fn.Word || e(Lk(i, r - s)) != Fn.Word) && (e(Lk(i, n - s)) != Fn.Word || e(Ak(i, n - s)) != Fn.Word)); } -class l3e extends rte { +class f3e extends ite { constructor(e) { super(e); } nextMatch(e, r, n) { - let i = ng(this.spec, e, n, e.doc.length).nextOverlapping(); - return i.done && (i = ng(this.spec, e, 0, r).nextOverlapping()), i.done ? null : i.value; + let i = ig(this.spec, e, n, e.doc.length).nextOverlapping(); + return i.done && (i = ig(this.spec, e, 0, r).nextOverlapping()), i.done ? null : i.value; } prevMatchInRange(e, r, n) { for (let i = n; ; ) { - let s = Math.max(r, i - 1e4 - this.spec.unquoted.length), a = ng(this.spec, e, s, i), o = null; + let s = Math.max(r, i - 1e4 - this.spec.unquoted.length), a = ig(this.spec, e, s, i), o = null; for (; !a.nextOverlapping().done; ) o = a.value; if (o) @@ -13970,7 +13970,7 @@ class l3e extends rte { return this.spec.unquote(this.spec.replace); } matchAll(e, r) { - let n = ng(this.spec, e, 0, e.doc.length), i = []; + let n = ig(this.spec, e, 0, e.doc.length), i = []; for (; !n.next().done; ) { if (i.length >= r) return null; @@ -13979,15 +13979,15 @@ class l3e extends rte { return i; } highlight(e, r, n, i) { - let s = ng(this.spec, e, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length)); + let s = ig(this.spec, e, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length)); for (; !s.next().done; ) i(s.value.from, s.value.to); } } -function ig(t, e, r, n) { - return new Kee(e.doc, t.search, { +function sg(t, e, r, n) { + return new ete(e.doc, t.search, { ignoreCase: !t.caseSensitive, - test: t.wholeWord ? c3e(e.charCategorizer(e.selection.main.head)) : void 0 + test: t.wholeWord ? d3e(e.charCategorizer(e.selection.main.head)) : void 0 }, r, n); } function Ak(t, e) { @@ -13996,17 +13996,17 @@ function Ak(t, e) { function Lk(t, e) { return t.slice(e, Os(t, e)); } -function c3e(t) { +function d3e(t) { return (e, r, n) => !n[0].length || (t(Ak(n.input, n.index)) != Fn.Word || t(Lk(n.input, n.index)) != Fn.Word) && (t(Lk(n.input, n.index + n[0].length)) != Fn.Word || t(Ak(n.input, n.index + n[0].length)) != Fn.Word); } -class u3e extends rte { +class p3e extends ite { nextMatch(e, r, n) { - let i = ig(this.spec, e, n, e.doc.length).next(); - return i.done && (i = ig(this.spec, e, 0, r).next()), i.done ? null : i.value; + let i = sg(this.spec, e, n, e.doc.length).next(); + return i.done && (i = sg(this.spec, e, 0, r).next()), i.done ? null : i.value; } prevMatchInRange(e, r, n) { for (let i = 1; ; i++) { - let s = Math.max(r, n - i * 1e4), a = ig(this.spec, e, s, n), o = null; + let s = Math.max(r, n - i * 1e4), a = sg(this.spec, e, s, n), o = null; for (; !a.next().done; ) o = a.value; if (o && (s == r || o.from > s + 10)) @@ -14022,7 +14022,7 @@ class u3e extends rte { return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (r, n) => n == "$" ? "$" : n == "&" ? e.match[0] : n != "0" && +n < e.match.length ? e.match[n] : r); } matchAll(e, r) { - let n = ig(this.spec, e, 0, e.doc.length), i = []; + let n = sg(this.spec, e, 0, e.doc.length), i = []; for (; !n.next().done; ) { if (i.length >= r) return null; @@ -14031,34 +14031,34 @@ class u3e extends rte { return i; } highlight(e, r, n, i) { - let s = ig(this.spec, e, Math.max(0, r - 250), Math.min(n + 250, e.doc.length)); + let s = sg(this.spec, e, Math.max(0, r - 250), Math.min(n + 250, e.doc.length)); for (; !s.next().done; ) i(s.value.from, s.value.to); } } -const S2 = /* @__PURE__ */ or.define(), gD = /* @__PURE__ */ or.define(), xf = /* @__PURE__ */ Xn.define({ +const S2 = /* @__PURE__ */ or.define(), vD = /* @__PURE__ */ or.define(), wf = /* @__PURE__ */ Xn.define({ create(t) { - return new D_(L8(t).create(), null); + return new I_(D8(t).create(), null); }, update(t, e) { for (let r of e.effects) - r.is(S2) ? t = new D_(r.value.create(), t.panel) : r.is(gD) && (t = new D_(t.query, r.value ? mD : null)); + r.is(S2) ? t = new I_(r.value.create(), t.panel) : r.is(vD) && (t = new I_(t.query, r.value ? yD : null)); return t; }, provide: (t) => y2.from(t, (e) => e.panel) }); -class D_ { +class I_ { constructor(e, r) { this.query = e, this.panel = r; } } -const h3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch" }), f3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), d3e = /* @__PURE__ */ hn.fromClass(class { +const g3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch" }), m3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), v3e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { - this.view = t, this.decorations = this.highlight(t.state.field(xf)); + this.view = t, this.decorations = this.highlight(t.state.field(wf)); } update(t) { - let e = t.state.field(xf); - (e != t.startState.field(xf) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e)); + let e = t.state.field(wf); + (e != t.startState.field(wf) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e)); } highlight({ query: t, panel: e }) { if (!e || !t.spec.valid) @@ -14070,7 +14070,7 @@ const h3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch" }), f3e = /* @__PU l = s[++i].to; t.highlight(r.state, o, l, (u, h) => { let f = r.state.selection.ranges.some((d) => d.from == u && d.to == h); - n.add(u, h, f ? f3e : h3e); + n.add(u, h, f ? m3e : g3e); }); } return n.finish(); @@ -14080,42 +14080,42 @@ const h3e = /* @__PURE__ */ It.mark({ class: "cm-searchMatch" }), f3e = /* @__PU }); function zx(t) { return (e) => { - let r = e.state.field(xf, !1); - return r && r.query.spec.valid ? t(e, r) : ste(e); + let r = e.state.field(wf, !1); + return r && r.query.spec.valid ? t(e, r) : ote(e); }; } const Rk = /* @__PURE__ */ zx((t, { query: e }) => { let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r); if (!n) return !1; - let i = je.single(n.from, n.to), s = t.state.facet(x1); + let i = je.single(n.from, n.to), s = t.state.facet(w1); return t.dispatch({ selection: i, - effects: [vD(t, n), s.scrollToMatch(i.main, t)], + effects: [bD(t, n), s.scrollToMatch(i.main, t)], userEvent: "select.search" - }), ite(t), !0; + }), ate(t), !0; }), Mk = /* @__PURE__ */ zx((t, { query: e }) => { let { state: r } = t, { from: n } = r.selection.main, i = e.prevMatch(r, n, n); if (!i) return !1; - let s = je.single(i.from, i.to), a = t.state.facet(x1); + let s = je.single(i.from, i.to), a = t.state.facet(w1); return t.dispatch({ selection: s, - effects: [vD(t, i), a.scrollToMatch(s.main, t)], + effects: [bD(t, i), a.scrollToMatch(s.main, t)], userEvent: "select.search" - }), ite(t), !0; -}), p3e = /* @__PURE__ */ zx((t, { query: e }) => { + }), ate(t), !0; +}), y3e = /* @__PURE__ */ zx((t, { query: e }) => { let r = e.matchAll(t.state, 1e3); return !r || !r.length ? !1 : (t.dispatch({ selection: je.create(r.map((n) => je.range(n.from, n.to))), userEvent: "select.search.matches" }), !0); -}), g3e = ({ state: t, dispatch: e }) => { +}), b3e = ({ state: t, dispatch: e }) => { let r = t.selection; if (r.ranges.length > 1 || r.main.empty) return !1; let { from: n, to: i } = r.main, s = [], a = 0; - for (let o = new pm(t.doc, t.sliceDoc(n, i)); !o.next().done; ) { + for (let o = new gm(t.doc, t.sliceDoc(n, i)); !o.next().done; ) { if (s.length > 1e3) return !1; o.value.from == n && (a = s.length), s.push(je.range(o.value.from, o.value.to)); @@ -14124,7 +14124,7 @@ const Rk = /* @__PURE__ */ zx((t, { query: e }) => { selection: je.create(s, a), userEvent: "select.search.matches" })), !0; -}, Uz = /* @__PURE__ */ zx((t, { query: e }) => { +}, qz = /* @__PURE__ */ zx((t, { query: e }) => { let { state: r } = t, { from: n, to: i } = r.selection.main; if (r.readOnly) return !1; @@ -14134,7 +14134,7 @@ const Rk = /* @__PURE__ */ zx((t, { query: e }) => { let a = [], o, l, u = []; if (s.from == n && s.to == i && (l = r.toText(e.getReplacement(s)), a.push({ from: s.from, to: s.to, insert: l }), s = e.nextMatch(r, s.from, s.to), u.push(kt.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))), s) { let h = a.length == 0 || a[0].from >= s.to ? 0 : s.to - s.from - l.length; - o = je.single(s.from - h, s.to - h), u.push(vD(t, s)), u.push(r.facet(x1).scrollToMatch(o.main, t)); + o = je.single(s.from - h, s.to - h), u.push(bD(t, s)), u.push(r.facet(w1).scrollToMatch(o.main, t)); } return t.dispatch({ changes: a, @@ -14142,7 +14142,7 @@ const Rk = /* @__PURE__ */ zx((t, { query: e }) => { effects: u, userEvent: "input.replace" }), !0; -}), m3e = /* @__PURE__ */ zx((t, { query: e }) => { +}), x3e = /* @__PURE__ */ zx((t, { query: e }) => { if (t.state.readOnly) return !1; let r = e.matchAll(t.state, 1e9).map((i) => { @@ -14158,16 +14158,16 @@ const Rk = /* @__PURE__ */ zx((t, { query: e }) => { userEvent: "input.replace.all" }), !0; }); -function mD(t) { - return t.state.facet(x1).createPanel(t); +function yD(t) { + return t.state.facet(w1).createPanel(t); } -function L8(t, e) { +function D8(t, e) { var r, n, i, s, a; let o = t.selection.main, l = o.empty || o.to > o.from + 100 ? "" : t.sliceDoc(o.from, o.to); if (e && !l) return e; - let u = t.facet(x1); - return new tte({ + let u = t.facet(w1); + return new nte({ search: ((r = e == null ? void 0 : e.literal) !== null && r !== void 0 ? r : u.literal) ? l : l.replace(/\n/g, "\\n"), caseSensitive: (n = e == null ? void 0 : e.caseSensitive) !== null && n !== void 0 ? n : u.caseSensitive, literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal, @@ -14175,47 +14175,47 @@ function L8(t, e) { wholeWord: (a = e == null ? void 0 : e.wholeWord) !== null && a !== void 0 ? a : u.wholeWord }); } -function nte(t) { - let e = v2(t, mD); +function ste(t) { + let e = v2(t, yD); return e && e.dom.querySelector("[main-field]"); } -function ite(t) { - let e = nte(t); +function ate(t) { + let e = ste(t); e && e == t.root.activeElement && e.select(); } -const ste = (t) => { - let e = t.state.field(xf, !1); +const ote = (t) => { + let e = t.state.field(wf, !1); if (e && e.panel) { - let r = nte(t); + let r = ste(t); if (r && r != t.root.activeElement) { - let n = L8(t.state, e.query.spec); + let n = D8(t.state, e.query.spec); n.valid && t.dispatch({ effects: S2.of(n) }), r.focus(), r.select(); } } else t.dispatch({ effects: [ - gD.of(!0), - e ? S2.of(L8(t.state, e.query.spec)) : or.appendConfig.of(x3e) + vD.of(!0), + e ? S2.of(D8(t.state, e.query.spec)) : or.appendConfig.of(S3e) ] }); return !0; -}, ate = (t) => { - let e = t.state.field(xf, !1); +}, lte = (t) => { + let e = t.state.field(wf, !1); if (!e || !e.panel) return !1; - let r = v2(t, mD); - return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: gD.of(!1) }), !0; -}, v3e = [ - { key: "Mod-f", run: ste, scope: "editor search-panel" }, + let r = v2(t, yD); + return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: vD.of(!1) }), !0; +}, w3e = [ + { key: "Mod-f", run: ote, scope: "editor search-panel" }, { key: "F3", run: Rk, shift: Mk, scope: "editor search-panel", preventDefault: !0 }, { key: "Mod-g", run: Rk, shift: Mk, scope: "editor search-panel", preventDefault: !0 }, - { key: "Escape", run: ate, scope: "editor search-panel" }, - { key: "Mod-Shift-l", run: g3e }, - { key: "Mod-Alt-g", run: Hke }, - { key: "Mod-d", run: a3e, preventDefault: !0 } + { key: "Escape", run: lte, scope: "editor search-panel" }, + { key: "Mod-Shift-l", run: b3e }, + { key: "Mod-Alt-g", run: Jke }, + { key: "Mod-d", run: u3e, preventDefault: !0 } ]; -class y3e { +class O3e { constructor(e) { this.view = e; - let r = this.query = e.state.field(xf).query.spec; + let r = this.query = e.state.field(wf).query.spec; this.commit = this.commit.bind(this), this.searchField = kn("input", { value: r.search, placeholder: mo(e, "Find"), @@ -14261,26 +14261,26 @@ class y3e { this.searchField, n("next", () => Rk(e), [mo(e, "next")]), n("prev", () => Mk(e), [mo(e, "previous")]), - n("select", () => p3e(e), [mo(e, "all")]), + n("select", () => y3e(e), [mo(e, "all")]), kn("label", null, [this.caseField, mo(e, "match case")]), kn("label", null, [this.reField, mo(e, "regexp")]), kn("label", null, [this.wordField, mo(e, "by word")]), ...e.state.readOnly ? [] : [ kn("br"), this.replaceField, - n("replace", () => Uz(e), [mo(e, "replace")]), - n("replaceAll", () => m3e(e), [mo(e, "replace all")]) + n("replace", () => qz(e), [mo(e, "replace")]), + n("replaceAll", () => x3e(e), [mo(e, "replace all")]) ], kn("button", { name: "close", - onclick: () => ate(e), + onclick: () => lte(e), "aria-label": mo(e, "close"), type: "button" }, ["\xD7"]) ]); } commit() { - let e = new tte({ + let e = new nte({ search: this.searchField.value, caseSensitive: this.caseField.checked, regexp: this.reField.checked, @@ -14290,7 +14290,7 @@ class y3e { e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: S2.of(e) })); } keydown(e) { - BOe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Mk : Rk)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), Uz(this.view)); + UOe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Mk : Rk)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), qz(this.view)); } update(e) { for (let r of e.transactions) @@ -14307,14 +14307,14 @@ class y3e { return 80; } get top() { - return this.view.state.facet(x1).top; + return this.view.state.facet(w1).top; } } function mo(t, e) { return t.state.phrase(e); } const OO = 30, kO = /[\s\.,:;?!]/; -function vD(t, { from: e, to: r }) { +function bD(t, { from: e, to: r }) { let n = t.state.doc.lineAt(e), i = t.state.doc.lineAt(r).to, s = Math.max(n.from, e - OO), a = Math.min(i, r + OO), o = t.state.sliceDoc(s, a); if (s != n.from) { for (let l = 0; l < OO; l++) @@ -14332,7 +14332,7 @@ function vD(t, { from: e, to: r }) { } return kt.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${n.number}.`); } -const b3e = /* @__PURE__ */ kt.baseTheme({ +const k3e = /* @__PURE__ */ kt.baseTheme({ ".cm-panel.cm-search": { padding: "2px 6px 4px", position: "relative", @@ -14361,12 +14361,12 @@ const b3e = /* @__PURE__ */ kt.baseTheme({ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" }, "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" }, "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" } -}), x3e = [ - xf, - /* @__PURE__ */ uc.low(d3e), - b3e +}), S3e = [ + wf, + /* @__PURE__ */ uc.low(v3e), + k3e ]; -class yD { +class xD { constructor(e, r, n) { this.state = e, this.pos = r, this.explicit = n, this.abortListeners = []; } @@ -14382,7 +14382,7 @@ class yD { } : null; } matchBefore(e) { - let r = this.state.doc.lineAt(this.pos), n = Math.max(r.from, this.pos - 250), i = r.text.slice(n - r.from, this.pos - r.from), s = i.search(lte(e, !1)); + let r = this.state.doc.lineAt(this.pos), n = Math.max(r.from, this.pos - 250), i = r.text.slice(n - r.from, this.pos - r.from), s = i.search(ute(e, !1)); return s < 0 ? null : { from: n + s, to: this.pos, text: i.slice(s) }; } get aborted() { @@ -14392,28 +14392,28 @@ class yD { e == "abort" && this.abortListeners && this.abortListeners.push(r); } } -function Vz(t) { +function Yz(t) { let e = Object.keys(t).join(""), r = /\w/.test(e); return r && (e = e.replace(/\w/g, "")), `[${r ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`; } -function w3e(t) { +function T3e(t) { let e = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null); for (let { label: i } of t) { e[i[0]] = !0; for (let s = 1; s < i.length; s++) r[i[s]] = !0; } - let n = Vz(e) + Vz(r) + "*$"; + let n = Yz(e) + Yz(r) + "*$"; return [new RegExp("^" + n), new RegExp(n)]; } -function ote(t) { - let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : w3e(e); +function cte(t) { + let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : T3e(e); return (i) => { let s = i.matchBefore(n); return s || i.explicit ? { from: s ? s.from : i.pos, options: e, validFor: r } : null; }; } -function O3e(t, e) { +function C3e(t, e) { return (r) => { for (let n = Cn(r.state).resolveInner(r.pos, -1); n; n = n.parent) { if (t.indexOf(n.name) > -1) @@ -14424,36 +14424,36 @@ function O3e(t, e) { return e(r); }; } -class qz { +class Wz { constructor(e, r, n, i) { this.completion = e, this.source = r, this.match = n, this.score = i; } } -function wf(t) { +function Of(t) { return t.selection.main.from; } -function lte(t, e) { +function ute(t, e) { var r; let { source: n } = t, i = e && n[0] != "^", s = n[n.length - 1] != "$"; return !i && !s ? t : new RegExp(`${i ? "^" : ""}(?:${n})${s ? "$" : ""}`, (r = t.flags) !== null && r !== void 0 ? r : t.ignoreCase ? "i" : ""); } -const cte = /* @__PURE__ */ co.define(); -function k3e(t, e, r, n) { +const hte = /* @__PURE__ */ co.define(); +function E3e(t, e, r, n) { let { main: i } = t.selection, s = r - i.from, a = n - i.from; return Object.assign(Object.assign({}, t.changeByRange((o) => o != i && r != n && t.sliceDoc(o.from + s, o.from + a) != t.sliceDoc(r, n) ? { range: o } : { changes: { from: o.from + s, to: n == i.from ? o.to : o.from + a, insert: e }, range: je.cursor(o.from + s + e.length) })), { scrollIntoView: !0, userEvent: "input.complete" }); } -const Yz = /* @__PURE__ */ new WeakMap(); -function S3e(t) { +const Gz = /* @__PURE__ */ new WeakMap(); +function _3e(t) { if (!Array.isArray(t)) return t; - let e = Yz.get(t); - return e || Yz.set(t, e = ote(t)), e; + let e = Gz.get(t); + return e || Gz.set(t, e = cte(t)), e; } -const bD = /* @__PURE__ */ or.define(), T2 = /* @__PURE__ */ or.define(); -class T3e { +const wD = /* @__PURE__ */ or.define(), T2 = /* @__PURE__ */ or.define(); +class A3e { constructor(e) { this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = []; for (let r = 0; r < e.length; ) { @@ -14498,7 +14498,7 @@ class T3e { for (let b = 0, w = Math.min(e.length, 200), O = 0; b < w && f < l; ) { let S = bs(e, b); o < 0 && (h < l && S == r[h] && (s[h++] = b), p < l && (S == r[p] || S == n[p] ? (p == 0 && (g = b), m = b + 1, p++) : p = 0)); - let C, T = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (C = UM(S)) != C.toLowerCase() ? 1 : C != C.toUpperCase() ? 2 : 0; + let C, T = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (C = qM(S)) != C.toLowerCase() ? 1 : C != C.toUpperCase() ? 2 : 0; (!b || T == 1 && v || O == 0 && T != 0) && (r[f] == S || n[f] == S && (d = !0) ? a[f++] = b : a.length && (y = !1)), O = T, b += Ho(S); } return f == l && a[0] == 0 && y ? this.result(-100 + (d ? -200 : 0), a, e) : p == l && g == 0 ? this.ret(-200 - e.length + (m == e.length ? 0 : -100), [0, m]) : o > -1 ? this.ret(-700 - e.length, [o, o + this.pattern.length]) : p == l ? this.ret(-200 + -700 - e.length, [g, m]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (y ? 0 : -1100), a, e) : r.length == 2 ? !1 : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e); @@ -14514,7 +14514,7 @@ class T3e { } const Zs = /* @__PURE__ */ $t.define({ combine(t) { - return pu(t, { + return gu(t, { activateOnTyping: !0, selectOnOpen: !0, override: null, @@ -14526,7 +14526,7 @@ const Zs = /* @__PURE__ */ $t.define({ aboveCursor: !1, icons: !0, addToOptions: [], - positionInfo: C3e, + positionInfo: L3e, compareCompletions: (e, r) => e.label.localeCompare(r.label), interactionDelay: 75, updateSyncTime: 100 @@ -14534,16 +14534,16 @@ const Zs = /* @__PURE__ */ $t.define({ defaultKeymap: (e, r) => e && r, closeOnBlur: (e, r) => e && r, icons: (e, r) => e && r, - tooltipClass: (e, r) => (n) => Wz(e(n), r(n)), - optionClass: (e, r) => (n) => Wz(e(n), r(n)), + tooltipClass: (e, r) => (n) => Xz(e(n), r(n)), + optionClass: (e, r) => (n) => Xz(e(n), r(n)), addToOptions: (e, r) => e.concat(r) }); } }); -function Wz(t, e) { +function Xz(t, e) { return t ? e ? t + " " + e : t : e; } -function C3e(t, e, r, n, i, s) { +function L3e(t, e, r, n, i, s) { let a = t.textDirection == Wn.RTL, o = a, l = !1, u = "top", h, f, d = e.left - i.left, p = i.right - e.right, g = n.right - n.left, m = n.bottom - n.top; if (o && d < Math.min(g, p) ? o = !1 : !o && p < Math.min(g, d) && (o = !0), g <= (o ? d : p)) h = Math.max(i.top, Math.min(r.top, i.bottom - m)) - e.top, f = Math.min(400, o ? d : p); @@ -14558,7 +14558,7 @@ function C3e(t, e, r, n, i, s) { class: "cm-completionInfo-" + (l ? a ? "left-narrow" : "right-narrow" : o ? "left" : "right") }; } -function E3e(t) { +function R3e(t) { let e = t.addToOptions.slice(); return t.icons && e.push({ render(r) { @@ -14590,7 +14590,7 @@ function E3e(t) { position: 80 }), e.sort((r, n) => r.position - n.position).map((r) => r.render); } -function P_(t, e, r) { +function $_(t, e, r) { if (t <= r) return { from: 0, to: t }; if (e < 0 && (e = 0), e <= t >> 1) { @@ -14600,7 +14600,7 @@ function P_(t, e, r) { let n = Math.floor((t - e) / r); return { from: t - (n + 1) * r, to: t - n * r }; } -class _3e { +class M3e { constructor(e, r, n) { this.view = e, this.stateField = r, this.applyCompletion = n, this.info = null, this.infoDestroy = null, this.placeInfoReq = { read: () => this.measureInfo(), @@ -14608,7 +14608,7 @@ class _3e { key: this }, this.space = null, this.currentClass = ""; let i = e.state.field(r), { options: s, selected: a } = i.open, o = e.state.facet(Zs); - this.optionContent = E3e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = P_(s.length, a, o.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => { + this.optionContent = R3e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = $_(s.length, a, o.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => { let { options: u } = e.state.field(r).open; for (let h = l.target, f; h && h != this.dom; h = h.parentNode) if (h.nodeName == "LI" && (f = /-(\d+)$/.exec(h.id)) && +f[1] < u.length) { @@ -14633,7 +14633,7 @@ class _3e { let n = e.state.field(this.stateField), i = e.startState.field(this.stateField); if (this.updateTooltipClass(e.state), n != i) { let { options: s, selected: a, disabled: o } = n.open; - (!i.open || i.open.options != s) && (this.range = P_(s.length, a, e.state.facet(Zs).maxRenderedOptions), this.showOptions(s, n.id)), this.updateSel(), o != ((r = i.open) === null || r === void 0 ? void 0 : r.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!o); + (!i.open || i.open.options != s) && (this.range = $_(s.length, a, e.state.facet(Zs).maxRenderedOptions), this.showOptions(s, n.id)), this.updateSel(), o != ((r = i.open) === null || r === void 0 ? void 0 : r.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!o); } } updateTooltipClass(e) { @@ -14651,7 +14651,7 @@ class _3e { } updateSel() { let e = this.view.state.field(this.stateField), r = e.open; - if ((r.selected > -1 && r.selected < this.range.from || r.selected >= this.range.to) && (this.range = P_(r.options.length, r.selected, this.view.state.facet(Zs).maxRenderedOptions), this.showOptions(r.options, e.id)), this.updateSelectedOption(r.selected)) { + if ((r.selected > -1 && r.selected < this.range.from || r.selected >= this.range.to) && (this.range = $_(r.options.length, r.selected, this.view.state.facet(Zs).maxRenderedOptions), this.showOptions(r.options, e.id)), this.updateSelectedOption(r.selected)) { this.destroyInfo(); let { completion: n } = r.options[r.selected], { info: i } = n; if (!i) @@ -14679,7 +14679,7 @@ class _3e { let r = null; for (let n = this.list.firstChild, i = this.range.from; n; n = n.nextSibling, i++) n.nodeName != "LI" || !n.id ? i-- : i == e ? n.hasAttribute("aria-selected") || (n.setAttribute("aria-selected", "true"), r = n) : n.hasAttribute("aria-selected") && n.removeAttribute("aria-selected"); - return r && L3e(this.list, r), r; + return r && P3e(this.list, r), r; } measureInfo() { let e = this.dom.querySelector("[aria-selected]"); @@ -14729,17 +14729,17 @@ class _3e { this.destroyInfo(); } } -function A3e(t, e) { - return (r) => new _3e(r, t, e); +function D3e(t, e) { + return (r) => new M3e(r, t, e); } -function L3e(t, e) { +function P3e(t, e) { let r = t.getBoundingClientRect(), n = e.getBoundingClientRect(), i = r.height / t.offsetHeight; n.top < r.top ? t.scrollTop -= (r.top - n.top) / i : n.bottom > r.bottom && (t.scrollTop += (n.bottom - r.bottom) / i); } -function Gz(t) { +function Hz(t) { return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0); } -function R3e(t, e) { +function N3e(t, e) { let r = [], n = null, i = (l) => { r.push(l); let { section: u } = l.completion; @@ -14754,13 +14754,13 @@ function R3e(t, e) { let u = l.result.getMatch; if (l.result.filter === !1) for (let h of l.result.options) - i(new qz(h, l.source, u ? u(h) : [], 1e9 - r.length)); + i(new Wz(h, l.source, u ? u(h) : [], 1e9 - r.length)); else { - let h = new T3e(e.sliceDoc(l.from, l.to)); + let h = new A3e(e.sliceDoc(l.from, l.to)); for (let f of l.result.options) if (h.match(f.label)) { let d = f.displayLabel ? u ? u(f, h.matched) : [] : h.matched; - i(new qz(f, l.source, d, h.score + (f.boost || 0))); + i(new Wz(f, l.source, d, h.score + (f.boost || 0))); } } } @@ -14779,21 +14779,21 @@ function R3e(t, e) { let s = [], a = null, o = e.facet(Zs).compareCompletions; for (let l of r.sort((u, h) => h.score - u.score || o(u.completion, h.completion))) { let u = l.completion; - !a || a.label != u.label || a.detail != u.detail || a.type != null && u.type != null && a.type != u.type || a.apply != u.apply || a.boost != u.boost ? s.push(l) : Gz(l.completion) > Gz(a) && (s[s.length - 1] = l), a = l.completion; + !a || a.label != u.label || a.detail != u.detail || a.type != null && u.type != null && a.type != u.type || a.apply != u.apply || a.boost != u.boost ? s.push(l) : Hz(l.completion) > Hz(a) && (s[s.length - 1] = l), a = l.completion; } return s; } -class dg { +class pg { constructor(e, r, n, i, s, a) { this.options = e, this.attrs = r, this.tooltip = n, this.timestamp = i, this.selected = s, this.disabled = a; } setSelected(e, r) { - return e == this.selected || e >= this.options.length ? this : new dg(this.options, Xz(r, e), this.tooltip, this.timestamp, e, this.disabled); + return e == this.selected || e >= this.options.length ? this : new pg(this.options, Zz(r, e), this.tooltip, this.timestamp, e, this.disabled); } static build(e, r, n, i, s) { - let a = R3e(e, r); + let a = N3e(e, r); if (!a.length) - return i && e.some((l) => l.state == 1) ? new dg(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null; + return i && e.some((l) => l.state == 1) ? new pg(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null; let o = r.facet(Zs).selectOnOpen ? 0 : -1; if (i && i.selected != o && i.selected != -1) { let l = i.options[i.selected].completion; @@ -14803,14 +14803,14 @@ class dg { break; } } - return new dg(a, Xz(n, o), { + return new pg(a, Zz(n, o), { pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8), - create: I3e, + create: z3e, above: s.aboveCursor }, i ? i.timestamp : Date.now(), o, !1); } map(e) { - return new dg(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); + return new pg(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); } } class Dk { @@ -14818,25 +14818,25 @@ class Dk { this.active = e, this.id = r, this.open = n; } static start() { - return new Dk(P3e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); + return new Dk(B3e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); } update(e) { - let { state: r } = e, n = r.facet(Zs), s = (n.override || r.languageDataAt("autocomplete", wf(r)).map(S3e)).map((o) => (this.active.find((u) => u.source == o) || new Wa(o, this.active.some((u) => u.state != 0) ? 1 : 0)).update(e, n)); + let { state: r } = e, n = r.facet(Zs), s = (n.override || r.languageDataAt("autocomplete", Of(r)).map(_3e)).map((o) => (this.active.find((u) => u.source == o) || new Wa(o, this.active.some((u) => u.state != 0) ? 1 : 0)).update(e, n)); s.length == this.active.length && s.every((o, l) => o == this.active[l]) && (s = this.active); let a = this.open; - a && e.docChanged && (a = a.map(e.changes)), e.selection || s.some((o) => o.hasResult() && e.changes.touchesRange(o.from, o.to)) || !M3e(s, this.active) ? a = dg.build(s, r, this.id, a, n) : a && a.disabled && !s.some((o) => o.state == 1) && (a = null), !a && s.every((o) => o.state != 1) && s.some((o) => o.hasResult()) && (s = s.map((o) => o.hasResult() ? new Wa(o.source, 0) : o)); + a && e.docChanged && (a = a.map(e.changes)), e.selection || s.some((o) => o.hasResult() && e.changes.touchesRange(o.from, o.to)) || !I3e(s, this.active) ? a = pg.build(s, r, this.id, a, n) : a && a.disabled && !s.some((o) => o.state == 1) && (a = null), !a && s.every((o) => o.state != 1) && s.some((o) => o.hasResult()) && (s = s.map((o) => o.hasResult() ? new Wa(o.source, 0) : o)); for (let o of e.effects) - o.is(hte) && (a = a && a.setSelected(o.value, this.id)); + o.is(dte) && (a = a && a.setSelected(o.value, this.id)); return s == this.active && a == this.open ? this : new Dk(s, this.id, a); } get tooltip() { return this.open ? this.open.tooltip : null; } get attrs() { - return this.open ? this.open.attrs : D3e; + return this.open ? this.open.attrs : $3e; } } -function M3e(t, e) { +function I3e(t, e) { if (t == e) return !0; for (let r = 0, n = 0; ; ) { @@ -14851,10 +14851,10 @@ function M3e(t, e) { return !1; } } -const D3e = { +const $3e = { "aria-autocomplete": "list" }; -function Xz(t, e) { +function Zz(t, e) { let r = { "aria-autocomplete": "list", "aria-haspopup": "listbox", @@ -14862,8 +14862,8 @@ function Xz(t, e) { }; return e > -1 && (r["aria-activedescendant"] = t + "-" + e), r; } -const P3e = []; -function R8(t) { +const B3e = []; +function P8(t) { return t.isUserEvent("input.type") ? "input" : t.isUserEvent("delete.backward") ? "delete" : null; } class Wa { @@ -14874,14 +14874,14 @@ class Wa { return !1; } update(e, r) { - let n = R8(e), i = this; + let n = P8(e), i = this; n ? i = i.handleUserEvent(e, n, r) : e.docChanged ? i = i.handleChange(e) : e.selection && i.state != 0 && (i = new Wa(i.source, 0)); for (let s of e.effects) - if (s.is(bD)) - i = new Wa(i.source, 1, s.value ? wf(e.state) : -1); + if (s.is(wD)) + i = new Wa(i.source, 1, s.value ? Of(e.state) : -1); else if (s.is(T2)) i = new Wa(i.source, 0); - else if (s.is(ute)) + else if (s.is(fte)) for (let a of s.value) a.source == i.source && (i = a); return i; @@ -14890,13 +14890,13 @@ class Wa { return r == "delete" || !n.activateOnTyping ? this.map(e.changes) : new Wa(this.source, 1); } handleChange(e) { - return e.changes.touchesRange(wf(e.startState)) ? new Wa(this.source, 0) : this.map(e.changes); + return e.changes.touchesRange(Of(e.startState)) ? new Wa(this.source, 0) : this.map(e.changes); } map(e) { return e.empty || this.explicitPos < 0 ? this : new Wa(this.source, this.state, e.mapPos(this.explicitPos)); } } -class Mg extends Wa { +class Dg extends Wa { constructor(e, r, n, i, s) { super(e, 2, r), this.result = n, this.from = i, this.to = s; } @@ -14905,30 +14905,30 @@ class Mg extends Wa { } handleUserEvent(e, r, n) { var i; - let s = e.changes.mapPos(this.from), a = e.changes.mapPos(this.to, 1), o = wf(e.state); - if ((this.explicitPos < 0 ? o <= s : o < this.from) || o > a || r == "delete" && wf(e.startState) == this.from) + let s = e.changes.mapPos(this.from), a = e.changes.mapPos(this.to, 1), o = Of(e.state); + if ((this.explicitPos < 0 ? o <= s : o < this.from) || o > a || r == "delete" && Of(e.startState) == this.from) return new Wa(this.source, r == "input" && n.activateOnTyping ? 1 : 0); let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos), u; - return N3e(this.result.validFor, e.state, s, a) ? new Mg(this.source, l, this.result, s, a) : this.result.update && (u = this.result.update(this.result, s, a, new yD(e.state, o, l >= 0))) ? new Mg(this.source, l, u, u.from, (i = u.to) !== null && i !== void 0 ? i : wf(e.state)) : new Wa(this.source, 1, l); + return F3e(this.result.validFor, e.state, s, a) ? new Dg(this.source, l, this.result, s, a) : this.result.update && (u = this.result.update(this.result, s, a, new xD(e.state, o, l >= 0))) ? new Dg(this.source, l, u, u.from, (i = u.to) !== null && i !== void 0 ? i : Of(e.state)) : new Wa(this.source, 1, l); } handleChange(e) { return e.changes.touchesRange(this.from, this.to) ? new Wa(this.source, 0) : this.map(e.changes); } map(e) { - return e.empty ? this : new Mg(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)); + return e.empty ? this : new Dg(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)); } } -function N3e(t, e, r, n) { +function F3e(t, e, r, n) { if (!t) return !1; let i = e.sliceDoc(r, n); - return typeof t == "function" ? t(i, r, n, e) : lte(t, !0).test(i); + return typeof t == "function" ? t(i, r, n, e) : ute(t, !0).test(i); } -const ute = /* @__PURE__ */ or.define({ +const fte = /* @__PURE__ */ or.define({ map(t, e) { return t.map((r) => r.map(e)); } -}), hte = /* @__PURE__ */ or.define(), To = /* @__PURE__ */ Xn.define({ +}), dte = /* @__PURE__ */ or.define(), To = /* @__PURE__ */ Xn.define({ create() { return Dk.start(); }, @@ -14936,40 +14936,40 @@ const ute = /* @__PURE__ */ or.define({ return t.update(e); }, provide: (t) => [ - JM.from(t, (e) => e.tooltip), + tD.from(t, (e) => e.tooltip), kt.contentAttributes.from(t, (e) => e.attrs) ] }); -function fte(t, e) { +function pte(t, e) { const r = e.completion.apply || e.completion.label; let n = t.state.field(To).active.find((i) => i.source == e.source); - return n instanceof Mg ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, k3e(t.state, r, n.from, n.to)), { annotations: cte.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; + return n instanceof Dg ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, E3e(t.state, r, n.from, n.to)), { annotations: hte.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; } -const I3e = /* @__PURE__ */ A3e(To, fte); +const z3e = /* @__PURE__ */ D3e(To, pte); function SO(t, e = "option") { return (r) => { let n = r.state.field(To, !1); if (!n || !n.open || n.open.disabled || Date.now() - n.open.timestamp < r.state.facet(Zs).interactionDelay) return !1; let i = 1, s; - e == "page" && (s = QJ(r, n.open.tooltip)) && (i = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1)); + e == "page" && (s = VJ(r, n.open.tooltip)) && (i = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1)); let { length: a } = n.open.options, o = n.open.selected > -1 ? n.open.selected + i * (t ? 1 : -1) : t ? 0 : a - 1; - return o < 0 ? o = e == "page" ? 0 : a - 1 : o >= a && (o = e == "page" ? a - 1 : 0), r.dispatch({ effects: hte.of(o) }), !0; + return o < 0 ? o = e == "page" ? 0 : a - 1 : o >= a && (o = e == "page" ? a - 1 : 0), r.dispatch({ effects: dte.of(o) }), !0; }; } -const $3e = (t) => { +const Q3e = (t) => { let e = t.state.field(To, !1); - return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Zs).interactionDelay ? !1 : fte(t, e.open.options[e.open.selected]); -}, B3e = (t) => t.state.field(To, !1) ? (t.dispatch({ effects: bD.of(!0) }), !0) : !1, F3e = (t) => { + return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Zs).interactionDelay ? !1 : pte(t, e.open.options[e.open.selected]); +}, U3e = (t) => t.state.field(To, !1) ? (t.dispatch({ effects: wD.of(!0) }), !0) : !1, V3e = (t) => { let e = t.state.field(To, !1); return !e || !e.active.some((r) => r.state != 0) ? !1 : (t.dispatch({ effects: T2.of(null) }), !0); }; -class z3e { +class q3e { constructor(e, r) { this.active = e, this.context = r, this.time = Date.now(), this.updates = [], this.done = void 0; } } -const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { +const Y3e = 50, W3e = 1e3, G3e = /* @__PURE__ */ hn.fromClass(class { constructor(t) { this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.composing = 0; for (let e of t.state.field(To).active) @@ -14979,10 +14979,10 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { let e = t.state.field(To); if (!t.selectionSet && !t.docChanged && t.startState.field(To) == e) return; - let r = t.transactions.some((n) => (n.selection || n.docChanged) && !R8(n)); + let r = t.transactions.some((n) => (n.selection || n.docChanged) && !P8(n)); for (let n = 0; n < this.running.length; n++) { let i = this.running[n]; - if (r || i.updates.length + t.transactions.length > Q3e && Date.now() - i.time > U3e) { + if (r || i.updates.length + t.transactions.length > Y3e && Date.now() - i.time > W3e) { for (let s of i.context.abortListeners) try { s(); @@ -14995,7 +14995,7 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { } if (this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), this.debounceUpdate = e.active.some((n) => n.state == 1 && !this.running.some((i) => i.active.source == n.source)) ? setTimeout(() => this.startUpdate(), 50) : -1, this.composing != 0) for (let n of t.transactions) - R8(n) == "input" ? this.composing = 2 : this.composing == 2 && n.selection && (this.composing = 3); + P8(n) == "input" ? this.composing = 2 : this.composing == 2 && n.selection && (this.composing = 3); } startUpdate() { this.debounceUpdate = -1; @@ -15004,7 +15004,7 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { r.state == 1 && !this.running.some((n) => n.active.source == r.source) && this.startQuery(r); } startQuery(t) { - let { state: e } = this.view, r = wf(e), n = new yD(e, r, t.explicitPos == r), i = new z3e(t, n); + let { state: e } = this.view, r = Of(e), n = new xD(e, r, t.explicitPos == r), i = new q3e(t, n); this.running.push(i), Promise.resolve(t.source(n)).then((s) => { i.context.aborted || (i.done = s || null, this.scheduleAccept()); }, (s) => { @@ -15023,7 +15023,7 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { if (i.done === void 0) continue; if (this.running.splice(n--, 1), i.done) { - let a = new Mg(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : wf(i.updates.length ? i.updates[0].startState : this.view.state)); + let a = new Dg(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : Of(i.updates.length ? i.updates[0].startState : this.view.state)); for (let o of i.updates) a = a.update(o, r); if (a.hasResult()) { @@ -15041,14 +15041,14 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { } else this.startQuery(s); } - e.length && this.view.dispatch({ effects: ute.of(e) }); + e.length && this.view.dispatch({ effects: fte.of(e) }); } }, { eventHandlers: { blur(t) { let e = this.view.state.field(To, !1); if (e && e.tooltip && this.view.state.facet(Zs).closeOnBlur) { - let r = e.open && QJ(this.view, e.open.tooltip); + let r = e.open && VJ(this.view, e.open.tooltip); (!r || !r.dom.contains(t.relatedTarget)) && this.view.dispatch({ effects: T2.of(null) }); } }, @@ -15056,10 +15056,10 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { this.composing = 1; }, compositionend() { - this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: bD.of(!1) }), 20), this.composing = 0; + this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: wD.of(!1) }), 20), this.composing = 0; } } -}), dte = /* @__PURE__ */ kt.baseTheme({ +}), gte = /* @__PURE__ */ kt.baseTheme({ ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": { fontFamily: "monospace", @@ -15181,21 +15181,21 @@ const Q3e = 50, U3e = 1e3, V3e = /* @__PURE__ */ hn.fromClass(class { "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" } } }); -class q3e { +class X3e { constructor(e, r, n, i) { this.field = e, this.line = r, this.from = n, this.to = i; } } -class xD { +class OD { constructor(e, r, n) { this.field = e, this.from = r, this.to = n; } map(e) { let r = e.mapPos(this.from, -1, Fi.TrackDel), n = e.mapPos(this.to, 1, Fi.TrackDel); - return r == null || n == null ? null : new xD(this.field, r, n); + return r == null || n == null ? null : new OD(this.field, r, n); } } -class wD { +class kD { constructor(e, r) { this.lines = e, this.fieldPositions = r; } @@ -15210,7 +15210,7 @@ class wD { } n.push(l), r += l.length + 1; } - let o = this.fieldPositions.map((l) => new xD(l.field, i[l.line] + l.from, i[l.line] + l.to)); + let o = this.fieldPositions.map((l) => new OD(l.field, i[l.line] + l.from, i[l.line] + l.to)); return { text: n, ranges: o }; } static parse(e) { @@ -15228,7 +15228,7 @@ class wD { for (let f of i) f.field >= u && f.field++; } - i.push(new q3e(u, n.length, s.index, s.index + l.length)), a = a.slice(0, s.index) + l + a.slice(s.index + s[0].length); + i.push(new X3e(u, n.length, s.index, s.index + l.length)), a = a.slice(0, s.index) + l + a.slice(s.index + s[0].length); } for (let o; o = /\\([{}])/.exec(a); ) { a = a.slice(0, o.index) + o[1] + a.slice(o.index + o[0].length); @@ -15237,10 +15237,10 @@ class wD { } n.push(a); } - return new wD(n, i); + return new kD(n, i); } } -let Y3e = /* @__PURE__ */ It.widget({ widget: /* @__PURE__ */ new class extends uo { +let H3e = /* @__PURE__ */ It.widget({ widget: /* @__PURE__ */ new class extends uo { toDOM() { let t = document.createElement("span"); return t.className = "cm-snippetFieldPosition", t; @@ -15248,10 +15248,10 @@ let Y3e = /* @__PURE__ */ It.widget({ widget: /* @__PURE__ */ new class extends ignoreEvent() { return !1; } -}() }), W3e = /* @__PURE__ */ It.mark({ class: "cm-snippetField" }); -class w1 { +}() }), Z3e = /* @__PURE__ */ It.mark({ class: "cm-snippetField" }); +class O1 { constructor(e, r) { - this.ranges = e, this.active = r, this.deco = It.set(e.map((n) => (n.from == n.to ? Y3e : W3e).range(n.from, n.to))); + this.ranges = e, this.active = r, this.deco = It.set(e.map((n) => (n.from == n.to ? H3e : Z3e).range(n.from, n.to))); } map(e) { let r = []; @@ -15261,7 +15261,7 @@ class w1 { return null; r.push(i); } - return new w1(r, this.active); + return new O1(r, this.active); } selectionInsideField(e) { return e.ranges.every((r) => this.ranges.some((n) => n.field == this.active && n.from <= r.from && n.to >= r.to)); @@ -15271,7 +15271,7 @@ const Qx = /* @__PURE__ */ or.define({ map(t, e) { return t && t.map(e); } -}), G3e = /* @__PURE__ */ or.define(), C2 = /* @__PURE__ */ Xn.define({ +}), j3e = /* @__PURE__ */ or.define(), C2 = /* @__PURE__ */ Xn.define({ create() { return null; }, @@ -15279,64 +15279,64 @@ const Qx = /* @__PURE__ */ or.define({ for (let r of e.effects) { if (r.is(Qx)) return r.value; - if (r.is(G3e) && t) - return new w1(t.ranges, r.value); + if (r.is(j3e) && t) + return new O1(t.ranges, r.value); } return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t; }, provide: (t) => kt.decorations.from(t, (e) => e ? e.deco : It.none) }); -function OD(t, e) { +function SD(t, e) { return je.create(t.filter((r) => r.field == e).map((r) => je.range(r.from, r.to))); } -function X3e(t) { - let e = wD.parse(t); +function K3e(t) { + let e = kD.parse(t); return (r, n, i, s) => { let { text: a, ranges: o } = e.instantiate(r.state, i), l = { changes: { from: i, to: s, insert: qr.of(a) }, scrollIntoView: !0, - annotations: n ? cte.of(n) : void 0 + annotations: n ? hte.of(n) : void 0 }; - if (o.length && (l.selection = OD(o, 0)), o.length > 1) { - let u = new w1(o, 0), h = l.effects = [Qx.of(u)]; - r.state.field(C2, !1) === void 0 && h.push(or.appendConfig.of([C2, J3e, eSe, dte])); + if (o.length && (l.selection = SD(o, 0)), o.length > 1) { + let u = new O1(o, 0), h = l.effects = [Qx.of(u)]; + r.state.field(C2, !1) === void 0 && h.push(or.appendConfig.of([C2, nSe, iSe, gte])); } r.dispatch(r.state.update(l)); }; } -function pte(t) { +function mte(t) { return ({ state: e, dispatch: r }) => { let n = e.field(C2, !1); if (!n || t < 0 && n.active == 0) return !1; let i = n.active + t, s = t > 0 && !n.ranges.some((a) => a.field == i + t); return r(e.update({ - selection: OD(n.ranges, i), - effects: Qx.of(s ? null : new w1(n.ranges, i)), + selection: SD(n.ranges, i), + effects: Qx.of(s ? null : new O1(n.ranges, i)), scrollIntoView: !0 })), !0; }; } -const H3e = ({ state: t, dispatch: e }) => t.field(C2, !1) ? (e(t.update({ effects: Qx.of(null) })), !0) : !1, Z3e = /* @__PURE__ */ pte(1), j3e = /* @__PURE__ */ pte(-1), K3e = [ - { key: "Tab", run: Z3e, shift: j3e }, - { key: "Escape", run: H3e } -], Hz = /* @__PURE__ */ $t.define({ +const J3e = ({ state: t, dispatch: e }) => t.field(C2, !1) ? (e(t.update({ effects: Qx.of(null) })), !0) : !1, eSe = /* @__PURE__ */ mte(1), tSe = /* @__PURE__ */ mte(-1), rSe = [ + { key: "Tab", run: eSe, shift: tSe }, + { key: "Escape", run: J3e } +], jz = /* @__PURE__ */ $t.define({ combine(t) { - return t.length ? t[0] : K3e; + return t.length ? t[0] : rSe; } -}), J3e = /* @__PURE__ */ uc.highest(/* @__PURE__ */ Zu.compute([Hz], (t) => t.facet(Hz))); +}), nSe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ ju.compute([jz], (t) => t.facet(jz))); function Qa(t, e) { - return Object.assign(Object.assign({}, e), { apply: X3e(t) }); + return Object.assign(Object.assign({}, e), { apply: K3e(t) }); } -const eSe = /* @__PURE__ */ kt.domEventHandlers({ +const iSe = /* @__PURE__ */ kt.domEventHandlers({ mousedown(t, e) { let r = e.state.field(C2, !1), n; if (!r || (n = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null) return !1; let i = r.ranges.find((s) => s.from <= n && s.to >= n); return !i || i.field == r.active ? !1 : (e.dispatch({ - selection: OD(r.ranges, i.field), - effects: Qx.of(r.ranges.some((s) => s.field > i.field) ? new w1(r.ranges, i.field) : null), + selection: SD(r.ranges, i.field), + effects: Qx.of(r.ranges.some((s) => s.field > i.field) ? new O1(r.ranges, i.field) : null), scrollIntoView: !0 }), !0); } @@ -15344,16 +15344,16 @@ const eSe = /* @__PURE__ */ kt.domEventHandlers({ brackets: ["(", "[", "{", "'", '"'], before: ")]}:;>", stringPrefixes: [] -}, a0 = /* @__PURE__ */ or.define({ +}, o0 = /* @__PURE__ */ or.define({ map(t, e) { let r = e.mapPos(t, -1, Fi.TrackAfter); return r == null ? void 0 : r; } -}), kD = /* @__PURE__ */ new class extends _0 { +}), TD = /* @__PURE__ */ new class extends A0 { }(); -kD.startSide = 1; -kD.endSide = -1; -const gte = /* @__PURE__ */ Xn.define({ +TD.startSide = 1; +TD.endSide = -1; +const vte = /* @__PURE__ */ Xn.define({ create() { return $r.empty; }, @@ -15363,39 +15363,39 @@ const gte = /* @__PURE__ */ Xn.define({ t = t.update({ filter: (n) => n >= r.from && n <= r.to }); } for (let r of e.effects) - r.is(a0) && (t = t.update({ add: [kD.range(r.value, r.value + 1)] })); + r.is(o0) && (t = t.update({ add: [TD.range(r.value, r.value + 1)] })); return t; } }); -function tSe() { - return [nSe, gte]; +function sSe() { + return [oSe, vte]; } -const N_ = "()[]{}<>"; -function mte(t) { - for (let e = 0; e < N_.length; e += 2) - if (N_.charCodeAt(e) == t) - return N_.charAt(e + 1); - return UM(t < 128 ? t : t + 1); +const B_ = "()[]{}<>"; +function yte(t) { + for (let e = 0; e < B_.length; e += 2) + if (B_.charCodeAt(e) == t) + return B_.charAt(e + 1); + return qM(t < 128 ? t : t + 1); } -function vte(t, e) { +function bte(t, e) { return t.languageDataAt("closeBrackets", e)[0] || E2; } -const rSe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), nSe = /* @__PURE__ */ kt.inputHandler.of((t, e, r, n) => { - if ((rSe ? t.composing : t.compositionStarted) || t.state.readOnly) +const aSe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), oSe = /* @__PURE__ */ kt.inputHandler.of((t, e, r, n) => { + if ((aSe ? t.composing : t.compositionStarted) || t.state.readOnly) return !1; let i = t.state.selection.main; if (n.length > 2 || n.length == 2 && Ho(bs(n, 0)) == 1 || e != i.from || r != i.to) return !1; - let s = aSe(t.state, n); + let s = uSe(t.state, n); return s ? (t.dispatch(s), !0) : !1; -}), iSe = ({ state: t, dispatch: e }) => { +}), lSe = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; - let n = vte(t, t.selection.main.head).brackets || E2.brackets, i = null, s = t.changeByRange((a) => { + let n = bte(t, t.selection.main.head).brackets || E2.brackets, i = null, s = t.changeByRange((a) => { if (a.empty) { - let o = oSe(t.doc, a.head); + let o = hSe(t.doc, a.head); for (let l of n) - if (l == o && VT(t.doc, a.head) == mte(bs(l, 0))) + if (l == o && qT(t.doc, a.head) == yte(bs(l, 0))) return { changes: { from: a.head - l.length, to: a.head + l.length }, range: je.cursor(a.head - l.length) @@ -15404,46 +15404,46 @@ const rSe = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav return { range: i = a }; }); return i || e(t.update(s, { scrollIntoView: !0, userEvent: "delete.backward" })), !i; -}, sSe = [ - { key: "Backspace", run: iSe } +}, cSe = [ + { key: "Backspace", run: lSe } ]; -function aSe(t, e) { - let r = vte(t, t.selection.main.head), n = r.brackets || E2.brackets; +function uSe(t, e) { + let r = bte(t, t.selection.main.head), n = r.brackets || E2.brackets; for (let i of n) { - let s = mte(bs(i, 0)); + let s = yte(bs(i, 0)); if (e == i) - return s == i ? uSe(t, i, n.indexOf(i + i + i) > -1, r) : lSe(t, i, s, r.before || E2.before); - if (e == s && yte(t, t.selection.main.from)) - return cSe(t, i, s); + return s == i ? pSe(t, i, n.indexOf(i + i + i) > -1, r) : fSe(t, i, s, r.before || E2.before); + if (e == s && xte(t, t.selection.main.from)) + return dSe(t, i, s); } return null; } -function yte(t, e) { +function xte(t, e) { let r = !1; - return t.field(gte).between(0, t.doc.length, (n) => { + return t.field(vte).between(0, t.doc.length, (n) => { n == e && (r = !0); }), r; } -function VT(t, e) { +function qT(t, e) { let r = t.sliceString(e, e + 2); return r.slice(0, Ho(bs(r, 0))); } -function oSe(t, e) { +function hSe(t, e) { let r = t.sliceString(e - 2, e); return Ho(bs(r, 0)) == r.length ? r : r.slice(1); } -function lSe(t, e, r, n) { +function fSe(t, e, r, n) { let i = null, s = t.changeByRange((a) => { if (!a.empty) return { changes: [{ insert: e, from: a.from }, { insert: r, from: a.to }], - effects: a0.of(a.to + e.length), + effects: o0.of(a.to + e.length), range: je.range(a.anchor + e.length, a.head + e.length) }; - let o = VT(t.doc, a.head); + let o = qT(t.doc, a.head); return !o || /\s/.test(o) || n.indexOf(o) > -1 ? { changes: { insert: e + r, from: a.head }, - effects: a0.of(a.head + e.length), + effects: o0.of(a.head + e.length), range: je.cursor(a.head + e.length) } : { range: i = a }; }); @@ -15452,8 +15452,8 @@ function lSe(t, e, r, n) { userEvent: "input.type" }); } -function cSe(t, e, r) { - let n = null, i = t.changeByRange((s) => s.empty && VT(t.doc, s.head) == r ? { +function dSe(t, e, r) { + let n = null, i = t.changeByRange((s) => s.empty && qT(t.doc, s.head) == r ? { changes: { from: s.head, to: s.head + r.length, insert: r }, range: je.cursor(s.head + r.length) } : n = { range: s }); @@ -15462,23 +15462,23 @@ function cSe(t, e, r) { userEvent: "input.type" }); } -function uSe(t, e, r, n) { +function pSe(t, e, r, n) { let i = n.stringPrefixes || E2.stringPrefixes, s = null, a = t.changeByRange((o) => { if (!o.empty) return { changes: [{ insert: e, from: o.from }, { insert: e, from: o.to }], - effects: a0.of(o.to + e.length), + effects: o0.of(o.to + e.length), range: je.range(o.anchor + e.length, o.head + e.length) }; - let l = o.head, u = VT(t.doc, l), h; + let l = o.head, u = qT(t.doc, l), h; if (u == e) { - if (Zz(t, l)) + if (Kz(t, l)) return { changes: { insert: e + e, from: l }, - effects: a0.of(l + e.length), + effects: o0.of(l + e.length), range: je.cursor(l + e.length) }; - if (yte(t, l)) { + if (xte(t, l)) { let d = r && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e; return { changes: { from: l, to: l + d.length, insert: d }, @@ -15486,16 +15486,16 @@ function uSe(t, e, r, n) { }; } } else { - if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = jz(t, l - 2 * e.length, i)) > -1 && Zz(t, h)) + if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = Jz(t, l - 2 * e.length, i)) > -1 && Kz(t, h)) return { changes: { insert: e + e + e + e, from: l }, - effects: a0.of(l + e.length), + effects: o0.of(l + e.length), range: je.cursor(l + e.length) }; - if (t.charCategorizer(l)(u) != Fn.Word && jz(t, l, i) > -1 && !hSe(t, l, e, i)) + if (t.charCategorizer(l)(u) != Fn.Word && Jz(t, l, i) > -1 && !gSe(t, l, e, i)) return { changes: { insert: e + e, from: l }, - effects: a0.of(l + e.length), + effects: o0.of(l + e.length), range: je.cursor(l + e.length) }; } @@ -15506,11 +15506,11 @@ function uSe(t, e, r, n) { userEvent: "input.type" }); } -function Zz(t, e) { +function Kz(t, e) { let r = Cn(t).resolveInner(e + 1); return r.parent && r.from == e; } -function hSe(t, e, r, n) { +function gSe(t, e, r, n) { let i = Cn(t).resolveInner(e, -1), s = n.reduce((a, o) => Math.max(a, o.length), 0); for (let a = 0; a < 5; a++) { let o = t.sliceDoc(i.from, Math.min(i.to, i.from + r.length + s)), l = o.indexOf(r); @@ -15530,7 +15530,7 @@ function hSe(t, e, r, n) { } return !1; } -function jz(t, e, r) { +function Jz(t, e, r) { let n = t.charCategorizer(e); if (n(t.sliceDoc(e - 1, e)) != Fn.Word) return e; @@ -15541,120 +15541,120 @@ function jz(t, e, r) { } return -1; } -function fSe(t = {}) { +function mSe(t = {}) { return [ To, Zs.of(t), - V3e, - dSe, - dte + G3e, + vSe, + gte ]; } -const bte = [ - { key: "Ctrl-Space", run: B3e }, - { key: "Escape", run: F3e }, +const wte = [ + { key: "Ctrl-Space", run: U3e }, + { key: "Escape", run: V3e }, { key: "ArrowDown", run: /* @__PURE__ */ SO(!0) }, { key: "ArrowUp", run: /* @__PURE__ */ SO(!1) }, { key: "PageDown", run: /* @__PURE__ */ SO(!0, "page") }, { key: "PageUp", run: /* @__PURE__ */ SO(!1, "page") }, - { key: "Enter", run: $3e } -], dSe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ Zu.computeN([Zs], (t) => t.facet(Zs).defaultKeymap ? [bte] : [])); -class pSe { + { key: "Enter", run: Q3e } +], vSe = /* @__PURE__ */ uc.highest(/* @__PURE__ */ ju.computeN([Zs], (t) => t.facet(Zs).defaultKeymap ? [wte] : [])); +class ySe { constructor(e, r, n) { this.from = e, this.to = r, this.diagnostic = n; } } -class Gd { +class Xd { constructor(e, r, n) { this.diagnostics = e, this.panel = r, this.selected = n; } static init(e, r, n) { - let i = e, s = n.facet(Ote).markerFilter; + let i = e, s = n.facet(Ste).markerFilter; s && (i = s(i)); let a = It.set(i.map((o) => o.from == o.to || o.from == o.to - 1 && n.doc.lineAt(o.from).to == o.from ? It.widget({ - widget: new kSe(o), + widget: new ESe(o), diagnostic: o }).range(o.from) : It.mark({ attributes: { class: "cm-lintRange cm-lintRange-" + o.severity + (o.markClass ? " " + o.markClass : "") }, diagnostic: o }).range(o.from, o.to)), !0); - return new Gd(a, r, gm(a)); + return new Xd(a, r, mm(a)); } } -function gm(t, e = null, r = 0) { +function mm(t, e = null, r = 0) { let n = null; return t.between(r, 1e9, (i, s, { spec: a }) => { if (!(e && a.diagnostic != e)) - return n = new pSe(i, s, a.diagnostic), !1; + return n = new ySe(i, s, a.diagnostic), !1; }), n; } -function gSe(t, e) { +function bSe(t, e) { let r = t.startState.doc.lineAt(e.pos); - return !!(t.effects.some((n) => n.is(xte)) || t.changes.touchesRange(r.from, r.to)); + return !!(t.effects.some((n) => n.is(Ote)) || t.changes.touchesRange(r.from, r.to)); } -function mSe(t, e) { - return t.field(Eo, !1) ? e : e.concat(or.appendConfig.of(CSe)); +function xSe(t, e) { + return t.field(Eo, !1) ? e : e.concat(or.appendConfig.of(LSe)); } -const xte = /* @__PURE__ */ or.define(), SD = /* @__PURE__ */ or.define(), wte = /* @__PURE__ */ or.define(), Eo = /* @__PURE__ */ Xn.define({ +const Ote = /* @__PURE__ */ or.define(), CD = /* @__PURE__ */ or.define(), kte = /* @__PURE__ */ or.define(), Eo = /* @__PURE__ */ Xn.define({ create() { - return new Gd(It.none, null, null); + return new Xd(It.none, null, null); }, update(t, e) { if (e.docChanged) { let r = t.diagnostics.map(e.changes), n = null; if (t.selected) { let i = e.changes.mapPos(t.selected.from, 1); - n = gm(r, t.selected.diagnostic, i) || gm(r, null, i); + n = mm(r, t.selected.diagnostic, i) || mm(r, null, i); } - t = new Gd(r, t.panel, n); + t = new Xd(r, t.panel, n); } for (let r of e.effects) - r.is(xte) ? t = Gd.init(r.value, t.panel, e.state) : r.is(SD) ? t = new Gd(t.diagnostics, r.value ? qT.open : null, t.selected) : r.is(wte) && (t = new Gd(t.diagnostics, t.panel, r.value)); + r.is(Ote) ? t = Xd.init(r.value, t.panel, e.state) : r.is(CD) ? t = new Xd(t.diagnostics, r.value ? YT.open : null, t.selected) : r.is(kte) && (t = new Xd(t.diagnostics, t.panel, r.value)); return t; }, provide: (t) => [ y2.from(t, (e) => e.panel), kt.decorations.from(t, (e) => e.diagnostics) ] -}), vSe = /* @__PURE__ */ It.mark({ class: "cm-lintRange cm-lintRange-active" }); -function ySe(t, e, r) { +}), wSe = /* @__PURE__ */ It.mark({ class: "cm-lintRange cm-lintRange-active" }); +function OSe(t, e, r) { let { diagnostics: n } = t.state.field(Eo), i = [], s = 2e8, a = 0; n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (l, u, { spec: h }) => { e >= l && e <= u && (l == u || (e > l || r > 0) && (e < u || r < 0)) && (i.push(h.diagnostic), s = Math.min(l, s), a = Math.max(u, a)); }); - let o = t.state.facet(Ote).tooltipFilter; + let o = t.state.facet(Ste).tooltipFilter; return o && (i = o(i)), i.length ? { pos: s, end: a, above: t.state.doc.lineAt(s).to < a, create() { - return { dom: bSe(t, i) }; + return { dom: kSe(t, i) }; } } : null; } -function bSe(t, e) { - return kn("ul", { class: "cm-tooltip-lint" }, e.map((r) => Ste(t, r, !1))); +function kSe(t, e) { + return kn("ul", { class: "cm-tooltip-lint" }, e.map((r) => Cte(t, r, !1))); } -const xSe = (t) => { +const SSe = (t) => { let e = t.state.field(Eo, !1); - (!e || !e.panel) && t.dispatch({ effects: mSe(t.state, [SD.of(!0)]) }); - let r = v2(t, qT.open); + (!e || !e.panel) && t.dispatch({ effects: xSe(t.state, [CD.of(!0)]) }); + let r = v2(t, YT.open); return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0; -}, Kz = (t) => { +}, eQ = (t) => { let e = t.state.field(Eo, !1); - return !e || !e.panel ? !1 : (t.dispatch({ effects: SD.of(!1) }), !0); -}, wSe = (t) => { + return !e || !e.panel ? !1 : (t.dispatch({ effects: CD.of(!1) }), !0); +}, TSe = (t) => { let e = t.state.field(Eo, !1); if (!e) return !1; let r = t.state.selection.main, n = e.diagnostics.iter(r.to + 1); return !n.value && (n = e.diagnostics.iter(0), !n.value || n.from == r.from && n.to == r.to) ? !1 : (t.dispatch({ selection: { anchor: n.from, head: n.to }, scrollIntoView: !0 }), !0); -}, OSe = [ - { key: "Mod-Shift-m", run: xSe, preventDefault: !0 }, - { key: "F8", run: wSe } -], Ote = /* @__PURE__ */ $t.define({ +}, CSe = [ + { key: "Mod-Shift-m", run: SSe, preventDefault: !0 }, + { key: "F8", run: TSe } +], Ste = /* @__PURE__ */ $t.define({ combine(t) { - return Object.assign({ sources: t.map((e) => e.source) }, pu(t.map((e) => e.config), { + return Object.assign({ sources: t.map((e) => e.source) }, gu(t.map((e) => e.config), { delay: 750, markerFilter: null, tooltipFilter: null, @@ -15664,7 +15664,7 @@ const xSe = (t) => { })); } }); -function kte(t) { +function Tte(t) { let e = []; if (t) e: @@ -15680,15 +15680,15 @@ function kte(t) { } return e; } -function Ste(t, e, r) { +function Cte(t, e, r) { var n; - let i = r ? kte(e.actions) : []; + let i = r ? Tte(e.actions) : []; return kn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, kn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage() : e.message), (n = e.actions) === null || n === void 0 ? void 0 : n.map((s, a) => { let o = !1, l = (d) => { if (d.preventDefault(), o) return; o = !0; - let p = gm(t.state.field(Eo).diagnostics, e); + let p = mm(t.state.field(Eo).diagnostics, e); p && s.apply(t, p.from, p.to); }, { name: u } = s, h = i[a] ? u.indexOf(i[a]) : -1, f = h < 0 ? u : [ u.slice(0, h), @@ -15704,7 +15704,7 @@ function Ste(t, e, r) { }, f); }), e.source && kn("div", { class: "cm-diagnosticSource" }, e.source)); } -class kSe extends uo { +class ESe extends uo { constructor(e) { super(), this.diagnostic = e; } @@ -15715,17 +15715,17 @@ class kSe extends uo { return kn("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity }); } } -class Jz { +class tQ { constructor(e, r) { - this.diagnostic = r, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = Ste(e, r, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option"); + this.diagnostic = r, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = Cte(e, r, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option"); } } -class qT { +class YT { constructor(e) { this.view = e, this.items = []; let r = (i) => { if (i.keyCode == 27) - Kz(this.view), this.view.focus(); + eQ(this.view), this.view.focus(); else if (i.keyCode == 38 || i.keyCode == 33) this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length); else if (i.keyCode == 40 || i.keyCode == 34) @@ -15737,10 +15737,10 @@ class qT { else if (i.keyCode == 13) this.view.focus(); else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) { - let { diagnostic: s } = this.items[this.selectedIndex], a = kte(s.actions); + let { diagnostic: s } = this.items[this.selectedIndex], a = Tte(s.actions); for (let o = 0; o < a.length; o++) if (a[o].toUpperCase().charCodeAt(0) == i.keyCode) { - let l = gm(this.view.state.field(Eo).diagnostics, s); + let l = mm(this.view.state.field(Eo).diagnostics, s); l && s.actions[o].apply(e, l.from, l.to); } } else @@ -15760,7 +15760,7 @@ class qT { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), - onclick: () => Kz(this.view) + onclick: () => eQ(this.view) }, "\xD7")), this.update(); } get selectedIndex() { @@ -15781,10 +15781,10 @@ class qT { u = f; break; } - u < 0 ? (h = new Jz(this.view, l.diagnostic), this.items.splice(n, 0, h), i = !0) : (h = this.items[u], u > n && (this.items.splice(n, u - n), i = !0)), r && h.diagnostic == r.diagnostic ? h.dom.hasAttribute("aria-selected") || (h.dom.setAttribute("aria-selected", "true"), s = h) : h.dom.hasAttribute("aria-selected") && h.dom.removeAttribute("aria-selected"), n++; + u < 0 ? (h = new tQ(this.view, l.diagnostic), this.items.splice(n, 0, h), i = !0) : (h = this.items[u], u > n && (this.items.splice(n, u - n), i = !0)), r && h.diagnostic == r.diagnostic ? h.dom.hasAttribute("aria-selected") || (h.dom.setAttribute("aria-selected", "true"), s = h) : h.dom.hasAttribute("aria-selected") && h.dom.removeAttribute("aria-selected"), n++; }); n < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); ) i = !0, this.items.pop(); - this.items.length == 0 && (this.items.push(new Jz(this.view, { + this.items.length == 0 && (this.items.push(new tQ(this.view, { from: -1, to: -1, severity: "info", @@ -15817,24 +15817,24 @@ class qT { moveSelection(e) { if (this.selectedIndex < 0) return; - let r = this.view.state.field(Eo), n = gm(r.diagnostics, this.items[e].diagnostic); + let r = this.view.state.field(Eo), n = mm(r.diagnostics, this.items[e].diagnostic); !n || this.view.dispatch({ selection: { anchor: n.from, head: n.to }, scrollIntoView: !0, - effects: wte.of(n) + effects: kte.of(n) }); } static open(e) { - return new qT(e); + return new YT(e); } } -function SSe(t, e = 'viewBox="0 0 40 40"') { +function _Se(t, e = 'viewBox="0 0 40 40"') { return `url('data:image/svg+xml,${encodeURIComponent(t)}')`; } function TO(t) { - return SSe(``, 'width="6" height="3"'); + return _Se(``, 'width="6" height="3"'); } -const TSe = /* @__PURE__ */ kt.baseTheme({ +const ASe = /* @__PURE__ */ kt.baseTheme({ ".cm-diagnostic": { padding: "3px 6px 3px 8px", marginLeft: "-1px", @@ -15924,85 +15924,85 @@ const TSe = /* @__PURE__ */ kt.baseTheme({ margin: 0 } } -}), CSe = [ +}), LSe = [ Eo, /* @__PURE__ */ kt.decorations.compute([Eo], (t) => { let { selected: e, panel: r } = t.field(Eo); return !e || !r || e.from == e.to ? It.none : It.set([ - vSe.range(e.from, e.to) + wSe.range(e.from, e.to) ]); }), - /* @__PURE__ */ w4e(ySe, { hideOn: gSe }), - TSe -], ESe = /* @__PURE__ */ (() => [ - A4e(), - M4e(), - BJ(), - fD(), - S5e(), - NJ(), - XOe(), + /* @__PURE__ */ T4e(OSe, { hideOn: bSe }), + ASe +], RSe = /* @__PURE__ */ (() => [ + D4e(), + I4e(), + zJ(), + pD(), + _5e(), + $J(), + KOe(), Sr.allowMultipleSelections.of(!0), - h5e(), - uee(hee, { fallback: !0 }), - P5e(), - tSe(), - fSe(), - u4e(), - d4e(), - FJ(), - Kke(), - Zu.of([ - ...sSe, - ...Hee, - ...v3e, - ...Oee, - ...x5e, - ...bte, - ...OSe + g5e(), + fee(dee, { fallback: !0 }), + B5e(), + sSe(), + mSe(), + p4e(), + v4e(), + QJ(), + r3e(), + ju.of([ + ...cSe, + ...jee, + ...w3e, + ...See, + ...S5e, + ...wte, + ...CSe ]) -])(), _Se = /* @__PURE__ */ (() => [ - BJ(), - fD(), - NJ(), - uee(hee, { fallback: !0 }), - Zu.of([ - ...Hee, - ...Oee +])(), MSe = /* @__PURE__ */ (() => [ + zJ(), + pD(), + $J(), + fee(dee, { fallback: !0 }), + ju.of([ + ...jee, + ...See ]) -])(), ql = () => /* @__PURE__ */ new Map(), M8 = (t) => { +])(), ql = () => /* @__PURE__ */ new Map(), N8 = (t) => { const e = ql(); return t.forEach((r, n) => { e.set(n, r); }), e; -}, Ah = (t, e, r) => { +}, Lh = (t, e, r) => { let n = t.get(e); return n === void 0 && t.set(e, n = r()), n; -}, ASe = (t, e) => { +}, DSe = (t, e) => { const r = []; for (const [n, i] of t) r.push(e(i, n)); return r; -}, LSe = (t, e) => { +}, PSe = (t, e) => { for (const [r, n] of t) if (e(n, r)) return !0; return !1; -}, L0 = () => /* @__PURE__ */ new Set(), I_ = (t) => t[t.length - 1], RSe = (t, e) => { +}, R0 = () => /* @__PURE__ */ new Set(), F_ = (t) => t[t.length - 1], NSe = (t, e) => { for (let r = 0; r < e.length; r++) t.push(e[r]); -}, Ff = Array.from, MSe = (t, e) => { +}, zf = Array.from, ISe = (t, e) => { for (let r = 0; r < t.length; r++) if (e(t[r], r, t)) return !0; return !1; -}, D8 = Array.isArray; -class YT { +}, I8 = Array.isArray; +class WT { constructor() { this._observers = ql(); } on(e, r) { - Ah(this._observers, e, L0).add(r); + Lh(this._observers, e, R0).add(r); } once(e, r) { const n = (...i) => { @@ -16015,18 +16015,18 @@ class YT { n !== void 0 && (n.delete(r), n.size === 0 && this._observers.delete(e)); } emit(e, r) { - return Ff((this._observers.get(e) || ql()).values()).forEach((n) => n(...r)); + return zf((this._observers.get(e) || ql()).values()).forEach((n) => n(...r)); } destroy() { this._observers = ql(); } } -const hh = Math.floor, l5 = Math.abs, WT = (t, e) => t < e ? t : e, pd = (t, e) => t > e ? t : e, DSe = Math.pow, Tte = (t) => t !== 0 ? t < 0 : 1 / t < 0, eQ = 1, tQ = 2, $_ = 4, B_ = 8, _2 = 32, Ku = 64, _o = 128, GT = 31, P8 = 63, x0 = 127, PSe = 2147483647, Cte = Number.MAX_SAFE_INTEGER, NSe = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && hh(t) === t), ISe = String.fromCharCode, $Se = (t) => t.toLowerCase(), BSe = /^\s*/g, FSe = (t) => t.replace(BSe, ""), zSe = /([A-Z])/g, rQ = (t, e) => FSe(t.replace(zSe, (r) => `${e}${$Se(r)}`)), QSe = (t) => { +const fh = Math.floor, l5 = Math.abs, GT = (t, e) => t < e ? t : e, pd = (t, e) => t > e ? t : e, $Se = Math.pow, Ete = (t) => t !== 0 ? t < 0 : 1 / t < 0, rQ = 1, nQ = 2, z_ = 4, Q_ = 8, _2 = 32, Ju = 64, _o = 128, XT = 31, $8 = 63, w0 = 127, BSe = 2147483647, _te = Number.MAX_SAFE_INTEGER, FSe = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && fh(t) === t), zSe = String.fromCharCode, QSe = (t) => t.toLowerCase(), USe = /^\s*/g, VSe = (t) => t.replace(USe, ""), qSe = /([A-Z])/g, iQ = (t, e) => VSe(t.replace(qSe, (r) => `${e}${QSe(r)}`)), YSe = (t) => { const e = unescape(encodeURIComponent(t)), r = e.length, n = new Uint8Array(r); for (let i = 0; i < r; i++) n[i] = e.codePointAt(i); return n; -}, A2 = typeof TextEncoder < "u" ? new TextEncoder() : null, USe = (t) => A2.encode(t), VSe = A2 ? USe : QSe; +}, A2 = typeof TextEncoder < "u" ? new TextEncoder() : null, WSe = (t) => A2.encode(t), GSe = A2 ? WSe : YSe; let Iy = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 }); Iy && Iy.decode(new Uint8Array()).length === 1 && (Iy = null); class Ux { @@ -16034,70 +16034,70 @@ class Ux { this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = []; } } -const Ys = () => new Ux(), TD = (t) => { +const Ys = () => new Ux(), ED = (t) => { let e = t.cpos; for (let r = 0; r < t.bufs.length; r++) e += t.bufs[r].length; return e; }, Vn = (t) => { - const e = new Uint8Array(TD(t)); + const e = new Uint8Array(ED(t)); let r = 0; for (let n = 0; n < t.bufs.length; n++) { const i = t.bufs[n]; e.set(i, r), r += i.length; } return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), r), e; -}, qSe = (t, e) => { +}, XSe = (t, e) => { const r = t.cbuf.length; r - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(pd(r, e) * 2), t.cpos = 0); }, ts = (t, e) => { const r = t.cbuf.length; t.cpos === r && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(r * 2), t.cpos = 0), t.cbuf[t.cpos++] = e; -}, N8 = ts, rr = (t, e) => { - for (; e > x0; ) - ts(t, _o | x0 & e), e = hh(e / 128); - ts(t, x0 & e); -}, CD = (t, e) => { - const r = Tte(e); - for (r && (e = -e), ts(t, (e > P8 ? _o : 0) | (r ? Ku : 0) | P8 & e), e = hh(e / 64); e > 0; ) - ts(t, (e > x0 ? _o : 0) | x0 & e), e = hh(e / 128); -}, I8 = new Uint8Array(3e4), YSe = I8.length / 3, WSe = (t, e) => { - if (e.length < YSe) { - const r = A2.encodeInto(e, I8).written || 0; +}, B8 = ts, rr = (t, e) => { + for (; e > w0; ) + ts(t, _o | w0 & e), e = fh(e / 128); + ts(t, w0 & e); +}, _D = (t, e) => { + const r = Ete(e); + for (r && (e = -e), ts(t, (e > $8 ? _o : 0) | (r ? Ju : 0) | $8 & e), e = fh(e / 64); e > 0; ) + ts(t, (e > w0 ? _o : 0) | w0 & e), e = fh(e / 128); +}, F8 = new Uint8Array(3e4), HSe = F8.length / 3, ZSe = (t, e) => { + if (e.length < HSe) { + const r = A2.encodeInto(e, F8).written || 0; rr(t, r); for (let n = 0; n < r; n++) - ts(t, I8[n]); + ts(t, F8[n]); } else - ci(t, VSe(e)); -}, GSe = (t, e) => { + ci(t, GSe(e)); +}, jSe = (t, e) => { const r = unescape(encodeURIComponent(e)), n = r.length; rr(t, n); for (let i = 0; i < n; i++) ts(t, r.codePointAt(i)); -}, w0 = A2 && A2.encodeInto ? WSe : GSe, XT = (t, e) => { - const r = t.cbuf.length, n = t.cpos, i = WT(r - n, e.length), s = e.length - i; +}, O0 = A2 && A2.encodeInto ? ZSe : jSe, HT = (t, e) => { + const r = t.cbuf.length, n = t.cpos, i = GT(r - n, e.length), s = e.length - i; t.cbuf.set(e.subarray(0, i), n), t.cpos += i, s > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(pd(r * 2, s)), t.cbuf.set(e.subarray(i)), t.cpos = s); }, ci = (t, e) => { - rr(t, e.byteLength), XT(t, e); -}, ED = (t, e) => { - qSe(t, e); + rr(t, e.byteLength), HT(t, e); +}, AD = (t, e) => { + XSe(t, e); const r = new DataView(t.cbuf.buffer, t.cpos, e); return t.cpos += e, r; -}, XSe = (t, e) => ED(t, 4).setFloat32(0, e, !1), HSe = (t, e) => ED(t, 8).setFloat64(0, e, !1), ZSe = (t, e) => ED(t, 8).setBigInt64(0, e, !1), nQ = new DataView(new ArrayBuffer(4)), jSe = (t) => (nQ.setFloat32(0, t), nQ.getFloat32(0) === t), L2 = (t, e) => { +}, KSe = (t, e) => AD(t, 4).setFloat32(0, e, !1), JSe = (t, e) => AD(t, 8).setFloat64(0, e, !1), eTe = (t, e) => AD(t, 8).setBigInt64(0, e, !1), sQ = new DataView(new ArrayBuffer(4)), tTe = (t) => (sQ.setFloat32(0, t), sQ.getFloat32(0) === t), L2 = (t, e) => { switch (typeof e) { case "string": - ts(t, 119), w0(t, e); + ts(t, 119), O0(t, e); break; case "number": - NSe(e) && l5(e) <= PSe ? (ts(t, 125), CD(t, e)) : jSe(e) ? (ts(t, 124), XSe(t, e)) : (ts(t, 123), HSe(t, e)); + FSe(e) && l5(e) <= BSe ? (ts(t, 125), _D(t, e)) : tTe(e) ? (ts(t, 124), KSe(t, e)) : (ts(t, 123), JSe(t, e)); break; case "bigint": - ts(t, 122), ZSe(t, e); + ts(t, 122), eTe(t, e); break; case "object": if (e === null) ts(t, 126); - else if (D8(e)) { + else if (I8(e)) { ts(t, 117), rr(t, e.length); for (let r = 0; r < e.length; r++) L2(t, e[r]); @@ -16109,7 +16109,7 @@ const Ys = () => new Ux(), TD = (t) => { rr(t, r.length); for (let n = 0; n < r.length; n++) { const i = r[n]; - w0(t, i), L2(t, e[i]); + O0(t, i), L2(t, e[i]); } } break; @@ -16120,7 +16120,7 @@ const Ys = () => new Ux(), TD = (t) => { ts(t, 127); } }; -class iQ extends Ux { +class aQ extends Ux { constructor(e) { super(), this.w = e, this.s = null, this.count = 0; } @@ -16128,38 +16128,38 @@ class iQ extends Ux { this.s === e ? this.count++ : (this.count > 0 && rr(this, this.count - 1), this.count = 1, this.w(this, e), this.s = e); } } -const sQ = (t) => { - t.count > 0 && (CD(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && rr(t.encoder, t.count - 2)); +const oQ = (t) => { + t.count > 0 && (_D(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && rr(t.encoder, t.count - 2)); }; class c5 { constructor() { this.encoder = new Ux(), this.s = 0, this.count = 0; } write(e) { - this.s === e ? this.count++ : (sQ(this), this.count = 1, this.s = e); + this.s === e ? this.count++ : (oQ(this), this.count = 1, this.s = e); } toUint8Array() { - return sQ(this), Vn(this.encoder); + return oQ(this), Vn(this.encoder); } } -const aQ = (t) => { +const lQ = (t) => { if (t.count > 0) { const e = t.diff * 2 + (t.count === 1 ? 0 : 1); - CD(t.encoder, e), t.count > 1 && rr(t.encoder, t.count - 2); + _D(t.encoder, e), t.count > 1 && rr(t.encoder, t.count - 2); } }; -class F_ { +class U_ { constructor() { this.encoder = new Ux(), this.s = 0, this.count = 0, this.diff = 0; } write(e) { - this.diff === e - this.s ? (this.s = e, this.count++) : (aQ(this), this.count = 1, this.diff = e - this.s, this.s = e); + this.diff === e - this.s ? (this.s = e, this.count++) : (lQ(this), this.count = 1, this.diff = e - this.s, this.s = e); } toUint8Array() { - return aQ(this), Vn(this.encoder); + return lQ(this), Vn(this.encoder); } } -class KSe { +class rTe { constructor() { this.sarr = [], this.s = "", this.lensE = new c5(); } @@ -16168,55 +16168,55 @@ class KSe { } toUint8Array() { const e = new Ux(); - return this.sarr.push(this.s), this.s = "", w0(e, this.sarr.join("")), XT(e, this.lensE.toUint8Array()), Vn(e); + return this.sarr.push(this.s), this.s = "", O0(e, this.sarr.join("")), HT(e, this.lensE.toUint8Array()), Vn(e); } } -const zf = (t) => new Error(t), Jc = () => { - throw zf("Method unimplemented"); +const Qf = (t) => new Error(t), Jc = () => { + throw Qf("Method unimplemented"); }, ic = () => { - throw zf("Unexpected case"); -}, Ete = zf("Unexpected end of array"), _te = zf("Integer out of Range"); -class HT { + throw Qf("Unexpected case"); +}, Ate = Qf("Unexpected end of array"), Lte = Qf("Integer out of Range"); +class ZT { constructor(e) { this.arr = e, this.pos = 0; } } -const gd = (t) => new HT(t), JSe = (t) => t.pos !== t.arr.length, eTe = (t, e) => { +const gd = (t) => new ZT(t), nTe = (t) => t.pos !== t.arr.length, iTe = (t, e) => { const r = new Uint8Array(t.arr.buffer, t.pos + t.arr.byteOffset, e); return t.pos += e, r; -}, qs = (t) => eTe(t, xr(t)), mm = (t) => t.arr[t.pos++], xr = (t) => { +}, qs = (t) => iTe(t, xr(t)), vm = (t) => t.arr[t.pos++], xr = (t) => { let e = 0, r = 1; const n = t.arr.length; for (; t.pos < n; ) { const i = t.arr[t.pos++]; - if (e = e + (i & x0) * r, r *= 128, i < _o) + if (e = e + (i & w0) * r, r *= 128, i < _o) return e; - if (e > Cte) - throw _te; + if (e > _te) + throw Lte; } - throw Ete; -}, _D = (t) => { - let e = t.arr[t.pos++], r = e & P8, n = 64; - const i = (e & Ku) > 0 ? -1 : 1; + throw Ate; +}, LD = (t) => { + let e = t.arr[t.pos++], r = e & $8, n = 64; + const i = (e & Ju) > 0 ? -1 : 1; if ((e & _o) === 0) return i * r; const s = t.arr.length; for (; t.pos < s; ) { - if (e = t.arr[t.pos++], r = r + (e & x0) * n, n *= 128, e < _o) + if (e = t.arr[t.pos++], r = r + (e & w0) * n, n *= 128, e < _o) return i * r; - if (r > Cte) - throw _te; + if (r > _te) + throw Lte; } - throw Ete; -}, tTe = (t) => { + throw Ate; +}, sTe = (t) => { let e = xr(t); if (e === 0) return ""; { - let r = String.fromCodePoint(mm(t)); + let r = String.fromCodePoint(vm(t)); if (--e < 100) for (; e--; ) - r += String.fromCodePoint(mm(t)); + r += String.fromCodePoint(vm(t)); else for (; e > 0; ) { const n = e < 1e4 ? e : 1e4, i = t.arr.subarray(t.pos, t.pos + n); @@ -16224,24 +16224,24 @@ const gd = (t) => new HT(t), JSe = (t) => t.pos !== t.arr.length, eTe = (t, e) = } return decodeURIComponent(escape(r)); } -}, rTe = (t) => Iy.decode(qs(t)), Of = Iy ? rTe : tTe, AD = (t, e) => { +}, aTe = (t) => Iy.decode(qs(t)), kf = Iy ? aTe : sTe, RD = (t, e) => { const r = new DataView(t.arr.buffer, t.arr.byteOffset + t.pos, e); return t.pos += e, r; -}, nTe = (t) => AD(t, 4).getFloat32(0, !1), iTe = (t) => AD(t, 8).getFloat64(0, !1), sTe = (t) => AD(t, 8).getBigInt64(0, !1), aTe = [ +}, oTe = (t) => RD(t, 4).getFloat32(0, !1), lTe = (t) => RD(t, 8).getFloat64(0, !1), cTe = (t) => RD(t, 8).getBigInt64(0, !1), uTe = [ (t) => { }, (t) => null, - _D, - nTe, - iTe, - sTe, + LD, + oTe, + lTe, + cTe, (t) => !1, (t) => !0, - Of, + kf, (t) => { const e = xr(t), r = {}; for (let n = 0; n < e; n++) { - const i = Of(t); + const i = kf(t); r[i] = R2(t); } return r; @@ -16253,56 +16253,56 @@ const gd = (t) => new HT(t), JSe = (t) => t.pos !== t.arr.length, eTe = (t, e) = return r; }, qs -], R2 = (t) => aTe[127 - mm(t)](t); -class oQ extends HT { +], R2 = (t) => uTe[127 - vm(t)](t); +class cQ extends ZT { constructor(e, r) { super(e), this.reader = r, this.s = null, this.count = 0; } read() { - return this.count === 0 && (this.s = this.reader(this), JSe(this) ? this.count = xr(this) + 1 : this.count = -1), this.count--, this.s; + return this.count === 0 && (this.s = this.reader(this), nTe(this) ? this.count = xr(this) + 1 : this.count = -1), this.count--, this.s; } } -class u5 extends HT { +class u5 extends ZT { constructor(e) { super(e), this.s = 0, this.count = 0; } read() { if (this.count === 0) { - this.s = _D(this); - const e = Tte(this.s); + this.s = LD(this); + const e = Ete(this.s); this.count = 1, e && (this.s = -this.s, this.count = xr(this) + 2); } return this.count--, this.s; } } -class z_ extends HT { +class V_ extends ZT { constructor(e) { super(e), this.s = 0, this.count = 0, this.diff = 0; } read() { if (this.count === 0) { - const e = _D(this), r = e & 1; - this.diff = hh(e / 2), this.count = 1, r && (this.count = xr(this) + 2); + const e = LD(this), r = e & 1; + this.diff = fh(e / 2), this.count = 1, r && (this.count = xr(this) + 2); } return this.s += this.diff, this.count--, this.s; } } -class oTe { +class hTe { constructor(e) { - this.decoder = new u5(e), this.str = Of(this.decoder), this.spos = 0; + this.decoder = new u5(e), this.str = kf(this.decoder), this.spos = 0; } read() { const e = this.spos + this.decoder.read(), r = this.str.slice(this.spos, e); return this.spos = e, r; } } -const lTe = crypto.getRandomValues.bind(crypto), Ate = () => lTe(new Uint32Array(1))[0], cTe = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, uTe = () => cTe.replace( +const fTe = crypto.getRandomValues.bind(crypto), Rte = () => fTe(new Uint32Array(1))[0], dTe = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, pTe = () => dTe.replace( /[018]/g, - (t) => (t ^ Ate() & 15 >> t / 4).toString(16) -), Qf = Date.now, lQ = (t) => new Promise(t); + (t) => (t ^ Rte() & 15 >> t / 4).toString(16) +), Uf = Date.now, uQ = (t) => new Promise(t); Promise.all.bind(Promise); -const cQ = (t) => t === void 0 ? null : t; -class hTe { +const hQ = (t) => t === void 0 ? null : t; +class gTe { constructor() { this.map = /* @__PURE__ */ new Map(); } @@ -16313,38 +16313,38 @@ class hTe { return this.map.get(e); } } -let Lte = new hTe(), LD = !0; +let Mte = new gTe(), MD = !0; try { - typeof localStorage < "u" && localStorage && (Lte = localStorage, LD = !1); + typeof localStorage < "u" && localStorage && (Mte = localStorage, MD = !1); } catch { } -const Rte = Lte, fTe = (t) => LD || addEventListener("storage", t), dTe = (t) => LD || removeEventListener("storage", t), pTe = Object.assign, gTe = Object.keys, mTe = (t, e) => { +const Dte = Mte, mTe = (t) => MD || addEventListener("storage", t), vTe = (t) => MD || removeEventListener("storage", t), yTe = Object.assign, bTe = Object.keys, xTe = (t, e) => { for (const r in t) e(t[r], r); -}, vTe = (t, e) => { +}, wTe = (t, e) => { const r = []; for (const n in t) r.push(e(t[n], n)); return r; -}, Pk = (t) => gTe(t).length, yTe = (t) => { +}, Pk = (t) => bTe(t).length, OTe = (t) => { for (const e in t) return !1; return !0; -}, bTe = (t, e) => { +}, kTe = (t, e) => { for (const r in t) if (!e(t[r], r)) return !1; return !0; -}, Mte = (t, e) => Object.prototype.hasOwnProperty.call(t, e), xTe = (t, e) => t === e || Pk(t) === Pk(e) && bTe(t, (r, n) => (r !== void 0 || Mte(e, n)) && e[n] === r), RD = (t, e, r = 0) => { +}, Pte = (t, e) => Object.prototype.hasOwnProperty.call(t, e), STe = (t, e) => t === e || Pk(t) === Pk(e) && kTe(t, (r, n) => (r !== void 0 || Pte(e, n)) && e[n] === r), DD = (t, e, r = 0) => { try { for (; r < t.length; r++) t[r](...e); } finally { - r < t.length && RD(t, e, r + 1); + r < t.length && DD(t, e, r + 1); } -}, wTe = (t) => t, OTe = (t, e) => t === e, $y = (t, e) => { +}, TTe = (t) => t, CTe = (t, e) => t === e, $y = (t, e) => { if (t == null || e == null) - return OTe(t, e); + return CTe(t, e); if (t.constructor !== e.constructor) return !1; if (t === e) @@ -16380,7 +16380,7 @@ const Rte = Lte, fTe = (t) => LD || addEventListener("storage", t), dTe = (t) => if (Pk(t) !== Pk(e)) return !1; for (const r in t) - if (!Mte(t, r) || !$y(t[r], e[r])) + if (!Pte(t, r) || !$y(t[r], e[r])) return !1; break; case Array: @@ -16394,12 +16394,12 @@ const Rte = Lte, fTe = (t) => LD || addEventListener("storage", t), dTe = (t) => return !1; } return !0; -}, kTe = (t, e) => e.includes(t), vm = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", Dte = typeof window < "u" && typeof document < "u" && !vm; +}, ETe = (t, e) => e.includes(t), ym = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", Nte = typeof window < "u" && typeof document < "u" && !ym; typeof navigator < "u" && /Mac/.test(navigator.platform); let Sc; -const STe = () => { +const _Te = () => { if (Sc === void 0) - if (vm) { + if (ym) { Sc = ql(); const t = process.argv; let e = null; @@ -16412,52 +16412,52 @@ const STe = () => { typeof location == "object" ? (Sc = ql(), (location.search || "?").slice(1).split("&").forEach((t) => { if (t.length !== 0) { const [e, r] = t.split("="); - Sc.set(`--${rQ(e, "-")}`, r), Sc.set(`-${rQ(e, "-")}`, r); + Sc.set(`--${iQ(e, "-")}`, r), Sc.set(`-${iQ(e, "-")}`, r); } })) : Sc = ql(); return Sc; -}, $8 = (t) => STe().has(t), B8 = (t) => cQ(vm ? {}[t.toUpperCase()] : Rte.getItem(t)), TTe = (t) => $8("--" + t) || B8(t) !== null; -TTe("production"); -const uQ = vm && kTe({}.FORCE_COLOR, ["true", "1", "2"]), CTe = !$8("no-colors") && (!vm || process.stdout.isTTY || uQ) && (!vm || $8("color") || uQ || B8("COLORTERM") !== null || (B8("TERM") || "").includes("color")), Pte = (t) => new Uint8Array(t), ETe = (t, e, r) => new Uint8Array(t, e, r), _Te = (t) => new Uint8Array(t), ATe = (t) => { +}, z8 = (t) => _Te().has(t), Q8 = (t) => hQ(ym ? {}[t.toUpperCase()] : Dte.getItem(t)), ATe = (t) => z8("--" + t) || Q8(t) !== null; +ATe("production"); +const fQ = ym && ETe({}.FORCE_COLOR, ["true", "1", "2"]), LTe = !z8("no-colors") && (!ym || process.stdout.isTTY || fQ) && (!ym || z8("color") || fQ || Q8("COLORTERM") !== null || (Q8("TERM") || "").includes("color")), Ite = (t) => new Uint8Array(t), RTe = (t, e, r) => new Uint8Array(t, e, r), MTe = (t) => new Uint8Array(t), DTe = (t) => { let e = ""; for (let r = 0; r < t.byteLength; r++) - e += ISe(t[r]); + e += zSe(t[r]); return btoa(e); -}, LTe = (t) => Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), RTe = (t) => { - const e = atob(t), r = Pte(e.length); +}, PTe = (t) => Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), NTe = (t) => { + const e = atob(t), r = Ite(e.length); for (let n = 0; n < e.length; n++) r[n] = e.charCodeAt(n); return r; -}, MTe = (t) => { +}, ITe = (t) => { const e = Buffer.from(t, "base64"); - return ETe(e.buffer, e.byteOffset, e.byteLength); -}, DTe = Dte ? ATe : LTe, PTe = Dte ? RTe : MTe, NTe = (t) => { - const e = Pte(t.byteLength); + return RTe(e.buffer, e.byteOffset, e.byteLength); +}, $Te = Nte ? DTe : PTe, BTe = Nte ? NTe : ITe, FTe = (t) => { + const e = Ite(t.byteLength); return e.set(t), e; }; -class ITe { +class zTe { constructor(e, r) { this.left = e, this.right = r; } } -const xo = (t, e) => new ITe(t, e), $Te = (t, e) => t.forEach((r) => e(r.left, r.right)), mu = typeof document < "u" ? document : {}, BTe = (t) => mu.createElement(t), FTe = () => mu.createDocumentFragment(), zTe = (t) => mu.createTextNode(t); +const xo = (t, e) => new zTe(t, e), QTe = (t, e) => t.forEach((r) => e(r.left, r.right)), vu = typeof document < "u" ? document : {}, UTe = (t) => vu.createElement(t), VTe = () => vu.createDocumentFragment(), qTe = (t) => vu.createTextNode(t); typeof DOMParser < "u" && new DOMParser(); -const QTe = (t, e) => ($Te(e, (r, n) => { +const YTe = (t, e) => (QTe(e, (r, n) => { n === !1 ? t.removeAttribute(r) : n === !0 ? t.setAttribute(r, "") : t.setAttribute(r, n); -}), t), UTe = (t) => { - const e = FTe(); +}), t), WTe = (t) => { + const e = VTe(); for (let r = 0; r < t.length; r++) - Nte(e, t[r]); + $te(e, t[r]); return e; -}, VTe = (t, e) => (Nte(t, UTe(e)), t), Q_ = (t, e = [], r = []) => VTe(QTe(BTe(t), e), r), CO = zTe, qTe = (t) => ASe(t, (e, r) => `${r}:${e};`).join(""), Nte = (t, e) => t.appendChild(e); -mu.ELEMENT_NODE; -mu.TEXT_NODE; -mu.CDATA_SECTION_NODE; -mu.COMMENT_NODE; -mu.DOCUMENT_NODE; -mu.DOCUMENT_TYPE_NODE; -mu.DOCUMENT_FRAGMENT_NODE; -const Lh = Symbol, Ite = Lh(), $te = Lh(), YTe = Lh(), WTe = Lh(), GTe = Lh(), Bte = Lh(), XTe = Lh(), MD = Lh(), HTe = Lh(), ZTe = (t) => { +}, GTe = (t, e) => ($te(t, WTe(e)), t), q_ = (t, e = [], r = []) => GTe(YTe(UTe(t), e), r), CO = qTe, XTe = (t) => DSe(t, (e, r) => `${r}:${e};`).join(""), $te = (t, e) => t.appendChild(e); +vu.ELEMENT_NODE; +vu.TEXT_NODE; +vu.CDATA_SECTION_NODE; +vu.COMMENT_NODE; +vu.DOCUMENT_NODE; +vu.DOCUMENT_TYPE_NODE; +vu.DOCUMENT_FRAGMENT_NODE; +const Rh = Symbol, Bte = Rh(), Fte = Rh(), HTe = Rh(), ZTe = Rh(), jTe = Rh(), zte = Rh(), KTe = Rh(), PD = Rh(), JTe = Rh(), eCe = (t) => { const e = []; let r = 0; for (; r < t.length; r++) { @@ -16465,25 +16465,25 @@ const Lh = Symbol, Ite = Lh(), $te = Lh(), YTe = Lh(), WTe = Lh(), GTe = Lh(), B n.constructor === String || n.constructor === Number || n.constructor === Object && e.push(JSON.stringify(n)); } return e; -}, jTe = { - [Ite]: xo("font-weight", "bold"), - [$te]: xo("font-weight", "normal"), - [YTe]: xo("color", "blue"), - [GTe]: xo("color", "green"), - [WTe]: xo("color", "grey"), - [Bte]: xo("color", "red"), - [XTe]: xo("color", "purple"), - [MD]: xo("color", "orange"), - [HTe]: xo("color", "black") -}, KTe = (t) => { +}, tCe = { + [Bte]: xo("font-weight", "bold"), + [Fte]: xo("font-weight", "normal"), + [HTe]: xo("color", "blue"), + [jTe]: xo("color", "green"), + [ZTe]: xo("color", "grey"), + [zte]: xo("color", "red"), + [KTe]: xo("color", "purple"), + [PD]: xo("color", "orange"), + [JTe]: xo("color", "black") +}, rCe = (t) => { const e = [], r = [], n = ql(); let i = [], s = 0; for (; s < t.length; s++) { - const a = t[s], o = jTe[a]; + const a = t[s], o = tCe[a]; if (o !== void 0) n.set(o.left, o.right); else if (a.constructor === String || a.constructor === Number) { - const l = qTe(n); + const l = XTe(n); s > 0 || l.length > 0 ? (e.push("%c" + a), r.push(l)) : e.push(a); } else break; @@ -16493,45 +16493,45 @@ const Lh = Symbol, Ite = Lh(), $te = Lh(), YTe = Lh(), WTe = Lh(), GTe = Lh(), B a instanceof Symbol || i.push(a); } return i; -}, Fte = CTe ? KTe : ZTe, JTe = (...t) => { - console.log(...Fte(t)), zte.forEach((e) => e.print(t)); -}, eCe = (...t) => { - console.warn(...Fte(t)), t.unshift(MD), zte.forEach((e) => e.print(t)); -}, zte = L0(), Qte = (t) => ({ +}, Qte = LTe ? rCe : eCe, nCe = (...t) => { + console.log(...Qte(t)), Ute.forEach((e) => e.print(t)); +}, iCe = (...t) => { + console.warn(...Qte(t)), t.unshift(PD), Ute.forEach((e) => e.print(t)); +}, Ute = R0(), Vte = (t) => ({ [Symbol.iterator]() { return this; }, next: t -}), tCe = (t, e) => Qte(() => { +}), sCe = (t, e) => Vte(() => { let r; do r = t.next(); while (!r.done && !e(r.value)); return r; -}), U_ = (t, e) => Qte(() => { +}), Y_ = (t, e) => Vte(() => { const { done: r, value: n } = t.next(); return { done: r, value: r ? void 0 : e(n) }; }); -class DD { +class ND { constructor(e, r) { this.clock = e, this.len = r; } } -class O1 { +class k1 { constructor() { this.clients = /* @__PURE__ */ new Map(); } } -const ym = (t, e, r) => e.clients.forEach((n, i) => { +const bm = (t, e, r) => e.clients.forEach((n, i) => { const s = t.doc.store.clients.get(i); for (let a = 0; a < n.length; a++) { const o = n[a]; - rre(t, s, o.clock, o.len, r); + ire(t, s, o.clock, o.len, r); } -}), rCe = (t, e) => { +}), aCe = (t, e) => { let r = 0, n = t.length - 1; for (; r <= n; ) { - const i = hh((r + n) / 2), s = t[i], a = s.clock; + const i = fh((r + n) / 2), s = t[i], a = s.clock; if (a <= e) { if (e < a + s.len) return i; @@ -16542,8 +16542,8 @@ const ym = (t, e, r) => e.clients.forEach((n, i) => { return null; }, Vx = (t, e) => { const r = t.clients.get(e.client); - return r !== void 0 && rCe(r, e.clock) !== null; -}, PD = (t) => { + return r !== void 0 && aCe(r, e.clock) !== null; +}, ID = (t) => { t.clients.forEach((e) => { e.sort((i, s) => i.clock - s.clock); let r, n; @@ -16553,22 +16553,22 @@ const ym = (t, e, r) => e.clients.forEach((n, i) => { } e.length = n; }); -}, F8 = (t) => { - const e = new O1(); +}, U8 = (t) => { + const e = new k1(); for (let r = 0; r < t.length; r++) t[r].clients.forEach((n, i) => { if (!e.clients.has(i)) { const s = n.slice(); for (let a = r + 1; a < t.length; a++) - RSe(s, t[a].clients.get(i) || []); + NSe(s, t[a].clients.get(i) || []); e.clients.set(i, s); } }); - return PD(e), e; + return ID(e), e; }, M2 = (t, e, r, n) => { - Ah(t.clients, e, () => []).push(new DD(r, n)); -}, Ute = () => new O1(), nCe = (t) => { - const e = Ute(); + Lh(t.clients, e, () => []).push(new ND(r, n)); +}, qte = () => new k1(), oCe = (t) => { + const e = qte(); return t.clients.forEach((r, n) => { const i = []; for (let s = 0; s < r.length; s++) { @@ -16579,13 +16579,13 @@ const ym = (t, e, r) => e.clients.forEach((n, i) => { if (s + 1 < r.length) for (let u = r[s + 1]; s + 1 < r.length && u.deleted; u = r[++s + 1]) l += u.length; - i.push(new DD(o, l)); + i.push(new ND(o, l)); } } i.length > 0 && e.clients.set(n, i); }), e; -}, k1 = (t, e) => { - rr(t.restEncoder, e.clients.size), Ff(e.clients.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { +}, S1 = (t, e) => { + rr(t.restEncoder, e.clients.size), zf(e.clients.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { t.resetDsCurVal(), rr(t.restEncoder, r); const i = n.length; rr(t.restEncoder, i); @@ -16594,20 +16594,20 @@ const ym = (t, e, r) => e.clients.forEach((n, i) => { t.writeDsClock(a.clock), t.writeDsLen(a.len); } }); -}, ND = (t) => { - const e = new O1(), r = xr(t.restDecoder); +}, $D = (t) => { + const e = new k1(), r = xr(t.restDecoder); for (let n = 0; n < r; n++) { t.resetDsCurVal(); const i = xr(t.restDecoder), s = xr(t.restDecoder); if (s > 0) { - const a = Ah(e.clients, i, () => []); + const a = Lh(e.clients, i, () => []); for (let o = 0; o < s; o++) - a.push(new DD(t.readDsClock(), t.readDsLen())); + a.push(new ND(t.readDsClock(), t.readDsLen())); } } return e; -}, hQ = (t, e, r) => { - const n = new O1(), i = xr(t.restDecoder); +}, dQ = (t, e, r) => { + const n = new k1(), i = xr(t.restDecoder); for (let s = 0; s < i; s++) { t.resetDsCurVal(); const a = xr(t.restDecoder), o = xr(t.restDecoder), l = r.clients.get(a) || [], u = gi(r, a); @@ -16623,19 +16623,19 @@ const ym = (t, e, r) => e.clients.forEach((n, i) => { } } if (n.clients.size > 0) { - const s = new R0(); - return rr(s.restEncoder, 0), k1(s, n), s.toUint8Array(); + const s = new M0(); + return rr(s.restEncoder, 0), S1(s, n), s.toUint8Array(); } return null; -}, Vte = Ate; -class S1 extends YT { - constructor({ guid: e = uTe(), collectionid: r = null, gc: n = !0, gcFilter: i = () => !0, meta: s = null, autoLoad: a = !1, shouldLoad: o = !0 } = {}) { - super(), this.gc = n, this.gcFilter = i, this.clientID = Vte(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new ere(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = a, this.meta = s, this.isLoaded = !1, this.isSynced = !1, this.whenLoaded = lQ((u) => { +}, Yte = Rte; +class T1 extends WT { + constructor({ guid: e = pTe(), collectionid: r = null, gc: n = !0, gcFilter: i = () => !0, meta: s = null, autoLoad: a = !1, shouldLoad: o = !0 } = {}) { + super(), this.gc = n, this.gcFilter = i, this.clientID = Yte(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new rre(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = a, this.meta = s, this.isLoaded = !1, this.isSynced = !1, this.whenLoaded = uQ((u) => { this.on("load", () => { this.isLoaded = !0, u(this); }); }); - const l = () => lQ((u) => { + const l = () => uQ((u) => { const h = (f) => { (f === void 0 || f === !0) && (this.off("sync", h), u()); }; @@ -16655,13 +16655,13 @@ class S1 extends YT { return this.subdocs; } getSubdocGuids() { - return new Set(Ff(this.subdocs).map((e) => e.guid)); + return new Set(zf(this.subdocs).map((e) => e.guid)); } transact(e, r = null) { return gn(this, e, r); } get(e, r = Ts) { - const n = Ah(this.share, e, () => { + const n = Lh(this.share, e, () => { const s = new r(); return s._integrate(this, null), s; }), i = n.constructor; @@ -16680,16 +16680,16 @@ class S1 extends YT { return n; } getArray(e = "") { - return this.get(e, Pg); + return this.get(e, Ng); } getText(e = "") { - return this.get(e, xm); + return this.get(e, wm); } getMap(e = "") { - return this.get(e, Ju); + return this.get(e, eh); } getXmlFragment(e = "") { - return this.get(e, M0); + return this.get(e, D0); } toJSON() { const e = {}; @@ -16698,12 +16698,12 @@ class S1 extends YT { }), e; } destroy() { - Ff(this.subdocs).forEach((r) => r.destroy()); + zf(this.subdocs).forEach((r) => r.destroy()); const e = this._item; if (e !== null) { this._item = null; const r = e.content; - r.doc = new S1({ guid: this.guid, ...r.opts, shouldLoad: !1 }), r.doc._item = e, gn(e.parent.doc, (n) => { + r.doc = new T1({ guid: this.guid, ...r.opts, shouldLoad: !1 }), r.doc._item = e, gn(e.parent.doc, (n) => { const i = r.doc; e.deleted || n.subdocsAdded.add(i), n.subdocsRemoved.add(this); }, null, !0); @@ -16717,7 +16717,7 @@ class S1 extends YT { super.off(e, r); } } -class qte { +class Wte { constructor(e) { this.restDecoder = e; } @@ -16730,7 +16730,7 @@ class qte { return xr(this.restDecoder); } } -class Yte extends qte { +class Gte extends Wte { readLeftID() { return Tr(xr(this.restDecoder), xr(this.restDecoder)); } @@ -16741,10 +16741,10 @@ class Yte extends qte { return xr(this.restDecoder); } readInfo() { - return mm(this.restDecoder); + return vm(this.restDecoder); } readString() { - return Of(this.restDecoder); + return kf(this.restDecoder); } readParentInfo() { return xr(this.restDecoder) === 1; @@ -16759,16 +16759,16 @@ class Yte extends qte { return R2(this.restDecoder); } readBuf() { - return NTe(qs(this.restDecoder)); + return FTe(qs(this.restDecoder)); } readJSON() { - return JSON.parse(Of(this.restDecoder)); + return JSON.parse(kf(this.restDecoder)); } readKey() { - return Of(this.restDecoder); + return kf(this.restDecoder); } } -class iCe { +class lCe { constructor(e) { this.dsCurrVal = 0, this.restDecoder = e; } @@ -16783,15 +16783,15 @@ class iCe { return this.dsCurrVal += e, e; } } -class bm extends iCe { +class xm extends lCe { constructor(e) { - super(e), this.keys = [], xr(e), this.keyClockDecoder = new z_(qs(e)), this.clientDecoder = new u5(qs(e)), this.leftClockDecoder = new z_(qs(e)), this.rightClockDecoder = new z_(qs(e)), this.infoDecoder = new oQ(qs(e), mm), this.stringDecoder = new oTe(qs(e)), this.parentInfoDecoder = new oQ(qs(e), mm), this.typeRefDecoder = new u5(qs(e)), this.lenDecoder = new u5(qs(e)); + super(e), this.keys = [], xr(e), this.keyClockDecoder = new V_(qs(e)), this.clientDecoder = new u5(qs(e)), this.leftClockDecoder = new V_(qs(e)), this.rightClockDecoder = new V_(qs(e)), this.infoDecoder = new cQ(qs(e), vm), this.stringDecoder = new hTe(qs(e)), this.parentInfoDecoder = new cQ(qs(e), vm), this.typeRefDecoder = new u5(qs(e)), this.lenDecoder = new u5(qs(e)); } readLeftID() { - return new Dg(this.clientDecoder.read(), this.leftClockDecoder.read()); + return new Pg(this.clientDecoder.read(), this.leftClockDecoder.read()); } readRightID() { - return new Dg(this.clientDecoder.read(), this.rightClockDecoder.read()); + return new Pg(this.clientDecoder.read(), this.rightClockDecoder.read()); } readClient() { return this.clientDecoder.read(); @@ -16830,7 +16830,7 @@ class bm extends iCe { } } } -class Wte { +class Xte { constructor() { this.restEncoder = Ys(); } @@ -16846,7 +16846,7 @@ class Wte { rr(this.restEncoder, e); } } -class qx extends Wte { +class qx extends Xte { writeLeftID(e) { rr(this.restEncoder, e.client), rr(this.restEncoder, e.clock); } @@ -16857,10 +16857,10 @@ class qx extends Wte { rr(this.restEncoder, e); } writeInfo(e) { - N8(this.restEncoder, e); + B8(this.restEncoder, e); } writeString(e) { - w0(this.restEncoder, e); + O0(this.restEncoder, e); } writeParentInfo(e) { rr(this.restEncoder, e ? 1 : 0); @@ -16878,13 +16878,13 @@ class qx extends Wte { ci(this.restEncoder, e); } writeJSON(e) { - w0(this.restEncoder, JSON.stringify(e)); + O0(this.restEncoder, JSON.stringify(e)); } writeKey(e) { - w0(this.restEncoder, e); + O0(this.restEncoder, e); } } -class Gte { +class Hte { constructor() { this.restEncoder = Ys(), this.dsCurrVal = 0; } @@ -16902,13 +16902,13 @@ class Gte { e === 0 && ic(), rr(this.restEncoder, e - 1), this.dsCurrVal += e; } } -class R0 extends Gte { +class M0 extends Hte { constructor() { - super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new F_(), this.clientEncoder = new c5(), this.leftClockEncoder = new F_(), this.rightClockEncoder = new F_(), this.infoEncoder = new iQ(N8), this.stringEncoder = new KSe(), this.parentInfoEncoder = new iQ(N8), this.typeRefEncoder = new c5(), this.lenEncoder = new c5(); + super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new U_(), this.clientEncoder = new c5(), this.leftClockEncoder = new U_(), this.rightClockEncoder = new U_(), this.infoEncoder = new aQ(B8), this.stringEncoder = new rTe(), this.parentInfoEncoder = new aQ(B8), this.typeRefEncoder = new c5(), this.lenEncoder = new c5(); } toUint8Array() { const e = Ys(); - return rr(e, 0), ci(e, this.keyClockEncoder.toUint8Array()), ci(e, this.clientEncoder.toUint8Array()), ci(e, this.leftClockEncoder.toUint8Array()), ci(e, this.rightClockEncoder.toUint8Array()), ci(e, Vn(this.infoEncoder)), ci(e, this.stringEncoder.toUint8Array()), ci(e, Vn(this.parentInfoEncoder)), ci(e, this.typeRefEncoder.toUint8Array()), ci(e, this.lenEncoder.toUint8Array()), XT(e, Vn(this.restEncoder)), Vn(e); + return rr(e, 0), ci(e, this.keyClockEncoder.toUint8Array()), ci(e, this.clientEncoder.toUint8Array()), ci(e, this.leftClockEncoder.toUint8Array()), ci(e, this.rightClockEncoder.toUint8Array()), ci(e, Vn(this.infoEncoder)), ci(e, this.stringEncoder.toUint8Array()), ci(e, Vn(this.parentInfoEncoder)), ci(e, this.typeRefEncoder.toUint8Array()), ci(e, this.lenEncoder.toUint8Array()), HT(e, Vn(this.restEncoder)), Vn(e); } writeLeftID(e) { this.clientEncoder.write(e.client), this.leftClockEncoder.write(e.clock); @@ -16948,7 +16948,7 @@ class R0 extends Gte { r === void 0 ? (this.keyClockEncoder.write(this.keyClock++), this.stringEncoder.write(e)) : this.keyClockEncoder.write(r); } } -const sCe = (t, e, r, n) => { +const cCe = (t, e, r, n) => { n = pd(n, e[0].id.clock); const i = au(e, n); rr(t.restEncoder, e.length - i), t.writeClient(r), rr(t.restEncoder, n); @@ -16956,16 +16956,16 @@ const sCe = (t, e, r, n) => { s.write(t, n - s.id.clock); for (let a = i + 1; a < e.length; a++) e[a].write(t, 0); -}, ID = (t, e, r) => { +}, BD = (t, e, r) => { const n = /* @__PURE__ */ new Map(); r.forEach((i, s) => { gi(e, s) > i && n.set(s, i); - }), ZT(e).forEach((i, s) => { + }), jT(e).forEach((i, s) => { r.has(s) || n.set(s, 0); - }), rr(t.restEncoder, n.size), Ff(n.entries()).sort((i, s) => s[0] - i[0]).forEach(([i, s]) => { - sCe(t, e.clients.get(i), i, s); + }), rr(t.restEncoder, n.size), zf(n.entries()).sort((i, s) => s[0] - i[0]).forEach(([i, s]) => { + cCe(t, e.clients.get(i), i, s); }); -}, aCe = (t, e) => { +}, uCe = (t, e) => { const r = ql(), n = xr(t.restDecoder); for (let i = 0; i < n; i++) { const s = xr(t.restDecoder), a = new Array(s), o = t.readClient(); @@ -16973,7 +16973,7 @@ const sCe = (t, e, r, n) => { r.set(o, { i: 0, refs: a }); for (let u = 0; u < s; u++) { const h = t.readInfo(); - switch (GT & h) { + switch (XT & h) { case 0: { const f = t.readLen(); a[u] = new Zo(Tr(o, l), f), l += f; @@ -16985,15 +16985,15 @@ const sCe = (t, e, r, n) => { break; } default: { - const f = (h & (Ku | _o)) === 0, d = new mn( + const f = (h & (Ju | _o)) === 0, d = new mn( Tr(o, l), null, (h & _o) === _o ? t.readLeftID() : null, null, - (h & Ku) === Ku ? t.readRightID() : null, + (h & Ju) === Ju ? t.readRightID() : null, f ? t.readParentInfo() ? e.get(t.readString()) : t.readLeftID() : null, f && (h & _2) === _2 ? t.readString() : null, - Ore(t, h) + Sre(t, h) ); a[u] = d, l += d.length; } @@ -17001,9 +17001,9 @@ const sCe = (t, e, r, n) => { } } return r; -}, oCe = (t, e, r) => { +}, hCe = (t, e, r) => { const n = []; - let i = Ff(r.keys()).sort((p, g) => p - g); + let i = zf(r.keys()).sort((p, g) => p - g); if (i.length === 0) return null; const s = () => { @@ -17020,7 +17020,7 @@ const sCe = (t, e, r, n) => { let a = s(); if (a === null) return null; - const o = new ere(), l = /* @__PURE__ */ new Map(), u = (p, g) => { + const o = new rre(), l = /* @__PURE__ */ new Map(), u = (p, g) => { const m = l.get(p); (m == null || m > g) && l.set(p, g); }; @@ -17034,7 +17034,7 @@ const sCe = (t, e, r, n) => { }; for (; ; ) { if (h.constructor !== jo) { - const g = Ah(f, h.id.client, () => gi(e, h.id.client)) - h.id.clock; + const g = Lh(f, h.id.client, () => gi(e, h.id.client)) - h.id.clock; if (g < 0) n.push(h), u(h.id.client, h.id.clock - 1), d(); else { @@ -17063,14 +17063,14 @@ const sCe = (t, e, r, n) => { } } if (o.clients.size > 0) { - const p = new R0(); - return ID(p, o, /* @__PURE__ */ new Map()), rr(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; + const p = new M0(); + return BD(p, o, /* @__PURE__ */ new Map()), rr(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; } return null; -}, lCe = (t, e) => ID(t, e.doc.store, e.beforeState), cCe = (t, e, r, n = new bm(t)) => gn(e, (i) => { +}, fCe = (t, e) => BD(t, e.doc.store, e.beforeState), dCe = (t, e, r, n = new xm(t)) => gn(e, (i) => { i.local = !1; let s = !1; - const a = i.doc, o = a.store, l = aCe(n, a), u = oCe(i, o, l), h = o.pendingStructs; + const a = i.doc, o = a.store, l = uCe(n, a), u = hCe(i, o, l), h = o.pendingStructs; if (h) { for (const [d, p] of h.missing) if (p < gi(o, d)) { @@ -17086,59 +17086,59 @@ const sCe = (t, e, r, n) => { } } else o.pendingStructs = u; - const f = hQ(n, i, o); + const f = dQ(n, i, o); if (o.pendingDs) { - const d = new bm(gd(o.pendingDs)); + const d = new xm(gd(o.pendingDs)); xr(d.restDecoder); - const p = hQ(d, i, o); + const p = dQ(d, i, o); f && p ? o.pendingDs = Ik([f, p]) : o.pendingDs = f || p; } else o.pendingDs = f; if (s) { const d = o.pendingStructs.update; - o.pendingStructs = null, Xte(i.doc, d); + o.pendingStructs = null, Zte(i.doc, d); } -}, r, !1), Xte = (t, e, r, n = bm) => { +}, r, !1), Zte = (t, e, r, n = xm) => { const i = gd(e); - cCe(i, t, r, new n(i)); -}, uCe = (t, e, r) => Xte(t, e, r, Yte), hCe = (t, e, r = /* @__PURE__ */ new Map()) => { - ID(t, e.store, r), k1(t, nCe(e.store)); -}, fCe = (t, e = new Uint8Array([0]), r = new R0()) => { - const n = Hte(e); - hCe(r, t, n); + dCe(i, t, r, new n(i)); +}, pCe = (t, e, r) => Zte(t, e, r, Gte), gCe = (t, e, r = /* @__PURE__ */ new Map()) => { + BD(t, e.store, r), S1(t, oCe(e.store)); +}, mCe = (t, e = new Uint8Array([0]), r = new M0()) => { + const n = jte(e); + gCe(r, t, n); const i = [r.toUint8Array()]; - if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(MCe(t.store.pendingStructs.update, e)), i.length > 1) { + if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(ICe(t.store.pendingStructs.update, e)), i.length > 1) { if (r.constructor === qx) - return LCe(i.map((s, a) => a === 0 ? s : PCe(s))); - if (r.constructor === R0) + return PCe(i.map((s, a) => a === 0 ? s : BCe(s))); + if (r.constructor === M0) return Ik(i); } return i[0]; -}, dCe = (t, e) => fCe(t, e, new qx()), pCe = (t) => { +}, vCe = (t, e) => mCe(t, e, new qx()), yCe = (t) => { const e = /* @__PURE__ */ new Map(), r = xr(t.restDecoder); for (let n = 0; n < r; n++) { const i = xr(t.restDecoder), s = xr(t.restDecoder); e.set(i, s); } return e; -}, Hte = (t) => pCe(new qte(gd(t))), Zte = (t, e) => (rr(t.restEncoder, e.size), Ff(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { +}, jte = (t) => yCe(new Wte(gd(t))), Kte = (t, e) => (rr(t.restEncoder, e.size), zf(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { rr(t.restEncoder, r), rr(t.restEncoder, n); -}), t), gCe = (t, e) => Zte(t, ZT(e.store)), mCe = (t, e = new Gte()) => (t instanceof Map ? Zte(e, t) : gCe(e, t), e.toUint8Array()), vCe = (t) => mCe(t, new Wte()); -class yCe { +}), t), bCe = (t, e) => Kte(t, jT(e.store)), xCe = (t, e = new Hte()) => (t instanceof Map ? Kte(e, t) : bCe(e, t), e.toUint8Array()), wCe = (t) => xCe(t, new Xte()); +class OCe { constructor() { this.l = []; } } -const fQ = () => new yCe(), dQ = (t, e) => t.l.push(e), pQ = (t, e) => { +const pQ = () => new OCe(), gQ = (t, e) => t.l.push(e), mQ = (t, e) => { const r = t.l, n = r.length; t.l = r.filter((i) => e !== i), n === t.l.length && console.error("[yjs] Tried to remove event handler that doesn't exist."); -}, jte = (t, e, r) => RD(t.l, [e, r]); -class Dg { +}, Jte = (t, e, r) => DD(t.l, [e, r]); +class Pg { constructor(e, r) { this.client = e, this.clock = r; } } -const pg = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, Tr = (t, e) => new Dg(t, e), Kte = (t) => { +const gg = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, Tr = (t, e) => new Pg(t, e), ere = (t) => { for (const [e, r] of t.doc.share.entries()) if (r === t) return e; @@ -17151,24 +17151,24 @@ const pg = (t, e) => t === e || t !== null && e !== null && t.client === e.clien } return !1; }; -class Jte { +class tre { constructor(e, r, n, i = 0) { this.type = e, this.tname = r, this.item = n, this.assoc = i; } } -const gQ = (t) => { +const vQ = (t) => { const e = {}; return t.type && (e.type = t.type), t.tname && (e.tname = t.tname), t.item && (e.item = t.item), t.assoc != null && (e.assoc = t.assoc), e; -}, D2 = (t) => new Jte(t.type == null ? null : Tr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : Tr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); -class bCe { +}, D2 = (t) => new tre(t.type == null ? null : Tr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : Tr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); +class kCe { constructor(e, r, n = 0) { this.type = e, this.index = r, this.assoc = n; } } -const xCe = (t, e, r = 0) => new bCe(t, e, r), EO = (t, e, r) => { +const SCe = (t, e, r = 0) => new kCe(t, e, r), EO = (t, e, r) => { let n = null, i = null; - return t._item === null ? i = Kte(t) : n = Tr(t._item.id.client, t._item.id.clock), new Jte(n, i, e, r); -}, z8 = (t, e, r = 0) => { + return t._item === null ? i = ere(t) : n = Tr(t._item.id.client, t._item.id.clock), new tre(n, i, e, r); +}, V8 = (t, e, r = 0) => { let n = t._start; if (r < 0) { if (e === 0) @@ -17186,13 +17186,13 @@ const xCe = (t, e, r = 0) => new bCe(t, e, r), EO = (t, e, r) => { n = n.right; } return EO(t, null, r); -}, Q8 = (t, e) => { +}, q8 = (t, e) => { const r = e.store, n = t.item, i = t.type, s = t.tname, a = t.assoc; let o = null, l = 0; if (n !== null) { if (gi(r, n.client) <= n.clock) return null; - const u = Y8(r, n), h = u.item; + const u = X8(r, n), h = u.item; if (!(h instanceof mn)) return null; if (o = h.parent, o._item === null || !o._item.deleted) { @@ -17207,8 +17207,8 @@ const xCe = (t, e, r = 0) => new bCe(t, e, r), EO = (t, e, r) => { else if (i !== null) { if (gi(r, i.client) <= i.clock) return null; - const { item: u } = Y8(r, i); - if (u instanceof mn && u.content instanceof vu) + const { item: u } = X8(r, i); + if (u instanceof mn && u.content instanceof yu) o = u.content.type; else return null; @@ -17216,28 +17216,28 @@ const xCe = (t, e, r = 0) => new bCe(t, e, r), EO = (t, e, r) => { throw ic(); a >= 0 ? l = o._length : l = 0; } - return xCe(o, l, t.assoc); -}, mQ = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && pg(t.item, e.item) && pg(t.type, e.type) && t.assoc === e.assoc; -class wCe { + return SCe(o, l, t.assoc); +}, yQ = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && gg(t.item, e.item) && gg(t.type, e.type) && t.assoc === e.assoc; +class TCe { constructor(e, r) { this.ds = e, this.sv = r; } } -const OCe = (t, e) => new wCe(t, e); -OCe(Ute(), /* @__PURE__ */ new Map()); -const sg = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !Vx(e.ds, t.id), U8 = (t, e) => { - const r = Ah(t.meta, U8, L0), n = t.doc.store; +const CCe = (t, e) => new TCe(t, e); +CCe(qte(), /* @__PURE__ */ new Map()); +const ag = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !Vx(e.ds, t.id), Y8 = (t, e) => { + const r = Lh(t.meta, Y8, R0), n = t.doc.store; r.has(e) || (e.sv.forEach((i, s) => { i < gi(n, s) && Ha(t, Tr(s, i)); - }), ym(t, e.ds, (i) => { + }), bm(t, e.ds, (i) => { }), r.add(e)); }; -class ere { +class rre { constructor() { this.clients = /* @__PURE__ */ new Map(), this.pendingStructs = null, this.pendingDs = null; } } -const ZT = (t) => { +const jT = (t) => { const e = /* @__PURE__ */ new Map(); return t.clients.forEach((r, n) => { const i = r[r.length - 1]; @@ -17249,7 +17249,7 @@ const ZT = (t) => { return 0; const n = r[r.length - 1]; return n.id.clock + n.length; -}, tre = (t, e) => { +}, nre = (t, e) => { let r = t.clients.get(e.id.client); if (r === void 0) r = [], t.clients.set(e.id.client, r); @@ -17263,7 +17263,7 @@ const ZT = (t) => { let r = 0, n = t.length - 1, i = t[n], s = i.id.clock; if (s === e) return n; - let a = hh(e / (s + i.length - 1) * n); + let a = fh(e / (s + i.length - 1) * n); for (; r <= n; ) { if (i = t[a], s = i.id.clock, s <= e) { if (e < s + i.length) @@ -17271,41 +17271,41 @@ const ZT = (t) => { r = a + 1; } else n = a - 1; - a = hh((r + n) / 2); + a = fh((r + n) / 2); } throw ic(); -}, kCe = (t, e) => { +}, ECe = (t, e) => { const r = t.clients.get(e.client); return r[au(r, e.clock)]; -}, h5 = kCe, V8 = (t, e, r) => { +}, h5 = ECe, W8 = (t, e, r) => { const n = au(e, r), i = e[n]; return i.id.clock < r && i instanceof mn ? (e.splice(n + 1, 0, Uk(t, i, r - i.id.clock)), n + 1) : n; }, Ha = (t, e) => { const r = t.doc.store.clients.get(e.client); - return r[V8(t, r, e.clock)]; -}, vQ = (t, e, r) => { + return r[W8(t, r, e.clock)]; +}, bQ = (t, e, r) => { const n = e.clients.get(r.client), i = au(n, r.clock), s = n[i]; return r.clock !== s.id.clock + s.length - 1 && s.constructor !== Zo && n.splice(i + 1, 0, Uk(t, s, r.clock - s.id.clock + 1)), s; -}, SCe = (t, e, r) => { +}, _Ce = (t, e, r) => { const n = t.clients.get(e.id.client); n[au(n, e.id.clock)] = r; -}, rre = (t, e, r, n, i) => { +}, ire = (t, e, r, n, i) => { if (n === 0) return; const s = r + n; - let a = V8(t, e, r), o; + let a = W8(t, e, r), o; do - o = e[a++], s < o.id.clock + o.length && V8(t, e, s), i(o); + o = e[a++], s < o.id.clock + o.length && W8(t, e, s), i(o); while (a < e.length && e[a].id.clock < s); }; -class TCe { +class ACe { constructor(e, r, n) { - this.doc = e, this.deleteSet = new O1(), this.beforeState = ZT(e.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = r, this.meta = /* @__PURE__ */ new Map(), this.local = n, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1; + this.doc = e, this.deleteSet = new k1(), this.beforeState = jT(e.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = r, this.meta = /* @__PURE__ */ new Map(), this.local = n, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1; } } -const yQ = (t, e) => e.deleteSet.clients.size === 0 && !LSe(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (PD(e.deleteSet), lCe(t, e), k1(t, e.deleteSet), !0), bQ = (t, e, r) => { +const xQ = (t, e) => e.deleteSet.clients.size === 0 && !PSe(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (ID(e.deleteSet), fCe(t, e), S1(t, e.deleteSet), !0), wQ = (t, e, r) => { const n = e._item; - (n === null || n.id.clock < (t.beforeState.get(n.id.client) || 0) && !n.deleted) && Ah(t.changed, e, L0).add(r); + (n === null || n.id.clock < (t.beforeState.get(n.id.client) || 0) && !n.deleted) && Lh(t.changed, e, R0).add(r); }, f5 = (t, e) => { let r = t[e], n = t[e - 1], i = e; for (; i > 0; r = n, n = t[--i - 1]) { @@ -17317,7 +17317,7 @@ const yQ = (t, e) => e.deleteSet.clients.size === 0 && !LSe(e.afterState, (r, n) } const s = e - i; return s && t.splice(e + 1 - s, s), s; -}, CCe = (t, e, r) => { +}, LCe = (t, e, r) => { for (const [n, i] of t.clients.entries()) { const s = e.clients.get(n); for (let a = i.length - 1; a >= 0; a--) { @@ -17330,20 +17330,20 @@ const yQ = (t, e) => e.deleteSet.clients.size === 0 && !LSe(e.afterState, (r, n) } } } -}, ECe = (t, e) => { +}, RCe = (t, e) => { t.clients.forEach((r, n) => { const i = e.clients.get(n); for (let s = r.length - 1; s >= 0; s--) { - const a = r[s], o = WT(i.length - 1, 1 + au(i, a.clock + a.len - 1)); + const a = r[s], o = GT(i.length - 1, 1 + au(i, a.clock + a.len - 1)); for (let l = o, u = i[l]; l > 0 && u.id.clock >= a.clock; u = i[l]) l -= 1 + f5(i, l); } }); -}, nre = (t, e) => { +}, sre = (t, e) => { if (e < t.length) { const r = t[e], n = r.doc, i = n.store, s = r.deleteSet, a = r._mergeStructs; try { - PD(s), r.afterState = ZT(r.doc.store), n.emit("beforeObserverCalls", [r, n]); + ID(s), r.afterState = jT(r.doc.store), n.emit("beforeObserverCalls", [r, n]); const o = []; r.changed.forEach( (l, u) => o.push(() => { @@ -17355,11 +17355,11 @@ const yQ = (t, e) => e.deleteSet.clients.size === 0 && !LSe(e.afterState, (r, n) (h) => h.target._item === null || !h.target._item.deleted ), l.forEach((h) => { h.currentTarget = u, h._path = null; - }), l.sort((h, f) => h.path.length - f.path.length), jte(u._dEH, l, r)); + }), l.sort((h, f) => h.path.length - f.path.length), Jte(u._dEH, l, r)); }); - }), o.push(() => n.emit("afterTransaction", [r, n])), RD(o, []), r._needFormattingCleanup && XCe(r); + }), o.push(() => n.emit("afterTransaction", [r, n])), DD(o, []), r._needFormattingCleanup && KCe(r); } finally { - n.gc && CCe(s, i, n.gcFilter), ECe(s, i), r.afterState.forEach((h, f) => { + n.gc && LCe(s, i, n.gcFilter), RCe(s, i), r.afterState.forEach((h, f) => { const d = r.beforeState.get(f) || 0; if (d !== h) { const p = i.clients.get(f), g = pd(au(p, d), 1); @@ -17371,62 +17371,62 @@ const yQ = (t, e) => e.deleteSet.clients.size === 0 && !LSe(e.afterState, (r, n) const { client: f, clock: d } = a[h].id, p = i.clients.get(f), g = au(p, d); g + 1 < p.length && f5(p, g + 1) > 1 || g > 0 && f5(p, g); } - if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (JTe(MD, Ite, "[yjs] ", $te, Bte, "Changed the client-id because another client seems to be using it."), n.clientID = Vte()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { + if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (nCe(PD, Bte, "[yjs] ", Fte, zte, "Changed the client-id because another client seems to be using it."), n.clientID = Yte()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { const h = new qx(); - yQ(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); + xQ(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); } if (n._observers.has("updateV2")) { - const h = new R0(); - yQ(h, r) && n.emit("updateV2", [h.toUint8Array(), r.origin, n, r]); + const h = new M0(); + xQ(h, r) && n.emit("updateV2", [h.toUint8Array(), r.origin, n, r]); } const { subdocsAdded: o, subdocsLoaded: l, subdocsRemoved: u } = r; (o.size > 0 || u.size > 0 || l.size > 0) && (o.forEach((h) => { h.clientID = n.clientID, h.collectionid == null && (h.collectionid = n.collectionid), n.subdocs.add(h); - }), u.forEach((h) => n.subdocs.delete(h)), n.emit("subdocs", [{ loaded: l, added: o, removed: u }, n, r]), u.forEach((h) => h.destroy())), t.length <= e + 1 ? (n._transactionCleanups = [], n.emit("afterAllTransactions", [n, t])) : nre(t, e + 1); + }), u.forEach((h) => n.subdocs.delete(h)), n.emit("subdocs", [{ loaded: l, added: o, removed: u }, n, r]), u.forEach((h) => h.destroy())), t.length <= e + 1 ? (n._transactionCleanups = [], n.emit("afterAllTransactions", [n, t])) : sre(t, e + 1); } } }, gn = (t, e, r = null, n = !0) => { const i = t._transactionCleanups; let s = !1, a = null; - t._transaction === null && (s = !0, t._transaction = new TCe(t, r, n), i.push(t._transaction), i.length === 1 && t.emit("beforeAllTransactions", [t]), t.emit("beforeTransaction", [t._transaction, t])); + t._transaction === null && (s = !0, t._transaction = new ACe(t, r, n), i.push(t._transaction), i.length === 1 && t.emit("beforeAllTransactions", [t]), t.emit("beforeTransaction", [t._transaction, t])); try { a = e(t._transaction); } finally { if (s) { const o = t._transaction === i[0]; - t._transaction = null, o && nre(i, 0); + t._transaction = null, o && sre(i, 0); } } return a; }; -class _Ce { +class MCe { constructor(e, r) { this.insertions = r, this.deletions = e, this.meta = /* @__PURE__ */ new Map(); } } -const xQ = (t, e, r) => { - ym(t, r.deletions, (n) => { - n instanceof mn && e.scope.some((i) => Nk(i, n)) && YD(n, !1); +const OQ = (t, e, r) => { + bm(t, r.deletions, (n) => { + n instanceof mn && e.scope.some((i) => Nk(i, n)) && GD(n, !1); }); -}, wQ = (t, e, r) => { +}, kQ = (t, e, r) => { let n = null, i = null; const s = t.doc, a = t.scope; if (gn(s, (o) => { for (; e.length > 0 && n === null; ) { const l = s.store, u = e.pop(), h = /* @__PURE__ */ new Set(), f = []; let d = !1; - ym(o, u.insertions, (p) => { + bm(o, u.insertions, (p) => { if (p instanceof mn) { if (p.redone !== null) { - let { item: g, diff: m } = Y8(l, p.id); + let { item: g, diff: m } = X8(l, p.id); m > 0 && (g = Ha(o, Tr(g.id.client, g.id.clock + m))), p = g; } !p.deleted && a.some((g) => Nk(g, p)) && f.push(p); } - }), ym(o, u.deletions, (p) => { + }), bm(o, u.deletions, (p) => { p instanceof mn && a.some((g) => Nk(g, p)) && !Vx(u.insertions, p.id) && h.add(p); }), h.forEach((p) => { - d = wre(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; + d = kre(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; }); for (let p = f.length - 1; p >= 0; p--) { const g = f[p]; @@ -17443,34 +17443,34 @@ const xQ = (t, e, r) => { } return n; }; -class $D extends YT { +class FD extends WT { constructor(e, { captureTimeout: r = 500, captureTransaction: n = (l) => !0, deleteFilter: i = () => !0, trackedOrigins: s = /* @__PURE__ */ new Set([null]), ignoreRemoteMapChanges: a = !1, - doc: o = D8(e) ? e[0].doc : e.doc + doc: o = I8(e) ? e[0].doc : e.doc } = {}) { super(), this.scope = [], this.doc = o, this.addToScope(e), this.deleteFilter = i, s.add(this), this.trackedOrigins = s, this.captureTransaction = n, this.undoStack = [], this.redoStack = [], this.undoing = !1, this.redoing = !1, this.lastChange = 0, this.ignoreRemoteMapChanges = a, this.captureTimeout = r, this.afterTransactionHandler = (l) => { if (!this.captureTransaction(l) || !this.scope.some((v) => l.changedParentTypes.has(v)) || !this.trackedOrigins.has(l.origin) && (!l.origin || !this.trackedOrigins.has(l.origin.constructor))) return; const u = this.undoing, h = this.redoing, f = u ? this.redoStack : this.undoStack; u ? this.stopCapturing() : h || this.clear(!1, !0); - const d = new O1(); + const d = new k1(); l.afterState.forEach((v, y) => { const b = l.beforeState.get(y) || 0, w = v - b; w > 0 && M2(d, y, b, w); }); - const p = Qf(); + const p = Uf(); let g = !1; if (this.lastChange > 0 && p - this.lastChange < this.captureTimeout && f.length > 0 && !u && !h) { const v = f[f.length - 1]; - v.deletions = F8([v.deletions, l.deleteSet]), v.insertions = F8([v.insertions, d]); + v.deletions = U8([v.deletions, l.deleteSet]), v.insertions = U8([v.insertions, d]); } else - f.push(new _Ce(l.deleteSet, d)), g = !0; - !u && !h && (this.lastChange = p), ym(l, l.deleteSet, (v) => { - v instanceof mn && this.scope.some((y) => Nk(y, v)) && YD(v, !0); + f.push(new MCe(l.deleteSet, d)), g = !0; + !u && !h && (this.lastChange = p), bm(l, l.deleteSet, (v) => { + v instanceof mn && this.scope.some((y) => Nk(y, v)) && GD(v, !0); }); const m = [{ stackItem: f[f.length - 1], origin: l.origin, type: u ? "redo" : "undo", changedParentTypes: l.changedParentTypes }, this]; g ? this.emit("stack-item-added", m) : this.emit("stack-item-updated", m); @@ -17479,8 +17479,8 @@ class $D extends YT { }); } addToScope(e) { - e = D8(e) ? e : [e], e.forEach((r) => { - this.scope.every((n) => n !== r) && (r.doc !== this.doc && eCe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); + e = I8(e) ? e : [e], e.forEach((r) => { + this.scope.every((n) => n !== r) && (r.doc !== this.doc && iCe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); }); } addTrackedOrigin(e) { @@ -17491,7 +17491,7 @@ class $D extends YT { } clear(e = !0, r = !0) { (e && this.canUndo() || r && this.canRedo()) && this.doc.transact((n) => { - e && (this.undoStack.forEach((i) => xQ(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => xQ(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); + e && (this.undoStack.forEach((i) => OQ(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => OQ(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); }); } stopCapturing() { @@ -17501,7 +17501,7 @@ class $D extends YT { this.undoing = !0; let e; try { - e = wQ(this, this.undoStack, "undo"); + e = kQ(this, this.undoStack, "undo"); } finally { this.undoing = !1; } @@ -17511,7 +17511,7 @@ class $D extends YT { this.redoing = !0; let e; try { - e = wQ(this, this.redoStack, "redo"); + e = kQ(this, this.redoStack, "redo"); } finally { this.redoing = !1; } @@ -17527,7 +17527,7 @@ class $D extends YT { this.trackedOrigins.delete(this), this.doc.off("afterTransaction", this.afterTransactionHandler), super.destroy(); } } -function* ACe(t) { +function* DCe(t) { const e = xr(t.restDecoder); for (let r = 0; r < e; r++) { const n = xr(t.restDecoder), i = t.readClient(); @@ -17537,16 +17537,16 @@ function* ACe(t) { if (o === 10) { const l = xr(t.restDecoder); yield new jo(Tr(i, s), l), s += l; - } else if ((GT & o) !== 0) { - const l = (o & (Ku | _o)) === 0, u = new mn( + } else if ((XT & o) !== 0) { + const l = (o & (Ju | _o)) === 0, u = new mn( Tr(i, s), null, (o & _o) === _o ? t.readLeftID() : null, null, - (o & Ku) === Ku ? t.readRightID() : null, + (o & Ju) === Ju ? t.readRightID() : null, l ? t.readParentInfo() ? t.readString() : t.readLeftID() : null, l && (o & _2) === _2 ? t.readString() : null, - Ore(t, o) + Sre(t, o) ); yield u, s += u.length; } else { @@ -17556,9 +17556,9 @@ function* ACe(t) { } } } -class BD { +class zD { constructor(e, r) { - this.gen = ACe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); + this.gen = DCe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); } next() { do @@ -17567,12 +17567,12 @@ class BD { return this.curr; } } -class FD { +class QD { constructor(e) { this.currClient = 0, this.startClock = 0, this.written = 0, this.encoder = e, this.clientStructs = []; } } -const LCe = (t) => Ik(t, Yte, qx), RCe = (t, e) => { +const PCe = (t) => Ik(t, Gte, qx), NCe = (t, e) => { if (t.constructor === Zo) { const { client: r, clock: n } = t.id; return new Zo(Tr(r, n + e), t.length - e); @@ -17592,12 +17592,12 @@ const LCe = (t) => Ik(t, Yte, qx), RCe = (t, e) => { r.content.splice(e) ); } -}, Ik = (t, e = bm, r = R0) => { +}, Ik = (t, e = xm, r = M0) => { if (t.length === 1) return t[0]; const n = t.map((h) => new e(gd(h))); - let i = n.map((h) => new BD(h, !0)), s = null; - const a = new r(), o = new FD(a); + let i = n.map((h) => new zD(h, !0)), s = null; + const a = new r(), o = new QD(a); for (; i = i.filter((d) => d.curr !== null), i.sort( (d, p) => { if (d.curr.id.client === p.curr.id.client) { @@ -17615,29 +17615,29 @@ const LCe = (t) => Ik(t, Yte, qx), RCe = (t, e) => { if (d === null || d.id.client !== f || p && d.id.clock > s.struct.id.clock + s.struct.length) continue; if (f !== s.struct.id.client) - ef(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next(); + tf(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next(); else if (s.struct.id.clock + s.struct.length < d.id.clock) if (s.struct.constructor === jo) s.struct.length = d.id.clock + d.length - s.struct.id.clock; else { - ef(o, s.struct, s.offset); + tf(o, s.struct, s.offset); const g = d.id.clock - s.struct.id.clock - s.struct.length; s = { struct: new jo(Tr(f, s.struct.id.clock + s.struct.length), g), offset: 0 }; } else { const g = s.struct.id.clock + s.struct.length - d.id.clock; - g > 0 && (s.struct.constructor === jo ? s.struct.length -= g : d = RCe(d, g)), s.struct.mergeWith(d) || (ef(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next()); + g > 0 && (s.struct.constructor === jo ? s.struct.length -= g : d = NCe(d, g)), s.struct.mergeWith(d) || (tf(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next()); } } else s = { struct: h.curr, offset: 0 }, h.next(); for (let d = h.curr; d !== null && d.id.client === f && d.id.clock === s.struct.id.clock + s.struct.length && d.constructor !== jo; d = h.next()) - ef(o, s.struct, s.offset), s = { struct: d, offset: 0 }; + tf(o, s.struct, s.offset), s = { struct: d, offset: 0 }; } - s !== null && (ef(o, s.struct, s.offset), s = null), zD(o); - const l = n.map((h) => ND(h)), u = F8(l); - return k1(a, u), a.toUint8Array(); -}, MCe = (t, e, r = bm, n = R0) => { - const i = Hte(e), s = new n(), a = new FD(s), o = new r(gd(t)), l = new BD(o, !1); + s !== null && (tf(o, s.struct, s.offset), s = null), UD(o); + const l = n.map((h) => $D(h)), u = U8(l); + return S1(a, u), a.toUint8Array(); +}, ICe = (t, e, r = xm, n = M0) => { + const i = jte(e), s = new n(), a = new QD(s), o = new r(gd(t)), l = new zD(o, !1); for (; l.curr; ) { const h = l.curr, f = h.id.client, d = i.get(f) || 0; if (l.curr.constructor === jo) { @@ -17645,41 +17645,41 @@ const LCe = (t) => Ik(t, Yte, qx), RCe = (t, e) => { continue; } if (h.id.clock + h.length > d) - for (ef(a, h, pd(d - h.id.clock, 0)), l.next(); l.curr && l.curr.id.client === f; ) - ef(a, l.curr, 0), l.next(); + for (tf(a, h, pd(d - h.id.clock, 0)), l.next(); l.curr && l.curr.id.client === f; ) + tf(a, l.curr, 0), l.next(); else for (; l.curr && l.curr.id.client === f && l.curr.id.clock + l.curr.length <= d; ) l.next(); } - zD(a); - const u = ND(o); - return k1(s, u), s.toUint8Array(); -}, ire = (t) => { + UD(a); + const u = $D(o); + return S1(s, u), s.toUint8Array(); +}, are = (t) => { t.written > 0 && (t.clientStructs.push({ written: t.written, restEncoder: Vn(t.encoder.restEncoder) }), t.encoder.restEncoder = Ys(), t.written = 0); -}, ef = (t, e, r) => { - t.written > 0 && t.currClient !== e.id.client && ire(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), rr(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; -}, zD = (t) => { - ire(t); +}, tf = (t, e, r) => { + t.written > 0 && t.currClient !== e.id.client && are(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), rr(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; +}, UD = (t) => { + are(t); const e = t.encoder.restEncoder; rr(e, t.clientStructs.length); for (let r = 0; r < t.clientStructs.length; r++) { const n = t.clientStructs[r]; - rr(e, n.written), XT(e, n.restEncoder); + rr(e, n.written), HT(e, n.restEncoder); } -}, DCe = (t, e, r, n) => { - const i = new r(gd(t)), s = new BD(i, !1), a = new n(), o = new FD(a); +}, $Ce = (t, e, r, n) => { + const i = new r(gd(t)), s = new zD(i, !1), a = new n(), o = new QD(a); for (let u = s.curr; u !== null; u = s.next()) - ef(o, e(u), 0); - zD(o); - const l = ND(i); - return k1(a, l), a.toUint8Array(); -}, PCe = (t) => DCe(t, wTe, bm, qx), OQ = "You must not compute changes after the event-handler fired."; -class jT { + tf(o, e(u), 0); + UD(o); + const l = $D(i); + return S1(a, l), a.toUint8Array(); +}, BCe = (t) => $Ce(t, TTe, xm, qx), SQ = "You must not compute changes after the event-handler fired."; +class KT { constructor(e, r) { this.target = e, this.currentTarget = e, this.transaction = r, this._changes = null, this._keys = null, this._delta = null, this._path = null; } get path() { - return this._path || (this._path = NCe(this.currentTarget, this.target)); + return this._path || (this._path = FCe(this.currentTarget, this.target)); } deletes(e) { return Vx(this.transaction.deleteSet, e.id); @@ -17687,7 +17687,7 @@ class jT { get keys() { if (this._keys === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw zf(OQ); + throw Qf(SQ); const e = /* @__PURE__ */ new Map(), r = this.target; this.transaction.changed.get(r).forEach((i) => { if (i !== null) { @@ -17699,13 +17699,13 @@ class jT { l = l.left; if (this.deletes(s)) if (l !== null && this.deletes(l)) - a = "delete", o = I_(l.content.getContent()); + a = "delete", o = F_(l.content.getContent()); else return; else - l !== null && this.deletes(l) ? (a = "update", o = I_(l.content.getContent())) : (a = "add", o = void 0); + l !== null && this.deletes(l) ? (a = "update", o = F_(l.content.getContent())) : (a = "add", o = void 0); } else if (this.deletes(s)) - a = "delete", o = I_(s.content.getContent()); + a = "delete", o = F_(s.content.getContent()); else return; e.set(i, { action: a, oldValue: o }); @@ -17724,8 +17724,8 @@ class jT { let e = this._changes; if (e === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw zf(OQ); - const r = this.target, n = L0(), i = L0(), s = []; + throw Qf(SQ); + const r = this.target, n = R0(), i = R0(), s = []; if (e = { added: n, deleted: i, @@ -17745,7 +17745,7 @@ class jT { return e; } } -const NCe = (t, e) => { +const FCe = (t, e) => { const r = []; for (; e._item !== null && e !== t; ) { if (e._item.parentSub !== null) @@ -17759,31 +17759,31 @@ const NCe = (t, e) => { e = e._item.parent; } return r; -}, sre = 80; -let QD = 0; -class ICe { +}, ore = 80; +let VD = 0; +class zCe { constructor(e, r) { - e.marker = !0, this.p = e, this.index = r, this.timestamp = QD++; + e.marker = !0, this.p = e, this.index = r, this.timestamp = VD++; } } -const $Ce = (t) => { - t.timestamp = QD++; -}, are = (t, e, r) => { - t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = QD++; -}, BCe = (t, e, r) => { - if (t.length >= sre) { +const QCe = (t) => { + t.timestamp = VD++; +}, lre = (t, e, r) => { + t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = VD++; +}, UCe = (t, e, r) => { + if (t.length >= ore) { const n = t.reduce((i, s) => i.timestamp < s.timestamp ? i : s); - return are(n, e, r), n; + return lre(n, e, r), n; } else { - const n = new ICe(e, r); + const n = new zCe(e, r); return t.push(n), n; } -}, KT = (t, e) => { +}, JT = (t, e) => { if (t._start === null || e === 0 || t._searchMarker === null) return null; const r = t._searchMarker.length === 0 ? null : t._searchMarker.reduce((s, a) => l5(e - s.index) < l5(e - a.index) ? s : a); let n = t._start, i = 0; - for (r !== null && (n = r.p, i = r.index, $Ce(r)); n.right !== null && i < e; ) { + for (r !== null && (n = r.p, i = r.index, QCe(r)); n.right !== null && i < e; ) { if (!n.deleted && n.countable) { if (e < i + n.length) break; @@ -17795,7 +17795,7 @@ const $Ce = (t) => { n = n.left, !n.deleted && n.countable && (i -= n.length); for (; n.left !== null && n.left.id.client === n.id.client && n.left.id.clock + n.left.length === n.id.clock; ) n = n.left, !n.deleted && n.countable && (i -= n.length); - return r !== null && l5(r.index - i) < n.parent.length / sre ? (are(r, n, i), r) : BCe(t._searchMarker, n, i); + return r !== null && l5(r.index - i) < n.parent.length / ore ? (lre(r, n, i), r) : UCe(t._searchMarker, n, i); }, P2 = (t, e, r) => { for (let n = t.length - 1; n >= 0; n--) { const i = t[n]; @@ -17811,15 +17811,15 @@ const $Ce = (t) => { } (e < i.index || r > 0 && e === i.index) && (i.index = pd(e, i.index + r)); } -}, JT = (t, e, r) => { +}, eC = (t, e, r) => { const n = t, i = e.changedParentTypes; - for (; Ah(i, t, () => []).push(r), t._item !== null; ) + for (; Lh(i, t, () => []).push(r), t._item !== null; ) t = t._item.parent; - jte(n._eH, r, e); + Jte(n._eH, r, e); }; class Ts { constructor() { - this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = fQ(), this._dEH = fQ(), this._searchMarker = null; + this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = pQ(), this._dEH = pQ(), this._searchMarker = null; } get parent() { return this._item ? this._item.parent : null; @@ -17845,21 +17845,21 @@ class Ts { !e.local && this._searchMarker && (this._searchMarker.length = 0); } observe(e) { - dQ(this._eH, e); + gQ(this._eH, e); } observeDeep(e) { - dQ(this._dEH, e); + gQ(this._dEH, e); } unobserve(e) { - pQ(this._eH, e); + mQ(this._eH, e); } unobserveDeep(e) { - pQ(this._dEH, e); + mQ(this._dEH, e); } toJSON() { } } -const ore = (t, e, r) => { +const cre = (t, e, r) => { e < 0 && (e = t._length + e), r < 0 && (r = t._length + r); let n = r - e; const i = []; @@ -17878,7 +17878,7 @@ const ore = (t, e, r) => { s = s.right; } return i; -}, lre = (t) => { +}, ure = (t) => { const e = []; let r = t._start; for (; r !== null; ) { @@ -17900,12 +17900,12 @@ const ore = (t, e, r) => { } n = n.right; } -}, cre = (t, e) => { +}, hre = (t, e) => { const r = []; return N2(t, (n, i) => { r.push(e(n, i, t)); }), r; -}, FCe = (t) => { +}, VCe = (t) => { let e = t._start, r = null, n = 0; return { [Symbol.iterator]() { @@ -17929,8 +17929,8 @@ const ore = (t, e, r) => { }; } }; -}, ure = (t, e) => { - const r = KT(t, e); +}, fre = (t, e) => { + const r = JT(t, e); let n = t._start; for (r !== null && (n = r.p, e -= r.index); n !== null; n = n.right) if (!n.deleted && n.countable) { @@ -17943,7 +17943,7 @@ const ore = (t, e, r) => { const s = t.doc, a = s.clientID, o = s.store, l = r === null ? e._start : r.right; let u = []; const h = () => { - u.length > 0 && (i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new D0(u)), i.integrate(t, 0), u = []); + u.length > 0 && (i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new P0(u)), i.integrate(t, 0), u = []); }; n.forEach((f) => { if (f === null) @@ -17963,23 +17963,23 @@ const ore = (t, e, r) => { case ArrayBuffer: i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new Yx(new Uint8Array(f))), i.integrate(t, 0); break; - case S1: + case T1: i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new Wx(f)), i.integrate(t, 0); break; default: if (f instanceof Ts) - i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new vu(f)), i.integrate(t, 0); + i = new mn(Tr(a, gi(o, a)), i, i && i.lastId, l, l && l.id, e, null, new yu(f)), i.integrate(t, 0); else throw new Error("Unexpected content type in insert operation"); } } }), h(); -}, hre = () => zf("Length exceeded!"), fre = (t, e, r, n) => { +}, dre = () => Qf("Length exceeded!"), pre = (t, e, r, n) => { if (r > e._length) - throw hre(); + throw dre(); if (r === 0) return e._searchMarker && P2(e._searchMarker, r, n.length), $k(t, e, null, n); - const i = r, s = KT(e, r); + const i = r, s = JT(e, r); let a = e._start; for (s !== null && (a = s.p, r -= s.index, r === 0 && (a = a.prev, r += a && a.countable && !a.deleted ? a.length : 0)); a !== null; a = a.right) if (!a.deleted && a.countable) { @@ -17990,32 +17990,32 @@ const ore = (t, e, r) => { r -= a.length; } return e._searchMarker && P2(e._searchMarker, i, n.length), $k(t, e, a, n); -}, zCe = (t, e, r) => { +}, qCe = (t, e, r) => { let i = (e._searchMarker || []).reduce((s, a) => a.index > s.index ? a : s, { index: 0, p: e._start }).p; if (i) for (; i.right; ) i = i.right; return $k(t, e, i, r); -}, dre = (t, e, r, n) => { +}, gre = (t, e, r, n) => { if (n === 0) return; - const i = r, s = n, a = KT(e, r); + const i = r, s = n, a = JT(e, r); let o = e._start; for (a !== null && (o = a.p, r -= a.index); o !== null && r > 0; o = o.right) !o.deleted && o.countable && (r < o.length && Ha(t, Tr(o.id.client, o.id.clock + r)), r -= o.length); for (; n > 0 && o !== null; ) o.deleted || (n < o.length && Ha(t, Tr(o.id.client, o.id.clock + n)), o.delete(t), n -= o.length), o = o.right; if (n > 0) - throw hre(); + throw dre(); e._searchMarker && P2(e._searchMarker, i, -s + n); }, Bk = (t, e, r) => { const n = e._map.get(r); n !== void 0 && n.delete(t); -}, UD = (t, e, r, n) => { +}, qD = (t, e, r, n) => { const i = e._map.get(r) || null, s = t.doc, a = s.clientID; let o; if (n == null) - o = new D0([n]); + o = new P0([n]); else switch (n.constructor) { case Number: @@ -18023,62 +18023,62 @@ const ore = (t, e, r) => { case Boolean: case Array: case String: - o = new D0([n]); + o = new P0([n]); break; case Uint8Array: o = new Yx(n); break; - case S1: + case T1: o = new Wx(n); break; default: if (n instanceof Ts) - o = new vu(n); + o = new yu(n); else throw new Error("Unexpected content type"); } new mn(Tr(a, gi(s.store, a)), i, i && i.lastId, null, null, e, r, o).integrate(t, 0); -}, VD = (t, e) => { +}, YD = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted ? r.content.getContent()[r.length - 1] : void 0; -}, pre = (t) => { +}, mre = (t) => { const e = {}; return t._map.forEach((r, n) => { r.deleted || (e[n] = r.content.getContent()[r.length - 1]); }), e; -}, gre = (t, e) => { +}, vre = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted; -}, QCe = (t, e) => { +}, YCe = (t, e) => { const r = {}; return t._map.forEach((n, i) => { let s = n; for (; s !== null && (!e.sv.has(s.id.client) || s.id.clock >= (e.sv.get(s.id.client) || 0)); ) s = s.left; - s !== null && sg(s, e) && (r[i] = s.content.getContent()[s.length - 1]); + s !== null && ag(s, e) && (r[i] = s.content.getContent()[s.length - 1]); }), r; -}, _O = (t) => tCe(t.entries(), (e) => !e[1].deleted); -class UCe extends jT { +}, _O = (t) => sCe(t.entries(), (e) => !e[1].deleted); +class WCe extends KT { constructor(e, r) { super(e, r), this._transaction = r; } } -class Pg extends Ts { +class Ng extends Ts { constructor() { super(), this._prelimContent = [], this._searchMarker = []; } static from(e) { - const r = new Pg(); + const r = new Ng(); return r.push(e), r; } _integrate(e, r) { super._integrate(e, r), this.insert(0, this._prelimContent), this._prelimContent = null; } _copy() { - return new Pg(); + return new Ng(); } clone() { - const e = new Pg(); + const e = new Ng(); return e.insert(0, this.toArray().map( (r) => r instanceof Ts ? r.clone() : r )), e; @@ -18087,16 +18087,16 @@ class Pg extends Ts { return this._prelimContent === null ? this._length : this._prelimContent.length; } _callObserver(e, r) { - super._callObserver(e, r), JT(this, e, new UCe(this, e)); + super._callObserver(e, r), eC(this, e, new WCe(this, e)); } insert(e, r) { this.doc !== null ? gn(this.doc, (n) => { - fre(n, this, e, r); + pre(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } push(e) { this.doc !== null ? gn(this.doc, (r) => { - zCe(r, this, e); + qCe(r, this, e); }) : this._prelimContent.push(...e); } unshift(e) { @@ -18104,41 +18104,41 @@ class Pg extends Ts { } delete(e, r = 1) { this.doc !== null ? gn(this.doc, (n) => { - dre(n, this, e, r); + gre(n, this, e, r); }) : this._prelimContent.splice(e, r); } get(e) { - return ure(this, e); + return fre(this, e); } toArray() { - return lre(this); + return ure(this); } slice(e = 0, r = this.length) { - return ore(this, e, r); + return cre(this, e, r); } toJSON() { return this.map((e) => e instanceof Ts ? e.toJSON() : e); } map(e) { - return cre(this, e); + return hre(this, e); } forEach(e) { N2(this, e); } [Symbol.iterator]() { - return FCe(this); + return VCe(this); } _write(e) { - e.writeTypeRef(fEe); + e.writeTypeRef(mEe); } } -const VCe = (t) => new Pg(); -class qCe extends jT { +const GCe = (t) => new Ng(); +class XCe extends KT { constructor(e, r, n) { super(e, r), this.keysChanged = n; } } -class Ju extends Ts { +class eh extends Ts { constructor(e) { super(), this._prelimContent = null, e === void 0 ? this._prelimContent = /* @__PURE__ */ new Map() : this._prelimContent = new Map(e); } @@ -18148,16 +18148,16 @@ class Ju extends Ts { }), this._prelimContent = null; } _copy() { - return new Ju(); + return new eh(); } clone() { - const e = new Ju(); + const e = new eh(); return this.forEach((r, n) => { e.set(n, r instanceof Ts ? r.clone() : r); }), e; } _callObserver(e, r) { - JT(this, e, new qCe(this, e, r)); + eC(this, e, new XCe(this, e, r)); } toJSON() { const e = {}; @@ -18172,13 +18172,13 @@ class Ju extends Ts { return [..._O(this._map)].length; } keys() { - return U_(_O(this._map), (e) => e[0]); + return Y_(_O(this._map), (e) => e[0]); } values() { - return U_(_O(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); + return Y_(_O(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); } entries() { - return U_(_O(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); + return Y_(_O(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); } forEach(e) { this._map.forEach((r, n) => { @@ -18195,14 +18195,14 @@ class Ju extends Ts { } set(e, r) { return this.doc !== null ? gn(this.doc, (n) => { - UD(n, this, e, r); + qD(n, this, e, r); }) : this._prelimContent.set(e, r), r; } get(e) { - return VD(this, e); + return YD(this, e); } has(e) { - return gre(this, e); + return vre(this, e); } clear() { this.doc !== null ? gn(this.doc, (e) => { @@ -18212,18 +18212,18 @@ class Ju extends Ts { }) : this._prelimContent.clear(); } _write(e) { - e.writeTypeRef(dEe); + e.writeTypeRef(vEe); } } -const YCe = (t) => new Ju(), uf = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && xTe(t, e); -class q8 { +const HCe = (t) => new eh(), hf = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && STe(t, e); +class G8 { constructor(e, r, n, i) { this.left = e, this.right = r, this.index = n, this.currentAttributes = i; } forward() { switch (this.right === null && ic(), this.right.content.constructor) { case Wi: - this.right.deleted || T1(this.currentAttributes, this.right.content); + this.right.deleted || C1(this.currentAttributes, this.right.content); break; default: this.right.deleted || (this.index += this.right.length); @@ -18232,11 +18232,11 @@ class q8 { this.left = this.right, this.right = this.right.right; } } -const kQ = (t, e, r) => { +const TQ = (t, e, r) => { for (; e.right !== null && r > 0; ) { switch (e.right.content.constructor) { case Wi: - e.right.deleted || T1(e.currentAttributes, e.right.content); + e.right.deleted || C1(e.currentAttributes, e.right.content); break; default: e.right.deleted || (r < e.right.length && Ha(t, Tr(e.right.id.client, e.right.id.clock + r)), e.index += e.right.length, r -= e.right.length); @@ -18246,55 +18246,55 @@ const kQ = (t, e, r) => { } return e; }, AO = (t, e, r) => { - const n = /* @__PURE__ */ new Map(), i = KT(e, r); + const n = /* @__PURE__ */ new Map(), i = JT(e, r); if (i) { - const s = new q8(i.p.left, i.p, i.index, n); - return kQ(t, s, r - i.index); + const s = new G8(i.p.left, i.p, i.index, n); + return TQ(t, s, r - i.index); } else { - const s = new q8(null, e._start, 0, n); - return kQ(t, s, r); + const s = new G8(null, e._start, 0, n); + return TQ(t, s, r); } -}, mre = (t, e, r, n) => { - for (; r.right !== null && (r.right.deleted === !0 || r.right.content.constructor === Wi && uf(n.get(r.right.content.key), r.right.content.value)); ) +}, yre = (t, e, r, n) => { + for (; r.right !== null && (r.right.deleted === !0 || r.right.content.constructor === Wi && hf(n.get(r.right.content.key), r.right.content.value)); ) r.right.deleted || n.delete(r.right.content.key), r.forward(); const i = t.doc, s = i.clientID; n.forEach((a, o) => { const l = r.left, u = r.right, h = new mn(Tr(s, gi(i.store, s)), l, l && l.lastId, u, u && u.id, e, null, new Wi(o, a)); h.integrate(t, 0), r.right = h, r.forward(); }); -}, T1 = (t, e) => { +}, C1 = (t, e) => { const { key: r, value: n } = e; n === null ? t.delete(r) : t.set(r, n); -}, vre = (t, e) => { +}, bre = (t, e) => { for (; t.right !== null; ) { - if (!(t.right.deleted || t.right.content.constructor === Wi && uf(e[t.right.content.key] || null, t.right.content.value))) + if (!(t.right.deleted || t.right.content.constructor === Wi && hf(e[t.right.content.key] || null, t.right.content.value))) break; t.forward(); } -}, yre = (t, e, r, n) => { +}, xre = (t, e, r, n) => { const i = t.doc, s = i.clientID, a = /* @__PURE__ */ new Map(); for (const o in n) { const l = n[o], u = r.currentAttributes.get(o) || null; - if (!uf(u, l)) { + if (!hf(u, l)) { a.set(o, u); const { left: h, right: f } = r; r.right = new mn(Tr(s, gi(i.store, s)), h, h && h.lastId, f, f && f.id, e, null, new Wi(o, l)), r.right.integrate(t, 0), r.forward(); } } return a; -}, V_ = (t, e, r, n, i) => { +}, W_ = (t, e, r, n, i) => { r.currentAttributes.forEach((d, p) => { i[p] === void 0 && (i[p] = null); }); const s = t.doc, a = s.clientID; - vre(r, i); - const o = yre(t, e, r, i), l = n.constructor === String ? new ou(n) : n instanceof Ts ? new vu(n) : new gp(n); + bre(r, i); + const o = xre(t, e, r, i), l = n.constructor === String ? new ou(n) : n instanceof Ts ? new yu(n) : new mp(n); let { left: u, right: h, index: f } = r; - e._searchMarker && P2(e._searchMarker, r.index, l.getLength()), h = new mn(Tr(a, gi(s.store, a)), u, u && u.lastId, h, h && h.id, e, null, l), h.integrate(t, 0), r.right = h, r.index = f, r.forward(), mre(t, e, r, o); -}, SQ = (t, e, r, n, i) => { + e._searchMarker && P2(e._searchMarker, r.index, l.getLength()), h = new mn(Tr(a, gi(s.store, a)), u, u && u.lastId, h, h && h.id, e, null, l), h.integrate(t, 0), r.right = h, r.index = f, r.forward(), yre(t, e, r, o); +}, CQ = (t, e, r, n, i) => { const s = t.doc, a = s.clientID; - vre(r, i); - const o = yre(t, e, r, i); + bre(r, i); + const o = xre(t, e, r, i); e: for (; r.right !== null && (n > 0 || o.size > 0 && (r.right.deleted || r.right.content.constructor === Wi)); ) { if (!r.right.deleted) @@ -18302,7 +18302,7 @@ const kQ = (t, e, r) => { case Wi: { const { key: l, value: u } = r.right.content, h = i[l]; if (h !== void 0) { - if (uf(h, u)) + if (hf(h, u)) o.delete(l); else { if (n === 0) @@ -18327,8 +18327,8 @@ const kQ = (t, e, r) => { `; r.right = new mn(Tr(a, gi(s.store, a)), r.left, r.left && r.left.lastId, r.right, r.right && r.right.id, e, null, new ou(l)), r.right.integrate(t, 0), r.forward(); } - mre(t, e, r, o); -}, bre = (t, e, r, n, i) => { + yre(t, e, r, o); +}, wre = (t, e, r, n, i) => { let s = e; const a = ql(); for (; s && (!s.countable || s.deleted); ) { @@ -18345,7 +18345,7 @@ const kQ = (t, e, r) => { switch (u.constructor) { case Wi: { const { key: h, value: f } = u, d = n.get(h) || null; - (a.get(h) !== u || d === f) && (e.delete(t), o++, !l && (i.get(h) || null) === f && d !== f && (d === null ? i.delete(h) : i.set(h, d))), !l && !e.deleted && T1(i, u); + (a.get(h) !== u || d === f) && (e.delete(t), o++, !l && (i.get(h) || null) === f && d !== f && (d === null ? i.delete(h) : i.set(h, d))), !l && !e.deleted && C1(i, u); break; } } @@ -18353,7 +18353,7 @@ const kQ = (t, e, r) => { e = e.right; } return o; -}, WCe = (t, e) => { +}, ZCe = (t, e) => { for (; e && e.right && (e.right.deleted || !e.right.countable); ) e = e.right; const r = /* @__PURE__ */ new Set(); @@ -18364,60 +18364,60 @@ const kQ = (t, e, r) => { } e = e.left; } -}, GCe = (t) => { +}, jCe = (t) => { let e = 0; return gn(t.doc, (r) => { let n = t._start, i = t._start, s = ql(); - const a = M8(s); + const a = N8(s); for (; i; ) { if (i.deleted === !1) switch (i.content.constructor) { case Wi: - T1(a, i.content); + C1(a, i.content); break; default: - e += bre(r, n, i, s, a), s = M8(a), n = i; + e += wre(r, n, i, s, a), s = N8(a), n = i; break; } i = i.right; } }), e; -}, XCe = (t) => { +}, KCe = (t) => { const e = /* @__PURE__ */ new Set(), r = t.doc; for (const [n, i] of t.afterState.entries()) { const s = t.beforeState.get(n) || 0; - i !== s && rre(t, r.store.clients.get(n), s, i, (a) => { + i !== s && ire(t, r.store.clients.get(n), s, i, (a) => { !a.deleted && a.content.constructor === Wi && a.constructor !== Zo && e.add(a.parent); }); } gn(r, (n) => { - ym(t, t.deleteSet, (i) => { + bm(t, t.deleteSet, (i) => { if (i instanceof Zo || !i.parent._hasFormatting || e.has(i.parent)) return; const s = i.parent; - i.content.constructor === Wi ? e.add(s) : WCe(n, i); + i.content.constructor === Wi ? e.add(s) : ZCe(n, i); }); for (const i of e) - GCe(i); + jCe(i); }); -}, TQ = (t, e, r) => { - const n = r, i = M8(e.currentAttributes), s = e.right; +}, EQ = (t, e, r) => { + const n = r, i = N8(e.currentAttributes), s = e.right; for (; r > 0 && e.right !== null; ) { if (e.right.deleted === !1) switch (e.right.content.constructor) { - case vu: - case gp: + case yu: + case mp: case ou: r < e.right.length && Ha(t, Tr(e.right.id.client, e.right.id.clock + r)), r -= e.right.length, e.right.delete(t); break; } e.forward(); } - s && bre(t, s, e.right, i, e.currentAttributes); + s && wre(t, s, e.right, i, e.currentAttributes); const a = (e.left || e.right).parent; return a._searchMarker && P2(a._searchMarker, e.index, -n + r), e; }; -class HCe extends jT { +class JCe extends KT { constructor(e, r, n) { super(e, r), this.childListChanged = !1, this.keysChanged = /* @__PURE__ */ new Set(), n.forEach((i) => { i === null ? this.childListChanged = !0 : this.keysChanged.add(i); @@ -18456,7 +18456,7 @@ class HCe extends jT { }))), u = ""; break; case "retain": - h > 0 && (p = { retain: h }, yTe(l) || (p.attributes = pTe({}, l))), h = 0; + h > 0 && (p = { retain: h }, OTe(l) || (p.attributes = yTe({}, l))), h = 0; break; } p && r.push(p), o = null; @@ -18464,8 +18464,8 @@ class HCe extends jT { }; for (; a !== null; ) { switch (a.content.constructor) { - case vu: - case gp: + case yu: + case mp: this.adds(a) ? this.deletes(a) || (d(), o = "insert", u = a.content.getContent()[0], d()) : this.deletes(a) ? (o !== "delete" && (d(), o = "delete"), f += 1) : a.deleted || (o !== "retain" && (d(), o = "retain"), h += 1); break; case ou: @@ -18476,18 +18476,18 @@ class HCe extends jT { if (this.adds(a)) { if (!this.deletes(a)) { const m = i.get(p) || null; - uf(m, g) ? g !== null && a.delete(n) : (o === "retain" && d(), uf(g, s.get(p) || null) ? delete l[p] : l[p] = g); + hf(m, g) ? g !== null && a.delete(n) : (o === "retain" && d(), hf(g, s.get(p) || null) ? delete l[p] : l[p] = g); } } else if (this.deletes(a)) { s.set(p, g); const m = i.get(p) || null; - uf(m, g) || (o === "retain" && d(), l[p] = m); + hf(m, g) || (o === "retain" && d(), l[p] = m); } else if (!a.deleted) { s.set(p, g); const m = l[p]; - m !== void 0 && (uf(m, g) ? m !== null && a.delete(n) : (o === "retain" && d(), g === null ? delete l[p] : l[p] = g)); + m !== void 0 && (hf(m, g) ? m !== null && a.delete(n) : (o === "retain" && d(), g === null ? delete l[p] : l[p] = g)); } - a.deleted || (o === "insert" && d(), T1(i, a.content)); + a.deleted || (o === "insert" && d(), C1(i, a.content)); break; } } @@ -18505,7 +18505,7 @@ class HCe extends jT { return this._delta; } } -class xm extends Ts { +class wm extends Ts { constructor(e) { super(), this._pending = e !== void 0 ? [() => this.insert(0, e)] : [], this._searchMarker = [], this._hasFormatting = !1; } @@ -18522,16 +18522,16 @@ class xm extends Ts { this._pending = null; } _copy() { - return new xm(); + return new wm(); } clone() { - const e = new xm(); + const e = new wm(); return e.applyDelta(this.toDelta()), e; } _callObserver(e, r) { super._callObserver(e, r); - const n = new HCe(this, e, r); - JT(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); + const n = new JCe(this, e, r); + eC(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); } toString() { let e = "", r = this._start; @@ -18544,15 +18544,15 @@ class xm extends Ts { } applyDelta(e, { sanitize: r = !0 } = {}) { this.doc !== null ? gn(this.doc, (n) => { - const i = new q8(null, this._start, 0, /* @__PURE__ */ new Map()); + const i = new G8(null, this._start, 0, /* @__PURE__ */ new Map()); for (let s = 0; s < e.length; s++) { const a = e[s]; if (a.insert !== void 0) { const o = !r && typeof a.insert == "string" && s === e.length - 1 && i.right === null && a.insert.slice(-1) === ` ` ? a.insert.slice(0, -1) : a.insert; - (typeof o != "string" || o.length > 0) && V_(n, this, i, o, a.attributes || {}); + (typeof o != "string" || o.length > 0) && W_(n, this, i, o, a.attributes || {}); } else - a.retain !== void 0 ? SQ(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && TQ(n, i, a.delete); + a.retain !== void 0 ? CQ(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && EQ(n, i, a.delete); } }) : this._pending.push(() => this.applyDelta(e)); } @@ -18572,15 +18572,15 @@ class xm extends Ts { } const h = () => { for (; l !== null; ) { - if (sg(l, e) || r !== void 0 && sg(l, r)) + if (ag(l, e) || r !== void 0 && ag(l, r)) switch (l.content.constructor) { case ou: { const f = s.get("ychange"); - e !== void 0 && !sg(l, e) ? (f === void 0 || f.user !== l.id.client || f.type !== "removed") && (u(), s.set("ychange", n ? n("removed", l.id) : { type: "removed" })) : r !== void 0 && !sg(l, r) ? (f === void 0 || f.user !== l.id.client || f.type !== "added") && (u(), s.set("ychange", n ? n("added", l.id) : { type: "added" })) : f !== void 0 && (u(), s.delete("ychange")), o += l.content.str; + e !== void 0 && !ag(l, e) ? (f === void 0 || f.user !== l.id.client || f.type !== "removed") && (u(), s.set("ychange", n ? n("removed", l.id) : { type: "removed" })) : r !== void 0 && !ag(l, r) ? (f === void 0 || f.user !== l.id.client || f.type !== "added") && (u(), s.set("ychange", n ? n("added", l.id) : { type: "added" })) : f !== void 0 && (u(), s.delete("ychange")), o += l.content.str; break; } - case vu: - case gp: { + case yu: + case mp: { u(); const f = { insert: l.content.getContent()[0] @@ -18595,7 +18595,7 @@ class xm extends Ts { break; } case Wi: - sg(l, e) && (u(), T1(s, l.content)); + ag(l, e) && (u(), C1(s, l.content)); break; } l = l.right; @@ -18603,7 +18603,7 @@ class xm extends Ts { u(); }; return e || r ? gn(a, (f) => { - e && U8(f, e), r && U8(f, r), h(); + e && Y8(f, e), r && Y8(f, r), h(); }, "cleanup") : h(), i; } insert(e, r, n) { @@ -18614,14 +18614,14 @@ class xm extends Ts { const a = AO(s, this, e); n || (n = {}, a.currentAttributes.forEach((o, l) => { n[l] = o; - })), V_(s, this, a, r, n); + })), W_(s, this, a, r, n); }) : this._pending.push(() => this.insert(e, r, n)); } insertEmbed(e, r, n = {}) { const i = this.doc; i !== null ? gn(i, (s) => { const a = AO(s, this, e); - V_(s, this, a, r, n); + W_(s, this, a, r, n); }) : this._pending.push(() => this.insertEmbed(e, r, n)); } delete(e, r) { @@ -18629,7 +18629,7 @@ class xm extends Ts { return; const n = this.doc; n !== null ? gn(n, (i) => { - TQ(i, AO(i, this, e), r); + EQ(i, AO(i, this, e), r); }) : this._pending.push(() => this.delete(e, r)); } format(e, r, n) { @@ -18638,7 +18638,7 @@ class xm extends Ts { const i = this.doc; i !== null ? gn(i, (s) => { const a = AO(s, this, e); - a.right !== null && SQ(s, this, a, r, n); + a.right !== null && CQ(s, this, a, r, n); }) : this._pending.push(() => this.format(e, r, n)); } removeAttribute(e) { @@ -18648,21 +18648,21 @@ class xm extends Ts { } setAttribute(e, r) { this.doc !== null ? gn(this.doc, (n) => { - UD(n, this, e, r); + qD(n, this, e, r); }) : this._pending.push(() => this.setAttribute(e, r)); } getAttribute(e) { - return VD(this, e); + return YD(this, e); } getAttributes() { - return pre(this); + return mre(this); } _write(e) { - e.writeTypeRef(pEe); + e.writeTypeRef(yEe); } } -const ZCe = (t) => new xm(); -class q_ { +const eEe = (t) => new wm(); +class G_ { constructor(e, r = () => !0) { this._filter = r, this._root = e, this._currentNode = e._start, this._firstCall = !0; } @@ -18673,7 +18673,7 @@ class q_ { let e = this._currentNode, r = e && e.content && e.content.type; if (e !== null && (!this._firstCall || e.deleted || !this._filter(r))) do - if (r = e.content.type, !e.deleted && (r.constructor === I2 || r.constructor === M0) && r._start !== null) + if (r = e.content.type, !e.deleted && (r.constructor === I2 || r.constructor === D0) && r._start !== null) e = r._start; else for (; e !== null; ) @@ -18686,7 +18686,7 @@ class q_ { return this._firstCall = !1, e === null ? { value: void 0, done: !0 } : (this._currentNode = e, { value: e.content.type, done: !1 }); } } -class M0 extends Ts { +class D0 extends Ts { constructor() { super(), this._prelimContent = []; } @@ -18698,31 +18698,31 @@ class M0 extends Ts { super._integrate(e, r), this.insert(0, this._prelimContent), this._prelimContent = null; } _copy() { - return new M0(); + return new D0(); } clone() { - const e = new M0(); + const e = new D0(); return e.insert(0, this.toArray().map((r) => r instanceof Ts ? r.clone() : r)), e; } get length() { return this._prelimContent === null ? this._length : this._prelimContent.length; } createTreeWalker(e) { - return new q_(this, e); + return new G_(this, e); } querySelector(e) { e = e.toUpperCase(); - const n = new q_(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); + const n = new G_(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); return n.done ? null : n.value; } querySelectorAll(e) { - return e = e.toUpperCase(), Ff(new q_(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); + return e = e.toUpperCase(), zf(new G_(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); } _callObserver(e, r) { - JT(this, e, new JCe(this, r, e)); + eC(this, e, new nEe(this, r, e)); } toString() { - return cre(this, (e) => e.toString()).join(""); + return hre(this, (e) => e.toString()).join(""); } toJSON() { return this.toString(); @@ -18735,7 +18735,7 @@ class M0 extends Ts { } insert(e, r) { this.doc !== null ? gn(this.doc, (n) => { - fre(n, this, e, r); + pre(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } insertAfter(e, r) { @@ -18747,17 +18747,17 @@ class M0 extends Ts { else { const n = this._prelimContent, i = e === null ? 0 : n.findIndex((s) => s === e) + 1; if (i === 0 && e !== null) - throw zf("Reference item not found"); + throw Qf("Reference item not found"); n.splice(i, 0, ...r); } } delete(e, r = 1) { this.doc !== null ? gn(this.doc, (n) => { - dre(n, this, e, r); + gre(n, this, e, r); }) : this._prelimContent.splice(e, r); } toArray() { - return lre(this); + return ure(this); } push(e) { this.insert(this.length, e); @@ -18766,20 +18766,20 @@ class M0 extends Ts { this.insert(0, e); } get(e) { - return ure(this, e); + return fre(this, e); } slice(e = 0, r = this.length) { - return ore(this, e, r); + return cre(this, e, r); } forEach(e) { N2(this, e); } _write(e) { - e.writeTypeRef(mEe); + e.writeTypeRef(xEe); } } -const jCe = (t) => new M0(); -class I2 extends M0 { +const tEe = (t) => new D0(); +class I2 extends D0 { constructor(e = "UNDEFINED") { super(), this.nodeName = e, this._prelimAttrs = /* @__PURE__ */ new Map(); } @@ -18801,7 +18801,7 @@ class I2 extends M0 { } clone() { const e = new I2(this.nodeName), r = this.getAttributes(); - return mTe(r, (n, i) => { + return xTe(r, (n, i) => { typeof n == "string" && e.setAttribute(i, n); }), e.insert(0, this.toArray().map((n) => n instanceof Ts ? n.clone() : n)), e; } @@ -18825,17 +18825,17 @@ class I2 extends M0 { } setAttribute(e, r) { this.doc !== null ? gn(this.doc, (n) => { - UD(n, this, e, r); + qD(n, this, e, r); }) : this._prelimAttrs.set(e, r); } getAttribute(e) { - return VD(this, e); + return YD(this, e); } hasAttribute(e) { - return gre(this, e); + return vre(this, e); } getAttributes(e) { - return e ? QCe(this, e) : pre(this); + return e ? YCe(this, e) : mre(this); } toDOM(e = document, r = {}, n) { const i = e.createElement(this.nodeName), s = this.getAttributes(); @@ -18848,18 +18848,18 @@ class I2 extends M0 { }), n !== void 0 && n._createAssociation(i, this), i; } _write(e) { - e.writeTypeRef(gEe), e.writeKey(this.nodeName); + e.writeTypeRef(bEe), e.writeKey(this.nodeName); } } -const KCe = (t) => new I2(t.readKey()); -class JCe extends jT { +const rEe = (t) => new I2(t.readKey()); +class nEe extends KT { constructor(e, r, n) { super(e, n), this.childListChanged = !1, this.attributesChanged = /* @__PURE__ */ new Set(), r.forEach((i) => { i === null ? this.childListChanged = !0 : this.attributesChanged.add(i); }); } } -class Fk extends Ju { +class Fk extends eh { constructor(e) { super(), this.hookName = e; } @@ -18878,11 +18878,11 @@ class Fk extends Ju { return i !== void 0 ? s = i.createDom(this) : s = document.createElement(this.hookName), s.setAttribute("data-yjs-hook", this.hookName), n !== void 0 && n._createAssociation(s, this), s; } _write(e) { - e.writeTypeRef(vEe), e.writeKey(this.hookName); + e.writeTypeRef(wEe), e.writeKey(this.hookName); } } -const eEe = (t) => new Fk(t.readKey()); -class zk extends xm { +const iEe = (t) => new Fk(t.readKey()); +class zk extends wm { get nextSibling() { const e = this._item ? this._item.next : null; return e ? e.content.type : null; @@ -18932,11 +18932,11 @@ class zk extends xm { return this.toString(); } _write(e) { - e.writeTypeRef(yEe); + e.writeTypeRef(OEe); } } -const tEe = (t) => new zk(); -class qD { +const sEe = (t) => new zk(); +class WD { constructor(e, r) { this.id = e, this.length = r; } @@ -18953,8 +18953,8 @@ class qD { throw Jc(); } } -const rEe = 0; -class Zo extends qD { +const aEe = 0; +class Zo extends WD { get deleted() { return !0; } @@ -18964,10 +18964,10 @@ class Zo extends qD { return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0); } integrate(e, r) { - r > 0 && (this.id.clock += r, this.length -= r), tre(e.doc.store, this); + r > 0 && (this.id.clock += r, this.length -= r), nre(e.doc.store, this); } write(e, r) { - e.writeInfo(rEe), e.writeLen(this.length - r); + e.writeInfo(aEe), e.writeLen(this.length - r); } getMissing(e, r) { return null; @@ -19008,7 +19008,7 @@ class Yx { return 3; } } -const nEe = (t) => new Yx(t.readBuf()); +const oEe = (t) => new Yx(t.readBuf()); class $2 { constructor(e) { this.len = e; @@ -19046,7 +19046,7 @@ class $2 { return 1; } } -const iEe = (t) => new $2(t.readLen()), xre = (t, e) => new S1({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); +const lEe = (t) => new $2(t.readLen()), Ore = (t, e) => new T1({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); class Wx { constructor(e) { e._item && console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."), this.doc = e; @@ -19063,7 +19063,7 @@ class Wx { return !0; } copy() { - return new Wx(xre(this.doc.guid, this.opts)); + return new Wx(Ore(this.doc.guid, this.opts)); } splice(e) { throw Jc(); @@ -19086,8 +19086,8 @@ class Wx { return 9; } } -const sEe = (t) => new Wx(xre(t.readString(), t.readAny())); -class gp { +const cEe = (t) => new Wx(Ore(t.readString(), t.readAny())); +class mp { constructor(e) { this.embed = e; } @@ -19101,7 +19101,7 @@ class gp { return !0; } copy() { - return new gp(this.embed); + return new mp(this.embed); } splice(e) { throw Jc(); @@ -19122,7 +19122,7 @@ class gp { return 5; } } -const aEe = (t) => new gp(t.readJSON()); +const uEe = (t) => new mp(t.readJSON()); class Wi { constructor(e, r) { this.key = e, this.value = r; @@ -19160,7 +19160,7 @@ class Wi { return 6; } } -const oEe = (t) => new Wi(t.readKey(), t.readJSON()); +const hEe = (t) => new Wi(t.readKey(), t.readJSON()); class Qk { constructor(e) { this.arr = e; @@ -19202,7 +19202,7 @@ class Qk { return 2; } } -const lEe = (t) => { +const fEe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) { const i = t.readString(); @@ -19210,7 +19210,7 @@ const lEe = (t) => { } return new Qk(r); }; -class D0 { +class P0 { constructor(e) { this.arr = e; } @@ -19224,10 +19224,10 @@ class D0 { return !0; } copy() { - return new D0(this.arr); + return new P0(this.arr); } splice(e) { - const r = new D0(this.arr.slice(e)); + const r = new P0(this.arr.slice(e)); return this.arr = this.arr.slice(0, e), r; } mergeWith(e) { @@ -19251,11 +19251,11 @@ class D0 { return 8; } } -const cEe = (t) => { +const dEe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) r.push(t.readAny()); - return new D0(r); + return new P0(r); }; class ou { constructor(e) { @@ -19295,16 +19295,16 @@ class ou { return 4; } } -const uEe = (t) => new ou(t.readString()), hEe = [ - VCe, - YCe, - ZCe, - KCe, - jCe, +const pEe = (t) => new ou(t.readString()), gEe = [ + GCe, + HCe, eEe, - tEe -], fEe = 0, dEe = 1, pEe = 2, gEe = 3, mEe = 4, vEe = 5, yEe = 6; -class vu { + rEe, + tEe, + iEe, + sEe +], mEe = 0, vEe = 1, yEe = 2, bEe = 3, xEe = 4, wEe = 5, OEe = 6; +class yu { constructor(e) { this.type = e; } @@ -19318,7 +19318,7 @@ class vu { return !0; } copy() { - return new vu(this.type._copy()); + return new yu(this.type._copy()); } splice(e) { throw Jc(); @@ -19353,7 +19353,7 @@ class vu { return 7; } } -const bEe = (t) => new vu(hEe[t.readTypeRef()](t)), Y8 = (t, e) => { +const kEe = (t) => new yu(gEe[t.readTypeRef()](t)), X8 = (t, e) => { let r = e, n = 0, i; do n > 0 && (r = Tr(r.client, r.clock + n)), i = h5(t, r), n = r.clock - i.id.clock, r = i.redone; @@ -19362,7 +19362,7 @@ const bEe = (t) => new vu(hEe[t.readTypeRef()](t)), Y8 = (t, e) => { item: i, diff: n }; -}, YD = (t, e) => { +}, GD = (t, e) => { for (; t !== null && t.keep !== e; ) t.keep = e, t = t.parent._item; }, Uk = (t, e, r) => { @@ -19377,13 +19377,13 @@ const bEe = (t) => new vu(hEe[t.readTypeRef()](t)), Y8 = (t, e) => { e.content.splice(r) ); return e.deleted && s.markDeleted(), e.keep && (s.keep = !0), e.redone !== null && (s.redone = Tr(e.redone.client, e.redone.clock + r)), e.right = s, s.right !== null && (s.right.left = s), t._mergeStructs.push(s), s.parentSub !== null && s.right === null && s.parent._map.set(s.parentSub, s), e.length = r, s; -}, CQ = (t, e) => MSe(t, (r) => Vx(r.deletions, e)), wre = (t, e, r, n, i, s) => { +}, _Q = (t, e) => ISe(t, (r) => Vx(r.deletions, e)), kre = (t, e, r, n, i, s) => { const a = t.doc, o = a.store, l = a.clientID, u = e.redone; if (u !== null) return Ha(t, u); let h = e.parent._item, f = null, d; if (h !== null && h.deleted === !0) { - if (h.redone === null && (!r.has(h) || wre(t, h, r, n, i, s) === null)) + if (h.redone === null && (!r.has(h) || kre(t, h, r, n, i, s) === null)) return null; for (; h.redone !== null; ) h = Ha(t, h.redone); @@ -19411,7 +19411,7 @@ const bEe = (t) => new vu(hEe[t.readTypeRef()](t)), Y8 = (t, e) => { d = d.right; } } else if (d = null, e.right && !i) { - for (f = e; f !== null && f.right !== null && (f.right.redone || Vx(n, f.right.id) || CQ(s.undoStack, f.right.id) || CQ(s.redoStack, f.right.id)); ) + for (f = e; f !== null && f.right !== null && (f.right.redone || Vx(n, f.right.id) || _Q(s.undoStack, f.right.id) || _Q(s.redoStack, f.right.id)); ) for (f = f.right; f.redone; ) f = Ha(t, f.redone); if (f && f.right !== null) @@ -19428,55 +19428,55 @@ const bEe = (t) => new vu(hEe[t.readTypeRef()](t)), Y8 = (t, e) => { e.parentSub, e.content.copy() ); - return e.redone = m, YD(v, !0), v.integrate(t, 0), v; + return e.redone = m, GD(v, !0), v.integrate(t, 0), v; }; -class mn extends qD { +class mn extends WD { constructor(e, r, n, i, s, a, o, l) { - super(e, l.getLength()), this.origin = n, this.left = r, this.right = i, this.rightOrigin = s, this.parent = a, this.parentSub = o, this.redone = null, this.content = l, this.info = this.content.isCountable() ? tQ : 0; + super(e, l.getLength()), this.origin = n, this.left = r, this.right = i, this.rightOrigin = s, this.parent = a, this.parentSub = o, this.redone = null, this.content = l, this.info = this.content.isCountable() ? nQ : 0; } set marker(e) { - (this.info & B_) > 0 !== e && (this.info ^= B_); + (this.info & Q_) > 0 !== e && (this.info ^= Q_); } get marker() { - return (this.info & B_) > 0; + return (this.info & Q_) > 0; } get keep() { - return (this.info & eQ) > 0; + return (this.info & rQ) > 0; } set keep(e) { - this.keep !== e && (this.info ^= eQ); + this.keep !== e && (this.info ^= rQ); } get countable() { - return (this.info & tQ) > 0; + return (this.info & nQ) > 0; } get deleted() { - return (this.info & $_) > 0; + return (this.info & z_) > 0; } set deleted(e) { - this.deleted !== e && (this.info ^= $_); + this.deleted !== e && (this.info ^= z_); } markDeleted() { - this.info |= $_; + this.info |= z_; } getMissing(e, r) { if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= gi(r, this.origin.client)) return this.origin.client; if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= gi(r, this.rightOrigin.client)) return this.rightOrigin.client; - if (this.parent && this.parent.constructor === Dg && this.id.client !== this.parent.client && this.parent.clock >= gi(r, this.parent.client)) + if (this.parent && this.parent.constructor === Pg && this.id.client !== this.parent.client && this.parent.clock >= gi(r, this.parent.client)) return this.parent.client; - if (this.origin && (this.left = vQ(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Ha(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === Zo || this.right && this.right.constructor === Zo) + if (this.origin && (this.left = bQ(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Ha(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === Zo || this.right && this.right.constructor === Zo) this.parent = null; else if (!this.parent) this.left && this.left.constructor === mn && (this.parent = this.left.parent, this.parentSub = this.left.parentSub), this.right && this.right.constructor === mn && (this.parent = this.right.parent, this.parentSub = this.right.parentSub); - else if (this.parent.constructor === Dg) { + else if (this.parent.constructor === Pg) { const n = h5(r, this.parent); n.constructor === Zo ? this.parent = null : this.parent = n.content.type; } return null; } integrate(e, r) { - if (r > 0 && (this.id.clock += r, this.left = vQ(e, e.doc.store, Tr(this.id.client, this.id.clock - 1)), this.origin = this.left.lastId, this.content = this.content.splice(r), this.length -= r), this.parent) { + if (r > 0 && (this.id.clock += r, this.left = bQ(e, e.doc.store, Tr(this.id.client, this.id.clock - 1)), this.origin = this.left.lastId, this.content = this.content.splice(r), this.length -= r), this.parent) { if (!this.left && (!this.right || this.right.left !== null) || this.left && this.left.right !== this.right) { let n = this.left, i; if (n !== null) @@ -19488,10 +19488,10 @@ class mn extends qD { i = this.parent._start; const s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(); for (; i !== null && i !== this.right; ) { - if (a.add(i), s.add(i), pg(this.origin, i.origin)) { + if (a.add(i), s.add(i), gg(this.origin, i.origin)) { if (i.id.client < this.id.client) n = i, s.clear(); - else if (pg(this.rightOrigin, i.rightOrigin)) + else if (gg(this.rightOrigin, i.rightOrigin)) break; } else if (i.origin !== null && a.has(h5(e.doc.store, i.origin))) s.has(h5(e.doc.store, i.origin)) || (n = i, s.clear()); @@ -19513,7 +19513,7 @@ class mn extends qD { n = this.parent._start, this.parent._start = this; this.right = n; } - this.right !== null ? this.right.left = this : this.parentSub !== null && (this.parent._map.set(this.parentSub, this), this.left !== null && this.left.delete(e)), this.parentSub === null && this.countable && !this.deleted && (this.parent._length += this.length), tre(e.doc.store, this), this.content.integrate(e, this), bQ(e, this.parent, this.parentSub), (this.parent._item !== null && this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e); + this.right !== null ? this.right.left = this : this.parentSub !== null && (this.parent._map.set(this.parentSub, this), this.left !== null && this.left.delete(e)), this.parentSub === null && this.countable && !this.deleted && (this.parent._length += this.length), nre(e.doc.store, this), this.content.integrate(e, this), wQ(e, this.parent, this.parentSub), (this.parent._item !== null && this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e); } else new Zo(this.id, this.length).integrate(e, 0); } @@ -19533,7 +19533,7 @@ class mn extends qD { return this.length === 1 ? this.id : Tr(this.id.client, this.id.clock + this.length - 1); } mergeWith(e) { - if (this.constructor === e.constructor && pg(e.origin, this.lastId) && this.right === e && pg(this.rightOrigin, e.rightOrigin) && this.id.client === e.id.client && this.id.clock + this.length === e.id.clock && this.deleted === e.deleted && this.redone === null && e.redone === null && this.content.constructor === e.content.constructor && this.content.mergeWith(e.content)) { + if (this.constructor === e.constructor && gg(e.origin, this.lastId) && this.right === e && gg(this.rightOrigin, e.rightOrigin) && this.id.client === e.id.client && this.id.clock + this.length === e.id.clock && this.deleted === e.deleted && this.redone === null && e.redone === null && this.content.constructor === e.content.constructor && this.content.mergeWith(e.content)) { const r = this.parent._searchMarker; return r && r.forEach((n) => { n.p === e && (n.p = this, !this.deleted && this.countable && (n.index -= this.length)); @@ -19544,50 +19544,50 @@ class mn extends qD { delete(e) { if (!this.deleted) { const r = this.parent; - this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), M2(e.deleteSet, this.id.client, this.id.clock, this.length), bQ(e, r, this.parentSub), this.content.delete(e); + this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), M2(e.deleteSet, this.id.client, this.id.clock, this.length), wQ(e, r, this.parentSub), this.content.delete(e); } } gc(e, r) { if (!this.deleted) throw ic(); - this.content.gc(e), r ? SCe(e, this, new Zo(this.id, this.length)) : this.content = new $2(this.length); + this.content.gc(e), r ? _Ce(e, this, new Zo(this.id, this.length)) : this.content = new $2(this.length); } write(e, r) { - const n = r > 0 ? Tr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & GT | (n === null ? 0 : _o) | (i === null ? 0 : Ku) | (s === null ? 0 : _2); + const n = r > 0 ? Tr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & XT | (n === null ? 0 : _o) | (i === null ? 0 : Ju) | (s === null ? 0 : _2); if (e.writeInfo(a), n !== null && e.writeLeftID(n), i !== null && e.writeRightID(i), n === null && i === null) { const o = this.parent; if (o._item !== void 0) { const l = o._item; if (l === null) { - const u = Kte(o); + const u = ere(o); e.writeParentInfo(!0), e.writeString(u); } else e.writeParentInfo(!1), e.writeLeftID(l.id); } else - o.constructor === String ? (e.writeParentInfo(!0), e.writeString(o)) : o.constructor === Dg ? (e.writeParentInfo(!1), e.writeLeftID(o)) : ic(); + o.constructor === String ? (e.writeParentInfo(!0), e.writeString(o)) : o.constructor === Pg ? (e.writeParentInfo(!1), e.writeLeftID(o)) : ic(); s !== null && e.writeString(s); } this.content.write(e, r); } } -const Ore = (t, e) => xEe[e & GT](t), xEe = [ +const Sre = (t, e) => SEe[e & XT](t), SEe = [ () => { ic(); }, - iEe, lEe, - nEe, - uEe, - aEe, + fEe, oEe, - bEe, + pEe, + uEe, + hEe, + kEe, + dEe, cEe, - sEe, () => { ic(); } -], wEe = 10; -class jo extends qD { +], TEe = 10; +class jo extends WD { get deleted() { return !0; } @@ -19600,38 +19600,38 @@ class jo extends qD { ic(); } write(e, r) { - e.writeInfo(wEe), rr(e.restEncoder, this.length - r); + e.writeInfo(TEe), rr(e.restEncoder, this.length - r); } getMissing(e, r) { return null; } } -const kre = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : {}, Sre = "__ $YJS$ __"; -kre[Sre] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); -kre[Sre] = !0; -class WD { +const Tre = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : {}, Cre = "__ $YJS$ __"; +Tre[Cre] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); +Tre[Cre] = !0; +class XD { constructor(e, r) { this.yanchor = e, this.yhead = r; } toJSON() { return { - yanchor: gQ(this.yanchor), - yhead: gQ(this.yhead) + yanchor: vQ(this.yanchor), + yhead: vQ(this.yhead) }; } static fromJSON(e) { - return new WD(D2(e.yanchor), D2(e.yhead)); + return new XD(D2(e.yanchor), D2(e.yhead)); } } -class OEe { +class CEe { constructor(e, r) { - this.ytext = e, this.awareness = r, this.undoManager = new $D(e); + this.ytext = e, this.awareness = r, this.undoManager = new FD(e); } toYPos(e, r = 0) { - return z8(this.ytext, e, r); + return V8(this.ytext, e, r); } fromYPos(e) { - const r = Q8(D2(e), this.ytext.doc); + const r = q8(D2(e), this.ytext.doc); if (r == null || r.type !== this.ytext) throw new Error("[y-codemirror] The position you want to retrieve was created by a different document"); return { @@ -19641,7 +19641,7 @@ class OEe { } toYRange(e) { const r = e.assoc, n = this.toYPos(e.anchor, r), i = this.toYPos(e.head, r); - return new WD(n, i); + return new XD(n, i); } fromYRange(e) { const r = this.fromYPos(e.yanchor), n = this.fromYPos(e.yhead); @@ -19652,8 +19652,8 @@ const Gx = $t.define({ combine(t) { return t[t.length - 1]; } -}), W8 = co.define(); -class kEe { +}), H8 = co.define(); +class EEe { constructor(e) { this.view = e, this.conf = e.state.facet(Gx), this._observer = (r, n) => { if (n.origin !== this.conf) { @@ -19663,12 +19663,12 @@ class kEe { const l = i[o]; l.insert != null ? s.push({ from: a, to: a, insert: l.insert }) : l.delete != null ? (s.push({ from: a, to: a + l.delete, insert: "" }), a += l.delete) : a += l.retain; } - e.dispatch({ changes: s, annotations: [W8.of(this.conf)] }); + e.dispatch({ changes: s, annotations: [H8.of(this.conf)] }); } }, this._ytext = this.conf.ytext, this._ytext.observe(this._observer); } update(e) { - if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(W8) === this.conf) + if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(H8) === this.conf) return; const r = this.conf.ytext; r.doc.transact(() => { @@ -19684,7 +19684,7 @@ class kEe { this._ytext.unobserve(this._observer); } } -const SEe = hn.fromClass(kEe), TEe = kt.baseTheme({ +const _Ee = hn.fromClass(EEe), AEe = kt.baseTheme({ ".cm-ySelection": {}, ".cm-yLineSelection": { padding: 0, @@ -19738,19 +19738,19 @@ const SEe = hn.fromClass(kEe), TEe = kt.baseTheme({ opacity: 1, transitionDelay: "0s" } -}), CEe = co.define(); -class EEe extends uo { +}), LEe = co.define(); +class REe extends uo { constructor(e, r) { super(), this.color = e, this.name = r; } toDOM() { - return Q_("span", [xo("class", "cm-ySelectionCaret"), xo("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ + return q_("span", [xo("class", "cm-ySelectionCaret"), xo("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ CO("\u2060"), - Q_("div", [ + q_("div", [ xo("class", "cm-ySelectionCaretDot") ]), CO("\u2060"), - Q_("div", [ + q_("div", [ xo("class", "cm-ySelectionInfo") ], [ CO(this.name) @@ -19774,10 +19774,10 @@ class EEe extends uo { return !0; } } -class _Ee { +class MEe { constructor(e) { this.conf = e.state.facet(Gx), this._listener = ({ added: r, updated: n, removed: i }, s, a) => { - r.concat(n).concat(i).findIndex((l) => l !== this.conf.awareness.doc.clientID) >= 0 && e.dispatch({ annotations: [CEe.of([])] }); + r.concat(n).concat(i).findIndex((l) => l !== this.conf.awareness.doc.clientID) >= 0 && e.dispatch({ annotations: [LEe.of([])] }); }, this._awareness = this.conf.awareness, this._awareness.on("change", this._listener), this.decorations = $r.of([]); } destroy() { @@ -19788,8 +19788,8 @@ class _Ee { if (a != null) { const o = e.view.hasFocus && e.view.dom.ownerDocument.hasFocus(), l = o ? e.state.selection.main : null, u = a.cursor == null ? null : D2(a.cursor.anchor), h = a.cursor == null ? null : D2(a.cursor.head); if (l != null) { - const f = z8(r, l.anchor), d = z8(r, l.head); - (a.cursor == null || !mQ(u, f) || !mQ(h, d)) && i.setLocalStateField("cursor", { + const f = V8(r, l.anchor), d = V8(r, l.head); + (a.cursor == null || !yQ(u, f) || !yQ(h, d)) && i.setLocalStateField("cursor", { anchor: f, head: d }); @@ -19802,10 +19802,10 @@ class _Ee { const u = o.cursor; if (u == null || u.anchor == null || u.head == null) return; - const h = Q8(u.anchor, n), f = Q8(u.head, n); + const h = q8(u.anchor, n), f = q8(u.head, n); if (h == null || f == null || h.type !== r || f.type !== r) return; - const { color: d = "#30bced", name: p = "Anonymous" } = o.user || {}, g = o.user && o.user.colorLight || d + "33", m = WT(h.index, f.index), v = pd(h.index, f.index), y = e.view.state.doc.lineAt(m), b = e.view.state.doc.lineAt(v); + const { color: d = "#30bced", name: p = "Anonymous" } = o.user || {}, g = o.user && o.user.colorLight || d + "33", m = GT(h.index, f.index), v = pd(h.index, f.index), y = e.view.state.doc.lineAt(m), b = e.view.state.doc.lineAt(v); if (y.number === b.number) s.push({ from: m, @@ -19848,15 +19848,15 @@ class _Ee { value: It.widget({ side: f.index - h.index > 0 ? -1 : 1, block: !1, - widget: new EEe(d, p) + widget: new REe(d, p) }) }); }), this.decorations = It.set(s, !0); } } -const AEe = hn.fromClass(_Ee, { +const DEe = hn.fromClass(MEe, { decorations: (t) => t.decorations -}), LEe = () => { +}), PEe = () => { let t = !0; return (e, r) => { if (t) { @@ -19870,7 +19870,7 @@ const AEe = hn.fromClass(_Ee, { r !== void 0 && r(); }; }; -class REe { +class NEe { constructor(e) { this.undoManager = e; } @@ -19887,14 +19887,14 @@ class REe { return this.undoManager.redo() != null; } } -const eC = $t.define({ +const tC = $t.define({ combine(t) { return t[t.length - 1]; } }); -class MEe { +class IEe { constructor(e) { - this.view = e, this.conf = e.state.facet(eC), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(Gx), this._beforeChangeSelection = null, this._mux = LEe(), this._onStackItemAdded = ({ stackItem: r, changedParentTypes: n }) => { + this.view = e, this.conf = e.state.facet(tC), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(Gx), this._beforeChangeSelection = null, this._mux = PEe(), this._onStackItemAdded = ({ stackItem: r, changedParentTypes: n }) => { n.has(this.syncConf.ytext) && this._beforeChangeSelection && !r.meta.has(this) && r.meta.set(this, this._beforeChangeSelection); }, this._onStackItemPopped = ({ stackItem: r }) => { const n = r.meta.get(this); @@ -19907,26 +19907,26 @@ class MEe { }, this._undoManager.on("stack-item-added", this._onStackItemAdded), this._undoManager.on("stack-item-popped", this._onStackItemPopped), this._undoManager.addTrackedOrigin(this.syncConf); } update(e) { - e.selectionSet && (e.transactions.length === 0 || e.transactions[0].annotation(W8) !== this.syncConf) && this._storeSelection(); + e.selectionSet && (e.transactions.length === 0 || e.transactions[0].annotation(H8) !== this.syncConf) && this._storeSelection(); } destroy() { this._undoManager.off("stack-item-added", this._onStackItemAdded), this._undoManager.off("stack-item-popped", this._onStackItemPopped), this._undoManager.removeTrackedOrigin(this.syncConf); } } -const DEe = hn.fromClass(MEe), PEe = ({ state: t, dispatch: e }) => t.facet(eC).undo() || !0, NEe = ({ state: t, dispatch: e }) => t.facet(eC).redo() || !0, IEe = (t, e, { undoManager: r = new $D(t) } = {}) => { - const n = new OEe(t, e), i = [ +const $Ee = hn.fromClass(IEe), BEe = ({ state: t, dispatch: e }) => t.facet(tC).undo() || !0, FEe = ({ state: t, dispatch: e }) => t.facet(tC).redo() || !0, zEe = (t, e, { undoManager: r = new FD(t) } = {}) => { + const n = new CEe(t, e), i = [ Gx.of(n), - SEe + _Ee ]; return e && i.push( - TEe, - AEe + AEe, + DEe ), r !== !1 && i.push( - eC.of(new REe(r)), - DEe, + tC.of(new NEe(r)), + $Ee, kt.domEventHandlers({ beforeinput(s, a) { - return s.inputType === "historyUndo" ? PEe(a) : s.inputType === "historyRedo" ? NEe(a) : !1; + return s.inputType === "historyUndo" ? BEe(a) : s.inputType === "historyRedo" ? FEe(a) : !1; } }) ), i; @@ -19953,12 +19953,12 @@ var Tt; (function(t) { t[t.Document = 1] = "Document", t[t.CodeBlock = 2] = "CodeBlock", t[t.FencedCode = 3] = "FencedCode", t[t.Blockquote = 4] = "Blockquote", t[t.HorizontalRule = 5] = "HorizontalRule", t[t.BulletList = 6] = "BulletList", t[t.OrderedList = 7] = "OrderedList", t[t.ListItem = 8] = "ListItem", t[t.ATXHeading1 = 9] = "ATXHeading1", t[t.ATXHeading2 = 10] = "ATXHeading2", t[t.ATXHeading3 = 11] = "ATXHeading3", t[t.ATXHeading4 = 12] = "ATXHeading4", t[t.ATXHeading5 = 13] = "ATXHeading5", t[t.ATXHeading6 = 14] = "ATXHeading6", t[t.SetextHeading1 = 15] = "SetextHeading1", t[t.SetextHeading2 = 16] = "SetextHeading2", t[t.HTMLBlock = 17] = "HTMLBlock", t[t.LinkReference = 18] = "LinkReference", t[t.Paragraph = 19] = "Paragraph", t[t.CommentBlock = 20] = "CommentBlock", t[t.ProcessingInstructionBlock = 21] = "ProcessingInstructionBlock", t[t.Escape = 22] = "Escape", t[t.Entity = 23] = "Entity", t[t.HardBreak = 24] = "HardBreak", t[t.Emphasis = 25] = "Emphasis", t[t.StrongEmphasis = 26] = "StrongEmphasis", t[t.Link = 27] = "Link", t[t.Image = 28] = "Image", t[t.InlineCode = 29] = "InlineCode", t[t.HTMLTag = 30] = "HTMLTag", t[t.Comment = 31] = "Comment", t[t.ProcessingInstruction = 32] = "ProcessingInstruction", t[t.URL = 33] = "URL", t[t.HeaderMark = 34] = "HeaderMark", t[t.QuoteMark = 35] = "QuoteMark", t[t.ListMark = 36] = "ListMark", t[t.LinkMark = 37] = "LinkMark", t[t.EmphasisMark = 38] = "EmphasisMark", t[t.CodeMark = 39] = "CodeMark", t[t.CodeText = 40] = "CodeText", t[t.CodeInfo = 41] = "CodeInfo", t[t.LinkTitle = 42] = "LinkTitle", t[t.LinkLabel = 43] = "LinkLabel"; })(Tt || (Tt = {})); -class $Ee { +class QEe { constructor(e, r) { this.start = e, this.content = r, this.marks = [], this.parsers = []; } } -class BEe { +class UEe { constructor() { this.text = "", this.baseIndent = 0, this.basePos = 0, this.depth = 0, this.markers = [], this.pos = 0, this.indent = 0, this.next = -1; } @@ -20005,23 +20005,23 @@ class BEe { return e + this.text.slice(this.basePos); } } -function EQ(t, e, r) { +function AQ(t, e, r) { if (r.pos == r.text.length || t != e.block && r.indent >= e.stack[r.depth + 1].value + r.baseIndent) return !0; if (r.indent >= r.baseIndent + 4) return !1; - let n = (t.type == Tt.OrderedList ? HD : XD)(r, e, !1); - return n > 0 && (t.type != Tt.BulletList || GD(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; + let n = (t.type == Tt.OrderedList ? jD : ZD)(r, e, !1); + return n > 0 && (t.type != Tt.BulletList || HD(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; } -const Tre = { +const Ere = { [Tt.Blockquote](t, e, r) { return r.next != 62 ? !1 : (r.markers.push(Xr(Tt.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (Sl(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0); }, [Tt.ListItem](t, e, r) { return r.indent < r.baseIndent + t.value && r.next > -1 ? !1 : (r.moveBaseColumn(r.baseIndent + t.value), !0); }, - [Tt.OrderedList]: EQ, - [Tt.BulletList]: EQ, + [Tt.OrderedList]: AQ, + [Tt.BulletList]: AQ, [Tt.Document]() { return !0; } @@ -20034,12 +20034,12 @@ function By(t, e = 0) { e++; return e; } -function _Q(t, e, r) { +function LQ(t, e, r) { for (; e > r && Sl(t.charCodeAt(e - 1)); ) e--; return e; } -function Cre(t) { +function _re(t) { if (t.next != 96 && t.next != 126) return -1; let e = t.pos + 1; @@ -20054,10 +20054,10 @@ function Cre(t) { } return e; } -function Ere(t) { +function Are(t) { return t.next != 62 ? -1 : t.text.charCodeAt(t.pos + 1) == 32 ? 2 : 1; } -function GD(t, e, r) { +function HD(t, e, r) { if (t.next != 42 && t.next != 45 && t.next != 95) return -1; let n = 1; @@ -20068,18 +20068,18 @@ function GD(t, e, r) { else if (!Sl(s)) return -1; } - return r && t.next == 45 && Lre(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; + return r && t.next == 45 && Mre(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; } -function _re(t, e) { +function Lre(t, e) { for (let r = t.stack.length - 1; r >= 0; r--) if (t.stack[r].type == e) return !0; return !1; } -function XD(t, e, r) { - return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || Sl(t.text.charCodeAt(t.pos + 1))) && (!r || _re(e, Tt.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; +function ZD(t, e, r) { + return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || Sl(t.text.charCodeAt(t.pos + 1))) && (!r || Lre(e, Tt.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; } -function HD(t, e, r) { +function jD(t, e, r) { let n = t.pos, i = t.next; for (; i >= 48 && i <= 57; ) { n++; @@ -20087,9 +20087,9 @@ function HD(t, e, r) { return -1; i = t.text.charCodeAt(n); } - return n == t.pos || n > t.pos + 9 || i != 46 && i != 41 || n < t.text.length - 1 && !Sl(t.text.charCodeAt(n + 1)) || r && !_re(e, Tt.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos; + return n == t.pos || n > t.pos + 9 || i != 46 && i != 41 || n < t.text.length - 1 && !Sl(t.text.charCodeAt(n + 1)) || r && !Lre(e, Tt.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos; } -function Are(t) { +function Rre(t) { if (t.next != 35) return -1; let e = t.pos + 1; @@ -20100,7 +20100,7 @@ function Are(t) { let r = e - t.pos; return r > 6 ? -1 : r; } -function Lre(t) { +function Mre(t) { if (t.next != 45 && t.next != 61 || t.indent >= t.baseIndent + 4) return -1; let e = t.pos + 1; @@ -20111,29 +20111,29 @@ function Lre(t) { e++; return e == t.text.length ? r : -1; } -const G8 = /^[ \t]*$/, Rre = /-->/, Mre = /\?>/, X8 = [ +const Z8 = /^[ \t]*$/, Dre = /-->/, Pre = /\?>/, j8 = [ [/^<(?:script|pre|style)(?:\s|>|$)/i, /<\/(?:script|pre|style)>/i], - [/^\s*" } } }), Ene = /* @__PURE__ */ new yr(), _ne = /* @__PURE__ */ ZEe.configure({ +}), _ne = /* @__PURE__ */ aD({ commentTokens: { block: { open: "" } } }), Ane = /* @__PURE__ */ new yr(), Lne = /* @__PURE__ */ e_e.configure({ props: [ - /* @__PURE__ */ dp.add((t) => !t.is("Block") || t.is("Document") || t9(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), - /* @__PURE__ */ Ene.add(t9), - /* @__PURE__ */ y1.add({ + /* @__PURE__ */ pp.add((t) => !t.is("Block") || t.is("Document") || i9(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), + /* @__PURE__ */ Ane.add(i9), + /* @__PURE__ */ b1.add({ Document: () => null }), - /* @__PURE__ */ s0.add({ - Document: Cne + /* @__PURE__ */ a0.add({ + Document: _ne }) ] }); -function t9(t) { +function i9(t) { let e = /^(?:ATX|Setext)Heading(\d)$/.exec(t.name); return e ? +e[1] : void 0; } -function xAe(t, e) { +function SAe(t, e) { let r = t; for (; ; ) { let n = r.nextSibling, i; - if (!n || (i = t9(n.type)) != null && i <= e) + if (!n || (i = i9(n.type)) != null && i <= e) break; r = n; } return r.to; } -const wAe = /* @__PURE__ */ ree.of((t, e, r) => { +const TAe = /* @__PURE__ */ iee.of((t, e, r) => { for (let n = Cn(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) { - let i = n.type.prop(Ene); + let i = n.type.prop(Ane); if (i == null) continue; - let s = xAe(n, i); + let s = SAe(n, i); if (s > r) return { from: r, to: s }; } return null; }); -function eP(t) { - return new el(Cne, t, [wAe], "markdown"); +function rP(t) { + return new el(_ne, t, [TAe], "markdown"); } -const OAe = /* @__PURE__ */ eP(_ne), kAe = /* @__PURE__ */ _ne.configure([o_e, c_e, l_e, u_e, { +const CAe = /* @__PURE__ */ rP(Lne), EAe = /* @__PURE__ */ Lne.configure([h_e, d_e, f_e, p_e, { props: [ - /* @__PURE__ */ dp.add({ + /* @__PURE__ */ pp.add({ Table: (t, e) => ({ from: e.doc.lineAt(t.from).to, to: t.to }) }) ] -}]), Ane = /* @__PURE__ */ eP(kAe); -function SAe(t, e) { +}]), Rne = /* @__PURE__ */ rP(EAe); +function _Ae(t, e) { return (r) => { if (r && t) { let n = null; @@ -24670,11 +24670,11 @@ class MO { } } marker(e, r) { - let n = this.node.name == "OrderedList" ? String(+Rne(this.item, e)[2] + r) : ""; + let n = this.node.name == "OrderedList" ? String(+Dne(this.item, e)[2] + r) : ""; return this.spaceBefore + n + this.type + this.spaceAfter; } } -function Lne(t, e) { +function Mne(t, e) { let r = []; for (let i = t; i && i.name != "Document"; i = i.parent) (i.name == "ListItem" || i.name == "Blockquote" || i.name == "FencedCode") && r.push(i); @@ -24697,13 +24697,13 @@ function Lne(t, e) { } return n; } -function Rne(t, e) { +function Dne(t, e) { return /^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from, t.from + 10)); } -function n6(t, e, r, n = 0) { +function a6(t, e, r, n = 0) { for (let i = -1, s = t; ; ) { if (s.name == "ListItem") { - let o = Rne(s, e), l = +o[2]; + let o = Dne(s, e), l = +o[2]; if (i >= 0) { if (l != i + 1) return; @@ -24717,7 +24717,7 @@ function n6(t, e, r, n = 0) { s = a; } } -function r9(t, e) { +function s9(t, e) { let r = /^[ \t]*/.exec(t)[0].length; if (!r || e.facet(Bx) != " ") return t; @@ -24726,11 +24726,11 @@ function r9(t, e) { s >= 4 ? (i += " ", s -= 4) : (i += " ", s--); return i + t.slice(r); } -const TAe = ({ state: t, dispatch: e }) => { +const AAe = ({ state: t, dispatch: e }) => { let r = Cn(t), { doc: n } = t, i = null, s = t.changeByRange((a) => { - if (!a.empty || !Ane.isActiveAt(t, a.from)) + if (!a.empty || !Rne.isActiveAt(t, a.from)) return i = { range: a }; - let o = a.from, l = n.lineAt(o), u = Lne(r.resolveInner(o, -1), n); + let o = a.from, l = n.lineAt(o), u = Mne(r.resolveInner(o, -1), n); for (; u.length && u[u.length - 1].from > o - l.from; ) u.pop(); if (!u.length) @@ -24744,12 +24744,12 @@ const TAe = ({ state: t, dispatch: e }) => { let v = u.length > 1 ? u[u.length - 2] : null, y, b = ""; v && v.item ? (y = l.from + v.from, b = v.marker(n, 1)) : y = l.from + (v ? v.to : 0); let w = [{ from: y, to: o, insert: b }]; - return h.node.name == "OrderedList" && n6(h.item, n, w, -2), v && v.node.name == "OrderedList" && n6(v.item, n, w), { range: je.cursor(y + b.length), changes: w }; + return h.node.name == "OrderedList" && a6(h.item, n, w, -2), v && v.node.name == "OrderedList" && a6(v.item, n, w), { range: je.cursor(y + b.length), changes: w }; } else { let v = ""; for (let y = 0, b = u.length - 2; y <= b; y++) v += u[y].blank(y < b ? tc(l.text, 4, u[y + 1].from) - v.length : null, y < b); - return v = r9(v, t), { + return v = s9(v, t), { range: je.cursor(o + v.length + 1), changes: { from: l.from, insert: v + t.lineBreak } }; @@ -24765,7 +24765,7 @@ const TAe = ({ state: t, dispatch: e }) => { } } let d = []; - h.node.name == "OrderedList" && n6(h.item, n, d); + h.node.name == "OrderedList" && a6(h.item, n, d); let p = h.item && h.item.from < l.from, g = ""; if (!p || /^[\s\d.)\-+*>]*/.exec(l.text)[0].length >= h.to) for (let v = 0, y = u.length - 1; v <= y; v++) @@ -24773,18 +24773,18 @@ const TAe = ({ state: t, dispatch: e }) => { let m = o; for (; m > l.from && /\s/.test(l.text.charAt(m - l.from - 1)); ) m--; - return g = r9(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: je.cursor(m + g.length + 1), changes: d }; + return g = s9(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: je.cursor(m + g.length + 1), changes: d }; }); return i ? !1 : (e(t.update(s, { scrollIntoView: !0, userEvent: "input" })), !0); }; -function fU(t) { +function pU(t) { return t.name == "QuoteMark" || t.name == "ListMark"; } -function CAe(t, e) { +function LAe(t, e) { let r = t.resolveInner(e, -1), n = e; - fU(r) && (n = r.from, r = r.parent); + pU(r) && (n = r.from, r = r.parent); for (let i; i = r.childBefore(n); ) - if (fU(i)) + if (pU(i)) n = i.from; else if (i.name == "OrderedList" || i.name == "BulletList") r = i.lastChild, n = r.to; @@ -24792,11 +24792,11 @@ function CAe(t, e) { break; return r; } -const EAe = ({ state: t, dispatch: e }) => { +const RAe = ({ state: t, dispatch: e }) => { let r = Cn(t), n = null, i = t.changeByRange((s) => { let a = s.from, { doc: o } = t; - if (s.empty && Ane.isActiveAt(t, s.from)) { - let l = o.lineAt(a), u = Lne(CAe(r, a), o); + if (s.empty && Rne.isActiveAt(t, s.from)) { + let l = o.lineAt(a), u = Mne(LAe(r, a), o); if (u.length) { let h = u[u.length - 1], f = h.to - h.spaceAfter.length + (h.spaceAfter ? 1 : 0); if (a - l.from > f && !/\S/.test(l.text.slice(f, a - l.from))) @@ -24808,7 +24808,7 @@ const EAe = ({ state: t, dispatch: e }) => { let d = l.from + h.from; if (h.item && h.node.from < h.item.from && /\S/.test(l.text.slice(h.from, h.to))) { let p = h.blank(tc(l.text, 4, h.to) - tc(l.text, 4, h.from)); - return d == l.from && (p = r9(p, t)), { + return d == l.from && (p = s9(p, t)), { range: je.cursor(d + p.length), changes: { from: d, to: l.from + h.to, insert: p } }; @@ -24821,22 +24821,22 @@ const EAe = ({ state: t, dispatch: e }) => { return n = { range: s }; }); return n ? !1 : (e(t.update(i, { scrollIntoView: !0, userEvent: "delete" })), !0); -}, _Ae = [ - { key: "Enter", run: TAe }, - { key: "Backspace", run: EAe } -], n9 = /* @__PURE__ */ yAe({ matchClosingTags: !1 }); -function AAe(t = {}) { - let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = OAe, completeHTMLTags: s = !0 } = t; - if (!(i instanceof tC)) +}, MAe = [ + { key: "Enter", run: AAe }, + { key: "Backspace", run: RAe } +], a9 = /* @__PURE__ */ OAe({ matchClosingTags: !1 }); +function DAe(t = {}) { + let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = CAe, completeHTMLTags: s = !0 } = t; + if (!(i instanceof rC)) throw new RangeError("Base parser provided to `markdown` should be a Markdown parser"); - let a = t.extensions ? [t.extensions] : [], o = [n9.support], l; - r instanceof dm ? (o.push(r.support), l = r.language) : r && (l = r); - let u = e || l ? SAe(e, l) : void 0; - a.push(KEe({ codeParser: u, htmlParser: n9.language.parser })), n && o.push(uc.high(Zu.of(_Ae))); - let h = eP(i.configure(a)); - return s && o.push(h.data.of({ autocomplete: LAe })), new dm(h, o); -} -function LAe(t) { + let a = t.extensions ? [t.extensions] : [], o = [a9.support], l; + r instanceof pm ? (o.push(r.support), l = r.language) : r && (l = r); + let u = e || l ? _Ae(e, l) : void 0; + a.push(r_e({ codeParser: u, htmlParser: a9.language.parser })), n && o.push(uc.high(ju.of(MAe))); + let h = rP(i.configure(a)); + return s && o.push(h.data.of({ autocomplete: PAe })), new pm(h, o); +} +function PAe(t) { let { state: e, pos: r } = t, n = /<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r - 25, r)); if (!n) return null; @@ -24849,25 +24849,25 @@ function LAe(t) { return { from: r - n[0].length, to: r, - options: RAe(), + options: NAe(), validFor: /^<[:\-\.\w\u00b7-\uffff]*$/ }; } -let i6 = null; -function RAe() { - if (i6) - return i6; - let t = gAe(new yD(Sr.create({ extensions: n9 }), 0, !0)); - return i6 = t ? t.options : []; +let o6 = null; +function NAe() { + if (o6) + return o6; + let t = bAe(new xD(Sr.create({ extensions: a9 }), 0, !0)); + return o6 = t ? t.options : []; } -function MAe(t) { +function IAe(t) { throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } -var Mne = { exports: {} }; -const DAe = {}, PAe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +var Pne = { exports: {} }; +const $Ae = {}, BAe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - default: DAe -}, Symbol.toStringTag, { value: "Module" })), NAe = /* @__PURE__ */ Hj(PAe); + default: $Ae +}, Symbol.toStringTag, { value: "Module" })), FAe = /* @__PURE__ */ jj(BAe); (function(t) { var e; (function() { @@ -24923,8 +24923,8 @@ const DAe = {}, PAe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin u(a.statusText); }; })), a.overrideMimeType && a.overrideMimeType("text/plain; charset=" + n), a.send(null), i ? s : a.responseText; - } else if (typeof MAe < "u") { - var o = NAe; + } else if (typeof IAe < "u") { + var o = FAe; try { if (o.existsSync(r)) return o.readFileSync(r, n); @@ -25158,44 +25158,44 @@ const DAe = {}, PAe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin } }; })(), t.exports = e; -})(Mne); -const IAe = Mne.exports, Dne = $t.define({ +})(Pne); +const zAe = Pne.exports, Nne = $t.define({ combine: (t) => t[t.length - 1] -}), $Ae = It.mark({ +}), QAe = It.mark({ class: "cm-error" -}), BAe = (t) => Object.keys(t.rules).length > 0; -function dU(t) { +}), UAe = (t) => Object.keys(t.rules).length > 0; +function gU(t) { var s, a; let e = ((s = t.visibleRanges[0]) == null ? void 0 : s.from) || 0, r = ((a = t.visibleRanges[0]) == null ? void 0 : a.to) || void 0; - const n = new os(), i = t.state.facet(Dne); - return BAe(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, $Ae)), n.finish(); + const n = new os(), i = t.state.facet(Nne); + return UAe(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, QAe)), n.finish(); } -const FAe = hn.fromClass(class { +const VAe = hn.fromClass(class { constructor(t) { - this.decorations = dU(t); + this.decorations = gU(t); } update(t) { - (t.docChanged || t.viewportChanged) && (this.decorations = dU(t.view)); + (t.docChanged || t.viewportChanged) && (this.decorations = gU(t.view)); } }, { decorations: (t) => t.decorations }); -function zAe(t) { +function qAe(t) { if (!t) return []; let { dict: e = "en_US", dictionaryPath: r = "/dictionaries" } = t; - return [Dne.of(new IAe(e, null, null, { + return [Nne.of(new zAe(e, null, null, { dictionaryPath: r - })), FAe]; + })), VAe]; } -const QAe = "cm-link", UAe = [{ +const YAe = "cm-link", WAe = [{ target: /`[^`\n]+`/g, cssClass: "cm-mono" }]; -function pU(t, e, r, n) { +function mU(t, e, r, n) { var l, u; let i = ((l = t.visibleRanges[0]) == null ? void 0 : l.from) || 0, s = ((u = t.visibleRanges[0]) == null ? void 0 : u.to) || void 0; const a = new os(), o = t.state.doc.sliceString(i, s); @@ -25213,7 +25213,7 @@ function pU(t, e, r, n) { match: f }) => { let d = { - class: QAe + class: YAe }; h.cssClass && (d.class = h.cssClass); let p; @@ -25227,89 +25227,89 @@ function pU(t, e, r, n) { })), a.add(h.from + f.index, h.from + f.index + f[0].length, It.mark(d)), p == null || p(); }), a.finish(); } -const tP = (t, e, r) => { +const nP = (t, e, r) => { t || (t = []); - const n = t.concat(UAe); + const n = t.concat(WAe); return hn.fromClass(class { constructor(i) { - this.decorations = pU(i, n, e, r); + this.decorations = mU(i, n, e, r); } update(i) { - (i.docChanged || i.viewportChanged) && (this.decorations = pU(i.view, n, e, r)); + (i.docChanged || i.viewportChanged) && (this.decorations = mU(i.view, n, e, r)); } }, { decorations: (i) => i.decorations }); -}, Pne = /* @__PURE__ */ new Map(); -class VAe { +}, Ine = /* @__PURE__ */ new Map(); +class GAe { constructor(e) { - this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: PTe(r.newValue || "") }), fTe(this._onChange); + this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: BTe(r.newValue || "") }), mTe(this._onChange); } postMessage(e) { - Rte.setItem(this.room, DTe(_Te(e))); + Dte.setItem(this.room, $Te(MTe(e))); } close() { - dTe(this._onChange); + vTe(this._onChange); } } -const qAe = typeof BroadcastChannel > "u" ? VAe : BroadcastChannel, rP = (t) => Ah(Pne, t, () => { - const e = L0(), r = new qAe(t); +const XAe = typeof BroadcastChannel > "u" ? GAe : BroadcastChannel, iP = (t) => Lh(Ine, t, () => { + const e = R0(), r = new XAe(t); return r.onmessage = (n) => e.forEach((i) => i(n.data, "broadcastchannel")), { bc: r, subs: e }; -}), YAe = (t, e) => (rP(t).subs.add(e), e), WAe = (t, e) => { - const r = rP(t), n = r.subs.delete(e); - return n && r.subs.size === 0 && (r.bc.close(), Pne.delete(t)), n; -}, ag = (t, e, r = null) => { - const n = rP(t); +}), HAe = (t, e) => (iP(t).subs.add(e), e), ZAe = (t, e) => { + const r = iP(t), n = r.subs.delete(e); + return n && r.subs.size === 0 && (r.bc.close(), Ine.delete(t)), n; +}, og = (t, e, r = null) => { + const n = iP(t); n.bc.postMessage(e), n.subs.forEach((i) => i(e, r)); -}, Nne = 0, nP = 1, Ine = 2, i9 = (t, e) => { - rr(t, Nne); - const r = vCe(e); +}, $ne = 0, sP = 1, Bne = 2, o9 = (t, e) => { + rr(t, $ne); + const r = wCe(e); ci(t, r); -}, $ne = (t, e, r) => { - rr(t, nP), ci(t, dCe(e, r)); -}, GAe = (t, e, r) => $ne(e, r, qs(t)), Bne = (t, e, r) => { +}, Fne = (t, e, r) => { + rr(t, sP), ci(t, vCe(e, r)); +}, jAe = (t, e, r) => Fne(e, r, qs(t)), zne = (t, e, r) => { try { - uCe(e, qs(t), r); + pCe(e, qs(t), r); } catch (n) { console.error("Caught error while handling a Yjs update", n); } -}, XAe = (t, e) => { - rr(t, Ine), ci(t, e); -}, HAe = Bne, ZAe = (t, e, r, n) => { +}, KAe = (t, e) => { + rr(t, Bne), ci(t, e); +}, JAe = zne, e7e = (t, e, r, n) => { const i = xr(t); switch (i) { - case Nne: - GAe(t, e, r); + case $ne: + jAe(t, e, r); break; - case nP: - Bne(t, r, n); + case sP: + zne(t, r, n); break; - case Ine: - HAe(t, r, n); + case Bne: + JAe(t, r, n); break; default: throw new Error("Unknown message type"); } return i; -}, jAe = 0, KAe = (t, e, r) => { +}, t7e = 0, r7e = (t, e, r) => { switch (xr(t)) { - case jAe: - r(e, Of(t)); + case t7e: + r(e, kf(t)); } -}, s6 = 3e4; -class Fne extends YT { +}, l6 = 3e4; +class Qne extends WT { constructor(e) { super(), this.doc = e, this.clientID = e.clientID, this.states = /* @__PURE__ */ new Map(), this.meta = /* @__PURE__ */ new Map(), this._checkInterval = setInterval(() => { - const r = Qf(); - this.getLocalState() !== null && s6 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); + const r = Uf(); + this.getLocalState() !== null && l6 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); const n = []; this.meta.forEach((i, s) => { - s !== this.clientID && s6 <= r - i.lastUpdated && this.states.has(s) && n.push(s); - }), n.length > 0 && iP(this, n, "timeout"); - }, hh(s6 / 10)), e.on("destroy", () => { + s !== this.clientID && l6 <= r - i.lastUpdated && this.states.has(s) && n.push(s); + }), n.length > 0 && aP(this, n, "timeout"); + }, fh(l6 / 10)), e.on("destroy", () => { this.destroy(); }), this.setLocalState({}); } @@ -25323,7 +25323,7 @@ class Fne extends YT { const r = this.clientID, n = this.meta.get(r), i = n === void 0 ? 0 : n.clock + 1, s = this.states.get(r); e === null ? this.states.delete(r) : this.states.set(r, e), this.meta.set(r, { clock: i, - lastUpdated: Qf() + lastUpdated: Uf() }); const a = [], o = [], l = [], u = []; e === null ? u.push(r) : s == null ? e != null && a.push(r) : (o.push(r), $y(s, e) || l.push(r)), (a.length > 0 || l.length > 0 || u.length > 0) && this.emit("change", [{ added: a, updated: l, removed: u }, "local"]), this.emit("update", [{ added: a, updated: o, removed: u }, "local"]); @@ -25339,7 +25339,7 @@ class Fne extends YT { return this.states; } } -const iP = (t, e, r) => { +const aP = (t, e, r) => { const n = []; for (let i = 0; i < e.length; i++) { const s = e[i]; @@ -25348,7 +25348,7 @@ const iP = (t, e, r) => { const a = t.meta.get(s); t.meta.set(s, { clock: a.clock + 1, - lastUpdated: Qf() + lastUpdated: Uf() }); } n.push(s); @@ -25360,15 +25360,15 @@ const iP = (t, e, r) => { rr(i, n); for (let s = 0; s < n; s++) { const a = e[s], o = r.get(a) || null, l = t.meta.get(a).clock; - rr(i, a), rr(i, l), w0(i, JSON.stringify(o)); + rr(i, a), rr(i, l), O0(i, JSON.stringify(o)); } return Vn(i); -}, JAe = (t, e, r) => { - const n = gd(e), i = Qf(), s = [], a = [], o = [], l = [], u = xr(n); +}, n7e = (t, e, r) => { + const n = gd(e), i = Uf(), s = [], a = [], o = [], l = [], u = xr(n); for (let h = 0; h < u; h++) { const f = xr(n); let d = xr(n); - const p = JSON.parse(Of(n)), g = t.meta.get(f), m = t.states.get(f), v = g === void 0 ? 0 : g.clock; + const p = JSON.parse(kf(n)), g = t.meta.get(f), m = t.states.get(f), v = g === void 0 ? 0 : g.clock; (v < d || v === d && p === null && t.states.has(f)) && (p === null ? f === t.clientID && t.getLocalState() != null ? d++ : t.states.delete(f) : t.states.set(f, p), t.meta.set(f, { clock: d, lastUpdated: i @@ -25383,19 +25383,19 @@ const iP = (t, e, r) => { updated: a, removed: l }, r]); -}, e7e = (t) => vTe(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), o0 = 0, zne = 3, Ig = 1, t7e = 2, Xx = []; -Xx[o0] = (t, e, r, n, i) => { - rr(t, o0); - const s = ZAe( +}, i7e = (t) => wTe(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), l0 = 0, Une = 3, $g = 1, s7e = 2, Xx = []; +Xx[l0] = (t, e, r, n, i) => { + rr(t, l0); + const s = e7e( e, t, r.doc, r ); - n && s === nP && !r.synced && (r.synced = !0); + n && s === sP && !r.synced && (r.synced = !0); }; -Xx[zne] = (t, e, r, n, i) => { - rr(t, Ig), ci( +Xx[Une] = (t, e, r, n, i) => { + rr(t, $g), ci( t, zy( r.awareness, @@ -25403,35 +25403,35 @@ Xx[zne] = (t, e, r, n, i) => { ) ); }; -Xx[Ig] = (t, e, r, n, i) => { - JAe( +Xx[$g] = (t, e, r, n, i) => { + n7e( r.awareness, qs(e), r ); }; -Xx[t7e] = (t, e, r, n, i) => { - KAe( +Xx[s7e] = (t, e, r, n, i) => { + r7e( e, r.doc, - (s, a) => r7e(r, a) + (s, a) => a7e(r, a) ); }; -const gU = 3e4, r7e = (t, e) => console.warn(`Permission denied to access ${t.url}. -${e}`), Qne = (t, e, r) => { +const vU = 3e4, a7e = (t, e) => console.warn(`Permission denied to access ${t.url}. +${e}`), Vne = (t, e, r) => { const n = gd(e), i = Ys(), s = xr(n), a = t.messageHandlers[s]; return a ? a(i, n, t, r, s) : console.error("Unable to compute message"), i; -}, Une = (t) => { +}, qne = (t) => { if (t.shouldConnect && t.ws === null) { const e = new t._WS(t.url); e.binaryType = "arraybuffer", t.ws = e, t.wsconnecting = !0, t.wsconnected = !1, t.synced = !1, e.onmessage = (r) => { - t.wsLastMessageReceived = Qf(); - const n = Qne(t, new Uint8Array(r.data), !0); - TD(n) > 1 && e.send(Vn(n)); + t.wsLastMessageReceived = Uf(); + const n = Vne(t, new Uint8Array(r.data), !0); + ED(n) > 1 && e.send(Vn(n)); }, e.onerror = (r) => { t.emit("connection-error", [r, t]); }, e.onclose = (r) => { - t.emit("connection-close", [r, t]), t.ws = null, t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, iP( + t.emit("connection-close", [r, t]), t.ws = null, t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, aP( t.awareness, Array.from(t.awareness.getStates().keys()).filter( (n) => n !== t.doc.clientID @@ -25440,21 +25440,21 @@ ${e}`), Qne = (t, e, r) => { ), t.emit("status", [{ status: "disconnected" }])) : t.wsUnsuccessfulReconnects++, setTimeout( - Une, - WT( - DSe(2, t.wsUnsuccessfulReconnects) * 100, + qne, + GT( + $Se(2, t.wsUnsuccessfulReconnects) * 100, t.maxBackoffTime ), t ); }, e.onopen = () => { - t.wsLastMessageReceived = Qf(), t.wsconnecting = !1, t.wsconnected = !0, t.wsUnsuccessfulReconnects = 0, t.emit("status", [{ + t.wsLastMessageReceived = Uf(), t.wsconnecting = !1, t.wsconnected = !0, t.wsUnsuccessfulReconnects = 0, t.emit("status", [{ status: "connected" }]); const r = Ys(); - if (rr(r, o0), i9(r, t.doc), e.send(Vn(r)), t.awareness.getLocalState() !== null) { + if (rr(r, l0), o9(r, t.doc), e.send(Vn(r)), t.awareness.getLocalState() !== null) { const n = Ys(); - rr(n, Ig), ci( + rr(n, $g), ci( n, zy(t.awareness, [ t.doc.clientID @@ -25465,14 +25465,14 @@ ${e}`), Qne = (t, e, r) => { status: "connecting" }]); } -}, a6 = (t, e) => { +}, c6 = (t, e) => { const r = t.ws; - t.wsconnected && r && r.readyState === r.OPEN && r.send(e), t.bcconnected && ag(t.bcChannel, e, t); + t.wsconnected && r && r.readyState === r.OPEN && r.send(e), t.bcconnected && og(t.bcChannel, e, t); }; -class Vne extends YT { +class Yne extends WT { constructor(e, r, n, { connect: i = !0, - awareness: s = new Fne(n), + awareness: s = new Qne(n), params: a = {}, WebSocketPolyfill: o = WebSocket, resyncInterval: l = -1, @@ -25481,37 +25481,37 @@ class Vne extends YT { } = {}) { for (super(); e[e.length - 1] === "/"; ) e = e.slice(0, e.length - 1); - const f = e7e(a); + const f = i7e(a); this.maxBackoffTime = u, this.bcChannel = e + "/" + r, this.url = e + "/" + r + (f.length === 0 ? "" : "?" + f), this.roomname = r, this.doc = n, this._WS = o, this.awareness = s, this.wsconnected = !1, this.wsconnecting = !1, this.bcconnected = !1, this.disableBc = h, this.wsUnsuccessfulReconnects = 0, this.messageHandlers = Xx.slice(), this._synced = !1, this.ws = null, this.wsLastMessageReceived = 0, this.shouldConnect = i, this._resyncInterval = 0, l > 0 && (this._resyncInterval = setInterval(() => { if (this.ws && this.ws.readyState === WebSocket.OPEN) { const d = Ys(); - rr(d, o0), i9(d, n), this.ws.send(Vn(d)); + rr(d, l0), o9(d, n), this.ws.send(Vn(d)); } }, l)), this._bcSubscriber = (d, p) => { if (p !== this) { - const g = Qne(this, new Uint8Array(d), !1); - TD(g) > 1 && ag(this.bcChannel, Vn(g), this); + const g = Vne(this, new Uint8Array(d), !1); + ED(g) > 1 && og(this.bcChannel, Vn(g), this); } }, this._updateHandler = (d, p) => { if (p !== this) { const g = Ys(); - rr(g, o0), XAe(g, d), a6(this, Vn(g)); + rr(g, l0), KAe(g, d), c6(this, Vn(g)); } }, this.doc.on("update", this._updateHandler), this._awarenessUpdateHandler = ({ added: d, updated: p, removed: g }, m) => { const v = d.concat(p).concat(g), y = Ys(); - rr(y, Ig), ci( + rr(y, $g), ci( y, zy(s, v) - ), a6(this, Vn(y)); + ), c6(this, Vn(y)); }, this._unloadHandler = () => { - iP( + aP( this.awareness, [n.clientID], "window unload" ); }, typeof window < "u" ? window.addEventListener("unload", this._unloadHandler) : typeof process < "u" && process.on("exit", this._unloadHandler), s.on("update", this._awarenessUpdateHandler), this._checkInterval = setInterval(() => { - this.wsconnected && gU < Qf() - this.wsLastMessageReceived && this.ws.close(); - }, gU / 10), i && this.connect(); + this.wsconnected && vU < Uf() - this.wsLastMessageReceived && this.ws.close(); + }, vU / 10), i && this.connect(); } get synced() { return this._synced; @@ -25525,24 +25525,24 @@ class Vne extends YT { connectBc() { if (this.disableBc) return; - this.bcconnected || (YAe(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); + this.bcconnected || (HAe(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); const e = Ys(); - rr(e, o0), i9(e, this.doc), ag(this.bcChannel, Vn(e), this); + rr(e, l0), o9(e, this.doc), og(this.bcChannel, Vn(e), this); const r = Ys(); - rr(r, o0), $ne(r, this.doc), ag(this.bcChannel, Vn(r), this); + rr(r, l0), Fne(r, this.doc), og(this.bcChannel, Vn(r), this); const n = Ys(); - rr(n, zne), ag( + rr(n, Une), og( this.bcChannel, Vn(n), this ); const i = Ys(); - rr(i, Ig), ci( + rr(i, $g), ci( i, zy(this.awareness, [ this.doc.clientID ]) - ), ag( + ), og( this.bcChannel, Vn(i), this @@ -25550,24 +25550,24 @@ class Vne extends YT { } disconnectBc() { const e = Ys(); - rr(e, Ig), ci( + rr(e, $g), ci( e, zy(this.awareness, [ this.doc.clientID ], /* @__PURE__ */ new Map()) - ), a6(this, Vn(e)), this.bcconnected && (WAe(this.bcChannel, this._bcSubscriber), this.bcconnected = !1); + ), c6(this, Vn(e)), this.bcconnected && (ZAe(this.bcChannel, this._bcSubscriber), this.bcconnected = !1); } disconnect() { this.shouldConnect = !1, this.disconnectBc(), this.ws !== null && this.ws.close(); } connect() { - this.shouldConnect = !0, !this.wsconnected && this.ws === null && (Une(this), this.connectBc()); + this.shouldConnect = !0, !this.wsconnected && this.ws === null && (qne(this), this.connectBc()); } } -const n7e = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), Q2 = $t.define({ +const o7e = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), Q2 = $t.define({ combine: (t) => t[t.length - 1], static: !0 -}), qne = or.define(), i7e = hn.fromClass(class { +}), Wne = or.define(), l7e = hn.fromClass(class { constructor(t) { this.decorations = this.colorEditorLines(t); } @@ -25604,27 +25604,27 @@ const n7e = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent }); } update(t) { - (t.docChanged || t.viewportChanged || t.transactions.some((e) => e.effects.some((r) => r.is(qne)))) && (t.transactions.filter(n7e).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ - effects: s9.of(null) + (t.docChanged || t.viewportChanged || t.transactions.some((e) => e.effects.some((r) => r.is(Wne)))) && (t.transactions.filter(o7e).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ + effects: l9.of(null) }), t.view.dom.querySelectorAll(".cm-line").forEach((e) => { e.onmouseenter = (r) => t.view.dispatch({ - effects: s9.of(parseInt(r.target.dataset.lineNumber)) + effects: l9.of(parseInt(r.target.dataset.lineNumber)) }); }); } }, { decorations: (t) => t.decorations -}), s9 = or.define(), jk = Xn.define({ +}), l9 = or.define(), jk = Xn.define({ create() { return null; }, update(t, e) { var i; - const r = e.state.facet(Q2), n = (i = e.effects.find((s) => s.is(s9))) == null ? void 0 : i.value; + const r = e.state.facet(Q2), n = (i = e.effects.find((s) => s.is(l9))) == null ? void 0 : i.value; return n ? r.firstLineOfSection(n) : null; } }); -class mU extends ul { +class yU extends ul { constructor(e, r) { super(), r && e && (this.lineNumber = r.state.doc.lineAt(e.to).number, this.lineAuthors = r.state.facet(Q2), this.selectedLine = r.state.facet(jk)); } @@ -25639,11 +25639,11 @@ class mU extends ul { return this.selectedLine && this.selectedLine == this.lineNumber ? this.authorAvatar() : document.createElement("div"); } } -const s7e = IT({ - lineMarker: (t, e) => new mU(e, t), +const c7e = $T({ + lineMarker: (t, e) => new yU(e, t), lineMarkerChange: (t) => t.startState.field(jk) != t.state.field(jk), - initialSpacer: () => new mU(null, null) -}), a7e = (t) => [Q2.of(t), jk.init(null), s7e, i7e], mp = Jt.button` + initialSpacer: () => new yU(null, null) +}), u7e = (t) => [Q2.of(t), jk.init(null), c7e, l7e], vp = Jt.button` &:focus { outline: 0 !important; } @@ -25672,11 +25672,11 @@ const s7e = IT({ } `; or.define(); -const Yne = new fp(); -function o7e(t) { +const Gne = new dp(); +function h7e(t) { return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -function l7e({ +function f7e({ commentId: t, text: e, color: r @@ -25689,7 +25689,7 @@ function l7e({ break; let s = e.slice(0, i), a = ""; s.includes("->") && (a = s.slice(s.indexOf("->") + 2).trimStart(), s = s.slice(0, s.indexOf("->")).trimEnd()), s.length !== 0 && n.push({ - targetRegexSrc: `(?<=^|[ \\t\\r\\.]|\\W)${o7e(s)}(?=$|[\\s\\.]|\\W)`, + targetRegexSrc: `(?<=^|[ \\t\\r\\.]|\\W)${h7e(s)}(?=$|[\\s\\.]|\\W)`, targetRegexFlags: "gm", id: t, cssClass: "cm-suggestion", @@ -25699,7 +25699,7 @@ function l7e({ } return n; } -function c7e({ +function d7e({ builder: t, from: e, match: r, @@ -25712,7 +25712,7 @@ function c7e({ }), n.replacement) return i.class += " replaced", () => { t.add(e + r.index + r[0].length, e + r.index + r[0].length, It.widget({ - widget: new u7e({ + widget: new p7e({ text: n.replacement, color: n.color, from: e + r.index, @@ -25722,7 +25722,7 @@ function c7e({ })); }; } -class u7e extends uo { +class p7e extends uo { constructor({ text: e, color: r, @@ -25745,7 +25745,7 @@ class u7e extends uo { }), e; } } -function h7e(t, e, r) { +function g7e(t, e, r) { const n = r.current.querySelector(".myst-add-suggestion"), i = t.state.selection.main, s = i.head === i.anchor, a = t.state.doc.lineAt(i.head).number !== t.state.doc.lineAt(i.anchor).number; if (!t.selectionSet || s || a) { n.style.display = "none"; @@ -25779,11 +25779,11 @@ function h7e(t, e, r) { const w = await e.getEditorForComment(b); w.focus(), w.dispatch({ selection: je.create([je.range(w.state.doc.length - 1, w.state.doc.length - 1)]), - effects: qne.of(null) + effects: Wne.of(null) }); }; } -const f7e = Jt(mp)` +const m7e = Jt(vp)` position: absolute; z-index: 10; display: none; @@ -25812,16 +25812,16 @@ const f7e = Jt(mp)` border-top: 10px solid var(--icon-border); } `; -var d7e = Symbol.for("preact-signals"); -function rC() { - if (kf > 1) - kf--; +var v7e = Symbol.for("preact-signals"); +function nC() { + if (Sf > 1) + Sf--; else { for (var t, e = !1; Qy !== void 0; ) { var r = Qy; - for (Qy = void 0, a9++; r !== void 0; ) { + for (Qy = void 0, c9++; r !== void 0; ) { var n = r.o; - if (r.o = void 0, r.f &= -3, !(8 & r.f) && Gne(r)) + if (r.o = void 0, r.f &= -3, !(8 & r.f) && Hne(r)) try { r.c(); } catch (i) { @@ -25830,22 +25830,22 @@ function rC() { r = n; } } - if (a9 = 0, kf--, e) + if (c9 = 0, Sf--, e) throw t; } } function Sv(t) { - if (kf > 0) + if (Sf > 0) return t(); - kf++; + Sf++; try { return t(); } finally { - rC(); + nC(); } } -var dn = void 0, Qy = void 0, kf = 0, a9 = 0, Kk = 0; -function Wne(t) { +var dn = void 0, Qy = void 0, Sf = 0, c9 = 0, Kk = 0; +function Xne(t) { if (dn !== void 0) { var e = t.n; if (e === void 0 || e.t !== dn) @@ -25857,7 +25857,7 @@ function Wne(t) { function Rs(t) { this.v = t, this.i = 0, this.n = void 0, this.t = void 0; } -Rs.prototype.brand = d7e; +Rs.prototype.brand = v7e; Rs.prototype.h = function() { return !0; }; @@ -25872,7 +25872,7 @@ Rs.prototype.U = function(t) { }; Rs.prototype.subscribe = function(t) { var e = this; - return nC(function() { + return iC(function() { var r = e.value, n = dn; dn = void 0; try { @@ -25901,31 +25901,31 @@ Rs.prototype.peek = function() { } }; Object.defineProperty(Rs.prototype, "value", { get: function() { - var t = Wne(this); + var t = Xne(this); return t !== void 0 && (t.i = this.i), this.v; }, set: function(t) { if (t !== this.v) { - if (a9 > 100) + if (c9 > 100) throw new Error("Cycle detected"); - this.v = t, this.i++, Kk++, kf++; + this.v = t, this.i++, Kk++, Sf++; try { for (var e = this.t; e !== void 0; e = e.x) e.t.N(); } finally { - rC(); + nC(); } } } }); -function eh(t) { +function th(t) { return new Rs(t); } -function Gne(t) { +function Hne(t) { for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0; return !1; } -function Xne(t) { +function Zne(t) { for (var e = t.s; e !== void 0; e = e.n) { var r = e.S.n; if (r !== void 0 && (e.r = r), e.S.n = e, e.i = -1, e.n === void 0) { @@ -25934,34 +25934,34 @@ function Xne(t) { } } } -function Hne(t) { +function jne(t) { for (var e = t.s, r = void 0; e !== void 0; ) { var n = e.p; e.i === -1 ? (e.S.U(e), n !== void 0 && (n.n = e.n), e.n !== void 0 && (e.n.p = n)) : r = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = n; } t.s = r; } -function C1(t) { +function E1(t) { Rs.call(this, void 0), this.x = t, this.s = void 0, this.g = Kk - 1, this.f = 4; } -(C1.prototype = new Rs()).h = function() { +(E1.prototype = new Rs()).h = function() { if (this.f &= -3, 1 & this.f) return !1; if ((36 & this.f) == 32 || (this.f &= -5, this.g === Kk)) return !0; - if (this.g = Kk, this.f |= 1, this.i > 0 && !Gne(this)) + if (this.g = Kk, this.f |= 1, this.i > 0 && !Hne(this)) return this.f &= -2, !0; var t = dn; try { - Xne(this), dn = this; + Zne(this), dn = this; var e = this.x(); (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++); } catch (r) { this.v = r, this.f |= 16, this.i++; } - return dn = t, Hne(this), this.f &= -2, !0; + return dn = t, jne(this), this.f &= -2, !0; }; -C1.prototype.S = function(t) { +E1.prototype.S = function(t) { if (this.t === void 0) { this.f |= 36; for (var e = this.s; e !== void 0; e = e.n) @@ -25969,55 +25969,55 @@ C1.prototype.S = function(t) { } Rs.prototype.S.call(this, t); }; -C1.prototype.U = function(t) { +E1.prototype.U = function(t) { if (this.t !== void 0 && (Rs.prototype.U.call(this, t), this.t === void 0)) { this.f &= -33; for (var e = this.s; e !== void 0; e = e.n) e.S.U(e); } }; -C1.prototype.N = function() { +E1.prototype.N = function() { if (!(2 & this.f)) { this.f |= 6; for (var t = this.t; t !== void 0; t = t.x) t.t.N(); } }; -Object.defineProperty(C1.prototype, "value", { get: function() { +Object.defineProperty(E1.prototype, "value", { get: function() { if (1 & this.f) throw new Error("Cycle detected"); - var t = Wne(this); + var t = Xne(this); if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v; return this.v; } }); -function sP(t) { - return new C1(t); +function oP(t) { + return new E1(t); } -function Zne(t) { +function Kne(t) { var e = t.u; if (t.u = void 0, typeof e == "function") { - kf++; + Sf++; var r = dn; dn = void 0; try { e(); } catch (n) { - throw t.f &= -2, t.f |= 8, aP(t), n; + throw t.f &= -2, t.f |= 8, lP(t), n; } finally { - dn = r, rC(); + dn = r, nC(); } } } -function aP(t) { +function lP(t) { for (var e = t.s; e !== void 0; e = e.n) e.S.U(e); - t.x = void 0, t.s = void 0, Zne(t); + t.x = void 0, t.s = void 0, Kne(t); } -function p7e(t) { +function y7e(t) { if (dn !== this) throw new Error("Out-of-order effect"); - Hne(this), dn = t, this.f &= -2, 8 & this.f && aP(this), rC(); + jne(this), dn = t, this.f &= -2, 8 & this.f && lP(this), nC(); } function Hx(t) { this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32; @@ -26036,17 +26036,17 @@ Hx.prototype.c = function() { Hx.prototype.S = function() { if (1 & this.f) throw new Error("Cycle detected"); - this.f |= 1, this.f &= -9, Zne(this), Xne(this), kf++; + this.f |= 1, this.f &= -9, Kne(this), Zne(this), Sf++; var t = dn; - return dn = this, p7e.bind(this, t); + return dn = this, y7e.bind(this, t); }; Hx.prototype.N = function() { 2 & this.f || (this.f |= 2, this.o = Qy, Qy = this); }; Hx.prototype.d = function() { - this.f |= 8, 1 & this.f || aP(this); + this.f |= 8, 1 & this.f || lP(this); }; -function nC(t) { +function iC(t) { var e = new Hx(t); try { e.c(); @@ -26055,15 +26055,15 @@ function nC(t) { } return e.d.bind(e); } -var iC, o6; -function E1(t, e) { +var sC, u6; +function _1(t, e) { Ut[t] = e.bind(null, Ut[t] || function() { }); } function Jk(t) { - o6 && o6(), o6 = t && t.S(); + u6 && u6(), u6 = t && t.S(); } -function jne(t) { +function Jne(t) { var e = this, r = t.data, n = xa(r); n.value = r; var i = vi(function() { @@ -26074,19 +26074,19 @@ function jne(t) { } return e.__$u.c = function() { var a; - !Aj(i.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = i.peek() : (e.__$f |= 1, e.setState({})); - }, sP(function() { + !Rj(i.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = i.peek() : (e.__$f |= 1, e.setState({})); + }, oP(function() { var a = n.value.value; return a === 0 ? 0 : a === !0 ? "" : a || ""; }); }, []); return i.value; } -jne.displayName = "_st"; -Object.defineProperties(Rs.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: jne }, props: { configurable: !0, get: function() { +Jne.displayName = "_st"; +Object.defineProperties(Rs.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Jne }, props: { configurable: !0, get: function() { return { data: this }; } }, __b: { configurable: !0, value: 1 } }); -E1("__b", function(t, e) { +_1("__b", function(t, e) { if (typeof e.type == "string") { var r, n = e.props; for (var i in n) @@ -26097,23 +26097,23 @@ E1("__b", function(t, e) { } t(e); }); -E1("__r", function(t, e) { +_1("__r", function(t, e) { Jk(); var r, n = e.__c; n && (n.__$f &= -2, (r = n.__$u) === void 0 && (n.__$u = r = function(i) { var s; - return nC(function() { + return iC(function() { s = this; }), s.c = function() { n.__$f |= 1, n.setState({}); }, s; - }())), iC = n, Jk(r), t(e); + }())), sC = n, Jk(r), t(e); }); -E1("__e", function(t, e, r, n) { - Jk(), iC = void 0, t(e, r, n); +_1("__e", function(t, e, r, n) { + Jk(), sC = void 0, t(e, r, n); }); -E1("diffed", function(t, e) { - Jk(), iC = void 0; +_1("diffed", function(t, e) { + Jk(), sC = void 0; var r; if (typeof e.type == "string" && (r = e.__e)) { var n = e.__np, i = e.props; @@ -26128,22 +26128,22 @@ E1("diffed", function(t, e) { r.U = s = {}; for (var l in n) { var u = s[l], h = n[l]; - u === void 0 ? (u = g7e(r, l, h, i), s[l] = u) : u.o(h, i); + u === void 0 ? (u = b7e(r, l, h, i), s[l] = u) : u.o(h, i); } } } t(e); }); -function g7e(t, e, r, n) { - var i = e in t && t.ownerSVGElement === void 0, s = eh(r); +function b7e(t, e, r, n) { + var i = e in t && t.ownerSVGElement === void 0, s = th(r); return { o: function(a, o) { s.value = a, n = o; - }, d: nC(function() { + }, d: iC(function() { var a = s.value.value; n[e] !== a && (n[e] = a, i ? t[e] = a : a ? t.setAttribute(e, a) : t.removeAttribute(e)); }) }; } -E1("unmount", function(t, e) { +_1("unmount", function(t, e) { if (typeof e.type == "string") { var r = e.__e; if (r) { @@ -26165,7 +26165,7 @@ E1("unmount", function(t, e) { } t(e); }); -E1("__h", function(t, e, r, n) { +_1("__h", function(t, e, r, n) { (n < 3 || n === 9) && (e.__$f |= 2), t(e, r, n); }); Ul.prototype.shouldComponentUpdate = function(t, e) { @@ -26184,32 +26184,32 @@ Ul.prototype.shouldComponentUpdate = function(t, e) { }; function xa(t) { return vi(function() { - return eh(t); + return th(t); }, []); } -function $g(t) { +function Bg(t) { var e = Ss(t); - return e.current = t, iC.__$f |= 4, vi(function() { - return sP(function() { + return e.current = t, sC.__$f |= 4, vi(function() { + return oP(function() { return e.current(); }); }, []); } -function Bg(t) { +function Fg(t) { var e = Ss(t); e.current = t, ri(function() { - return nC(function() { + return iC(function() { return e.current(); }); }, []); } -const vU = co.define(), Kne = co.define(), Jne = co.define(); -class m7e { +const bU = co.define(), eie = co.define(), tie = co.define(); +class x7e { constructor(e) { this.view = e, this.conf = e.state.facet(Gx), this._observer = (r, n) => { if (n.origin !== this.conf) { - const i = [vU.of(this.conf)]; - n.local ? i.push(Jne.of(!0)) : i.push(Kne.of(!0)); + const i = [bU.of(this.conf)]; + n.local ? i.push(tie.of(!0)) : i.push(eie.of(!0)); const s = r.delta, a = []; let o = 0; for (let l = 0; l < s.length; l++) { @@ -26232,7 +26232,7 @@ class m7e { }, this._ytext = this.conf.ytext, this._ytext.observe(this._observer); } update(e) { - if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(vU) === this.conf) + if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(bU) === this.conf) return; const r = this.conf.ytext; r.doc.transact(() => { @@ -26248,8 +26248,8 @@ class m7e { this._ytext.unobserve(this._observer); } } -const v7e = hn.fromClass(m7e), y7e = () => "comment-" + Math.random().toString().replace(".", ""); -class b7e { +const w7e = hn.fromClass(x7e), O7e = () => "comment-" + Math.random().toString().replace(".", ""); +class k7e { constructor(e, r, n, i, s) { this.user = r.awareness.getLocalState().user, this.lineAuthors = e.getArray(s + "/commentLineAuthors"), this.ydoc = e, this.getAvatar = n, this.getUserUrl = i, this.commentId = s; } @@ -26267,7 +26267,7 @@ class b7e { } mark(e) { for (; e >= this.lineAuthors.length; ) - this.lineAuthors.push([new Ju()]); + this.lineAuthors.push([new eh()]); this.lineAuthors.get(e - 1).set("author", this.user); } remove(e, r) { @@ -26275,8 +26275,8 @@ class b7e { } insert(e, r) { e - 1 > this.lineAuthors.length && this.lineAuthors.push( - [...Array(e - 1 - this.lineAuthors.length).keys()].map((n) => new Ju()) - ), this.lineAuthors.insert(e - 1, [...Array(r).keys()].map((n) => new Ju([["author", this.user]]))); + [...Array(e - 1 - this.lineAuthors.length).keys()].map((n) => new eh()) + ), this.lineAuthors.insert(e - 1, [...Array(r).keys()].map((n) => new eh([["author", this.user]]))); } firstLineOfSection(e) { const r = this.get(e).name; @@ -26292,9 +26292,9 @@ class b7e { ); } } -class x7e { +class S7e { constructor(e, r) { - this.syncedPositions = e.getMap(Uy.dataPath), this.positions = eh([]), this.syncedPositions.observe(() => { + this.syncedPositions = e.getMap(Uy.dataPath), this.positions = th([]), this.syncedPositions.observe(() => { this.positions.value = [...this.syncedPositions.entries()].map(([n, i]) => ({ commentId: n, lineNumber: parseInt(i) @@ -26319,9 +26319,9 @@ class x7e { this.ydoc.transact(() => this.syncedPositions.delete(e), "comments"); } } -class w7e { +class T7e { constructor() { - this.comments = eh({}); + this.comments = th({}); } switchVisibility(e) { const r = this.isShown(e); @@ -26359,7 +26359,7 @@ class w7e { }; } } -class O7e { +class C7e { constructor(e, r) { this.user = e.awareness.getLocalState().user, this.resolvedComments = r.getMap("resolved-comments"), this.ydoc = r; } @@ -26391,9 +26391,9 @@ class O7e { this.resolvedComments.observe(() => e(this.resolved())); } } -const OB = class { +const SB = class { constructor(e, r, n, i) { - this.ydoc = e, this.provider = r, this.getAvatar = n, this.getUserUrl = i, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new x7e(e, this), this.displayManager = new w7e(r), this.commentResolver = new O7e(r, e), this.draggedComment = eh(null), this.commentWithPopup = eh(null), this.comments = sP(() => this.positions().positions.value.map(({ + this.ydoc = e, this.provider = r, this.getAvatar = n, this.getUserUrl = i, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new S7e(e, this), this.displayManager = new T7e(r), this.commentResolver = new C7e(r, e), this.draggedComment = th(null), this.commentWithPopup = th(null), this.comments = oP(() => this.positions().positions.value.map(({ commentId: s, lineNumber: a }) => ({ @@ -26408,13 +26408,13 @@ const OB = class { target: new RegExp(a.targetRegexSrc, a.targetRegexFlags) })); this.mainCodeMirror.dispatch({ - effects: Yne.reconfigure(tP(s, c7e, this.positions())), + effects: Gne.reconfigure(nP(s, d7e, this.positions())), annotations: Ei.userEvent.of("suggestion") }); }), this.positionManager.syncedPositions.observeDeep(() => this.updateMainCodeMirror()); } lineAuthors(e) { - return new b7e(this.ydoc, this.provider, this.getAvatar, this.getUserUrl, e); + return new k7e(this.ydoc, this.provider, this.getAvatar, this.getUserUrl, e); } positions() { return this.positionManager; @@ -26432,14 +26432,14 @@ const OB = class { return this.mainCodeMirror.dom.querySelector(".cm-gutters").offsetWidth; } getTextForComment(e) { - return this.ydoc.getText(OB.commentsPrefix + e); + return this.ydoc.getText(SB.commentsPrefix + e); } delText(e) { let r = this.getTextForComment(e); r != null && r.parent && r.delete(); } newComment(e) { - const r = y7e(); + const r = O7e(); return this.positions().set(r, e.toString()), this.display().new(r), this.lineAuthors(r).mark(1), this.newLocalComment = !0, r; } deleteComment(e) { @@ -26490,12 +26490,12 @@ const OB = class { e.includes(r) || (this.display().del(r), this.suggestions.set(r, [])); } syncFoldedComments(e) { - if (!TL(e)) + if (!EL(e)) return; - const r = e.transactions[0].effects[0].is(uh), { + const r = e.transactions[0].effects[0].is(hh), { from: n, to: i - } = e.transactions[0].effects[0].value, s = e.state.doc.lineAt(n).number, a = e.state.doc.lineAt(i).number, o = p5e(e.state).iter(0), l = []; + } = e.transactions[0].effects[0].value, s = e.state.doc.lineAt(n).number, a = e.state.doc.lineAt(i).number, o = y5e(e.state).iter(0), l = []; for (let u = o; u.value != null; o.next()) (u.from != n || u.to != i) && l.push({ fromLine: e.state.doc.lineAt(u.from).number, @@ -26526,7 +26526,7 @@ const OB = class { color: (h = (u = s.get(l + 1)) == null ? void 0 : u.color) != null ? h : "#111" }; }); - r[n] = a.flatMap(l7e); + r[n] = a.flatMap(f7e); } this.suggestions.doc.transact(() => { for (const [n, i] of Object.entries(r)) @@ -26539,7 +26539,7 @@ const OB = class { }) : console.warn("[YComments] Failed to update the main CodeMirror instance since it doesn't exist."); } syncResolvedComments(e) { - const r = !e.docChanged || e.transactions.some((s) => s.annotation(Kne)), n = e.transactions.some((s) => s.effects.some((a) => a.is(U2))); + const r = !e.docChanged || e.transactions.some((s) => s.annotation(eie)), n = e.transactions.some((s) => s.effects.some((a) => a.is(U2))); if (r && !n) return; const i = this.resolver().resolved(); @@ -26623,13 +26623,13 @@ const OB = class { }; } }; -let Uy = OB; -Mr(Uy, "commentsPrefix", "comments/"); -const sC = $t.define({ +let Uy = SB; +Cr(Uy, "commentsPrefix", "comments/"); +const aC = $t.define({ combine: (t) => t[t.length - 1], static: !0 }), U2 = or.define(); -class k7e extends uo { +class E7e extends uo { constructor(e, r, n) { super(), this.height = e, this.commentId = r, this.isShown = n; } @@ -26641,12 +26641,12 @@ class k7e extends uo { return e.id = this.commentId, e.classList = "comment-box", this.isShown || (e.classList += " comment-box-hidden"), e.style.height = this.height + "px", e; } } -const S7e = (t, e, r) => It.widget({ - widget: new k7e(t, e, r), +const _7e = (t, e, r) => It.widget({ + widget: new E7e(t, e, r), side: 1e4, inlineOrder: !1, block: r -}), T7e = (t, e) => t.lineNumber - e.lineNumber, C7e = (t) => t.docChanged || t.effects.some((e) => e.is(U2)), E7e = (t) => [(e, { +}), A7e = (t, e) => t.lineNumber - e.lineNumber, L7e = (t) => t.docChanged || t.effects.some((e) => e.is(U2)), R7e = (t) => [(e, { commentId: r, lineNumber: n, height: i, @@ -26654,13 +26654,13 @@ const S7e = (t, e, r) => It.widget({ }) => { try { const a = t.newDoc.line(n).to; - e.add(a, a, S7e(i, r, s)); + e.add(a, a, _7e(i, r, s)); } catch (a) { console.warn(a), console.warn(`An error occured when rendering comment ${r}. Comment will not be shown.`); } return e; -}, new os()], _7e = (t, e) => { - if ((t.isUserEvent("input") || t.isUserEvent("delete") || t.annotation(Jne)) && t.startState.doc.lines != t.state.doc.lines) { +}, new os()], M7e = (t, e) => { + if ((t.isUserEvent("input") || t.isUserEvent("delete") || t.annotation(tie)) && t.startState.doc.lines != t.state.doc.lines) { const r = []; e.positions().positions.value.forEach((n) => { const { @@ -26672,65 +26672,65 @@ const S7e = (t, e, r) => It.widget({ i ? e.deleteComment(n.commentId) : s != a && (r.push(n.commentId), e.positions().move(n.commentId, o, !1)); }), e.syncSuggestions(...r); } -}, A7e = Xn.define({ +}, D7e = Xn.define({ create() { return new os().finish(); }, update(t, e) { - if (C7e(e)) { - const r = e.state.facet(sC); - return _7e(e, r), r.comments.value.sort(T7e).reduce(...E7e(e)).finish(); + if (L7e(e)) { + const r = e.state.facet(aC); + return M7e(e, r), r.comments.value.sort(A7e).reduce(...R7e(e)).finish(); } return t; }, provide(t) { return kt.decorations.from(t); } -}), r0 = class extends ul { +}), n0 = class extends ul { constructor(e, r) { var n; - super(), this.gutterMarker = null, this.icon = null, r && e && (this.ycomments = r.state.facet(sC), this.lineNumber = r.state.doc.lineAt(e.to).number, this.commentId = (n = this.ycomments.findCommentOn(this.lineNumber)) == null ? void 0 : n.commentId); + super(), this.gutterMarker = null, this.icon = null, r && e && (this.ycomments = r.state.facet(aC), this.lineNumber = r.state.doc.lineAt(e.to).number, this.commentId = (n = this.ycomments.findCommentOn(this.lineNumber)) == null ? void 0 : n.commentId); } hasComments() { return Boolean(this.commentId); } createGutterMarker() { - this.gutterMarker = document.createElement("div"), this.gutterMarker.classList.add(r0.MAIN_CLASS), this.lineNumber && (this.gutterMarker.style.width = this.lineNumber.toString().length * 7 + "px", this.gutterMarker.ondrop = () => this.ycomments.moveOrMerge(this.ycomments.draggedComment.value, this.lineNumber), this.gutterMarker.ondragover = (e) => e.preventDefault()); + this.gutterMarker = document.createElement("div"), this.gutterMarker.classList.add(n0.MAIN_CLASS), this.lineNumber && (this.gutterMarker.style.width = this.lineNumber.toString().length * 7 + "px", this.gutterMarker.ondrop = () => this.ycomments.moveOrMerge(this.ycomments.draggedComment.value, this.lineNumber), this.gutterMarker.ondragover = (e) => e.preventDefault()); } createPopupIcon() { - this.icon = document.createElement("section"), this.icon.classList = r0.ICON_CLASS, !this.draggedComment && !this.commentId ? (this.icon.onmouseenter = () => this.icon.classList.add(r0.COMMENT_IMAGE_CLASS), this.icon.onmouseleave = () => this.icon.classList.remove(r0.COMMENT_IMAGE_CLASS)) : (this.icon.onclick = () => this.ycomments.display().switchVisibility(this.commentId), this.icon.onmouseenter = () => { + this.icon = document.createElement("section"), this.icon.classList = n0.ICON_CLASS, !this.draggedComment && !this.commentId ? (this.icon.onmouseenter = () => this.icon.classList.add(n0.COMMENT_IMAGE_CLASS), this.icon.onmouseleave = () => this.icon.classList.remove(n0.COMMENT_IMAGE_CLASS)) : (this.icon.onclick = () => this.ycomments.display().switchVisibility(this.commentId), this.icon.onmouseenter = () => { this.ycomments.commentWithPopup.value = this.commentId, this.ycomments.updateMainCodeMirror(); }); } markHasComments() { - this.icon.classList.add(r0.COMMENT_IMAGE_CLASS); + this.icon.classList.add(n0.COMMENT_IMAGE_CLASS); } toDOM() { return this.createGutterMarker(), this.createPopupIcon(), this.hasComments() && this.markHasComments(), this.gutterMarker.appendChild(this.icon), this.gutterMarker; } }; -let Xd = r0; -Mr(Xd, "MAIN_CLASS", "comment-gutter"), Mr(Xd, "ICON_CLASS", "comment-gutter-icon"), Mr(Xd, "COMMENT_IMAGE_CLASS", "comment-image"); -const L7e = (t, e, r) => { +let Hd = n0; +Cr(Hd, "MAIN_CLASS", "comment-gutter"), Cr(Hd, "ICON_CLASS", "comment-gutter-icon"), Cr(Hd, "COMMENT_IMAGE_CLASS", "comment-image"); +const P7e = (t, e, r) => { var s; const n = t.state.doc.lineAt(e.to).number, i = (s = r.findCommentOn(n)) == null ? void 0 : s.commentId; return i || r.newComment(n); -}, R7e = IT({ +}, N7e = $T({ lineMarker(t, e) { - return new Xd(e, t); + return new Hd(e, t); }, lineMarkerChange: (t) => t.transactions.some((e) => e.effects.some((r) => r.is(U2))), - initialSpacer: () => new Xd(null, null), + initialSpacer: () => new Hd(null, null), domEventHandlers: { click(t, e) { - let r = t.state.facet(sC.reader), n = L7e(t, e, r); + let r = t.state.facet(aC.reader), n = P7e(t, e, r); r.display().switchVisibility(n), t.dispatch({ effects: U2.of(null) }); } } -}), M7e = (t) => [sC.of(t), A7e, R7e, kt.updateListener.of((e) => t.syncComments(e))]; -class Rh { +}), I7e = (t) => [aC.of(t), D7e, N7e, kt.updateListener.of((e) => t.syncComments(e))]; +class Mh { constructor(e) { this.state = e; } @@ -26738,42 +26738,42 @@ class Rh { return []; } } -class D7e extends Rh { +class $7e extends Mh { run(e) { const r = new this.state.Token("code_inline", "code", 0); return r.content = e.content, [r]; } } -const P7e = { - raw: D7e -}, o9 = "math_inline"; -class N7e extends Rh { +const B7e = { + raw: $7e +}, u9 = "math_inline"; +class F7e extends Mh { run(e) { - const r = new this.state.Token(o9, "span", 0); + const r = new this.state.Token(u9, "span", 0); return r.attrSet("class", "math inline"), r.markup = "$", r.content = e.content, [r]; } } -function I7e(t, e) { +function z7e(t, e) { var r; - !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[o9] || (t.renderer.rules[o9] = (n, i) => { + !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[u9] || (t.renderer.rules[u9] = (n, i) => { var s, a, o; const l = (o = (a = (s = e == null ? void 0 : e.opts) === null || s === void 0 ? void 0 : s.math) === null || a === void 0 ? void 0 : a.renderer) !== null && o !== void 0 ? o : (d) => t.utils.escapeHtml(d), u = n[i], h = u.content.trim(), f = l(h, { displayMode: !1 }); return `${f}`; }); } -const $7e = { - math: N7e +const Q7e = { + math: F7e }; -function eie(t, e) { - e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", B7e), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", z7e(e.roles || {})), t.renderer.rules.role = (r, n) => { +function rie(t, e) { + e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", U7e), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", q7e(e.roles || {})), t.renderer.rules.role = (r, n) => { const i = r[n]; return `${i.meta.name}${i.content}`; - }, I7e(t, e); + }, z7e(t, e); } -function B7e(t, e) { +function U7e(t, e) { if (t.src.charCodeAt(t.pos - 1) === 92) return !1; - const r = F7e.exec(t.src.slice(t.pos)); + const r = V7e.exec(t.src.slice(t.pos)); if (r == null) return !1; const [n, i, , s] = r; @@ -26783,14 +26783,14 @@ function B7e(t, e) { } return !0; } -let l9; +let h9; try { - l9 = new RegExp("^\\{([a-zA-Z_\\-+:]{1,36})\\}(`+)(?!`)(.+?)(?]+)>$/; -class Y7e extends Rh { +const iie = /^(.+?)<([^<>]+)>$/; +class H7e extends Mh { run(e) { const r = new this.state.Token("ref_open", "a", 1), n = new this.state.Token("text", "", 0), i = new this.state.Token("ref_close", "a", -1); - return oP(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { + return cP(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { kind: V2.equation, contentFromTarget: (s) => `(${s.number})` }), [r, n, i]; } } -class W7e extends Rh { +class Z7e extends Mh { run(e) { - const r = rie.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); - return oP(this.state, { open: a, content: o, close: l }, { kind: "numref", label: i || e.content, value: s }, { + const r = iie.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); + return cP(this.state, { open: a, content: o, close: l }, { kind: "numref", label: i || e.content, value: s }, { contentFromTarget: (u) => r ? s.replace(/%s/g, String(u.number)).replace(/\{number\}/g, String(u.number)) : u.title.trim() }), [a, o, l]; } } -class G7e extends Rh { +class j7e extends Mh { run(e) { - const r = rie.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); - return oP(this.state, { open: a, content: o, close: l }, { kind: "ref", label: i || e.content, value: s }, { + const r = iie.exec(e.content), [, n, i] = r != null ? r : [], s = n == null ? void 0 : n.trim(), a = new this.state.Token("ref_open", "a", 1), o = new this.state.Token("text", "", 0), l = new this.state.Token("ref_close", "a", -1); + return cP(this.state, { open: a, content: o, close: l }, { kind: "ref", label: i || e.content, value: s }, { contentFromTarget: (u) => s || u.title }), [a, o, l]; } } -const X7e = { - eq: Y7e, - ref: G7e, - numref: W7e -}, H7e = Object.assign(Object.assign(Object.assign(Object.assign({}, P7e), U7e), $7e), X7e); +const K7e = { + eq: H7e, + ref: j7e, + numref: Z7e +}, J7e = Object.assign(Object.assign(Object.assign(Object.assign({}, B7e), W7e), Q7e), K7e); /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -function nie(t) { +function sie(t) { return typeof t > "u" || t === null; } -function Z7e(t) { +function e8e(t) { return typeof t == "object" && t !== null; } -function j7e(t) { - return Array.isArray(t) ? t : nie(t) ? [] : [t]; +function t8e(t) { + return Array.isArray(t) ? t : sie(t) ? [] : [t]; } -function K7e(t, e) { +function r8e(t, e) { var r, n, i, s; if (e) for (s = Object.keys(e), r = 0, n = s.length; r < n; r += 1) i = s[r], t[i] = e[i]; return t; } -function J7e(t, e) { +function n8e(t, e) { var r = "", n; for (n = 0; n < e; n += 1) r += t; return r; } -function e8e(t) { +function i8e(t) { return t === 0 && Number.NEGATIVE_INFINITY === 1 / t; } -var t8e = nie, r8e = Z7e, n8e = j7e, i8e = J7e, s8e = e8e, a8e = K7e, zi = { - isNothing: t8e, - isObject: r8e, - toArray: n8e, - repeat: i8e, - isNegativeZero: s8e, - extend: a8e +var s8e = sie, a8e = e8e, o8e = t8e, l8e = n8e, c8e = i8e, u8e = r8e, zi = { + isNothing: s8e, + isObject: a8e, + toArray: o8e, + repeat: l8e, + isNegativeZero: c8e, + extend: u8e }; -function iie(t, e) { +function aie(t, e) { var r = "", n = t.reason || "(unknown reason)"; return t.mark ? (t.mark.name && (r += 'in "' + t.mark.name + '" '), r += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (r += ` ` + t.mark.snippet), n + " " + r) : n; } function q2(t, e) { - Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = iie(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; + Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = aie(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; } q2.prototype = Object.create(Error.prototype); q2.prototype.constructor = q2; q2.prototype.toString = function(e) { - return this.name + ": " + iie(this, e); + return this.name + ": " + aie(this, e); }; var Oa = q2; -function l6(t, e, r, n, i) { +function h6(t, e, r, n, i) { var s = "", a = "", o = Math.floor(i / 2) - 1; return n - e > o && (s = " ... ", e = n - o + s.length), r - n > o && (a = " ...", r = n + o - a.length), { str: s + t.slice(e, r).replace(/\t/g, "\u2192") + a, pos: n - e + s.length }; } -function c6(t, e) { +function f6(t, e) { return zi.repeat(" ", e - t.length) + t; } -function o8e(t, e) { +function h8e(t, e) { if (e = Object.create(e || null), !t.buffer) return null; e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2); @@ -26994,28 +26994,28 @@ function o8e(t, e) { a < 0 && (a = n.length - 1); var o = "", l, u, h = Math.min(t.line + e.linesAfter, i.length).toString().length, f = e.maxLength - (e.indent + h + 3); for (l = 1; l <= e.linesBefore && !(a - l < 0); l++) - u = l6( + u = h6( t.buffer, n[a - l], i[a - l], t.position - (n[a] - n[a - l]), f - ), o = zi.repeat(" ", e.indent) + c6((t.line - l + 1).toString(), h) + " | " + u.str + ` + ), o = zi.repeat(" ", e.indent) + f6((t.line - l + 1).toString(), h) + " | " + u.str + ` ` + o; - for (u = l6(t.buffer, n[a], i[a], t.position, f), o += zi.repeat(" ", e.indent) + c6((t.line + 1).toString(), h) + " | " + u.str + ` + for (u = h6(t.buffer, n[a], i[a], t.position, f), o += zi.repeat(" ", e.indent) + f6((t.line + 1).toString(), h) + " | " + u.str + ` `, o += zi.repeat("-", e.indent + h + 3 + u.pos) + `^ `, l = 1; l <= e.linesAfter && !(a + l >= i.length); l++) - u = l6( + u = h6( t.buffer, n[a + l], i[a + l], t.position - (n[a] - n[a + l]), f - ), o += zi.repeat(" ", e.indent) + c6((t.line + l + 1).toString(), h) + " | " + u.str + ` + ), o += zi.repeat(" ", e.indent) + f6((t.line + l + 1).toString(), h) + " | " + u.str + ` `; return o.replace(/\n$/, ""); } -var l8e = o8e, c8e = [ +var f8e = h8e, d8e = [ "kind", "multi", "resolve", @@ -27026,12 +27026,12 @@ var l8e = o8e, c8e = [ "representName", "defaultStyle", "styleAliases" -], u8e = [ +], p8e = [ "scalar", "sequence", "mapping" ]; -function h8e(t) { +function g8e(t) { var e = {}; return t !== null && Object.keys(t).forEach(function(r) { t[r].forEach(function(n) { @@ -27039,19 +27039,19 @@ function h8e(t) { }); }), e; } -function f8e(t, e) { +function m8e(t, e) { if (e = e || {}, Object.keys(e).forEach(function(r) { - if (c8e.indexOf(r) === -1) + if (d8e.indexOf(r) === -1) throw new Oa('Unknown option "' + r + '" is met in definition of "' + t + '" YAML type.'); }), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() { return !0; }, this.construct = e.construct || function(r) { return r; - }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = h8e(e.styleAliases || null), u8e.indexOf(this.kind) === -1) + }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = g8e(e.styleAliases || null), p8e.indexOf(this.kind) === -1) throw new Oa('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.'); } -var Cs = f8e; -function wU(t, e) { +var Cs = m8e; +function kU(t, e) { var r = []; return t[e].forEach(function(n) { var i = r.length; @@ -27060,7 +27060,7 @@ function wU(t, e) { }), r[i] = n; }), r; } -function d8e() { +function v8e() { var t = { scalar: {}, sequence: {}, @@ -27080,10 +27080,10 @@ function d8e() { arguments[e].forEach(n); return t; } -function c9(t) { +function f9(t) { return this.extend(t); } -c9.prototype.extend = function(e) { +f9.prototype.extend = function(e) { var r = [], n = []; if (e instanceof Cs) n.push(e); @@ -27104,48 +27104,48 @@ c9.prototype.extend = function(e) { if (!(s instanceof Cs)) throw new Oa("Specified list of YAML types (or a single Type object) contains a non-Type object."); }); - var i = Object.create(c9.prototype); - return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = wU(i, "implicit"), i.compiledExplicit = wU(i, "explicit"), i.compiledTypeMap = d8e(i.compiledImplicit, i.compiledExplicit), i; + var i = Object.create(f9.prototype); + return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = kU(i, "implicit"), i.compiledExplicit = kU(i, "explicit"), i.compiledTypeMap = v8e(i.compiledImplicit, i.compiledExplicit), i; }; -var sie = c9, aie = new Cs("tag:yaml.org,2002:str", { +var oie = f9, lie = new Cs("tag:yaml.org,2002:str", { kind: "scalar", construct: function(t) { return t !== null ? t : ""; } -}), oie = new Cs("tag:yaml.org,2002:seq", { +}), cie = new Cs("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(t) { return t !== null ? t : []; } -}), lie = new Cs("tag:yaml.org,2002:map", { +}), uie = new Cs("tag:yaml.org,2002:map", { kind: "mapping", construct: function(t) { return t !== null ? t : {}; } -}), cie = new sie({ +}), hie = new oie({ explicit: [ - aie, - oie, - lie + lie, + cie, + uie ] }); -function p8e(t) { +function y8e(t) { if (t === null) return !0; var e = t.length; return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL"); } -function g8e() { +function b8e() { return null; } -function m8e(t) { +function x8e(t) { return t === null; } -var uie = new Cs("tag:yaml.org,2002:null", { +var fie = new Cs("tag:yaml.org,2002:null", { kind: "scalar", - resolve: p8e, - construct: g8e, - predicate: m8e, + resolve: y8e, + construct: b8e, + predicate: x8e, represent: { canonical: function() { return "~"; @@ -27165,23 +27165,23 @@ var uie = new Cs("tag:yaml.org,2002:null", { }, defaultStyle: "lowercase" }); -function v8e(t) { +function w8e(t) { if (t === null) return !1; var e = t.length; return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE"); } -function y8e(t) { +function O8e(t) { return t === "true" || t === "True" || t === "TRUE"; } -function b8e(t) { +function k8e(t) { return Object.prototype.toString.call(t) === "[object Boolean]"; } -var hie = new Cs("tag:yaml.org,2002:bool", { +var die = new Cs("tag:yaml.org,2002:bool", { kind: "scalar", - resolve: v8e, - construct: y8e, - predicate: b8e, + resolve: w8e, + construct: O8e, + predicate: k8e, represent: { lowercase: function(t) { return t ? "true" : "false"; @@ -27195,16 +27195,16 @@ var hie = new Cs("tag:yaml.org,2002:bool", { }, defaultStyle: "lowercase" }); -function x8e(t) { +function S8e(t) { return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102; } -function w8e(t) { +function T8e(t) { return 48 <= t && t <= 55; } -function O8e(t) { +function C8e(t) { return 48 <= t && t <= 57; } -function k8e(t) { +function E8e(t) { if (t === null) return !1; var e = t.length, r = 0, n = !1, i; @@ -27225,7 +27225,7 @@ function k8e(t) { if (i === "x") { for (r++; r < e; r++) if (i = t[r], i !== "_") { - if (!x8e(t.charCodeAt(r))) + if (!S8e(t.charCodeAt(r))) return !1; n = !0; } @@ -27234,7 +27234,7 @@ function k8e(t) { if (i === "o") { for (r++; r < e; r++) if (i = t[r], i !== "_") { - if (!w8e(t.charCodeAt(r))) + if (!T8e(t.charCodeAt(r))) return !1; n = !0; } @@ -27245,13 +27245,13 @@ function k8e(t) { return !1; for (; r < e; r++) if (i = t[r], i !== "_") { - if (!O8e(t.charCodeAt(r))) + if (!C8e(t.charCodeAt(r))) return !1; n = !0; } return !(!n || i === "_"); } -function S8e(t) { +function _8e(t) { var e = t, r = 1, n; if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), n = e[0], (n === "-" || n === "+") && (n === "-" && (r = -1), e = e.slice(1), n = e[0]), e === "0") return 0; @@ -27265,14 +27265,14 @@ function S8e(t) { } return r * parseInt(e, 10); } -function T8e(t) { +function A8e(t) { return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !zi.isNegativeZero(t); } -var fie = new Cs("tag:yaml.org,2002:int", { +var pie = new Cs("tag:yaml.org,2002:int", { kind: "scalar", - resolve: k8e, - construct: S8e, - predicate: T8e, + resolve: E8e, + construct: _8e, + predicate: A8e, represent: { binary: function(t) { return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1); @@ -27294,18 +27294,18 @@ var fie = new Cs("tag:yaml.org,2002:int", { decimal: [10, "dec"], hexadecimal: [16, "hex"] } -}), C8e = new RegExp( +}), L8e = new RegExp( "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" ); -function E8e(t) { - return !(t === null || !C8e.test(t) || t[t.length - 1] === "_"); +function R8e(t) { + return !(t === null || !L8e.test(t) || t[t.length - 1] === "_"); } -function _8e(t) { +function M8e(t) { var e, r; return e = t.replace(/_/g, "").toLowerCase(), r = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : r * parseFloat(e, 10); } -var A8e = /^[-+]?[0-9]+e/; -function L8e(t, e) { +var D8e = /^[-+]?[0-9]+e/; +function P8e(t, e) { var r; if (isNaN(t)) switch (e) { @@ -27336,36 +27336,36 @@ function L8e(t, e) { } else if (zi.isNegativeZero(t)) return "-0.0"; - return r = t.toString(10), A8e.test(r) ? r.replace("e", ".e") : r; + return r = t.toString(10), D8e.test(r) ? r.replace("e", ".e") : r; } -function R8e(t) { +function N8e(t) { return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || zi.isNegativeZero(t)); } -var die = new Cs("tag:yaml.org,2002:float", { +var gie = new Cs("tag:yaml.org,2002:float", { kind: "scalar", - resolve: E8e, - construct: _8e, - predicate: R8e, - represent: L8e, + resolve: R8e, + construct: M8e, + predicate: N8e, + represent: P8e, defaultStyle: "lowercase" -}), pie = cie.extend({ +}), mie = hie.extend({ implicit: [ - uie, - hie, fie, - die + die, + pie, + gie ] -}), gie = pie, mie = new RegExp( +}), vie = mie, yie = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" -), vie = new RegExp( +), bie = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" ); -function M8e(t) { - return t === null ? !1 : mie.exec(t) !== null || vie.exec(t) !== null; +function I8e(t) { + return t === null ? !1 : yie.exec(t) !== null || bie.exec(t) !== null; } -function D8e(t) { +function $8e(t) { var e, r, n, i, s, a, o, l = 0, u = null, h, f, d; - if (e = mie.exec(t), e === null && (e = vie.exec(t)), e === null) + if (e = yie.exec(t), e === null && (e = bie.exec(t)), e === null) throw new Error("Date resolve error"); if (r = +e[1], n = +e[2] - 1, i = +e[3], !e[4]) return new Date(Date.UTC(r, n, i)); @@ -27376,28 +27376,28 @@ function D8e(t) { } return e[9] && (h = +e[10], f = +(e[11] || 0), u = (h * 60 + f) * 6e4, e[9] === "-" && (u = -u)), d = new Date(Date.UTC(r, n, i, s, a, o, l)), u && d.setTime(d.getTime() - u), d; } -function P8e(t) { +function B8e(t) { return t.toISOString(); } -var yie = new Cs("tag:yaml.org,2002:timestamp", { +var xie = new Cs("tag:yaml.org,2002:timestamp", { kind: "scalar", - resolve: M8e, - construct: D8e, + resolve: I8e, + construct: $8e, instanceOf: Date, - represent: P8e + represent: B8e }); -function N8e(t) { +function F8e(t) { return t === "<<" || t === null; } -var bie = new Cs("tag:yaml.org,2002:merge", { +var wie = new Cs("tag:yaml.org,2002:merge", { kind: "scalar", - resolve: N8e -}), lP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= + resolve: F8e +}), uP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`; -function I8e(t) { +function z8e(t) { if (t === null) return !1; - var e, r, n = 0, i = t.length, s = lP; + var e, r, n = 0, i = t.length, s = uP; for (r = 0; r < i; r++) if (e = s.indexOf(t.charAt(r)), !(e > 64)) { if (e < 0) @@ -27406,37 +27406,37 @@ function I8e(t) { } return n % 8 === 0; } -function $8e(t) { - var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = lP, a = 0, o = []; +function Q8e(t) { + var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = uP, a = 0, o = []; for (e = 0; e < i; e++) e % 4 === 0 && e && (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)), a = a << 6 | s.indexOf(n.charAt(e)); return r = i % 4 * 6, r === 0 ? (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)) : r === 18 ? (o.push(a >> 10 & 255), o.push(a >> 2 & 255)) : r === 12 && o.push(a >> 4 & 255), new Uint8Array(o); } -function B8e(t) { - var e = "", r = 0, n, i, s = t.length, a = lP; +function U8e(t) { + var e = "", r = 0, n, i, s = t.length, a = uP; for (n = 0; n < s; n++) n % 3 === 0 && n && (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]), r = (r << 8) + t[n]; return i = s % 3, i === 0 ? (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]) : i === 2 ? (e += a[r >> 10 & 63], e += a[r >> 4 & 63], e += a[r << 2 & 63], e += a[64]) : i === 1 && (e += a[r >> 2 & 63], e += a[r << 4 & 63], e += a[64], e += a[64]), e; } -function F8e(t) { +function V8e(t) { return Object.prototype.toString.call(t) === "[object Uint8Array]"; } -var xie = new Cs("tag:yaml.org,2002:binary", { +var Oie = new Cs("tag:yaml.org,2002:binary", { kind: "scalar", - resolve: I8e, - construct: $8e, - predicate: F8e, - represent: B8e -}), z8e = Object.prototype.hasOwnProperty, Q8e = Object.prototype.toString; -function U8e(t) { + resolve: z8e, + construct: Q8e, + predicate: V8e, + represent: U8e +}), q8e = Object.prototype.hasOwnProperty, Y8e = Object.prototype.toString; +function W8e(t) { if (t === null) return !0; var e = [], r, n, i, s, a, o = t; for (r = 0, n = o.length; r < n; r += 1) { - if (i = o[r], a = !1, Q8e.call(i) !== "[object Object]") + if (i = o[r], a = !1, Y8e.call(i) !== "[object Object]") return !1; for (s in i) - if (z8e.call(i, s)) + if (q8e.call(i, s)) if (!a) a = !0; else @@ -27450,26 +27450,26 @@ function U8e(t) { } return !0; } -function V8e(t) { +function G8e(t) { return t !== null ? t : []; } -var wie = new Cs("tag:yaml.org,2002:omap", { +var kie = new Cs("tag:yaml.org,2002:omap", { kind: "sequence", - resolve: U8e, - construct: V8e -}), q8e = Object.prototype.toString; -function Y8e(t) { + resolve: W8e, + construct: G8e +}), X8e = Object.prototype.toString; +function H8e(t) { if (t === null) return !0; var e, r, n, i, s, a = t; for (s = new Array(a.length), e = 0, r = a.length; e < r; e += 1) { - if (n = a[e], q8e.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1)) + if (n = a[e], X8e.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1)) return !1; s[e] = [i[0], n[i[0]]]; } return !0; } -function W8e(t) { +function Z8e(t) { if (t === null) return []; var e, r, n, i, s, a = t; @@ -27477,81 +27477,81 @@ function W8e(t) { n = a[e], i = Object.keys(n), s[e] = [i[0], n[i[0]]]; return s; } -var Oie = new Cs("tag:yaml.org,2002:pairs", { +var Sie = new Cs("tag:yaml.org,2002:pairs", { kind: "sequence", - resolve: Y8e, - construct: W8e -}), G8e = Object.prototype.hasOwnProperty; -function X8e(t) { + resolve: H8e, + construct: Z8e +}), j8e = Object.prototype.hasOwnProperty; +function K8e(t) { if (t === null) return !0; var e, r = t; for (e in r) - if (G8e.call(r, e) && r[e] !== null) + if (j8e.call(r, e) && r[e] !== null) return !1; return !0; } -function H8e(t) { +function J8e(t) { return t !== null ? t : {}; } -var kie = new Cs("tag:yaml.org,2002:set", { +var Tie = new Cs("tag:yaml.org,2002:set", { kind: "mapping", - resolve: X8e, - construct: H8e -}), cP = gie.extend({ + resolve: K8e, + construct: J8e +}), hP = vie.extend({ implicit: [ - yie, - bie + xie, + wie ], explicit: [ - xie, - wie, Oie, - kie + kie, + Sie, + Tie ] -}), Vf = Object.prototype.hasOwnProperty, e3 = 1, Sie = 2, Tie = 3, t3 = 4, u6 = 1, Z8e = 2, OU = 3, j8e = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, K8e = /[\x85\u2028\u2029]/, J8e = /[,\[\]\{\}]/, Cie = /^(?:!|!!|![a-z\-]+!)$/i, Eie = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; -function kU(t) { +}), qf = Object.prototype.hasOwnProperty, e3 = 1, Cie = 2, Eie = 3, t3 = 4, d6 = 1, e9e = 2, SU = 3, t9e = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, r9e = /[\x85\u2028\u2029]/, n9e = /[,\[\]\{\}]/, _ie = /^(?:!|!!|![a-z\-]+!)$/i, Aie = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function TU(t) { return Object.prototype.toString.call(t); } function tu(t) { return t === 10 || t === 13; } -function O0(t) { +function k0(t) { return t === 9 || t === 32; } function ro(t) { return t === 9 || t === 32 || t === 10 || t === 13; } -function gg(t) { +function mg(t) { return t === 44 || t === 91 || t === 93 || t === 123 || t === 125; } -function e9e(t) { +function i9e(t) { var e; return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1); } -function t9e(t) { +function s9e(t) { return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0; } -function r9e(t) { +function a9e(t) { return 48 <= t && t <= 57 ? t - 48 : -1; } -function SU(t) { +function CU(t) { return t === 48 ? "\0" : t === 97 ? "\x07" : t === 98 ? "\b" : t === 116 || t === 9 ? " " : t === 110 ? ` ` : t === 118 ? "\v" : t === 102 ? "\f" : t === 114 ? "\r" : t === 101 ? "\x1B" : t === 32 ? " " : t === 34 ? '"' : t === 47 ? "/" : t === 92 ? "\\" : t === 78 ? "\x85" : t === 95 ? "\xA0" : t === 76 ? "\u2028" : t === 80 ? "\u2029" : ""; } -function n9e(t) { +function o9e(t) { return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode( (t - 65536 >> 10) + 55296, (t - 65536 & 1023) + 56320 ); } -var _ie = new Array(256), Aie = new Array(256); -for (var qp = 0; qp < 256; qp++) - _ie[qp] = SU(qp) ? 1 : 0, Aie[qp] = SU(qp); -function i9e(t, e) { - this.input = t, this.filename = e.filename || null, this.schema = e.schema || cP, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; +var Lie = new Array(256), Rie = new Array(256); +for (var Yp = 0; Yp < 256; Yp++) + Lie[Yp] = CU(Yp) ? 1 : 0, Rie[Yp] = CU(Yp); +function l9e(t, e) { + this.input = t, this.filename = e.filename || null, this.schema = e.schema || hP, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; } -function Lie(t, e) { +function Mie(t, e) { var r = { name: t.filename, buffer: t.input.slice(0, -1), @@ -27559,22 +27559,22 @@ function Lie(t, e) { line: t.line, column: t.position - t.lineStart }; - return r.snippet = l8e(r), new Oa(e, r); + return r.snippet = f8e(r), new Oa(e, r); } function jt(t, e) { - throw Lie(t, e); + throw Mie(t, e); } function r3(t, e) { - t.onWarning && t.onWarning.call(null, Lie(t, e)); + t.onWarning && t.onWarning.call(null, Mie(t, e)); } -var TU = { +var EU = { YAML: function(e, r, n) { var i, s, a; e.version !== null && jt(e, "duplication of %YAML directive"), n.length !== 1 && jt(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && jt(e, "ill-formed argument of the YAML directive"), s = parseInt(i[1], 10), a = parseInt(i[2], 10), s !== 1 && jt(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && r3(e, "unsupported YAML version of the document"); }, TAG: function(e, r, n) { var i, s; - n.length !== 2 && jt(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], Cie.test(i) || jt(e, "ill-formed tag handle (first argument) of the TAG directive"), Vf.call(e.tagMap, i) && jt(e, 'there is a previously declared suffix for "' + i + '" tag handle'), Eie.test(s) || jt(e, "ill-formed tag prefix (second argument) of the TAG directive"); + n.length !== 2 && jt(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], _ie.test(i) || jt(e, "ill-formed tag handle (first argument) of the TAG directive"), qf.call(e.tagMap, i) && jt(e, 'there is a previously declared suffix for "' + i + '" tag handle'), Aie.test(s) || jt(e, "ill-formed tag prefix (second argument) of the TAG directive"); try { s = decodeURIComponent(s); } catch { @@ -27583,35 +27583,35 @@ var TU = { e.tagMap[i] = s; } }; -function Sf(t, e, r, n) { +function Tf(t, e, r, n) { var i, s, a, o; if (e < r) { if (o = t.input.slice(e, r), n) for (i = 0, s = o.length; i < s; i += 1) a = o.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || jt(t, "expected valid JSON character"); else - j8e.test(o) && jt(t, "the stream contains non-printable characters"); + t9e.test(o) && jt(t, "the stream contains non-printable characters"); t.result += o; } } -function CU(t, e, r, n) { +function _U(t, e, r, n) { var i, s, a, o; for (zi.isObject(r) || jt(t, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(r), a = 0, o = i.length; a < o; a += 1) - s = i[a], Vf.call(e, s) || (e[s] = r[s], n[s] = !0); + s = i[a], qf.call(e, s) || (e[s] = r[s], n[s] = !0); } -function mg(t, e, r, n, i, s, a, o, l) { +function vg(t, e, r, n, i, s, a, o, l) { var u, h; if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), u = 0, h = i.length; u < h; u += 1) - Array.isArray(i[u]) && jt(t, "nested arrays are not supported inside keys"), typeof i == "object" && kU(i[u]) === "[object Object]" && (i[u] = "[object Object]"); - if (typeof i == "object" && kU(i) === "[object Object]" && (i = "[object Object]"), i = String(i), e === null && (e = {}), n === "tag:yaml.org,2002:merge") + Array.isArray(i[u]) && jt(t, "nested arrays are not supported inside keys"), typeof i == "object" && TU(i[u]) === "[object Object]" && (i[u] = "[object Object]"); + if (typeof i == "object" && TU(i) === "[object Object]" && (i = "[object Object]"), i = String(i), e === null && (e = {}), n === "tag:yaml.org,2002:merge") if (Array.isArray(s)) for (u = 0, h = s.length; u < h; u += 1) - CU(t, e, s[u], r); + _U(t, e, s[u], r); else - CU(t, e, s, r); + _U(t, e, s, r); else - !t.json && !Vf.call(r, i) && Vf.call(e, i) && (t.line = a || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, jt(t, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(e, i, { + !t.json && !qf.call(r, i) && qf.call(e, i) && (t.line = a || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, jt(t, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(e, i, { configurable: !0, enumerable: !0, writable: !0, @@ -27619,47 +27619,47 @@ function mg(t, e, r, n, i, s, a, o, l) { }) : e[i] = s, delete r[i]; return e; } -function uP(t) { +function fP(t) { var e; e = t.input.charCodeAt(t.position), e === 10 ? t.position++ : e === 13 ? (t.position++, t.input.charCodeAt(t.position) === 10 && t.position++) : jt(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1; } function Ci(t, e, r) { for (var n = 0, i = t.input.charCodeAt(t.position); i !== 0; ) { - for (; O0(i); ) + for (; k0(i); ) i === 9 && t.firstTabInLine === -1 && (t.firstTabInLine = t.position), i = t.input.charCodeAt(++t.position); if (e && i === 35) do i = t.input.charCodeAt(++t.position); while (i !== 10 && i !== 13 && i !== 0); if (tu(i)) - for (uP(t), i = t.input.charCodeAt(t.position), n++, t.lineIndent = 0; i === 32; ) + for (fP(t), i = t.input.charCodeAt(t.position), n++, t.lineIndent = 0; i === 32; ) t.lineIndent++, i = t.input.charCodeAt(++t.position); else break; } return r !== -1 && n !== 0 && t.lineIndent < r && r3(t, "deficient indentation"), n; } -function oC(t) { +function lC(t) { var e = t.position, r; return r = t.input.charCodeAt(e), !!((r === 45 || r === 46) && r === t.input.charCodeAt(e + 1) && r === t.input.charCodeAt(e + 2) && (e += 3, r = t.input.charCodeAt(e), r === 0 || ro(r))); } -function hP(t, e) { +function dP(t, e) { e === 1 ? t.result += " " : e > 1 && (t.result += zi.repeat(` `, e - 1)); } -function s9e(t, e, r) { +function c9e(t, e, r) { var n, i, s, a, o, l, u, h, f = t.kind, d = t.result, p; - if (p = t.input.charCodeAt(t.position), ro(p) || gg(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = t.input.charCodeAt(t.position + 1), ro(i) || r && gg(i))) + if (p = t.input.charCodeAt(t.position), ro(p) || mg(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = t.input.charCodeAt(t.position + 1), ro(i) || r && mg(i))) return !1; for (t.kind = "scalar", t.result = "", s = a = t.position, o = !1; p !== 0; ) { if (p === 58) { - if (i = t.input.charCodeAt(t.position + 1), ro(i) || r && gg(i)) + if (i = t.input.charCodeAt(t.position + 1), ro(i) || r && mg(i)) break; } else if (p === 35) { if (n = t.input.charCodeAt(t.position - 1), ro(n)) break; } else { - if (t.position === t.lineStart && oC(t) || r && gg(p)) + if (t.position === t.lineStart && lC(t) || r && mg(p)) break; if (tu(p)) if (l = t.line, u = t.lineStart, h = t.lineIndent, Ci(t, !1, -1), t.lineIndent >= e) { @@ -27670,49 +27670,49 @@ function s9e(t, e, r) { break; } } - o && (Sf(t, s, a, !1), hP(t, t.line - l), s = a = t.position, o = !1), O0(p) || (a = t.position + 1), p = t.input.charCodeAt(++t.position); + o && (Tf(t, s, a, !1), dP(t, t.line - l), s = a = t.position, o = !1), k0(p) || (a = t.position + 1), p = t.input.charCodeAt(++t.position); } - return Sf(t, s, a, !1), t.result ? !0 : (t.kind = f, t.result = d, !1); + return Tf(t, s, a, !1), t.result ? !0 : (t.kind = f, t.result = d, !1); } -function a9e(t, e) { +function u9e(t, e) { var r, n, i; if (r = t.input.charCodeAt(t.position), r !== 39) return !1; for (t.kind = "scalar", t.result = "", t.position++, n = i = t.position; (r = t.input.charCodeAt(t.position)) !== 0; ) if (r === 39) - if (Sf(t, n, t.position, !0), r = t.input.charCodeAt(++t.position), r === 39) + if (Tf(t, n, t.position, !0), r = t.input.charCodeAt(++t.position), r === 39) n = t.position, t.position++, i = t.position; else return !0; else - tu(r) ? (Sf(t, n, i, !0), hP(t, Ci(t, !1, e)), n = i = t.position) : t.position === t.lineStart && oC(t) ? jt(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position); + tu(r) ? (Tf(t, n, i, !0), dP(t, Ci(t, !1, e)), n = i = t.position) : t.position === t.lineStart && lC(t) ? jt(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position); jt(t, "unexpected end of the stream within a single quoted scalar"); } -function o9e(t, e) { +function h9e(t, e) { var r, n, i, s, a, o; if (o = t.input.charCodeAt(t.position), o !== 34) return !1; for (t.kind = "scalar", t.result = "", t.position++, r = n = t.position; (o = t.input.charCodeAt(t.position)) !== 0; ) { if (o === 34) - return Sf(t, r, t.position, !0), t.position++, !0; + return Tf(t, r, t.position, !0), t.position++, !0; if (o === 92) { - if (Sf(t, r, t.position, !0), o = t.input.charCodeAt(++t.position), tu(o)) + if (Tf(t, r, t.position, !0), o = t.input.charCodeAt(++t.position), tu(o)) Ci(t, !1, e); - else if (o < 256 && _ie[o]) - t.result += Aie[o], t.position++; - else if ((a = t9e(o)) > 0) { + else if (o < 256 && Lie[o]) + t.result += Rie[o], t.position++; + else if ((a = s9e(o)) > 0) { for (i = a, s = 0; i > 0; i--) - o = t.input.charCodeAt(++t.position), (a = e9e(o)) >= 0 ? s = (s << 4) + a : jt(t, "expected hexadecimal character"); - t.result += n9e(s), t.position++; + o = t.input.charCodeAt(++t.position), (a = i9e(o)) >= 0 ? s = (s << 4) + a : jt(t, "expected hexadecimal character"); + t.result += o9e(s), t.position++; } else jt(t, "unknown escape sequence"); r = n = t.position; } else - tu(o) ? (Sf(t, r, n, !0), hP(t, Ci(t, !1, e)), r = n = t.position) : t.position === t.lineStart && oC(t) ? jt(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position); + tu(o) ? (Tf(t, r, n, !0), dP(t, Ci(t, !1, e)), r = n = t.position) : t.position === t.lineStart && lC(t) ? jt(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position); } jt(t, "unexpected end of the stream within a double quoted scalar"); } -function l9e(t, e) { +function f9e(t, e) { var r = !0, n, i, s, a = t.tag, o, l = t.anchor, u, h, f, d, p, g = /* @__PURE__ */ Object.create(null), m, v, y, b; if (b = t.input.charCodeAt(t.position), b === 91) h = 93, p = !1, o = []; @@ -27723,12 +27723,12 @@ function l9e(t, e) { for (t.anchor !== null && (t.anchorMap[t.anchor] = o), b = t.input.charCodeAt(++t.position); b !== 0; ) { if (Ci(t, !0, e), b = t.input.charCodeAt(t.position), b === h) return t.position++, t.tag = a, t.anchor = l, t.kind = p ? "mapping" : "sequence", t.result = o, !0; - r ? b === 44 && jt(t, "expected the node content, but found ','") : jt(t, "missed comma between flow collection entries"), v = m = y = null, f = d = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), ro(u) && (f = d = !0, t.position++, Ci(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, Sm(t, e, e3, !1, !0), v = t.tag, m = t.result, Ci(t, !0, e), b = t.input.charCodeAt(t.position), (d || t.line === n) && b === 58 && (f = !0, b = t.input.charCodeAt(++t.position), Ci(t, !0, e), Sm(t, e, e3, !1, !0), y = t.result), p ? mg(t, o, g, v, m, y, n, i, s) : f ? o.push(mg(t, null, g, v, m, y, n, i, s)) : o.push(m), Ci(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (r = !0, b = t.input.charCodeAt(++t.position)) : r = !1; + r ? b === 44 && jt(t, "expected the node content, but found ','") : jt(t, "missed comma between flow collection entries"), v = m = y = null, f = d = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), ro(u) && (f = d = !0, t.position++, Ci(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, Tm(t, e, e3, !1, !0), v = t.tag, m = t.result, Ci(t, !0, e), b = t.input.charCodeAt(t.position), (d || t.line === n) && b === 58 && (f = !0, b = t.input.charCodeAt(++t.position), Ci(t, !0, e), Tm(t, e, e3, !1, !0), y = t.result), p ? vg(t, o, g, v, m, y, n, i, s) : f ? o.push(vg(t, null, g, v, m, y, n, i, s)) : o.push(m), Ci(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (r = !0, b = t.input.charCodeAt(++t.position)) : r = !1; } jt(t, "unexpected end of the stream within a flow collection"); } -function c9e(t, e) { - var r, n, i = u6, s = !1, a = !1, o = e, l = 0, u = !1, h, f; +function d9e(t, e) { + var r, n, i = d6, s = !1, a = !1, o = e, l = 0, u = !1, h, f; if (f = t.input.charCodeAt(t.position), f === 124) n = !1; else if (f === 62) @@ -27737,44 +27737,44 @@ function c9e(t, e) { return !1; for (t.kind = "scalar", t.result = ""; f !== 0; ) if (f = t.input.charCodeAt(++t.position), f === 43 || f === 45) - u6 === i ? i = f === 43 ? OU : Z8e : jt(t, "repeat of a chomping mode identifier"); - else if ((h = r9e(f)) >= 0) + d6 === i ? i = f === 43 ? SU : e9e : jt(t, "repeat of a chomping mode identifier"); + else if ((h = a9e(f)) >= 0) h === 0 ? jt(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? jt(t, "repeat of an indentation width identifier") : (o = e + h - 1, a = !0); else break; - if (O0(f)) { + if (k0(f)) { do f = t.input.charCodeAt(++t.position); - while (O0(f)); + while (k0(f)); if (f === 35) do f = t.input.charCodeAt(++t.position); while (!tu(f) && f !== 0); } for (; f !== 0; ) { - for (uP(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!a || t.lineIndent < o) && f === 32; ) + for (fP(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!a || t.lineIndent < o) && f === 32; ) t.lineIndent++, f = t.input.charCodeAt(++t.position); if (!a && t.lineIndent > o && (o = t.lineIndent), tu(f)) { l++; continue; } if (t.lineIndent < o) { - i === OU ? t.result += zi.repeat(` -`, s ? 1 + l : l) : i === u6 && s && (t.result += ` + i === SU ? t.result += zi.repeat(` +`, s ? 1 + l : l) : i === d6 && s && (t.result += ` `); break; } - for (n ? O0(f) ? (u = !0, t.result += zi.repeat(` + for (n ? k0(f) ? (u = !0, t.result += zi.repeat(` `, s ? 1 + l : l)) : u ? (u = !1, t.result += zi.repeat(` `, l + 1)) : l === 0 ? s && (t.result += " ") : t.result += zi.repeat(` `, l) : t.result += zi.repeat(` `, s ? 1 + l : l), s = !0, a = !0, l = 0, r = t.position; !tu(f) && f !== 0; ) f = t.input.charCodeAt(++t.position); - Sf(t, r, t.position, !1); + Tf(t, r, t.position, !1); } return !0; } -function EU(t, e) { +function AU(t, e) { var r, n = t.tag, i = t.anchor, s = [], a, o = !1, l; if (t.firstTabInLine !== -1) return !1; @@ -27783,28 +27783,28 @@ function EU(t, e) { s.push(null), l = t.input.charCodeAt(t.position); continue; } - if (r = t.line, Sm(t, e, Tie, !1, !0), s.push(t.result), Ci(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0) + if (r = t.line, Tm(t, e, Eie, !1, !0), s.push(t.result), Ci(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0) jt(t, "bad indentation of a sequence entry"); else if (t.lineIndent < e) break; } return o ? (t.tag = n, t.anchor = i, t.kind = "sequence", t.result = s, !0) : !1; } -function u9e(t, e, r) { +function p9e(t, e, r) { var n, i, s, a, o, l, u = t.tag, h = t.anchor, f = {}, d = /* @__PURE__ */ Object.create(null), p = null, g = null, m = null, v = !1, y = !1, b; if (t.firstTabInLine !== -1) return !1; for (t.anchor !== null && (t.anchorMap[t.anchor] = f), b = t.input.charCodeAt(t.position); b !== 0; ) { if (!v && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, jt(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), s = t.line, (b === 63 || b === 58) && ro(n)) - b === 63 ? (v && (mg(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !0, i = !0) : v ? (v = !1, i = !0) : jt(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, b = n; + b === 63 ? (v && (vg(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !0, i = !0) : v ? (v = !1, i = !0) : jt(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, b = n; else { - if (a = t.line, o = t.lineStart, l = t.position, !Sm(t, r, Sie, !1, !0)) + if (a = t.line, o = t.lineStart, l = t.position, !Tm(t, r, Cie, !1, !0)) break; if (t.line === s) { - for (b = t.input.charCodeAt(t.position); O0(b); ) + for (b = t.input.charCodeAt(t.position); k0(b); ) b = t.input.charCodeAt(++t.position); if (b === 58) - b = t.input.charCodeAt(++t.position), ro(b) || jt(t, "a whitespace character is expected after the key-value separator within a block mapping"), v && (mg(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !1, i = !1, p = t.tag, g = t.result; + b = t.input.charCodeAt(++t.position), ro(b) || jt(t, "a whitespace character is expected after the key-value separator within a block mapping"), v && (vg(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !1, i = !1, p = t.tag, g = t.result; else if (y) jt(t, "can not read an implicit mapping pair; a colon is missed"); else @@ -27814,14 +27814,14 @@ function u9e(t, e, r) { else return t.tag = u, t.anchor = h, !0; } - if ((t.line === s || t.lineIndent > e) && (v && (a = t.line, o = t.lineStart, l = t.position), Sm(t, e, t3, !0, i) && (v ? g = t.result : m = t.result), v || (mg(t, f, d, p, g, m, a, o, l), p = g = m = null), Ci(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === s || t.lineIndent > e) && b !== 0) + if ((t.line === s || t.lineIndent > e) && (v && (a = t.line, o = t.lineStart, l = t.position), Tm(t, e, t3, !0, i) && (v ? g = t.result : m = t.result), v || (vg(t, f, d, p, g, m, a, o, l), p = g = m = null), Ci(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === s || t.lineIndent > e) && b !== 0) jt(t, "bad indentation of a mapping entry"); else if (t.lineIndent < e) break; } - return v && mg(t, f, d, p, g, null, a, o, l), y && (t.tag = u, t.anchor = h, t.kind = "mapping", t.result = f), y; + return v && vg(t, f, d, p, g, null, a, o, l), y && (t.tag = u, t.anchor = h, t.kind = "mapping", t.result = f), y; } -function h9e(t) { +function g9e(t) { var e, r = !1, n = !1, i, s, a; if (a = t.input.charCodeAt(t.position), a !== 33) return !1; @@ -27832,39 +27832,39 @@ function h9e(t) { t.position < t.length ? (s = t.input.slice(e, t.position), a = t.input.charCodeAt(++t.position)) : jt(t, "unexpected end of the stream within a verbatim tag"); } else { for (; a !== 0 && !ro(a); ) - a === 33 && (n ? jt(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), Cie.test(i) || jt(t, "named tag handle cannot contain such characters"), n = !0, e = t.position + 1)), a = t.input.charCodeAt(++t.position); - s = t.input.slice(e, t.position), J8e.test(s) && jt(t, "tag suffix cannot contain flow indicator characters"); + a === 33 && (n ? jt(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), _ie.test(i) || jt(t, "named tag handle cannot contain such characters"), n = !0, e = t.position + 1)), a = t.input.charCodeAt(++t.position); + s = t.input.slice(e, t.position), n9e.test(s) && jt(t, "tag suffix cannot contain flow indicator characters"); } - s && !Eie.test(s) && jt(t, "tag name cannot contain such characters: " + s); + s && !Aie.test(s) && jt(t, "tag name cannot contain such characters: " + s); try { s = decodeURIComponent(s); } catch { jt(t, "tag name is malformed: " + s); } - return r ? t.tag = s : Vf.call(t.tagMap, i) ? t.tag = t.tagMap[i] + s : i === "!" ? t.tag = "!" + s : i === "!!" ? t.tag = "tag:yaml.org,2002:" + s : jt(t, 'undeclared tag handle "' + i + '"'), !0; + return r ? t.tag = s : qf.call(t.tagMap, i) ? t.tag = t.tagMap[i] + s : i === "!" ? t.tag = "!" + s : i === "!!" ? t.tag = "tag:yaml.org,2002:" + s : jt(t, 'undeclared tag handle "' + i + '"'), !0; } -function f9e(t) { +function m9e(t) { var e, r; if (r = t.input.charCodeAt(t.position), r !== 38) return !1; - for (t.anchor !== null && jt(t, "duplication of an anchor property"), r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !ro(r) && !gg(r); ) + for (t.anchor !== null && jt(t, "duplication of an anchor property"), r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !ro(r) && !mg(r); ) r = t.input.charCodeAt(++t.position); return t.position === e && jt(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0; } -function d9e(t) { +function v9e(t) { var e, r, n; if (n = t.input.charCodeAt(t.position), n !== 42) return !1; - for (n = t.input.charCodeAt(++t.position), e = t.position; n !== 0 && !ro(n) && !gg(n); ) + for (n = t.input.charCodeAt(++t.position), e = t.position; n !== 0 && !ro(n) && !mg(n); ) n = t.input.charCodeAt(++t.position); - return t.position === e && jt(t, "name of an alias node must contain at least one character"), r = t.input.slice(e, t.position), Vf.call(t.anchorMap, r) || jt(t, 'unidentified alias "' + r + '"'), t.result = t.anchorMap[r], Ci(t, !0, -1), !0; + return t.position === e && jt(t, "name of an alias node must contain at least one character"), r = t.input.slice(e, t.position), qf.call(t.anchorMap, r) || jt(t, 'unidentified alias "' + r + '"'), t.result = t.anchorMap[r], Ci(t, !0, -1), !0; } -function Sm(t, e, r, n, i) { +function Tm(t, e, r, n, i) { var s, a, o, l = 1, u = !1, h = !1, f, d, p, g, m, v; - if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, s = a = o = t3 === r || Tie === r, n && Ci(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) - for (; h9e(t) || f9e(t); ) + if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, s = a = o = t3 === r || Eie === r, n && Ci(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) + for (; g9e(t) || m9e(t); ) Ci(t, !0, -1) ? (u = !0, o = s, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : o = !1; - if (o && (o = u || i), (l === 1 || t3 === r) && (e3 === r || Sie === r ? m = e : m = e + 1, v = t.position - t.lineStart, l === 1 ? o && (EU(t, v) || u9e(t, v, m)) || l9e(t, m) ? h = !0 : (a && c9e(t, m) || a9e(t, m) || o9e(t, m) ? h = !0 : d9e(t) ? (h = !0, (t.tag !== null || t.anchor !== null) && jt(t, "alias node should not have any properties")) : s9e(t, m, e3 === r) && (h = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (h = o && EU(t, v))), t.tag === null) + if (o && (o = u || i), (l === 1 || t3 === r) && (e3 === r || Cie === r ? m = e : m = e + 1, v = t.position - t.lineStart, l === 1 ? o && (AU(t, v) || p9e(t, v, m)) || f9e(t, m) ? h = !0 : (a && d9e(t, m) || u9e(t, m) || h9e(t, m) ? h = !0 : v9e(t) ? (h = !0, (t.tag !== null || t.anchor !== null) && jt(t, "alias node should not have any properties")) : c9e(t, m, e3 === r) && (h = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (h = o && AU(t, v))), t.tag === null) t.anchor !== null && (t.anchorMap[t.anchor] = t.result); else if (t.tag === "?") { for (t.result !== null && t.kind !== "scalar" && jt(t, 'unacceptable node kind for ! tag; it should be "scalar", not "' + t.kind + '"'), f = 0, d = t.implicitTypes.length; f < d; f += 1) @@ -27873,7 +27873,7 @@ function Sm(t, e, r, n, i) { break; } } else if (t.tag !== "!") { - if (Vf.call(t.typeMap[t.kind || "fallback"], t.tag)) + if (qf.call(t.typeMap[t.kind || "fallback"], t.tag)) g = t.typeMap[t.kind || "fallback"][t.tag]; else for (g = null, p = t.typeMap.multi[t.kind || "fallback"], f = 0, d = p.length; f < d; f += 1) @@ -27885,13 +27885,13 @@ function Sm(t, e, r, n, i) { } return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || h; } -function p9e(t) { +function y9e(t) { var e = t.position, r, n, i, s = !1, a; for (t.version = null, t.checkLineBreaks = t.legacy, t.tagMap = /* @__PURE__ */ Object.create(null), t.anchorMap = /* @__PURE__ */ Object.create(null); (a = t.input.charCodeAt(t.position)) !== 0 && (Ci(t, !0, -1), a = t.input.charCodeAt(t.position), !(t.lineIndent > 0 || a !== 37)); ) { for (s = !0, a = t.input.charCodeAt(++t.position), r = t.position; a !== 0 && !ro(a); ) a = t.input.charCodeAt(++t.position); for (n = t.input.slice(r, t.position), i = [], n.length < 1 && jt(t, "directive name must not be less than one character in length"); a !== 0; ) { - for (; O0(a); ) + for (; k0(a); ) a = t.input.charCodeAt(++t.position); if (a === 35) { do @@ -27905,9 +27905,9 @@ function p9e(t) { a = t.input.charCodeAt(++t.position); i.push(t.input.slice(r, t.position)); } - a !== 0 && uP(t), Vf.call(TU, n) ? TU[n](t, n, i) : r3(t, 'unknown document directive "' + n + '"'); + a !== 0 && fP(t), qf.call(EU, n) ? EU[n](t, n, i) : r3(t, 'unknown document directive "' + n + '"'); } - if (Ci(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, Ci(t, !0, -1)) : s && jt(t, "directives end mark is expected"), Sm(t, t.lineIndent - 1, t3, !1, !0), Ci(t, !0, -1), t.checkLineBreaks && K8e.test(t.input.slice(e, t.position)) && r3(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && oC(t)) { + if (Ci(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, Ci(t, !0, -1)) : s && jt(t, "directives end mark is expected"), Tm(t, t.lineIndent - 1, t3, !1, !0), Ci(t, !0, -1), t.checkLineBreaks && r9e.test(t.input.slice(e, t.position)) && r3(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && lC(t)) { t.input.charCodeAt(t.position) === 46 && (t.position += 3, Ci(t, !0, -1)); return; } @@ -27916,36 +27916,36 @@ function p9e(t) { else return; } -function Rie(t, e) { +function Die(t, e) { t = String(t), e = e || {}, t.length !== 0 && (t.charCodeAt(t.length - 1) !== 10 && t.charCodeAt(t.length - 1) !== 13 && (t += ` `), t.charCodeAt(0) === 65279 && (t = t.slice(1))); - var r = new i9e(t, e), n = t.indexOf("\0"); + var r = new l9e(t, e), n = t.indexOf("\0"); for (n !== -1 && (r.position = n, jt(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; ) r.lineIndent += 1, r.position += 1; for (; r.position < r.length - 1; ) - p9e(r); + y9e(r); return r.documents; } -function g9e(t, e, r) { +function b9e(t, e, r) { e !== null && typeof e == "object" && typeof r > "u" && (r = e, e = null); - var n = Rie(t, r); + var n = Die(t, r); if (typeof e != "function") return n; for (var i = 0, s = n.length; i < s; i += 1) e(n[i]); } -function m9e(t, e) { - var r = Rie(t, e); +function x9e(t, e) { + var r = Die(t, e); if (r.length !== 0) { if (r.length === 1) return r[0]; throw new Oa("expected a single document in the stream, but found more"); } } -var v9e = g9e, y9e = m9e, Mie = { - loadAll: v9e, - load: y9e -}, Die = Object.prototype.toString, Pie = Object.prototype.hasOwnProperty, fP = 65279, b9e = 9, Y2 = 10, x9e = 13, w9e = 32, O9e = 33, k9e = 34, u9 = 35, S9e = 37, T9e = 38, C9e = 39, E9e = 42, Nie = 44, _9e = 45, n3 = 58, A9e = 61, L9e = 62, R9e = 63, M9e = 64, Iie = 91, $ie = 93, D9e = 96, Bie = 123, P9e = 124, Fie = 125, aa = {}; +var w9e = b9e, O9e = x9e, Pie = { + loadAll: w9e, + load: O9e +}, Nie = Object.prototype.toString, Iie = Object.prototype.hasOwnProperty, pP = 65279, k9e = 9, Y2 = 10, S9e = 13, T9e = 32, C9e = 33, E9e = 34, d9 = 35, _9e = 37, A9e = 38, L9e = 39, R9e = 42, $ie = 44, M9e = 45, n3 = 58, D9e = 61, P9e = 62, N9e = 63, I9e = 64, Bie = 91, Fie = 93, $9e = 96, zie = 123, B9e = 124, Qie = 125, aa = {}; aa[0] = "\\0"; aa[7] = "\\a"; aa[8] = "\\b"; @@ -27961,7 +27961,7 @@ aa[133] = "\\N"; aa[160] = "\\_"; aa[8232] = "\\L"; aa[8233] = "\\P"; -var N9e = [ +var F9e = [ "y", "Y", "yes", @@ -27978,16 +27978,16 @@ var N9e = [ "off", "Off", "OFF" -], I9e = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; -function $9e(t, e) { +], z9e = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; +function Q9e(t, e) { var r, n, i, s, a, o, l; if (e === null) return {}; for (r = {}, n = Object.keys(e), i = 0, s = n.length; i < s; i += 1) - a = n[i], o = String(e[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = t.compiledTypeMap.fallback[a], l && Pie.call(l.styleAliases, o) && (o = l.styleAliases[o]), r[a] = o; + a = n[i], o = String(e[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = t.compiledTypeMap.fallback[a], l && Iie.call(l.styleAliases, o) && (o = l.styleAliases[o]), r[a] = o; return r; } -function B9e(t) { +function U9e(t) { var e, r, n; if (e = t.toString(16).toUpperCase(), t <= 255) r = "x", n = 2; @@ -27999,22 +27999,22 @@ function B9e(t) { throw new Oa("code point within a string may not be greater than 0xFFFFFFFF"); return "\\" + r + zi.repeat("0", n - e.length) + e; } -var F9e = 1, W2 = 2; -function z9e(t) { - this.schema = t.schema || cP, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = zi.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = $9e(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === '"' ? W2 : F9e, this.forceQuotes = t.forceQuotes || !1, this.replacer = typeof t.replacer == "function" ? t.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; +var V9e = 1, W2 = 2; +function q9e(t) { + this.schema = t.schema || hP, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = zi.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = Q9e(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === '"' ? W2 : V9e, this.forceQuotes = t.forceQuotes || !1, this.replacer = typeof t.replacer == "function" ? t.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; } -function _U(t, e) { +function LU(t, e) { for (var r = zi.repeat(" ", e), n = 0, i = -1, s = "", a, o = t.length; n < o; ) i = t.indexOf(` `, n), i === -1 ? (a = t.slice(n), n = o) : (a = t.slice(n, i + 1), n = i + 1), a.length && a !== ` ` && (s += r), s += a; return s; } -function h9(t, e) { +function p9(t, e) { return ` ` + zi.repeat(" ", t.indent * e); } -function Q9e(t, e) { +function Y9e(t, e) { var r, n, i; for (r = 0, n = t.implicitTypes.length; r < n; r += 1) if (i = t.implicitTypes[r], i.resolve(e)) @@ -28022,64 +28022,64 @@ function Q9e(t, e) { return !1; } function i3(t) { - return t === w9e || t === b9e; + return t === T9e || t === k9e; } function G2(t) { - return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== fP || 65536 <= t && t <= 1114111; + return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== pP || 65536 <= t && t <= 1114111; } -function AU(t) { - return G2(t) && t !== fP && t !== x9e && t !== Y2; +function RU(t) { + return G2(t) && t !== pP && t !== S9e && t !== Y2; } -function LU(t, e, r) { - var n = AU(t), i = n && !i3(t); - return (r ? n : n && t !== Nie && t !== Iie && t !== $ie && t !== Bie && t !== Fie) && t !== u9 && !(e === n3 && !i) || AU(e) && !i3(e) && t === u9 || e === n3 && i; +function MU(t, e, r) { + var n = RU(t), i = n && !i3(t); + return (r ? n : n && t !== $ie && t !== Bie && t !== Fie && t !== zie && t !== Qie) && t !== d9 && !(e === n3 && !i) || RU(e) && !i3(e) && t === d9 || e === n3 && i; } -function U9e(t) { - return G2(t) && t !== fP && !i3(t) && t !== _9e && t !== R9e && t !== n3 && t !== Nie && t !== Iie && t !== $ie && t !== Bie && t !== Fie && t !== u9 && t !== T9e && t !== E9e && t !== O9e && t !== P9e && t !== A9e && t !== L9e && t !== C9e && t !== k9e && t !== S9e && t !== M9e && t !== D9e; +function W9e(t) { + return G2(t) && t !== pP && !i3(t) && t !== M9e && t !== N9e && t !== n3 && t !== $ie && t !== Bie && t !== Fie && t !== zie && t !== Qie && t !== d9 && t !== A9e && t !== R9e && t !== C9e && t !== B9e && t !== D9e && t !== P9e && t !== L9e && t !== E9e && t !== _9e && t !== I9e && t !== $9e; } -function V9e(t) { +function G9e(t) { return !i3(t) && t !== n3; } function ay(t, e) { var r = t.charCodeAt(e), n; return r >= 55296 && r <= 56319 && e + 1 < t.length && (n = t.charCodeAt(e + 1), n >= 56320 && n <= 57343) ? (r - 55296) * 1024 + n - 56320 + 65536 : r; } -function zie(t) { +function Uie(t) { var e = /^\n* /; return e.test(t); } -var Qie = 1, f9 = 2, Uie = 3, Vie = 4, og = 5; -function q9e(t, e, r, n, i, s, a, o) { - var l, u = 0, h = null, f = !1, d = !1, p = n !== -1, g = -1, m = U9e(ay(t, 0)) && V9e(ay(t, t.length - 1)); +var Vie = 1, g9 = 2, qie = 3, Yie = 4, lg = 5; +function X9e(t, e, r, n, i, s, a, o) { + var l, u = 0, h = null, f = !1, d = !1, p = n !== -1, g = -1, m = W9e(ay(t, 0)) && G9e(ay(t, t.length - 1)); if (e || a) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { if (u = ay(t, l), !G2(u)) - return og; - m = m && LU(u, h, o), h = u; + return lg; + m = m && MU(u, h, o), h = u; } else { for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { if (u = ay(t, l), u === Y2) f = !0, p && (d = d || l - g - 1 > n && t[g + 1] !== " ", g = l); else if (!G2(u)) - return og; - m = m && LU(u, h, o), h = u; + return lg; + m = m && MU(u, h, o), h = u; } d = d || p && l - g - 1 > n && t[g + 1] !== " "; } - return !f && !d ? m && !a && !i(t) ? Qie : s === W2 ? og : f9 : r > 9 && zie(t) ? og : a ? s === W2 ? og : f9 : d ? Vie : Uie; + return !f && !d ? m && !a && !i(t) ? Vie : s === W2 ? lg : g9 : r > 9 && Uie(t) ? lg : a ? s === W2 ? lg : g9 : d ? Yie : qie; } -function Y9e(t, e, r, n, i) { +function H9e(t, e, r, n, i) { t.dump = function() { if (e.length === 0) return t.quotingType === W2 ? '""' : "''"; - if (!t.noCompatMode && (N9e.indexOf(e) !== -1 || I9e.test(e))) + if (!t.noCompatMode && (F9e.indexOf(e) !== -1 || z9e.test(e))) return t.quotingType === W2 ? '"' + e + '"' : "'" + e + "'"; var s = t.indent * Math.max(1, r), a = t.lineWidth === -1 ? -1 : Math.max(Math.min(t.lineWidth, 40), t.lineWidth - s), o = n || t.flowLevel > -1 && r >= t.flowLevel; function l(u) { - return Q9e(t, u); + return Y9e(t, u); } - switch (q9e( + switch (X9e( e, o, t.indent, @@ -28089,47 +28089,47 @@ function Y9e(t, e, r, n, i) { t.forceQuotes && !n, i )) { - case Qie: + case Vie: return e; - case f9: + case g9: return "'" + e.replace(/'/g, "''") + "'"; - case Uie: - return "|" + RU(e, t.indent) + MU(_U(e, s)); - case Vie: - return ">" + RU(e, t.indent) + MU(_U(W9e(e, a), s)); - case og: - return '"' + G9e(e) + '"'; + case qie: + return "|" + DU(e, t.indent) + PU(LU(e, s)); + case Yie: + return ">" + DU(e, t.indent) + PU(LU(Z9e(e, a), s)); + case lg: + return '"' + j9e(e) + '"'; default: throw new Oa("impossible error: invalid scalar style"); } }(); } -function RU(t, e) { - var r = zie(t) ? String(e) : "", n = t[t.length - 1] === ` +function DU(t, e) { + var r = Uie(t) ? String(e) : "", n = t[t.length - 1] === ` `, i = n && (t[t.length - 2] === ` ` || t === ` `), s = i ? "+" : n ? "" : "-"; return r + s + ` `; } -function MU(t) { +function PU(t) { return t[t.length - 1] === ` ` ? t.slice(0, -1) : t; } -function W9e(t, e) { +function Z9e(t, e) { for (var r = /(\n+)([^\n]*)/g, n = function() { var u = t.indexOf(` `); - return u = u !== -1 ? u : t.length, r.lastIndex = u, DU(t.slice(0, u), e); + return u = u !== -1 ? u : t.length, r.lastIndex = u, NU(t.slice(0, u), e); }(), i = t[0] === ` ` || t[0] === " ", s, a; a = r.exec(t); ) { var o = a[1], l = a[2]; s = l[0] === " ", n += o + (!i && !s && l !== "" ? ` -` : "") + DU(l, e), i = s; +` : "") + NU(l, e), i = s; } return n; } -function DU(t, e) { +function NU(t, e) { if (t === "" || t[0] === " ") return t; for (var r = / [^ ]/g, n, i = 0, s, a = 0, o = 0, l = ""; n = r.exec(t); ) @@ -28139,30 +28139,30 @@ function DU(t, e) { `, t.length - i > e && a > i ? l += t.slice(i, a) + ` ` + t.slice(a + 1) : l += t.slice(i), l.slice(1); } -function G9e(t) { +function j9e(t) { for (var e = "", r = 0, n, i = 0; i < t.length; r >= 65536 ? i += 2 : i++) - r = ay(t, i), n = aa[r], !n && G2(r) ? (e += t[i], r >= 65536 && (e += t[i + 1])) : e += n || B9e(r); + r = ay(t, i), n = aa[r], !n && G2(r) ? (e += t[i], r >= 65536 && (e += t[i + 1])) : e += n || U9e(r); return e; } -function X9e(t, e, r) { +function K9e(t, e, r) { var n = "", i = t.tag, s, a, o; for (s = 0, a = r.length; s < a; s += 1) - o = r[s], t.replacer && (o = t.replacer.call(r, String(s), o)), (fh(t, e, o, !1, !1) || typeof o > "u" && fh(t, e, null, !1, !1)) && (n !== "" && (n += "," + (t.condenseFlow ? "" : " ")), n += t.dump); + o = r[s], t.replacer && (o = t.replacer.call(r, String(s), o)), (dh(t, e, o, !1, !1) || typeof o > "u" && dh(t, e, null, !1, !1)) && (n !== "" && (n += "," + (t.condenseFlow ? "" : " ")), n += t.dump); t.tag = i, t.dump = "[" + n + "]"; } -function PU(t, e, r, n) { +function IU(t, e, r, n) { var i = "", s = t.tag, a, o, l; for (a = 0, o = r.length; a < o; a += 1) - l = r[a], t.replacer && (l = t.replacer.call(r, String(a), l)), (fh(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && fh(t, e + 1, null, !0, !0, !1, !0)) && ((!n || i !== "") && (i += h9(t, e)), t.dump && Y2 === t.dump.charCodeAt(0) ? i += "-" : i += "- ", i += t.dump); + l = r[a], t.replacer && (l = t.replacer.call(r, String(a), l)), (dh(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && dh(t, e + 1, null, !0, !0, !1, !0)) && ((!n || i !== "") && (i += p9(t, e)), t.dump && Y2 === t.dump.charCodeAt(0) ? i += "-" : i += "- ", i += t.dump); t.tag = s, t.dump = i || "[]"; } -function H9e(t, e, r) { +function J9e(t, e, r) { var n = "", i = t.tag, s = Object.keys(r), a, o, l, u, h; for (a = 0, o = s.length; a < o; a += 1) - h = "", n !== "" && (h += ", "), t.condenseFlow && (h += '"'), l = s[a], u = r[l], t.replacer && (u = t.replacer.call(r, l, u)), fh(t, e, l, !1, !1) && (t.dump.length > 1024 && (h += "? "), h += t.dump + (t.condenseFlow ? '"' : "") + ":" + (t.condenseFlow ? "" : " "), fh(t, e, u, !1, !1) && (h += t.dump, n += h)); + h = "", n !== "" && (h += ", "), t.condenseFlow && (h += '"'), l = s[a], u = r[l], t.replacer && (u = t.replacer.call(r, l, u)), dh(t, e, l, !1, !1) && (t.dump.length > 1024 && (h += "? "), h += t.dump + (t.condenseFlow ? '"' : "") + ":" + (t.condenseFlow ? "" : " "), dh(t, e, u, !1, !1) && (h += t.dump, n += h)); t.tag = i, t.dump = "{" + n + "}"; } -function Z9e(t, e, r, n) { +function eLe(t, e, r, n) { var i = "", s = t.tag, a = Object.keys(r), o, l, u, h, f, d; if (t.sortKeys === !0) a.sort(); @@ -28171,17 +28171,17 @@ function Z9e(t, e, r, n) { else if (t.sortKeys) throw new Oa("sortKeys must be a boolean or a function"); for (o = 0, l = a.length; o < l; o += 1) - d = "", (!n || i !== "") && (d += h9(t, e)), u = a[o], h = r[u], t.replacer && (h = t.replacer.call(r, u, h)), fh(t, e + 1, u, !0, !0, !0) && (f = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, f && (t.dump && Y2 === t.dump.charCodeAt(0) ? d += "?" : d += "? "), d += t.dump, f && (d += h9(t, e)), fh(t, e + 1, h, !0, f) && (t.dump && Y2 === t.dump.charCodeAt(0) ? d += ":" : d += ": ", d += t.dump, i += d)); + d = "", (!n || i !== "") && (d += p9(t, e)), u = a[o], h = r[u], t.replacer && (h = t.replacer.call(r, u, h)), dh(t, e + 1, u, !0, !0, !0) && (f = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, f && (t.dump && Y2 === t.dump.charCodeAt(0) ? d += "?" : d += "? "), d += t.dump, f && (d += p9(t, e)), dh(t, e + 1, h, !0, f) && (t.dump && Y2 === t.dump.charCodeAt(0) ? d += ":" : d += ": ", d += t.dump, i += d)); t.tag = s, t.dump = i || "{}"; } -function NU(t, e, r) { +function $U(t, e, r) { var n, i, s, a, o, l; for (i = r ? t.explicitTypes : t.implicitTypes, s = 0, a = i.length; s < a; s += 1) if (o = i[s], (o.instanceOf || o.predicate) && (!o.instanceOf || typeof e == "object" && e instanceof o.instanceOf) && (!o.predicate || o.predicate(e))) { if (r ? o.multi && o.representName ? t.tag = o.representName(e) : t.tag = o.tag : t.tag = "?", o.represent) { - if (l = t.styleMap[o.tag] || o.defaultStyle, Die.call(o.represent) === "[object Function]") + if (l = t.styleMap[o.tag] || o.defaultStyle, Nie.call(o.represent) === "[object Function]") n = o.represent(e, l); - else if (Pie.call(o.represent, l)) + else if (Iie.call(o.represent, l)) n = o.represent[l](e, l); else throw new Oa("!<" + o.tag + '> tag resolver accepts not "' + l + '" style'); @@ -28191,20 +28191,20 @@ function NU(t, e, r) { } return !1; } -function fh(t, e, r, n, i, s, a) { - t.tag = null, t.dump = r, NU(t, r, !1) || NU(t, r, !0); - var o = Die.call(t.dump), l = n, u; +function dh(t, e, r, n, i, s, a) { + t.tag = null, t.dump = r, $U(t, r, !1) || $U(t, r, !0); + var o = Nie.call(t.dump), l = n, u; n && (n = t.flowLevel < 0 || t.flowLevel > e); var h = o === "[object Object]" || o === "[object Array]", f, d; if (h && (f = t.duplicates.indexOf(r), d = f !== -1), (t.tag !== null && t.tag !== "?" || d || t.indent !== 2 && e > 0) && (i = !1), d && t.usedDuplicates[f]) t.dump = "*ref_" + f; else { if (h && d && !t.usedDuplicates[f] && (t.usedDuplicates[f] = !0), o === "[object Object]") - n && Object.keys(t.dump).length !== 0 ? (Z9e(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (H9e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); + n && Object.keys(t.dump).length !== 0 ? (eLe(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (J9e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); else if (o === "[object Array]") - n && t.dump.length !== 0 ? (t.noArrayIndent && !a && e > 0 ? PU(t, e - 1, t.dump, i) : PU(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (X9e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); + n && t.dump.length !== 0 ? (t.noArrayIndent && !a && e > 0 ? IU(t, e - 1, t.dump, i) : IU(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (K9e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); else if (o === "[object String]") - t.tag !== "?" && Y9e(t, t.dump, e, s, l); + t.tag !== "?" && H9e(t, t.dump, e, s, l); else { if (o === "[object Undefined]") return !1; @@ -28218,71 +28218,71 @@ function fh(t, e, r, n, i, s, a) { } return !0; } -function j9e(t, e) { +function tLe(t, e) { var r = [], n = [], i, s; - for (d9(t, r, n), i = 0, s = n.length; i < s; i += 1) + for (m9(t, r, n), i = 0, s = n.length; i < s; i += 1) e.duplicates.push(r[n[i]]); e.usedDuplicates = new Array(s); } -function d9(t, e, r) { +function m9(t, e, r) { var n, i, s; if (t !== null && typeof t == "object") if (i = e.indexOf(t), i !== -1) r.indexOf(i) === -1 && r.push(i); else if (e.push(t), Array.isArray(t)) for (i = 0, s = t.length; i < s; i += 1) - d9(t[i], e, r); + m9(t[i], e, r); else for (n = Object.keys(t), i = 0, s = n.length; i < s; i += 1) - d9(t[n[i]], e, r); + m9(t[n[i]], e, r); } -function K9e(t, e) { +function rLe(t, e) { e = e || {}; - var r = new z9e(e); - r.noRefs || j9e(t, r); + var r = new q9e(e); + r.noRefs || tLe(t, r); var n = t; - return r.replacer && (n = r.replacer.call({ "": n }, "", n)), fh(r, 0, n, !0, !0) ? r.dump + ` + return r.replacer && (n = r.replacer.call({ "": n }, "", n)), dh(r, 0, n, !0, !0) ? r.dump + ` ` : ""; } -var J9e = K9e, eLe = { - dump: J9e +var nLe = rLe, iLe = { + dump: nLe }; -function dP(t, e) { +function gP(t, e) { return function() { throw new Error("Function yaml." + t + " is removed in js-yaml 4. Use yaml." + e + " instead, which is now safe by default."); }; } -var tLe = Cs, rLe = sie, nLe = cie, iLe = pie, sLe = gie, aLe = cP, oLe = Mie.load, lLe = Mie.loadAll, cLe = eLe.dump, uLe = Oa, hLe = { - binary: xie, - float: die, - map: lie, - null: uie, - pairs: Oie, - set: kie, - timestamp: yie, - bool: hie, - int: fie, - merge: bie, - omap: wie, - seq: oie, - str: aie -}, fLe = dP("safeLoad", "load"), dLe = dP("safeLoadAll", "loadAll"), pLe = dP("safeDump", "dump"), gLe = { - Type: tLe, - Schema: rLe, - FAILSAFE_SCHEMA: nLe, - JSON_SCHEMA: iLe, - CORE_SCHEMA: sLe, - DEFAULT_SCHEMA: aLe, - load: oLe, - loadAll: lLe, - dump: cLe, - YAMLException: uLe, - types: hLe, - safeLoad: fLe, - safeLoadAll: dLe, - safeDump: pLe -}; -function mLe(t, e, r, n, i, s = !0) { +var sLe = Cs, aLe = oie, oLe = hie, lLe = mie, cLe = vie, uLe = hP, hLe = Pie.load, fLe = Pie.loadAll, dLe = iLe.dump, pLe = Oa, gLe = { + binary: Oie, + float: gie, + map: uie, + null: fie, + pairs: Sie, + set: Tie, + timestamp: xie, + bool: die, + int: pie, + merge: wie, + omap: kie, + seq: cie, + str: lie +}, mLe = gP("safeLoad", "load"), vLe = gP("safeLoadAll", "loadAll"), yLe = gP("safeDump", "dump"), bLe = { + Type: sLe, + Schema: aLe, + FAILSAFE_SCHEMA: oLe, + JSON_SCHEMA: lLe, + CORE_SCHEMA: cLe, + DEFAULT_SCHEMA: uLe, + load: hLe, + loadAll: fLe, + dump: dLe, + YAMLException: pLe, + types: gLe, + safeLoad: mLe, + safeLoadAll: vLe, + safeDump: yLe +}; +function xLe(t, e, r, n, i, s = !0) { const a = []; for (const l of [...t.core.ruler.__rules__].reverse()) { if (l.name === e) { @@ -28302,7 +28302,7 @@ function mLe(t, e, r, n, i, s = !0) { l.map = l.map !== null ? [l.map[0] + i, l.map[1] + i] : l.map; return o; } -class vp { +class yp { constructor(e) { this.required_arguments = 0, this.optional_arguments = 0, this.final_argument_whitespace = !1, this.has_content = !1, this.option_spec = {}, this.rawOptions = !1, this.state = e; } @@ -28322,21 +28322,21 @@ class vp { return (i == null ? void 0 : i.content) !== void 0 && (s.content = i.content), (i == null ? void 0 : i.level) !== void 0 && (s.level = i.level), (i == null ? void 0 : i.map) !== void 0 && (s.map = i.map), (i == null ? void 0 : i.block) !== void 0 && (s.block = i.block), (i == null ? void 0 : i.info) !== void 0 && (s.info = i.info), (i == null ? void 0 : i.meta) !== void 0 && (s.meta = i.meta), (i == null ? void 0 : i.children) !== void 0 && (s.children = i.children), s; } nestedParse(e, r) { - return mLe(this.state.md, "run_directives", e, this.state.env, r, !0); + return xLe(this.state.md, "run_directives", e, this.state.env, r, !0); } } -class hf extends Error { +class ff extends Error { constructor() { super(...arguments), this.name = "DirectiveParsingError"; } } -function vLe(t, e) { +function wLe(t, e) { const r = t.meta.arg || "", n = t.content; let i = n.trim() ? n.split(/\r?\n/) : [], s = 0, a = {}; - (Object.keys(e.option_spec || {}) || e.rawOptions) && ([i, a, s] = qie(i, e)); + (Object.keys(e.option_spec || {}) || e.rawOptions) && ([i, a, s] = Wie(i, e)); let o = []; - if (!e.required_arguments && !e.optional_arguments ? r && (s = 0, i = [r].concat(i)) : o = yLe(r, e), i.length && !i[0].trim() && (i.shift(), s++), i.length && !e.has_content) - throw new hf("Has content but content not allowed"); + if (!e.required_arguments && !e.optional_arguments ? r && (s = 0, i = [r].concat(i)) : o = OLe(r, e), i.length && !i[0].trim() && (i.shift(), s++), i.length && !e.has_content) + throw new ff("Has content but content not allowed"); return { map: t.map ? t.map : [0, 0], args: o, @@ -28349,7 +28349,7 @@ function vLe(t, e) { ] : [0, 0] }; } -function qie(t, e) { +function Wie(t, e) { let r = 1, n = {}, i = null; if (t.length && t[0].startsWith("---")) { r++; @@ -28379,51 +28379,51 @@ function qie(t, e) { } if (i !== null) try { - const s = gLe.load(i.join(` + const s = bLe.load(i.join(` `)); if (s !== null && typeof s == "object") n = s; else - throw new hf(`not dict: ${s}`); + throw new ff(`not dict: ${s}`); } catch (s) { - throw new hf(`Invalid options YAML: ${s}`); + throw new ff(`Invalid options YAML: ${s}`); } if (e.rawOptions) return [t, n, r]; for (const [s, a] of Object.entries(n)) { const o = e.option_spec ? e.option_spec[s] : null; if (!o) - throw new hf(`Unknown option: ${s}`); + throw new ff(`Unknown option: ${s}`); let l = a; (a === null || a === !1) && (l = ""); try { l = o(`${l || ""}`); } catch (u) { - throw new hf(`Invalid option value: (option: '${s}'; value: ${a}) + throw new ff(`Invalid option value: (option: '${s}'; value: ${a}) ${u}`); } n[s] = l; } return [t, n, r]; } -function yLe(t, e) { +function OLe(t, e) { var r; let n = t.trim() ? (r = t.trim()) === null || r === void 0 ? void 0 : r.split(/\s+/) : []; const i = (e.required_arguments || 0) + (e.optional_arguments || 0); if (n.length < (e.required_arguments || 0)) - throw new hf(`${e.required_arguments} argument(s) required, ${n.length} supplied`); + throw new ff(`${e.required_arguments} argument(s) required, ${n.length} supplied`); if (n.length > i) if (e.final_argument_whitespace) { const s = t.split(/\s+/); n = s.splice(0, i - 1), n.push(s.join(" ")); } else - throw new hf(`maximum ${i} argument(s) allowed, ${n.length} supplied`); + throw new ff(`maximum ${i} argument(s) allowed, ${n.length} supplied`); return n; } -function bLe(t, e) { +function kLe(t, e) { var r; let n = e.directivesAfter || "block"; - (!((r = e.replaceFences) !== null && r !== void 0) || r) && (t.core.ruler.after(n, "fence_to_directive", xLe), n = "fence_to_directive"), t.core.ruler.after(n, "run_directives", wLe(e.directives || {})), t.renderer.rules.directive = (i, s) => { + (!((r = e.replaceFences) !== null && r !== void 0) || r) && (t.core.ruler.after(n, "fence_to_directive", SLe), n = "fence_to_directive"), t.core.ruler.after(n, "run_directives", TLe(e.directives || {})), t.renderer.rules.directive = (i, s) => { const a = i[s]; return ` `; }; } -function xLe(t) { +function SLe(t) { for (const e of t.tokens) if (e.type === "fence" || e.type === "colon_fence") { const r = e.info.match(/^\{([^\s}]+)\}\s*(.*)$/); @@ -28450,13 +28450,13 @@ function xLe(t) { } return !0; } -function wLe(t) { +function TLe(t) { function e(r) { const n = []; for (const i of r.tokens) if (i.type === "directive" && i.info in t) try { - const s = new t[i.info](r), a = vLe(i, s), [o, l] = qie(i.content.trim() ? i.content.split(/\r?\n/) : [], s), u = new r.Token("parsed_directive_open", "", 1); + const s = new t[i.info](r), a = wLe(i, s), [o, l] = Wie(i.content.trim() ? i.content.split(/\r?\n/) : [], s), u = new r.Token("parsed_directive_open", "", 1); u.info = i.info, u.hidden = !0, u.content = o.join(` `).trim(), u.meta = { arg: i.meta.arg, @@ -28476,64 +28476,64 @@ function wLe(t) { } return e; } -function OLe(t) { +function CLe(t) { return t.toLowerCase().split(/\s+/).join("-").replace(/[^a-z0-9]+/, "-").replace(/^[-0-9]+|-+$/, ""); } -class P0 extends Error { +class N0 extends Error { constructor() { super(...arguments), this.name = "OptionSpecError"; } } -const qf = (t) => t, p9 = (t) => { +const lu = (t) => t, s3 = (t) => { if (!t) - throw new P0("Argument required but none supplied"); + throw new N0("Argument required but none supplied"); return t; -}, g9 = (t) => { +}, v9 = (t) => { if (t.trim()) - throw new P0(`No argument is allowed: "${t}" supplied`); + throw new N0(`No argument is allowed: "${t}" supplied`); return null; -}, _1 = (t) => `${t || ""}`.split(/\s+/).map((e) => OLe(e)); -function Yie(t) { +}, md = (t) => `${t || ""}`.split(/\s+/).map((e) => CLe(e)); +function Gie(t) { if (!t) - throw new P0("Value is not set"); + throw new N0("Value is not set"); const e = Number.parseFloat(t); if (Number.isNaN(e) || !Number.isInteger(e)) - throw new P0(`Value "${t}" is not an integer`); + throw new N0(`Value "${t}" is not an integer`); return e; } -function s3(t) { - const e = Yie(t); +function a3(t) { + const e = Gie(t); if (e < 0) - throw new P0(`Value "${t}" must be positive or zero`); + throw new N0(`Value "${t}" must be positive or zero`); return e; } -const Wie = (t) => t ? s3(t) : null, kLe = (t) => (t = `${t || ""}`.replace(/\s+%$/, ""), s3(t)); -function Gie(t, e) { +const Xie = (t) => t ? a3(t) : null, Hie = (t) => (t = `${t || ""}`.replace(/\s+%$/, ""), a3(t)); +function Zie(t, e) { const n = new RegExp(`^(?[0-9.]+)\\s*(?${e.join("|")})$`).exec(t); if (!n || !n.groups) - throw new P0(`not a positive measure of one of the following units: ${e.join("|")}`); + throw new N0(`not a positive measure of one of the following units: ${e.join("|")}`); return n.groups.number + n.groups.units; } -const Xie = ["em", "ex", "px", "in", "cm", "mm", "pt", "pc"], Hie = (t) => Gie(t, [...Xie, ""]), pP = (t, e = "") => { +const jie = ["em", "ex", "px", "in", "cm", "mm", "pt", "pc"], mP = (t) => Zie(t, [...jie, ""]), cC = (t, e = "") => { try { - return Gie(t, [...Xie, "%"]); + return Zie(t, [...jie, "%"]); } catch { - return Hie(t) + e; + return mP(t) + e; } -}, SLe = (t, e = "") => t.toLowerCase() === "image" ? "image" : pP(t, e); -function gP(t) { +}, Kie = (t, e = "") => t.toLowerCase() === "image" ? "image" : cC(t, e); +function uC(t) { return (e) => { if (e = e.toLowerCase().trim(), t.includes(e)) return e; - throw new P0(`must be in: ${t.join("|")}`); + throw new N0(`must be in: ${t.join("|")}`); }; } -const TLe = (t) => t; -class fc extends vp { +const ELe = (t) => t; +class fc extends yp { constructor() { super(...arguments), this.final_argument_whitespace = !0, this.has_content = !0, this.option_spec = { - class: _1, - name: qf + class: md, + name: lu }, this.title = "", this.kind = ""; } run(e) { @@ -28556,81 +28556,81 @@ class fc extends vp { return n.push(...o), n.push(this.createToken("admonition_close", "aside", -1, { block: !0 })), n; } } -class CLe extends fc { +class _Le extends fc { constructor() { super(...arguments), this.required_arguments = 1; } } -class ELe extends fc { +class ALe extends fc { constructor() { super(...arguments), this.title = "Attention", this.kind = "attention"; } } -class _Le extends fc { +class LLe extends fc { constructor() { super(...arguments), this.title = "Caution", this.kind = "caution"; } } -class ALe extends fc { +class RLe extends fc { constructor() { super(...arguments), this.title = "Danger", this.kind = "danger"; } } -class LLe extends fc { +class MLe extends fc { constructor() { super(...arguments), this.title = "Error", this.kind = "error"; } } -class RLe extends fc { +class DLe extends fc { constructor() { super(...arguments), this.title = "Important", this.kind = "important"; } } -class MLe extends fc { +class PLe extends fc { constructor() { super(...arguments), this.title = "Hint", this.kind = "hint"; } } -class DLe extends fc { +class NLe extends fc { constructor() { super(...arguments), this.title = "Note", this.kind = "note"; } } -class PLe extends fc { +class ILe extends fc { constructor() { super(...arguments), this.title = "See Also", this.kind = "seealso"; } } -class NLe extends fc { +class $Le extends fc { constructor() { super(...arguments), this.title = "Tip", this.kind = "tip"; } } -class ILe extends fc { +class BLe extends fc { constructor() { super(...arguments), this.title = "Warning", this.kind = "warning"; } } -const $Le = { - admonition: CLe, - attention: ELe, - caution: _Le, - danger: ALe, - error: LLe, - important: RLe, - hint: MLe, - note: DLe, - seealso: PLe, - tip: NLe, - warning: ILe -}; -class BLe extends vp { +const FLe = { + admonition: _Le, + attention: ALe, + caution: LLe, + danger: RLe, + error: MLe, + important: DLe, + hint: PLe, + note: NLe, + seealso: ILe, + tip: $Le, + warning: BLe +}; +class zLe extends yp { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - "number-lines": Wie, - force: g9, - name: qf, - class: _1 + "number-lines": Xie, + force: v9, + name: lu, + class: md }; } run(e) { @@ -28641,17 +28641,17 @@ class BLe extends vp { })]; } } -class FLe extends vp { +class QLe extends yp { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - linenos: g9, - "lineno-start": Yie, - dedent: Wie, - "emphasize-lines": p9, - caption: p9, - force: g9, - name: qf, - class: _1 + linenos: v9, + "lineno-start": Gie, + dedent: Xie, + "emphasize-lines": s3, + caption: s3, + force: v9, + name: lu, + class: md }; } run(e) { @@ -28662,7 +28662,7 @@ class FLe extends vp { })]; } } -class zLe extends vp { +class ULe extends yp { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.rawOptions = !0; } @@ -28674,25 +28674,25 @@ class zLe extends vp { })]; } } -const QLe = { - code: BLe, - "code-block": FLe, - "code-cell": zLe -}, Zie = { - alt: qf, - height: Hie, - width: pP, - scale: kLe, - target: p9, - class: _1, - name: qf -}; -class jie extends vp { +const VLe = { + code: zLe, + "code-block": QLe, + "code-cell": ULe +}, Jie = { + alt: lu, + height: mP, + width: cC, + scale: Hie, + target: s3, + class: md, + name: lu +}; +class ese extends yp { constructor() { - super(...arguments), this.required_arguments = 1, this.optional_arguments = 0, this.final_argument_whitespace = !0, this.option_spec = Object.assign(Object.assign({}, Zie), { align: gP(["left", "center", "right", "top", "middle", "bottom"]) }); + super(...arguments), this.required_arguments = 1, this.optional_arguments = 0, this.final_argument_whitespace = !0, this.option_spec = Object.assign(Object.assign({}, Jie), { align: uC(["left", "center", "right", "top", "middle", "bottom"]) }); } create_image(e) { - const r = TLe(e.args[0] || ""), n = this.createToken("image", "img", 0, { map: e.map, block: !0 }); + const r = ELe(e.args[0] || ""), n = this.createToken("image", "img", 0, { map: e.map, block: !0 }); n.attrSet("src", r), n.attrSet("alt", e.options.alt || ""); const i = []; return e.options.alt && this.state.md.inline.parse(e.options.alt, this.state.md, this.state.env, i), n.children = i, e.options.height && n.attrSet("height", e.options.height), e.options.width && n.attrSet("width", e.options.width), e.options.align && n.attrJoin("class", `align-${e.options.align}`), e.options.class && n.attrJoin("class", e.options.class.join(" ")), n; @@ -28701,9 +28701,9 @@ class jie extends vp { return [this.create_image(e)]; } } -class ULe extends jie { +class qLe extends ese { constructor() { - super(...arguments), this.option_spec = Object.assign(Object.assign({}, Zie), { align: gP(["left", "center", "right"]), figwidth: SLe, figclass: _1 }), this.has_content = !0; + super(...arguments), this.option_spec = Object.assign(Object.assign({}, Jie), { align: uC(["left", "center", "right"]), figwidth: Kie, figclass: md }), this.has_content = !0; } run(e) { const r = this.createToken("figure_open", "figure", 1, { @@ -28712,7 +28712,7 @@ class ULe extends jie { }); e.options.figclass && r.attrJoin("class", e.options.figclass.join(" ")), e.options.align && r.attrJoin("class", `align-${e.options.align}`), e.options.figwidth && e.options.figwidth !== "image" && r.attrSet("width", e.options.figwidth); let n; - e.options.name && (n = tie( + e.options.name && (n = nie( this.state, r, V2.figure, @@ -28748,11 +28748,11 @@ class ULe extends jie { return [r, i, ...s, ...a, o]; } } -const VLe = { - image: jie, - figure: ULe +const YLe = { + image: ese, + figure: qLe }; -class mP { +class vP { constructor(e, r = !0) { if (this.children = [], this.children = [], r) { this._set_children_from_tokens(e); @@ -28788,7 +28788,7 @@ class mP { } } _add_child(e) { - const r = new mP(e, !1); + const r = new vP(e, !1); r.parent = this, this.children.push(r); } to_tokens() { @@ -28874,23 +28874,23 @@ class mP { return this.attribute_token().attrs; } } -class qLe extends vp { +class WLe extends yp { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !0, this.has_content = !0, this.option_spec = { - "header-rows": s3, - "stub-columns": s3, - width: pP, - widths: qf, - class: _1, - name: qf, - align: gP(["left", "center", "right"]) + "header-rows": a3, + "stub-columns": a3, + width: cC, + widths: lu, + class: md, + name: lu, + align: uC(["left", "center", "right"]) }; } run(e) { this.assert_has_content(e); const r = e.options["header-rows"] || 0, n = this.nestedParse(e.body, e.bodyMap[0]); if (n.length < 2 || n[0].type !== "bullet_list_open" || n[n.length - 1].type !== "bullet_list_close") - throw new hf("Content is not a single bullet list"); + throw new ff("Content is not a single bullet list"); const i = [], s = this.createToken("table_open", "table", 1, { map: e.bodyMap }); e.options.align && s.attrJoin("class", `align-${e.options.align}`), e.options.class && s.attrJoin("class", e.options.class.join(" ")), i.push(s), e.args.length && e.args[0] && (i.push(this.createToken("table_caption_open", "caption", 1)), i.push(this.createToken("inline", "", 0, { map: [e.map[0], e.map[0]], @@ -28900,7 +28900,7 @@ class qLe extends vp { let a = "th"; r ? (i.push(this.createToken("thead_open", "thead", 1, { level: 1 })), a = "th") : (i.push(this.createToken("tbody_open", "tbody", 1, { level: 1 })), a = "td"); let o, l = 0; - for (const u of new mP(n.slice(1, -1)).children) { + for (const u of new vP(n.slice(1, -1)).children) { l += 1, this.assert(u.type === "list_item", `list item ${l} not of type 'list_item': ${u.type}`), this.assert(u.children.length === 1 && u.children[0].type === "bullet_list", `list item ${l} content not a nested bullet list`); const h = u.children[0].children; o === void 0 ? o = h.length : this.assert(h.length === o, `list item ${l} does not contain the same number of columns as previous items`), r && l === r + 1 && (i.push(this.createToken("thead_close", "thead", -1, { level: 1 })), i.push(this.createToken("tbody_open", "tbody", 1, { level: 1 })), a = "td"), i.push(this.createToken("tr_open", "tr", 1, { map: u.map, level: 2 })); @@ -28913,13 +28913,13 @@ class qLe extends vp { return a === "td" ? i.push(this.createToken("tbody_close", "tbody", -1, { level: 1 })) : i.push(this.createToken("thead_close", "thead", -1, { level: 1 })), i.push(this.createToken("table_close", "table", -1)), i; } } -const YLe = { - "list-table": qLe +const GLe = { + "list-table": WLe }; -class WLe extends vp { +class XLe extends yp { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 0, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - label: qf + label: lu }; } run(e) { @@ -28931,18 +28931,18 @@ class WLe extends vp { }); if (r.attrSet("class", "math block"), e.options.label) { r.attrSet("id", e.options.label); - const n = tie(this.state, r, V2.equation, e.options.label, ""); + const n = nie(this.state, r, V2.equation, e.options.label, ""); r.attrSet("number", `${n.number}`), r.info = e.options.label, r.meta = { label: e.options.label, numbered: !0, number: n.number }; } return [r]; } } -const GLe = { - math: WLe -}, XLe = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, $Le), VLe), QLe), YLe), GLe); -function HLe(t) { +const HLe = { + math: XLe +}, yP = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, FLe), YLe), VLe), GLe), HLe); +function ZLe(t) { return (e) => { - const r = aC(e); + const r = oC(e); return r.references.forEach((n) => { const { label: i, tokens: s, contentFromTarget: a } = n, o = (u, h) => (s.open.attrJoin("class", "error"), s.open.tag = s.close.tag = "code", a && h ? s.content.content = a(h) : s.content.content = u, !0), l = r.targets[i]; if (!l) @@ -28958,35 +28958,35 @@ function HLe(t) { }), !0; }; } -function ZLe(t, e) { - t.core.ruler.push("docutils_number", HLe()); +function jLe(t, e) { + t.core.ruler.push("docutils_number", ZLe()); } -const jLe = { +const KLe = { parseRoles: !0, replaceFences: !0, rolesAfter: "inline", directivesAfter: "block", - directives: XLe, - roles: H7e + directives: yP, + roles: J7e }; -function KLe(t, e) { - const r = Object.assign(Object.assign({}, jLe), e); - t.use(eie, r), t.use(bLe, r), t.use(ZLe, r); +function JLe(t, e) { + const r = Object.assign(Object.assign({}, KLe), e); + t.use(rie, r), t.use(kLe, r), t.use(jLe, r); } /*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */ -function tf(t) { - return tf = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { +function rf(t) { + return rf = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; - }, tf(t); + }, rf(t); } -function m9(t, e) { - return m9 = Object.setPrototypeOf || function(n, i) { +function y9(t, e) { + return y9 = Object.setPrototypeOf || function(n, i) { return n.__proto__ = i, n; - }, m9(t, e); + }, y9(t, e); } -function JLe() { +function eRe() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") @@ -28999,47 +28999,47 @@ function JLe() { } } function m5(t, e, r) { - return JLe() ? m5 = Reflect.construct : m5 = function(i, s, a) { + return eRe() ? m5 = Reflect.construct : m5 = function(i, s, a) { var o = [null]; o.push.apply(o, s); var l = Function.bind.apply(i, o), u = new l(); - return a && m9(u, a.prototype), u; + return a && y9(u, a.prototype), u; }, m5.apply(null, arguments); } function _l(t) { - return eRe(t) || tRe(t) || rRe(t) || nRe(); + return tRe(t) || rRe(t) || nRe(t) || iRe(); } -function eRe(t) { +function tRe(t) { if (Array.isArray(t)) - return v9(t); + return b9(t); } -function tRe(t) { +function rRe(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } -function rRe(t, e) { +function nRe(t, e) { if (!!t) { if (typeof t == "string") - return v9(t, e); + return b9(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) - return v9(t, e); + return b9(t, e); } } -function v9(t, e) { +function b9(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r]; return n; } -function nRe() { +function iRe() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } -var iRe = Object.hasOwnProperty, IU = Object.setPrototypeOf, sRe = Object.isFrozen, aRe = Object.getPrototypeOf, oRe = Object.getOwnPropertyDescriptor, Aa = Object.freeze, sc = Object.seal, lRe = Object.create, Kie = typeof Reflect < "u" && Reflect, a3 = Kie.apply, y9 = Kie.construct; -a3 || (a3 = function(e, r, n) { +var sRe = Object.hasOwnProperty, BU = Object.setPrototypeOf, aRe = Object.isFrozen, oRe = Object.getPrototypeOf, lRe = Object.getOwnPropertyDescriptor, Aa = Object.freeze, sc = Object.seal, cRe = Object.create, tse = typeof Reflect < "u" && Reflect, o3 = tse.apply, x9 = tse.construct; +o3 || (o3 = function(e, r, n) { return e.apply(r, n); }); Aa || (Aa = function(e) { @@ -29048,67 +29048,67 @@ Aa || (Aa = function(e) { sc || (sc = function(e) { return e; }); -y9 || (y9 = function(e, r) { +x9 || (x9 = function(e, r) { return m5(e, _l(r)); }); -var cRe = hl(Array.prototype.forEach), $U = hl(Array.prototype.pop), Tv = hl(Array.prototype.push), v5 = hl(String.prototype.toLowerCase), h6 = hl(String.prototype.toString), uRe = hl(String.prototype.match), El = hl(String.prototype.replace), hRe = hl(String.prototype.indexOf), fRe = hl(String.prototype.trim), ga = hl(RegExp.prototype.test), f6 = dRe(TypeError); +var uRe = hl(Array.prototype.forEach), FU = hl(Array.prototype.pop), Tv = hl(Array.prototype.push), v5 = hl(String.prototype.toLowerCase), p6 = hl(String.prototype.toString), hRe = hl(String.prototype.match), El = hl(String.prototype.replace), fRe = hl(String.prototype.indexOf), dRe = hl(String.prototype.trim), ga = hl(RegExp.prototype.test), g6 = pRe(TypeError); function hl(t) { return function(e) { for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) n[i - 1] = arguments[i]; - return a3(t, e, n); + return o3(t, e, n); }; } -function dRe(t) { +function pRe(t) { return function() { for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++) r[n] = arguments[n]; - return y9(t, r); + return x9(t, r); }; } -function Ar(t, e, r) { +function Lr(t, e, r) { var n; - r = (n = r) !== null && n !== void 0 ? n : v5, IU && IU(t, null); + r = (n = r) !== null && n !== void 0 ? n : v5, BU && BU(t, null); for (var i = e.length; i--; ) { var s = e[i]; if (typeof s == "string") { var a = r(s); - a !== s && (sRe(e) || (e[i] = a), s = a); + a !== s && (aRe(e) || (e[i] = a), s = a); } t[s] = !0; } return t; } -function _d(t) { - var e = lRe(null), r; +function Ad(t) { + var e = cRe(null), r; for (r in t) - a3(iRe, t, [r]) === !0 && (e[r] = t[r]); + o3(sRe, t, [r]) === !0 && (e[r] = t[r]); return e; } function DO(t, e) { for (; t !== null; ) { - var r = oRe(t, e); + var r = lRe(t, e); if (r) { if (r.get) return hl(r.get); if (typeof r.value == "function") return hl(r.value); } - t = aRe(t); + t = oRe(t); } function n(i) { return console.warn("fallback value for", i), null; } return n; } -var BU = Aa(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), d6 = Aa(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), p6 = Aa(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), pRe = Aa(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), g6 = Aa(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]), gRe = Aa(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), FU = Aa(["#text"]), zU = Aa(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), m6 = Aa(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), QU = Aa(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), PO = Aa(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), mRe = sc(/\{\{[\w\W]*|[\w\W]*\}\}/gm), vRe = sc(/<%[\w\W]*|[\w\W]*%>/gm), yRe = sc(/\${[\w\W]*}/gm), bRe = sc(/^data-[\-\w.\u00B7-\uFFFF]/), xRe = sc(/^aria-[\-\w]+$/), wRe = sc( +var zU = Aa(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), m6 = Aa(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), v6 = Aa(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), gRe = Aa(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), y6 = Aa(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]), mRe = Aa(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), QU = Aa(["#text"]), UU = Aa(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), b6 = Aa(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), VU = Aa(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), PO = Aa(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), vRe = sc(/\{\{[\w\W]*|[\w\W]*\}\}/gm), yRe = sc(/<%[\w\W]*|[\w\W]*%>/gm), bRe = sc(/\${[\w\W]*}/gm), xRe = sc(/^data-[\-\w.\u00B7-\uFFFF]/), wRe = sc(/^aria-[\-\w]+$/), ORe = sc( /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i -), ORe = sc(/^(?:\w+script|data):/i), kRe = sc( +), kRe = sc(/^(?:\w+script|data):/i), SRe = sc( /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g -), SRe = sc(/^html$/i), TRe = function() { +), TRe = sc(/^html$/i), CRe = function() { return typeof window > "u" ? null : window; -}, CRe = function(e, r) { - if (tf(e) !== "object" || typeof e.createPolicy != "function") +}, ERe = function(e, r) { + if (rf(e) !== "object" || typeof e.createPolicy != "function") return null; var n = null, i = "data-tt-policy-suffix"; r.currentScript && r.currentScript.hasAttribute(i) && (n = r.currentScript.getAttribute(i)); @@ -29126,9 +29126,9 @@ var BU = Aa(["a", "abbr", "acronym", "address", "area", "article", "aside", "aud return console.warn("TrustedTypes policy " + s + " could not be created."), null; } }; -function Jie() { - var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : TRe(), e = function(ne) { - return Jie(ne); +function rse() { + var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : CRe(), e = function(ne) { + return rse(ne); }; if (e.version = "2.4.7", e.removed = [], !t || !t.document || t.document.nodeType !== 9) return e.isSupported = !1, e; @@ -29137,14 +29137,14 @@ function Jie() { var w = n.createElement("template"); w.content && w.content.ownerDocument && (n = w.content.ownerDocument); } - var O = CRe(p, r), S = O ? O.createHTML("") : "", C = n, T = C.implementation, A = C.createNodeIterator, E = C.createDocumentFragment, R = C.getElementsByTagName, _ = r.importNode, L = {}; + var O = ERe(p, r), S = O ? O.createHTML("") : "", C = n, T = C.implementation, A = C.createNodeIterator, E = C.createDocumentFragment, R = C.getElementsByTagName, _ = r.importNode, L = {}; try { - L = _d(n).documentMode ? n.documentMode : {}; + L = Ad(n).documentMode ? n.documentMode : {}; } catch { } var $ = {}; e.isSupported = typeof b == "function" && T && T.createHTMLDocument !== void 0 && L !== 9; - var k = mRe, N = vRe, M = yRe, D = bRe, P = xRe, I = ORe, F = kRe, B = wRe, Q = null, q = Ar({}, [].concat(_l(BU), _l(d6), _l(p6), _l(g6), _l(FU))), W = null, ee = Ar({}, [].concat(_l(zU), _l(m6), _l(QU), _l(PO))), Y = Object.seal(Object.create(null, { + var k = vRe, N = yRe, M = bRe, D = xRe, P = wRe, I = kRe, F = SRe, B = ORe, Q = null, q = Lr({}, [].concat(_l(zU), _l(m6), _l(v6), _l(y6), _l(QU))), W = null, ee = Lr({}, [].concat(_l(UU), _l(b6), _l(VU), _l(PO))), Y = Object.seal(Object.create(null, { tagNameCheck: { writable: !0, configurable: !1, @@ -29163,22 +29163,22 @@ function Jie() { enumerable: !0, value: !1 } - })), re = null, se = null, U = !0, Z = !0, G = !1, K = !0, oe = !1, ae = !1, J = !1, Me = !1, he = !1, _e = !1, De = !1, He = !0, nt = !1, Ge = "user-content-", Ie = !0, de = !1, X = {}, le = null, ye = Ar({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), ie = null, fe = Ar({}, ["audio", "video", "img", "source", "image", "track"]), pe = null, ge = Ar({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ve = "http://www.w3.org/1998/Math/MathML", we = "http://www.w3.org/2000/svg", Ee = "http://www.w3.org/1999/xhtml", Re = Ee, Ce = !1, $e = null, Le = Ar({}, [ve, we, Ee], h6), tt, Fe = ["application/xhtml+xml", "text/html"], ot = "text/html", at, bt = null, xt = n.createElement("form"), gt = function(ne) { + })), re = null, se = null, U = !0, Z = !0, G = !1, K = !0, oe = !1, ae = !1, J = !1, Me = !1, he = !1, _e = !1, De = !1, He = !0, nt = !1, Ge = "user-content-", Ie = !0, de = !1, X = {}, le = null, ye = Lr({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), ie = null, fe = Lr({}, ["audio", "video", "img", "source", "image", "track"]), pe = null, ge = Lr({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ve = "http://www.w3.org/1998/Math/MathML", we = "http://www.w3.org/2000/svg", Ee = "http://www.w3.org/1999/xhtml", Re = Ee, Ce = !1, $e = null, Le = Lr({}, [ve, we, Ee], p6), tt, Fe = ["application/xhtml+xml", "text/html"], ot = "text/html", at, bt = null, xt = n.createElement("form"), gt = function(ne) { return ne instanceof RegExp || ne instanceof Function; }, et = function(ne) { - bt && bt === ne || ((!ne || tf(ne) !== "object") && (ne = {}), ne = _d(ne), tt = Fe.indexOf(ne.PARSER_MEDIA_TYPE) === -1 ? tt = ot : tt = ne.PARSER_MEDIA_TYPE, at = tt === "application/xhtml+xml" ? h6 : v5, Q = "ALLOWED_TAGS" in ne ? Ar({}, ne.ALLOWED_TAGS, at) : q, W = "ALLOWED_ATTR" in ne ? Ar({}, ne.ALLOWED_ATTR, at) : ee, $e = "ALLOWED_NAMESPACES" in ne ? Ar({}, ne.ALLOWED_NAMESPACES, h6) : Le, pe = "ADD_URI_SAFE_ATTR" in ne ? Ar( - _d(ge), + bt && bt === ne || ((!ne || rf(ne) !== "object") && (ne = {}), ne = Ad(ne), tt = Fe.indexOf(ne.PARSER_MEDIA_TYPE) === -1 ? tt = ot : tt = ne.PARSER_MEDIA_TYPE, at = tt === "application/xhtml+xml" ? p6 : v5, Q = "ALLOWED_TAGS" in ne ? Lr({}, ne.ALLOWED_TAGS, at) : q, W = "ALLOWED_ATTR" in ne ? Lr({}, ne.ALLOWED_ATTR, at) : ee, $e = "ALLOWED_NAMESPACES" in ne ? Lr({}, ne.ALLOWED_NAMESPACES, p6) : Le, pe = "ADD_URI_SAFE_ATTR" in ne ? Lr( + Ad(ge), ne.ADD_URI_SAFE_ATTR, at - ) : ge, ie = "ADD_DATA_URI_TAGS" in ne ? Ar( - _d(fe), + ) : ge, ie = "ADD_DATA_URI_TAGS" in ne ? Lr( + Ad(fe), ne.ADD_DATA_URI_TAGS, at - ) : fe, le = "FORBID_CONTENTS" in ne ? Ar({}, ne.FORBID_CONTENTS, at) : ye, re = "FORBID_TAGS" in ne ? Ar({}, ne.FORBID_TAGS, at) : {}, se = "FORBID_ATTR" in ne ? Ar({}, ne.FORBID_ATTR, at) : {}, X = "USE_PROFILES" in ne ? ne.USE_PROFILES : !1, U = ne.ALLOW_ARIA_ATTR !== !1, Z = ne.ALLOW_DATA_ATTR !== !1, G = ne.ALLOW_UNKNOWN_PROTOCOLS || !1, K = ne.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = ne.SAFE_FOR_TEMPLATES || !1, ae = ne.WHOLE_DOCUMENT || !1, he = ne.RETURN_DOM || !1, _e = ne.RETURN_DOM_FRAGMENT || !1, De = ne.RETURN_TRUSTED_TYPE || !1, Me = ne.FORCE_BODY || !1, He = ne.SANITIZE_DOM !== !1, nt = ne.SANITIZE_NAMED_PROPS || !1, Ie = ne.KEEP_CONTENT !== !1, de = ne.IN_PLACE || !1, B = ne.ALLOWED_URI_REGEXP || B, Re = ne.NAMESPACE || Ee, Y = ne.CUSTOM_ELEMENT_HANDLING || {}, ne.CUSTOM_ELEMENT_HANDLING && gt(ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ne.CUSTOM_ELEMENT_HANDLING && gt(ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ne.CUSTOM_ELEMENT_HANDLING && typeof ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), oe && (Z = !1), _e && (he = !0), X && (Q = Ar({}, _l(FU)), W = [], X.html === !0 && (Ar(Q, BU), Ar(W, zU)), X.svg === !0 && (Ar(Q, d6), Ar(W, m6), Ar(W, PO)), X.svgFilters === !0 && (Ar(Q, p6), Ar(W, m6), Ar(W, PO)), X.mathMl === !0 && (Ar(Q, g6), Ar(W, QU), Ar(W, PO))), ne.ADD_TAGS && (Q === q && (Q = _d(Q)), Ar(Q, ne.ADD_TAGS, at)), ne.ADD_ATTR && (W === ee && (W = _d(W)), Ar(W, ne.ADD_ATTR, at)), ne.ADD_URI_SAFE_ATTR && Ar(pe, ne.ADD_URI_SAFE_ATTR, at), ne.FORBID_CONTENTS && (le === ye && (le = _d(le)), Ar(le, ne.FORBID_CONTENTS, at)), Ie && (Q["#text"] = !0), ae && Ar(Q, ["html", "head", "body"]), Q.table && (Ar(Q, ["tbody"]), delete re.tbody), Aa && Aa(ne), bt = ne); - }, Ke = Ar({}, ["mi", "mo", "mn", "ms", "mtext"]), wt = Ar({}, ["foreignobject", "desc", "title", "annotation-xml"]), ct = Ar({}, ["title", "style", "font", "a", "script"]), it = Ar({}, d6); - Ar(it, p6), Ar(it, pRe); - var At = Ar({}, g6); - Ar(At, gRe); + ) : fe, le = "FORBID_CONTENTS" in ne ? Lr({}, ne.FORBID_CONTENTS, at) : ye, re = "FORBID_TAGS" in ne ? Lr({}, ne.FORBID_TAGS, at) : {}, se = "FORBID_ATTR" in ne ? Lr({}, ne.FORBID_ATTR, at) : {}, X = "USE_PROFILES" in ne ? ne.USE_PROFILES : !1, U = ne.ALLOW_ARIA_ATTR !== !1, Z = ne.ALLOW_DATA_ATTR !== !1, G = ne.ALLOW_UNKNOWN_PROTOCOLS || !1, K = ne.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = ne.SAFE_FOR_TEMPLATES || !1, ae = ne.WHOLE_DOCUMENT || !1, he = ne.RETURN_DOM || !1, _e = ne.RETURN_DOM_FRAGMENT || !1, De = ne.RETURN_TRUSTED_TYPE || !1, Me = ne.FORCE_BODY || !1, He = ne.SANITIZE_DOM !== !1, nt = ne.SANITIZE_NAMED_PROPS || !1, Ie = ne.KEEP_CONTENT !== !1, de = ne.IN_PLACE || !1, B = ne.ALLOWED_URI_REGEXP || B, Re = ne.NAMESPACE || Ee, Y = ne.CUSTOM_ELEMENT_HANDLING || {}, ne.CUSTOM_ELEMENT_HANDLING && gt(ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ne.CUSTOM_ELEMENT_HANDLING && gt(ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ne.CUSTOM_ELEMENT_HANDLING && typeof ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), oe && (Z = !1), _e && (he = !0), X && (Q = Lr({}, _l(QU)), W = [], X.html === !0 && (Lr(Q, zU), Lr(W, UU)), X.svg === !0 && (Lr(Q, m6), Lr(W, b6), Lr(W, PO)), X.svgFilters === !0 && (Lr(Q, v6), Lr(W, b6), Lr(W, PO)), X.mathMl === !0 && (Lr(Q, y6), Lr(W, VU), Lr(W, PO))), ne.ADD_TAGS && (Q === q && (Q = Ad(Q)), Lr(Q, ne.ADD_TAGS, at)), ne.ADD_ATTR && (W === ee && (W = Ad(W)), Lr(W, ne.ADD_ATTR, at)), ne.ADD_URI_SAFE_ATTR && Lr(pe, ne.ADD_URI_SAFE_ATTR, at), ne.FORBID_CONTENTS && (le === ye && (le = Ad(le)), Lr(le, ne.FORBID_CONTENTS, at)), Ie && (Q["#text"] = !0), ae && Lr(Q, ["html", "head", "body"]), Q.table && (Lr(Q, ["tbody"]), delete re.tbody), Aa && Aa(ne), bt = ne); + }, Ke = Lr({}, ["mi", "mo", "mn", "ms", "mtext"]), wt = Lr({}, ["foreignobject", "desc", "title", "annotation-xml"]), ct = Lr({}, ["title", "style", "font", "a", "script"]), it = Lr({}, m6); + Lr(it, v6), Lr(it, gRe); + var At = Lr({}, y6); + Lr(At, mRe); var ft = function(ne) { var Pe = b(ne); (!Pe || !Pe.tagName) && (Pe = { @@ -29228,7 +29228,7 @@ function Jie() { if (Me) ne = "" + ne; else { - var Ft = uRe(ne, /^[\r\n\t ]+/); + var Ft = hRe(ne, /^[\r\n\t ]+/); Xe = Ft && Ft[0]; } tt === "application/xhtml+xml" && Re === Ee && (ne = '' + ne + ""); @@ -29257,10 +29257,10 @@ function Jie() { ); }, Bt = function(ne) { return ne instanceof f && (typeof ne.nodeName != "string" || typeof ne.textContent != "string" || typeof ne.removeChild != "function" || !(ne.attributes instanceof h) || typeof ne.removeAttribute != "function" || typeof ne.setAttribute != "function" || typeof ne.namespaceURI != "string" || typeof ne.insertBefore != "function" || typeof ne.hasChildNodes != "function"); - }, Er = function(ne) { - return tf(a) === "object" ? ne instanceof a : ne && tf(ne) === "object" && typeof ne.nodeType == "number" && typeof ne.nodeName == "string"; + }, _r = function(ne) { + return rf(a) === "object" ? ne instanceof a : ne && rf(ne) === "object" && typeof ne.nodeType == "number" && typeof ne.nodeName == "string"; }, ir = function(ne, Pe, Xe) { - !$[ne] || cRe($[ne], function(Ft) { + !$[ne] || uRe($[ne], function(Ft) { Ft.call(e, Pe, Xe, bt); }); }, Zr = function(ne) { @@ -29271,7 +29271,7 @@ function Jie() { if (ir("uponSanitizeElement", ne, { tagName: Xe, allowedTags: Q - }), ne.hasChildNodes() && !Er(ne.firstElementChild) && (!Er(ne.content) || !Er(ne.content.firstElementChild)) && ga(/<[/\w]/g, ne.innerHTML) && ga(/<[/\w]/g, ne.textContent) || Xe === "select" && ga(/