From 12216bea708bf1076e561ec2f6743729ed1b5ae2 Mon Sep 17 00:00:00 2001 From: antmicrobot Date: Mon, 23 Sep 2024 09:25:47 +0000 Subject: [PATCH] deploy: e765632b8dd4aa913f3be1d7a375b96763dfcae1 --- MystEditor.js | 32872 +++++++++++++++++++------------------- docs/collaboration.html | 2 +- docs/comments.html | 2 +- docs/genindex.html | 2 +- docs/index.html | 2 +- docs/introduction.html | 2 +- docs/mermaid.html | 2 +- docs/rich-links.html | 2 +- docs/topbar.html | 2 +- 9 files changed, 16449 insertions(+), 16439 deletions(-) diff --git a/MystEditor.js b/MystEditor.js index 9c90dab..ee983df 100644 --- a/MystEditor.js +++ b/MystEditor.js @@ -1,6 +1,6 @@ -var lye = Object.defineProperty; -var cye = (t, e, r) => e in t ? lye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var Or = (t, e, r) => (cye(t, typeof e != "symbol" ? e + "" : e, r), r), uye = (t, e, r) => { +var cye = Object.defineProperty; +var uye = (t, e, r) => e in t ? cye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; +var Or = (t, e, r) => (uye(t, typeof e != "symbol" ? e + "" : e, r), r), hye = (t, e, r) => { if (!e.has(t)) throw TypeError("Cannot " + r); }; @@ -9,14 +9,14 @@ var iw = (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 Em = (t, e, r) => (uye(t, e, "access private method"), r); -var Yb, $t, mZ, gd, b$, vZ, OA, yZ, yy = {}, bZ = [], hye = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, CS = Array.isArray; +var Em = (t, e, r) => (hye(t, e, "access private method"), r); +var Yb, $t, vZ, gd, x$, yZ, kA, bZ, yy = {}, xZ = [], fye = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ES = Array.isArray; function bu(t, e) { for (var r in e) t[r] = e[r]; return t; } -function xZ(t) { +function wZ(t) { var e = t.parentNode; e && e.removeChild(t); } @@ -30,10 +30,10 @@ function Rl(t, e, r) { return Uv(t, a, n, i, null); } function Uv(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 ? ++mZ : 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 ? ++vZ : i, __i: -1, __u: 0 }; return i == null && $t.vnode != null && $t.vnode(s), s; } -function fye() { +function dye() { return { current: null }; } function Iu(t) { @@ -50,7 +50,7 @@ function bg(t, e) { return r.__e; return typeof t.type == "function" ? bg(t) : null; } -function wZ(t) { +function OZ(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 wZ(t) { t.__e = t.__c.base = r.__e; break; } - return wZ(t); + return OZ(t); } } -function kA(t) { - (!t.__d && (t.__d = !0) && gd.push(t) && !p5.__r++ || b$ !== $t.debounceRendering) && ((b$ = $t.debounceRendering) || vZ)(p5); +function SA(t) { + (!t.__d && (t.__d = !0) && gd.push(t) && !g5.__r++ || x$ !== $t.debounceRendering) && ((x$ = $t.debounceRendering) || yZ)(g5); } -function p5() { +function g5() { var t, e, r, n, i, s, a, o, l; - for (gd.sort(OA); t = gd.shift(); ) - t.__d && (e = gd.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = bu({}, i)).__v = i.__v + 1, $t.vnode && $t.vnode(n), ER(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? bg(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, SZ(o, n, l), n.__e != s && wZ(n)), gd.length > e && gd.sort(OA)); - p5.__r = 0; -} -function OZ(t, e, r, n, i, s, a, o, l, u, h) { - var f, d, p, g, m, v = n && n.__k || bZ, y = e.length; - for (r.__d = l, dye(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 ? yy : v[p.__i] || yy, p.__i = f, ER(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && _R(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 = kZ(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); + for (gd.sort(kA); t = gd.shift(); ) + t.__d && (e = gd.length, n = void 0, s = (i = (r = t).__v).__e, o = [], l = [], (a = r.__P) && ((n = bu({}, i)).__v = i.__v + 1, $t.vnode && $t.vnode(n), _R(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [s] : null, o, s == null ? bg(i) : s, !!(32 & i.__u), l), n.__.__k[n.__i] = n, TZ(o, n, l), n.__e != s && OZ(n)), gd.length > e && gd.sort(kA)); + g5.__r = 0; +} +function kZ(t, e, r, n, i, s, a, o, l, u, h) { + var f, d, p, g, m, v = n && n.__k || xZ, y = e.length; + for (r.__d = l, pye(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 ? yy : v[p.__i] || yy, p.__i = f, _R(t, p, d, i, s, a, o, l, u, h), g = p.__e, p.ref && d.ref != p.ref && (d.ref && AR(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 = SZ(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 dye(t, e, r) { +function pye(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 ? Uv(null, i, null, null, i) : CS(i) ? Uv(Iu, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? Uv(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = pye(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 = bg(s)), SA(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 ? Uv(null, i, null, null, i) : ES(i) ? Uv(Iu, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? Uv(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) != null ? (i.__ = t, i.__b = t.__b + 1, o = gye(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 = bg(s)), TA(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 = bg(s)), SA(s, s)); + (s = r[n]) != null && (131072 & s.__u) == 0 && (s.__e == t.__d && (t.__d = bg(s)), TA(s, s)); } -function kZ(t, e, r) { +function SZ(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 = kZ(n[i], e, r)); + n[i] && (n[i].__ = t, e = SZ(n[i], e, r)); return e; } return t.__e != e && (r.insertBefore(t.__e, e || null), e = t.__e), e && e.nextSibling; } function Tu(t, e) { - return e = e || [], t == null || typeof t == "boolean" || (CS(t) ? t.some(function(r) { + return e = e || [], t == null || typeof t == "boolean" || (ES(t) ? t.some(function(r) { Tu(r, e); }) : e.push(t)), e; } -function pye(t, e, r, n) { +function gye(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 pye(t, e, r, n) { } return -1; } -function x$(t, e, r) { - e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || hye.test(e) ? r : r + "px"; +function w$(t, e, r) { + e[0] === "-" ? t.setProperty(e, r == null ? "" : r) : t[e] = r == null ? "" : typeof r != "number" || fye.test(e) ? r : r + "px"; } function sw(t, e, r, n, i) { var s; @@ -129,13 +129,13 @@ function sw(t, e, r, n, i) { else { if (typeof n == "string" && (t.style.cssText = n = ""), n) for (e in n) - r && e in r || x$(t.style, e, ""); + r && e in r || w$(t.style, e, ""); if (r) for (e in r) - n && r[e] === n[e] || x$(t.style, e, r[e]); + n && r[e] === n[e] || w$(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 ? O$ : w$, s)) : t.removeEventListener(e, s ? O$ : w$, 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 ? k$ : O$, s)) : t.removeEventListener(e, s ? k$ : O$, s); else { if (i) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); @@ -148,7 +148,7 @@ function sw(t, e, r, n, i) { typeof r == "function" || (r == null || r === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, r)); } } -function w$(t) { +function O$(t) { var e = this.l[t.type + !1]; if (t.t) { if (t.t <= e.u) @@ -157,10 +157,10 @@ function w$(t) { t.t = Date.now(); return e($t.event ? $t.event(t) : t); } -function O$(t) { +function k$(t) { return this.l[t.type + !0]($t.event ? $t.event(t) : t); } -function ER(t, e, r, n, i, s, a, o, l, u) { +function _R(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, L, E = e.type; if (e.constructor !== void 0) return null; @@ -168,7 +168,7 @@ function ER(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 Ec(y, w), f.constructor = E, f.render = mye), 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 = bu({}, f.__s)), bu(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 Ec(y, w), f.constructor = E, f.render = vye), 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 = bu({}, f.__s)), bu(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 ER(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 = bu(bu({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), OZ(t, CS(L = h != null && h.type === Iu && h.key == null ? h.props.children : h) ? L : [L], 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 = bu(bu({}, n), f.getChildContext())), d || f.getSnapshotBeforeUpdate == null || (m = f.getSnapshotBeforeUpdate(p, g)), kZ(t, ES(L = h != null && h.type === Iu && h.key == null ? h.props.children : h) ? L : [L], 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), $t.__e(R, e, r); } else - s == null && e.__v === r.__v ? (e.__k = r.__k, e.__e = r.__e) : e.__e = gye(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 = mye(r.__e, e, r, n, i, s, a, l, u); (h = $t.diffed) && h(e); } -function SZ(t, e, r) { +function TZ(t, e, r) { e.__d = void 0; for (var n = 0; n < r.length; n++) - _R(r[n], r[++n], r[++n]); + AR(r[n], r[++n], r[++n]); $t.__c && $t.__c(e, t), t.some(function(i) { try { t = i.__h, i.__h = [], t.some(function(s) { @@ -213,7 +213,7 @@ function SZ(t, e, r) { } }); } -function gye(t, e, r, n, i, s, a, o, l) { +function mye(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 gye(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 || sw(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 = ""), OZ(t, CS(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && bg(r, 0), o, l), s != null) + else if (f && (t.innerHTML = ""), kZ(t, ES(d) ? d : [d], e, r, n, i && b !== "foreignObject", s, a, s ? s[0] : r.__k && bg(r, 0), o, l), s != null) for (u = s.length; u--; ) - s[u] != null && xZ(s[u]); + s[u] != null && wZ(s[u]); o || (u = "value", g !== void 0 && (g !== t[u] || b === "progress" && !g || b === "option" && g !== v[u]) && sw(t, u, g, v[u], !1), u = "checked", m !== void 0 && m !== t[u] && sw(t, u, m, v[u], !1)); } return t; } -function _R(t, e, r) { +function AR(t, e, r) { try { typeof t == "function" ? t(e) : t.current = e; } catch (n) { $t.__e(n, r); } } -function SA(t, e, r) { +function TA(t, e, r) { var n, i; - if ($t.unmount && $t.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || _R(n, null, e)), (n = t.__c) != null) { + if ($t.unmount && $t.unmount(t), (n = t.ref) && (n.current && n.current !== t.__e || AR(n, null, e)), (n = t.__c) != null) { if (n.componentWillUnmount) try { n.componentWillUnmount(); @@ -266,27 +266,27 @@ function SA(t, e, r) { } if (n = t.__k) for (i = 0; i < n.length; i++) - n[i] && SA(n[i], e, r || typeof t.type != "function"); - r || t.__e == null || xZ(t.__e), t.__ = t.__e = t.__d = void 0; + n[i] && TA(n[i], e, r || typeof t.type != "function"); + r || t.__e == null || wZ(t.__e), t.__ = t.__e = t.__d = void 0; } -function mye(t, e, r) { +function vye(t, e, r) { return this.constructor(t, r); } function xg(t, e, r) { var n, i, s, a; - $t.__ && $t.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], ER(e, t = (!n && r || e).__k = Rl(Iu, null, [t]), i || yy, yy, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? Yb.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), SZ(s, t, a); + $t.__ && $t.__(t, e), i = (n = typeof r == "function") ? null : r && r.__k || e.__k, s = [], a = [], _R(e, t = (!n && r || e).__k = Rl(Iu, null, [t]), i || yy, yy, e.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : e.firstChild ? Yb.call(e.childNodes) : null, s, !n && r ? r : i ? i.__e : e.firstChild, n, a), TZ(s, t, a); } -function TZ(t, e) { - xg(t, e, TZ); +function CZ(t, e) { + xg(t, e, CZ); } -function vye(t, e, r) { +function yye(t, e, r) { var n, i, s, a, o = bu({}, 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 ? Yb.call(arguments, 2) : r), Uv(t.type, o, n || t.key, i || t.ref, null); } -function yye(t, e) { - var r = { __c: e = "__cC" + yZ++, __: t, Consumer: function(n, i) { +function bye(t, e) { + var r = { __c: e = "__cC" + bZ++, __: t, Consumer: function(n, i) { return n.children(i); }, Provider: function(n) { var i, s; @@ -294,7 +294,7 @@ function yye(t, e) { return s; }, this.shouldComponentUpdate = function(a) { this.props.value !== a.value && i.some(function(o) { - o.__e = !0, kA(o); + o.__e = !0, SA(o); }); }, this.sub = function(a) { i.push(a); @@ -306,7 +306,7 @@ function yye(t, e) { } }; return r.Provider.__ = r.Consumer.contextType = r; } -Yb = bZ.slice, $t = { __e: function(t, e, r, n) { +Yb = xZ.slice, $t = { __e: function(t, e, r, n) { for (var i, s, a; e = e.__; ) if ((i = e.__c) && !i.__) try { @@ -316,26 +316,26 @@ Yb = bZ.slice, $t = { __e: function(t, e, r, n) { t = o; } throw t; -} }, mZ = 0, Ec.prototype.setState = function(t, e) { +} }, vZ = 0, Ec.prototype.setState = function(t, e) { var r; - r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = bu({}, this.state), typeof t == "function" && (t = t(bu({}, r), this.props)), t && bu(r, t), t != null && this.__v && (e && this._sb.push(e), kA(this)); + r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = bu({}, this.state), typeof t == "function" && (t = t(bu({}, r), this.props)), t && bu(r, t), t != null && this.__v && (e && this._sb.push(e), SA(this)); }, Ec.prototype.forceUpdate = function(t) { - this.__v && (this.__e = !0, t && this.__h.push(t), kA(this)); -}, Ec.prototype.render = Iu, gd = [], vZ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, OA = function(t, e) { + this.__v && (this.__e = !0, t && this.__h.push(t), SA(this)); +}, Ec.prototype.render = Iu, gd = [], yZ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, kA = function(t, e) { return t.__v.__b - e.__v.__b; -}, p5.__r = 0, yZ = 0; -var af, vn, uE, k$, wg = 0, CZ = [], ZO = [], S$ = $t.__b, T$ = $t.__r, C$ = $t.diffed, E$ = $t.__c, _$ = $t.unmount; +}, g5.__r = 0, bZ = 0; +var af, vn, hE, S$, wg = 0, EZ = [], jO = [], T$ = $t.__b, C$ = $t.__r, E$ = $t.diffed, _$ = $t.__c, A$ = $t.unmount; function D1(t, e) { $t.__h && $t.__h(vn, t, wg || e), wg = 0; var r = vn.__H || (vn.__H = { __: [], __h: [] }); - return t >= r.__.length && r.__.push({ __V: ZO }), r.__[t]; + return t >= r.__.length && r.__.push({ __V: jO }), r.__[t]; } function Rn(t) { - return wg = 1, ES(_Z, t); + return wg = 1, _S(AZ, t); } -function ES(t, e, r) { +function _S(t, e, r) { var n = D1(af++, 2); - if (n.t = t, !n.__c && (n.__ = [r ? r(e) : _Z(void 0, e), function(o) { + if (n.t = t, !n.__c && (n.__ = [r ? r(e) : AZ(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 = vn, !vn.u)) { @@ -371,19 +371,19 @@ function ES(t, e, r) { } function Yi(t, e) { var r = D1(af++, 3); - !$t.__s && AR(r.__H, e) && (r.__ = t, r.i = e, vn.__H.__h.push(r)); + !$t.__s && LR(r.__H, e) && (r.__ = t, r.i = e, vn.__H.__h.push(r)); } -function _S(t, e) { +function AS(t, e) { var r = D1(af++, 4); - !$t.__s && AR(r.__H, e) && (r.__ = t, r.i = e, vn.__h.push(r)); + !$t.__s && LR(r.__H, e) && (r.__ = t, r.i = e, vn.__h.push(r)); } function so(t) { return wg = 5, Nn(function() { return { current: t }; }, []); } -function bye(t, e, r) { - wg = 6, _S(function() { +function xye(t, e, r) { + wg = 6, AS(function() { return typeof t == "function" ? (t(e()), function() { return t(null); }) : t ? (t.current = e(), function() { @@ -393,21 +393,21 @@ function bye(t, e, r) { } function Nn(t, e) { var r = D1(af++, 7); - return AR(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; + return LR(r.__H, e) ? (r.__V = t(), r.i = e, r.__h = t, r.__V) : r.__; } -function g5(t, e) { +function m5(t, e) { return wg = 8, Nn(function() { return t; }, e); } -function EZ(t) { +function _Z(t) { var e = vn.context[t.__c], r = D1(af++, 9); return r.c = t, e ? (r.__ == null && (r.__ = !0, e.sub(vn)), e.props.value) : t.__; } -function TA(t, e) { +function CA(t, e) { $t.useDebugValue && $t.useDebugValue(e ? e(t) : t); } -function xye() { +function wye() { var t = D1(af++, 11); if (!t.__) { for (var e = vn.__v; e !== null && !e.__m && e.__ !== null; ) @@ -417,87 +417,87 @@ function xye() { } return t.__; } -function wye() { - for (var t; t = CZ.shift(); ) +function Oye() { + for (var t; t = EZ.shift(); ) if (t.__P && t.__H) try { - t.__H.__h.forEach(jO), t.__H.__h.forEach(CA), t.__H.__h = []; + t.__H.__h.forEach(KO), t.__H.__h.forEach(EA), t.__H.__h = []; } catch (e) { t.__H.__h = [], $t.__e(e, t.__v); } } $t.__b = function(t) { - vn = null, S$ && S$(t); + vn = null, T$ && T$(t); }, $t.__r = function(t) { - T$ && T$(t), af = 0; + C$ && C$(t), af = 0; var e = (vn = t.__c).__H; - e && (uE === vn ? (e.__h = [], vn.__h = [], e.__.forEach(function(r) { - r.__N && (r.__ = r.__N), r.__V = ZO, r.__N = r.i = void 0; - })) : (e.__h.forEach(jO), e.__h.forEach(CA), e.__h = [], af = 0)), uE = vn; + e && (hE === vn ? (e.__h = [], vn.__h = [], e.__.forEach(function(r) { + r.__N && (r.__ = r.__N), r.__V = jO, r.__N = r.i = void 0; + })) : (e.__h.forEach(KO), e.__h.forEach(EA), e.__h = [], af = 0)), hE = vn; }, $t.diffed = function(t) { - C$ && C$(t); + E$ && E$(t); var e = t.__c; - e && e.__H && (e.__H.__h.length && (CZ.push(e) !== 1 && k$ === $t.requestAnimationFrame || ((k$ = $t.requestAnimationFrame) || Oye)(wye)), e.__H.__.forEach(function(r) { - r.i && (r.__H = r.i), r.__V !== ZO && (r.__ = r.__V), r.i = void 0, r.__V = ZO; - })), uE = vn = null; + e && e.__H && (e.__H.__h.length && (EZ.push(e) !== 1 && S$ === $t.requestAnimationFrame || ((S$ = $t.requestAnimationFrame) || kye)(Oye)), e.__H.__.forEach(function(r) { + r.i && (r.__H = r.i), r.__V !== jO && (r.__ = r.__V), r.i = void 0, r.__V = jO; + })), hE = vn = null; }, $t.__c = function(t, e) { e.some(function(r) { try { - r.__h.forEach(jO), r.__h = r.__h.filter(function(n) { - return !n.__ || CA(n); + r.__h.forEach(KO), r.__h = r.__h.filter(function(n) { + return !n.__ || EA(n); }); } catch (n) { e.some(function(i) { i.__h && (i.__h = []); }), e = [], $t.__e(n, r.__v); } - }), E$ && E$(t, e); + }), _$ && _$(t, e); }, $t.unmount = function(t) { - _$ && _$(t); + A$ && A$(t); var e, r = t.__c; r && r.__H && (r.__H.__.forEach(function(n) { try { - jO(n); + KO(n); } catch (i) { e = i; } }), r.__H = void 0, e && $t.__e(e, r.__v)); }; -var A$ = typeof requestAnimationFrame == "function"; -function Oye(t) { +var L$ = typeof requestAnimationFrame == "function"; +function kye(t) { var e, r = function() { - clearTimeout(n), A$ && cancelAnimationFrame(e), setTimeout(t); + clearTimeout(n), L$ && cancelAnimationFrame(e), setTimeout(t); }, n = setTimeout(r, 100); - A$ && (e = requestAnimationFrame(r)); + L$ && (e = requestAnimationFrame(r)); } -function jO(t) { +function KO(t) { var e = vn, r = t.__c; typeof r == "function" && (t.__c = void 0, r()), vn = e; } -function CA(t) { +function EA(t) { var e = vn; t.__c = t.__(), vn = e; } -function AR(t, e) { +function LR(t, e) { return !t || t.length !== e.length || e.some(function(r, n) { return r !== t[n]; }); } -function _Z(t, e) { +function AZ(t, e) { return typeof e == "function" ? e(t) : e; } -var AZ = function(t, e, r, n) { +var LZ = function(t, e, r, n) { var i; e[0] = 0; for (var s = 1; s < e.length; s++) { var a = e[s++], o = e[s] ? (e[0] |= a ? 1 : 2, r[e[s++]]) : e[++s]; - a === 3 ? n[0] = o : a === 4 ? n[1] = Object.assign(n[1] || {}, o) : a === 5 ? (n[1] = n[1] || {})[e[++s]] = o : a === 6 ? n[1][e[++s]] += o + "" : a ? (i = t.apply(o, AZ(t, o, r, ["", null])), n.push(i), o[0] ? e[0] |= 2 : (e[s - 2] = 0, e[s] = i)) : n.push(o); + a === 3 ? n[0] = o : a === 4 ? n[1] = Object.assign(n[1] || {}, o) : a === 5 ? (n[1] = n[1] || {})[e[++s]] = o : a === 6 ? n[1][e[++s]] += o + "" : a ? (i = t.apply(o, LZ(t, o, r, ["", null])), n.push(i), o[0] ? e[0] |= 2 : (e[s - 2] = 0, e[s] = i)) : n.push(o); } return n; -}, L$ = /* @__PURE__ */ new Map(); -function kye(t) { - var e = L$.get(this); - return e || (e = /* @__PURE__ */ new Map(), L$.set(this, e)), (e = AZ(this, e.get(t) || (e.set(t, e = function(r) { +}, R$ = /* @__PURE__ */ new Map(); +function Sye(t) { + var e = R$.get(this); + return e || (e = /* @__PURE__ */ new Map(), R$.set(this, e)), (e = LZ(this, e.get(t) || (e.set(t, e = function(r) { for (var n, i, s = 1, a = "", o = "", l = [0], u = function(d) { s === 1 && (d || (a = a.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? l.push(0, d, a) : s === 3 && (d || a) ? (l.push(3, d, a), s = 2) : s === 2 && a === "..." && d ? l.push(4, d, 0) : s === 2 && a && !d ? l.push(5, 0, !0, a) : s >= 5 && ((a || !d && s === 5) && (l.push(s, 0, a, i), s = 6), d && (l.push(s, d, 0, i), s = 6)), a = ""; }, h = 0; h < r.length; h++) { @@ -509,7 +509,7 @@ function kye(t) { return u(), l; }(t)), e), arguments, [])).length > 1 ? e : e[0]; } -var Bt = kye.bind(Rl), Ra = function() { +var Bt = Sye.bind(Rl), Ra = function() { return Ra = Object.assign || function(e) { for (var r, n = 1, i = arguments.length; n < i; n++) { r = arguments[n]; @@ -525,23 +525,23 @@ function Og(t, e, r) { (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 Sye(t) { +function Tye(t) { var e = /* @__PURE__ */ Object.create(null); return function(r) { return e[r] === void 0 && (e[r] = t(r)), e[r]; }; } -var Tye = /^((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)-.*))$/, Cye = /* @__PURE__ */ Sye( +var Cye = /^((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)-.*))$/, Eye = /* @__PURE__ */ Tye( function(t) { - return Tye.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; + return Cye.test(t) || t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && t.charCodeAt(2) < 91; } ); -function LZ(t, e) { +function RZ(t, e) { for (var r in e) t[r] = e[r]; return t; } -function EA(t, e) { +function _A(t, e) { for (var r in t) if (r !== "__source" && !(r in e)) return !0; @@ -550,73 +550,73 @@ function EA(t, e) { return !0; return !1; } -function _A(t) { +function AA(t) { this.props = t; } -function Eye(t, e) { +function _ye(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 : EA(this.props, i); + return !a && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !a : _A(this.props, i); } function n(i) { return this.shouldComponentUpdate = r, Rl(t, i); } return n.displayName = "Memo(" + (t.displayName || t.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n; } -(_A.prototype = new Ec()).isPureReactComponent = !0, _A.prototype.shouldComponentUpdate = function(t, e) { - return EA(this.props, t) || EA(this.state, e); +(AA.prototype = new Ec()).isPureReactComponent = !0, AA.prototype.shouldComponentUpdate = function(t, e) { + return _A(this.props, t) || _A(this.state, e); }; -var R$ = $t.__b; +var M$ = $t.__b; $t.__b = function(t) { - t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), R$ && R$(t); + t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), M$ && M$(t); }; -var _ye = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; -function Aye(t) { +var Aye = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; +function Lye(t) { function e(r) { - var n = LZ({}, r); + var n = RZ({}, r); return delete n.ref, t(n, r.ref || null); } - return e.$$typeof = _ye, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; + return e.$$typeof = Aye, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e; } -var M$ = function(t, e) { +var D$ = function(t, e) { return t == null ? null : Tu(Tu(t).map(e)); -}, Lye = { map: M$, forEach: M$, count: function(t) { +}, Rye = { map: D$, forEach: D$, count: function(t) { return t ? Tu(t).length : 0; }, only: function(t) { var e = Tu(t); if (e.length !== 1) throw "Children.only"; return e[0]; -}, toArray: Tu }, Rye = $t.__e; +}, toArray: Tu }, Mye = $t.__e; $t.__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); } - Rye(t, e, r, n); + Mye(t, e, r, n); }; -var D$ = $t.unmount; -function RZ(t, e, r) { +var N$ = $t.unmount; +function MZ(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 = LZ({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { - return RZ(n, e, r); + }), t.__c.__H = null), (t = RZ({}, t)).__c != null && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(n) { + return MZ(n, e, r); })), t; } -function MZ(t, e, r) { +function DZ(t, e, r) { return t && r && (t.__v = null, t.__k = t.__k && t.__k.map(function(n) { - return MZ(n, e, r); + return DZ(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 KO() { +function JO() { this.__u = 0, this.t = null, this.__b = null; } -function DZ(t) { +function NZ(t) { var e = t.__.__c; return e && e.__a && e.__a(t); } -function Mye(t) { +function Dye(t) { var e, r, n; function i(s) { if (e || (e = t()).then(function(a) { @@ -636,11 +636,11 @@ function hv() { } $t.unmount = function(t) { var e = t.__c; - e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), D$ && D$(t); -}, (KO.prototype = new Ec()).__c = function(t, e) { + e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), N$ && N$(t); +}, (JO.prototype = new Ec()).__c = function(t, e) { var r = e.__c, n = this; n.t == null && (n.t = []), n.t.push(r); - var i = DZ(n.__v), s = !1, a = function() { + var i = NZ(n.__v), s = !1, a = function() { s || (s = !0, r.__R = null, i ? i(o) : o()); }; r.__R = a; @@ -648,7 +648,7 @@ $t.unmount = function(t) { if (!--n.__u) { if (n.state.__a) { var l = n.state.__a; - n.__v.__k[0] = MZ(l, l.__c.__P, l.__c.__O); + n.__v.__k[0] = DZ(l, l.__c.__P, l.__c.__O); } var u; for (n.setState({ __a: n.__b = null }); u = n.t.pop(); ) @@ -656,20 +656,20 @@ $t.unmount = function(t) { } }; n.__u++ || 32 & e.__u || n.setState({ __a: n.__b = n.__v.__k[0] }), t.then(a, a); -}, KO.prototype.componentWillUnmount = function() { +}, JO.prototype.componentWillUnmount = function() { this.t = []; -}, KO.prototype.render = function(t, e) { +}, JO.prototype.render = function(t, e) { if (this.__b) { if (this.__v.__k) { var r = document.createElement("div"), n = this.__v.__k[0].__c; - this.__v.__k[0] = RZ(this.__b, r, n.__O = n.__P); + this.__v.__k[0] = MZ(this.__b, r, n.__O = n.__P); } this.__b = null; } var i = e.__a && Rl(Iu, null, t.fallback); return i && (i.__u &= -33), [Rl(Iu, null, e.__a ? null : t.children), i]; }; -var N$ = function(t, e, r) { +var I$ = 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; ) @@ -679,12 +679,12 @@ var N$ = function(t, e, r) { t.u = r = r[2]; } }; -function Dye(t) { +function Nye(t) { return this.getChildContext = function() { return t.context; }, t.children; } -function Nye(t) { +function Iye(t) { var e = this, r = t.i; e.componentWillUnmount = function() { xg(null, e.l), e.l = null, e.i = null; @@ -694,17 +694,17 @@ function Nye(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); - } }), xg(Rl(Dye, { context: e.context }, t.__v), e.l); + } }), xg(Rl(Nye, { context: e.context }, t.__v), e.l); } -function Iye(t, e) { - var r = Rl(Nye, { __v: t, i: e }); +function Pye(t, e) { + var r = Rl(Iye, { __v: t, i: e }); return r.containerInfo = e, r; } (hv.prototype = new Ec()).__a = function(t) { - var e = this, r = DZ(e.__v), n = e.o.get(t); + var e = this, r = NZ(e.__v), n = e.o.get(t); return n[0]++, function(i) { var s = function() { - e.props.revealOrder ? (n.push(i), N$(e, t, n)) : i(); + e.props.revealOrder ? (n.push(i), I$(e, t, n)) : i(); }; r ? r(s) : s(); }; @@ -718,17 +718,17 @@ function Iye(t, e) { }, hv.prototype.componentDidUpdate = hv.prototype.componentDidMount = function() { var t = this; this.o.forEach(function(e, r) { - N$(t, r, e); + I$(t, r, e); }); }; -var NZ = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Pye = /^(?: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]/, $ye = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Bye = /[A-Z0-9]/g, Fye = typeof document < "u", zye = function(t) { +var IZ = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, $ye = /^(?: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]/, Bye = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Fye = /[A-Z0-9]/g, zye = typeof document < "u", Vye = function(t) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t); }; -function Vye(t, e, r) { +function Uye(t, e, r) { return e.__k == null && (e.textContent = ""), xg(t, e), typeof r == "function" && r(), t ? t.__c : null; } -function Uye(t, e, r) { - return TZ(t, e), typeof r == "function" && r(), t ? t.__c : null; +function qye(t, e, r) { + return CZ(t, e), typeof r == "function" && r(), t ? t.__c : null; } Ec.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) { Object.defineProperty(Ec.prototype, t, { configurable: !0, get: function() { @@ -737,95 +737,95 @@ Ec.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceive Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e }); } }); }); -var I$ = $t.event; -function qye() { -} +var P$ = $t.event; function Yye() { - return this.cancelBubble; } function Qye() { + return this.cancelBubble; +} +function Wye() { return this.defaultPrevented; } $t.event = function(t) { - return I$ && (t = I$(t)), t.persist = qye, t.isPropagationStopped = Yye, t.isDefaultPrevented = Qye, t.nativeEvent = t; + return P$ && (t = P$(t)), t.persist = Yye, t.isPropagationStopped = Qye, t.isDefaultPrevented = Wye, t.nativeEvent = t; }; -var LR, Wye = { enumerable: !1, configurable: !0, get: function() { +var RR, Gye = { enumerable: !1, configurable: !0, get: function() { return this.class; -} }, P$ = $t.vnode; +} }, $$ = $t.vnode; $t.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 || Fye && s === "children" && n === "noscript" || s === "class" || s === "className")) { + if (!(s === "value" && "defaultValue" in r && a == null || zye && 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" || zye(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : $ye.test(s) ? s = o : n.indexOf("-") === -1 && Pye.test(s) ? s = s.replace(Bye, "-$&").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" || Vye(r.type) ? o === "onfocus" ? s = "onfocusin" : o === "onblur" ? s = "onfocusout" : Bye.test(s) ? s = o : n.indexOf("-") === -1 && $ye.test(s) ? s = s.replace(Fye, "-$&").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 = Tu(r.children).forEach(function(l) { l.props.selected = i.value.indexOf(l.props.value) != -1; })), n == "select" && i.defaultValue != null && (i.value = Tu(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", Wye)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; - }(t), t.$$typeof = NZ, P$ && P$(t); + })), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", Gye)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), e.props = i; + }(t), t.$$typeof = IZ, $$ && $$(t); }; -var $$ = $t.__r; +var B$ = $t.__r; $t.__r = function(t) { - $$ && $$(t), LR = t.__c; + B$ && B$(t), RR = t.__c; }; -var B$ = $t.diffed; +var F$ = $t.diffed; $t.diffed = function(t) { - B$ && B$(t); + F$ && F$(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), LR = null; + r != null && t.type === "textarea" && "value" in e && e.value !== r.value && (r.value = e.value == null ? "" : e.value), RR = null; }; -var Gye = { ReactCurrentDispatcher: { current: { readContext: function(t) { - return LR.__n[t.__c].props.value; +var Hye = { ReactCurrentDispatcher: { current: { readContext: function(t) { + return RR.__n[t.__c].props.value; } } } }; -function Hye(t) { +function Xye(t) { return Rl.bind(null, t); } -function AS(t) { - return !!t && t.$$typeof === NZ; -} -function Xye(t) { - return AS(t) && t.type === Iu; +function LS(t) { + return !!t && t.$$typeof === IZ; } function Zye(t) { - return AS(t) ? vye.apply(null, arguments) : t; + return LS(t) && t.type === Iu; } function jye(t) { - return !!t.__k && (xg(null, t), !0); + return LS(t) ? yye.apply(null, arguments) : t; } function Kye(t) { + return !!t.__k && (xg(null, t), !0); +} +function Jye(t) { return t && (t.base || t.nodeType === 1 && t) || null; } -var Jye = function(t, e) { +var e2e = function(t, e) { return t(e); -}, e2e = function(t, e) { +}, t2e = function(t, e) { return t(e); -}, t2e = Iu; -function IZ(t) { +}, r2e = Iu; +function PZ(t) { t(); } -function r2e(t) { +function n2e(t) { return t; } -function n2e() { - return [!1, IZ]; +function i2e() { + return [!1, PZ]; } -var i2e = _S, s2e = AS; -function a2e(t, e) { +var s2e = AS, a2e = LS; +function o2e(t, e) { var r = e(), n = Rn({ h: { __: r, v: e } }), i = n[0].h, s = n[1]; - return _S(function() { - i.__ = r, i.v = e, hE(i) && s({ h: i }); + return AS(function() { + i.__ = r, i.v = e, fE(i) && s({ h: i }); }, [t, r, e]), Yi(function() { - return hE(i) && s({ h: i }), t(function() { - hE(i) && s({ h: i }); + return fE(i) && s({ h: i }), t(function() { + fE(i) && s({ h: i }); }); }, [t]), r; } -function hE(t) { +function fE(t) { var e, r, n = t.v, i = t.__; try { var s = n(); @@ -834,11 +834,11 @@ function hE(t) { return !0; } } -var Hd = { useState: Rn, useId: xye, useReducer: ES, useEffect: Yi, useLayoutEffect: _S, useInsertionEffect: i2e, useTransition: n2e, useDeferredValue: r2e, useSyncExternalStore: a2e, startTransition: IZ, useRef: so, useImperativeHandle: bye, useMemo: Nn, useCallback: g5, useContext: EZ, useDebugValue: TA, version: "17.0.2", Children: Lye, render: Vye, hydrate: Uye, unmountComponentAtNode: jye, createPortal: Iye, createElement: Rl, createContext: yye, createFactory: Hye, cloneElement: Zye, createRef: fye, Fragment: Iu, isValidElement: AS, isElement: s2e, isFragment: Xye, findDOMNode: Kye, Component: Ec, PureComponent: _A, memo: Eye, forwardRef: Aye, flushSync: e2e, unstable_batchedUpdates: Jye, StrictMode: t2e, Suspense: KO, SuspenseList: hv, lazy: Mye, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Gye }, qc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function PZ(t) { +var Hd = { useState: Rn, useId: wye, useReducer: _S, useEffect: Yi, useLayoutEffect: AS, useInsertionEffect: s2e, useTransition: i2e, useDeferredValue: n2e, useSyncExternalStore: o2e, startTransition: PZ, useRef: so, useImperativeHandle: xye, useMemo: Nn, useCallback: m5, useContext: _Z, useDebugValue: CA, version: "17.0.2", Children: Rye, render: Uye, hydrate: qye, unmountComponentAtNode: Kye, createPortal: Pye, createElement: Rl, createContext: bye, createFactory: Xye, cloneElement: jye, createRef: dye, Fragment: Iu, isValidElement: LS, isElement: a2e, isFragment: Zye, findDOMNode: Jye, Component: Ec, PureComponent: AA, memo: _ye, forwardRef: Lye, flushSync: t2e, unstable_batchedUpdates: e2e, StrictMode: r2e, Suspense: JO, SuspenseList: hv, lazy: Dye, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Hye }, qc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function $Z(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -function $Z(t) { +function BZ(t) { var e = t.default; if (typeof e == "function") { var r = function() { @@ -859,7 +859,7 @@ function $Z(t) { }); }), r; } -var o2e = function(e, r, n, i) { +var l2e = function(e, r, n, i) { var s = n ? n.call(i, e, r) : void 0; if (s !== void 0) return !!s; @@ -879,11 +879,11 @@ var o2e = function(e, r, n, i) { return !1; } return !0; -}, pn = "-ms-", qv = "-moz-", Fr = "-webkit-", BZ = "comm", LS = "rule", RR = "decl", l2e = "@import", FZ = "@keyframes", c2e = "@layer", u2e = Math.abs, MR = String.fromCharCode, AA = Object.assign; -function h2e(t, e) { +}, pn = "-ms-", qv = "-moz-", Fr = "-webkit-", FZ = "comm", RS = "rule", MR = "decl", c2e = "@import", zZ = "@keyframes", u2e = "@layer", h2e = Math.abs, DR = String.fromCharCode, LA = Object.assign; +function f2e(t, e) { return Ui(t, 0) ^ 45 ? (((e << 2 ^ Ui(t, 0)) << 2 ^ Ui(t, 1)) << 2 ^ Ui(t, 2)) << 2 ^ Ui(t, 3) : 0; } -function zZ(t) { +function VZ(t) { return t.trim(); } function fu(t, e) { @@ -892,7 +892,7 @@ function fu(t, e) { function vr(t, e, r) { return t.replace(e, r); } -function JO(t, e) { +function e4(t, e) { return t.indexOf(e); } function Ui(t, e) { @@ -904,51 +904,51 @@ function kg(t, e, r) { function lc(t) { return t.length; } -function VZ(t) { +function UZ(t) { return t.length; } function fv(t, e) { return e.push(t), t; } -function f2e(t, e) { +function d2e(t, e) { return t.map(e).join(""); } -function F$(t, e) { +function z$(t, e) { return t.filter(function(r) { return !fu(r, e); }); } -var RS = 1, Sg = 1, UZ = 0, Vo = 0, li = 0, N1 = ""; -function MS(t, e, r, n, i, s, a, o) { - return { value: t, root: e, parent: r, type: n, props: i, children: s, line: RS, column: Sg, length: a, return: "", siblings: o }; +var MS = 1, Sg = 1, qZ = 0, Vo = 0, li = 0, N1 = ""; +function DS(t, e, r, n, i, s, a, o) { + return { value: t, root: e, parent: r, type: n, props: i, children: s, line: MS, column: Sg, length: a, return: "", siblings: o }; } function wh(t, e) { - return AA(MS("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); + return LA(DS("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, e); } function lp(t) { for (; t.root; ) t = wh(t.root, { children: [t] }); fv(t, t.siblings); } -function d2e() { +function p2e() { return li; } -function p2e() { - return li = Vo > 0 ? Ui(N1, --Vo) : 0, Sg--, li === 10 && (Sg = 1, RS--), li; +function g2e() { + return li = Vo > 0 ? Ui(N1, --Vo) : 0, Sg--, li === 10 && (Sg = 1, MS--), li; } function bl() { - return li = Vo < UZ ? Ui(N1, Vo++) : 0, Sg++, li === 10 && (Sg = 1, RS++), li; + return li = Vo < qZ ? Ui(N1, Vo++) : 0, Sg++, li === 10 && (Sg = 1, MS++), li; } function zd() { return Ui(N1, Vo); } -function e4() { +function t4() { return Vo; } -function DS(t, e) { +function NS(t, e) { return kg(N1, t, e); } -function LA(t) { +function RA(t) { switch (t) { case 0: case 9: @@ -980,36 +980,36 @@ function LA(t) { } return 0; } -function g2e(t) { - return RS = Sg = 1, UZ = lc(N1 = t), Vo = 0, []; -} function m2e(t) { + return MS = Sg = 1, qZ = lc(N1 = t), Vo = 0, []; +} +function v2e(t) { return N1 = "", t; } -function fE(t) { - return zZ(DS(Vo - 1, RA(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); +function dE(t) { + return VZ(NS(Vo - 1, MA(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); } -function v2e(t) { +function y2e(t) { for (; (li = zd()) && li < 33; ) bl(); - return LA(t) > 2 || LA(li) > 3 ? "" : " "; + return RA(t) > 2 || RA(li) > 3 ? "" : " "; } -function y2e(t, e) { +function b2e(t, e) { for (; --e && bl() && !(li < 48 || li > 102 || li > 57 && li < 65 || li > 70 && li < 97); ) ; - return DS(t, e4() + (e < 6 && zd() == 32 && bl() == 32)); + return NS(t, t4() + (e < 6 && zd() == 32 && bl() == 32)); } -function RA(t) { +function MA(t) { for (; bl(); ) switch (li) { case t: return Vo; case 34: case 39: - t !== 34 && t !== 39 && RA(li); + t !== 34 && t !== 39 && MA(li); break; case 40: - t === 41 && RA(t); + t === 41 && MA(t); break; case 92: bl(); @@ -1017,47 +1017,47 @@ function RA(t) { } return Vo; } -function b2e(t, e) { +function x2e(t, e) { for (; bl() && t + li !== 47 + 10; ) if (t + li === 42 + 42 && zd() === 47) break; - return "/*" + DS(e, Vo - 1) + "*" + MR(t === 47 ? t : bl()); + return "/*" + NS(e, Vo - 1) + "*" + DR(t === 47 ? t : bl()); } -function x2e(t) { - for (; !LA(zd()); ) +function w2e(t) { + for (; !RA(zd()); ) bl(); - return DS(t, Vo); + return NS(t, Vo); } -function w2e(t) { - return m2e(t4("", null, null, null, [""], t = g2e(t), 0, [0], t)); +function O2e(t) { + return v2e(r4("", null, null, null, [""], t = m2e(t), 0, [0], t)); } -function t4(t, e, r, n, i, s, a, o, l) { +function r4(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 = bl()) { case 40: if (g != 108 && Ui(T, f - 1) == 58) { - JO(T += vr(fE(b), "&", "&\f"), "&\f") != -1 && (y = -1); + e4(T += vr(dE(b), "&", "&\f"), "&\f") != -1 && (y = -1); break; } case 34: case 39: case 91: - T += fE(b); + T += dE(b); break; case 9: case 10: case 13: case 32: - T += v2e(g); + T += y2e(g); break; case 92: - T += y2e(e4() - 1, 7); + T += b2e(t4() - 1, 7); continue; case 47: switch (zd()) { case 42: case 47: - fv(O2e(b2e(bl(), e4()), e, r, l), l); + fv(k2e(x2e(bl(), t4()), e, r, l), l); break; default: T += "/"; @@ -1073,24 +1073,24 @@ function t4(t, e, r, n, i, s, a, o, l) { case 125: v = 0; case 59 + h: - y == -1 && (T = vr(T, /\f/g, "")), p > 0 && lc(T) - f && fv(p > 32 ? V$(T + ";", n, r, f - 1, l) : V$(vr(T, " ", "") + ";", n, r, f - 2, l), l); + y == -1 && (T = vr(T, /\f/g, "")), p > 0 && lc(T) - f && fv(p > 32 ? U$(T + ";", n, r, f - 1, l) : U$(vr(T, " ", "") + ";", n, r, f - 2, l), l); break; case 59: T += ";"; default: - if (fv(C = z$(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) + if (fv(C = V$(T, e, r, u, h, i, o, w, O = [], S = [], f, s), s), b === 123) if (h === 0) - t4(T, e, C, C, O, s, f, o, S); + r4(T, e, C, C, O, s, f, o, S); else switch (d === 99 && Ui(T, 3) === 110 ? 100 : d) { case 100: case 108: case 109: case 115: - t4(t, C, C, n && fv(z$(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); + r4(t, C, C, n && fv(V$(t, C, C, 0, 0, i, o, w, i, O = [], f, S), S), i, S, f, o, n ? O : S); break; default: - t4(T, C, C, C, [""], S, 0, o, S); + r4(T, C, C, C, [""], S, 0, o, S); } } u = h = p = 0, m = y = 1, w = T = "", f = a; @@ -1101,10 +1101,10 @@ function t4(t, e, r, n, i, s, a, o, l) { if (m < 1) { if (b == 123) --m; - else if (b == 125 && m++ == 0 && p2e() == 125) + else if (b == 125 && m++ == 0 && g2e() == 125) continue; } - switch (T += MR(b), b * m) { + switch (T += DR(b), b * m) { case 38: y = h > 0 ? 1 : (T += "\f", -1); break; @@ -1112,7 +1112,7 @@ function t4(t, e, r, n, i, s, a, o, l) { o[u++] = (lc(T) - 1) * y, y = 1; break; case 64: - zd() === 45 && (T += fE(bl())), d = zd(), h = f = lc(w = T += x2e(e4())), b++; + zd() === 45 && (T += dE(bl())), d = zd(), h = f = lc(w = T += w2e(t4())), b++; break; case 45: g === 45 && lc(T) == 2 && (m = 0); @@ -1120,20 +1120,20 @@ function t4(t, e, r, n, i, s, a, o, l) { } return s; } -function z$(t, e, r, n, i, s, a, o, l, u, h, f) { - for (var d = i - 1, p = i === 0 ? s : [""], g = VZ(p), m = 0, v = 0, y = 0; m < n; ++m) - for (var b = 0, w = kg(t, d + 1, d = u2e(v = a[m])), O = t; b < g; ++b) - (O = zZ(v > 0 ? p[b] + " " + w : vr(w, /&\f/g, p[b]))) && (l[y++] = O); - return MS(t, e, r, i === 0 ? LS : o, l, u, h, f); +function V$(t, e, r, n, i, s, a, o, l, u, h, f) { + for (var d = i - 1, p = i === 0 ? s : [""], g = UZ(p), m = 0, v = 0, y = 0; m < n; ++m) + for (var b = 0, w = kg(t, d + 1, d = h2e(v = a[m])), O = t; b < g; ++b) + (O = VZ(v > 0 ? p[b] + " " + w : vr(w, /&\f/g, p[b]))) && (l[y++] = O); + return DS(t, e, r, i === 0 ? RS : o, l, u, h, f); } -function O2e(t, e, r, n) { - return MS(t, e, r, BZ, MR(d2e()), kg(t, 2, -2), 0, n); +function k2e(t, e, r, n) { + return DS(t, e, r, FZ, DR(p2e()), kg(t, 2, -2), 0, n); } -function V$(t, e, r, n, i) { - return MS(t, e, r, RR, kg(t, 0, n), kg(t, n + 1, -1), n, i); +function U$(t, e, r, n, i) { + return DS(t, e, r, MR, kg(t, 0, n), kg(t, n + 1, -1), n, i); } -function qZ(t, e, r) { - switch (h2e(t, e)) { +function YZ(t, e, r) { + switch (f2e(t, e)) { case 5103: return Fr + "print-" + t + t; case 5737: @@ -1217,7 +1217,7 @@ function qZ(t, e, r) { case 3616: return r && r.some(function(n, i) { return e = i, fu(n.props, /grid-\w+-end/); - }) ? ~JO(t + (r = r[e].value), "span") ? t : pn + vr(t, "-start", "") + t + pn + "grid-row-span:" + (~JO(r, "span") ? fu(r, /\d+/) : +fu(r, /\d+/) - +fu(t, /\d+/)) + ";" : pn + vr(t, "-start", "") + t; + }) ? ~e4(t + (r = r[e].value), "span") ? t : pn + vr(t, "-start", "") + t + pn + "grid-row-span:" + (~e4(r, "span") ? fu(r, /\d+/) : +fu(r, /\d+/) - +fu(t, /\d+/)) + ";" : pn + vr(t, "-start", "") + t; case 4896: case 4128: return r && r.some(function(n) { @@ -1248,7 +1248,7 @@ function qZ(t, e, r) { case 102: return vr(t, /(.+:)(.+)-([^]+)/, "$1" + Fr + "$2-$3$1" + qv + (Ui(t, e + 3) == 108 ? "$3" : "$2-$3")) + t; case 115: - return ~JO(t, "stretch") ? qZ(vr(t, "stretch", "fill-available"), e, r) + t : t; + return ~e4(t, "stretch") ? YZ(vr(t, "stretch", "fill-available"), e, r) + t : t; } break; case 5152: @@ -1277,67 +1277,67 @@ function qZ(t, e, r) { } return t; } -function m5(t, e) { +function v5(t, e) { for (var r = "", n = 0; n < t.length; n++) r += e(t[n], n, t, e) || ""; return r; } -function k2e(t, e, r, n) { +function S2e(t, e, r, n) { switch (t.type) { - case c2e: + case u2e: if (t.children.length) break; - case l2e: - case RR: + case c2e: + case MR: return t.return = t.return || t.value; - case BZ: - return ""; case FZ: - return t.return = t.value + "{" + m5(t.children, n) + "}"; - case LS: + return ""; + case zZ: + return t.return = t.value + "{" + v5(t.children, n) + "}"; + case RS: if (!lc(t.value = t.props.join(","))) return ""; } - return lc(r = m5(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; + return lc(r = v5(t.children, n)) ? t.return = t.value + "{" + r + "}" : ""; } -function S2e(t) { - var e = VZ(t); +function T2e(t) { + var e = UZ(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 T2e(t) { +function C2e(t) { return function(e) { e.root || (e = e.return) && t(e); }; } -function C2e(t, e, r, n) { +function E2e(t, e, r, n) { if (t.length > -1 && !t.return) switch (t.type) { - case RR: - t.return = qZ(t.value, t.length, r); + case MR: + t.return = YZ(t.value, t.length, r); return; - case FZ: - return m5([wh(t, { value: vr(t.value, "@", "@" + Fr) })], n); - case LS: + case zZ: + return v5([wh(t, { value: vr(t.value, "@", "@" + Fr) })], n); + case RS: if (t.length) - return f2e(r = t.props, function(i) { + return d2e(r = t.props, function(i) { switch (fu(i, n = /(::plac\w+|:read-\w+)/)) { case ":read-only": case ":read-write": - lp(wh(t, { props: [vr(i, /:(read-\w+)/, ":" + qv + "$1")] })), lp(wh(t, { props: [i] })), AA(t, { props: F$(r, n) }); + lp(wh(t, { props: [vr(i, /:(read-\w+)/, ":" + qv + "$1")] })), lp(wh(t, { props: [i] })), LA(t, { props: z$(r, n) }); break; case "::placeholder": - lp(wh(t, { props: [vr(i, /:(plac\w+)/, ":" + Fr + "input-$1")] })), lp(wh(t, { props: [vr(i, /:(plac\w+)/, ":" + qv + "$1")] })), lp(wh(t, { props: [vr(i, /:(plac\w+)/, pn + "input-$1")] })), lp(wh(t, { props: [i] })), AA(t, { props: F$(r, n) }); + lp(wh(t, { props: [vr(i, /:(plac\w+)/, ":" + Fr + "input-$1")] })), lp(wh(t, { props: [vr(i, /:(plac\w+)/, ":" + qv + "$1")] })), lp(wh(t, { props: [vr(i, /:(plac\w+)/, pn + "input-$1")] })), lp(wh(t, { props: [i] })), LA(t, { props: z$(r, n) }); break; } return ""; }); } } -var E2e = { +var _2e = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, @@ -1384,8 +1384,8 @@ var E2e = { strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 -}, Xd = typeof process < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", YZ = "active", QZ = "data-styled-version", NS = "6.1.2", DR = `/*!sc*/ -`, NR = typeof window < "u" && "HTMLElement" in window, _2e = 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"), U$ = /invalid hook call/i, aw = /* @__PURE__ */ new Set(), A2e = function(t, e) { +}, Xd = typeof process < "u" && {} !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled", QZ = "active", WZ = "data-styled-version", IS = "6.1.2", NR = `/*!sc*/ +`, IR = typeof window < "u" && "HTMLElement" in window, A2e = 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"), q$ = /invalid hook call/i, aw = /* @__PURE__ */ new Set(), L2e = 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. @@ -1395,67 +1395,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]; - U$.test(a) ? (s = !1, aw.delete(n)) : i.apply(void 0, Og([a], o, !1)); + q$.test(a) ? (s = !1, aw.delete(n)) : i.apply(void 0, Og([a], o, !1)); }, so(), s && !aw.has(n) && (console.warn(n), aw.add(n)); } catch (a) { - U$.test(a.message) && aw.delete(n); + q$.test(a.message) && aw.delete(n); } finally { console.error = i; } } -}, IS = Object.freeze([]), Tg = Object.freeze({}); -function L2e(t, e, r) { +}, PS = Object.freeze([]), Tg = Object.freeze({}); +function R2e(t, e, r) { return r === void 0 && (r = Tg), t.theme !== r.theme && t.theme || e || r.theme; } -var MA = /* @__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"]), R2e = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, M2e = /(^-|-$)/g; -function q$(t) { - return t.replace(R2e, "-").replace(M2e, ""); +var DA = /* @__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"]), M2e = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, D2e = /(^-|-$)/g; +function Y$(t) { + return t.replace(M2e, "-").replace(D2e, ""); } -var D2e = /(a)(d)/gi, ow = 52, Y$ = function(t) { +var N2e = /(a)(d)/gi, ow = 52, Q$ = function(t) { return String.fromCharCode(t + (t > 25 ? 39 : 97)); }; -function DA(t) { +function NA(t) { var e, r = ""; for (e = Math.abs(t); e > ow; e = e / ow | 0) - r = Y$(e % ow) + r; - return (Y$(e % ow) + r).replace(D2e, "$1-$2"); + r = Q$(e % ow) + r; + return (Q$(e % ow) + r).replace(N2e, "$1-$2"); } -var dE, WZ = 5381, md = function(t, e) { +var pE, GZ = 5381, md = function(t, e) { for (var r = e.length; r; ) t = 33 * t ^ e.charCodeAt(--r); return t; -}, GZ = function(t) { - return md(WZ, t); +}, HZ = function(t) { + return md(GZ, t); }; -function N2e(t) { - return DA(GZ(t) >>> 0); +function I2e(t) { + return NA(HZ(t) >>> 0); } -function HZ(t) { +function XZ(t) { return {}.NODE_ENV !== "production" && typeof t == "string" && t || t.displayName || t.name || "Component"; } -function pE(t) { +function gE(t) { return typeof t == "string" && ({}.NODE_ENV === "production" || t.charAt(0) === t.charAt(0).toLowerCase()); } -var XZ = typeof Symbol == "function" && Symbol.for, ZZ = XZ ? Symbol.for("react.memo") : 60115, I2e = XZ ? Symbol.for("react.forward_ref") : 60112, P2e = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, $2e = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, jZ = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, B2e = ((dE = {})[I2e] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, dE[ZZ] = jZ, dE); -function Q$(t) { - return ("type" in (e = t) && e.type.$$typeof) === ZZ ? jZ : "$$typeof" in t ? B2e[t.$$typeof] : P2e; +var ZZ = typeof Symbol == "function" && Symbol.for, jZ = ZZ ? Symbol.for("react.memo") : 60115, P2e = ZZ ? Symbol.for("react.forward_ref") : 60112, $2e = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, B2e = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, KZ = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, F2e = ((pE = {})[P2e] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, pE[jZ] = KZ, pE); +function W$(t) { + return ("type" in (e = t) && e.type.$$typeof) === jZ ? KZ : "$$typeof" in t ? F2e[t.$$typeof] : $2e; var e; } -var F2e = Object.defineProperty, z2e = Object.getOwnPropertyNames, W$ = Object.getOwnPropertySymbols, V2e = Object.getOwnPropertyDescriptor, U2e = Object.getPrototypeOf, G$ = Object.prototype; -function KZ(t, e, r) { +var z2e = Object.defineProperty, V2e = Object.getOwnPropertyNames, G$ = Object.getOwnPropertySymbols, U2e = Object.getOwnPropertyDescriptor, q2e = Object.getPrototypeOf, H$ = Object.prototype; +function JZ(t, e, r) { if (typeof e != "string") { - if (G$) { - var n = U2e(e); - n && n !== G$ && KZ(t, n, r); + if (H$) { + var n = q2e(e); + n && n !== H$ && JZ(t, n, r); } - var i = z2e(e); - W$ && (i = i.concat(W$(e))); - for (var s = Q$(t), a = Q$(e), o = 0; o < i.length; ++o) { + var i = V2e(e); + G$ && (i = i.concat(G$(e))); + for (var s = W$(t), a = W$(e), o = 0; o < i.length; ++o) { var l = i[o]; - if (!(l in $2e || r && r[l] || a && l in a || s && l in s)) { - var u = V2e(e, l); + if (!(l in B2e || r && r[l] || a && l in a || s && l in s)) { + var u = U2e(e, l); try { - F2e(t, l, u); + z2e(t, l, u); } catch { } } @@ -1466,13 +1466,13 @@ function KZ(t, e, r) { function Cg(t) { return typeof t == "function"; } -function IR(t) { +function PR(t) { return typeof t == "object" && "styledComponentId" in t; } function Ed(t, e) { return t && e ? "".concat(t, " ").concat(e) : t || e || ""; } -function H$(t, e) { +function X$(t, e) { if (t.length === 0) return ""; for (var r = t[0], n = 1; n < t.length; n++) @@ -1482,21 +1482,21 @@ function H$(t, e) { function Eg(t) { return t !== null && typeof t == "object" && t.constructor.name === Object.name && !("props" in t && t.$$typeof); } -function NA(t, e, r) { +function IA(t, e, r) { if (r === void 0 && (r = !1), !r && !Eg(t) && !Array.isArray(t)) return e; if (Array.isArray(e)) for (var n = 0; n < e.length; n++) - t[n] = NA(t[n], e[n]); + t[n] = IA(t[n], e[n]); else if (Eg(e)) for (var n in e) - t[n] = NA(t[n], e[n]); + t[n] = IA(t[n], e[n]); return t; } -function PR(t, e) { +function $R(t, e) { Object.defineProperty(t, "toString", { value: e }); } -var q2e = {}.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s. +var Y2e = {}.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. @@ -1538,7 +1538,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 Y2e() { +function Q2e() { 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) @@ -1550,9 +1550,9 @@ function Y2e() { function I1(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(Y2e.apply(void 0, Og([q2e[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(Q2e.apply(void 0, Og([Y2e[t]], e, !1)).trim()); } -var Q2e = function() { +var W2e = function() { function t(e) { this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e; } @@ -1583,50 +1583,50 @@ var Q2e = 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(DR); + r += "".concat(this.tag.getRule(a)).concat(NR); return r; }, t; -}(), r4 = /* @__PURE__ */ new Map(), v5 = /* @__PURE__ */ new Map(), n4 = 1, lw = function(t) { - if (r4.has(t)) - return r4.get(t); - for (; v5.has(n4); ) - n4++; - var e = n4++; +}(), n4 = /* @__PURE__ */ new Map(), y5 = /* @__PURE__ */ new Map(), i4 = 1, lw = function(t) { + if (n4.has(t)) + return n4.get(t); + for (; y5.has(i4); ) + i4++; + var e = i4++; if ({}.NODE_ENV !== "production" && ((0 | e) < 0 || e > 1073741824)) throw I1(16, "".concat(e)); - return r4.set(t, e), v5.set(e, t), e; -}, W2e = function(t, e) { - n4 = e + 1, r4.set(t, e), v5.set(e, t); -}, G2e = "style[".concat(Xd, "][").concat(QZ, '="').concat(NS, '"]'), H2e = new RegExp("^".concat(Xd, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), X2e = function(t, e, r) { + return n4.set(t, e), y5.set(e, t), e; +}, G2e = function(t, e) { + i4 = e + 1, n4.set(t, e), y5.set(e, t); +}, H2e = "style[".concat(Xd, "][").concat(WZ, '="').concat(IS, '"]'), X2e = new RegExp("^".concat(Xd, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Z2e = 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); -}, Z2e = function(t, e) { - for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split(DR), i = [], s = 0, a = n.length; s < a; s++) { +}, j2e = function(t, e) { + for (var r, n = ((r = e.textContent) !== null && r !== void 0 ? r : "").split(NR), i = [], s = 0, a = n.length; s < a; s++) { var o = n[s].trim(); if (o) { - var l = o.match(H2e); + var l = o.match(X2e); if (l) { var u = 0 | parseInt(l[1], 10), h = l[2]; - u !== 0 && (W2e(h, u), X2e(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; + u !== 0 && (G2e(h, u), Z2e(t, h, l[3]), t.getTag().insertRules(u, i)), i.length = 0; } else i.push(o); } } }; -function j2e() { +function K2e() { return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null; } -var JZ = function(t) { +var ej = function(t) { var e = document.head, r = t || e, n = document.createElement("style"), i = function(o) { var l = Array.from(o.querySelectorAll("style[".concat(Xd, "]"))); return l[l.length - 1]; }(r), s = i !== void 0 ? i.nextSibling : null; - n.setAttribute(Xd, YZ), n.setAttribute(QZ, NS); - var a = j2e(); + n.setAttribute(Xd, QZ), n.setAttribute(WZ, IS); + var a = K2e(); return a && n.setAttribute("nonce", a), r.insertBefore(n, s), n; -}, K2e = function() { +}, J2e = function() { function t(e) { - this.element = JZ(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) { + this.element = ej(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++) { @@ -1649,9 +1649,9 @@ var JZ = function(t) { var r = this.sheet.cssRules[e]; return r && r.cssText ? r.cssText : ""; }, t; -}(), J2e = function() { +}(), ebe = function() { function t(e) { - this.element = JZ(e), this.nodes = this.element.childNodes, this.length = 0; + this.element = ej(e), this.nodes = this.element.childNodes, this.length = 0; } return t.prototype.insertRule = function(e, r) { if (e <= this.length && e >= 0) { @@ -1664,7 +1664,7 @@ var JZ = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.nodes[e].textContent : ""; }, t; -}(), ebe = function() { +}(), tbe = function() { function t(e) { this.rules = [], this.length = 0; } @@ -1675,20 +1675,20 @@ var JZ = function(t) { }, t.prototype.getRule = function(e) { return e < this.length ? this.rules[e] : ""; }, t; -}(), X$ = NR, tbe = { isServer: !NR, useCSSOMInjection: !_2e }, ej = function() { +}(), Z$ = IR, rbe = { isServer: !IR, useCSSOMInjection: !A2e }, tj = function() { function t(e, r, n) { e === void 0 && (e = Tg), r === void 0 && (r = {}); var i = this; - this.options = Ra(Ra({}, tbe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && NR && X$ && (X$ = !1, function(s) { - for (var a = document.querySelectorAll(G2e), o = 0, l = a.length; o < l; o++) { + this.options = Ra(Ra({}, rbe), e), this.gs = r, this.names = new Map(n), this.server = !!e.isServer, !this.server && IR && Z$ && (Z$ = !1, function(s) { + for (var a = document.querySelectorAll(H2e), o = 0, l = a.length; o < l; o++) { var u = a[o]; - u && u.getAttribute(Xd) !== YZ && (Z2e(s, u), u.parentNode && u.parentNode.removeChild(u)); + u && u.getAttribute(Xd) !== QZ && (j2e(s, u), u.parentNode && u.parentNode.removeChild(u)); } - }(this)), PR(this, function() { + }(this)), $R(this, function() { return function(s) { for (var a = s.getTag(), o = a.length, l = "", u = function(f) { var d = function(y) { - return v5.get(y); + return y5.get(y); }(f); if (d === void 0) return "continue"; @@ -1698,7 +1698,7 @@ var JZ = function(t) { var m = "".concat(Xd, ".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(DR); + }), l += "".concat(g).concat(m, '{content:"').concat(v, '"}').concat(NR); }, h = 0; h < o; h++) u(h); return l; @@ -1714,8 +1714,8 @@ var JZ = 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 ebe(i) : n ? new K2e(i) : new J2e(i); - }(this.options), new Q2e(e))); + return r.isServer ? new tbe(i) : n ? new J2e(i) : new ebe(i); + }(this.options), new W2e(e))); var e; }, t.prototype.hasNameForId = function(e, r) { return this.names.has(e) && this.names.get(e).has(r); @@ -1735,118 +1735,118 @@ var JZ = function(t) { }, t.prototype.clearTag = function() { this.tag = void 0; }, t; -}(), rbe = /&/g, nbe = /^\s*\/\/.*$/gm; -function tj(t, e) { +}(), nbe = /&/g, ibe = /^\s*\/\/.*$/gm; +function rj(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 = tj(r.children, e)), r; + })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = rj(r.children, e)), r; }); } -function rj(t) { - var e, r, n, i = t === void 0 ? Tg : t, s = i.options, a = s === void 0 ? Tg : s, o = i.plugins, l = o === void 0 ? IS : o, u = function(d, p, g) { +function nj(t) { + var e, r, n, i = t === void 0 ? Tg : t, s = i.options, a = s === void 0 ? Tg : s, o = i.plugins, l = o === void 0 ? PS : 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 === LS && d.value.includes("&") && (d.props[0] = d.props[0].replace(rbe, r).replace(n, u)); - }), a.prefix && h.push(C2e), h.push(k2e); + d.type === RS && d.value.includes("&") && (d.props[0] = d.props[0].replace(nbe, r).replace(n, u)); + }), a.prefix && h.push(E2e), h.push(S2e); 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(nbe, ""), y = w2e(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); - a.namespace && (y = tj(y, a.namespace)); + var v = d.replace(ibe, ""), y = O2e(g || p ? "".concat(g, " ").concat(p, " { ").concat(v, " }") : v); + a.namespace && (y = rj(y, a.namespace)); var b = []; - return m5(y, S2e(h.concat(T2e(function(w) { + return v5(y, T2e(h.concat(C2e(function(w) { return b.push(w); })))), b; }; return f.hash = l.length ? l.reduce(function(d, p) { return p.name || I1(15), md(d, p.name); - }, WZ).toString() : "", f; + }, GZ).toString() : "", f; } -var ibe = new ej(), IA = rj(), $R = Hd.createContext({ shouldForwardProp: void 0, styleSheet: ibe, stylis: IA }); -$R.Consumer; -var sbe = Hd.createContext(void 0); -function PA() { - return EZ($R); +var sbe = new tj(), PA = nj(), BR = Hd.createContext({ shouldForwardProp: void 0, styleSheet: sbe, stylis: PA }); +BR.Consumer; +var abe = Hd.createContext(void 0); +function $A() { + return _Z(BR); } -function abe(t) { - var e = Rn(t.stylisPlugins), r = e[0], n = e[1], i = PA().styleSheet, s = Nn(function() { +function obe(t) { + var e = Rn(t.stylisPlugins), r = e[0], n = e[1], i = $A().styleSheet, s = Nn(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 = Nn(function() { - return rj({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); + return nj({ options: { namespace: t.namespace, prefix: t.enableVendorPrefixes }, plugins: r }); }, [t.enableVendorPrefixes, t.namespace, r]); Yi(function() { - o2e(r, t.stylisPlugins) || n(t.stylisPlugins); + l2e(r, t.stylisPlugins) || n(t.stylisPlugins); }, [t.stylisPlugins]); var o = Nn(function() { return { shouldForwardProp: t.shouldForwardProp, styleSheet: s, stylis: a }; }, [t.shouldForwardProp, s, a]); - return Hd.createElement($R.Provider, { value: o }, Hd.createElement(sbe.Provider, { value: a }, t.children)); + return Hd.createElement(BR.Provider, { value: o }, Hd.createElement(abe.Provider, { value: a }, t.children)); } -var Z$ = function() { +var j$ = function() { function t(e, r) { var n = this; this.inject = function(i, s) { - s === void 0 && (s = IA); + s === void 0 && (s = PA); 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, PR(this, function() { + }, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = r, $R(this, function() { throw I1(12, String(n.name)); }); } return t.prototype.getName = function(e) { - return e === void 0 && (e = IA), this.name + e.hash; + return e === void 0 && (e = PA), this.name + e.hash; }, t; -}(), obe = function(t) { +}(), lbe = function(t) { return t >= "A" && t <= "Z"; }; -function j$(t) { +function K$(t) { for (var e = "", r = 0; r < t.length; r++) { var n = t[r]; if (r === 1 && n === "-" && t[0] === "-") return t; - obe(n) ? e += "-" + n.toLowerCase() : e += n; + lbe(n) ? e += "-" + n.toLowerCase() : e += n; } return e.startsWith("ms-") ? "-" + e : e; } -var nj = function(t) { +var ij = function(t) { return t == null || t === !1 || t === ""; -}, ij = function(t) { +}, sj = function(t) { var e, r, n = []; for (var i in t) { var s = t[i]; - t.hasOwnProperty(i) && !nj(s) && (Array.isArray(s) && s.isCss || Cg(s) ? n.push("".concat(j$(i), ":"), s, ";") : Eg(s) ? n.push.apply(n, Og(Og(["".concat(i, " {")], ij(s), !1), ["}"], !1)) : n.push("".concat(j$(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in E2e || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); + t.hasOwnProperty(i) && !ij(s) && (Array.isArray(s) && s.isCss || Cg(s) ? n.push("".concat(K$(i), ":"), s, ";") : Eg(s) ? n.push.apply(n, Og(Og(["".concat(i, " {")], sj(s), !1), ["}"], !1)) : n.push("".concat(K$(i), ": ").concat((e = i, (r = s) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || e in _2e || e.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";"))); } return n; }; function Vd(t, e, r, n) { - if (nj(t)) + if (ij(t)) return []; - if (IR(t)) + if (PR(t)) return [".".concat(t.styledComponentId)]; if (Cg(t)) { if (!Cg(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 Z$ || Eg(i) || i === null || console.error("".concat(HZ(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.")), Vd(i, e, r, n); + return {}.NODE_ENV === "production" || typeof i != "object" || Array.isArray(i) || i instanceof j$ || Eg(i) || i === null || console.error("".concat(XZ(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.")), Vd(i, e, r, n); } var s; - return t instanceof Z$ ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : Eg(t) ? ij(t) : Array.isArray(t) ? Array.prototype.concat.apply(IS, t.map(function(a) { + return t instanceof j$ ? r ? (t.inject(r, n), [t.getName(n)]) : [t] : Eg(t) ? sj(t) : Array.isArray(t) ? Array.prototype.concat.apply(PS, t.map(function(a) { return Vd(a, e, r, n); })) : [t.toString()]; } -function lbe(t) { +function cbe(t) { for (var e = 0; e < t.length; e += 1) { var r = t[e]; - if (Cg(r) && !IR(r)) + if (Cg(r) && !PR(r)) return !1; } return !0; } -var cbe = GZ(NS), ube = function() { +var ube = HZ(IS), hbe = function() { function t(e, r, n) { - this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && lbe(e), this.componentId = r, this.baseHash = md(cbe, r), this.baseStyle = n, ej.registerId(r); + this.rules = e, this.staticRulesId = "", this.isStatic = {}.NODE_ENV === "production" && (n === void 0 || n.isStatic) && cbe(e), this.componentId = r, this.baseHash = md(ube, r), this.baseStyle = n, tj.registerId(r); } return t.prototype.generateAndInjectStyles = function(e, r, n) { var i = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, r, n) : ""; @@ -1854,7 +1854,7 @@ var cbe = GZ(NS), ube = function() { if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) i = Ed(i, this.staticRulesId); else { - var s = H$(Vd(this.rules, e, r, n)), a = DA(md(this.baseHash, s) >>> 0); + var s = X$(Vd(this.rules, e, r, n)), a = NA(md(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); @@ -1867,29 +1867,29 @@ var cbe = GZ(NS), ube = function() { if (typeof f == "string") u += f, {}.NODE_ENV !== "production" && (l = md(l, f)); else if (f) { - var d = H$(Vd(f, e, r, n)); + var d = X$(Vd(f, e, r, n)); l = md(l, d + h), u += d; } } if (u) { - var p = DA(l >>> 0); + var p = NA(l >>> 0); r.hasNameForId(this.componentId, p) || r.insertRules(this.componentId, p, n(u, ".".concat(p), void 0, this.componentId)), i = Ed(i, p); } } return i; }, t; -}(), sj = Hd.createContext(void 0); -sj.Consumer; -var gE = {}, K$ = /* @__PURE__ */ new Set(); -function hbe(t, e, r) { - var n = IR(t), i = t, s = !pE(t), a = e.attrs, o = a === void 0 ? IS : a, l = e.componentId, u = l === void 0 ? function(O, S) { - var C = typeof O != "string" ? "sc" : q$(O); - gE[C] = (gE[C] || 0) + 1; - var T = "".concat(C, "-").concat(N2e(NS + C + gE[C])); +}(), aj = Hd.createContext(void 0); +aj.Consumer; +var mE = {}, J$ = /* @__PURE__ */ new Set(); +function fbe(t, e, r) { + var n = PR(t), i = t, s = !gE(t), a = e.attrs, o = a === void 0 ? PS : a, l = e.componentId, u = l === void 0 ? function(O, S) { + var C = typeof O != "string" ? "sc" : Y$(O); + mE[C] = (mE[C] || 0) + 1; + var T = "".concat(C, "-").concat(I2e(IS + C + mE[C])); return S ? "".concat(S, "-").concat(T) : T; }(e.displayName, e.parentComponentId) : l, h = e.displayName, f = h === void 0 ? function(O) { - return pE(O) ? "styled.".concat(O) : "Styled(".concat(HZ(O), ")"); - }(t) : h, d = e.displayName && e.componentId ? "".concat(q$(e.displayName), "-").concat(e.componentId) : e.componentId || u, p = n && i.attrs ? i.attrs.concat(o).filter(Boolean) : o, g = e.shouldForwardProp; + return gE(O) ? "styled.".concat(O) : "Styled(".concat(XZ(O), ")"); + }(t) : h, d = e.displayName && e.componentId ? "".concat(Y$(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) { @@ -1900,11 +1900,11 @@ function hbe(t, e, r) { } else g = m; } - var y = new ube(r, d, n ? i.componentStyle : void 0); + var y = new hbe(r, d, n ? i.componentStyle : void 0); function b(O, S) { return function(C, T, L) { - var E = C.attrs, R = C.componentStyle, _ = C.defaultProps, A = C.foldedComponentIds, $ = C.styledComponentId, k = C.target, N = Hd.useContext(sj), M = PA(), I = C.shouldForwardProp || M.shouldForwardProp; - ({}).NODE_ENV !== "production" && TA($); + var E = C.attrs, R = C.componentStyle, _ = C.defaultProps, A = C.foldedComponentIds, $ = C.styledComponentId, k = C.target, N = Hd.useContext(aj), M = $A(), I = C.shouldForwardProp || M.shouldForwardProp; + ({}).NODE_ENV !== "production" && CA($); var D = function(G, ee, Q) { for (var ne, ie = Ra(Ra({}, ee), { className: void 0, theme: Q }), U = 0; U < G.length; U += 1) { var Z = Cg(ne = G[U]) ? ne(ie) : ne; @@ -1912,16 +1912,16 @@ function hbe(t, e, r) { ie[W] = W === "className" ? Ed(ie[W], Z[W]) : W === "style" ? Ra(Ra({}, ie[W]), Z[W]) : Z[W]; } return ee.className && (ie.className = Ed(ie.className, ee.className)), ie; - }(E, T, L2e(T, N, _) || Tg), P = D.as || k, F = {}; + }(E, T, R2e(T, N, _) || Tg), P = D.as || k, F = {}; for (var B in D) - D[B] === void 0 || B[0] === "$" || B === "as" || B === "theme" || (B === "forwardedAs" ? F.as = D.forwardedAs : I && !I(B, P) || (F[B] = D[B], I || {}.NODE_ENV !== "development" || Cye(B) || K$.has(B) || !MA.has(P) || (K$.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.)'))))); + D[B] === void 0 || B[0] === "$" || B === "as" || B === "theme" || (B === "forwardedAs" ? F.as = D.forwardedAs : I && !I(B, P) || (F[B] = D[B], I || {}.NODE_ENV !== "development" || Eye(B) || J$.has(B) || !DA.has(P) || (J$.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 V = function(G, ee) { - var Q = PA(), ne = G.generateAndInjectStyles(ee, Q.styleSheet, Q.stylis); - return {}.NODE_ENV !== "production" && TA(ne), ne; + var Q = $A(), ne = G.generateAndInjectStyles(ee, Q.styleSheet, Q.stylis); + return {}.NODE_ENV !== "production" && CA(ne), ne; }(R, D); ({}).NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(V); var Y = Ed(A, $); - return V && (Y += " " + V), D.className && (Y += " " + D.className), F[pE(P) && !MA.has(P) ? "class" : "className"] = Y, F.ref = L, Rl(P, F); + return V && (Y += " " + V), D.className && (Y += " " + D.className), F[gE(P) && !DA.has(P) ? "class" : "className"] = Y, F.ref = L, Rl(P, F); }(w, O, S); } b.displayName = f; @@ -1933,10 +1933,10 @@ function hbe(t, e, r) { for (var C = [], T = 1; T < arguments.length; T++) C[T - 1] = arguments[T]; for (var L = 0, E = C; L < E.length; L++) - NA(S, E[L], !0); + IA(S, E[L], !0); return S; }({}, i.defaultProps, O) : O; - } }), {}.NODE_ENV !== "production" && (A2e(f, d), w.warnTooManyClasses = function(O, S) { + } }), {}.NODE_ENV !== "production" && (L2e(f, d), w.warnTooManyClasses = function(O, S) { var C = {}, T = !1; return function(L) { if (!T && (C[L] = !0, Object.keys(C).length >= 200)) { @@ -1953,27 +1953,27 @@ Example: `), T = !0, C = {}; } }; - }(f, d)), PR(w, function() { + }(f, d)), $R(w, function() { return ".".concat(w.styledComponentId); - }), s && KZ(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; + }), s && JZ(w, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w; } -function J$(t, e) { +function eB(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 eB = function(t) { +var tB = function(t) { return Object.assign(t, { isCss: !0 }); }; function Yv(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; if (Cg(t) || Eg(t)) - return eB(Vd(J$(IS, Og([t], e, !0)))); + return tB(Vd(eB(PS, Og([t], e, !0)))); var n = t; - return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? Vd(n) : eB(Vd(J$(n, e))); + return e.length === 0 && n.length === 1 && typeof n[0] == "string" ? Vd(n) : tB(Vd(eB(n, e))); } -function $A(t, e, r) { +function BA(t, e, r) { if (r === void 0 && (r = Tg), !e) throw I1(1, e); var n = function(i) { @@ -1982,16 +1982,16 @@ function $A(t, e, r) { return t(e, r, Yv.apply(void 0, Og([i], s, !1))); }; return n.attrs = function(i) { - return $A(t, e, Ra(Ra({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); + return BA(t, e, Ra(Ra({}, r), { attrs: Array.prototype.concat(r.attrs, i).filter(Boolean) })); }, n.withConfig = function(i) { - return $A(t, e, Ra(Ra({}, r), i)); + return BA(t, e, Ra(Ra({}, r), i)); }, n; } -var aj = function(t) { - return $A(hbe, t); -}, sr = aj; -MA.forEach(function(t) { - sr[t] = aj(t); +var oj = function(t) { + return BA(fbe, t); +}, er = oj; +DA.forEach(function(t) { + er[t] = oj(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'? @@ -2041,7 +2041,7 @@ class Dr { return new Qv(this, e); } iterRange(e, r = this.length) { - return new oj(this, e, r); + return new lj(this, e, r); } iterLines(e, r) { let n; @@ -2052,7 +2052,7 @@ class Dr { 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 lj(n); + return new cj(n); } toString() { return this.sliceString(0); @@ -2070,7 +2070,7 @@ class Dr { } } class jn extends Dr { - constructor(e, r = fbe(e)) { + constructor(e, r = dbe(e)) { super(), this.text = e, this.length = r; } get lines() { @@ -2083,14 +2083,14 @@ class jn extends Dr { for (let s = 0; ; s++) { let a = this.text[s], o = i + a.length; if ((r ? n : o) >= e) - return new dbe(i, o, n, a); + return new pbe(i, o, n, a); i = o + 1, n++; } } decompose(e, r, n, i) { - let s = e <= 0 && r >= this.length ? this : new jn(tB(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); + let s = e <= 0 && r >= this.length ? this : new jn(rB(this.text, e, r), Math.min(r, this.length) - Math.max(0, e)); if (i & 1) { - let a = n.pop(), o = i4(s.text, a.text.slice(), 0, s.length); + let a = n.pop(), o = s4(s.text, a.text.slice(), 0, s.length); if (o.length <= 32) n.push(new jn(o, a.length + s.length)); else { @@ -2104,7 +2104,7 @@ class jn extends Dr { if (!(n instanceof jn)) return super.replace(e, r, n); [e, r] = _g(this, e, r); - let i = i4(this.text, i4(n.text, tB(this.text, 0, e)), r), s = this.length + n.length - (r - e); + let i = s4(this.text, s4(n.text, rB(this.text, 0, e)), r), s = this.length + n.length - (r - e); return i.length <= 32 ? new jn(i, s) : hc.from(jn.split(i, []), s); } sliceString(e, r = this.length, n = ` @@ -2226,21 +2226,21 @@ class hc extends Dr { } } Dr.empty = /* @__PURE__ */ new jn([""], 0); -function fbe(t) { +function dbe(t) { let e = -1; for (let r of t) e += r.length + 1; return e; } -function i4(t, e, r = 0, n = 1e9) { +function s4(t, e, r = 0, n = 1e9) { for (let i = 0, s = 0, a = !0; s < t.length && i <= n; s++) { let o = t[s], l = i + o.length; l >= r && (l > n && (o = o.slice(0, n - i)), i < r && (o = o.slice(r - i)), a ? (e[e.length - 1] += o, a = !1) : e.push(o)), i = l + 1; } return e; } -function tB(t, e, r) { - return i4(t, [""], e, r); +function rB(t, e, r) { + return s4(t, [""], e, r); } class Qv { constructor(e, r = 1) { @@ -2273,7 +2273,7 @@ class Qv { return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir); } } -class oj { +class lj { constructor(e, r, n) { this.value = "", this.done = !1, this.cursor = new Qv(e, r > n ? -1 : 1), this.pos = r > n ? e.length : 0, this.from = Math.min(r, n), this.to = Math.max(r, n); } @@ -2293,7 +2293,7 @@ class oj { return this.cursor.lineBreak && this.value != ""; } } -class lj { +class cj { constructor(e) { this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1; } @@ -2307,10 +2307,10 @@ class lj { } typeof Symbol < "u" && (Dr.prototype[Symbol.iterator] = function() { return this.iter(); -}, Qv.prototype[Symbol.iterator] = oj.prototype[Symbol.iterator] = lj.prototype[Symbol.iterator] = function() { +}, Qv.prototype[Symbol.iterator] = lj.prototype[Symbol.iterator] = cj.prototype[Symbol.iterator] = function() { return this; }); -class dbe { +class pbe { constructor(e, r, n, i) { this.from = e, this.to = r, this.number = n, this.text = i; } @@ -2324,31 +2324,31 @@ function _g(t, e, r) { let Wp = /* @__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 < Wp.length; t++) Wp[t] += Wp[t - 1]; -function pbe(t) { +function gbe(t) { for (let e = 1; e < Wp.length; e += 2) if (Wp[e] > t) return Wp[e - 1] <= t; return !1; } -function rB(t) { +function nB(t) { return t >= 127462 && t <= 127487; } -const nB = 8205; +const iB = 8205; function ls(t, e, r = !0, n = !0) { - return (r ? cj : gbe)(t, e, n); + return (r ? uj : mbe)(t, e, n); } -function cj(t, e, r) { +function uj(t, e, r) { if (e == t.length) return e; - e && uj(t.charCodeAt(e)) && hj(t.charCodeAt(e - 1)) && e--; + e && hj(t.charCodeAt(e)) && fj(t.charCodeAt(e - 1)) && e--; let n = ss(t, e); for (e += _o(n); e < t.length; ) { let i = ss(t, e); - if (n == nB || i == nB || r && pbe(i)) + if (n == iB || i == iB || r && gbe(i)) e += _o(i), n = i; - else if (rB(i)) { + else if (nB(i)) { let s = 0, a = e - 2; - for (; a >= 0 && rB(ss(t, a)); ) + for (; a >= 0 && nB(ss(t, a)); ) s++, a -= 2; if (s % 2 == 0) break; @@ -2358,35 +2358,35 @@ function cj(t, e, r) { } return e; } -function gbe(t, e, r) { +function mbe(t, e, r) { for (; e > 0; ) { - let n = cj(t, e - 2, r); + let n = uj(t, e - 2, r); if (n < e) return n; e--; } return 0; } -function uj(t) { +function hj(t) { return t >= 56320 && t < 57344; } -function hj(t) { +function fj(t) { return t >= 55296 && t < 56320; } function ss(t, e) { let r = t.charCodeAt(e); - if (!hj(r) || e + 1 == t.length) + if (!fj(r) || e + 1 == t.length) return r; let n = t.charCodeAt(e + 1); - return uj(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; + return hj(n) ? (r - 55296 << 10) + (n - 56320) + 65536 : r; } -function BR(t) { +function FR(t) { return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320)); } function _o(t) { return t < 65536 ? 1 : 2; } -const BA = /\r\n?|\n/; +const FA = /\r\n?|\n/; var Si = /* @__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; }(Si || (Si = {})); @@ -2418,7 +2418,7 @@ class _c { } } iterChangedRanges(e, r = !1) { - FA(this, e, r); + zA(this, e, r); } get invertedDesc() { let e = []; @@ -2429,10 +2429,10 @@ class _c { return new _c(e); } composeDesc(e) { - return this.empty ? e : e.empty ? this : fj(this, e); + return this.empty ? e : e.empty ? this : dj(this, e); } mapDesc(e, r = !1) { - return e.empty ? this : zA(this, e, r); + return e.empty ? this : VA(this, e, r); } mapPos(e, r = -1, n = Si.Simple) { let i = 0, s = 0; @@ -2491,10 +2491,10 @@ class ai extends _c { apply(e) { if (this.length != e.length) throw new RangeError("Applying change set to a document with the wrong length"); - return FA(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; + return zA(this, (r, n, i, s, a) => e = e.replace(i, i + (n - r), a), !1), e; } mapDesc(e, r = !1) { - return zA(this, e, r, !0); + return VA(this, e, r, !0); } invert(e) { let r = this.sections.slice(), n = []; @@ -2512,13 +2512,13 @@ class ai extends _c { return new ai(r, n); } compose(e) { - return this.empty ? e : e.empty ? this : fj(this, e, !0); + return this.empty ? e : e.empty ? this : dj(this, e, !0); } map(e, r = !1) { - return e.empty ? this : zA(this, e, r, !0); + return e.empty ? this : VA(this, e, r, !0); } iterChanges(e, r = !1) { - FA(this, e, r); + zA(this, e, r); } get desc() { return _c.create(this.sections); @@ -2578,7 +2578,7 @@ class ai extends _c { 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" ? Dr.of(p.split(n || BA)) : p : Dr.empty, m = g.length; + let g = p ? typeof p == "string" ? Dr.of(p.split(n || FA)) : p : Dr.empty, m = g.length; if (f == d && m == 0) return; f < a && l(), f > a && As(i, f - a, -1), As(i, d - f, m), Nh(s, i, g), a = d; @@ -2633,7 +2633,7 @@ function Nh(t, e, r) { t.push(r); } } -function FA(t, e, r) { +function zA(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++]; @@ -2647,7 +2647,7 @@ function FA(t, e, r) { } } } -function zA(t, e, r, n = !1) { +function VA(t, e, r, n = !1) { let i = [], s = n ? [] : null, a = new by(t), o = new by(e); for (let l = -1; ; ) if (a.ins == -1 && o.ins == -1) { @@ -2677,7 +2677,7 @@ function zA(t, e, r, n = !1) { throw new Error("Mismatched change set lengths"); } } -function fj(t, e, r = !1) { +function dj(t, e, r = !1) { let n = [], i = r ? [] : null, s = new by(t), a = new by(e); for (let o = !1; ; ) { if (s.done && a.done) @@ -2849,45 +2849,45 @@ class Ve { return new Ve(e, r); } } -function dj(t, e) { +function pj(t, e) { for (let r of t.ranges) if (r.to > e) throw new RangeError("Selection points outside of document"); } -let FR = 0; +let zR = 0; class _t { constructor(e, r, n, i, s) { - this.combine = e, this.compareInput = r, this.compare = n, this.isStatic = i, this.id = FR++, 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 = zR++, 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 : zR), !!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 : VR), !!e.static, e.enables); } of(e) { - return new s4([], this, 0, e); + return new a4([], this, 0, e); } compute(e, r) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new s4(e, this, 1, r); + return new a4(e, this, 1, r); } computeN(e, r) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new s4(e, this, 2, r); + return new a4(e, this, 2, r); } from(e, r) { return r || (r = (n) => n), this.compute([e], (n) => r(n.field(e))); } } -function zR(t, e) { +function VR(t, e) { return t == e || t.length == e.length && t.every((r, n) => r === e[n]); } -class s4 { +class a4 { constructor(e, r, n, i) { - this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = FR++; + this.dependencies = e, this.facet = r, this.type = n, this.value = i, this.id = zR++; } dynamicSlot(e) { var r; @@ -2899,9 +2899,9 @@ class s4 { return f.values[a] = n(f), 1; }, update(f, d) { - if (l && d.docChanged || u && (d.docChanged || d.selection) || VA(f, h)) { + if (l && d.docChanged || u && (d.docChanged || d.selection) || UA(f, h)) { let p = n(f); - if (o ? !iB(p, f.values[a], i) : !i(p, f.values[a])) + if (o ? !sB(p, f.values[a], i) : !i(p, f.values[a])) return f.values[a] = p, 1; } return 0; @@ -2909,8 +2909,8 @@ class s4 { reconfigure: (f, d) => { let p, g = d.config.address[s]; if (g != null) { - let m = b5(d, g); - if (this.dependencies.every((v) => v instanceof _t ? d.facet(v) === f.facet(v) : v instanceof $n ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? iB(p = n(f), m, i) : i(p = n(f), m))) + let m = x5(d, g); + if (this.dependencies.every((v) => v instanceof _t ? d.facet(v) === f.facet(v) : v instanceof $n ? d.field(v, !1) == f.field(v, !1) : !0) || (o ? sB(p = n(f), m, i) : i(p = n(f), m))) return f.values[a] = m, 0; } else p = n(f); @@ -2919,7 +2919,7 @@ class s4 { }; } } -function iB(t, e, r) { +function sB(t, e, r) { if (t.length != e.length) return !1; for (let n = 0; n < t.length; n++) @@ -2927,18 +2927,18 @@ function iB(t, e, r) { return !1; return !0; } -function VA(t, e) { +function UA(t, e) { let r = !1; for (let n of e) Wv(t, n) & 1 && (r = !0); return r; } -function mbe(t, e, r) { +function vbe(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 = []; for (let h = 0; h < n.length; h++) { - let f = b5(l, n[h]); + let f = x5(l, n[h]); if (i[h] == 2) for (let d of f) u.push(d); @@ -2954,31 +2954,31 @@ function mbe(t, e, r) { return l.values[a] = o(l), 1; }, update(l, u) { - if (!VA(l, s)) + if (!UA(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 = VA(l, n), f = u.config.facets[e.id], d = u.facet(e); - if (f && !h && zR(r, f)) + let h = UA(l, n), f = u.config.facets[e.id], d = u.facet(e); + if (f && !h && VR(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 sB = /* @__PURE__ */ _t.define({ static: !0 }); +const aB = /* @__PURE__ */ _t.define({ static: !0 }); class $n { 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 $n(FR++, e.create, e.update, e.compare || ((n, i) => n === i), e); + let r = new $n(zR++, 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(sB).find((n) => n.field == this); + let r = e.facet(aB).find((n) => n.field == this); return ((r == null ? void 0 : r.create) || this.createF)(e); } slot(e) { @@ -2993,7 +2993,7 @@ class $n { }; } init(e) { - return [this, sB.of({ field: this, create: e })]; + return [this, aB.of({ field: this, create: e })]; } get extension() { return this; @@ -3001,7 +3001,7 @@ class $n { } const vd = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; function _m(t) { - return (e) => new pj(e, t); + return (e) => new gj(e, t); } const zl = { highest: /* @__PURE__ */ _m(vd.highest), @@ -3010,14 +3010,14 @@ const zl = { low: /* @__PURE__ */ _m(vd.low), lowest: /* @__PURE__ */ _m(vd.lowest) }; -class pj { +class gj { constructor(e, r) { this.inner = e, this.prec = r; } } class I0 { of(e) { - return new UA(this, e); + return new qA(this, e); } reconfigure(e) { return I0.reconfigure.of({ compartment: this, extension: e }); @@ -3026,12 +3026,12 @@ class I0 { return e.config.compartments.get(this); } } -class UA { +class qA { constructor(e, r) { this.compartment = e, this.inner = r; } } -class y5 { +class b5 { constructor(e, r, n, i, s, a) { for (this.base = e, this.compartments = r, this.dynamicSlots = n, this.address = i, this.staticValues = s, this.facets = a, this.statusTemplate = []; this.statusTemplate.length < n.length; ) this.statusTemplate.push(0); @@ -3042,7 +3042,7 @@ class y5 { } static resolve(e, r, n) { let i = [], s = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ new Map(); - for (let d of vbe(e, r, a)) + for (let d of ybe(e, r, a)) d instanceof $n ? 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) @@ -3051,7 +3051,7 @@ class y5 { 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, zR(m, p)) + if (o[g.id] = l.length << 1 | 1, VR(m, p)) l.push(n.facet(g)); else { let v = g.combine(p.map((y) => y.value)); @@ -3060,14 +3060,14 @@ class y5 { 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) => mbe(v, g, p)); + o[g.id] = u.length << 1, u.push((v) => vbe(v, g, p)); } } let f = u.map((d) => d(o)); - return new y5(e, a, f, o, l, s); + return new b5(e, a, f, o, l, s); } } -function vbe(t, e, r) { +function ybe(t, e, r) { let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map(); function s(a, o) { let l = i.get(a); @@ -3075,21 +3075,21 @@ function vbe(t, e, r) { if (l <= o) return; let u = n[l].indexOf(a); - u > -1 && n[l].splice(u, 1), a instanceof UA && r.delete(a.compartment); + u > -1 && n[l].splice(u, 1), a instanceof qA && r.delete(a.compartment); } if (i.set(a, o), Array.isArray(a)) for (let u of a) s(u, o); - else if (a instanceof UA) { + else if (a instanceof qA) { 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 pj) + } else if (a instanceof gj) s(a.inner, a.prec); else if (a instanceof $n) n[o].push(a), a.provides && s(a.provides, o); - else if (a instanceof s4) + else if (a instanceof a4) n[o].push(a), a.facet.extensions && s(a.facet.extensions, vd.default); else { let u = a.extension; @@ -3112,16 +3112,16 @@ function Wv(t, e) { let i = t.computeSlot(t, t.config.dynamicSlots[r]); return t.status[r] = 2 | i; } -function b5(t, e) { +function x5(t, e) { return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1]; } -const gj = /* @__PURE__ */ _t.define(), qA = /* @__PURE__ */ _t.define({ +const mj = /* @__PURE__ */ _t.define(), YA = /* @__PURE__ */ _t.define({ combine: (t) => t.some((e) => e), static: !0 -}), mj = /* @__PURE__ */ _t.define({ +}), vj = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : void 0, static: !0 -}), vj = /* @__PURE__ */ _t.define(), yj = /* @__PURE__ */ _t.define(), bj = /* @__PURE__ */ _t.define(), xj = /* @__PURE__ */ _t.define({ +}), yj = /* @__PURE__ */ _t.define(), bj = /* @__PURE__ */ _t.define(), xj = /* @__PURE__ */ _t.define(), wj = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : !1 }); class Vl { @@ -3129,15 +3129,15 @@ class Vl { this.type = e, this.value = r; } static define() { - return new ybe(); + return new bbe(); } } -class ybe { +class bbe { of(e) { return new Vl(this, e); } } -class bbe { +class xbe { constructor(e) { this.map = e; } @@ -3157,7 +3157,7 @@ class Zt { return this.type == e; } static define(e = {}) { - return new bbe(e.map || ((r) => r)); + return new xbe(e.map || ((r) => r)); } static mapEffects(e, r) { if (!e.length) @@ -3174,7 +3174,7 @@ Zt.reconfigure = /* @__PURE__ */ Zt.define(); Zt.appendConfig = /* @__PURE__ */ Zt.define(); class fi { 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 && dj(n, r.newLength), s.some((o) => o.type == fi.time) || (this.annotations = s.concat(fi.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 && pj(n, r.newLength), s.some((o) => o.type == fi.time) || (this.annotations = s.concat(fi.time.of(Date.now()))); } static create(e, r, n, i, s, a) { return new fi(e, r, n, i, s, a); @@ -3208,7 +3208,7 @@ fi.time = /* @__PURE__ */ Vl.define(); fi.userEvent = /* @__PURE__ */ Vl.define(); fi.addToHistory = /* @__PURE__ */ Vl.define(); fi.remote = /* @__PURE__ */ Vl.define(); -function xbe(t, e) { +function wbe(t, e) { let r = []; for (let n = 0, i = 0; ; ) { let s, a; @@ -3221,7 +3221,7 @@ function xbe(t, e) { !r.length || r[r.length - 1] < s ? r.push(s, a) : r[r.length - 1] < a && (r[r.length - 1] = a); } } -function wj(t, e, r) { +function Oj(t, e, r) { var n; let i, s, a; return r ? (i = e.changes, s = ai.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)), { @@ -3232,36 +3232,36 @@ function wj(t, e, r) { scrollIntoView: t.scrollIntoView || e.scrollIntoView }; } -function YA(t, e, r) { +function QA(t, e, r) { let n = e.selection, i = Gp(e.annotations); return e.userEvent && (i = i.concat(fi.userEvent.of(e.userEvent))), { - changes: e.changes instanceof ai ? e.changes : ai.of(e.changes || [], r, t.facet(mj)), + changes: e.changes instanceof ai ? e.changes : ai.of(e.changes || [], r, t.facet(vj)), selection: n && (n instanceof Ve ? n : Ve.single(n.anchor, n.head)), effects: Gp(e.effects), annotations: i, scrollIntoView: !!e.scrollIntoView }; } -function Oj(t, e, r) { - let n = YA(t, e.length ? e[0] : {}, t.doc.length); +function kj(t, e, r) { + let n = QA(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 = wj(n, YA(t, e[s], a ? n.changes.newLength : t.doc.length), a); + n = Oj(n, QA(t, e[s], a ? n.changes.newLength : t.doc.length), a); } let i = fi.create(t, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView); - return Obe(r ? wbe(i) : i); + return kbe(r ? Obe(i) : i); } -function wbe(t) { +function Obe(t) { let e = t.startState, r = !0; - for (let i of e.facet(vj)) { + for (let i of e.facet(yj)) { let s = i(t); if (s === !1) { r = !1; break; } - Array.isArray(s) && (r = r === !0 ? s : xbe(r, s)); + Array.isArray(s) && (r = r === !0 ? s : wbe(r, s)); } if (r !== !0) { let i, s; @@ -3273,49 +3273,49 @@ function wbe(t) { } t = fi.create(e, i, t.selection && t.selection.map(s), Zt.mapEffects(t.effects, s), t.annotations, t.scrollIntoView); } - let n = e.facet(yj); + let n = e.facet(bj); for (let i = n.length - 1; i >= 0; i--) { let s = n[i](t); - s instanceof fi ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof fi ? t = s[0] : t = Oj(e, Gp(s), !1); + s instanceof fi ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof fi ? t = s[0] : t = kj(e, Gp(s), !1); } return t; } -function Obe(t) { - let e = t.startState, r = e.facet(bj), n = t; +function kbe(t) { + let e = t.startState, r = e.facet(xj), n = t; for (let i = r.length - 1; i >= 0; i--) { let s = r[i](t); - s && Object.keys(s).length && (n = wj(n, YA(e, s, t.changes.newLength), !0)); + s && Object.keys(s).length && (n = Oj(n, QA(e, s, t.changes.newLength), !0)); } return n == t ? t : fi.create(e, t.changes, t.selection, n.effects, n.annotations, n.scrollIntoView); } -const kbe = []; +const Sbe = []; function Gp(t) { - return t == null ? kbe : Array.isArray(t) ? t : [t]; + return t == null ? Sbe : Array.isArray(t) ? t : [t]; } var Sn = /* @__PURE__ */ function(t) { return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t; }(Sn || (Sn = {})); -const Sbe = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; -let QA; +const Tbe = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; +let WA; try { - QA = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); + WA = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch { } -function Tbe(t) { - if (QA) - return QA.test(t); +function Cbe(t) { + if (WA) + return WA.test(t); for (let e = 0; e < t.length; e++) { let r = t[e]; - if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || Sbe.test(r))) + if (/\w/.test(r) || r > "\x80" && (r.toUpperCase() != r.toLowerCase() || Tbe.test(r))) return !0; } return !1; } -function Cbe(t) { +function Ebe(t) { return (e) => { if (!/\S/.test(e)) return Sn.Space; - if (Tbe(e)) + if (Cbe(e)) return Sn.Word; for (let r = 0; r < t.length; r++) if (e.indexOf(t[r]) > -1) @@ -3337,18 +3337,18 @@ class dr { throw new RangeError("Field is not present in this state"); return; } - return Wv(this, n), b5(this, n); + return Wv(this, n), x5(this, n); } update(...e) { - return Oj(this, e, !0); + return kj(this, e, !0); } applyTransaction(e) { let r = this.config, { base: n, compartments: i } = r; for (let o of e.effects) o.is(I0.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(Zt.reconfigure) ? (r = null, n = o.value) : o.is(Zt.appendConfig) && (r = null, n = Gp(n).concat(o.value)); let s; - r ? s = e.startState.values.slice() : (r = y5.resolve(n, i, this), s = new dr(r, this.doc, this.selection, r.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); - let a = e.startState.facet(qA) ? e.newSelection : e.newSelection.asSingle(); + r ? s = e.startState.values.slice() : (r = b5.resolve(n, i, this), s = new dr(r, this.doc, this.selection, r.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); + let a = e.startState.facet(YA) ? e.newSelection : e.newSelection.asSingle(); new dr(r, e.newDoc, a, s, (o, l) => l.update(o, e), e); } replaceSelection(e) { @@ -3376,14 +3376,14 @@ class dr { return e instanceof ai ? e : ai.of(e, this.doc.length, this.facet(dr.lineSeparator)); } toText(e) { - return Dr.of(e.split(this.facet(dr.lineSeparator) || BA)); + return Dr.of(e.split(this.facet(dr.lineSeparator) || FA)); } sliceDoc(e = 0, r = this.doc.length) { return this.doc.sliceString(e, r, this.lineBreak); } facet(e) { let r = this.config.address[e.id]; - return r == null ? e.default : (Wv(this, r), b5(this, r)); + return r == null ? e.default : (Wv(this, r), x5(this, r)); } toJSON(e) { let r = { @@ -3415,8 +3415,8 @@ class dr { }); } static create(e = {}) { - let r = y5.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof Dr ? e.doc : Dr.of((e.doc || "").split(r.staticFacet(dr.lineSeparator) || BA)), i = e.selection ? e.selection instanceof Ve ? e.selection : Ve.single(e.selection.anchor, e.selection.head) : Ve.single(0); - return dj(i, n.length), r.staticFacet(qA) || (i = i.asSingle()), new dr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); + let r = b5.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof Dr ? e.doc : Dr.of((e.doc || "").split(r.staticFacet(dr.lineSeparator) || FA)), i = e.selection ? e.selection instanceof Ve ? e.selection : Ve.single(e.selection.anchor, e.selection.head) : Ve.single(0); + return pj(i, n.length), r.staticFacet(YA) || (i = i.asSingle()), new dr(r, n, i, r.dynamicSlots.map(() => null), (s, a) => a.create(s), null); } get tabSize() { return this.facet(dr.tabSize); @@ -3426,7 +3426,7 @@ class dr { `; } get readOnly() { - return this.facet(xj); + return this.facet(wj); } phrase(e, ...r) { for (let n of this.facet(dr.phrases)) @@ -3443,13 +3443,13 @@ class dr { } languageDataAt(e, r, n = -1) { let i = []; - for (let s of this.facet(gj)) + for (let s of this.facet(mj)) for (let a of s(this, r, n)) Object.prototype.hasOwnProperty.call(a, e) && i.push(a[e]); return i; } charCategorizer(e) { - return Cbe(this.languageDataAt("wordChars", e).join("")); + return Ebe(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; @@ -3468,22 +3468,22 @@ class dr { return a == o ? null : Ve.range(a + n, o + n); } } -dr.allowMultipleSelections = qA; +dr.allowMultipleSelections = YA; dr.tabSize = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : 4 }); -dr.lineSeparator = mj; -dr.readOnly = xj; +dr.lineSeparator = vj; +dr.readOnly = wj; dr.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]); } }); -dr.languageData = gj; -dr.changeFilter = vj; -dr.transactionFilter = yj; -dr.transactionExtender = bj; +dr.languageData = mj; +dr.changeFilter = yj; +dr.transactionFilter = bj; +dr.transactionExtender = xj; I0.reconfigure = /* @__PURE__ */ Zt.define(); function Yc(t, e, r = {}) { let n = {}; @@ -3521,10 +3521,10 @@ class xy { return new xy(e, r, n); } } -function WA(t, e) { +function GA(t, e) { return t.from - e.from || t.value.startSide - e.value.startSide; } -class VR { +class UR { constructor(e, r, n, i) { this.from = e, this.to = r, this.value = n, this.maxPoint = i; } @@ -3559,7 +3559,7 @@ class VR { 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 VR(i, s, n, o) : null, pos: a }; + return { mapped: n.length ? new UR(i, s, n, o) : null, pos: a }; } } class Er { @@ -3588,9 +3588,9 @@ class Er { 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(WA)), this.isEmpty) + if (n && (r = r.slice().sort(GA)), this.isEmpty) return r.length ? Er.of(r) : this; - let o = new kj(this, null, -1).goto(0), l = 0, u = [], h = new Hi(); + let o = new Sj(this, null, -1).goto(0), l = 0, u = [], h = new Hi(); 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++]; @@ -3635,8 +3635,8 @@ class Er { return wy.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 = aB(a, o, n), u = new Am(a, l, s), h = new Am(o, l, s); - n.iterGaps((f, d, p) => oB(u, f, h, d, p, i)), n.empty && n.length == 0 && oB(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 = oB(a, o, n), u = new Am(a, l, s), h = new Am(o, l, s); + n.iterGaps((f, d, p) => lB(u, f, h, d, p, i)), n.empty && n.length == 0 && lB(u, 0, h, 0, 0, i); } static eq(e, r, n = 0, i) { i == null && (i = 1e9 - 1); @@ -3645,9 +3645,9 @@ class Er { return !1; if (!s.length) return !0; - let o = aB(s, a), l = new Am(s, o, 0).goto(n), u = new Am(a, o, 0).goto(n); + let o = oB(s, a), l = new Am(s, o, 0).goto(n), u = new Am(a, o, 0).goto(n); for (; ; ) { - if (l.to != u.to || !GA(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) + if (l.to != u.to || !HA(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) return !1; if (l.to > i) return !0; @@ -3670,18 +3670,18 @@ class Er { } static of(e, r = !1) { let n = new Hi(); - for (let i of e instanceof xy ? [e] : r ? Ebe(e) : e) + for (let i of e instanceof xy ? [e] : r ? _be(e) : e) n.add(i.from, i.to, i.value); return n.finish(); } } Er.empty = /* @__PURE__ */ new Er([], [], null, -1); -function Ebe(t) { +function _be(t) { if (t.length > 1) for (let e = t[0], r = 1; r < t.length; r++) { let n = t[r]; - if (WA(e, n) > 0) - return t.slice().sort(WA); + if (GA(e, n) > 0) + return t.slice().sort(GA); e = n; } return t; @@ -3689,7 +3689,7 @@ function Ebe(t) { Er.empty.nextLayer = Er.empty; class Hi { finishChunk(e) { - this.chunks.push(new VR(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 UR(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; @@ -3720,7 +3720,7 @@ class Hi { return this.from = null, r; } } -function aB(t, e, r) { +function oB(t, e, r) { let n = /* @__PURE__ */ new Map(); for (let s of t) for (let a = 0; a < s.chunk.length; a++) @@ -3733,7 +3733,7 @@ function aB(t, e, r) { } return i; } -class kj { +class Sj { constructor(e, r, n, i = 0) { this.layer = e, this.skip = r, this.minPoint = n, this.rank = i; } @@ -3797,7 +3797,7 @@ class wy { 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 kj(a, r, n, s)); + a.maxPoint >= n && i.push(new Sj(a, r, n, s)); return i.length == 1 ? i[0] : new wy(i); } get startSide() { @@ -3807,14 +3807,14 @@ class wy { for (let n of this.heap) n.goto(e, r); for (let n = this.heap.length >> 1; n >= 0; n--) - mE(this.heap, n); + vE(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--) - mE(this.heap, n); + vE(this.heap, n); (this.to - e || this.value.endSide - r) < 0 && this.next(); } next() { @@ -3822,11 +3822,11 @@ class wy { 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(), mE(this.heap, 0); + this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), vE(this.heap, 0); } } } -function mE(t, e) { +function vE(t, e) { for (let r = t[e]; ; ) { let n = (e << 1) + 1; if (n >= t.length) @@ -3850,13 +3850,13 @@ class Am { this.cursor.forward(e, r); } removeActive(e) { - uw(this.active, e), uw(this.activeTo, e), uw(this.activeRank, e), this.minActive = lB(this.active, this.activeTo); + uw(this.active, e), uw(this.activeTo, e), uw(this.activeRank, e), this.minActive = cB(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++; - hw(this.active, r, n), hw(this.activeTo, r, i), hw(this.activeRank, r, s), e && hw(e, r, this.cursor.from), this.minActive = lB(this.active, this.activeTo); + hw(this.active, r, n), hw(this.activeTo, r, i), hw(this.activeRank, r, s), e && hw(e, r, this.cursor.from), this.minActive = cB(this.active, this.activeTo); } next() { let e = this.to, r = this.point; @@ -3911,17 +3911,17 @@ class Am { return r; } } -function oB(t, e, r, n, i, s) { +function lB(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)) && GA(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, f, t.point, r.point) : f > o && !GA(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)) && HA(t.activeForPoint(t.to), r.activeForPoint(r.to)) || s.comparePoint(o, f, t.point, r.point) : f > o && !HA(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 GA(t, e) { +function HA(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -3939,7 +3939,7 @@ function hw(t, e, r) { t[n + 1] = t[n]; t[e] = r; } -function lB(t, e) { +function cB(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]); @@ -3951,7 +3951,7 @@ function Ml(t, e, r = t.length) { t.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = ls(t, i)); return n; } -function HA(t, e, r, n) { +function XA(t, e, r, n) { for (let i = 0, s = 0; ; ) { if (s >= e) return i; @@ -3961,7 +3961,7 @@ function HA(t, e, r, n) { } return n === !0 ? -1 : t.length; } -const XA = "\u037C", cB = typeof Symbol > "u" ? "__" + XA : Symbol.for(XA), ZA = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), uB = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; +const ZA = "\u037C", uB = typeof Symbol > "u" ? "__" + ZA : Symbol.for(ZA), jA = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), hB = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; class Pu { constructor(e, r) { this.rules = []; @@ -3998,29 +3998,29 @@ class Pu { `); } static newName() { - let e = uB[cB] || 1; - return uB[cB] = e + 1, XA + e.toString(36); + let e = hB[uB] || 1; + return hB[uB] = e + 1, ZA + e.toString(36); } static mount(e, r, n) { - let i = e[ZA], s = n && n.nonce; - i ? s && i.setNonce(s) : i = new _be(e, s), i.mount(Array.isArray(r) ? r : [r]); + let i = e[jA], s = n && n.nonce; + i ? s && i.setNonce(s) : i = new Abe(e, s), i.mount(Array.isArray(r) ? r : [r]); } } -let hB = /* @__PURE__ */ new Map(); -class _be { +let fB = /* @__PURE__ */ new Map(); +class Abe { constructor(e, r) { let n = e.ownerDocument || e, i = n.defaultView; if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) { - let s = hB.get(n); + let s = fB.get(n); if (s) - return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[ZA] = s; - this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], hB.set(n, this); + return e.adoptedStyleSheets = [s.sheet, ...e.adoptedStyleSheets], e[jA] = s; + this.sheet = new i.CSSStyleSheet(), e.adoptedStyleSheets = [this.sheet, ...e.adoptedStyleSheets], fB.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[ZA] = this; + this.modules = [], e[jA] = this; } mount(e) { let r = this.sheet, n = 0, i = 0; @@ -4126,37 +4126,37 @@ var of = { 220: "|", 221: "}", 222: '"' -}, Abe = typeof navigator < "u" && /Mac/.test(navigator.platform), Lbe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); +}, Lbe = typeof navigator < "u" && /Mac/.test(navigator.platform), Rbe = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); for (var as = 0; as < 10; as++) of[48 + as] = of[96 + as] = String(as); for (var as = 1; as <= 24; as++) of[as + 111] = "F" + as; for (var as = 65; as <= 90; as++) of[as] = String.fromCharCode(as + 32), Oy[as] = String.fromCharCode(as); -for (var vE in of) - Oy.hasOwnProperty(vE) || (Oy[vE] = of[vE]); -function Rbe(t) { - var e = Abe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Lbe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? Oy : of)[t.keyCode] || t.key || "Unidentified"; +for (var yE in of) + Oy.hasOwnProperty(yE) || (Oy[yE] = of[yE]); +function Mbe(t) { + var e = Lbe && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Rbe && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", r = !e && t.key || (t.shiftKey ? Oy : of)[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 x5(t) { +function w5(t) { let e; return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection(); } -function jA(t, e) { +function KA(t, e) { return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1; } -function Mbe(t) { +function Dbe(t) { let e = t.activeElement; for (; e && e.shadowRoot; ) e = e.shadowRoot.activeElement; return e; } -function a4(t, e) { +function o4(t, e) { if (!e.anchorNode) return !1; try { - return jA(t, e.anchorNode); + return KA(t, e.anchorNode); } catch { return !1; } @@ -4164,15 +4164,15 @@ function a4(t, e) { function ky(t) { return t.nodeType == 3 ? jd(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : []; } -function w5(t, e, r, n) { - return r ? fB(t, e, r, n, -1) || fB(t, e, r, n, 1) : !1; +function O5(t, e, r, n) { + return r ? dB(t, e, r, n, -1) || dB(t, e, r, n, 1) : !1; } function Sy(t) { for (var e = 0; ; e++) if (t = t.previousSibling, !t) return e; } -function fB(t, e, r, n, i) { +function dB(t, e, r, n, i) { for (; ; ) { if (t == r && e == n) return !0; @@ -4194,11 +4194,11 @@ function fB(t, e, r, n, i) { function $u(t) { return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length; } -function UR(t, e) { +function qR(t, e) { let r = e ? t.left : t.right; return { left: r, right: r, top: t.top, bottom: t.bottom }; } -function Dbe(t) { +function Nbe(t) { return { left: 0, right: t.innerWidth, @@ -4206,24 +4206,24 @@ function Dbe(t) { bottom: t.innerHeight }; } -function Sj(t, e) { +function Tj(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 Nbe(t, e, r, n, i, s, a, o) { +function Ibe(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 = Dbe(u); + d = Nbe(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 } = Sj(h, b)), d = { + ({ scaleX: g, scaleY: m } = Tj(h, b)), d = { left: b.left, right: b.left + h.clientWidth * g, top: b.top, @@ -4265,7 +4265,7 @@ function Nbe(t, e, r, n, i, s, a, o) { else break; } -function Ibe(t) { +function Pbe(t) { let e = t.ownerDocument; for (let r = t.parentNode; r && r != e.body; ) if (r.nodeType == 1) { @@ -4278,7 +4278,7 @@ function Ibe(t) { break; return null; } -class Pbe { +class $be { constructor() { this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0; } @@ -4294,7 +4294,7 @@ class Pbe { } } let cp = null; -function Tj(t) { +function Cj(t) { if (t.setActive) return t.setActive(); if (cp) @@ -4314,9 +4314,9 @@ function Tj(t) { } } } -let dB; +let pB; function jd(t, e, r = e) { - let n = dB || (dB = document.createRange()); + let n = pB || (pB = document.createRange()); return n.setEnd(t, r), n.setStart(t, e), n; } function Hp(t, e, r) { @@ -4325,7 +4325,7 @@ function Hp(t, e, r) { let s = new KeyboardEvent("keyup", n); return s.synthetic = !0, t.dispatchEvent(s), i.defaultPrevented || s.defaultPrevented; } -function $be(t) { +function Bbe(t) { for (; t; ) { if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host)) return t; @@ -4333,11 +4333,11 @@ function $be(t) { } return null; } -function Cj(t) { +function Ej(t) { for (; t.attributes.length; ) t.removeAttributeNode(t.attributes[0]); } -function Bbe(t, e) { +function Fbe(t, e) { let r = e.focusNode, n = e.focusOffset; if (!r || e.anchorNode != r || e.anchorOffset != n) return !1; @@ -4353,7 +4353,7 @@ function Bbe(t, e) { n = Sy(r), r = r.parentNode; } } -function Ej(t) { +function _j(t) { return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4); } class Ms { @@ -4367,7 +4367,7 @@ class Ms { return new Ms(e.parentNode, Sy(e) + 1, r); } } -const qR = []; +const YR = []; class yn { constructor() { this.parent = null, this.dom = null, this.flags = 2; @@ -4406,13 +4406,13 @@ class yn { } 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 = pB(s); + s = gB(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 = pB(s); + s = gB(s); } else if (this.flags & 1) for (let n of this.children) n.flags & 7 && (n.sync(e, r), n.flags &= -8); @@ -4489,7 +4489,7 @@ class yn { e = r; } } - replaceChildren(e, r, n = qR) { + replaceChildren(e, r, n = YR) { this.markDirty(); for (let i = e; i < r; i++) { let s = this.children[i]; @@ -4506,7 +4506,7 @@ class yn { return !1; } childCursor(e = this.length) { - return new _j(this.children, e, this.children.length); + return new Aj(this.children, e, this.children.length); } childPos(e, r = 1) { return this.childCursor().findPos(e, r); @@ -4546,11 +4546,11 @@ class yn { } } yn.prototype.breakAfter = 0; -function pB(t) { +function gB(t) { let e = t.nextSibling; return t.parentNode.removeChild(t), e; } -class _j { +class Aj { constructor(e, r, n) { this.children = e, this.pos = r, this.i = n, this.off = 0; } @@ -4563,7 +4563,7 @@ class _j { } } } -function Aj(t, e, r, n, i, s, a, o, l) { +function Lj(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) { @@ -4580,32 +4580,32 @@ function Aj(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 Lj(t, e, r, n, i, s) { +function Rj(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, Aj(t, u, h, o, l, n, 0, i, s); + t.length += f, Lj(t, u, h, o, l, n, 0, i, s); } -let ro = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, KA = typeof document < "u" ? document : { documentElement: { style: {} } }; -const JA = /* @__PURE__ */ /Edge\/(\d+)/.exec(ro.userAgent), Rj = /* @__PURE__ */ /MSIE \d/.test(ro.userAgent), e7 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ro.userAgent), PS = !!(Rj || e7 || JA), gB = !PS && /* @__PURE__ */ /gecko\/(\d+)/i.test(ro.userAgent), yE = !PS && /* @__PURE__ */ /Chrome\/(\d+)/.exec(ro.userAgent), mB = "webkitFontSmoothing" in KA.documentElement.style, Mj = !PS && /* @__PURE__ */ /Apple Computer/.test(ro.vendor), vB = Mj && (/* @__PURE__ */ /Mobile\/\w+/.test(ro.userAgent) || ro.maxTouchPoints > 2); +let ro = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, JA = typeof document < "u" ? document : { documentElement: { style: {} } }; +const e7 = /* @__PURE__ */ /Edge\/(\d+)/.exec(ro.userAgent), Mj = /* @__PURE__ */ /MSIE \d/.test(ro.userAgent), t7 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ro.userAgent), $S = !!(Mj || t7 || e7), mB = !$S && /* @__PURE__ */ /gecko\/(\d+)/i.test(ro.userAgent), bE = !$S && /* @__PURE__ */ /Chrome\/(\d+)/.exec(ro.userAgent), vB = "webkitFontSmoothing" in JA.documentElement.style, Dj = !$S && /* @__PURE__ */ /Apple Computer/.test(ro.vendor), yB = Dj && (/* @__PURE__ */ /Mobile\/\w+/.test(ro.userAgent) || ro.maxTouchPoints > 2); var Mt = { - mac: vB || /* @__PURE__ */ /Mac/.test(ro.platform), + mac: yB || /* @__PURE__ */ /Mac/.test(ro.platform), windows: /* @__PURE__ */ /Win/.test(ro.platform), linux: /* @__PURE__ */ /Linux|X11/.test(ro.platform), - ie: PS, - ie_version: Rj ? KA.documentMode || 6 : e7 ? +e7[1] : JA ? +JA[1] : 0, - gecko: gB, - gecko_version: gB ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(ro.userAgent) || [0, 0])[1] : 0, - chrome: !!yE, - chrome_version: yE ? +yE[1] : 0, - ios: vB, + ie: $S, + ie_version: Mj ? JA.documentMode || 6 : t7 ? +t7[1] : e7 ? +e7[1] : 0, + gecko: mB, + gecko_version: mB ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(ro.userAgent) || [0, 0])[1] : 0, + chrome: !!bE, + chrome_version: bE ? +bE[1] : 0, + ios: yB, android: /* @__PURE__ */ /Android\b/.test(ro.userAgent), - webkit: mB, - safari: Mj, - webkit_version: mB ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, - tabSize: KA.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" + webkit: vB, + safari: Dj, + webkit_version: vB ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, + tabSize: JA.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" }; -const Fbe = 256; +const zbe = 256; class Bu extends yn { constructor(e) { super(), this.text = e; @@ -4623,7 +4623,7 @@ class Bu extends yn { e.nodeType == 3 && this.createDOM(e); } merge(e, r, n) { - return this.flags & 8 || n && (!(n instanceof Bu) || this.length - (r - e) + n.length > Fbe || 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 Bu) || this.length - (r - e) + n.length > zbe || 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 Bu(this.text.slice(e)); @@ -4639,7 +4639,7 @@ class Bu extends yn { return { from: n, to: n + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; } coordsAt(e, r) { - return zbe(this.dom, e, r); + return Vbe(this.dom, e, r); } } class Fu extends yn { @@ -4649,7 +4649,7 @@ class Fu extends yn { i.setParent(this); } setAttrs(e) { - if (Cj(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs) + if (Ej(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; @@ -4664,7 +4664,7 @@ class Fu extends yn { 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 Fu && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (Lj(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); + return n && (!(n instanceof Fu && n.mark.eq(this.mark)) || e && s <= 0 || r < this.length && a <= 0) ? !1 : (Rj(this, e, r, n ? n.children.slice() : [], s - 1, a - 1), this.markDirty(), !0); } split(e) { let r = [], n = 0, i = -1, s = 0; @@ -4676,13 +4676,13 @@ class Fu extends yn { return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new Fu(this.mark, r, a); } domAtPos(e) { - return Dj(this, e); + return Nj(this, e); } coordsAt(e, r) { - return Ij(this, e, r); + return Pj(this, e, r); } } -function zbe(t, e, r) { +function Vbe(t, e, r) { let n = t.nodeValue.length; e > n && (e = n); let i = e, s = e, a = 0; @@ -4691,7 +4691,7 @@ function zbe(t, e, r) { if (!o.length) return null; let l = o[(a ? a < 0 : r >= 0) ? 0 : o.length - 1]; - return Mt.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? UR(l, a < 0) : l || null; + return Mt.safari && !a && l.width == 0 && (l = Array.prototype.find.call(o, (u) => u.width) || l), a ? qR(l, a < 0) : l || null; } class Ih extends yn { static create(e, r, n) { @@ -4747,7 +4747,7 @@ class Ih extends yn { 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 UR(s, !a); + return qR(s, !a); } get isEditable() { return !1; @@ -4806,8 +4806,8 @@ class Ag extends yn { return !0; } } -Bu.prototype.children = Ih.prototype.children = Ag.prototype.children = qR; -function Dj(t, e) { +Bu.prototype.children = Ih.prototype.children = Ag.prototype.children = YR; +function Nj(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; @@ -4831,11 +4831,11 @@ function Dj(t, e) { } return new Ms(r, 0); } -function Nj(t, e, r) { +function Ij(t, e, r) { let n, { children: i } = t; - r > 0 && e instanceof Fu && i.length && (n = i[i.length - 1]) instanceof Fu && n.mark.eq(e.mark) ? Nj(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; + r > 0 && e instanceof Fu && i.length && (n = i[i.length - 1]) instanceof Fu && n.mark.eq(e.mark) ? Ij(n, e.children[0], r - 1) : (i.push(e), e.setParent(t)), t.length += e.length; } -function Ij(t, e, r) { +function Pj(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++) { @@ -4845,25 +4845,25 @@ function Ij(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) : Vbe(t); + return l ? l.coordsAt(Math.max(0, l == n ? i : a), r) : Ube(t); } -function Vbe(t) { +function Ube(t) { let e = t.dom.lastChild; if (!e) return t.dom.getBoundingClientRect(); let r = ky(e); return r[r.length - 1] || null; } -function t7(t, e) { +function r7(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 yB = /* @__PURE__ */ Object.create(null); -function YR(t, e, r) { +const bB = /* @__PURE__ */ Object.create(null); +function QR(t, e, r) { if (t == e) return !0; - t || (t = yB), e || (e = yB); + t || (t = bB), e || (e = bB); 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; @@ -4872,7 +4872,7 @@ function YR(t, e, r) { return !1; return !0; } -function r7(t, e, r) { +function n7(t, e, r) { let n = !1; if (e) for (let i in e) @@ -4882,7 +4882,7 @@ function r7(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 Ube(t) { +function qbe(t) { let e = /* @__PURE__ */ Object.create(null); for (let r = 0; r < t.attributes.length; r++) { let n = t.attributes[r]; @@ -4900,7 +4900,7 @@ class bi extends yn { return !1; this.dom || n.transferDOM(this); } - return i && this.setDeco(n ? n.attrs : null), Lj(this, e, r, n ? n.children.slice() : [], s, a), !0; + return i && this.setDeco(n ? n.attrs : null), Rj(this, e, r, n ? n.children.slice() : [], s, a), !0; } split(e) { let r = new bi(); @@ -4918,24 +4918,24 @@ class bi extends yn { !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) { - YR(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); + QR(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e); } append(e, r) { - Nj(this, e, r); + Ij(this, e, r); } addLineDeco(e) { let r = e.spec.attributes, n = e.spec.class; - r && (this.attrs = t7(r, this.attrs || {})), n && (this.attrs = t7({ class: n }, this.attrs || {})); + r && (this.attrs = r7(r, this.attrs || {})), n && (this.attrs = r7({ class: n }, this.attrs || {})); } domAtPos(e) { - return Dj(this, e); + return Nj(this, e); } reuseDOM(e) { e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6); } sync(e, r) { var n; - this.dom ? this.flags & 4 && (Cj(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 && (r7(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 && (Ej(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 && (n7(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 && yn.get(i) instanceof Fu; ) i = i.lastChild; @@ -4963,7 +4963,7 @@ class bi extends yn { } : null; } coordsAt(e, r) { - let n = Ij(this, e, r); + let n = Pj(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) { @@ -5010,7 +5010,7 @@ class Gh extends yn { return n.breakAfter = this.breakAfter, n; } get children() { - return qR; + return YR; } 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"); @@ -5097,7 +5097,7 @@ class Et extends Zd { if (e.isBlockGap) n = -5e8, i = 4e8; else { - let { start: s, end: a } = Pj(e, r); + let { start: s, end: a } = $j(e, r); n = (s ? r ? -3e8 : -1 : 5e8) - 1, i = (a ? r ? 2e8 : 1 : -6e8) + 1; } return new lf(e, n, i, r, e.widget || null, !0); @@ -5115,12 +5115,12 @@ class Et extends Zd { Et.none = Er.empty; class Qb extends Et { constructor(e) { - let { start: r, end: n } = Pj(e); + let { start: r, end: n } = $j(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 Qb && 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)) && YR(this.attrs, e.attrs, "class"); + return this == e || e instanceof Qb && 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)) && QR(this.attrs, e.attrs, "class"); } range(e, r = e) { if (e >= r) @@ -5134,7 +5134,7 @@ class Wb extends Et { super(-2e8, -2e8, null, e); } eq(e) { - return e instanceof Wb && this.spec.class == e.spec.class && YR(this.spec.attributes, e.spec.attributes); + return e instanceof Wb && this.spec.class == e.spec.class && QR(this.spec.attributes, e.spec.attributes); } range(e, r = e) { if (r != e) @@ -5155,7 +5155,7 @@ class lf extends Et { return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0); } eq(e) { - return e instanceof lf && qbe(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; + return e instanceof lf && Ybe(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)) @@ -5166,14 +5166,14 @@ class lf extends Et { } } lf.prototype.point = !0; -function Pj(t, e = !1) { +function $j(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 qbe(t, e) { +function Ybe(t, e) { return t == e || !!(t && e && t.compare(e)); } -function n7(t, e, r, n = 0) { +function i7(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); } @@ -5228,9 +5228,9 @@ class Gv { let o = r - e; if (n instanceof lf) if (n.block) - n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Gh(n.widget || new bB("div"), o, n)); + n.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Gh(n.widget || new xB("div"), o, n)); else { - let l = Ih.create(n.widget || new bB("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(); + let l = Ih.create(n.widget || new xB("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(fw(new Ag(1), i), s), s = i.length + Math.max(0, s - i.length)), f.append(fw(l, i), s), this.atCursorPos = h, this.pendingBuffer = h ? e < r || s > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice()); } else @@ -5247,7 +5247,7 @@ function fw(t, e) { t = new Fu(r, [t], t.length); return t; } -class bB extends za { +class xB extends za { constructor(e) { super(), this.tag = e; } @@ -5264,9 +5264,9 @@ class bB extends za { return !0; } } -const $j = /* @__PURE__ */ _t.define(), Bj = /* @__PURE__ */ _t.define(), Fj = /* @__PURE__ */ _t.define(), zj = /* @__PURE__ */ _t.define(), i7 = /* @__PURE__ */ _t.define(), Vj = /* @__PURE__ */ _t.define(), Uj = /* @__PURE__ */ _t.define(), qj = /* @__PURE__ */ _t.define({ +const Bj = /* @__PURE__ */ _t.define(), Fj = /* @__PURE__ */ _t.define(), zj = /* @__PURE__ */ _t.define(), Vj = /* @__PURE__ */ _t.define(), s7 = /* @__PURE__ */ _t.define(), Uj = /* @__PURE__ */ _t.define(), qj = /* @__PURE__ */ _t.define(), Yj = /* @__PURE__ */ _t.define({ combine: (t) => t.some((e) => e) -}), Yj = /* @__PURE__ */ _t.define({ +}), Qj = /* @__PURE__ */ _t.define({ combine: (t) => t.some((e) => e) }); class Xp { @@ -5282,11 +5282,11 @@ class Xp { } const dw = /* @__PURE__ */ Zt.define({ map: (t, e) => t.map(e) }); function Bo(t, e, r) { - let n = t.facet(zj); + let n = t.facet(Vj); 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 $S = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : !0 }); -let Ybe = 0; +const BS = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : !0 }); +let Qbe = 0; const dv = /* @__PURE__ */ _t.define(); class on { constructor(e, r, n, i, s) { @@ -5294,7 +5294,7 @@ class on { } static define(e, r) { const { eventHandlers: n, eventObservers: i, provide: s, decorations: a } = r || {}; - return new on(Ybe++, e, n, i, (o) => { + return new on(Qbe++, e, n, i, (o) => { let l = [dv.of(o)]; return a && l.push(Ty.of((u) => { let h = u.plugin(o); @@ -5306,7 +5306,7 @@ class on { return on.define((n) => new e(n), r); } } -class bE { +class xE { constructor(e) { this.spec = e, this.mustUpdate = null, this.value = null; } @@ -5347,9 +5347,9 @@ class bE { this.spec = this.value = null; } } -const Qj = /* @__PURE__ */ _t.define(), QR = /* @__PURE__ */ _t.define(), Ty = /* @__PURE__ */ _t.define(), WR = /* @__PURE__ */ _t.define(), Wj = /* @__PURE__ */ _t.define(); -function xB(t, e, r) { - let n = t.state.facet(Wj); +const Wj = /* @__PURE__ */ _t.define(), WR = /* @__PURE__ */ _t.define(), Ty = /* @__PURE__ */ _t.define(), GR = /* @__PURE__ */ _t.define(), Gj = /* @__PURE__ */ _t.define(); +function wB(t, e, r) { + let n = t.state.facet(Gj); if (!n.length) return n; let i = n.map((a) => a instanceof Function ? a(t) : a), s = []; @@ -5371,10 +5371,10 @@ function xB(t, e, r) { } }), s; } -const Gj = /* @__PURE__ */ _t.define(); -function Hj(t) { +const Hj = /* @__PURE__ */ _t.define(); +function Xj(t) { let e = 0, r = 0, n = 0, i = 0; - for (let s of t.state.facet(Gj)) { + for (let s of t.state.facet(Hj)) { 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))); } @@ -5418,7 +5418,7 @@ class Fo { } } } -class O5 { +class k5 { constructor(e, r, n) { this.view = e, this.state = r, this.transactions = n, this.flags = 0, this.startState = e.state, this.changes = ai.empty(this.startState.doc.length); for (let s of n) @@ -5427,7 +5427,7 @@ class O5 { this.changes.iterChangedRanges((s, a, o, l) => i.push(new Fo(s, a, o, l))), this.changedRanges = i; } static create(e, r, n) { - return new O5(e, r, n); + return new k5(e, r, n); } get viewportChanged() { return (this.flags & 4) > 0; @@ -5454,25 +5454,25 @@ class O5 { var In = /* @__PURE__ */ function(t) { return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t; }(In || (In = {})); -const Cy = In.LTR, Xj = In.RTL; -function Zj(t) { +const Cy = In.LTR, Zj = In.RTL; +function jj(t) { let e = []; for (let r = 0; r < t.length; r++) e.push(1 << +t[r]); return e; } -const Qbe = /* @__PURE__ */ Zj("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Wbe = /* @__PURE__ */ Zj("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), s7 = /* @__PURE__ */ Object.create(null), jl = []; +const Wbe = /* @__PURE__ */ jj("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Gbe = /* @__PURE__ */ jj("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), a7 = /* @__PURE__ */ Object.create(null), jl = []; for (let t of ["()", "[]", "{}"]) { let e = /* @__PURE__ */ t.charCodeAt(0), r = /* @__PURE__ */ t.charCodeAt(1); - s7[e] = r, s7[r] = -e; + a7[e] = r, a7[r] = -e; } -function Gbe(t) { - return t <= 247 ? Qbe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Wbe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; +function Hbe(t) { + return t <= 247 ? Wbe[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Gbe[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1; } -const Hbe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; +const Xbe = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/; class Ph { get dir() { - return this.level % 2 ? Xj : Cy; + return this.level % 2 ? Zj : Cy; } constructor(e, r, n) { this.from = e, this.to = r, this.level = n; @@ -5495,22 +5495,22 @@ class Ph { return s; } } -function jj(t, e) { +function Kj(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 || !jj(n.inner, i.inner)) + if (n.from != i.from || n.to != i.to || n.direction != i.direction || !Kj(n.inner, i.inner)) return !1; } return !0; } const tn = []; -function Xbe(t, e, r, n, i) { +function Zbe(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 = Gbe(t.charCodeAt(u)); + let d = Hbe(t.charCodeAt(u)); d == 512 ? d = h : d == 8 && f == 4 && (d = 16), tn[u] = d == 4 ? 2 : d, d & 7 && (f = d), h = d; } for (let u = a, h = l, f = l; u < o; u++) { @@ -5531,12 +5531,12 @@ function Xbe(t, e, r, n, i) { } } } -function Zbe(t, e, r, n, i) { +function jbe(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 = s7[d = t.charCodeAt(f)]) + if (p = a7[d = t.charCodeAt(f)]) if (p < 0) { for (let m = o - 3; m >= 0; m -= 3) if (jl[m + 1] == -p) { @@ -5567,7 +5567,7 @@ function Zbe(t, e, r, n, i) { } } } -function jbe(t, e, r, n) { +function Kbe(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; ) { @@ -5592,7 +5592,7 @@ function jbe(t, e, r, n) { } } } -function a7(t, e, r, n, i, s, a) { +function o7(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; ) { @@ -5625,7 +5625,7 @@ function a7(t, e, r, n, i, s, a) { else { m.from > l && a.push(new Ph(l, m.from, p)); let v = m.direction == Cy != !(p % 2); - o7(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; + l7(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.to; } g = m.to; } else { @@ -5633,7 +5633,7 @@ function a7(t, e, r, n, i, s, a) { break; g++; } - d ? a7(t, l, g, n + 1, i, d, a) : l < g && a.push(new Ph(l, g, p)), l = g; + d ? o7(t, l, g, n + 1, i, d, a) : l < g && a.push(new Ph(l, g, p)), l = g; } else for (let l = r, u = s.length; l > e; ) { @@ -5666,7 +5666,7 @@ function a7(t, e, r, n, i, s, a) { else { m.to < l && a.push(new Ph(m.to, l, p)); let v = m.direction == Cy != !(p % 2); - o7(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; + l7(t, v ? n + 1 : n, i, m.inner, m.from, m.to, a), l = m.from; } g = m.from; } else { @@ -5674,29 +5674,29 @@ function a7(t, e, r, n, i, s, a) { break; g--; } - d ? a7(t, g, l, n + 1, i, d, a) : g < l && a.push(new Ph(g, l, p)), l = g; + d ? o7(t, g, l, n + 1, i, d, a) : g < l && a.push(new Ph(g, l, p)), l = g; } } -function o7(t, e, r, n, i, s, a) { +function l7(t, e, r, n, i, s, a) { let o = e % 2 ? 2 : 1; - Xbe(t, i, s, n, o), Zbe(t, i, s, n, o), jbe(i, s, n, o), a7(t, i, s, e, r, n, a); + Zbe(t, i, s, n, o), jbe(t, i, s, n, o), Kbe(i, s, n, o), o7(t, i, s, e, r, n, a); } -function Kbe(t, e, r) { +function Jbe(t, e, r) { if (!t) - return [new Ph(0, 0, e == Xj ? 1 : 0)]; - if (e == Cy && !r.length && !Hbe.test(t)) - return Kj(t.length); + return [new Ph(0, 0, e == Zj ? 1 : 0)]; + if (e == Cy && !r.length && !Xbe.test(t)) + return Jj(t.length); if (r.length) for (; t.length > tn.length; ) tn[tn.length] = 256; let n = [], i = e == Cy ? 0 : 1; - return o7(t, i, i, r, 0, t.length, n), n; + return l7(t, i, i, r, 0, t.length, n), n; } -function Kj(t) { +function Jj(t) { return [new Ph(0, t, 0)]; } -let Jj = ""; -function Jbe(t, e, r, n, i) { +let eK = ""; +function exe(t, e, r, n, i) { var s; let a = n.head - t.from, o = -1; if (a == 0) { @@ -5713,12 +5713,12 @@ function Jbe(t, e, r, n, i) { 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 = ls(t.text, a, u); - if (Jj = t.text.slice(Math.min(a, h), Math.max(a, h)), h > l.from && h < l.to) + if (eK = t.text.slice(Math.min(a, h), Math.max(a, h)), h > l.from && h < l.to) return Ve.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 ? Ve.cursor(i ? t.to : t.from, i ? -1 : 1, r) : f && f.level < l.level ? Ve.cursor(f.side(!i, r) + t.from, i ? 1 : -1, f.level) : Ve.cursor(h + t.from, i ? -1 : 1, l.level); } -class wB extends yn { +class OB extends yn { get length() { return this.view.state.doc.length; } @@ -5730,15 +5730,15 @@ class wB extends yn { 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 : !axe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); - let s = i > -1 ? txe(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 : !oxe(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head)); + let s = i > -1 ? rxe(this.view, e.changes, i) : null; if (this.domChanged = null, this.hasComposition) { this.markedForComposition.clear(); let { from: u, to: h } = this.hasComposition; n = new Fo(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, (Mt.ie || Mt.chrome) && !s && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); - let a = this.decorations, o = this.updateDeco(), l = ixe(a, o, e.changes); + let a = this.decorations, o = this.updateDeco(), l = sxe(a, o, e.changes); return n = Fo.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) { @@ -5752,7 +5752,7 @@ class wB extends yn { let s = []; if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) for (let a of this.children) - a instanceof Gh && a.widget instanceof OB && s.push(a.dom); + a instanceof Gh && a.widget instanceof kB && s.push(a.dom); i.updateGaps(s); } updateChildren(e, r, n) { @@ -5770,7 +5770,7 @@ class wB extends yn { } else ({ content: d, breakAtStart: p, openStart: g, openEnd: m } = Gv.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); - Aj(this, b, w, v, y, d, p, g, m); + Lj(this, b, w, v, y, d, p, g, m); } n && this.fixCompositionDOM(n); } @@ -5794,26 +5794,26 @@ class wB extends yn { } updateSelection(e = !1, r = !1) { (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange(); - let n = this.view.root.activeElement, i = n == this.dom, s = !i && a4(this.dom, this.view.observer.selectionRange) && !(n && this.dom.contains(n)); + let n = this.view.root.activeElement, i = n == this.dom, s = !i && o4(this.dom, this.view.observer.selectionRange) && !(n && this.dom.contains(n)); if (!(i || r || s)) return; 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 (Mt.gecko && o.empty && !this.hasComposition && exe(l)) { + if (Mt.gecko && o.empty && !this.hasComposition && txe(l)) { let f = document.createTextNode(""); this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new Ms(f, 0), a = !0; } let h = this.view.observer.selectionRange; - (a || !h.focusNode || !w5(l.node, l.offset, h.anchorNode, h.anchorOffset) || !w5(u.node, u.offset, h.focusNode, h.focusOffset)) && (this.view.observer.ignore(() => { - Mt.android && Mt.chrome && this.dom.contains(h.focusNode) && sxe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); - let f = x5(this.view.root); + (a || !h.focusNode || !O5(l.node, l.offset, h.anchorNode, h.anchorOffset) || !O5(u.node, u.offset, h.focusNode, h.focusOffset)) && (this.view.observer.ignore(() => { + Mt.android && Mt.chrome && this.dom.contains(h.focusNode) && axe(h.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); + let f = w5(this.view.root); if (f) if (o.empty) { if (Mt.gecko) { - let d = rxe(l.node, l.offset); + let d = nxe(l.node, l.offset); if (d && d != 3) { - let p = tK(l.node, l.offset, d == 1 ? 1 : -1); + let p = rK(l.node, l.offset, d == 1 ? 1 : -1); p && (l = new Ms(p.node, p.offset)); } } @@ -5834,7 +5834,7 @@ class wB extends yn { enforceCursorAssoc() { if (this.hasComposition) return; - let { view: e } = this, r = e.state.selection.main, n = x5(e.root), { anchorNode: i, anchorOffset: s } = e.observer.selectionRange; + let { view: e } = this, r = e.state.selection.main, n = w5(e.root), { anchorNode: i, anchorOffset: s } = e.observer.selectionRange; if (!n || !r.empty || !r.assoc || !n.modify) return; let a = bi.find(this, r.head); @@ -5967,7 +5967,7 @@ class wB extends yn { } childCursor(e = this.length) { let r = this.children.length; - return r && (e -= this.children[--r].length), new _j(this.children, e, r); + return r && (e -= this.children[--r].length), new Aj(this.children, e, r); } computeBlockGapDeco() { let e = [], r = this.view.viewState; @@ -5976,7 +5976,7 @@ class wB extends yn { if (a > n) { let o = (r.lineBlockAt(a).bottom - r.lineBlockAt(n).top) / this.view.scaleY; e.push(Et.replace({ - widget: new OB(o), + widget: new kB(o), block: !0, inclusive: !0, isBlockGap: !0 @@ -6013,19 +6013,19 @@ class wB extends yn { right: Math.max(n.right, i.right), bottom: Math.max(n.bottom, i.bottom) }); - let s = Hj(this.view), a = { + let s = Xj(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; - Nbe(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 == In.LTR); + Ibe(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 == In.LTR); } } -function exe(t) { +function txe(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 OB extends za { +class kB extends za { constructor(e) { super(), this.height = e; } @@ -6043,15 +6043,15 @@ class OB extends za { return this.height; } } -function eK(t, e) { - let r = t.observer.selectionRange, n = r.focusNode && tK(r.focusNode, r.focusOffset, 0); +function tK(t, e) { + let r = t.observer.selectionRange, n = r.focusNode && rK(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 txe(t, e, r) { - let n = eK(t, r); +function rxe(t, e, r) { + let n = tK(t, r); if (!n) return null; let { node: i, from: s, to: a } = n, o = i.nodeValue; @@ -6068,7 +6068,7 @@ function txe(t, e, r) { if (f != t.contentDOM) h.push({ node: f, deco: new Qb({ inclusive: !0, - attributes: Ube(f), + attributes: qbe(f), tagName: f.tagName.toLowerCase() }) }); else @@ -6076,7 +6076,7 @@ function txe(t, e, r) { } } } -function tK(t, e, r) { +function rK(t, e, r) { if (r <= 0) for (let n = t, i = e; ; ) { if (n.nodeType == 3) @@ -6097,37 +6097,37 @@ function tK(t, e, r) { } return null; } -function rxe(t, e) { +function nxe(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 nxe = class { +let ixe = class { constructor() { this.changes = []; } compareRange(e, r) { - n7(e, r, this.changes); + i7(e, r, this.changes); } comparePoint(e, r) { - n7(e, r, this.changes); + i7(e, r, this.changes); } }; -function ixe(t, e, r) { - let n = new nxe(); +function sxe(t, e, r) { + let n = new ixe(); return Er.compare(t, e, r, n), n.changes; } -function sxe(t, e) { +function axe(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 axe(t, e) { +function oxe(t, e) { let r = !1; return e && t.iterChangedRanges((n, i) => { n < e.to && i > e.from && (r = !0); }), r; } -function oxe(t, e, r = 1) { +function lxe(t, e, r = 1) { let n = t.charCategorizer(e), i = t.doc.lineAt(e), s = e - i.from; if (i.length == 0) return Ve.cursor(e); @@ -6149,50 +6149,50 @@ function oxe(t, e, r = 1) { } return Ve.range(a + i.from, o + i.from); } -function lxe(t, e) { +function cxe(t, e) { return e.left > t ? e.left - t : Math.max(0, t - e.right); } -function cxe(t, e) { +function uxe(t, e) { return e.top > t ? e.top - t : Math.max(0, t - e.bottom); } -function xE(t, e) { +function wE(t, e) { return t.top < e.bottom - 1 && t.bottom > e.top + 1; } -function kB(t, e) { +function SB(t, e) { return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t; } -function SB(t, e) { +function TB(t, e) { return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t; } -function l7(t, e, r) { +function c7(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 = ky(g); for (let v = 0; v < m.length; v++) { let y = m[v]; - i && xE(i, y) && (y = kB(SB(y, i.bottom), i.top)); - let b = lxe(e, y), w = cxe(r, y); + i && wE(i, y) && (y = SB(TB(y, i.bottom), i.top)); + let b = cxe(e, y), w = uxe(r, y); if (b == 0 && w == 0) - return g.nodeType == 3 ? TB(g, e, r) : l7(g, e, r); + return g.nodeType == 3 ? CB(g, e, r) : c7(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 && xE(h, y) ? h = SB(h, y.bottom) : f && xE(f, y) && (f = kB(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 && wE(h, y) ? h = TB(h, y.bottom) : f && wE(f, y) && (f = SB(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 TB(n, d, r); + return CB(n, d, r); if (o && n.contentEditable != "false") - return l7(n, d, r); + return c7(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 TB(t, e, r) { +function CB(t, e, r) { let n = t.nodeValue.length, i = -1, s = 1e9, a = 0; for (let o = 0; o < n; o++) { let l = jd(t, o, o + 1).getClientRects(); @@ -6212,7 +6212,7 @@ function TB(t, e, r) { } return { node: t, offset: i > -1 ? i : a > 0 ? t.nodeValue.length : 0 }; } -function rK(t, e, r, n = -1) { +function nK(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) @@ -6228,9 +6228,9 @@ function rK(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 : CB(t, a, l, h, f); + return t.viewport.from == 0 ? 0 : r ? null : EB(t, a, l, h, f); if (p > t.viewport.to) - return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : CB(t, a, l, h, f); + return t.viewport.to == t.state.doc.length ? t.state.doc.length : r ? null : EB(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; @@ -6240,14 +6240,14 @@ function rK(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) || Mt.safari && uxe(y, b, h) || Mt.chrome && hxe(y, b, h)) && (y = void 0)); + O && ({ startContainer: y, startOffset: b } = O, (!t.contentDOM.contains(y) || Mt.safari && hxe(y, b, h) || Mt.chrome && fxe(y, b, h)) && (y = void 0)); } } if (!y || !t.docView.dom.contains(y)) { let O = bi.find(t.docView, p); if (!O) return d > l.top + l.height / 2 ? l.to : l.from; - ({ node: y, offset: b } = l7(O.dom, h, f)); + ({ node: y, offset: b } = c7(O.dom, h, f)); } let w = t.docView.nearest(y); if (!w) @@ -6258,16 +6258,16 @@ function rK(t, e, r, n = -1) { } else return w.localPosFromDOM(y, b) + w.posAtStart; } -function CB(t, e, r, n, i) { +function EB(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 + HA(a, s, t.state.tabSize); + return r.from + XA(a, s, t.state.tabSize); } -function uxe(t, e, r) { +function hxe(t, e, r) { let n; if (t.nodeType != 3 || e != (n = t.nodeValue.length)) return !1; @@ -6276,7 +6276,7 @@ function uxe(t, e, r) { return !1; return jd(t, n - 1, n).getBoundingClientRect().left > r; } -function hxe(t, e, r) { +function fxe(t, e, r) { if (e != 0) return !1; for (let i = t; ; ) { @@ -6290,7 +6290,7 @@ function hxe(t, e, r) { let n = t.nodeType == 1 ? t.getBoundingClientRect() : jd(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect(); return r - n.left > 5; } -function c7(t, e) { +function u7(t, e) { let r = t.lineBlockAt(e); if (Array.isArray(r.type)) { for (let n of r.type) @@ -6299,8 +6299,8 @@ function c7(t, e) { } return r; } -function fxe(t, e, r, n) { - let i = c7(t, e.head), s = !n || i.type != ia.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head); +function dxe(t, e, r, n) { + let i = u7(t, e.head), s = !n || i.type != ia.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 == In.LTR) ? a.right - 1 : a.left + 1, @@ -6311,10 +6311,10 @@ function fxe(t, e, r, n) { } return Ve.cursor(r ? i.to : i.from, r ? -1 : 1); } -function EB(t, e, r, n) { +function _B(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 = Jbe(i, s, a, o, r), h = Jj; + let u = exe(i, s, a, o, r), h = eK; if (!u) { if (i.number == (r ? t.state.doc.lines : 1)) return o; @@ -6332,14 +6332,14 @@ function EB(t, e, r, n) { o = u; } } -function dxe(t, e, r) { +function pxe(t, e, r) { let n = t.state.charCategorizer(e), i = n(r); return (s) => { let a = n(s); return i == Sn.Space && (i = a), i == a; }; } -function pxe(t, e, r, n) { +function gxe(t, e, r, n) { let i = e.head, s = r ? 1 : -1; if (i == (r ? t.state.doc.length : 0)) return Ve.cursor(i, e.assoc); @@ -6352,14 +6352,14 @@ function pxe(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 = rK(t, { x: f, y: g }, !1, s); + let g = o + (d + p) * s, m = nK(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 Ve.cursor(m, y, void 0, a); } } } -function o4(t, e, r) { +function l4(t, e, r) { for (; ; ) { let n = 0; for (let i of t) @@ -6373,19 +6373,19 @@ function o4(t, e, r) { return e; } } -function wE(t, e, r) { - let n = o4(t.state.facet(WR).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); +function OE(t, e, r) { + let n = l4(t.state.facet(GR).map((i) => i(t)), r.from, e.head > r.from ? -1 : 1); return n == r.from ? r : Ve.cursor(n, n < r.from ? 1 : -1); } -class gxe { +class mxe { 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, Mt.safari && e.contentDOM.addEventListener("input", () => null), Mt.gecko && Rxe(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, Mt.safari && e.contentDOM.addEventListener("input", () => null), Mt.gecko && Mxe(e.contentDOM.ownerDocument); } handleEvent(e) { - !kxe(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e); + !Sxe(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]; @@ -6403,7 +6403,7 @@ class gxe { } } ensureHandlers(e) { - let r = mxe(e), n = this.handlers, i = this.view.contentDOM; + let r = vxe(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]; @@ -6416,10 +6416,10 @@ class gxe { 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 && iK.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), Mt.android && Mt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) + if (e.keyCode != 27 && sK.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), Mt.android && Mt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0; let r; - return Mt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = nK.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || vxe.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 Mt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((r = iK.find((n) => n.keyCode == e.keyCode)) && !e.ctrlKey || yxe.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; @@ -6438,7 +6438,7 @@ class gxe { this.mouseSelection && this.mouseSelection.destroy(); } } -function _B(t, e) { +function AB(t, e) { return (r, n) => { try { return e.call(t, n, r); @@ -6447,7 +6447,7 @@ function _B(t, e) { } }; } -function mxe(t) { +function vxe(t) { let e = /* @__PURE__ */ Object.create(null); function r(n) { return e[n] || (e[n] = { observers: [], handlers: [] }); @@ -6457,12 +6457,12 @@ function mxe(t) { if (i && i.domEventHandlers) for (let s in i.domEventHandlers) { let a = i.domEventHandlers[s]; - a && r(s).handlers.push(_B(n.value, a)); + a && r(s).handlers.push(AB(n.value, a)); } if (i && i.domEventObservers) for (let s in i.domEventObservers) { let a = i.domEventObservers[s]; - a && r(s).observers.push(_B(n.value, a)); + a && r(s).observers.push(AB(n.value, a)); } } for (let n in Dl) @@ -6471,23 +6471,23 @@ function mxe(t) { r(n).observers.push(Nl[n]); return e; } -const nK = [ +const iK = [ { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" }, { key: "Enter", keyCode: 13, inputType: "insertParagraph" }, { key: "Enter", keyCode: 13, inputType: "insertLineBreak" }, { key: "Delete", keyCode: 46, inputType: "deleteContentForward" } -], vxe = "dthko", iK = [16, 17, 18, 20, 91, 92, 224, 225], pw = 6; +], yxe = "dthko", sK = [16, 17, 18, 20, 91, 92, 224, 225], pw = 6; function gw(t) { return Math.max(0, t) * 0.7 + 8; } -function yxe(t, e) { +function bxe(t, e) { return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY)); } -class bxe { +class xxe { 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 = Ibe(e.contentDOM), this.atoms = e.state.facet(WR).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 = Pbe(e.contentDOM), this.atoms = e.state.facet(GR).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(dr.allowMultipleSelections) && xxe(e, r), this.dragging = Oxe(e, r) && lK(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(dr.allowMultipleSelections) && wxe(e, r), this.dragging = kxe(e, r) && cK(r) == 1 ? null : !1; } start(e) { this.dragging === !1 && this.select(e); @@ -6496,10 +6496,10 @@ class bxe { var r; if (e.buttons == 0) return this.destroy(); - if (this.dragging || this.dragging == null && yxe(this.startEvent, e) < 10) + if (this.dragging || this.dragging == null && bxe(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 = Hj(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 = Xj(this.view); e.clientX - a.left <= s.left + pw ? n = -gw(s.left - e.clientX) : e.clientX + a.right >= s.right - pw && (n = gw(e.clientX - s.right)), e.clientY - a.top <= s.top + pw ? i = -gw(s.top - e.clientY) : e.clientY + a.bottom >= s.bottom - pw && (i = gw(e.clientY - s.bottom)), this.setScrollSpeed(n, i); } up(e) { @@ -6521,10 +6521,10 @@ class bxe { for (let n = 0; n < e.ranges.length; n++) { let i = e.ranges[n], s = null; if (i.empty) { - let a = o4(this.atoms, i.from, 0); + let a = l4(this.atoms, i.from, 0); a != i.from && (s = Ve.cursor(a, -1)); } else { - let a = o4(this.atoms, i.from, -1), o = o4(this.atoms, i.to, 1); + let a = l4(this.atoms, i.from, -1), o = l4(this.atoms, i.to, 1); (a != i.from || o != i.to) && (s = Ve.range(i.from == i.anchor ? a : o, i.from == i.head ? a : o)); } s && (r || (r = e.ranges.slice()), r[n] = s); @@ -6542,19 +6542,19 @@ class bxe { this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20); } } -function xxe(t, e) { - let r = t.state.facet($j); - return r.length ? r[0](e) : Mt.mac ? e.metaKey : e.ctrlKey; -} function wxe(t, e) { let r = t.state.facet(Bj); - return r.length ? r[0](e) : Mt.mac ? !e.altKey : !e.ctrlKey; + return r.length ? r[0](e) : Mt.mac ? e.metaKey : e.ctrlKey; } function Oxe(t, e) { + let r = t.state.facet(Fj); + return r.length ? r[0](e) : Mt.mac ? !e.altKey : !e.ctrlKey; +} +function kxe(t, e) { let { main: r } = t.state.selection; if (r.empty) return !1; - let n = x5(t.root); + let n = w5(t.root); if (!n || n.rangeCount == 0) return !0; let i = n.getRangeAt(0).getClientRects(); @@ -6565,7 +6565,7 @@ function Oxe(t, e) { } return !1; } -function kxe(t, e) { +function Sxe(t, e) { if (!e.bubbles) return !0; if (e.defaultPrevented) @@ -6575,19 +6575,19 @@ function kxe(t, e) { return !1; return !0; } -const Dl = /* @__PURE__ */ Object.create(null), Nl = /* @__PURE__ */ Object.create(null), sK = Mt.ie && Mt.ie_version < 15 || Mt.ios && Mt.webkit_version < 604; -function Sxe(t) { +const Dl = /* @__PURE__ */ Object.create(null), Nl = /* @__PURE__ */ Object.create(null), aK = Mt.ie && Mt.ie_version < 15 || Mt.ios && Mt.webkit_version < 604; +function Txe(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(), aK(t, r.value); + t.focus(), r.remove(), oK(t, r.value); }, 50); } -function aK(t, e) { +function oK(t, e) { let { state: r } = t, n, i = 1, s = r.toText(e), a = s.lines == r.selection.ranges.length; - if (u7 != null && r.selection.ranges.every((l) => l.empty) && u7 == s.toString()) { + if (h7 != null && r.selection.ranges.every((l) => l.empty) && h7 == s.toString()) { let l = -1; n = r.changeByRange((u) => { let h = r.doc.lineAt(u.from); @@ -6627,30 +6627,30 @@ Dl.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(Fj)) + for (let n of t.state.facet(zj)) if (r = n(t, e), r) break; - if (!r && e.button == 0 && (r = Exe(t, e)), r) { + if (!r && e.button == 0 && (r = _xe(t, e)), r) { let n = !t.hasFocus; - t.inputState.startMouseSelection(new bxe(t, e, r, n)), n && t.observer.ignore(() => Tj(t.contentDOM)); + t.inputState.startMouseSelection(new xxe(t, e, r, n)), n && t.observer.ignore(() => Cj(t.contentDOM)); let i = t.inputState.mouseSelection; if (i) return i.start(e), i.dragging === !1; } return !1; }; -function AB(t, e, r, n) { +function LB(t, e, r, n) { if (n == 1) return Ve.cursor(e, r); if (n == 2) - return oxe(t.state, e, r); + return lxe(t.state, e, r); { let i = bi.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++, Ve.range(a, o); } } -let oK = (t, e) => t >= e.top && t <= e.bottom, LB = (t, e, r) => oK(e, r) && t >= r.left && t <= r.right; -function Txe(t, e, r, n) { +let lK = (t, e) => t >= e.top && t <= e.bottom, RB = (t, e, r) => lK(e, r) && t >= r.left && t <= r.right; +function Cxe(t, e, r, n) { let i = bi.find(t.docView, e); if (!i) return 1; @@ -6660,40 +6660,40 @@ function Txe(t, e, r, n) { if (s == i.length) return -1; let a = i.coordsAt(s, -1); - if (a && LB(r, n, a)) + if (a && RB(r, n, a)) return -1; let o = i.coordsAt(s, 1); - return o && LB(r, n, o) ? 1 : a && oK(n, a) ? -1 : 1; + return o && RB(r, n, o) ? 1 : a && lK(n, a) ? -1 : 1; } -function RB(t, e) { +function MB(t, e) { let r = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1); - return { pos: r, bias: Txe(t, r, e.clientX, e.clientY) }; + return { pos: r, bias: Cxe(t, r, e.clientX, e.clientY) }; } -const Cxe = Mt.ie && Mt.ie_version <= 11; -let MB = null, DB = 0, NB = 0; -function lK(t) { - if (!Cxe) +const Exe = Mt.ie && Mt.ie_version <= 11; +let DB = null, NB = 0, IB = 0; +function cK(t) { + if (!Exe) return t.detail; - let e = MB, r = NB; - return MB = t, NB = Date.now(), DB = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (DB + 1) % 3 : 1; + let e = DB, r = IB; + return DB = t, IB = Date.now(), NB = !e || r > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (NB + 1) % 3 : 1; } -function Exe(t, e) { - let r = RB(t, e), n = lK(e), i = t.state.selection; +function _xe(t, e) { + let r = MB(t, e), n = cK(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 = RB(t, s), u, h = AB(t, l.pos, l.bias, n); + let l = MB(t, s), u, h = LB(t, l.pos, l.bias, n); if (r.pos != l.pos && !a) { - let f = AB(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); + let f = LB(t, r.pos, r.bias, n), d = Math.min(f.from, h.from), p = Math.max(f.to, h.to); h = d < h.from ? Ve.range(d, p) : Ve.range(p, d); } - return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = _xe(i, l.pos)) ? u : o ? i.addRange(h) : Ve.create([h]); + return a ? i.replaceRange(i.main.extend(h.from, h.to)) : o && n == 1 && i.ranges.length > 1 && (u = Axe(i, l.pos)) ? u : o ? i.addRange(h) : Ve.create([h]); } }; } -function _xe(t, e) { +function Axe(t, e) { for (let r = 0; r < t.ranges.length; r++) { let { from: n, to: i } = t.ranges[r]; if (n <= e && i >= e) @@ -6714,10 +6714,10 @@ Dl.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; }; Dl.dragend = (t) => (t.inputState.draggedContent = null, !1); -function IB(t, e, r, n) { +function PB(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 && wxe(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 && Oxe(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) }, @@ -6732,7 +6732,7 @@ Dl.drop = (t, e) => { let r = e.dataTransfer.files; if (r && r.length) { let n = Array(r.length), i = 0, s = () => { - ++i == r.length && IB(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); + ++i == r.length && PB(t, e, n.filter((a) => a != null).join(t.state.lineBreak), !1); }; for (let a = 0; a < r.length; a++) { let o = new FileReader(); @@ -6744,7 +6744,7 @@ Dl.drop = (t, e) => { } else { let n = e.dataTransfer.getData("Text"); if (n) - return IB(t, e, n, !0), !0; + return PB(t, e, n, !0), !0; } return !1; }; @@ -6752,10 +6752,10 @@ Dl.paste = (t, e) => { if (t.state.readOnly) return !0; t.observer.flush(); - let r = sK ? null : e.clipboardData; - return r ? (aK(t, r.getData("text/plain") || r.getData("text/uri-text")), !0) : (Sxe(t), !1); + let r = aK ? null : e.clipboardData; + return r ? (oK(t, r.getData("text/plain") || r.getData("text/uri-text")), !0) : (Txe(t), !1); }; -function Axe(t, e) { +function Lxe(t, e) { let r = t.dom.parentNode; if (!r) return; @@ -6764,7 +6764,7 @@ function Axe(t, e) { n.remove(), t.focus(); }, 50); } -function Lxe(t) { +function Rxe(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)); @@ -6778,42 +6778,42 @@ function Lxe(t) { } return { text: e.join(t.lineBreak), ranges: r, linewise: n }; } -let u7 = null; +let h7 = null; Dl.copy = Dl.cut = (t, e) => { - let { text: r, ranges: n, linewise: i } = Lxe(t.state); + let { text: r, ranges: n, linewise: i } = Rxe(t.state); if (!r && !i) return !1; - u7 = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ + h7 = i ? r : null, e.type == "cut" && !t.state.readOnly && t.dispatch({ changes: n, scrollIntoView: !0, userEvent: "delete.cut" }); - let s = sK ? null : e.clipboardData; - return s ? (s.clearData(), s.setData("text/plain", r), !0) : (Axe(t, r), !1); + let s = aK ? null : e.clipboardData; + return s ? (s.clearData(), s.setData("text/plain", r), !0) : (Lxe(t, r), !1); }; -const cK = /* @__PURE__ */ Vl.define(); -function uK(t, e) { +const uK = /* @__PURE__ */ Vl.define(); +function hK(t, e) { let r = []; - for (let n of t.facet(Uj)) { + for (let n of t.facet(qj)) { let i = n(t, e); i && r.push(i); } - return r ? t.update({ effects: r, annotations: cK.of(!0) }) : null; + return r ? t.update({ effects: r, annotations: uK.of(!0) }) : null; } -function hK(t) { +function fK(t) { setTimeout(() => { let e = t.hasFocus; if (e != t.inputState.notifiedFocused) { - let r = uK(t.state, e); + let r = hK(t.state, e); r ? t.dispatch(r) : t.update([]); } }, 10); } Nl.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), hK(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), fK(t); }; Nl.blur = (t) => { - t.observer.clearSelectionRange(), hK(t); + t.observer.clearSelectionRange(), fK(t); }; Nl.compositionstart = Nl.compositionupdate = (t) => { t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0); @@ -6829,7 +6829,7 @@ Nl.contextmenu = (t) => { Dl.beforeinput = (t, e) => { var r; let n; - if (Mt.chrome && Mt.android && (n = nK.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(n.key, n.keyCode), n.key == "Backspace" || n.key == "Delete")) { + if (Mt.chrome && Mt.android && (n = iK.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; @@ -6838,14 +6838,14 @@ Dl.beforeinput = (t, e) => { } return !1; }; -const PB = /* @__PURE__ */ new Set(); -function Rxe(t) { - PB.has(t) || (PB.add(t), t.addEventListener("copy", () => { +const $B = /* @__PURE__ */ new Set(); +function Mxe(t) { + $B.has(t) || ($B.add(t), t.addEventListener("copy", () => { }), t.addEventListener("cut", () => { })); } -const $B = ["pre-wrap", "normal", "pre-line", "break-spaces"]; -class Mxe { +const BB = ["pre-wrap", "normal", "pre-line", "break-spaces"]; +class Dxe { constructor(e) { this.lineWrapping = e, this.doc = Dr.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1; } @@ -6860,7 +6860,7 @@ class Mxe { return this.doc = e, this; } mustRefreshForWrapping(e) { - return $B.indexOf(e) > -1 != this.lineWrapping; + return BB.indexOf(e) > -1 != this.lineWrapping; } mustRefreshForHeights(e) { let r = !1; @@ -6871,7 +6871,7 @@ class Mxe { return r; } refresh(e, r, n, i, s, a) { - let o = $B.indexOf(e) > -1, l = Math.round(r) != Math.round(this.lineHeight) || this.lineWrapping != o; + let o = BB.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++) { @@ -6882,7 +6882,7 @@ class Mxe { return l; } } -class Dxe { +class Nxe { constructor(e, r) { this.from = e, this.heights = r, this.index = 0; } @@ -6917,7 +6917,7 @@ class fc { var mn = /* @__PURE__ */ function(t) { return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t; }(mn || (mn = {})); -const l4 = 1e-3; +const c4 = 1e-3; class sa { constructor(e, r, n = 2) { this.length = e, this.height = r, this.flags = n; @@ -6929,7 +6929,7 @@ class sa { this.flags = (e ? 2 : 0) | this.flags & -3; } setHeight(e, r) { - this.height != r && (Math.abs(this.height - r) > l4 && (e.heightChanged = !0), this.height = r); + this.height != r && (Math.abs(this.height - r) > c4 && (e.heightChanged = !0), this.height = r); } replace(e, r, n) { return sa.of(n); @@ -6947,7 +6947,7 @@ class sa { 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, mn.ByPosNoHeight, n, 0, 0)); h += d.from - l, l = d.from; - let g = GR.build(n.setDoc(a), e, h, f); + let g = HR.build(n.setDoc(a), e, h, f); s = s.replace(l, u, g); } return s.updateHeight(n, 0); @@ -6977,11 +6977,11 @@ class sa { o && (s += o.size); } let a = 0; - return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new Nxe(sa.of(e.slice(0, r)), a, sa.of(e.slice(n))); + return e[r - 1] == null ? (a = 1, r--) : e[r] == null && (a = 1, n++), new Ixe(sa.of(e.slice(0, r)), a, sa.of(e.slice(n))); } } sa.prototype.size = 1; -class fK extends sa { +class dK extends sa { constructor(e, r, n) { super(e, r), this.deco = n; } @@ -7001,7 +7001,7 @@ class fK extends sa { return `block(${this.length})`; } } -class ja extends fK { +class ja extends dK { constructor(e, r) { super(e, r, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0; } @@ -7091,13 +7091,13 @@ class is extends sa { let h = e.doc.lineAt(o).length; a.length && a.push(null); let f = i.heights[i.index++]; - l == -1 ? l = f : Math.abs(f - l) >= l4 && (l = -2); + l == -1 ? l = f : Math.abs(f - l) >= c4 && (l = -2); let d = new ja(h, f); d.outdated = !1, a.push(d), o += h + 1; } o <= s && a.push(null, new is(s - o).updateHeight(e, o)); let u = sa.of(a); - return (l < 0 || Math.abs(u.height - this.height) >= l4 || Math.abs(l - this.heightMetrics(e, r).perLine) >= l4) && (e.heightChanged = !0), u; + return (l < 0 || Math.abs(u.height - this.height) >= c4 || Math.abs(l - this.heightMetrics(e, r).perLine) >= c4) && (e.heightChanged = !0), u; } else (n || this.outdated) && (this.setHeight(e, e.heightForGap(r, r + this.length)), this.outdated = !1); return this; @@ -7106,7 +7106,7 @@ class is extends sa { return `gap(${this.length})`; } } -class Nxe extends sa { +class Ixe extends sa { 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; } @@ -7144,9 +7144,9 @@ class Nxe extends sa { let a = s.length; for (let o of n) s.push(o); - if (e > 0 && BB(s, a - 1), r < this.length) { + if (e > 0 && FB(s, a - 1), r < this.length) { let o = s.length; - this.decomposeRight(r, s), BB(s, o); + this.decomposeRight(r, s), FB(s, o); } return sa.of(s); } @@ -7173,12 +7173,12 @@ class Nxe extends sa { return this.left + (this.break ? " " : "-") + this.right; } } -function BB(t, e) { +function FB(t, e) { let r, n; t[e] == null && (r = t[e - 1]) instanceof is && (n = t[e + 1]) instanceof is && t.splice(e - 1, 3, new is(r.length + 1 + n.length)); } -const Ixe = 5; -class GR { +const Pxe = 5; +class HR { constructor(e, r) { this.pos = e, this.oracle = r, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e; } @@ -7197,7 +7197,7 @@ class GR { 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 fK(a, i, n)) : (a || s || i >= Ixe) && this.addLineDeco(i, s, a); + n.block ? this.addBlock(new dK(a, i, n)) : (a || s || i >= Pxe) && 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); @@ -7238,25 +7238,25 @@ class GR { return this.nodes; } static build(e, r, n, i) { - let s = new GR(n, e); + let s = new HR(n, e); return Er.spans(r, n, i, s, 0), s.finish(n); } } -function Pxe(t, e, r) { - let n = new $xe(); +function $xe(t, e, r) { + let n = new Bxe(); return Er.compare(t, e, r, n, 0), n.changes; } -class $xe { +class Bxe { constructor() { this.changes = []; } compareRange() { } comparePoint(e, r, n, i) { - (e < r || n && n.heightRelevant || i && i.heightRelevant) && n7(e, r, this.changes, 5); + (e < r || n && n.heightRelevant || i && i.heightRelevant) && i7(e, r, this.changes, 5); } } -function Bxe(t, e) { +function Fxe(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) { @@ -7277,7 +7277,7 @@ function Bxe(t, e) { bottom: Math.max(o, l) - (r.top + e) }; } -function Fxe(t, e) { +function zxe(t, e) { let r = t.getBoundingClientRect(); return { left: 0, @@ -7286,7 +7286,7 @@ function Fxe(t, e) { bottom: r.bottom - (r.top + e) }; } -class OE { +class kE { constructor(e, r, n) { this.from = e, this.to = r, this.size = n; } @@ -7302,11 +7302,11 @@ class OE { } draw(e, r) { return Et.replace({ - widget: new zxe(this.size * (r ? e.scaleY : e.scaleX), r) + widget: new Vxe(this.size * (r ? e.scaleY : e.scaleX), r) }).range(this.from, this.to); } } -class zxe extends za { +class Vxe extends za { constructor(e, r) { super(), this.size = e, this.vertical = r; } @@ -7321,11 +7321,11 @@ class zxe extends za { return this.vertical ? this.size : -1; } } -class FB { +class zB { 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 = zB, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = In.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; - let r = e.facet(QR).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); - this.heightOracle = new Mxe(r), this.stateDeco = e.facet(Ty).filter((n) => typeof n != "function"), this.heightMap = sa.empty().applyChanges(this.stateDeco, Dr.empty, this.heightOracle.setDoc(e.doc), [new Fo(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Et.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 = VB, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = In.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1; + let r = e.facet(WR).some((n) => typeof n != "function" && n.class == "cm-lineWrapping"); + this.heightOracle = new Dxe(r), this.stateDeco = e.facet(Ty).filter((n) => typeof n != "function"), this.heightMap = sa.empty().applyChanges(this.stateDeco, Dr.empty, this.heightOracle.setDoc(e.doc), [new Fo(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Et.set(this.lineGaps.map((n) => n.draw(this, !1))), this.computeVisibleRanges(); } updateForViewport() { let e = [this.viewport], { main: r } = this.state.selection; @@ -7336,7 +7336,7 @@ class FB { e.push(new mw(s, a)); } } - this.viewports = e.sort((n, i) => n.from - i.from), this.scaler = this.heightMap.height <= 7e6 ? zB : new qxe(this.heightOracle, this.heightMap, this.viewports); + this.viewports = e.sort((n, i) => n.from - i.from), this.scaler = this.heightMap.height <= 7e6 ? VB : new Yxe(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) => { @@ -7347,12 +7347,12 @@ class FB { this.state = e.state; let n = this.stateDeco; this.stateDeco = this.state.facet(Ty).filter((h) => typeof h != "function"); - let i = e.changedRanges, s = Fo.extendWithRanges(i, Pxe(n, this.stateDeco, e ? e.changes : ai.empty(this.state.doc.length))), a = this.heightMap.height, o = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); + let i = e.changedRanges, s = Fo.extendWithRanges(i, $xe(n, this.stateDeco, e ? e.changes : ai.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(Yj) && (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(Qj) && (this.mustEnforceCursorAssoc = !0); } measure(e) { let r = e.contentDOM, n = window.getComputedStyle(r), i = this.heightOracle, s = n.whiteSpace; @@ -7361,14 +7361,14 @@ class FB { this.contentDOMHeight = o.height, this.mustMeasureContent = !1; let u = 0, h = 0; if (o.width && o.height) { - let { scaleX: O, scaleY: S } = Sj(r, o); + let { scaleX: O, scaleY: S } = Tj(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 = Ej(e.scrollDOM); - let g = (this.printing ? Fxe : Bxe)(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 = _j(e.scrollDOM); + let g = (this.printing ? zxe : Fxe)(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) @@ -7383,7 +7383,7 @@ class FB { 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 ? sa.empty().applyChanges(this.stateDeco, Dr.empty, this.heightOracle, [new Fo(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new Dxe(S.from, C)); + this.heightMap = (a ? sa.empty().applyChanges(this.stateDeco, Dr.empty, this.heightOracle, [new Fo(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, a, new Nxe(S.from, C)); } i.heightChanged && (u |= 2); } @@ -7422,7 +7422,7 @@ class FB { return e; let n = []; for (let i of e) - r.touchesRange(i.from, i.to) || n.push(new OE(r.mapPos(i.from), r.mapPos(i.to), i.size)); + r.touchesRange(i.from, i.to) || n.push(new kE(r.mapPos(i.from), r.mapPos(i.to), i.size)); return n; } ensureLineGaps(e, r) { @@ -7439,20 +7439,20 @@ class FB { l(u, v - 10, f, d), l(v + 10, h, f, d); return; } - let m = Uxe(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 = qxe(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(Ve.cursor(h), !1, !0).head; v > u && (h = v); } - m = new OE(u, h, this.gapSize(f, u, h, d)); + m = new kE(u, h, this.gapSize(f, u, h, d)); } o.push(m); }; for (let u of this.viewportLines) { if (u.length < a) continue; - let h = Vxe(u.from, u.to, this.stateDeco); + let h = Uxe(u.from, u.to, this.stateDeco); if (h.total < a) continue; let f = this.scrollTarget ? this.scrollTarget.range.head : null, d, p; @@ -7482,7 +7482,7 @@ class FB { return this.heightOracle.lineWrapping ? e.height * s : i.total * this.heightOracle.charWidth * s; } updateLineGaps(e) { - OE.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Et.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); + kE.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Et.set(e.map((r) => r.draw(this, this.heightOracle.lineWrapping)))); } computeVisibleRanges() { let e = this.stateDeco; @@ -7523,7 +7523,7 @@ class mw { this.from = e, this.to = r; } } -function Vxe(t, e, r) { +function Uxe(t, e, r) { let n = [], i = t, s = 0; return Er.spans(r, t, e, { span() { @@ -7557,12 +7557,12 @@ function yw(t, e) { } return r / t.total; } -function Uxe(t, e) { +function qxe(t, e) { for (let r of t) if (e(r)) return r; } -const zB = { +const VB = { toDOM(t) { return t; }, @@ -7571,7 +7571,7 @@ const zB = { }, scale: 1 }; -class qxe { +class Yxe { constructor(e, r, n) { let i = 0, s = 0, a = 0; this.viewports = n.map(({ from: o, to: l }) => { @@ -7608,8 +7608,8 @@ function gv(t, e) { let r = e.toDOM(t.top), n = e.toDOM(t.bottom); return new fc(t.from, t.length, r, n - r, Array.isArray(t._content) ? t._content.map((i) => gv(i, e)) : t._content); } -const bw = /* @__PURE__ */ _t.define({ combine: (t) => t.join(" ") }), h7 = /* @__PURE__ */ _t.define({ combine: (t) => t.indexOf(!0) > -1 }), f7 = /* @__PURE__ */ Pu.newName(), dK = /* @__PURE__ */ Pu.newName(), pK = /* @__PURE__ */ Pu.newName(), gK = { "&light": "." + dK, "&dark": "." + pK }; -function d7(t, e, r) { +const bw = /* @__PURE__ */ _t.define({ combine: (t) => t.join(" ") }), f7 = /* @__PURE__ */ _t.define({ combine: (t) => t.indexOf(!0) > -1 }), d7 = /* @__PURE__ */ Pu.newName(), pK = /* @__PURE__ */ Pu.newName(), gK = /* @__PURE__ */ Pu.newName(), mK = { "&light": "." + pK, "&dark": "." + gK }; +function p7(t, e, r) { return new Pu(e, { finish(n) { return /&/.test(n) ? n.replace(/&\w*/, (i) => { @@ -7622,7 +7622,7 @@ function d7(t, e, r) { } }); } -const Yxe = /* @__PURE__ */ d7("." + f7, { +const Qxe = /* @__PURE__ */ p7("." + d7, { "&": { position: "relative !important", boxSizing: "border-box", @@ -7853,8 +7853,8 @@ const Yxe = /* @__PURE__ */ d7("." + f7, { border: "1px solid #555", backgroundColor: "inherit" } -}, gK), mv = "\uFFFF"; -class Qxe { +}, mK), mv = "\uFFFF"; +class Wxe { constructor(e, r) { this.points = e, this.text = "", this.lineSeparator = r.facet(dr.lineSeparator); } @@ -7876,7 +7876,7 @@ class Qxe { if (a == r) break; let o = yn.get(i), l = yn.get(a); - (o && l ? o.breakAfter : (o ? o.breakAfter : VB(i)) || VB(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; + (o && l ? o.breakAfter : (o ? o.breakAfter : UB(i)) || UB(a) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > s) && this.lineBreak(), i = a; } return this.findPointBefore(n, r), this; } @@ -7911,10 +7911,10 @@ class Qxe { } findPointInside(e, r) { for (let n of this.points) - (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (Wxe(e, n.node, n.offset) ? r : 0)); + (e.nodeType == 3 ? n.node == e : e.contains(n.node)) && (n.pos = this.text.length + (Gxe(e, n.node, n.offset) ? r : 0)); } } -function Wxe(t, e, r) { +function Gxe(t, e, r) { for (; ; ) { if (!e || r < $u(e)) return !1; @@ -7923,42 +7923,42 @@ function Wxe(t, e, r) { r = Sy(e) + 1, e = e.parentNode; } } -function VB(t) { +function UB(t) { return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName); } -class UB { +class qB { constructor(e, r) { this.node = e, this.offset = r, this.pos = -1; } } -class Gxe { +class Hxe { 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 ? [] : Zxe(e), l = new Qxe(o, e.state); - l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = jxe(o, this.bounds.from); + let o = s || a ? [] : jxe(e), l = new Wxe(o, e.state); + l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = Kxe(o, this.bounds.from); } else { - let o = e.observer.selectionRange, l = s && s.node == o.focusNode && s.offset == o.focusOffset || !jA(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 || !jA(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 || !KA(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 || !KA(e.contentDOM, o.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(o.anchorNode, o.anchorOffset); this.newSel = Ve.single(u, l); } } } -function mK(t, e) { +function vK(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 || Mt.android && e.text.length < o - a) && (l = i.to, u = "end"); - let h = Xxe(t.state.doc.sliceString(a, o, mv), e.text, l - a, u); + let h = Zxe(t.state.doc.sliceString(a, o, mv), e.text, l - a, u); h && (Mt.chrome && s == 13 && h.toB == h.from + 2 && e.text.slice(h.from, h.toB) == mv + mv && h.toB--, r = { from: a + h.from, to: a + h.toA, insert: Dr.of(e.text.slice(h.from, h.toB).split(mv)) }); } else - n && (!t.hasFocus && t.state.facet($S) || n.main.eq(i)) && (n = null); + n && (!t.hasFocus && t.state.facet(BS) || 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 = { @@ -7971,15 +7971,15 @@ function mK(t, e) { return !0; let a = r.insert.toString(); t.inputState.composing >= 0 && t.inputState.composing++; - let o, l = () => o || (o = Hxe(t, r, n)); - return t.state.facet(Vj).some((u) => u(t, r.from, r.to, a, l)) || t.dispatch(l()), !0; + let o, l = () => o || (o = Xxe(t, r, n)); + return t.state.facet(Uj).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 Hxe(t, e, r) { +function Xxe(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) : ""; @@ -7987,7 +7987,7 @@ function Hxe(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 && eK(t, r.main.head); + let u = t.state.sliceDoc(e.from, e.to), h, f = r && tK(t, r.main.head); if (f) { let g = e.insert.length - (e.to - e.from); h = { from: f.from, to: f.to - g }; @@ -8015,7 +8015,7 @@ function Hxe(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 Xxe(t, e, r, n) { +function Zxe(t, e, r, n) { let i = Math.min(t.length, e.length), s = 0; for (; s < i && t.charCodeAt(s) == e.charCodeAt(s); ) s++; @@ -8037,33 +8037,33 @@ function Xxe(t, e, r, n) { } return { from: s, toA: a, toB: o }; } -function Zxe(t) { +function jxe(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 UB(r, n)), (i != r || s != n) && e.push(new UB(i, s))), e; + return r && (e.push(new qB(r, n)), (i != r || s != n) && e.push(new qB(i, s))), e; } -function jxe(t, e) { +function Kxe(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 ? Ve.single(r + e, n + e) : null; } -const Kxe = { +const Jxe = { childList: !0, characterData: !0, subtree: !0, attributes: !0, characterDataOldValue: !0 -}, kE = Mt.ie && Mt.ie_version <= 11; -class Jxe { +}, SE = Mt.ie && Mt.ie_version <= 11; +class ewe { constructor(e) { - this.view = e, this.active = !1, this.selectionRange = new Pbe(), 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 $be(), 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); (Mt.ie && Mt.ie_version <= 11 || Mt.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(); - }), kE && (this.onCharData = (r) => { + }), SE && (this.onCharData = (r) => { this.queue.push({ target: r.target, type: "characterData", @@ -8107,21 +8107,21 @@ class Jxe { if (!this.readSelectionRange() || this.delayedAndroidKey) return; let { view: n } = this, i = this.selectionRange; - if (n.state.facet($S) ? n.root.activeElement != this.dom : !a4(n.dom, i)) + if (n.state.facet(BS) ? n.root.activeElement != this.dom : !o4(n.dom, i)) return; let s = i.anchorNode && n.docView.nearest(i.anchorNode); if (s && s.ignoreEvent(e)) { r || (this.selectionChanged = !1); return; } - (Mt.ie && Mt.ie_version <= 11 || Mt.android && Mt.chrome) && !n.state.selection.main.empty && i.focusNode && w5(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1); + (Mt.ie && Mt.ie_version <= 11 || Mt.android && Mt.chrome) && !n.state.selection.main.empty && i.focusNode && O5(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1); } readSelectionRange() { - let { view: e } = this, r = Mt.safari && e.root.nodeType == 11 && Mbe(this.dom.ownerDocument) == this.dom && ewe(this.view) || x5(e.root); + let { view: e } = this, r = Mt.safari && e.root.nodeType == 11 && Dbe(this.dom.ownerDocument) == this.dom && twe(this.view) || w5(e.root); if (!r || this.selectionRange.eq(r)) return !1; - let n = a4(this.dom, r); - return n && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Bbe(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), n && (this.selectionChanged = !0), !0); + let n = o4(this.dom, r); + return n && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Fbe(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; @@ -8156,10 +8156,10 @@ class Jxe { } } start() { - this.active || (this.observer.observe(this.dom, Kxe), kE && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); + this.active || (this.observer.observe(this.dom, Jxe), SE && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0); } stop() { - !this.active || (this.active = !1, this.observer.disconnect(), kE && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); + !this.active || (this.active = !1, this.observer.disconnect(), SE && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); } clear() { this.processRecords(), this.queue.length = 0, this.selectionChanged = !1; @@ -8206,11 +8206,11 @@ class Jxe { return { from: r, to: n, typeOver: i }; } readChange() { - let { from: e, to: r, typeOver: n } = this.processRecords(), i = this.selectionChanged && a4(this.dom, this.selectionRange); + let { from: e, to: r, typeOver: n } = this.processRecords(), i = this.selectionChanged && o4(this.dom, this.selectionRange); if (e < 0 && !i) return null; e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1; - let s = new Gxe(this.view, e, r, n); + let s = new Hxe(this.view, e, r, n); return this.view.docView.domChanged = { newSel: s.newSel ? s.newSel.main : null }, s; } flush(e = !0) { @@ -8220,7 +8220,7 @@ class Jxe { let r = this.readChange(); if (!r) return this.view.requestMeasure(), !1; - let n = this.view.state, i = mK(this.view, r); + let n = this.view.state, i = vK(this.view, r); return this.view.state == n && this.view.update([]), i; } readMutation(e) { @@ -8228,7 +8228,7 @@ class Jxe { if (!r || r.ignoreMutation(e)) return null; if (r.markDirty(e.type == "attributes"), e.type == "attributes" && (r.flags |= 4), e.type == "childList") { - let n = qB(r, e.previousSibling || e.target.previousSibling, -1), i = qB(r, e.nextSibling || e.target.nextSibling, 1); + let n = YB(r, e.previousSibling || e.target.previousSibling, -1), i = YB(r, e.nextSibling || e.target.nextSibling, 1); return { from: n ? r.posAfter(n) : r.posAtStart, to: i ? r.posBefore(i) : r.posAtEnd, @@ -8254,7 +8254,7 @@ class Jxe { this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey); } } -function qB(t, e, r) { +function YB(t, e, r) { for (; e; ) { let n = yn.get(e); if (n && n.parent == t) @@ -8264,7 +8264,7 @@ function qB(t, e, r) { } return null; } -function ewe(t) { +function twe(t) { let e = null; function r(l) { l.preventDefault(), l.stopImmediatePropagation(), e = l.getTargetRanges()[0]; @@ -8272,7 +8272,7 @@ function ewe(t) { if (t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), !e) return null; let n = e.startContainer, i = e.startOffset, s = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor); - return w5(o.node, o.offset, s, a) && ([n, i, s, a] = [s, a, n, i]), { anchorNode: n, anchorOffset: i, focusNode: s, focusOffset: a }; + return O5(o.node, o.offset, s, a) && ([n, i, s, a] = [s, a, n, i]), { anchorNode: n, anchorOffset: i, focusNode: s, focusOffset: a }; } class ht { get state() { @@ -8302,10 +8302,10 @@ class ht { 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 || $be(e.parent) || document, this.viewState = new FB(e.state || dr.create(e)), e.scrollTo && e.scrollTo.is(dw) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(dv).map((n) => new bE(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 || Bbe(e.parent) || document, this.viewState = new zB(e.state || dr.create(e)), e.scrollTo && e.scrollTo.is(dw) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(dv).map((n) => new xE(n)); for (let n of this.plugins) n.update(this); - this.observer = new Jxe(this), this.inputState = new gxe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new wB(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(); + this.observer = new ewe(this), this.inputState = new mxe(this), this.inputState.ensureHandlers(this.plugins), this.docView = new OB(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(); } dispatch(...e) { let r = e.length == 1 && e[0] instanceof fi ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)]; @@ -8325,11 +8325,11 @@ class ht { return; } let a = this.hasFocus, o = 0, l = null; - e.some((d) => d.annotation(cK)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = uK(s, a), l || (o = 1)); + e.some((d) => d.annotation(uK)) ? (this.inputState.notifiedFocused = a, o = 1) : a != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = a, l = hK(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(dr.phrases) != this.state.facet(dr.phrases)) return this.setState(s); - i = O5.create(this, s, e), i.flags |= o; + i = k5.create(this, s, e), i.flags |= o; let f = this.viewState.scrollTarget; try { this.updateState = 2; @@ -8341,19 +8341,19 @@ class ht { for (let p of d.effects) p.is(dw) && (f = p.value.clip(this.state)); } - this.viewState.update(i, f), this.bidiCache = k5.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), r = this.docView.update(i), this.state.facet(pv) != this.styleModules && this.mountStyles(), n = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(r, e.some((d) => d.isUserEvent("select.pointer"))); + this.viewState.update(i, f), this.bidiCache = S5.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), r = this.docView.update(i), this.state.facet(pv) != this.styleModules && this.mountStyles(), n = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(r, e.some((d) => d.isUserEvent("select.pointer"))); } finally { this.updateState = 0; } if (i.startState.facet(bw) != i.state.facet(bw) && (this.viewState.mustMeasureContent = !0), (r || n || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), !i.empty) - for (let d of this.state.facet(i7)) + for (let d of this.state.facet(s7)) try { d(i); } catch (p) { Bo(this.state, p, "update listener"); } (l || h) && Promise.resolve().then(() => { - l && this.state == l.startState && this.dispatch(l), h && !mK(this, h) && u.force && Hp(this.contentDOM, u.key, u.keyCode); + l && this.state == l.startState && this.dispatch(l), h && !vK(this, h) && u.force && Hp(this.contentDOM, u.key, u.keyCode); }); } setState(e) { @@ -8368,10 +8368,10 @@ class ht { try { for (let n of this.plugins) n.destroy(this); - this.viewState = new FB(e), this.plugins = e.facet(dv).map((n) => new bE(n)), this.pluginMap.clear(); + this.viewState = new zB(e), this.plugins = e.facet(dv).map((n) => new xE(n)), this.pluginMap.clear(); for (let n of this.plugins) n.update(this); - this.docView.destroy(), this.docView = new wB(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; + this.docView.destroy(), this.docView = new OB(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; } finally { this.updateState = 0; } @@ -8384,7 +8384,7 @@ class ht { for (let s of n) { let a = r.indexOf(s); if (a < 0) - i.push(new bE(s)); + i.push(new xE(s)); else { let o = this.plugins[a]; o.mustUpdate = e, i.push(o); @@ -8413,7 +8413,7 @@ class ht { try { for (let o = 0; ; o++) { if (a < 0) - if (Ej(n)) + if (_j(n)) s = -1, a = this.viewState.heightMap.height; else { let p = this.viewState.scrollAnchorAt(i); @@ -8433,12 +8433,12 @@ class ht { try { return p.read(this); } catch (g) { - return Bo(this.state, g), YB; + return Bo(this.state, g), QB; } - }), f = O5.create(this, this.state, []), d = !1; + }), f = k5.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] != YB) + if (h[p] != QB) try { let g = u[p]; g.write && g.write(h[p], this); @@ -8464,29 +8464,29 @@ class ht { this.updateState = 0, this.measureScheduled = -1; } if (r && !r.empty) - for (let o of this.state.facet(i7)) + for (let o of this.state.facet(s7)) o(r); } get themeClasses() { - return f7 + " " + (this.state.facet(h7) ? pK : dK) + " " + this.state.facet(bw); + return d7 + " " + (this.state.facet(f7) ? gK : pK) + " " + this.state.facet(bw); } updateAttrs() { - let e = QB(this, Qj, { + let e = WB(this, Wj, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), r = { spellcheck: "false", autocorrect: "off", autocapitalize: "off", translate: "no", - contenteditable: this.state.facet($S) ? "true" : "false", + contenteditable: this.state.facet(BS) ? "true" : "false", class: "cm-content", style: `${Mt.tabSize}: ${this.state.tabSize}`, role: "textbox", "aria-multiline": "true" }; - this.state.readOnly && (r["aria-readonly"] = "true"), QB(this, QR, r); + this.state.readOnly && (r["aria-readonly"] = "true"), WB(this, WR, r); let n = this.observer.ignore(() => { - let i = r7(this.contentDOM, this.contentAttrs, r), s = r7(this.dom, this.editorAttrs, e); + let i = n7(this.contentDOM, this.contentAttrs, r), s = n7(this.dom, this.editorAttrs, e); return i || s; }); return this.editorAttrs = e, this.contentAttrs = r, n; @@ -8504,7 +8504,7 @@ class ht { mountStyles() { this.styleModules = this.state.facet(pv); let e = this.state.facet(ht.cspNonce); - Pu.mount(this.root, this.styleModules.concat(Yxe).reverse(), e ? { nonce: e } : void 0); + Pu.mount(this.root, this.styleModules.concat(Qxe).reverse(), e ? { nonce: e } : void 0); } readMeasured() { if (this.updateState == 2) @@ -8557,16 +8557,16 @@ class ht { return this.viewState.contentHeight; } moveByChar(e, r, n) { - return wE(this, e, EB(this, e, r, n)); + return OE(this, e, _B(this, e, r, n)); } moveByGroup(e, r) { - return wE(this, e, EB(this, e, r, (n) => dxe(this, e.head, n))); + return OE(this, e, _B(this, e, r, (n) => pxe(this, e.head, n))); } moveToLineBoundary(e, r, n = !0) { - return fxe(this, e, r, n); + return dxe(this, e, r, n); } moveVertically(e, r, n) { - return wE(this, e, pxe(this, e, r, n)); + return OE(this, e, gxe(this, e, r, n)); } domAtPos(e) { return this.docView.domAtPos(e); @@ -8575,7 +8575,7 @@ class ht { return this.docView.posFromDOM(e, r); } posAtCoords(e, r = !0) { - return this.readMeasured(), rK(this, e, r); + return this.readMeasured(), nK(this, e, r); } coordsAtPos(e, r = 1) { this.readMeasured(); @@ -8583,7 +8583,7 @@ class ht { if (!n || n.left == n.right) return n; let i = this.state.doc.lineAt(e), s = this.bidiSpans(i), a = s[Ph.find(s, e - i.from, -1, r)]; - return UR(n, a.dir == In.LTR == r > 0); + return qR(n, a.dir == In.LTR == r > 0); } coordsForChar(e) { return this.readMeasured(), this.docView.coordsForChar(e); @@ -8598,21 +8598,21 @@ class ht { return this.viewState.defaultTextDirection; } textDirectionAt(e) { - return !this.state.facet(qj) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); + return !this.state.facet(Yj) || 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 > twe) - return Kj(e.length); + if (e.length > rwe) + return Jj(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 || jj(s.isolates, n = xB(this, e.from, e.to)))) + if (s.from == e.from && s.dir == r && (s.fresh || Kj(s.isolates, n = wB(this, e.from, e.to)))) return s.order; - n || (n = xB(this, e.from, e.to)); - let i = Kbe(e.text, r, n); - return this.bidiCache.push(new k5(e.from, e.to, r, n, !0, i)), i; + n || (n = wB(this, e.from, e.to)); + let i = Jbe(e.text, r, n); + return this.bidiCache.push(new S5(e.from, e.to, r, n, !0, i)), i; } get hasFocus() { var e; @@ -8620,7 +8620,7 @@ class ht { } focus() { this.observer.ignore(() => { - Tj(this.contentDOM), this.docView.updateSelection(); + Cj(this.contentDOM), this.docView.updateSelection(); }); } setRoot(e) { @@ -8645,11 +8645,11 @@ class ht { return on.define(() => ({}), { eventObservers: e }); } static theme(e, r) { - let n = Pu.newName(), i = [bw.of(n), pv.of(d7(`.${n}`, e))]; - return r && r.dark && i.push(h7.of(!0)), i; + let n = Pu.newName(), i = [bw.of(n), pv.of(p7(`.${n}`, e))]; + return r && r.dark && i.push(f7.of(!0)), i; } static baseTheme(e) { - return zl.lowest(pv.of(d7("." + f7, e, gK))); + return zl.lowest(pv.of(p7("." + d7, e, mK))); } static findFromDOM(e) { var r; @@ -8658,27 +8658,27 @@ class ht { } } ht.styleModule = pv; -ht.inputHandler = Vj; -ht.focusChangeEffect = Uj; -ht.perLineTextDirection = qj; -ht.exceptionSink = zj; -ht.updateListener = i7; -ht.editable = $S; -ht.mouseSelectionStyle = Fj; -ht.dragMovesSelection = Bj; -ht.clickAddsSelectionRange = $j; +ht.inputHandler = Uj; +ht.focusChangeEffect = qj; +ht.perLineTextDirection = Yj; +ht.exceptionSink = Vj; +ht.updateListener = s7; +ht.editable = BS; +ht.mouseSelectionStyle = zj; +ht.dragMovesSelection = Fj; +ht.clickAddsSelectionRange = Bj; ht.decorations = Ty; -ht.atomicRanges = WR; -ht.bidiIsolatedRanges = Wj; -ht.scrollMargins = Gj; -ht.darkTheme = h7; +ht.atomicRanges = GR; +ht.bidiIsolatedRanges = Gj; +ht.scrollMargins = Hj; +ht.darkTheme = f7; ht.cspNonce = /* @__PURE__ */ _t.define({ combine: (t) => t.length ? t[0] : "" }); -ht.contentAttributes = QR; -ht.editorAttributes = Qj; +ht.contentAttributes = WR; +ht.editorAttributes = Wj; ht.lineWrapping = /* @__PURE__ */ ht.contentAttributes.of({ class: "cm-lineWrapping" }); ht.announce = /* @__PURE__ */ Zt.define(); -const twe = 4096, YB = {}; -class k5 { +const rwe = 4096, QB = {}; +class S5 { 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; } @@ -8688,20 +8688,20 @@ class k5 { let n = [], i = e.length ? e[e.length - 1].dir : In.LTR; for (let s = Math.max(0, e.length - 10); s < e.length; s++) { let a = e[s]; - a.dir == i && !r.touchesRange(a.from, a.to) && n.push(new k5(r.mapPos(a.from, 1), r.mapPos(a.to, -1), a.dir, a.isolates, !1, a.order)); + a.dir == i && !r.touchesRange(a.from, a.to) && n.push(new S5(r.mapPos(a.from, 1), r.mapPos(a.to, -1), a.dir, a.isolates, !1, a.order)); } return n; } } -function QB(t, e, r) { +function WB(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 && t7(a, r); + a && r7(a, r); } return r; } -const rwe = Mt.mac ? "mac" : Mt.windows ? "win" : Mt.linux ? "linux" : "key"; -function nwe(t, e) { +const nwe = Mt.mac ? "mac" : Mt.windows ? "win" : Mt.linux ? "linux" : "key"; +function iwe(t, e) { const r = t.split(/-(?!$)/); let n = r[r.length - 1]; n == "Space" && (n = " "); @@ -8726,21 +8726,21 @@ function nwe(t, e) { function xw(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 iwe = /* @__PURE__ */ zl.default(/* @__PURE__ */ ht.domEventHandlers({ +const swe = /* @__PURE__ */ zl.default(/* @__PURE__ */ ht.domEventHandlers({ keydown(t, e) { - return yK(vK(e.state), t, e, "editor"); + return bK(yK(e.state), t, e, "editor"); } -})), Cu = /* @__PURE__ */ _t.define({ enables: iwe }), WB = /* @__PURE__ */ new WeakMap(); -function vK(t) { - let e = t.facet(Cu), r = WB.get(e); - return r || WB.set(e, r = owe(e.reduce((n, i) => n.concat(i), []))), r; +})), Cu = /* @__PURE__ */ _t.define({ enables: swe }), GB = /* @__PURE__ */ new WeakMap(); +function yK(t) { + let e = t.facet(Cu), r = GB.get(e); + return r || GB.set(e, r = lwe(e.reduce((n, i) => n.concat(i), []))), r; } -function swe(t, e, r) { - return yK(vK(t.state), e, t, r); +function awe(t, e, r) { + return bK(yK(t.state), e, t, r); } let Eh = null; -const awe = 4e3; -function owe(t, e = rwe) { +const owe = 4e3; +function lwe(t, e = nwe) { let r = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null), i = (a, o) => { let l = n[a]; if (l == null) @@ -8749,7 +8749,7 @@ function owe(t, e = rwe) { 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) => nwe(y, e)); + let p = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), g = o.split(/ (?!$)/).map((y) => iwe(y, e)); for (let y = 1; y < g.length; y++) { let b = g.slice(0, y).join(" "); i(b, !0), p[b] || (p[b] = { @@ -8759,7 +8759,7 @@ function owe(t, e = rwe) { let O = Eh = { view: w, prefix: b, scope: a }; return setTimeout(() => { Eh == O && (Eh = null); - }, awe), !0; + }, owe), !0; }] }); } @@ -8788,9 +8788,9 @@ function owe(t, e = rwe) { } return r; } -function yK(t, e, r, n) { - let i = Rbe(e), s = ss(i, 0), a = _o(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; - Eh && Eh.view == r && Eh.scope == n && (o = Eh.prefix + " ", iK.indexOf(e.keyCode) < 0 && (u = !0, Eh = null)); +function bK(t, e, r, n) { + let i = Mbe(e), s = ss(i, 0), a = _o(s) == i.length && i != " ", o = "", l = !1, u = !1, h = !1; + Eh && Eh.view == r && Eh.scope == n && (o = Eh.prefix + " ", sK.indexOf(e.keyCode) < 0 && (u = !0, Eh = null)); let f = /* @__PURE__ */ new Set(), d = (v) => { if (v) { for (let y of v.run) @@ -8824,17 +8824,17 @@ class Gb { let i = e.coordsAtPos(n.head, n.assoc || 1); if (!i) return []; - let s = bK(e); + let s = xK(e); return [new Gb(r, i.left - s.left, i.top - s.top, null, i.bottom - i.top)]; } else - return lwe(e, r, n); + return cwe(e, r, n); } } -function bK(t) { +function xK(t) { let e = t.scrollDOM.getBoundingClientRect(); return { left: (t.textDirection == In.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY }; } -function GB(t, e, r) { +function HB(t, e, r) { let n = Ve.cursor(e); return { from: Math.max(r.from, t.moveToLineBoundary(n, !1, !0).from), @@ -8842,11 +8842,11 @@ function GB(t, e, r) { type: ia.Text }; } -function lwe(t, e, r) { +function cwe(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 == In.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = bK(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 = c7(t, n), g = c7(t, i), m = p.type == ia.Text ? p : null, v = g.type == ia.Text ? g : null; - if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = GB(t, n, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = GB(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 == In.LTR, a = t.contentDOM, o = a.getBoundingClientRect(), l = xK(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 = u7(t, n), g = u7(t, i), m = p.type == ia.Text ? p : null, v = g.type == ia.Text ? g : null; + if (m && (t.lineWrapping || p.widgetLineBreaks) && (m = HB(t, n, m)), v && (t.lineWrapping || g.widgetLineBreaks) && (v = HB(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 = []; @@ -8888,18 +8888,18 @@ function lwe(t, e, r) { return { top: T, bottom: T, horizontal: [] }; } } -function cwe(t, e) { +function uwe(t, e) { return t.constructor == e.constructor && t.eq(e); } -class uwe { +class hwe { 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); } update(e) { - e.startState.facet(c4) != e.state.facet(c4) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq)); + e.startState.facet(u4) != e.state.facet(u4) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq)); } setOrder(e) { - let r = 0, n = e.facet(c4); + let r = 0, n = e.facet(u4); for (; r < n.length && n[r] != this.layer; ) r++; this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - r); @@ -8912,7 +8912,7 @@ class uwe { (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) => !cwe(r, this.drawn[n]))) { + if (e.length != this.drawn.length || e.some((r, n) => !uwe(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); @@ -8927,14 +8927,14 @@ class uwe { this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove(); } } -const c4 = /* @__PURE__ */ _t.define(); -function xK(t) { +const u4 = /* @__PURE__ */ _t.define(); +function wK(t) { return [ - on.define((e) => new uwe(e, t)), - c4.of(t) + on.define((e) => new hwe(e, t)), + u4.of(t) ]; } -const wK = !Mt.ios, Ey = /* @__PURE__ */ _t.define({ +const OK = !Mt.ios, Ey = /* @__PURE__ */ _t.define({ combine(t) { return Yc(t, { cursorBlinkRate: 1200, @@ -8945,25 +8945,25 @@ const wK = !Mt.ios, Ey = /* @__PURE__ */ _t.define({ }); } }); -function OK(t = {}) { +function kK(t = {}) { return [ Ey.of(t), - hwe, fwe, dwe, - Yj.of(!0) + pwe, + Qj.of(!0) ]; } -function kK(t) { +function SK(t) { return t.startState.facet(Ey) != t.state.facet(Ey); } -const hwe = /* @__PURE__ */ xK({ +const fwe = /* @__PURE__ */ wK({ above: !0, markers(t) { let { state: e } = t, r = e.facet(Ey), n = []; for (let i of e.selection.ranges) { let s = i == e.selection.main; - if (i.empty ? !s || wK : r.drawRangeCursor) { + if (i.empty ? !s || OK : r.drawRangeCursor) { let a = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", o = i.empty ? i : Ve.cursor(i.head, i.head > i.anchor ? -1 : 1); for (let l of Gb.forRange(t, a, o)) n.push(l); @@ -8973,34 +8973,34 @@ const hwe = /* @__PURE__ */ xK({ }, update(t, e) { t.transactions.some((n) => n.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"); - let r = kK(t); - return r && HB(t.state, e), t.docChanged || t.selectionSet || r; + let r = SK(t); + return r && XB(t.state, e), t.docChanged || t.selectionSet || r; }, mount(t, e) { - HB(e.state, t); + XB(e.state, t); }, class: "cm-cursorLayer" }); -function HB(t, e) { +function XB(t, e) { e.style.animationDuration = t.facet(Ey).cursorBlinkRate + "ms"; } -const fwe = /* @__PURE__ */ xK({ +const dwe = /* @__PURE__ */ wK({ above: !1, markers(t) { return t.state.selection.ranges.map((e) => e.empty ? [] : Gb.forRange(t, "cm-selectionBackground", e)).reduce((e, r) => e.concat(r)); }, update(t, e) { - return t.docChanged || t.selectionSet || t.viewportChanged || kK(t); + return t.docChanged || t.selectionSet || t.viewportChanged || SK(t); }, class: "cm-selectionLayer" -}), p7 = { +}), g7 = { ".cm-line": { "& ::selection": { backgroundColor: "transparent !important" }, "&::selection": { backgroundColor: "transparent !important" } } }; -wK && (p7[".cm-line"].caretColor = "transparent !important", p7[".cm-content"] = { caretColor: "transparent !important" }); -const dwe = /* @__PURE__ */ zl.highest(/* @__PURE__ */ ht.theme(p7)), SK = /* @__PURE__ */ Zt.define({ +OK && (g7[".cm-line"].caretColor = "transparent !important", g7[".cm-content"] = { caretColor: "transparent !important" }); +const pwe = /* @__PURE__ */ zl.highest(/* @__PURE__ */ ht.theme(g7)), TK = /* @__PURE__ */ Zt.define({ map(t, e) { return t == null ? null : e.mapPos(t); } @@ -9009,9 +9009,9 @@ const dwe = /* @__PURE__ */ zl.highest(/* @__PURE__ */ ht.theme(p7)), SK = /* @_ return null; }, update(t, e) { - return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is(SK) ? n.value : r, t); + return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((r, n) => n.is(TK) ? n.value : r, t); } -}), pwe = /* @__PURE__ */ on.fromClass(class { +}), gwe = /* @__PURE__ */ on.fromClass(class { constructor(t) { this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }; } @@ -9041,7 +9041,7 @@ const dwe = /* @__PURE__ */ zl.highest(/* @__PURE__ */ ht.theme(p7)), SK = /* @_ this.cursor && this.cursor.remove(); } setDropPos(t) { - this.view.state.field(vv) != t && this.view.dispatch({ effects: SK.of(t) }); + this.view.state.field(vv) != t && this.view.dispatch({ effects: TK.of(t) }); } }, { eventObservers: { @@ -9059,17 +9059,17 @@ const dwe = /* @__PURE__ */ zl.highest(/* @__PURE__ */ ht.theme(p7)), SK = /* @_ } } }); -function gwe() { - return [vv, pwe]; +function mwe() { + return [vv, gwe]; } -function XB(t, e, r, n, i) { +function ZB(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 mwe(t, e) { +function vwe(t, e) { let r = t.visibleRanges; if (r.length == 1 && r[0].from == t.viewport.from && r[0].to == t.viewport.to) return r; @@ -9078,7 +9078,7 @@ function mwe(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 vwe { +class ywe { constructor(e) { const { regexp: r, decoration: n, decorate: i, boundary: s, maxLength: a = 1e3 } = e; if (!r.global) @@ -9098,8 +9098,8 @@ class vwe { } createDeco(e) { let r = new Hi(), n = r.add.bind(r); - for (let { from: i, to: s } of mwe(e, this.maxLength)) - XB(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); + for (let { from: i, to: s } of vwe(e, this.maxLength)) + ZB(e.state.doc, this.regexp, i, s, (a, o) => this.addMatch(o, e, a, n)); return r.finish(); } updateDeco(e, r) { @@ -9130,15 +9130,15 @@ class vwe { 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 - XB(e.state.doc, this.regexp, h, f, (m, v) => this.addMatch(v, e, m, g)); + ZB(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 g7 = /x/.unicode != null ? "gu" : "g", ywe = /* @__PURE__ */ new RegExp(`[\0-\b --\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, g7), bwe = { +const m7 = /x/.unicode != null ? "gu" : "g", bwe = /* @__PURE__ */ new RegExp(`[\0-\b +-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`, m7), xwe = { 0: "null", 7: "bell", 8: "backspace", @@ -9161,63 +9161,63 @@ const g7 = /x/.unicode != null ? "gu" : "g", ywe = /* @__PURE__ */ new RegExp(`[ 65279: "zero width no-break space", 65532: "object replacement" }; -let SE = null; -function xwe() { +let TE = null; +function wwe() { var t; - if (SE == null && typeof document < "u" && document.body) { + if (TE == null && typeof document < "u" && document.body) { let e = document.body.style; - SE = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; + TE = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null; } - return SE || !1; + return TE || !1; } -const u4 = /* @__PURE__ */ _t.define({ +const h4 = /* @__PURE__ */ _t.define({ combine(t) { let e = Yc(t, { render: null, - specialChars: ywe, + specialChars: bwe, addSpecialChars: null }); - return (e.replaceTabs = !xwe()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, g7)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, g7)), e; + return (e.replaceTabs = !wwe()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, m7)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, m7)), e; } }); -function TK(t = {}) { - return [u4.of(t), wwe()]; +function CK(t = {}) { + return [h4.of(t), Owe()]; } -let ZB = null; -function wwe() { - return ZB || (ZB = on.fromClass(class { +let jB = null; +function Owe() { + return jB || (jB = on.fromClass(class { constructor(t) { - this.view = t, this.decorations = Et.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(u4)), this.decorations = this.decorator.createDeco(t); + this.view = t, this.decorations = Et.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(h4)), this.decorations = this.decorator.createDeco(t); } makeDecorator(t) { - return new vwe({ + return new ywe({ regexp: t.specialChars, decoration: (e, r, n) => { let { doc: i } = r.state, s = ss(e[0], 0); if (s == 9) { let a = i.lineAt(n), o = r.state.tabSize, l = Ml(a.text, o, n - a.from); return Et.replace({ - widget: new Twe((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) + widget: new Cwe((o - l % o) * this.view.defaultCharacterWidth / this.view.scaleX) }); } - return this.decorationCache[s] || (this.decorationCache[s] = Et.replace({ widget: new Swe(t, s) })); + return this.decorationCache[s] || (this.decorationCache[s] = Et.replace({ widget: new Twe(t, s) })); }, boundary: t.replaceTabs ? void 0 : /[^]/ }); } update(t) { - let e = t.state.facet(u4); - t.startState.facet(u4) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations); + let e = t.state.facet(h4); + t.startState.facet(h4) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations); } }, { decorations: (t) => t.decorations })); } -const Owe = "\u2022"; -function kwe(t) { - return t >= 32 ? Owe : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); +const kwe = "\u2022"; +function Swe(t) { + return t >= 32 ? kwe : t == 10 ? "\u2424" : String.fromCharCode(9216 + t); } -class Swe extends za { +class Twe extends za { constructor(e, r) { super(), this.options = e, this.code = r; } @@ -9225,7 +9225,7 @@ class Swe extends za { return e.code == this.code; } toDOM(e) { - let r = kwe(this.code), n = e.state.phrase("Control character") + " " + (bwe[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, n, r); + let r = Swe(this.code), n = e.state.phrase("Control character") + " " + (xwe[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"); @@ -9235,7 +9235,7 @@ class Swe extends za { return !1; } } -class Twe extends za { +class Cwe extends za { constructor(e) { super(), this.width = e; } @@ -9250,10 +9250,10 @@ class Twe extends za { return !1; } } -function CK() { - return Ewe; +function EK() { + return _we; } -const Cwe = /* @__PURE__ */ Et.line({ class: "cm-activeLine" }), Ewe = /* @__PURE__ */ on.fromClass(class { +const Ewe = /* @__PURE__ */ Et.line({ class: "cm-activeLine" }), _we = /* @__PURE__ */ on.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -9264,16 +9264,16 @@ const Cwe = /* @__PURE__ */ Et.line({ class: "cm-activeLine" }), Ewe = /* @__PUR let e = -1, r = []; for (let n of t.state.selection.ranges) { let i = t.lineBlockAt(n.head); - i.from > e && (r.push(Cwe.range(i.from)), e = i.from); + i.from > e && (r.push(Ewe.range(i.from)), e = i.from); } return Et.set(r); } }, { decorations: (t) => t.decorations -}), m7 = 2e3; -function _we(t, e, r) { +}), v7 = 2e3; +function Awe(t, e, r) { let n = Math.min(e.line, r.line), i = Math.max(e.line, r.line), s = []; - if (e.off > m7 || r.off > m7 || e.col < 0 || r.col < 0) { + if (e.off > v7 || r.off > v7 || 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); @@ -9282,27 +9282,27 @@ function _we(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 = HA(u.text, a, t.tabSize, !0); + let u = t.doc.line(l), h = XA(u.text, a, t.tabSize, !0); if (h < 0) s.push(Ve.cursor(u.to)); else { - let f = HA(u.text, o, t.tabSize); + let f = XA(u.text, o, t.tabSize); s.push(Ve.range(u.from + h, u.from + f)); } } } return s; } -function Awe(t, e) { +function Lwe(t, e) { let r = t.coordsAtPos(t.viewport.from); return r ? Math.round(Math.abs((r.left - e) / t.defaultCharacterWidth)) : -1; } -function jB(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 > m7 ? -1 : i == n.length ? Awe(t, e.clientX) : Ml(n.text, t.state.tabSize, r - n.from); +function KB(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 > v7 ? -1 : i == n.length ? Lwe(t, e.clientX) : Ml(n.text, t.state.tabSize, r - n.from); return { line: n.number, col: s, off: i }; } -function Lwe(t, e) { - let r = jB(t, e), n = t.state.selection; +function Rwe(t, e) { + let r = KB(t, e), n = t.state.selection; return r ? { update(i) { if (i.docChanged) { @@ -9311,26 +9311,26 @@ function Lwe(t, e) { } }, get(i, s, a) { - let o = jB(t, i); + let o = KB(t, i); if (!o) return n; - let l = _we(t.state, r, o); + let l = Awe(t.state, r, o); return l.length ? a ? Ve.create(l.concat(n.ranges)) : Ve.create(l) : n; } } : null; } -function Rwe(t) { +function Mwe(t) { let e = (t == null ? void 0 : t.eventFilter) || ((r) => r.altKey && r.button == 0); - return ht.mouseSelectionStyle.of((r, n) => e(n) ? Lwe(r, n) : null); + return ht.mouseSelectionStyle.of((r, n) => e(n) ? Rwe(r, n) : null); } -const Mwe = { +const Dwe = { Alt: [18, (t) => !!t.altKey], Control: [17, (t) => !!t.ctrlKey], Shift: [16, (t) => !!t.shiftKey], Meta: [91, (t) => !!t.metaKey] -}, Dwe = { style: "cursor: crosshair" }; -function Nwe(t = {}) { - let [e, r] = Mwe[t.key || "Alt"], n = on.fromClass(class { +}, Nwe = { style: "cursor: crosshair" }; +function Iwe(t = {}) { + let [e, r] = Dwe[t.key || "Alt"], n = on.fromClass(class { constructor(i) { this.view = i, this.isDown = !1; } @@ -9354,12 +9354,12 @@ function Nwe(t = {}) { n, ht.contentAttributes.of((i) => { var s; - return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? Dwe : null; + return !((s = i.plugin(n)) === null || s === void 0) && s.isDown ? Nwe : null; }) ]; } const Lm = "-10000px"; -class EK { +class _K { 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); } @@ -9392,24 +9392,24 @@ class EK { return r && (o.forEach((l, u) => r[u] = l), r.length = o.length), this.input = i, this.tooltips = s, this.tooltipViews = a, !0; } } -function Iwe(t) { +function Pwe(t) { let { win: e } = t; return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth }; } -const TE = /* @__PURE__ */ _t.define({ +const CE = /* @__PURE__ */ _t.define({ combine: (t) => { var e, r, n; return { position: Mt.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) || Iwe + tooltipSpace: ((n = t.find((i) => i.tooltipSpace)) === null || n === void 0 ? void 0 : n.tooltipSpace) || Pwe }; } -}), KB = /* @__PURE__ */ new WeakMap(), HR = /* @__PURE__ */ on.fromClass(class { +}), JB = /* @__PURE__ */ new WeakMap(), XR = /* @__PURE__ */ on.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(TE); - 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 EK(t, XR, (r) => this.createTooltip(r)), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((r) => { + let e = t.state.facet(CE); + 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 _K(t, ZR, (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(); } @@ -9432,7 +9432,7 @@ const TE = /* @__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(TE); + let r = e || t.geometryChanged, n = t.state.facet(CE); if (n.position != this.position && !this.madeAbsolute) { this.position = n.position; for (let i of this.manager.tooltipViews) @@ -9488,7 +9488,7 @@ const TE = /* @__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(TE).tooltipSpace(this.view), + space: this.view.state.facet(CE).tooltipSpace(this.view), scaleX: e, scaleY: r, makeAbsolute: n @@ -9508,7 +9508,7 @@ const TE = /* @__PURE__ */ _t.define({ h.style.top = Lm; continue; } - let p = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, g = p ? 7 : 0, m = d.right - d.left, v = (e = KB.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || $we, b = this.view.textDirection == In.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 = JB.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, y = u.offset || Bwe, b = this.view.textDirection == In.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) { @@ -9516,7 +9516,7 @@ const TE = /* @__PURE__ */ _t.define({ h.style.top = Lm; continue; } - KB.set(u, v), h.style.height = (v = S) / s + "px"; + JB.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; @@ -9541,7 +9541,7 @@ const TE = /* @__PURE__ */ _t.define({ this.maybeMeasure(); } } -}), Pwe = /* @__PURE__ */ ht.baseTheme({ +}), $we = /* @__PURE__ */ ht.baseTheme({ ".cm-tooltip": { zIndex: 100, boxSizing: "border-box" @@ -9602,15 +9602,15 @@ const TE = /* @__PURE__ */ _t.define({ borderBottomColor: "transparent" } } -}), $we = { x: 0, y: 0 }, XR = /* @__PURE__ */ _t.define({ - enables: [HR, Pwe] -}), S5 = /* @__PURE__ */ _t.define(); -class BS { +}), Bwe = { x: 0, y: 0 }, ZR = /* @__PURE__ */ _t.define({ + enables: [XR, $we] +}), T5 = /* @__PURE__ */ _t.define(); +class FS { static create(e) { - return new BS(e); + return new FS(e); } constructor(e) { - this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new EK(e, S5, (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 _K(e, T5, (r) => this.createHostedView(r)); } createHostedView(e) { let r = e.create(this.view); @@ -9659,20 +9659,20 @@ class BS { return this.passProp("resize"); } } -const Bwe = /* @__PURE__ */ XR.compute([S5], (t) => { - let e = t.facet(S5).filter((r) => r); +const Fwe = /* @__PURE__ */ ZR.compute([T5], (t) => { + let e = t.facet(T5).filter((r) => r); return e.length === 0 ? null : { pos: Math.min(...e.map((r) => r.pos)), end: Math.max(...e.map((r) => { var n; return (n = r.end) !== null && n !== void 0 ? n : r.pos; })), - create: BS.create, + create: FS.create, above: e[0].above, arrow: e.some((r) => r.arrow) }; }); -class Fwe { +class zwe { 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)); } @@ -9715,16 +9715,16 @@ class Fwe { a && e.dispatch({ effects: this.setHover.of(a) }); } get tooltip() { - let e = this.view.plugin(HR), r = e ? e.manager.tooltips.findIndex((n) => n.create == BS.create) : -1; + let e = this.view.plugin(XR), r = e ? e.manager.tooltips.findIndex((n) => n.create == FS.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 && !zwe(i.dom, e) || this.pending) { + if (n && i && !Vwe(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 : !Vwe(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 : !Uwe(this.view, s, a, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of(null) }), this.pending = null); } } mouseleave(e) { @@ -9746,18 +9746,18 @@ class Fwe { } } const ww = 4; -function zwe(t, e) { +function Vwe(t, e) { let r = t.getBoundingClientRect(); return e.clientX >= r.left - ww && e.clientX <= r.right + ww && e.clientY >= r.top - ww && e.clientY <= r.bottom + ww; } -function Vwe(t, e, r, n, i, s) { +function Uwe(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 Uwe(t, e = {}) { +function qwe(t, e = {}) { let r = Zt.define(), n = $n.define({ create() { return null; @@ -9773,25 +9773,25 @@ function Uwe(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(qwe) && (i = null); + a.is(r) && (i = a.value), a.is(Ywe) && (i = null); return i; }, - provide: (i) => S5.from(i) + provide: (i) => T5.from(i) }); return [ n, - on.define((i) => new Fwe(i, t, n, r, e.hoverTime || 300)), - Bwe + on.define((i) => new zwe(i, t, n, r, e.hoverTime || 300)), + Fwe ]; } -function _K(t, e) { - let r = t.plugin(HR); +function AK(t, e) { + let r = t.plugin(XR); if (!r) return null; let n = r.manager.tooltips.indexOf(e); return n < 0 ? null : r.manager.tooltipViews[n]; } -const qwe = /* @__PURE__ */ Zt.define(), JB = /* @__PURE__ */ _t.define({ +const Ywe = /* @__PURE__ */ Zt.define(), eF = /* @__PURE__ */ _t.define({ combine(t) { let e, r; for (let n of t) @@ -9800,19 +9800,19 @@ const qwe = /* @__PURE__ */ Zt.define(), JB = /* @__PURE__ */ _t.define({ } }); function _y(t, e) { - let r = t.plugin(AK), n = r ? r.specs.indexOf(e) : -1; + let r = t.plugin(LK), n = r ? r.specs.indexOf(e) : -1; return n > -1 ? r.panels[n] : null; } -const AK = /* @__PURE__ */ on.fromClass(class { +const LK = /* @__PURE__ */ on.fromClass(class { constructor(t) { this.input = t.state.facet(Ay), this.specs = this.input.filter((r) => r), this.panels = this.specs.map((r) => r(t)); - let e = t.state.facet(JB); + let e = t.state.facet(eF); this.top = new Ow(t, !0, e.topContainer), this.bottom = new Ow(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(JB); + let e = t.state.facet(eF); this.top.container != e.topContainer && (this.top.sync([]), this.top = new Ow(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new Ow(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses(); let r = t.state.facet(Ay); if (r != this.input) { @@ -9860,12 +9860,12 @@ class Ow { for (let r of this.panels) if (r.dom.parentNode == this.dom) { for (; e != r.dom; ) - e = eF(e); + e = tF(e); e = e.nextSibling; } else this.dom.insertBefore(r.dom, e); for (; e; ) - e = eF(e); + e = tF(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); @@ -9879,12 +9879,12 @@ class Ow { } } } -function eF(t) { +function tF(t) { let e = t.nextSibling; return t.remove(), e; } const Ay = /* @__PURE__ */ _t.define({ - enables: AK + enables: LK }); class Uo extends Zd { compare(e) { @@ -9901,7 +9901,7 @@ Uo.prototype.toDOM = void 0; Uo.prototype.mapMode = Si.TrackBefore; Uo.prototype.startSide = Uo.prototype.endSide = -1; Uo.prototype.point = !0; -const h4 = /* @__PURE__ */ _t.define(), Ywe = { +const f4 = /* @__PURE__ */ _t.define(), Qwe = { class: "", renderEmptyElements: !1, elementStyle: "", @@ -9913,42 +9913,42 @@ const h4 = /* @__PURE__ */ _t.define(), Ywe = { updateSpacer: null, domEventHandlers: {} }, Hv = /* @__PURE__ */ _t.define(); -function FS(t) { - return [LK(), Hv.of(Object.assign(Object.assign({}, Ywe), t))]; +function zS(t) { + return [RK(), Hv.of(Object.assign(Object.assign({}, Qwe), t))]; } -const v7 = /* @__PURE__ */ _t.define({ +const y7 = /* @__PURE__ */ _t.define({ combine: (t) => t.some((e) => e) }); -function LK(t) { +function RK(t) { let e = [ - Qwe + Wwe ]; - return t && t.fixed === !1 && e.push(v7.of(!0)), e; + return t && t.fixed === !1 && e.push(y7.of(!0)), e; } -const Qwe = /* @__PURE__ */ on.fromClass(class { +const Wwe = /* @__PURE__ */ on.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(Hv).map((e) => new rF(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(Hv).map((e) => new nF(t, e)); for (let e of this.gutters) this.dom.appendChild(e.dom); - this.fixed = !t.state.facet(v7), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM); + this.fixed = !t.state.facet(y7), 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(v7) != !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(y7) != !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 = Er.iter(this.view.state.facet(h4), this.view.viewport.from), n = [], i = this.gutters.map((s) => new Wwe(s, this.view.viewport, -this.view.documentPadding.top)); + let r = Er.iter(this.view.state.facet(f4), this.view.viewport.from), n = [], i = this.gutters.map((s) => new Gwe(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 == ia.Text && a) { - y7(r, n, o.from); + b7(r, n, o.from); for (let l of i) l.line(this.view, o, n); a = !1; @@ -9956,7 +9956,7 @@ const Qwe = /* @__PURE__ */ on.fromClass(class { for (let l of i) l.widget(this.view, o); } else if (s.type == ia.Text) { - y7(r, n, s.from); + b7(r, n, s.from); for (let a of i) a.line(this.view, s, n); } else if (s.widget) @@ -9967,7 +9967,7 @@ const Qwe = /* @__PURE__ */ on.fromClass(class { t && this.view.scrollDOM.insertBefore(this.dom, e); } updateGutters(t) { - let e = t.startState.facet(Hv), r = t.state.facet(Hv), n = t.docChanged || t.heightChanged || t.viewportChanged || !Er.eq(t.startState.facet(h4), t.state.facet(h4), t.view.viewport.from, t.view.viewport.to); + let e = t.startState.facet(Hv), r = t.state.facet(Hv), n = t.docChanged || t.heightChanged || t.viewportChanged || !Er.eq(t.startState.facet(f4), t.state.facet(f4), t.view.viewport.from, t.view.viewport.to); if (e == r) for (let i of this.gutters) i.update(t) && (n = !0); @@ -9976,7 +9976,7 @@ const Qwe = /* @__PURE__ */ on.fromClass(class { let i = []; for (let s of r) { let a = e.indexOf(s); - a < 0 ? i.push(new rF(this.view, s)) : (this.gutters[a].update(t), i.push(this.gutters[a])); + a < 0 ? i.push(new nF(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(); @@ -9997,21 +9997,21 @@ const Qwe = /* @__PURE__ */ on.fromClass(class { return !r || r.gutters.length == 0 || !r.fixed ? null : e.textDirection == In.LTR ? { left: r.dom.offsetWidth * e.scaleX } : { right: r.dom.offsetWidth * e.scaleX }; }) }); -function tF(t) { +function rF(t) { return Array.isArray(t) ? t : [t]; } -function y7(t, e, r) { +function b7(t, e, r) { for (; t.value && t.from <= r; ) t.from == r && e.push(t.value), t.next(); } -class Wwe { +class Gwe { constructor(e, r, n) { this.gutter = e, this.height = n, this.i = 0, this.cursor = Er.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 RK(e, a, s, n); + let o = new MK(e, a, s, n); i.elements.push(o), i.dom.appendChild(o.dom); } else i.elements[this.i].update(e, a, s, n); @@ -10019,7 +10019,7 @@ class Wwe { } line(e, r, n) { let i = []; - y7(this.cursor, i, r.from), n.length && (i = i.concat(n)); + b7(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; @@ -10037,7 +10037,7 @@ class Wwe { } } } -class rF { +class nF { 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) @@ -10053,11 +10053,11 @@ class rF { let o = e.lineBlockAtHeight(a - e.documentTop); r.domEventHandlers[n](e, o, i) && i.preventDefault(); }); - this.markers = tF(r.markers(e)), r.initialSpacer && (this.spacer = new RK(e, 0, 0, [r.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); + this.markers = rF(r.markers(e)), r.initialSpacer && (this.spacer = new MK(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 = tF(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) { + if (this.markers = rF(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]); } @@ -10069,12 +10069,12 @@ class rF { e.destroy(); } } -class RK { +class MK { 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" : ""), Gwe(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" : ""), Hwe(this.markers, i) || this.setMarkers(e, i); } setMarkers(e, r) { let n = "cm-gutterElement", i = this.dom.firstChild; @@ -10108,7 +10108,7 @@ class RK { this.setMarkers(null, []); } } -function Gwe(t, e) { +function Hwe(t, e) { if (t.length != e.length) return !1; for (let r = 0; r < t.length; r++) @@ -10116,7 +10116,7 @@ function Gwe(t, e) { return !1; return !0; } -const Hwe = /* @__PURE__ */ _t.define(), Rp = /* @__PURE__ */ _t.define({ +const Xwe = /* @__PURE__ */ _t.define(), Rp = /* @__PURE__ */ _t.define({ combine(t) { return Yc(t, { formatNumber: String, domEventHandlers: {} }, { domEventHandlers(e, r) { @@ -10130,7 +10130,7 @@ const Hwe = /* @__PURE__ */ _t.define(), Rp = /* @__PURE__ */ _t.define({ }); } }); -class CE extends Uo { +class EE extends Uo { constructor(e) { super(), this.number = e; } @@ -10141,59 +10141,59 @@ class CE extends Uo { return document.createTextNode(this.number); } } -function EE(t, e) { +function _E(t, e) { return t.state.facet(Rp).formatNumber(e, t.state); } -const Xwe = /* @__PURE__ */ Hv.compute([Rp], (t) => ({ +const Zwe = /* @__PURE__ */ Hv.compute([Rp], (t) => ({ class: "cm-lineNumbers", renderEmptyElements: !1, markers(e) { - return e.state.facet(Hwe); + return e.state.facet(Xwe); }, lineMarker(e, r, n) { - return n.some((i) => i.toDOM) ? null : new CE(EE(e, e.state.doc.lineAt(r.from).number)); + return n.some((i) => i.toDOM) ? null : new EE(_E(e, e.state.doc.lineAt(r.from).number)); }, widgetMarker: () => null, lineMarkerChange: (e) => e.startState.facet(Rp) != e.state.facet(Rp), initialSpacer(e) { - return new CE(EE(e, nF(e.state.doc.lines))); + return new EE(_E(e, iF(e.state.doc.lines))); }, updateSpacer(e, r) { - let n = EE(r.view, nF(r.view.state.doc.lines)); - return n == e.number ? e : new CE(n); + let n = _E(r.view, iF(r.view.state.doc.lines)); + return n == e.number ? e : new EE(n); }, domEventHandlers: t.facet(Rp).domEventHandlers })); -function Zwe(t = {}) { +function jwe(t = {}) { return [ Rp.of(t), - LK(), - Xwe + RK(), + Zwe ]; } -function nF(t) { +function iF(t) { let e = 9; for (; e < t; ) e = e * 10 + 9; return e; } -const jwe = /* @__PURE__ */ new class extends Uo { +const Kwe = /* @__PURE__ */ new class extends Uo { constructor() { super(...arguments), this.elementClass = "cm-activeLineGutter"; } -}(), Kwe = /* @__PURE__ */ h4.compute(["selection"], (t) => { +}(), Jwe = /* @__PURE__ */ f4.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(jwe.range(i))); + i > r && (r = i, e.push(Kwe.range(i))); } return Er.of(e); }); -function Jwe() { - return Kwe; +function eOe() { + return Jwe; } -const MK = 1024; -let eOe = 0; +const DK = 1024; +let tOe = 0; class Mo { constructor(e, r) { this.from = e, this.to = r; @@ -10201,7 +10201,7 @@ class Mo { } class or { constructor(e = {}) { - this.id = eOe++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { + this.id = tOe++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => { throw new Error("This node type doesn't define a deserialize function"); }); } @@ -10228,13 +10228,13 @@ class Ly { return e && e.props && e.props[or.mounted.id]; } } -const tOe = /* @__PURE__ */ Object.create(null); +const rOe = /* @__PURE__ */ Object.create(null); class Li { 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) : tOe, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Li(e.name || "", r, e.id, n); + let r = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : rOe, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Li(e.name || "", r, e.id, n); if (e.props) { for (let s of e.props) if (Array.isArray(s) || (s = s(i)), s) { @@ -10304,7 +10304,7 @@ class Hb { return new Hb(r); } } -const kw = /* @__PURE__ */ new WeakMap(), iF = /* @__PURE__ */ new WeakMap(); +const kw = /* @__PURE__ */ new WeakMap(), sF = /* @__PURE__ */ new WeakMap(); var hn; (function(t) { t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays"; @@ -10329,10 +10329,10 @@ class Qr { return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (r.length ? "(" + r + ")" : "") : r; } cursor(e = 0) { - return new T5(this.topNode, e); + return new C5(this.topNode, e); } cursorAt(e, r = 0, n = 0) { - let i = kw.get(this) || this.topNode, s = new T5(i); + let i = kw.get(this) || this.topNode, s = new C5(i); return s.moveTo(e, r), kw.set(this, s._tree), s; } get topNode() { @@ -10343,11 +10343,11 @@ class Qr { return kw.set(this, n), n; } resolveInner(e, r = 0) { - let n = Ry(iF.get(this) || this.topNode, e, r, !0); - return iF.set(this, n), n; + let n = Ry(sF.get(this) || this.topNode, e, r, !0); + return sF.set(this, n), n; } resolveStack(e, r = 0) { - return iOe(this, e, r); + return sOe(this, e, r); } iterate(e) { let { enter: r, leave: n, from: i = 0, to: s = this.length } = e, a = e.mode || 0, o = (a & hn.IncludeAnonymous) > 0; @@ -10376,14 +10376,14 @@ class Qr { return e; } balance(e = {}) { - return this.children.length <= 8 ? this : KR(Li.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new Qr(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new Qr(Li.none, r, n, i))); + return this.children.length <= 8 ? this : JR(Li.none, this.children, this.positions, 0, this.children.length, 0, this.length, (r, n, i) => new Qr(this.type, r, n, i, this.propValues), e.makeTree || ((r, n, i) => new Qr(Li.none, r, n, i))); } static build(e) { - return sOe(e); + return aOe(e); } } Qr.empty = new Qr(Li.none, [], [], 0); -class ZR { +class jR { constructor(e, r) { this.buffer = e, this.index = r; } @@ -10406,7 +10406,7 @@ class ZR { this.index -= 4; } fork() { - return new ZR(this.buffer, this.index); + return new jR(this.buffer, this.index); } } class cf { @@ -10433,7 +10433,7 @@ class cf { } findChild(e, r, n, i, s) { let { buffer: a } = this, o = -1; - for (let l = e; l != r && !(DK(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) + for (let l = e; l != r && !(NK(s, i, a[l + 1], a[l + 2]) && (o = l, n > 0)); l = a[l + 3]) ; return o; } @@ -10447,7 +10447,7 @@ class cf { return new cf(s, a, this.set); } } -function DK(t, e, r, n) { +function NK(t, e, r, n) { switch (t) { case -2: return r < e; @@ -10481,16 +10481,16 @@ function Ry(t, e, r, n) { t = a; } } -class NK { +class IK { cursor(e = 0) { - return new T5(this, e); + return new C5(this, e); } getChild(e, r = null, n = null) { - let i = sF(this, e, r, n); + let i = aF(this, e, r, n); return i.length ? i[0] : null; } getChildren(e, r = null, n = null) { - return sF(this, e, r, n); + return aF(this, e, r, n); } resolve(e, r = 0) { return Ry(this, e, r, !1); @@ -10499,7 +10499,7 @@ class NK { return Ry(this, e, r, !0); } matchContext(e) { - return b7(this, e); + return x7(this, e); } enterUnfinishedNodesBefore(e) { let r = this.childBefore(e), n = this; @@ -10518,7 +10518,7 @@ class NK { return this.parent; } } -class $s extends NK { +class $s extends IK { constructor(e, r, n, i) { super(), this._tree = e, this.from = r, this.index = n, this._parent = i; } @@ -10535,14 +10535,14 @@ class $s extends NK { 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 (!!DK(i, n, f, f + h.length)) { + if (!!NK(i, n, f, f + h.length)) { if (h instanceof cf) { if (s & hn.ExcludeBuffers) continue; let d = h.findChild(0, h.buffer.length, r, n - f, i); if (d > -1) - return new gc(new rOe(a, h, e, f), null, d); - } else if (s & hn.IncludeAnonymous || !h.type.isAnonymous || jR(h)) { + return new gc(new nOe(a, h, e, f), null, d); + } else if (s & hn.IncludeAnonymous || !h.type.isAnonymous || KR(h)) { let d; if (!(s & hn.IgnoreMounts) && (d = Ly.get(h)) && !d.overlay) return new $s(d.tree, f, e, a); @@ -10602,7 +10602,7 @@ class $s extends NK { return this._tree.toString(); } } -function sF(t, e, r, n) { +function aF(t, e, r, n) { let i = t.cursor(), s = []; if (!i.firstChild()) return s; @@ -10618,7 +10618,7 @@ function sF(t, e, r, n) { return n == null ? s : []; } } -function b7(t, e, r = e.length - 1) { +function x7(t, e, r = e.length - 1) { for (let n = t.parent; r >= 0; n = n.parent) { if (!n) return !1; @@ -10630,12 +10630,12 @@ function b7(t, e, r = e.length - 1) { } return !0; } -class rOe { +class nOe { constructor(e, r, n, i) { this.parent = e, this.buffer = r, this.index = n, this.start = i; } } -class gc extends NK { +class gc extends IK { get name() { return this.type.name; } @@ -10699,7 +10699,7 @@ class gc extends NK { return this.context.buffer.childString(this.index); } } -function IK(t) { +function PK(t) { if (!t.length) return null; let e = 0, r = t[0]; @@ -10708,17 +10708,17 @@ function IK(t) { (a.from > r.from || a.to < r.to) && (r = a, e = s); } let n = r instanceof $s && r.index < 0 ? null : r.parent, i = t.slice(); - return n ? i[e] = n : i.splice(e, 1), new nOe(i, r); + return n ? i[e] = n : i.splice(e, 1), new iOe(i, r); } -class nOe { +class iOe { constructor(e, r) { this.heads = e, this.node = r; } get next() { - return IK(this.heads); + return PK(this.heads); } } -function iOe(t, e, r) { +function sOe(t, e, r) { let n = t.resolveInner(e, r), i = null; for (let s = n instanceof $s ? n : n.context.parent; s; s = s.parent) if (s.index < 0) { @@ -10731,9 +10731,9 @@ function iOe(t, e, r) { (i || (i = [n])).push(Ry(o, e, r, !1)); } } - return i ? IK(i) : n; + return i ? PK(i) : n; } -class T5 { +class C5 { get name() { return this.type.name; } @@ -10828,7 +10828,7 @@ class T5 { 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 & hn.IncludeAnonymous || o instanceof cf || !o.type.isAnonymous || jR(o)) + if (this.mode & hn.IncludeAnonymous || o instanceof cf || !o.type.isAnonymous || KR(o)) return !1; } return !0; @@ -10899,11 +10899,11 @@ class T5 { } matchContext(e) { if (!this.buffer) - return b7(this.node, e); + return x7(this.node, 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 b7(this.node, e, i); + return x7(this.node, e, i); let a = n[r.buffer[this.stack[s]]]; if (!a.isAnonymous) { if (e[i] && e[i] != a.name) @@ -10914,12 +10914,12 @@ class T5 { return !0; } } -function jR(t) { - return t.children.some((e) => e instanceof cf || !e.type.isAnonymous || jR(e)); +function KR(t) { + return t.children.some((e) => e instanceof cf || !e.type.isAnonymous || KR(e)); } -function sOe(t) { +function aOe(t) { var e; - let { buffer: r, nodeSet: n, maxBufferLength: i = MK, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new ZR(r, r.length) : r, l = n.types, u = 0, h = 0; + let { buffer: r, nodeSet: n, maxBufferLength: i = DK, reused: s = [], minRepeatType: a = n.types.length } = t, o = Array.isArray(r) ? new jR(r, r.length) : r, l = n.types, u = 0, h = 0; function f(S, C, T, L, E, R) { let { id: _, start: A, end: $, size: k } = o, N = h; for (; k < 0; ) @@ -10949,7 +10949,7 @@ function sOe(t) { Y >= 0 && o.id == Y && o.size >= 0 ? (o.end <= ee - i && (g(B, V, A, G, o.end, ee, Y, N), G = B.length, ee = o.end), o.next()) : R > 2500 ? d(A, F, B, V) : f(A, F, B, V, Y, R + 1); if (Y >= 0 && G > 0 && G < B.length && g(B, V, A, G, A, ee, Y, N), B.reverse(), V.reverse(), Y > -1 && G > 0) { let Q = p(M); - I = KR(M, B, V, 0, B.length, 0, $ - A, Q, Q); + I = JR(M, B, V, 0, B.length, 0, $ - A, Q, Q); } else I = m(M, B, V, $ - A, N - $); } @@ -11049,11 +11049,11 @@ function sOe(t) { let O = (e = t.length) !== null && e !== void 0 ? e : b.length ? w[0] + b[0].length : 0; return new Qr(l[t.topID], b.reverse(), w.reverse(), O); } -const aF = /* @__PURE__ */ new WeakMap(); -function f4(t, e) { +const oF = /* @__PURE__ */ new WeakMap(); +function d4(t, e) { if (!t.isAnonymous || e instanceof cf || e.type != t) return 1; - let r = aF.get(e); + let r = oF.get(e); if (r == null) { r = 1; for (let n of e.children) { @@ -11061,22 +11061,22 @@ function f4(t, e) { r = 1; break; } - r += f4(t, n); + r += d4(t, n); } - aF.set(e, r); + oF.set(e, r); } return r; } -function KR(t, e, r, n, i, s, a, o, l) { +function JR(t, e, r, n, i, s, a, o, l) { let u = 0; for (let g = n; g < i; g++) - u += f4(t, e[g]); + u += d4(t, e[g]); let h = Math.ceil(u * 1.5 / 8), f = [], d = []; function p(g, m, v, y, b) { for (let w = v; w < y; ) { - let O = w, S = m[w], C = f4(t, g[w]); + let O = w, S = m[w], C = d4(t, g[w]); for (w++; w < y; w++) { - let T = f4(t, g[w]); + let T = d4(t, g[w]); if (C + T >= h) break; C += T; @@ -11090,14 +11090,14 @@ function KR(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(KR(t, g, m, O, w, S, T, null, l)); + f.push(JR(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 PK { +class $K { constructor() { this.map = /* @__PURE__ */ new WeakMap(); } @@ -11162,9 +11162,9 @@ class Eu { return i; } } -class JR { +class eM { startParse(e, r, n) { - return typeof e == "string" && (e = new aOe(e)), n = n ? n.length ? n.map((i) => new Mo(i.from, i.to)) : [new Mo(0, 0)] : [new Mo(0, e.length)], this.createParse(e, r || [], n); + return typeof e == "string" && (e = new oOe(e)), n = n ? n.length ? n.map((i) => new Mo(i.from, i.to)) : [new Mo(0, 0)] : [new Mo(0, e.length)], this.createParse(e, r || [], n); } parse(e, r, n) { let i = this.startParse(e, r, n); @@ -11175,7 +11175,7 @@ class JR { } } } -class aOe { +class oOe { constructor(e) { this.string = e; } @@ -11192,25 +11192,25 @@ class aOe { return this.string.slice(e, r); } } -function $K(t) { - return (e, r, n, i) => new lOe(e, t, r, n, i); +function BK(t) { + return (e, r, n, i) => new cOe(e, t, r, n, i); } -class oF { +class lF { constructor(e, r, n, i, s) { this.parser = e, this.parse = r, this.overlay = n, this.target = i, this.from = s; } } -function lF(t) { +function cF(t) { if (!t.length || t.some((e) => e.from >= e.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(t)); } -class oOe { +class lOe { 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 x7 = new or({ perNode: !0 }); -class lOe { +const w7 = new or({ perNode: !0 }); +class cOe { 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; } @@ -11225,7 +11225,7 @@ class lOe { } if (this.innerDone == this.inner.length) { let n = this.baseTree; - return this.stoppedAt != null && (n = new Qr(n.type, n.children, n.positions, n.length, n.propValues.concat([[x7, this.stoppedAt]]))), n; + return this.stoppedAt != null && (n = new Qr(n.type, n.children, n.positions, n.length, n.propValues.concat([[w7, this.stoppedAt]]))), n; } let e = this.inner[this.innerDone], r = e.parse.advance(); if (r) { @@ -11251,7 +11251,7 @@ class lOe { this.inner[r].parse.stopAt(e); } startInner() { - let e = new hOe(this.fragments), r = null, n = null, i = new T5(new $s(this.baseTree, this.ranges[0].from, 0, null), hn.IncludeAnonymous | hn.IgnoreMounts); + let e = new fOe(this.fragments), r = null, n = null, i = new C5(new $s(this.baseTree, this.ranges[0].from, 0, null), hn.IncludeAnonymous | hn.IgnoreMounts); e: for (let s, a; ; ) { let o = !0, l; @@ -11267,16 +11267,16 @@ class lOe { } } o = !1; - } else if (n && (a = cOe(n.ranges, i.from, i.to))) + } else if (n && (a = uOe(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 || uOe(i); + i.tree || hOe(i); let u = e.findMounts(i.from, s.parser); if (typeof s.overlay == "function") - r = new oOe(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); + r = new lOe(s.parser, s.overlay, u, this.inner.length, i.from, i.tree, r); else { - let h = hF(this.ranges, s.overlay || (i.from < i.to ? [new Mo(i.from, i.to)] : [])); - h.length && lF(h), (h.length || !s.overlay) && this.inner.push(new oF(s.parser, h.length ? s.parser.startParse(this.input, fF(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Mo(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 = fF(this.ranges, s.overlay || (i.from < i.to ? [new Mo(i.from, i.to)] : [])); + h.length && cF(h), (h.length || !s.overlay) && this.inner.push(new lF(s.parser, h.length ? s.parser.startParse(this.input, dF(u, h), h) : s.parser.startParse(""), s.overlay ? s.overlay.map((f) => new Mo(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 r && (l = r.predicate(i)) && (l === !0 && (l = new Mo(i.from, i.to)), l.from < l.to && r.ranges.push(l)); @@ -11287,15 +11287,15 @@ class lOe { if (!i.parent()) break e; if (r && !--r.depth) { - let u = hF(this.ranges, r.ranges); - u.length && (lF(u), this.inner.splice(r.index, 0, new oF(r.parser, r.parser.startParse(this.input, fF(r.mounts, u), u), r.ranges.map((h) => new Mo(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; + let u = fF(this.ranges, r.ranges); + u.length && (cF(u), this.inner.splice(r.index, 0, new lF(r.parser, r.parser.startParse(this.input, dF(r.mounts, u), u), r.ranges.map((h) => new Mo(h.from - r.start, h.to - r.start)), r.target, u[0].from))), r = r.prev; } n && !--n.depth && (n = n.prev); } } } } -function cOe(t, e, r) { +function uOe(t, e, r) { for (let n of t) { if (n.from >= r) break; @@ -11304,13 +11304,13 @@ function cOe(t, e, r) { } return 0; } -function cF(t, e, r, n, i, s) { +function uF(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 uOe(t) { +function hOe(t) { let { node: e } = t, r = [], n = e.context.buffer; do r.push(t.index), t.parent(); @@ -11318,11 +11318,11 @@ function uOe(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 = []; - cF(a, h, v, y, b, p); + uF(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), cF(a, o[v + 3], f, y, b, p), new Qr(d, y, b, g); + return y.push(S), b.push(w - p), uF(a, o[v + 3], f, y, b, p), new Qr(d, y, b, g); } i.children[s] = u(0, o.length, Li.none, 0, a.length, r.length - 1); for (let h of l) { @@ -11330,7 +11330,7 @@ function uOe(t) { t.yield(new $s(f, d + t.from, h, t._tree)); } } -class uF { +class hF { constructor(e, r) { this.offset = r, this.done = !1, this.cursor = e.cursor(hn.IncludeAnonymous | hn.IgnoreMounts); } @@ -11352,12 +11352,12 @@ class uF { return !1; } } -class hOe { +class fOe { 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(x7)) !== null && r !== void 0 ? r : n.to, this.inner = new uF(n.tree, -n.offset); + this.curTo = (r = n.tree.prop(w7)) !== null && r !== void 0 ? r : n.to, this.inner = new hF(n.tree, -n.offset); } else this.curFrag = this.inner = null; } @@ -11372,7 +11372,7 @@ class hOe { this.curFrag = this.inner = null; else { let r = this.curFrag = this.fragments[this.fragI]; - this.curTo = (e = r.tree.prop(x7)) !== null && e !== void 0 ? e : r.to, this.inner = new uF(r.tree, -r.offset); + this.curTo = (e = r.tree.prop(w7)) !== null && e !== void 0 ? e : r.to, this.inner = new hF(r.tree, -r.offset); } } findMounts(e, r) { @@ -11398,7 +11398,7 @@ class hOe { return i; } } -function hF(t, e) { +function fF(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; @@ -11411,7 +11411,7 @@ function hF(t, e) { } return n; } -function fOe(t, e, r, n) { +function dOe(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; @@ -11425,12 +11425,12 @@ function fOe(t, e, r, n) { } return u; } -function fF(t, e) { +function dF(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 Mo(d.from + n, d.to + n)), f = fOe(e, h, l, u); + let h = i.overlay.map((d) => new Mo(d.from + n, d.to + n)), f = dOe(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 Eu(p, m, i.tree, -a, s.from >= p || s.openStart, s.to <= m || s.openEnd)), g) @@ -11442,10 +11442,10 @@ function fF(t, e) { } return r; } -let dOe = 0; +let pOe = 0; class dl { constructor(e, r, n) { - this.set = e, this.base = r, this.modified = n, this.id = dOe++; + this.set = e, this.base = r, this.modified = n, this.id = pOe++; } static define(e) { if (e != null && e.base) @@ -11457,36 +11457,36 @@ class dl { return r; } static defineModifier() { - let e = new C5(); - return (r) => r.modified.indexOf(e) > -1 ? r : C5.get(r.base || r, r.modified.concat(e).sort((n, i) => n.id - i.id)); + let e = new E5(); + return (r) => r.modified.indexOf(e) > -1 ? r : E5.get(r.base || r, r.modified.concat(e).sort((n, i) => n.id - i.id)); } } -let pOe = 0; -class C5 { +let gOe = 0; +class E5 { constructor() { - this.instances = [], this.id = pOe++; + this.instances = [], this.id = gOe++; } static get(e, r) { if (!r.length) return e; - let n = r[0].instances.find((o) => o.base == e && gOe(r, o.modified)); + let n = r[0].instances.find((o) => o.base == e && mOe(r, o.modified)); if (n) return n; let i = [], s = new dl(i, e, r); for (let o of r) o.instances.push(s); - let a = mOe(r); + let a = vOe(r); for (let o of e.set) if (!o.modified.length) for (let l of a) - i.push(C5.get(o, l)); + i.push(E5.get(o, l)); return s; } } -function gOe(t, e) { +function mOe(t, e) { return t.length == e.length && t.every((r, n) => r == e[n]); } -function mOe(t) { +function vOe(t) { let e = [[]]; for (let r = 0; r < t.length; r++) for (let n = 0, i = e.length; n < i; n++) @@ -11523,14 +11523,14 @@ function P1(t) { let l = s.length - 1, u = s[l]; if (!u) throw new RangeError("Invalid path: " + i); - let h = new E5(n, a, l > 0 ? s.slice(0, l) : null); + let h = new _5(n, a, l > 0 ? s.slice(0, l) : null); e[u] = h.sort(e[u]); } } - return BK.add(e); + return FK.add(e); } -const BK = new or(); -class E5 { +const FK = new or(); +class _5 { constructor(e, r, n, i) { this.tags = e, this.mode = r, this.context = n, this.next = i; } @@ -11547,8 +11547,8 @@ class E5 { return this.context ? this.context.length : 0; } } -E5.empty = new E5([], 2, null); -function FK(t, e) { +_5.empty = new _5([], 2, null); +function zK(t, e) { let r = /* @__PURE__ */ Object.create(null); for (let s of t) if (!Array.isArray(s.tag)) @@ -11573,7 +11573,7 @@ function FK(t, e) { scope: n }; } -function vOe(t, e) { +function yOe(t, e) { let r = null; for (let n of t) { let i = n.style(e); @@ -11581,11 +11581,11 @@ function vOe(t, e) { } return r; } -function yOe(t, e, r, n = 0, i = t.length) { - let s = new bOe(n, Array.isArray(e) ? e : [e], r); +function bOe(t, e, r, n = 0, i = t.length) { + let s = new xOe(n, Array.isArray(e) ? e : [e], r); s.highlightRange(t.cursor(), n, i, "", s.highlighters), s.flush(i); } -class bOe { +class xOe { constructor(e, r, n) { this.at = e, this.highlighters = r, this.span = n, this.class = ""; } @@ -11600,7 +11600,7 @@ class bOe { if (o >= n || l <= r) return; a.isTop && (s = this.highlighters.filter((p) => !p.scope || p.scope(a))); - let u = i, h = xOe(e) || E5.empty, f = vOe(s, h.tags); + let u = i, h = wOe(e) || _5.empty, f = yOe(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(or.mounted); @@ -11629,23 +11629,23 @@ class bOe { } } } -function xOe(t) { - let e = t.type.prop(BK); +function wOe(t) { + let e = t.type.prop(FK); for (; e && e.context && !t.matchContext(e.context); ) e = e.next; return e || null; } -const xt = dl.define, Sw = xt(), kh = xt(), dF = xt(kh), pF = xt(kh), Sh = xt(), Tw = xt(Sh), _E = xt(Sh), nc = xt(), jf = xt(nc), Kl = xt(), Jl = xt(), w7 = xt(), Rm = xt(w7), Cw = xt(), Se = { +const xt = dl.define, Sw = xt(), kh = xt(), pF = xt(kh), gF = xt(kh), Sh = xt(), Tw = xt(Sh), AE = xt(Sh), nc = xt(), jf = xt(nc), Kl = xt(), Jl = xt(), O7 = xt(), Rm = xt(O7), Cw = xt(), Se = { comment: Sw, lineComment: xt(Sw), blockComment: xt(Sw), docComment: xt(Sw), name: kh, variableName: xt(kh), - typeName: dF, - tagName: xt(dF), - propertyName: pF, - attributeName: xt(pF), + typeName: pF, + tagName: xt(pF), + propertyName: gF, + attributeName: xt(gF), className: xt(kh), labelName: xt(kh), namespace: xt(kh), @@ -11655,9 +11655,9 @@ const xt = dl.define, Sw = xt(), kh = xt(), dF = xt(kh), pF = xt(kh), Sh = xt(), docString: xt(Tw), character: xt(Tw), attributeValue: xt(Tw), - number: _E, - integer: xt(_E), - float: xt(_E), + number: AE, + integer: xt(AE), + float: xt(AE), bool: xt(Sh), regexp: xt(Sh), escape: xt(Sh), @@ -11683,8 +11683,8 @@ const xt = dl.define, Sw = xt(), kh = xt(), dF = xt(kh), pF = xt(kh), Sh = xt(), definitionOperator: xt(Jl), typeOperator: xt(Jl), controlOperator: xt(Jl), - punctuation: w7, - separator: xt(w7), + punctuation: O7, + separator: xt(O7), bracket: Rm, angleBracket: xt(Rm), squareBracket: xt(Rm), @@ -11721,7 +11721,7 @@ const xt = dl.define, Sw = xt(), kh = xt(), dF = xt(kh), pF = xt(kh), Sh = xt(), local: dl.defineModifier(), special: dl.defineModifier() }; -FK([ +zK([ { tag: Se.link, class: "tok-link" }, { tag: Se.heading, class: "tok-heading" }, { tag: Se.emphasis, class: "tok-emphasis" }, @@ -11753,14 +11753,14 @@ FK([ { tag: Se.invalid, class: "tok-invalid" }, { tag: Se.punctuation, class: "tok-punctuation" } ]); -var AE; +var LE; const $h = /* @__PURE__ */ new or(); -function zS(t) { +function VS(t) { return _t.define({ combine: t ? (e) => e.concat(t) : void 0 }); } -const eM = /* @__PURE__ */ new or(); +const tM = /* @__PURE__ */ new or(); class no { constructor(e, r, n = [], i = "") { this.data = e, this.name = i, dr.prototype.hasOwnProperty("tree") || Object.defineProperty(dr.prototype, "tree", { get() { @@ -11768,10 +11768,10 @@ class no { } }), this.parser = r, this.extension = [ uf.of(this), dr.languageData.of((s, a, o) => { - let l = gF(s, a, o), u = l.type.prop($h); + let l = mF(s, a, o), u = l.type.prop($h); if (!u) return []; - let h = s.facet(u), f = l.type.prop(eM); + let h = s.facet(u), f = l.type.prop(tM); if (f) { let d = l.resolve(a - l.from, o); for (let p of f) @@ -11785,7 +11785,7 @@ class no { ].concat(n); } isActiveAt(e, r, n = -1) { - return gF(e, r, n).type.prop($h) == this.data; + return mF(e, r, n).type.prop($h) == this.data; } findRegions(e) { let r = e.facet(uf); @@ -11825,7 +11825,7 @@ class no { } } no.setState = /* @__PURE__ */ Zt.define(); -function gF(t, e, r) { +function mF(t, e, r) { let n = t.facet(uf), i = Jr(t).topNode; if (!n || n.allowsNesting) for (let s = i; s; s = s.enter(e, r, hn.ExcludeBuffers)) @@ -11837,7 +11837,7 @@ class Lg extends no { super(e, r, [], n), this.parser = r; } static define(e) { - let r = zS(e.languageData); + let r = VS(e.languageData); return new Lg(r, e.parser.configure({ props: [$h.add((n) => n.isTop ? r : void 0)] }), e.name); @@ -11853,7 +11853,7 @@ function Jr(t) { let e = t.field(no.state, !1); return e ? e.tree : Qr.empty; } -class wOe { +class OOe { constructor(e) { this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter(); } @@ -11883,7 +11883,7 @@ class My { return new My(e, r, [], Qr.empty, 0, n, [], null); } startParse() { - return this.parser.startParse(new wOe(this.state.doc), this.fragments); + return this.parser.startParse(new OOe(this.state.doc), this.fragments); } work(e, r) { return r != null && r >= this.state.doc.length && (r = void 0), this.tree != Qr.empty && this.isDone(r != null ? r : this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => { @@ -11922,7 +11922,7 @@ class My { } withoutTempSkipped(e) { for (let r; r = this.tempSkipped.pop(); ) - e = mF(e, r.from, r.to); + e = vF(e, r.from, r.to); return e; } changes(e, r) { @@ -11946,7 +11946,7 @@ class My { 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 = mF(this.fragments, i, s), this.skipped.splice(n--, 1)); + i < e.to && s > e.from && (this.fragments = vF(this.fragments, i, s), this.skipped.splice(n--, 1)); } return this.skipped.length >= r ? !1 : (this.reset(), !0); } @@ -11957,7 +11957,7 @@ class My { this.skipped.push({ from: e, to: r }); } static getSkippingParser(e) { - return new class extends JR { + return new class extends eM { createParse(r, n, i) { let s = i[0].from, a = i[i.length - 1].to; return { @@ -11987,7 +11987,7 @@ class My { return Mm; } } -function mF(t, e, r) { +function vF(t, e, r) { return Eu.applyChanges(t, [{ fromA: e, toA: r, fromB: e, toB: r }]); } class Rg { @@ -12014,17 +12014,17 @@ no.state = /* @__PURE__ */ $n.define({ return e.startState.facet(uf) != e.state.facet(uf) ? Rg.init(e.state) : t.apply(e); } }); -let zK = (t) => { +let VK = (t) => { let e = setTimeout(() => t(), 500); return () => clearTimeout(e); }; -typeof requestIdleCallback < "u" && (zK = (t) => { +typeof requestIdleCallback < "u" && (VK = (t) => { let e = -1, r = setTimeout(() => { e = requestIdleCallback(t, { timeout: 500 - 100 }); }, 100); return () => e < 0 ? clearTimeout(r) : cancelIdleCallback(e); }); -const LE = typeof navigator < "u" && ((AE = navigator.scheduling) === null || AE === void 0 ? void 0 : AE.isInputPending) ? () => navigator.scheduling.isInputPending() : null, OOe = /* @__PURE__ */ on.fromClass(class { +const RE = typeof navigator < "u" && ((LE = navigator.scheduling) === null || LE === void 0 ? void 0 : LE.isInputPending) ? () => navigator.scheduling.isInputPending() : null, kOe = /* @__PURE__ */ on.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(); } @@ -12036,7 +12036,7 @@ const LE = typeof navigator < "u" && ((AE = navigator.scheduling) === null || AE if (this.working) return; let { state: e } = this.view, r = e.field(no.state); - (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = zK(this.work)); + (r.tree != r.context.tree || !r.context.isDone(e.doc.length)) && (this.working = VK(this.work)); } work(e) { this.working = null; @@ -12046,7 +12046,7 @@ const LE = typeof navigator < "u" && ((AE = navigator.scheduling) === null || AE let { state: n, viewport: { to: i } } = this.view, s = n.field(no.state); if (s.tree == s.context.tree && s.context.isDone(i + 1e5)) return; - let a = Date.now() + Math.min(this.chunkBudget, 100, e && !LE ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => LE && LE() || Date.now() > a, i + (o ? 0 : 1e5)); + let a = Date.now() + Math.min(this.chunkBudget, 100, e && !RE ? Math.max(25, e.timeRemaining() - 5) : 1e9), o = s.context.treeLen < i && n.doc.length > i + 1e3, l = s.context.work(() => RE && RE() || Date.now() > a, i + (o ? 0 : 1e5)); this.chunkBudget -= Date.now() - r, (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: no.setState.of(new Rg(s.context)) })), this.chunkBudget > 0 && !(l && !o) && this.scheduleWork(), this.checkAsyncSchedule(s.context); } checkAsyncSchedule(e) { @@ -12068,7 +12068,7 @@ const LE = typeof navigator < "u" && ((AE = navigator.scheduling) === null || AE }, enables: (t) => [ no.state, - OOe, + kOe, ht.contentAttributes.compute([t], (e) => { let r = e.facet(t); return r && r.name ? { "data-language": r.name } : {}; @@ -12080,7 +12080,7 @@ class Dy { this.language = e, this.support = r, this.extension = [e, r]; } } -class _5 { +class A5 { constructor(e, r, n, i, s, a = void 0) { this.name = e, this.alias = r, this.extensions = n, this.filename = i, this.loadFunc = s, this.support = a, this.loading = null; } @@ -12096,7 +12096,7 @@ class _5 { throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of"); r = () => Promise.resolve(n); } - return new _5(e.name, (e.alias || []).concat(e.name).map((i) => i.toLowerCase()), e.extensions || [], e.filename, r, n); + return new A5(e.name, (e.alias || []).concat(e.name).map((i) => i.toLowerCase()), e.extensions || [], e.filename, r, n); } static matchFilename(e, r) { for (let i of e) @@ -12125,7 +12125,7 @@ class _5 { return null; } } -const kOe = /* @__PURE__ */ _t.define(), Xb = /* @__PURE__ */ _t.define({ +const SOe = /* @__PURE__ */ _t.define(), Xb = /* @__PURE__ */ _t.define({ combine: (t) => { if (!t.length) return " "; @@ -12135,7 +12135,7 @@ const kOe = /* @__PURE__ */ _t.define(), Xb = /* @__PURE__ */ _t.define({ return e; } }); -function A5(t) { +function L5(t) { let e = t.facet(Xb); return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length; } @@ -12150,19 +12150,19 @@ function Ny(t, e) { r += i; return r; } -function tM(t, e) { - t instanceof dr && (t = new VS(t)); - for (let n of t.state.facet(kOe)) { +function rM(t, e) { + t instanceof dr && (t = new US(t)); + for (let n of t.state.facet(SOe)) { let i = n(t, e); if (i !== void 0) return i; } let r = Jr(t.state); - return r.length >= e ? SOe(t, r, e) : null; + return r.length >= e ? TOe(t, r, e) : null; } -class VS { +class US { constructor(e, r = {}) { - this.state = e, this.options = r, this.unit = A5(e); + this.state = e, this.options = r, this.unit = L5(e); } lineAt(e, r = 1) { let n = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: s } = this.options; @@ -12195,7 +12195,7 @@ class VS { } } const $1 = /* @__PURE__ */ new or(); -function SOe(t, e, r) { +function TOe(t, e, r) { let n = e.resolveStack(r), i = n.node.enterUnfinishedNodesBefore(r); if (i != n.node) { let s = []; @@ -12204,34 +12204,34 @@ function SOe(t, e, r) { for (let a = s.length - 1; a >= 0; a--) n = { node: s[a], next: n }; } - return VK(n, t, r); + return UK(n, t, r); } -function VK(t, e, r) { +function UK(t, e, r) { for (let n = t; n; n = n.next) { - let i = COe(n.node); + let i = EOe(n.node); if (i) - return i(rM.create(e, r, n)); + return i(nM.create(e, r, n)); } return 0; } -function TOe(t) { +function COe(t) { return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak; } -function COe(t) { +function EOe(t) { let e = t.type.prop($1); if (e) return e; let r = t.firstChild, n; if (r && (n = r.type.prop(or.closedBy))) { let i = t.lastChild, s = i && n.indexOf(i.name) > -1; - return (a) => UK(a, !0, 1, void 0, s && !TOe(a) ? i.from : void 0); + return (a) => qK(a, !0, 1, void 0, s && !COe(a) ? i.from : void 0); } - return t.parent == null ? EOe : null; + return t.parent == null ? _Oe : null; } -function EOe() { +function _Oe() { return 0; } -class rM extends VS { +class nM extends US { constructor(e, r, n) { super(e.state, e.options), this.base = e, this.pos = r, this.context = n; } @@ -12239,7 +12239,7 @@ class rM extends VS { return this.context.node; } static create(e, r, n) { - return new rM(e, r, n); + return new nM(e, r, n); } get textAfter() { return this.textAfterPos(this.pos); @@ -12253,23 +12253,23 @@ class rM extends VS { let n = e.resolve(r.from); for (; n.parent && n.parent.from == n.from; ) n = n.parent; - if (_Oe(n, e)) + if (AOe(n, e)) break; r = this.state.doc.lineAt(n.from); } return this.lineIndent(r.from); } continue() { - return VK(this.context.next, this.base, this.pos); + return UK(this.context.next, this.base, this.pos); } } -function _Oe(t, e) { +function AOe(t, e) { for (let r = e; r; r = r.parent) if (t == r) return !0; return !1; } -function AOe(t) { +function LOe(t) { let e = t.node, r = e.childAfter(e.from), n = e.lastChild; if (!r) return null; @@ -12283,22 +12283,22 @@ function AOe(t) { o = l.to; } } -function LOe({ closing: t, align: e = !0, units: r = 1 }) { - return (n) => UK(n, e, r, t); +function ROe({ closing: t, align: e = !0, units: r = 1 }) { + return (n) => qK(n, e, r, t); } -function UK(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 ? AOe(t) : null; +function qK(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 ? LOe(t) : null; return l ? o ? t.column(l.from) : t.column(l.to) : t.baseIndent + (o ? 0 : t.unit * r); } -const ROe = (t) => t.baseIndent; -function d4({ except: t, units: e = 1 } = {}) { +const MOe = (t) => t.baseIndent; +function p4({ except: t, units: e = 1 } = {}) { return (r) => { let n = t && t.test(r.textAfter); return r.baseIndent + (n ? 0 : e * r.unit); }; } -const MOe = 200; -function DOe() { +const DOe = 200; +function NOe() { return dr.transactionFilter.of((t) => { if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete")) return t; @@ -12306,7 +12306,7 @@ function DOe() { if (!e.length) return t; let r = t.newDoc, { head: n } = t.newSelection.main, i = r.lineAt(n); - if (n > i.from + MOe) + if (n > i.from + DOe) return t; let s = r.sliceString(i.from, n); if (!e.some((u) => u.test(s))) @@ -12317,7 +12317,7 @@ function DOe() { if (h.from == o) continue; o = h.from; - let f = tM(a, h.from); + let f = rM(a, h.from); if (f == null) continue; let d = /^\s*/.exec(h.text)[0], p = Ny(a, f); @@ -12326,12 +12326,12 @@ function DOe() { return l.length ? [t, { changes: l, sequential: !0 }] : t; }); } -const US = /* @__PURE__ */ _t.define(), P0 = /* @__PURE__ */ new or(); -function qK(t) { +const qS = /* @__PURE__ */ _t.define(), P0 = /* @__PURE__ */ new or(); +function YK(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 NOe(t, e, r) { +function IOe(t, e, r) { let n = Jr(t); if (n.length < r) return null; @@ -12343,31 +12343,31 @@ function NOe(t, e, r) { if (s && o.from < e) break; let l = o.type.prop(P0); - if (l && (o.to < n.length - 50 || n.length == t.doc.length || !IOe(o))) { + if (l && (o.to < n.length - 50 || n.length == t.doc.length || !POe(o))) { let u = l(o, t); u && u.from <= r && u.from >= e && u.to > r && (s = u); } } return s; } -function IOe(t) { +function POe(t) { let e = t.lastChild; return e && e.to == t.to && e.type.isError; } function Kd(t, e, r) { - for (let n of t.facet(US)) { + for (let n of t.facet(qS)) { let i = n(t, e, r); if (i) return i; } - return NOe(t, e, r); + return IOe(t, e, r); } -function YK(t, e) { +function QK(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 Nc = /* @__PURE__ */ Zt.define({ map: YK }), Bf = /* @__PURE__ */ Zt.define({ map: YK }); -function nM(t) { +const Nc = /* @__PURE__ */ Zt.define({ map: QK }), Bf = /* @__PURE__ */ Zt.define({ map: QK }); +function iM(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)); @@ -12380,8 +12380,8 @@ const hf = /* @__PURE__ */ $n.define({ update(t, e) { t = t.map(e.changes); for (let r of e.effects) - if (r.is(Nc) && !POe(t, r.value.from, r.value.to)) { - let { preparePlaceholder: n } = e.state.facet(aM), i = n ? Et.replace({ widget: new QOe(n(e.state, r.value)) }) : vF; + if (r.is(Nc) && !$Oe(t, r.value.from, r.value.to)) { + let { preparePlaceholder: n } = e.state.facet(oM), i = n ? Et.replace({ widget: new WOe(n(e.state, r.value)) }) : yF; t = t.update({ add: [i.range(r.value.from, r.value.to)] }); } else r.is(Bf) && (t = t.update({ @@ -12416,12 +12416,12 @@ const hf = /* @__PURE__ */ $n.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(vF.range(n, i)); + e.push(yF.range(n, i)); } return Et.set(e, !0); } }); -function iM(t) { +function sM(t) { return t.field(hf, !1) || Er.empty; } function Iy(t, e, r) { @@ -12431,44 +12431,44 @@ function Iy(t, e, r) { (!i || i.from > s) && (i = { from: s, to: a }); }), i; } -function POe(t, e, r) { +function $Oe(t, e, r) { let n = !1; return t.between(e, e, (i, s) => { i == e && s == r && (n = !0); }), n; } -function sM(t, e) { - return t.field(hf, !1) ? e : e.concat(Zt.appendConfig.of(QK())); +function aM(t, e) { + return t.field(hf, !1) ? e : e.concat(Zt.appendConfig.of(WK())); } -const $Oe = (t) => { - for (let e of nM(t)) { +const BOe = (t) => { + for (let e of iM(t)) { let r = Kd(t.state, e.from, e.to); if (r) - return t.dispatch({ effects: sM(t.state, [Nc.of(r), L5(t, r)]) }), !0; + return t.dispatch({ effects: aM(t.state, [Nc.of(r), R5(t, r)]) }), !0; } return !1; -}, BOe = (t) => { +}, FOe = (t) => { if (!t.state.field(hf, !1)) return !1; let e = []; - for (let r of nM(t)) { + for (let r of iM(t)) { let n = Iy(t.state, r.from, r.to); - n && e.push(Bf.of(n), L5(t, n, !1)); + n && e.push(Bf.of(n), R5(t, n, !1)); } return e.length && t.dispatch({ effects: e }), e.length > 0; }; -function L5(t, e, r = !0) { +function R5(t, e, r = !0) { let n = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number; return ht.announce.of(`${t.state.phrase(r ? "Folded lines" : "Unfolded lines")} ${n} ${t.state.phrase("to")} ${i}.`); } -const FOe = (t) => { +const zOe = (t) => { let { state: e } = t, r = []; for (let n = 0; n < e.doc.length; ) { let i = t.lineBlockAt(n), s = Kd(e, i.from, i.to); s && r.push(Nc.of(s)), n = (s ? t.lineBlockAt(s.to) : i).to + 1; } - return r.length && t.dispatch({ effects: sM(t.state, r) }), !!r.length; -}, zOe = (t) => { + return r.length && t.dispatch({ effects: aM(t.state, r) }), !!r.length; +}, VOe = (t) => { let e = t.state.field(hf, !1); if (!e || !e.size) return !1; @@ -12477,7 +12477,7 @@ const FOe = (t) => { r.push(Bf.of({ from: n, to: i })); }), t.dispatch({ effects: r }), !0; }; -function VOe(t, e) { +function UOe(t, e) { for (let r = e; ; ) { let n = Kd(t.state, r.from, r.to); if (n && n.to > e.from) @@ -12487,38 +12487,38 @@ function VOe(t, e) { r = t.lineBlockAt(r.from - 1); } } -const UOe = (t) => { +const qOe = (t) => { let e = []; - for (let r of nM(t)) { + for (let r of iM(t)) { let n = Iy(t.state, r.from, r.to); if (n) - e.push(Bf.of(n), L5(t, n, !1)); + e.push(Bf.of(n), R5(t, n, !1)); else { - let i = VOe(t, r); - i && e.push(Nc.of(i), L5(t, i)); + let i = UOe(t, r); + i && e.push(Nc.of(i), R5(t, i)); } } - return e.length > 0 && t.dispatch({ effects: sM(t.state, e) }), !!e.length; -}, qOe = [ - { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: $Oe }, - { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: BOe }, - { key: "Ctrl-Alt-[", run: FOe }, - { key: "Ctrl-Alt-]", run: zOe } -], YOe = { + return e.length > 0 && t.dispatch({ effects: aM(t.state, e) }), !!e.length; +}, YOe = [ + { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: BOe }, + { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: FOe }, + { key: "Ctrl-Alt-[", run: zOe }, + { key: "Ctrl-Alt-]", run: VOe } +], QOe = { placeholderDOM: null, preparePlaceholder: null, placeholderText: "\u2026" -}, aM = /* @__PURE__ */ _t.define({ +}, oM = /* @__PURE__ */ _t.define({ combine(t) { - return Yc(t, YOe); + return Yc(t, QOe); } }); -function QK(t) { - let e = [hf, HOe]; - return t && e.push(aM.of(t)), e; +function WK(t) { + let e = [hf, XOe]; + return t && e.push(oM.of(t)), e; } -function WK(t, e) { - let { state: r } = t, n = r.facet(aM), i = (a) => { +function GK(t, e) { + let { state: r } = t, n = r.facet(oM), i = (a) => { let o = t.lineBlockAt(t.posAtDOM(a.target)), l = Iy(t.state, o.from, o.to); l && t.dispatch({ effects: Bf.of(l) }), a.preventDefault(); }; @@ -12527,12 +12527,12 @@ function WK(t, 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 vF = /* @__PURE__ */ Et.replace({ widget: /* @__PURE__ */ new class extends za { +const yF = /* @__PURE__ */ Et.replace({ widget: /* @__PURE__ */ new class extends za { toDOM(t) { - return WK(t, null); + return GK(t, null); } }() }); -class QOe extends za { +class WOe extends za { constructor(e) { super(), this.value = e; } @@ -12540,17 +12540,17 @@ class QOe extends za { return this.value == e.value; } toDOM(e) { - return WK(e, this.value); + return GK(e, this.value); } } -const WOe = { +const GOe = { openText: "\u2304", closedText: "\u203A", markerDOM: null, domEventHandlers: {}, foldingChanged: () => !1 }; -class RE extends Uo { +class ME extends Uo { constructor(e, r) { super(), this.config = e, this.open = r; } @@ -12564,8 +12564,8 @@ class RE extends Uo { return r.textContent = this.open ? this.config.openText : this.config.closedText, r.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), r; } } -function GOe(t = {}) { - let e = Object.assign(Object.assign({}, WOe), t), r = new RE(e, !0), n = new RE(e, !1), i = on.fromClass(class { +function HOe(t = {}) { + let e = Object.assign(Object.assign({}, GOe), t), r = new ME(e, !0), n = new ME(e, !1), i = on.fromClass(class { constructor(a) { this.from = a.viewport.from, this.markers = this.buildMarkers(a); } @@ -12583,14 +12583,14 @@ function GOe(t = {}) { }), { domEventHandlers: s } = e; return [ i, - FS({ + zS({ class: "cm-foldGutter", markers(a) { var o; return ((o = a.plugin(i)) === null || o === void 0 ? void 0 : o.markers) || Er.empty; }, initialSpacer() { - return new RE(e, !1); + return new ME(e, !1); }, domEventHandlers: Object.assign(Object.assign({}, s), { click: (a, o, l) => { if (s.click && s.click(a, o, l)) @@ -12602,10 +12602,10 @@ function GOe(t = {}) { return h ? (a.dispatch({ effects: Nc.of(h) }), !0) : !1; } }) }), - QK() + WK() ]; } -const HOe = /* @__PURE__ */ ht.baseTheme({ +const XOe = /* @__PURE__ */ ht.baseTheme({ ".cm-foldPlaceholder": { backgroundColor: "#eee", border: "1px solid #ddd", @@ -12620,7 +12620,7 @@ const HOe = /* @__PURE__ */ ht.baseTheme({ cursor: "pointer" } }); -class qS { +class YS { constructor(e, r) { this.specs = e; let n; @@ -12629,7 +12629,7 @@ class qS { 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 no ? (o) => o.prop($h) == a.data : a ? (o) => o == a : void 0, this.style = FK(e.map((o) => ({ + this.scope = a instanceof no ? (o) => o.prop($h) == a.data : a ? (o) => o == a : void 0, this.style = zK(e.map((o) => ({ tag: o.tag, class: o.class || i(Object.assign({}, o, { tag: null })) })), { @@ -12637,28 +12637,28 @@ class qS { }).style, this.module = n ? new Pu(n) : null, this.themeType = r.themeType; } static define(e, r) { - return new qS(e, r || {}); + return new YS(e, r || {}); } } -const O7 = /* @__PURE__ */ _t.define(), GK = /* @__PURE__ */ _t.define({ +const k7 = /* @__PURE__ */ _t.define(), HK = /* @__PURE__ */ _t.define({ combine(t) { return t.length ? [t[0]] : null; } }); -function ME(t) { - let e = t.facet(O7); - return e.length ? e : t.facet(GK); +function DE(t) { + let e = t.facet(k7); + return e.length ? e : t.facet(HK); } -function HK(t, e) { - let r = [ZOe], n; - return t instanceof qS && (t.module && r.push(ht.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(GK.of(t)) : n ? r.push(O7.computeN([ht.darkTheme], (i) => i.facet(ht.darkTheme) == (n == "dark") ? [t] : [])) : r.push(O7.of(t)), r; +function XK(t, e) { + let r = [jOe], n; + return t instanceof YS && (t.module && r.push(ht.styleModule.of(t.module)), n = t.themeType), e != null && e.fallback ? r.push(HK.of(t)) : n ? r.push(k7.computeN([ht.darkTheme], (i) => i.facet(ht.darkTheme) == (n == "dark") ? [t] : [])) : r.push(k7.of(t)), r; } -class XOe { +class ZOe { constructor(e) { - this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Jr(e.state), this.decorations = this.buildDeco(e, ME(e.state)); + this.markCache = /* @__PURE__ */ Object.create(null), this.tree = Jr(e.state), this.decorations = this.buildDeco(e, DE(e.state)); } update(e) { - let r = Jr(e.state), n = ME(e.state), i = n != ME(e.startState); + let r = Jr(e.state), n = DE(e.state), i = n != DE(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) { @@ -12666,15 +12666,15 @@ class XOe { return Et.none; let n = new Hi(); for (let { from: i, to: s } of e.visibleRanges) - yOe(this.tree, r, (a, o, l) => { + bOe(this.tree, r, (a, o, l) => { n.add(a, o, this.markCache[l] || (this.markCache[l] = Et.mark({ class: l }))); }, i, s); return n.finish(); } } -const ZOe = /* @__PURE__ */ zl.high(/* @__PURE__ */ on.fromClass(XOe, { +const jOe = /* @__PURE__ */ zl.high(/* @__PURE__ */ on.fromClass(ZOe, { decorations: (t) => t.decorations -})), XK = /* @__PURE__ */ qS.define([ +})), ZK = /* @__PURE__ */ YS.define([ { tag: Se.meta, color: "#404740" @@ -12752,31 +12752,31 @@ const ZOe = /* @__PURE__ */ zl.high(/* @__PURE__ */ on.fromClass(XOe, { tag: Se.invalid, color: "#f00" } -]), jOe = /* @__PURE__ */ ht.baseTheme({ +]), KOe = /* @__PURE__ */ ht.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } -}), ZK = 1e4, jK = "()[]{}", KK = /* @__PURE__ */ _t.define({ +}), jK = 1e4, KK = "()[]{}", JK = /* @__PURE__ */ _t.define({ combine(t) { return Yc(t, { afterCursor: !0, - brackets: jK, - maxScanDistance: ZK, - renderMatch: e4e + brackets: KK, + maxScanDistance: jK, + renderMatch: t4e }); } -}), KOe = /* @__PURE__ */ Et.mark({ class: "cm-matchingBracket" }), JOe = /* @__PURE__ */ Et.mark({ class: "cm-nonmatchingBracket" }); -function e4e(t) { - let e = [], r = t.matched ? KOe : JOe; +}), JOe = /* @__PURE__ */ Et.mark({ class: "cm-matchingBracket" }), e4e = /* @__PURE__ */ Et.mark({ class: "cm-nonmatchingBracket" }); +function t4e(t) { + let e = [], r = t.matched ? JOe : e4e; 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 t4e = /* @__PURE__ */ $n.define({ +const r4e = /* @__PURE__ */ $n.define({ create() { return Et.none; }, update(t, e) { if (!e.docChanged && !e.selection) return t; - let r = [], n = e.state.facet(KK); + let r = [], n = e.state.facet(JK); for (let i of e.state.selection.ranges) { if (!i.empty) continue; @@ -12786,15 +12786,15 @@ const t4e = /* @__PURE__ */ $n.define({ return Et.set(r, !0); }, provide: (t) => ht.decorations.from(t) -}), r4e = [ - t4e, - jOe +}), n4e = [ + r4e, + KOe ]; -function n4e(t = {}) { - return [KK.of(t), r4e]; +function i4e(t = {}) { + return [JK.of(t), n4e]; } -const JK = /* @__PURE__ */ new or(); -function k7(t, e, r) { +const eJ = /* @__PURE__ */ new or(); +function S7(t, e, r) { let n = t.prop(e < 0 ? or.openedBy : or.closedBy); if (n) return n; @@ -12805,35 +12805,35 @@ function k7(t, e, r) { } return null; } -function S7(t) { - let e = t.type.prop(JK); +function T7(t) { + let e = t.type.prop(eJ); return e ? e(t.node) : t; } function mc(t, e, r, n = {}) { - let i = n.maxScanDistance || ZK, s = n.brackets || jK, a = Jr(t), o = a.resolveInner(e, r); + let i = n.maxScanDistance || jK, s = n.brackets || KK, a = Jr(t), o = a.resolveInner(e, r); for (let l = o; l; l = l.parent) { - let u = k7(l.type, r, s); + let u = S7(l.type, r, s); if (u && l.from < l.to) { - let h = S7(l); + let h = T7(l); if (h && (r > 0 ? e >= h.from && e < h.to : e > h.from && e <= h.to)) - return i4e(t, e, r, l, h, u, s); + return s4e(t, e, r, l, h, u, s); } } - return s4e(t, e, r, a, o.type, i, s); + return a4e(t, e, r, a, o.type, i, s); } -function i4e(t, e, r, n, i, s, a) { +function s4e(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 = S7(h); + let f = T7(h); return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 }; - } else if (k7(h.type, r, a)) + } else if (S7(h.type, r, a)) u++; - else if (k7(h.type, -r, a)) { + else if (S7(h.type, -r, a)) { if (u == 0) { - let f = S7(h); + let f = T7(h); return { start: l, end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0, @@ -12846,7 +12846,7 @@ function i4e(t, e, r, n, i, s, a) { while (r < 0 ? h.prevSibling() : h.nextSibling()); return { start: l, matched: !1 }; } -function s4e(t, e, r, n, i, s, a) { +function a4e(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; @@ -12870,7 +12870,7 @@ function s4e(t, e, r, n, i, s, a) { } return h.done ? { start: u, matched: !1 } : null; } -const a4e = /* @__PURE__ */ Object.create(null), yF = [Li.none], bF = [], xF = /* @__PURE__ */ Object.create(null), o4e = /* @__PURE__ */ Object.create(null); +const o4e = /* @__PURE__ */ Object.create(null), bF = [Li.none], xF = [], wF = /* @__PURE__ */ Object.create(null), l4e = /* @__PURE__ */ Object.create(null); for (let [t, e] of [ ["variable", "variableName"], ["variable-2", "variableName.special"], @@ -12885,38 +12885,38 @@ for (let [t, e] of [ ["header", "heading"], ["property", "propertyName"] ]) - o4e[t] = /* @__PURE__ */ l4e(a4e, e); -function DE(t, e) { - bF.indexOf(t) > -1 || (bF.push(t), console.warn(e)); + l4e[t] = /* @__PURE__ */ c4e(o4e, e); +function NE(t, e) { + xF.indexOf(t) > -1 || (xF.push(t), console.warn(e)); } -function l4e(t, e) { +function c4e(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) : DE(u, `Modifier ${u} used at start of tag`) : l.length ? DE(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : DE(u, `Unknown highlighting tag ${u}`); + h ? typeof h == "function" ? l.length ? l = l.map(h) : NE(u, `Modifier ${u} used at start of tag`) : l.length ? NE(u, `Tag ${u} used as modifier`) : l = Array.isArray(h) ? h : [h] : NE(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 = xF[i]; + let n = e.replace(/ /g, "_"), i = n + " " + r.map((o) => o.id), s = wF[i]; if (s) return s.id; - let a = xF[i] = Li.define({ - id: yF.length, + let a = wF[i] = Li.define({ + id: bF.length, name: n, props: [P1({ [n]: r })] }); - return yF.push(a), a.id; + return bF.push(a), a.id; } -const c4e = (t) => { - let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = lM(t.state, r.from); - return n.line ? u4e(t) : n.block ? f4e(t) : !1; +const u4e = (t) => { + let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = cM(t.state, r.from); + return n.line ? h4e(t) : n.block ? d4e(t) : !1; }; -function oM(t, e) { +function lM(t, e) { return ({ state: r, dispatch: n }) => { if (r.readOnly) return !1; @@ -12924,13 +12924,13 @@ function oM(t, e) { return i ? (n(r.update(i)), !0) : !1; }; } -const u4e = /* @__PURE__ */ oM(g4e, 0), h4e = /* @__PURE__ */ oM(eJ, 0), f4e = /* @__PURE__ */ oM((t, e) => eJ(t, e, p4e(e)), 0); -function lM(t, e) { +const h4e = /* @__PURE__ */ lM(m4e, 0), f4e = /* @__PURE__ */ lM(tJ, 0), d4e = /* @__PURE__ */ lM((t, e) => tJ(t, e, g4e(e)), 0); +function cM(t, e) { let r = t.languageDataAt("commentTokens", e); return r.length ? r[0] : {}; } const Dm = 50; -function d4e(t, { open: e, close: r }, n, i) { +function p4e(t, { open: e, close: r }, n, i) { let s = t.sliceDoc(n - Dm, n), a = t.sliceDoc(i, i + Dm), 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 { @@ -12951,7 +12951,7 @@ function d4e(t, { open: e, close: r }, n, i) { } } : null; } -function p4e(t) { +function g4e(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; @@ -12959,11 +12959,11 @@ function p4e(t) { } return e; } -function eJ(t, e, r = e.selection.ranges) { - let n = r.map((s) => lM(e, s.from).block); +function tJ(t, e, r = e.selection.ranges) { + let n = r.map((s) => cM(e, s.from).block); if (!n.every((s) => s)) return null; - let i = r.map((s, a) => d4e(e, n[a], s.from, s.to)); + let i = r.map((s, a) => p4e(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)) { @@ -12977,10 +12977,10 @@ function eJ(t, e, r = e.selection.ranges) { } return null; } -function g4e(t, e, r = e.selection.ranges) { +function m4e(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 = lM(e, s).line; + let o = n.length, l = 1e9, u = cM(e, s).line; if (!!u) { for (let h = s; h <= a; ) { let f = e.doc.lineAt(h); @@ -13014,7 +13014,7 @@ function g4e(t, e, r = e.selection.ranges) { } return null; } -const T7 = /* @__PURE__ */ Vl.define(), m4e = /* @__PURE__ */ Vl.define(), v4e = /* @__PURE__ */ _t.define(), tJ = /* @__PURE__ */ _t.define({ +const C7 = /* @__PURE__ */ Vl.define(), v4e = /* @__PURE__ */ Vl.define(), y4e = /* @__PURE__ */ _t.define(), rJ = /* @__PURE__ */ _t.define({ combine(t) { return Yc(t, { minDepth: 100, @@ -13026,17 +13026,17 @@ const T7 = /* @__PURE__ */ Vl.define(), m4e = /* @__PURE__ */ Vl.define(), v4e = joinToEvent: (e, r) => (n, i) => e(n, i) || r(n, i) }); } -}), rJ = /* @__PURE__ */ $n.define({ +}), nJ = /* @__PURE__ */ $n.define({ create() { return vc.empty; }, update(t, e) { - let r = e.state.facet(tJ), n = e.annotation(T7); + let r = e.state.facet(rJ), n = e.annotation(C7); if (n) { let l = Ma.fromTransaction(e, n.selection), u = n.side, h = u == 0 ? t.undone : t.done; - return l ? h = M5(h, h.length, r.minDepth, l) : h = sJ(h, e.startState.selection), new vc(u == 0 ? n.rest : h, u == 0 ? h : n.rest); + return l ? h = D5(h, h.length, r.minDepth, l) : h = aJ(h, e.startState.selection), new vc(u == 0 ? n.rest : h, u == 0 ? h : n.rest); } - let i = e.annotation(m4e); + let i = e.annotation(v4e); if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(fi.addToHistory) === !1) return e.changes.empty ? t : t.addMapping(e.changes.desc); let s = Ma.fromTransaction(e), a = e.annotation(fi.time), o = e.annotation(fi.userEvent); @@ -13049,30 +13049,30 @@ const T7 = /* @__PURE__ */ Vl.define(), m4e = /* @__PURE__ */ Vl.define(), v4e = return new vc(t.done.map(Ma.fromJSON), t.undone.map(Ma.fromJSON)); } }); -function cM(t = {}) { +function uM(t = {}) { return [ - rJ, - tJ.of(t), + nJ, + rJ.of(t), ht.domEventHandlers({ beforeinput(e, r) { - let n = e.inputType == "historyUndo" ? nJ : e.inputType == "historyRedo" ? R5 : null; + let n = e.inputType == "historyUndo" ? iJ : e.inputType == "historyRedo" ? M5 : null; return n ? (e.preventDefault(), n(r)) : !1; } }) ]; } -function YS(t, e) { +function QS(t, e) { return function({ state: r, dispatch: n }) { if (!e && r.readOnly) return !1; - let i = r.field(rJ, !1); + let i = r.field(nJ, !1); if (!i) return !1; let s = i.pop(t, r, e); return s ? (n(s), !0) : !1; }; } -const nJ = /* @__PURE__ */ YS(0, !1), R5 = /* @__PURE__ */ YS(1, !1), y4e = /* @__PURE__ */ YS(0, !0), b4e = /* @__PURE__ */ YS(1, !0); +const iJ = /* @__PURE__ */ QS(0, !1), M5 = /* @__PURE__ */ QS(1, !1), b4e = /* @__PURE__ */ QS(0, !0), x4e = /* @__PURE__ */ QS(1, !0); class Ma { constructor(e, r, n, i, s) { this.changes = e, this.effects = r, this.mapped = n, this.startSelection = i, this.selectionsAfter = s; @@ -13094,7 +13094,7 @@ class Ma { } static fromTransaction(e, r) { let n = Do; - for (let i of e.startState.facet(v4e)) { + for (let i of e.startState.facet(y4e)) { let s = i(e); s.length && (n = n.concat(s)); } @@ -13104,11 +13104,11 @@ class Ma { return new Ma(void 0, Do, void 0, void 0, e); } } -function M5(t, e, r, n) { +function D5(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 x4e(t, e) { +function w4e(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; ) { @@ -13117,30 +13117,30 @@ function x4e(t, e) { } }), n; } -function w4e(t, e) { +function O4e(t, e) { return t.ranges.length == e.ranges.length && t.ranges.filter((r, n) => r.empty != e.ranges[n].empty).length === 0; } -function iJ(t, e) { +function sJ(t, e) { return t.length ? e.length ? t.concat(e) : t : e; } -const Do = [], O4e = 200; -function sJ(t, e) { +const Do = [], k4e = 200; +function aJ(t, e) { if (t.length) { - let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - O4e)); - return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), M5(t, t.length - 1, 1e9, r.setSelAfter(n))); + let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - k4e)); + return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), D5(t, t.length - 1, 1e9, r.setSelAfter(n))); } else return [Ma.selection([e])]; } -function k4e(t) { +function S4e(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 NE(t, e) { +function IE(t, e) { if (!t.length) return t; let r = t.length, n = Do; for (; r; ) { - let i = S4e(t[r - 1], e, n); + let i = T4e(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; @@ -13149,14 +13149,14 @@ function NE(t, e) { } return n.length ? [Ma.selection(n)] : Do; } -function S4e(t, e, r) { - let n = iJ(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : Do, r); +function T4e(t, e, r) { + let n = sJ(t.selectionsAfter.length ? t.selectionsAfter.map((o) => o.map(e)) : Do, r); if (!t.changes) return Ma.selection(n); let i = t.changes.map(e), s = e.mapDesc(t.changes, !0), a = t.mapped ? t.mapped.composeDesc(s) : s; return new Ma(i, Zt.mapEffects(t.effects, e), a, t.startSelection.map(s), n); } -const T4e = /^(input\.type|delete)($|\.)/; +const C4e = /^(input\.type|delete)($|\.)/; class vc { constructor(e, r, n = 0, i = void 0) { this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = i; @@ -13166,14 +13166,14 @@ class vc { } 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 || T4e.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, x4e(o.changes, e.changes)) || n == "input.type.compose") ? a = M5(a, a.length - 1, i.minDepth, new Ma(e.changes.compose(o.changes), iJ(e.effects, o.effects), o.mapped, o.startSelection, Do)) : a = M5(a, a.length, i.minDepth, e), new vc(a, Do, r, n); + return o && o.changes && !o.changes.empty && e.changes && (!n || C4e.test(n)) && (!o.selectionsAfter.length && r - this.prevTime < i.newGroupDelay && i.joinToEvent(s, w4e(o.changes, e.changes)) || n == "input.type.compose") ? a = D5(a, a.length - 1, i.minDepth, new Ma(e.changes.compose(o.changes), sJ(e.effects, o.effects), o.mapped, o.startSelection, Do)) : a = D5(a, a.length, i.minDepth, e), new vc(a, Do, r, n); } addSelection(e, r, n, i) { let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Do; - return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && w4e(s[s.length - 1], e) ? this : new vc(sJ(this.done, e), this.undone, r, n); + return s.length > 0 && r - this.prevTime < i && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && O4e(s[s.length - 1], e) ? this : new vc(aJ(this.done, e), this.undone, r, n); } addMapping(e) { - return new vc(NE(this.done, e), NE(this.undone, e), this.prevTime, this.prevUserEvent); + return new vc(IE(this.done, e), IE(this.undone, e), this.prevTime, this.prevUserEvent); } pop(e, r, n) { let i = e == 0 ? this.done : this.undone; @@ -13183,17 +13183,17 @@ class vc { if (n && s.selectionsAfter.length) return r.update({ selection: s.selectionsAfter[s.selectionsAfter.length - 1], - annotations: T7.of({ side: e, rest: k4e(i), selection: a }), + annotations: C7.of({ side: e, rest: S4e(i), selection: a }), userEvent: e == 0 ? "select.undo" : "select.redo", scrollIntoView: !0 }); if (s.changes) { let o = i.length == 1 ? Do : i.slice(0, i.length - 1); - return s.mapped && (o = NE(o, s.mapped)), r.update({ + return s.mapped && (o = IE(o, s.mapped)), r.update({ changes: s.changes, selection: s.startSelection, effects: s.effects, - annotations: T7.of({ side: e, rest: o, selection: a }), + annotations: C7.of({ side: e, rest: o, selection: a }), filter: !1, userEvent: e == 0 ? "undo" : "redo", scrollIntoView: !0 @@ -13203,12 +13203,12 @@ class vc { } } vc.empty = /* @__PURE__ */ new vc(Do, Do); -const aJ = [ - { key: "Mod-z", run: nJ, preventDefault: !0 }, - { key: "Mod-y", mac: "Mod-Shift-z", run: R5, preventDefault: !0 }, - { linux: "Ctrl-Shift-z", run: R5, preventDefault: !0 }, - { key: "Mod-u", run: y4e, preventDefault: !0 }, - { key: "Alt-u", mac: "Mod-Shift-u", run: b4e, preventDefault: !0 } +const oJ = [ + { key: "Mod-z", run: iJ, preventDefault: !0 }, + { key: "Mod-y", mac: "Mod-Shift-z", run: M5, preventDefault: !0 }, + { linux: "Ctrl-Shift-z", run: M5, preventDefault: !0 }, + { key: "Mod-u", run: b4e, preventDefault: !0 }, + { key: "Alt-u", mac: "Mod-Shift-u", run: x4e, preventDefault: !0 } ]; function B1(t, e) { return Ve.create(t.ranges.map(e), t.mainIndex); @@ -13220,48 +13220,48 @@ function Ul({ state: t, dispatch: e }, r) { let n = B1(t.selection, r); return n.eq(t.selection) ? !1 : (e(Qc(t, n)), !0); } -function QS(t, e) { +function WS(t, e) { return Ve.cursor(e ? t.to : t.from); } -function oJ(t, e) { - return Ul(t, (r) => r.empty ? t.moveByChar(r, e) : QS(r, e)); +function lJ(t, e) { + return Ul(t, (r) => r.empty ? t.moveByChar(r, e) : WS(r, e)); } function Us(t) { return t.textDirectionAt(t.state.selection.main.head) == In.LTR; } -const lJ = (t) => oJ(t, !Us(t)), cJ = (t) => oJ(t, Us(t)); -function uJ(t, e) { - return Ul(t, (r) => r.empty ? t.moveByGroup(r, e) : QS(r, e)); +const cJ = (t) => lJ(t, !Us(t)), uJ = (t) => lJ(t, Us(t)); +function hJ(t, e) { + return Ul(t, (r) => r.empty ? t.moveByGroup(r, e) : WS(r, e)); } -const C4e = (t) => uJ(t, !Us(t)), E4e = (t) => uJ(t, Us(t)); -function _4e(t, e, r) { +const E4e = (t) => hJ(t, !Us(t)), _4e = (t) => hJ(t, Us(t)); +function A4e(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 WS(t, e, r) { +function GS(t, e, r) { let n = Jr(t).resolveInner(e.head), i = r ? or.closedBy : or.openedBy; for (let l = e.head; ; ) { let u = r ? n.childAfter(l) : n.childBefore(l); if (!u) break; - _4e(t, u, i) ? n = u : l = r ? u.to : u.from; + A4e(t, u, i) ? n = u : l = r ? u.to : u.from; } let s = n.type.prop(i), a, o; return s && (a = r ? mc(t, n.from, 1) : mc(t, n.to, -1)) && a.matched ? o = r ? a.end.to : a.end.from : o = r ? n.to : n.from, Ve.cursor(o, r ? -1 : 1); } -const A4e = (t) => Ul(t, (e) => WS(t.state, e, !Us(t))), L4e = (t) => Ul(t, (e) => WS(t.state, e, Us(t))); -function hJ(t, e) { +const L4e = (t) => Ul(t, (e) => GS(t.state, e, !Us(t))), R4e = (t) => Ul(t, (e) => GS(t.state, e, Us(t))); +function fJ(t, e) { return Ul(t, (r) => { if (!r.empty) - return QS(r, e); + return WS(r, e); let n = t.moveVertically(r, e); return n.head != r.head ? n : t.moveToLineBoundary(r, e); }); } -const fJ = (t) => hJ(t, !1), dJ = (t) => hJ(t, !0); -function pJ(t) { +const dJ = (t) => fJ(t, !1), pJ = (t) => fJ(t, !0); +function gJ(t) { let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, r = 0, n = 0, i; if (e) { for (let s of t.state.facet(ht.scrollMargins)) { @@ -13278,8 +13278,8 @@ function pJ(t) { height: Math.max(t.defaultLineHeight, i - 5) }; } -function gJ(t, e) { - let r = pJ(t), { state: n } = t, i = B1(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : QS(a, e)); +function mJ(t, e) { + let r = gJ(t), { state: n } = t, i = B1(n.selection, (a) => a.empty ? t.moveVertically(a, e, r.height) : WS(a, e)); if (i.eq(n.selection)) return !1; let s; @@ -13289,7 +13289,7 @@ function gJ(t, e) { } return t.dispatch(Qc(n, i), { effects: s }), !0; } -const wF = (t) => gJ(t, !1), C7 = (t) => gJ(t, !0); +const OF = (t) => mJ(t, !1), E7 = (t) => mJ(t, !0); function Ff(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) { @@ -13298,8 +13298,8 @@ function Ff(t, e, r) { } return i; } -const R4e = (t) => Ul(t, (e) => Ff(t, e, !0)), M4e = (t) => Ul(t, (e) => Ff(t, e, !1)), D4e = (t) => Ul(t, (e) => Ff(t, e, !Us(t))), N4e = (t) => Ul(t, (e) => Ff(t, e, Us(t))), I4e = (t) => Ul(t, (e) => Ve.cursor(t.lineBlockAt(e.head).from, 1)), P4e = (t) => Ul(t, (e) => Ve.cursor(t.lineBlockAt(e.head).to, -1)); -function $4e(t, e, r) { +const M4e = (t) => Ul(t, (e) => Ff(t, e, !0)), D4e = (t) => Ul(t, (e) => Ff(t, e, !1)), N4e = (t) => Ul(t, (e) => Ff(t, e, !Us(t))), I4e = (t) => Ul(t, (e) => Ff(t, e, Us(t))), P4e = (t) => Ul(t, (e) => Ve.cursor(t.lineBlockAt(e.head).from, 1)), $4e = (t) => Ul(t, (e) => Ve.cursor(t.lineBlockAt(e.head).to, -1)); +function B4e(t, e, r) { let n = !1, i = B1(t.selection, (s) => { let a = mc(t, s.head, -1) || mc(t, s.head, 1) || s.head > 0 && mc(t, s.head - 1, 1) || s.head < t.doc.length && mc(t, s.head + 1, -1); if (!a || !a.end) @@ -13310,7 +13310,7 @@ function $4e(t, e, r) { }); return n ? (e(Qc(t, i)), !0) : !1; } -const B4e = ({ state: t, dispatch: e }) => $4e(t, e, !1); +const F4e = ({ state: t, dispatch: e }) => B4e(t, e, !1); function tl(t, e) { let r = B1(t.state.selection, (n) => { let i = e(n); @@ -13318,25 +13318,25 @@ function tl(t, e) { }); return r.eq(t.state.selection) ? !1 : (t.dispatch(Qc(t.state, r)), !0); } -function mJ(t, e) { +function vJ(t, e) { return tl(t, (r) => t.moveByChar(r, e)); } -const vJ = (t) => mJ(t, !Us(t)), yJ = (t) => mJ(t, Us(t)); -function bJ(t, e) { +const yJ = (t) => vJ(t, !Us(t)), bJ = (t) => vJ(t, Us(t)); +function xJ(t, e) { return tl(t, (r) => t.moveByGroup(r, e)); } -const F4e = (t) => bJ(t, !Us(t)), z4e = (t) => bJ(t, Us(t)), V4e = (t) => tl(t, (e) => WS(t.state, e, !Us(t))), U4e = (t) => tl(t, (e) => WS(t.state, e, Us(t))); -function xJ(t, e) { +const z4e = (t) => xJ(t, !Us(t)), V4e = (t) => xJ(t, Us(t)), U4e = (t) => tl(t, (e) => GS(t.state, e, !Us(t))), q4e = (t) => tl(t, (e) => GS(t.state, e, Us(t))); +function wJ(t, e) { return tl(t, (r) => t.moveVertically(r, e)); } -const wJ = (t) => xJ(t, !1), OJ = (t) => xJ(t, !0); -function kJ(t, e) { - return tl(t, (r) => t.moveVertically(r, e, pJ(t).height)); +const OJ = (t) => wJ(t, !1), kJ = (t) => wJ(t, !0); +function SJ(t, e) { + return tl(t, (r) => t.moveVertically(r, e, gJ(t).height)); } -const OF = (t) => kJ(t, !1), kF = (t) => kJ(t, !0), q4e = (t) => tl(t, (e) => Ff(t, e, !0)), Y4e = (t) => tl(t, (e) => Ff(t, e, !1)), Q4e = (t) => tl(t, (e) => Ff(t, e, !Us(t))), W4e = (t) => tl(t, (e) => Ff(t, e, Us(t))), G4e = (t) => tl(t, (e) => Ve.cursor(t.lineBlockAt(e.head).from)), H4e = (t) => tl(t, (e) => Ve.cursor(t.lineBlockAt(e.head).to)), SF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: 0 })), !0), TF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.doc.length })), !0), CF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.selection.main.anchor, head: 0 })), !0), EF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), X4e = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Z4e = ({ state: t, dispatch: e }) => { - let r = GS(t).map(({ from: n, to: i }) => Ve.range(n, Math.min(i + 1, t.doc.length))); +const kF = (t) => SJ(t, !1), SF = (t) => SJ(t, !0), Y4e = (t) => tl(t, (e) => Ff(t, e, !0)), Q4e = (t) => tl(t, (e) => Ff(t, e, !1)), W4e = (t) => tl(t, (e) => Ff(t, e, !Us(t))), G4e = (t) => tl(t, (e) => Ff(t, e, Us(t))), H4e = (t) => tl(t, (e) => Ve.cursor(t.lineBlockAt(e.head).from)), X4e = (t) => tl(t, (e) => Ve.cursor(t.lineBlockAt(e.head).to)), TF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: 0 })), !0), CF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.doc.length })), !0), EF = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.selection.main.anchor, head: 0 })), !0), _F = ({ state: t, dispatch: e }) => (e(Qc(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Z4e = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), j4e = ({ state: t, dispatch: e }) => { + let r = HS(t).map(({ from: n, to: i }) => Ve.range(n, Math.min(i + 1, t.doc.length))); return e(t.update({ selection: Ve.create(r), userEvent: "select" })), !0; -}, j4e = ({ state: t, dispatch: e }) => { +}, K4e = ({ state: t, dispatch: e }) => { let r = B1(t.selection, (n) => { var i; let s = Jr(t).resolveStack(n.from, 1); @@ -13348,7 +13348,7 @@ const OF = (t) => kJ(t, !1), kF = (t) => kJ(t, !0), q4e = (t) => tl(t, (e) => Ff return n; }); return e(Qc(t, r)), !0; -}, K4e = ({ state: t, dispatch: e }) => { +}, J4e = ({ state: t, dispatch: e }) => { let r = t.selection, n = null; return r.ranges.length > 1 ? n = Ve.create([r.main]) : r.main.empty || (n = Ve.create([Ve.cursor(r.main.head)])), n ? (e(Qc(t, n)), !0) : !1; }; @@ -13378,19 +13378,19 @@ function Ew(t, e, r) { }); return e; } -const SJ = (t, e) => Zb(t, (r) => { +const TJ = (t, e) => Zb(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] == " ") return n - 1; - let l = Ml(a, i.tabSize), u = l % A5(i) || A5(i); + let l = Ml(a, i.tabSize), u = l % L5(i) || L5(i); for (let h = 0; h < u && a[a.length - 1 - h] == " "; h++) n--; o = n; } else o = ls(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 = ls(s.text, o - s.from, !1, !1) + s.from); return o; -}), E7 = (t) => SJ(t, !1), TJ = (t) => SJ(t, !0), CJ = (t, e) => Zb(t, (r) => { +}), _7 = (t) => TJ(t, !1), CJ = (t) => TJ(t, !0), EJ = (t, e) => Zb(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)) { @@ -13403,16 +13403,16 @@ const SJ = (t, e) => Zb(t, (r) => { (u != " " || n != r.head) && (o = h), n = l; } return n; -}), EJ = (t) => CJ(t, !1), J4e = (t) => CJ(t, !0), e5e = (t) => Zb(t, (e) => { +}), _J = (t) => EJ(t, !1), e5e = (t) => EJ(t, !0), t5e = (t) => Zb(t, (e) => { let r = t.lineBlockAt(e.head).to; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), t5e = (t) => Zb(t, (e) => { +}), r5e = (t) => Zb(t, (e) => { let r = t.moveToLineBoundary(e, !1).head; return e.head > r ? r : Math.max(0, e.head - 1); -}), r5e = (t) => Zb(t, (e) => { +}), n5e = (t) => Zb(t, (e) => { let r = t.moveToLineBoundary(e, !0).head; return e.head < r ? r : Math.min(t.state.doc.length, e.head + 1); -}), n5e = ({ state: t, dispatch: e }) => { +}), i5e = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => ({ @@ -13420,7 +13420,7 @@ const SJ = (t, e) => Zb(t, (r) => { range: Ve.cursor(n.from) })); return e(t.update(r, { scrollIntoView: !0, userEvent: "input" })), !0; -}, i5e = ({ state: t, dispatch: e }) => { +}, s5e = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; let r = t.changeByRange((n) => { @@ -13434,7 +13434,7 @@ const SJ = (t, e) => Zb(t, (r) => { }); return r.changes.empty ? !1 : (e(t.update(r, { scrollIntoView: !0, userEvent: "move.character" })), !0); }; -function GS(t) { +function HS(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); @@ -13447,11 +13447,11 @@ function GS(t) { } return e; } -function _J(t, e, r) { +function AJ(t, e, r) { if (t.readOnly) return !1; let n = [], i = []; - for (let s of GS(t)) { + for (let s of HS(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; @@ -13472,36 +13472,36 @@ function _J(t, e, r) { userEvent: "move.line" })), !0) : !1; } -const s5e = ({ state: t, dispatch: e }) => _J(t, e, !1), a5e = ({ state: t, dispatch: e }) => _J(t, e, !0); -function AJ(t, e, r) { +const a5e = ({ state: t, dispatch: e }) => AJ(t, e, !1), o5e = ({ state: t, dispatch: e }) => AJ(t, e, !0); +function LJ(t, e, r) { if (t.readOnly) return !1; let n = []; - for (let i of GS(t)) + for (let i of HS(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 o5e = ({ state: t, dispatch: e }) => AJ(t, e, !1), l5e = ({ state: t, dispatch: e }) => AJ(t, e, !0), c5e = (t) => { +const l5e = ({ state: t, dispatch: e }) => LJ(t, e, !1), c5e = ({ state: t, dispatch: e }) => LJ(t, e, !0), u5e = (t) => { if (t.state.readOnly) return !1; - let { state: e } = t, r = e.changes(GS(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(HS(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); return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0; }; -function u5e(t, e) { +function h5e(t, e) { if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1))) return { from: e, to: e }; let r = Jr(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(or.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 h5e = /* @__PURE__ */ LJ(!1), f5e = /* @__PURE__ */ LJ(!0); -function LJ(t) { +const f5e = /* @__PURE__ */ RJ(!1), d5e = /* @__PURE__ */ RJ(!0); +function RJ(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 && u5e(e, s); + let { from: s, to: a } = i, o = e.doc.lineAt(s), l = !t && s == a && h5e(e, s); t && (s = a = (a <= o.to ? o : e.doc.lineAt(a)).to); - let u = new VS(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = tM(u, s); + let u = new US(e, { simulateBreak: s, simulateDoubleBreak: !!l }), h = rM(u, s); for (h == null && (h = Ml(/^\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); @@ -13514,7 +13514,7 @@ function LJ(t) { return r(e.update(n, { scrollIntoView: !0, userEvent: "input" })), !0; }; } -function uM(t, e) { +function hM(t, e) { let r = -1; return t.changeByRange((n) => { let i = []; @@ -13529,14 +13529,14 @@ function uM(t, e) { }; }); } -const d5e = ({ state: t, dispatch: e }) => { +const p5e = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; - let r = /* @__PURE__ */ Object.create(null), n = new VS(t, { overrideIndentation: (s) => { + let r = /* @__PURE__ */ Object.create(null), n = new US(t, { overrideIndentation: (s) => { let a = r[s]; return a == null ? -1 : a; - } }), i = uM(t, (s, a, o) => { - let l = tM(n, s.from); + } }), i = hM(t, (s, a, o) => { + let l = rM(n, s.from); if (l == null) return; /\S/.test(s.text) || (l = 0); @@ -13544,76 +13544,76 @@ const d5e = ({ 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; -}, RJ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(uM(t, (r, n) => { +}, MJ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(hM(t, (r, n) => { n.push({ from: r.from, insert: t.facet(Xb) }); -}), { userEvent: "input.indent" })), !0), MJ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(uM(t, (r, n) => { +}), { userEvent: "input.indent" })), !0), DJ = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(hM(t, (r, n) => { let i = /^\s*/.exec(r.text)[0]; if (!i) return; - let s = Ml(i, t.tabSize), a = 0, o = Ny(t, Math.max(0, s - A5(t))); + let s = Ml(i, t.tabSize), a = 0, o = Ny(t, Math.max(0, s - L5(t))); 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), p5e = [ - { key: "Ctrl-b", run: lJ, shift: vJ, preventDefault: !0 }, - { key: "Ctrl-f", run: cJ, shift: yJ }, - { key: "Ctrl-p", run: fJ, shift: wJ }, - { key: "Ctrl-n", run: dJ, shift: OJ }, - { key: "Ctrl-a", run: I4e, shift: G4e }, - { key: "Ctrl-e", run: P4e, shift: H4e }, - { key: "Ctrl-d", run: TJ }, - { key: "Ctrl-h", run: E7 }, - { key: "Ctrl-k", run: e5e }, - { key: "Ctrl-Alt-h", run: EJ }, - { key: "Ctrl-o", run: n5e }, - { key: "Ctrl-t", run: i5e }, - { key: "Ctrl-v", run: C7 } -], g5e = /* @__PURE__ */ [ - { key: "ArrowLeft", run: lJ, shift: vJ, preventDefault: !0 }, - { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: C4e, shift: F4e, preventDefault: !0 }, - { mac: "Cmd-ArrowLeft", run: D4e, shift: Q4e, preventDefault: !0 }, - { key: "ArrowRight", run: cJ, shift: yJ, preventDefault: !0 }, - { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: E4e, shift: z4e, preventDefault: !0 }, - { mac: "Cmd-ArrowRight", run: N4e, shift: W4e, preventDefault: !0 }, - { key: "ArrowUp", run: fJ, shift: wJ, preventDefault: !0 }, - { mac: "Cmd-ArrowUp", run: SF, shift: CF }, - { mac: "Ctrl-ArrowUp", run: wF, shift: OF }, - { key: "ArrowDown", run: dJ, shift: OJ, preventDefault: !0 }, - { mac: "Cmd-ArrowDown", run: TF, shift: EF }, - { mac: "Ctrl-ArrowDown", run: C7, shift: kF }, - { key: "PageUp", run: wF, shift: OF }, - { key: "PageDown", run: C7, shift: kF }, - { key: "Home", run: M4e, shift: Y4e, preventDefault: !0 }, - { key: "Mod-Home", run: SF, shift: CF }, - { key: "End", run: R4e, shift: q4e, preventDefault: !0 }, - { key: "Mod-End", run: TF, shift: EF }, - { key: "Enter", run: h5e }, - { key: "Mod-a", run: X4e }, - { key: "Backspace", run: E7, shift: E7 }, - { key: "Delete", run: TJ }, - { key: "Mod-Backspace", mac: "Alt-Backspace", run: EJ }, - { key: "Mod-Delete", mac: "Alt-Delete", run: J4e }, - { mac: "Mod-Backspace", run: t5e }, - { mac: "Mod-Delete", run: r5e } -].concat(/* @__PURE__ */ p5e.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), DJ = /* @__PURE__ */ [ - { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: A4e, shift: V4e }, - { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: L4e, shift: U4e }, - { key: "Alt-ArrowUp", run: s5e }, - { key: "Shift-Alt-ArrowUp", run: o5e }, - { key: "Alt-ArrowDown", run: a5e }, - { key: "Shift-Alt-ArrowDown", run: l5e }, - { key: "Escape", run: K4e }, - { key: "Mod-Enter", run: f5e }, - { key: "Alt-l", mac: "Ctrl-l", run: Z4e }, - { key: "Mod-i", run: j4e, preventDefault: !0 }, - { key: "Mod-[", run: MJ }, - { key: "Mod-]", run: RJ }, - { key: "Mod-Alt-\\", run: d5e }, - { key: "Shift-Mod-k", run: c5e }, - { key: "Shift-Mod-\\", run: B4e }, - { key: "Mod-/", run: c4e }, - { key: "Alt-A", run: h4e } -].concat(g5e), m5e = { key: "Tab", run: RJ, shift: MJ }; +}), { userEvent: "delete.dedent" })), !0), g5e = [ + { key: "Ctrl-b", run: cJ, shift: yJ, preventDefault: !0 }, + { key: "Ctrl-f", run: uJ, shift: bJ }, + { key: "Ctrl-p", run: dJ, shift: OJ }, + { key: "Ctrl-n", run: pJ, shift: kJ }, + { key: "Ctrl-a", run: P4e, shift: H4e }, + { key: "Ctrl-e", run: $4e, shift: X4e }, + { key: "Ctrl-d", run: CJ }, + { key: "Ctrl-h", run: _7 }, + { key: "Ctrl-k", run: t5e }, + { key: "Ctrl-Alt-h", run: _J }, + { key: "Ctrl-o", run: i5e }, + { key: "Ctrl-t", run: s5e }, + { key: "Ctrl-v", run: E7 } +], m5e = /* @__PURE__ */ [ + { key: "ArrowLeft", run: cJ, shift: yJ, preventDefault: !0 }, + { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: E4e, shift: z4e, preventDefault: !0 }, + { mac: "Cmd-ArrowLeft", run: N4e, shift: W4e, preventDefault: !0 }, + { key: "ArrowRight", run: uJ, shift: bJ, preventDefault: !0 }, + { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: _4e, shift: V4e, preventDefault: !0 }, + { mac: "Cmd-ArrowRight", run: I4e, shift: G4e, preventDefault: !0 }, + { key: "ArrowUp", run: dJ, shift: OJ, preventDefault: !0 }, + { mac: "Cmd-ArrowUp", run: TF, shift: EF }, + { mac: "Ctrl-ArrowUp", run: OF, shift: kF }, + { key: "ArrowDown", run: pJ, shift: kJ, preventDefault: !0 }, + { mac: "Cmd-ArrowDown", run: CF, shift: _F }, + { mac: "Ctrl-ArrowDown", run: E7, shift: SF }, + { key: "PageUp", run: OF, shift: kF }, + { key: "PageDown", run: E7, shift: SF }, + { key: "Home", run: D4e, shift: Q4e, preventDefault: !0 }, + { key: "Mod-Home", run: TF, shift: EF }, + { key: "End", run: M4e, shift: Y4e, preventDefault: !0 }, + { key: "Mod-End", run: CF, shift: _F }, + { key: "Enter", run: f5e }, + { key: "Mod-a", run: Z4e }, + { key: "Backspace", run: _7, shift: _7 }, + { key: "Delete", run: CJ }, + { key: "Mod-Backspace", mac: "Alt-Backspace", run: _J }, + { key: "Mod-Delete", mac: "Alt-Delete", run: e5e }, + { mac: "Mod-Backspace", run: r5e }, + { mac: "Mod-Delete", run: n5e } +].concat(/* @__PURE__ */ g5e.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), NJ = /* @__PURE__ */ [ + { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: L4e, shift: U4e }, + { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: R4e, shift: q4e }, + { key: "Alt-ArrowUp", run: a5e }, + { key: "Shift-Alt-ArrowUp", run: l5e }, + { key: "Alt-ArrowDown", run: o5e }, + { key: "Shift-Alt-ArrowDown", run: c5e }, + { key: "Escape", run: J4e }, + { key: "Mod-Enter", run: d5e }, + { key: "Alt-l", mac: "Ctrl-l", run: j4e }, + { key: "Mod-i", run: K4e, preventDefault: !0 }, + { key: "Mod-[", run: DJ }, + { key: "Mod-]", run: MJ }, + { key: "Mod-Alt-\\", run: p5e }, + { key: "Shift-Mod-k", run: u5e }, + { key: "Shift-Mod-\\", run: F4e }, + { key: "Mod-/", run: u4e }, + { key: "Alt-A", run: f4e } +].concat(m5e), v5e = { key: "Tab", run: MJ, shift: DJ }; function un() { var t = arguments[0]; typeof t == "string" && (t = document.createElement(t)); @@ -13627,10 +13627,10 @@ function un() { e++; } for (; e < arguments.length; e++) - NJ(t, arguments[e]); + IJ(t, arguments[e]); return t; } -function NJ(t, e) { +function IJ(t, e) { if (typeof e == "string") t.appendChild(document.createTextNode(e)); else if (e != null) @@ -13638,14 +13638,14 @@ function NJ(t, e) { t.appendChild(e); else if (Array.isArray(e)) for (var r = 0; r < e.length; r++) - NJ(t, e[r]); + IJ(t, e[r]); else throw new RangeError("Unsupported child node: " + e); } -const _F = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; +const AF = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t; class Mg { 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(_F(o)) : _F, 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(AF(o)) : AF, this.query = this.normalize(r); } peek() { if (this.bufferPos == this.buffer.length) { @@ -13665,7 +13665,7 @@ class Mg { let e = this.peek(); if (e < 0) return this.done = !0, this; - let r = BR(e), n = this.bufferStart + this.bufferPos; + let r = FR(e), n = this.bufferStart + this.bufferPos; this.bufferPos += _o(e); let i = this.normalize(r); for (let s = 0, a = n; ; s++) { @@ -13691,14 +13691,14 @@ class Mg { typeof Symbol < "u" && (Mg.prototype[Symbol.iterator] = function() { return this; }); -const IJ = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, hM = "gm" + (/x/.unicode == null ? "" : "u"); -class PJ { +const PJ = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, fM = "gm" + (/x/.unicode == null ? "" : "u"); +class $J { constructor(e, r, n, i = 0, s = e.length) { - if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = IJ, /\\[sWDnr]|\n|\r|\[\^/.test(r)) - return new $J(e, r, n, i, s); - this.re = new RegExp(r, hM + (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 = PJ, /\\[sWDnr]|\n|\r|\[\^/.test(r)) + return new BJ(e, r, n, i, s); + this.re = new RegExp(r, fM + (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 = D5(e, i), this.getLine(this.curLineStart); + this.curLineStart = a.from, this.matchPos = N5(e, i), this.getLine(this.curLineStart); } getLine(e) { this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next()); @@ -13712,7 +13712,7 @@ class PJ { let r = this.matchPos <= this.to && this.re.exec(this.curLine); if (r) { let n = this.curLineStart + r.index, i = n + r[0].length; - if (this.matchPos = D5(this.text, i + (n == i ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < i || n > this.value.to) && (!this.test || this.test(n, i, r))) + if (this.matchPos = N5(this.text, i + (n == i ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < i || n > this.value.to) && (!this.test || this.test(n, i, r))) return this.value = { from: n, to: i, match: r }, this; e = this.matchPos - this.curLineStart; } else if (this.curLineStart + this.curLine.length < this.to) @@ -13722,7 +13722,7 @@ class PJ { } } } -const IE = /* @__PURE__ */ new WeakMap(); +const PE = /* @__PURE__ */ new WeakMap(); class Zp { constructor(e, r) { this.from = e, this.text = r; @@ -13731,20 +13731,20 @@ class Zp { return this.from + this.text.length; } static get(e, r, n) { - let i = IE.get(e); + let i = PE.get(e); if (!i || i.from >= n || i.to <= r) { let o = new Zp(r, e.sliceString(r, n)); - return IE.set(e, o), o; + return PE.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)), IE.set(e, new Zp(a, s)), new Zp(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)), PE.set(e, new Zp(a, s)), new Zp(r, s.slice(r - a, n - a)); } } -class $J { +class BJ { constructor(e, r, n, i, s) { - this.text = e, this.to = s, this.done = !1, this.value = IJ, this.matchPos = D5(e, i), this.re = new RegExp(r, hM + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Zp.get(e, i, this.chunkEnd(i + 5e3)); + this.text = e, this.to = s, this.done = !1, this.value = PJ, this.matchPos = N5(e, i), this.re = new RegExp(r, fM + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Zp.get(e, i, this.chunkEnd(i + 5e3)); } chunkEnd(e) { return e >= this.to ? this.to : this.text.lineAt(e).to; @@ -13755,7 +13755,7 @@ class $J { if (r && !r[0] && r.index == e && (this.re.lastIndex = e + 1, r = this.re.exec(this.flat.text)), r) { let n = this.flat.from + r.index, i = n + r[0].length; if ((this.flat.to >= this.to || r.index + r[0].length <= this.flat.text.length - 10) && (!this.test || this.test(n, i, r))) - return this.value = { from: n, to: i, match: r }, this.matchPos = D5(this.text, i + (n == i ? 1 : 0)), this; + return this.value = { from: n, to: i, match: r }, this.matchPos = N5(this.text, i + (n == i ? 1 : 0)), this; } if (this.flat.to == this.to) return this.done = !0, this; @@ -13763,17 +13763,17 @@ class $J { } } } -typeof Symbol < "u" && (PJ.prototype[Symbol.iterator] = $J.prototype[Symbol.iterator] = function() { +typeof Symbol < "u" && ($J.prototype[Symbol.iterator] = BJ.prototype[Symbol.iterator] = function() { return this; }); -function v5e(t) { +function y5e(t) { try { - return new RegExp(t, hM), !0; + return new RegExp(t, fM), !0; } catch { return !1; } } -function D5(t, e) { +function N5(t, e) { if (e >= t.length) return e; let r = t.lineAt(e), n; @@ -13781,11 +13781,11 @@ function D5(t, e) { e++; return e; } -function _7(t) { +function A7(t) { let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), r = un("input", { class: "cm-textfield", name: "line", value: e }), n = un("form", { class: "cm-gotoLine", onkeydown: (s) => { - s.keyCode == 27 ? (s.preventDefault(), t.dispatch({ effects: N5.of(!1) }), t.focus()) : s.keyCode == 13 && (s.preventDefault(), i()); + s.keyCode == 27 ? (s.preventDefault(), t.dispatch({ effects: I5.of(!1) }), t.focus()) : s.keyCode == 13 && (s.preventDefault(), i()); }, onsubmit: (s) => { s.preventDefault(), i(); @@ -13803,60 +13803,60 @@ function _7(t) { u && l && (p = p * (l == "-" ? -1 : 1) + o.number); let g = a.doc.line(Math.max(1, Math.min(a.doc.lines, p))), m = Ve.cursor(g.from + Math.max(0, Math.min(d, g.length))); t.dispatch({ - effects: [N5.of(!1), ht.scrollIntoView(m.from, { y: "center" })], + effects: [I5.of(!1), ht.scrollIntoView(m.from, { y: "center" })], selection: m }), t.focus(); } return { dom: n }; } -const N5 = /* @__PURE__ */ Zt.define(), AF = /* @__PURE__ */ $n.define({ +const I5 = /* @__PURE__ */ Zt.define(), LF = /* @__PURE__ */ $n.define({ create() { return !0; }, update(t, e) { for (let r of e.effects) - r.is(N5) && (t = r.value); + r.is(I5) && (t = r.value); return t; }, - provide: (t) => Ay.from(t, (e) => e ? _7 : null) -}), y5e = (t) => { - let e = _y(t, _7); + provide: (t) => Ay.from(t, (e) => e ? A7 : null) +}), b5e = (t) => { + let e = _y(t, A7); if (!e) { - let r = [N5.of(!0)]; - t.state.field(AF, !1) == null && r.push(Zt.appendConfig.of([AF, b5e])), t.dispatch({ effects: r }), e = _y(t, _7); + let r = [I5.of(!0)]; + t.state.field(LF, !1) == null && r.push(Zt.appendConfig.of([LF, x5e])), t.dispatch({ effects: r }), e = _y(t, A7); } return e && e.dom.querySelector("input").select(), !0; -}, b5e = /* @__PURE__ */ ht.baseTheme({ +}, x5e = /* @__PURE__ */ ht.baseTheme({ ".cm-panel.cm-gotoLine": { padding: "2px 6px 4px", "& label": { fontSize: "80%" } } -}), x5e = { +}), w5e = { highlightWordAroundCursor: !1, minSelectionLength: 1, maxMatches: 100, wholeWords: !1 -}, BJ = /* @__PURE__ */ _t.define({ +}, FJ = /* @__PURE__ */ _t.define({ combine(t) { - return Yc(t, x5e, { + return Yc(t, w5e, { highlightWordAroundCursor: (e, r) => e || r, minSelectionLength: Math.min, maxMatches: Math.min }); } }); -function w5e(t) { - let e = [C5e, T5e]; - return t && e.push(BJ.of(t)), e; +function O5e(t) { + let e = [E5e, C5e]; + return t && e.push(FJ.of(t)), e; } -const O5e = /* @__PURE__ */ Et.mark({ class: "cm-selectionMatch" }), k5e = /* @__PURE__ */ Et.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); -function LF(t, e, r, n) { +const k5e = /* @__PURE__ */ Et.mark({ class: "cm-selectionMatch" }), S5e = /* @__PURE__ */ Et.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); +function RF(t, e, r, n) { return (r == 0 || t(e.sliceDoc(r - 1, r)) != Sn.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != Sn.Word); } -function S5e(t, e, r, n) { +function T5e(t, e, r, n) { return t(e.sliceDoc(r, r + 1)) == Sn.Word && t(e.sliceDoc(n - 1, n)) == Sn.Word; } -const T5e = /* @__PURE__ */ on.fromClass(class { +const C5e = /* @__PURE__ */ on.fromClass(class { constructor(t) { this.decorations = this.getDeco(t); } @@ -13864,7 +13864,7 @@ const T5e = /* @__PURE__ */ on.fromClass(class { (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view)); } getDeco(t) { - let e = t.state.facet(BJ), { state: r } = t, n = r.selection; + let e = t.state.facet(FJ), { state: r } = t, n = r.selection; if (n.ranges.length > 1) return Et.none; let i = n.main, s, a = null; @@ -13880,7 +13880,7 @@ const T5e = /* @__PURE__ */ on.fromClass(class { if (l < e.minSelectionLength || l > 200) return Et.none; if (e.wholeWords) { - if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(LF(a, r, i.from, i.to) && S5e(a, r, i.from, i.to))) + if (s = r.sliceDoc(i.from, i.to), a = r.charCategorizer(i.head), !(RF(a, r, i.from, i.to) && T5e(a, r, i.from, i.to))) return Et.none; } else if (s = r.sliceDoc(i.from, i.to).trim(), !s) return Et.none; @@ -13890,7 +13890,7 @@ const T5e = /* @__PURE__ */ on.fromClass(class { let u = new Mg(r.doc, s, l.from, l.to); for (; !u.next().done; ) { let { from: h, to: f } = u.value; - if ((!a || LF(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(k5e.range(h, f)) : (h >= i.to || f <= i.from) && o.push(O5e.range(h, f)), o.length > e.maxMatches)) + if ((!a || RF(a, r, h, f)) && (i.empty && h <= i.from && f >= i.to ? o.push(S5e.range(h, f)) : (h >= i.to || f <= i.from) && o.push(k5e.range(h, f)), o.length > e.maxMatches)) return Et.none; } } @@ -13898,14 +13898,14 @@ const T5e = /* @__PURE__ */ on.fromClass(class { } }, { decorations: (t) => t.decorations -}), C5e = /* @__PURE__ */ ht.baseTheme({ +}), E5e = /* @__PURE__ */ ht.baseTheme({ ".cm-selectionMatch": { backgroundColor: "#99ff7780" }, ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" } -}), E5e = ({ state: t, dispatch: e }) => { +}), _5e = ({ state: t, dispatch: e }) => { let { selection: r } = t, n = Ve.create(r.ranges.map((i) => t.wordAt(i.head) || Ve.cursor(i.head)), r.mainIndex); return n.eq(r) ? !1 : (e(t.update({ selection: n })), !0); }; -function _5e(t, e) { +function A5e(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 Mg(t.doc, e, n[n.length - 1].to); ; ) if (o.next(), o.done) { @@ -13923,14 +13923,14 @@ function _5e(t, e) { return o.value; } } -const A5e = ({ state: t, dispatch: e }) => { +const L5e = ({ state: t, dispatch: e }) => { let { ranges: r } = t.selection; if (r.some((s) => s.from === s.to)) - return E5e({ state: t, dispatch: e }); + return _5e({ 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 = _5e(t, n); + let i = A5e(t, n); return i ? (e(t.update({ selection: t.selection.addRange(Ve.range(i.from, i.to), !1), effects: ht.scrollIntoView(i.to) @@ -13943,14 +13943,14 @@ const A5e = ({ state: t, dispatch: e }) => { literal: !1, regexp: !1, wholeWord: !1, - createPanel: (e) => new V5e(e), + createPanel: (e) => new U5e(e), scrollToMatch: (e) => ht.scrollIntoView(e) }); } }); -class FJ { +class zJ { 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 || v5e(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 || y5e(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" ? ` @@ -13960,25 +13960,25 @@ class FJ { 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 D5e(this) : new R5e(this); + return this.regexp ? new N5e(this) : new M5e(this); } getCursor(e, r = 0, n) { let i = e.doc ? e : dr.create({ doc: e }); return n == null && (n = i.doc.length), this.regexp ? Sp(this, i, r, n) : kp(this, i, r, n); } } -class zJ { +class VJ { constructor(e) { this.spec = e; } } function kp(t, e, r, n) { - return new Mg(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? L5e(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); + return new Mg(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? R5e(e.doc, e.charCategorizer(e.selection.main.head)) : void 0); } -function L5e(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(I5(i, r - s)) != Sn.Word || e(P5(i, r - s)) != Sn.Word) && (e(P5(i, n - s)) != Sn.Word || e(I5(i, n - s)) != Sn.Word)); +function R5e(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(P5(i, r - s)) != Sn.Word || e($5(i, r - s)) != Sn.Word) && (e($5(i, n - s)) != Sn.Word || e(P5(i, n - s)) != Sn.Word)); } -class R5e extends zJ { +class M5e extends VJ { constructor(e) { super(e); } @@ -14020,21 +14020,21 @@ class R5e extends zJ { } } function Sp(t, e, r, n) { - return new PJ(e.doc, t.search, { + return new $J(e.doc, t.search, { ignoreCase: !t.caseSensitive, - test: t.wholeWord ? M5e(e.charCategorizer(e.selection.main.head)) : void 0 + test: t.wholeWord ? D5e(e.charCategorizer(e.selection.main.head)) : void 0 }, r, n); } -function I5(t, e) { +function P5(t, e) { return t.slice(ls(t, e, !1), e); } -function P5(t, e) { +function $5(t, e) { return t.slice(e, ls(t, e)); } -function M5e(t) { - return (e, r, n) => !n[0].length || (t(I5(n.input, n.index)) != Sn.Word || t(P5(n.input, n.index)) != Sn.Word) && (t(P5(n.input, n.index + n[0].length)) != Sn.Word || t(I5(n.input, n.index + n[0].length)) != Sn.Word); +function D5e(t) { + return (e, r, n) => !n[0].length || (t(P5(n.input, n.index)) != Sn.Word || t($5(n.input, n.index)) != Sn.Word) && (t($5(n.input, n.index + n[0].length)) != Sn.Word || t(P5(n.input, n.index + n[0].length)) != Sn.Word); } -class D5e extends zJ { +class N5e extends VJ { nextMatch(e, r, n) { let i = Sp(this.spec, e, n, e.doc.length).next(); return i.done && (i = Sp(this.spec, e, 0, r).next()), i.done ? null : i.value; @@ -14071,23 +14071,23 @@ class D5e extends zJ { i(s.value.from, s.value.to); } } -const Py = /* @__PURE__ */ Zt.define(), fM = /* @__PURE__ */ Zt.define(), Hh = /* @__PURE__ */ $n.define({ +const Py = /* @__PURE__ */ Zt.define(), dM = /* @__PURE__ */ Zt.define(), Hh = /* @__PURE__ */ $n.define({ create(t) { - return new PE(A7(t).create(), null); + return new $E(L7(t).create(), null); }, update(t, e) { for (let r of e.effects) - r.is(Py) ? t = new PE(r.value.create(), t.panel) : r.is(fM) && (t = new PE(t.query, r.value ? dM : null)); + r.is(Py) ? t = new $E(r.value.create(), t.panel) : r.is(dM) && (t = new $E(t.query, r.value ? pM : null)); return t; }, provide: (t) => Ay.from(t, (e) => e.panel) }); -class PE { +class $E { constructor(e, r) { this.query = e, this.panel = r; } } -const N5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch" }), I5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), P5e = /* @__PURE__ */ on.fromClass(class { +const I5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch" }), P5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), $5e = /* @__PURE__ */ on.fromClass(class { constructor(t) { this.view = t, this.decorations = this.highlight(t.state.field(Hh)); } @@ -14105,7 +14105,7 @@ const N5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch" }), I5e = /* @__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 ? I5e : N5e); + n.add(u, h, f ? P5e : I5e); }); } return n.finish(); @@ -14116,36 +14116,36 @@ const N5e = /* @__PURE__ */ Et.mark({ class: "cm-searchMatch" }), I5e = /* @__PU function jb(t) { return (e) => { let r = e.state.field(Hh, !1); - return r && r.query.spec.valid ? t(e, r) : qJ(e); + return r && r.query.spec.valid ? t(e, r) : YJ(e); }; } -const $5 = /* @__PURE__ */ jb((t, { query: e }) => { +const B5 = /* @__PURE__ */ jb((t, { query: e }) => { let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r); if (!n) return !1; let i = Ve.single(n.from, n.to), s = t.state.facet(F1); return t.dispatch({ selection: i, - effects: [pM(t, n), s.scrollToMatch(i.main, t)], + effects: [gM(t, n), s.scrollToMatch(i.main, t)], userEvent: "select.search" - }), UJ(t), !0; -}), B5 = /* @__PURE__ */ jb((t, { query: e }) => { + }), qJ(t), !0; +}), F5 = /* @__PURE__ */ jb((t, { query: e }) => { let { state: r } = t, { from: n } = r.selection.main, i = e.prevMatch(r, n, n); if (!i) return !1; let s = Ve.single(i.from, i.to), a = t.state.facet(F1); return t.dispatch({ selection: s, - effects: [pM(t, i), a.scrollToMatch(s.main, t)], + effects: [gM(t, i), a.scrollToMatch(s.main, t)], userEvent: "select.search" - }), UJ(t), !0; -}), $5e = /* @__PURE__ */ jb((t, { query: e }) => { + }), qJ(t), !0; +}), B5e = /* @__PURE__ */ jb((t, { query: e }) => { let r = e.matchAll(t.state, 1e3); return !r || !r.length ? !1 : (t.dispatch({ selection: Ve.create(r.map((n) => Ve.range(n.from, n.to))), userEvent: "select.search.matches" }), !0); -}), B5e = ({ state: t, dispatch: e }) => { +}), F5e = ({ state: t, dispatch: e }) => { let r = t.selection; if (r.ranges.length > 1 || r.main.empty) return !1; @@ -14159,7 +14159,7 @@ const $5 = /* @__PURE__ */ jb((t, { query: e }) => { selection: Ve.create(s, a), userEvent: "select.search.matches" })), !0; -}, RF = /* @__PURE__ */ jb((t, { query: e }) => { +}, MF = /* @__PURE__ */ jb((t, { query: e }) => { let { state: r } = t, { from: n, to: i } = r.selection.main; if (r.readOnly) return !1; @@ -14169,7 +14169,7 @@ const $5 = /* @__PURE__ */ jb((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(ht.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 = Ve.single(s.from - h, s.to - h), u.push(pM(t, s)), u.push(r.facet(F1).scrollToMatch(o.main, t)); + o = Ve.single(s.from - h, s.to - h), u.push(gM(t, s)), u.push(r.facet(F1).scrollToMatch(o.main, t)); } return t.dispatch({ changes: a, @@ -14177,7 +14177,7 @@ const $5 = /* @__PURE__ */ jb((t, { query: e }) => { effects: u, userEvent: "input.replace" }), !0; -}), F5e = /* @__PURE__ */ jb((t, { query: e }) => { +}), z5e = /* @__PURE__ */ jb((t, { query: e }) => { if (t.state.readOnly) return !1; let r = e.matchAll(t.state, 1e9).map((i) => { @@ -14193,16 +14193,16 @@ const $5 = /* @__PURE__ */ jb((t, { query: e }) => { userEvent: "input.replace.all" }), !0; }); -function dM(t) { +function pM(t) { return t.state.facet(F1).createPanel(t); } -function A7(t, e) { +function L7(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(F1); - return new FJ({ + return new zJ({ 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, @@ -14210,44 +14210,44 @@ function A7(t, e) { wholeWord: (a = e == null ? void 0 : e.wholeWord) !== null && a !== void 0 ? a : u.wholeWord }); } -function VJ(t) { - let e = _y(t, dM); +function UJ(t) { + let e = _y(t, pM); return e && e.dom.querySelector("[main-field]"); } -function UJ(t) { - let e = VJ(t); +function qJ(t) { + let e = UJ(t); e && e == t.root.activeElement && e.select(); } -const qJ = (t) => { +const YJ = (t) => { let e = t.state.field(Hh, !1); if (e && e.panel) { - let r = VJ(t); + let r = UJ(t); if (r && r != t.root.activeElement) { - let n = A7(t.state, e.query.spec); + let n = L7(t.state, e.query.spec); n.valid && t.dispatch({ effects: Py.of(n) }), r.focus(), r.select(); } } else t.dispatch({ effects: [ - fM.of(!0), - e ? Py.of(A7(t.state, e.query.spec)) : Zt.appendConfig.of(q5e) + dM.of(!0), + e ? Py.of(L7(t.state, e.query.spec)) : Zt.appendConfig.of(Y5e) ] }); return !0; -}, YJ = (t) => { +}, QJ = (t) => { let e = t.state.field(Hh, !1); if (!e || !e.panel) return !1; - let r = _y(t, dM); - return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: fM.of(!1) }), !0; -}, z5e = [ - { key: "Mod-f", run: qJ, scope: "editor search-panel" }, - { key: "F3", run: $5, shift: B5, scope: "editor search-panel", preventDefault: !0 }, - { key: "Mod-g", run: $5, shift: B5, scope: "editor search-panel", preventDefault: !0 }, - { key: "Escape", run: YJ, scope: "editor search-panel" }, - { key: "Mod-Shift-l", run: B5e }, - { key: "Mod-Alt-g", run: y5e }, - { key: "Mod-d", run: A5e, preventDefault: !0 } + let r = _y(t, pM); + return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: dM.of(!1) }), !0; +}, V5e = [ + { key: "Mod-f", run: YJ, scope: "editor search-panel" }, + { key: "F3", run: B5, shift: F5, scope: "editor search-panel", preventDefault: !0 }, + { key: "Mod-g", run: B5, shift: F5, scope: "editor search-panel", preventDefault: !0 }, + { key: "Escape", run: QJ, scope: "editor search-panel" }, + { key: "Mod-Shift-l", run: F5e }, + { key: "Mod-Alt-g", run: b5e }, + { key: "Mod-d", run: L5e, preventDefault: !0 } ]; -class V5e { +class U5e { constructor(e) { this.view = e; let r = this.query = e.state.field(Hh).query.spec; @@ -14294,28 +14294,28 @@ class V5e { } this.dom = un("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [ this.searchField, - n("next", () => $5(e), [Wa(e, "next")]), - n("prev", () => B5(e), [Wa(e, "previous")]), - n("select", () => $5e(e), [Wa(e, "all")]), + n("next", () => B5(e), [Wa(e, "next")]), + n("prev", () => F5(e), [Wa(e, "previous")]), + n("select", () => B5e(e), [Wa(e, "all")]), un("label", null, [this.caseField, Wa(e, "match case")]), un("label", null, [this.reField, Wa(e, "regexp")]), un("label", null, [this.wordField, Wa(e, "by word")]), ...e.state.readOnly ? [] : [ un("br"), this.replaceField, - n("replace", () => RF(e), [Wa(e, "replace")]), - n("replaceAll", () => F5e(e), [Wa(e, "replace all")]) + n("replace", () => MF(e), [Wa(e, "replace")]), + n("replaceAll", () => z5e(e), [Wa(e, "replace all")]) ], un("button", { name: "close", - onclick: () => YJ(e), + onclick: () => QJ(e), "aria-label": Wa(e, "close"), type: "button" }, ["\xD7"]) ]); } commit() { - let e = new FJ({ + let e = new zJ({ search: this.searchField.value, caseSensitive: this.caseField.checked, regexp: this.reField.checked, @@ -14325,7 +14325,7 @@ class V5e { e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: Py.of(e) })); } keydown(e) { - swe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? B5 : $5)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), RF(this.view)); + awe(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? F5 : B5)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), MF(this.view)); } update(e) { for (let r of e.transactions) @@ -14349,7 +14349,7 @@ function Wa(t, e) { return t.state.phrase(e); } const _w = 30, Aw = /[\s\.,:;?!]/; -function pM(t, { from: e, to: r }) { +function gM(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 - _w), a = Math.min(i, r + _w), o = t.state.sliceDoc(s, a); if (s != n.from) { for (let l = 0; l < _w; l++) @@ -14367,7 +14367,7 @@ function pM(t, { from: e, to: r }) { } return ht.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${n.number}.`); } -const U5e = /* @__PURE__ */ ht.baseTheme({ +const q5e = /* @__PURE__ */ ht.baseTheme({ ".cm-panel.cm-search": { padding: "2px 6px 4px", position: "relative", @@ -14396,12 +14396,12 @@ const U5e = /* @__PURE__ */ ht.baseTheme({ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" }, "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" }, "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" } -}), q5e = [ +}), Y5e = [ Hh, - /* @__PURE__ */ zl.low(P5e), - U5e + /* @__PURE__ */ zl.low($5e), + q5e ]; -class gM { +class mM { constructor(e, r, n) { this.state = e, this.pos = r, this.explicit = n, this.abortListeners = []; } @@ -14417,7 +14417,7 @@ class gM { } : 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(WJ(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(GJ(e, !1)); return s < 0 ? null : { from: n + s, to: this.pos, text: i.slice(s) }; } get aborted() { @@ -14427,28 +14427,28 @@ class gM { e == "abort" && this.abortListeners && this.abortListeners.push(r); } } -function MF(t) { +function DF(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 Y5e(t) { +function Q5e(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 = MF(e) + MF(r) + "*$"; + let n = DF(e) + DF(r) + "*$"; return [new RegExp("^" + n), new RegExp(n)]; } -function QJ(t) { - let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : Y5e(e); +function WJ(t) { + let e = t.map((i) => typeof i == "string" ? { label: i } : i), [r, n] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : Q5e(e); return (i) => { let s = i.matchBefore(n); return s || i.explicit ? { from: s ? s.from : i.pos, options: e, validFor: r } : null; }; } -function Q5e(t, e) { +function W5e(t, e) { return (r) => { for (let n = Jr(r.state).resolveInner(r.pos, -1); n; n = n.parent) { if (t.indexOf(n.name) > -1) @@ -14459,7 +14459,7 @@ function Q5e(t, e) { return e(r); }; } -class DF { +class NF { constructor(e, r, n, i) { this.completion = e, this.source = r, this.match = n, this.score = i; } @@ -14467,28 +14467,28 @@ class DF { function Xh(t) { return t.selection.main.from; } -function WJ(t, e) { +function GJ(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 GJ = /* @__PURE__ */ Vl.define(); -function W5e(t, e, r, n) { +const HJ = /* @__PURE__ */ Vl.define(); +function G5e(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: Ve.cursor(o.from + s + e.length) })), { scrollIntoView: !0, userEvent: "input.complete" }); } -const NF = /* @__PURE__ */ new WeakMap(); -function G5e(t) { +const IF = /* @__PURE__ */ new WeakMap(); +function H5e(t) { if (!Array.isArray(t)) return t; - let e = NF.get(t); - return e || NF.set(t, e = QJ(t)), e; + let e = IF.get(t); + return e || IF.set(t, e = WJ(t)), e; } -const mM = /* @__PURE__ */ Zt.define(), $y = /* @__PURE__ */ Zt.define(); -class H5e { +const vM = /* @__PURE__ */ Zt.define(), $y = /* @__PURE__ */ Zt.define(); +class X5e { 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; ) { @@ -14533,7 +14533,7 @@ class H5e { for (let b = 0, w = Math.min(e.length, 200), O = 0; b < w && f < l; ) { let S = ss(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 = BR(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 = FR(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 += _o(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); @@ -14561,7 +14561,7 @@ const Ds = /* @__PURE__ */ _t.define({ aboveCursor: !1, icons: !0, addToOptions: [], - positionInfo: X5e, + positionInfo: Z5e, compareCompletions: (e, r) => e.label.localeCompare(r.label), interactionDelay: 75, updateSyncTime: 100 @@ -14569,16 +14569,16 @@ const Ds = /* @__PURE__ */ _t.define({ defaultKeymap: (e, r) => e && r, closeOnBlur: (e, r) => e && r, icons: (e, r) => e && r, - tooltipClass: (e, r) => (n) => IF(e(n), r(n)), - optionClass: (e, r) => (n) => IF(e(n), r(n)), + tooltipClass: (e, r) => (n) => PF(e(n), r(n)), + optionClass: (e, r) => (n) => PF(e(n), r(n)), addToOptions: (e, r) => e.concat(r) }); } }); -function IF(t, e) { +function PF(t, e) { return t ? e ? t + " " + e : t : e; } -function X5e(t, e, r, n, i, s) { +function Z5e(t, e, r, n, i, s) { let a = t.textDirection == In.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); @@ -14593,7 +14593,7 @@ function X5e(t, e, r, n, i, s) { class: "cm-completionInfo-" + (l ? a ? "left-narrow" : "right-narrow" : o ? "left" : "right") }; } -function Z5e(t) { +function j5e(t) { let e = t.addToOptions.slice(); return t.icons && e.push({ render(r) { @@ -14625,7 +14625,7 @@ function Z5e(t) { position: 80 }), e.sort((r, n) => r.position - n.position).map((r) => r.render); } -function $E(t, e, r) { +function BE(t, e, r) { if (t <= r) return { from: 0, to: t }; if (e < 0 && (e = 0), e <= t >> 1) { @@ -14635,7 +14635,7 @@ function $E(t, e, r) { let n = Math.floor((t - e) / r); return { from: t - (n + 1) * r, to: t - n * r }; } -class j5e { +class K5e { constructor(e, r, n) { this.view = e, this.stateField = r, this.applyCompletion = n, this.info = null, this.infoDestroy = null, this.placeInfoReq = { read: () => this.measureInfo(), @@ -14643,7 +14643,7 @@ class j5e { key: this }, this.space = null, this.currentClass = ""; let i = e.state.field(r), { options: s, selected: a } = i.open, o = e.state.facet(Ds); - this.optionContent = Z5e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = $E(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 = j5e(o), this.optionClass = o.optionClass, this.tooltipClass = o.tooltipClass, this.range = BE(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) { @@ -14668,7 +14668,7 @@ class j5e { 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 = $E(s.length, a, e.state.facet(Ds).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 = BE(s.length, a, e.state.facet(Ds).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) { @@ -14686,7 +14686,7 @@ class j5e { } 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 = $E(r.options.length, r.selected, this.view.state.facet(Ds).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 = BE(r.options.length, r.selected, this.view.state.facet(Ds).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) @@ -14714,7 +14714,7 @@ class j5e { 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 && J5e(this.list, r), r; + return r && e3e(this.list, r), r; } measureInfo() { let e = this.dom.querySelector("[aria-selected]"); @@ -14764,17 +14764,17 @@ class j5e { this.destroyInfo(); } } -function K5e(t, e) { - return (r) => new j5e(r, t, e); -} function J5e(t, e) { + return (r) => new K5e(r, t, e); +} +function e3e(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 PF(t) { +function $F(t) { return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0); } -function e3e(t, e) { +function t3e(t, e) { let r = [], n = null, i = (l) => { r.push(l); let { section: u } = l.completion; @@ -14789,13 +14789,13 @@ function e3e(t, e) { let u = l.result.getMatch; if (l.result.filter === !1) for (let h of l.result.options) - i(new DF(h, l.source, u ? u(h) : [], 1e9 - r.length)); + i(new NF(h, l.source, u ? u(h) : [], 1e9 - r.length)); else { - let h = new H5e(e.sliceDoc(l.from, l.to)); + let h = new X5e(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 DF(f, l.source, d, h.score + (f.boost || 0))); + i(new NF(f, l.source, d, h.score + (f.boost || 0))); } } } @@ -14814,7 +14814,7 @@ function e3e(t, e) { let s = [], a = null, o = e.facet(Ds).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) : PF(l.completion) > PF(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) : $F(l.completion) > $F(a) && (s[s.length - 1] = l), a = l.completion; } return s; } @@ -14823,10 +14823,10 @@ class Mp { 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 Mp(this.options, $F(r, e), this.tooltip, this.timestamp, e, this.disabled); + return e == this.selected || e >= this.options.length ? this : new Mp(this.options, BF(r, e), this.tooltip, this.timestamp, e, this.disabled); } static build(e, r, n, i, s) { - let a = e3e(e, r); + let a = t3e(e, r); if (!a.length) return i && e.some((l) => l.state == 1) ? new Mp(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null; let o = r.facet(Ds).selectOnOpen ? 0 : -1; @@ -14838,9 +14838,9 @@ class Mp { break; } } - return new Mp(a, $F(n, o), { + return new Mp(a, BF(n, o), { pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8), - create: s3e, + create: a3e, above: s.aboveCursor }, i ? i.timestamp : Date.now(), o, !1); } @@ -14848,30 +14848,30 @@ class Mp { return new Mp(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); } } -class F5 { +class z5 { constructor(e, r, n) { this.active = e, this.id = r, this.open = n; } static start() { - return new F5(n3e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); + return new z5(i3e, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null); } update(e) { - let { state: r } = e, n = r.facet(Ds), s = (n.override || r.languageDataAt("autocomplete", Xh(r)).map(G5e)).map((o) => (this.active.find((u) => u.source == o) || new ka(o, this.active.some((u) => u.state != 0) ? 1 : 0)).update(e, n)); + let { state: r } = e, n = r.facet(Ds), s = (n.override || r.languageDataAt("autocomplete", Xh(r)).map(H5e)).map((o) => (this.active.find((u) => u.source == o) || new ka(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)) || !t3e(s, this.active) ? a = Mp.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 ka(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)) || !r3e(s, this.active) ? a = Mp.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 ka(o.source, 0) : o)); for (let o of e.effects) - o.is(XJ) && (a = a && a.setSelected(o.value, this.id)); - return s == this.active && a == this.open ? this : new F5(s, this.id, a); + o.is(ZJ) && (a = a && a.setSelected(o.value, this.id)); + return s == this.active && a == this.open ? this : new z5(s, this.id, a); } get tooltip() { return this.open ? this.open.tooltip : null; } get attrs() { - return this.open ? this.open.attrs : r3e; + return this.open ? this.open.attrs : n3e; } } -function t3e(t, e) { +function r3e(t, e) { if (t == e) return !0; for (let r = 0, n = 0; ; ) { @@ -14886,10 +14886,10 @@ function t3e(t, e) { return !1; } } -const r3e = { +const n3e = { "aria-autocomplete": "list" }; -function $F(t, e) { +function BF(t, e) { let r = { "aria-autocomplete": "list", "aria-haspopup": "listbox", @@ -14897,8 +14897,8 @@ function $F(t, e) { }; return e > -1 && (r["aria-activedescendant"] = t + "-" + e), r; } -const n3e = []; -function L7(t) { +const i3e = []; +function R7(t) { return t.isUserEvent("input.type") ? "input" : t.isUserEvent("delete.backward") ? "delete" : null; } class ka { @@ -14909,14 +14909,14 @@ class ka { return !1; } update(e, r) { - let n = L7(e), i = this; + let n = R7(e), i = this; n ? i = i.handleUserEvent(e, n, r) : e.docChanged ? i = i.handleChange(e) : e.selection && i.state != 0 && (i = new ka(i.source, 0)); for (let s of e.effects) - if (s.is(mM)) + if (s.is(vM)) i = new ka(i.source, 1, s.value ? Xh(e.state) : -1); else if (s.is($y)) i = new ka(i.source, 0); - else if (s.is(HJ)) + else if (s.is(XJ)) for (let a of s.value) a.source == i.source && (i = a); return i; @@ -14944,7 +14944,7 @@ class jp extends ka { if ((this.explicitPos < 0 ? o <= s : o < this.from) || o > a || r == "delete" && Xh(e.startState) == this.from) return new ka(this.source, r == "input" && n.activateOnTyping ? 1 : 0); let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos), u; - return i3e(this.result.validFor, e.state, s, a) ? new jp(this.source, l, this.result, s, a) : this.result.update && (u = this.result.update(this.result, s, a, new gM(e.state, o, l >= 0))) ? new jp(this.source, l, u, u.from, (i = u.to) !== null && i !== void 0 ? i : Xh(e.state)) : new ka(this.source, 1, l); + return s3e(this.result.validFor, e.state, s, a) ? new jp(this.source, l, this.result, s, a) : this.result.update && (u = this.result.update(this.result, s, a, new mM(e.state, o, l >= 0))) ? new jp(this.source, l, u, u.from, (i = u.to) !== null && i !== void 0 ? i : Xh(e.state)) : new ka(this.source, 1, l); } handleChange(e) { return e.changes.touchesRange(this.from, this.to) ? new ka(this.source, 0) : this.map(e.changes); @@ -14953,58 +14953,58 @@ class jp extends ka { return e.empty ? this : new jp(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)); } } -function i3e(t, e, r, n) { +function s3e(t, e, r, n) { if (!t) return !1; let i = e.sliceDoc(r, n); - return typeof t == "function" ? t(i, r, n, e) : WJ(t, !0).test(i); + return typeof t == "function" ? t(i, r, n, e) : GJ(t, !0).test(i); } -const HJ = /* @__PURE__ */ Zt.define({ +const XJ = /* @__PURE__ */ Zt.define({ map(t, e) { return t.map((r) => r.map(e)); } -}), XJ = /* @__PURE__ */ Zt.define(), to = /* @__PURE__ */ $n.define({ +}), ZJ = /* @__PURE__ */ Zt.define(), to = /* @__PURE__ */ $n.define({ create() { - return F5.start(); + return z5.start(); }, update(t, e) { return t.update(e); }, provide: (t) => [ - XR.from(t, (e) => e.tooltip), + ZR.from(t, (e) => e.tooltip), ht.contentAttributes.from(t, (e) => e.attrs) ] }); -function ZJ(t, e) { +function jJ(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 jp ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, W5e(t.state, r, n.from, n.to)), { annotations: GJ.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; + return n instanceof jp ? (typeof r == "string" ? t.dispatch(Object.assign(Object.assign({}, G5e(t.state, r, n.from, n.to)), { annotations: HJ.of(e.completion) })) : r(t, e.completion, n.from, n.to), !0) : !1; } -const s3e = /* @__PURE__ */ K5e(to, ZJ); +const a3e = /* @__PURE__ */ J5e(to, jJ); function Lw(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(Ds).interactionDelay) return !1; let i = 1, s; - e == "page" && (s = _K(r, n.open.tooltip)) && (i = Math.max(2, Math.floor(s.dom.offsetHeight / s.dom.querySelector("li").offsetHeight) - 1)); + e == "page" && (s = AK(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: XJ.of(o) }), !0; + return o < 0 ? o = e == "page" ? 0 : a - 1 : o >= a && (o = e == "page" ? a - 1 : 0), r.dispatch({ effects: ZJ.of(o) }), !0; }; } -const a3e = (t) => { +const o3e = (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(Ds).interactionDelay ? !1 : ZJ(t, e.open.options[e.open.selected]); -}, o3e = (t) => t.state.field(to, !1) ? (t.dispatch({ effects: mM.of(!0) }), !0) : !1, l3e = (t) => { + return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Ds).interactionDelay ? !1 : jJ(t, e.open.options[e.open.selected]); +}, l3e = (t) => t.state.field(to, !1) ? (t.dispatch({ effects: vM.of(!0) }), !0) : !1, c3e = (t) => { let e = t.state.field(to, !1); return !e || !e.active.some((r) => r.state != 0) ? !1 : (t.dispatch({ effects: $y.of(null) }), !0); }; -class c3e { +class u3e { constructor(e, r) { this.active = e, this.context = r, this.time = Date.now(), this.updates = [], this.done = void 0; } } -const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.fromClass(class { +const h3e = 50, f3e = 1e3, d3e = /* @__PURE__ */ on.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) @@ -15014,10 +15014,10 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.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) && !L7(n)); + let r = t.transactions.some((n) => (n.selection || n.docChanged) && !R7(n)); for (let n = 0; n < this.running.length; n++) { let i = this.running[n]; - if (r || i.updates.length + t.transactions.length > u3e && Date.now() - i.time > h3e) { + if (r || i.updates.length + t.transactions.length > h3e && Date.now() - i.time > f3e) { for (let s of i.context.abortListeners) try { s(); @@ -15030,7 +15030,7 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.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) - L7(n) == "input" ? this.composing = 2 : this.composing == 2 && n.selection && (this.composing = 3); + R7(n) == "input" ? this.composing = 2 : this.composing == 2 && n.selection && (this.composing = 3); } startUpdate() { this.debounceUpdate = -1; @@ -15039,7 +15039,7 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.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 = Xh(e), n = new gM(e, r, t.explicitPos == r), i = new c3e(t, n); + let { state: e } = this.view, r = Xh(e), n = new mM(e, r, t.explicitPos == r), i = new u3e(t, n); this.running.push(i), Promise.resolve(t.source(n)).then((s) => { i.context.aborted || (i.done = s || null, this.scheduleAccept()); }, (s) => { @@ -15076,14 +15076,14 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.fromClass(class { } else this.startQuery(s); } - e.length && this.view.dispatch({ effects: HJ.of(e) }); + e.length && this.view.dispatch({ effects: XJ.of(e) }); } }, { eventHandlers: { blur(t) { let e = this.view.state.field(to, !1); if (e && e.tooltip && this.view.state.facet(Ds).closeOnBlur) { - let r = e.open && _K(this.view, e.open.tooltip); + let r = e.open && AK(this.view, e.open.tooltip); (!r || !r.dom.contains(t.relatedTarget)) && this.view.dispatch({ effects: $y.of(null) }); } }, @@ -15091,10 +15091,10 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.fromClass(class { this.composing = 1; }, compositionend() { - this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: mM.of(!1) }), 20), this.composing = 0; + this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: vM.of(!1) }), 20), this.composing = 0; } } -}), jJ = /* @__PURE__ */ ht.baseTheme({ +}), KJ = /* @__PURE__ */ ht.baseTheme({ ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": { fontFamily: "monospace", @@ -15216,21 +15216,21 @@ const u3e = 50, h3e = 1e3, f3e = /* @__PURE__ */ on.fromClass(class { "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" } } }); -class d3e { +class p3e { constructor(e, r, n, i) { this.field = e, this.line = r, this.from = n, this.to = i; } } -class vM { +class yM { constructor(e, r, n) { this.field = e, this.from = r, this.to = n; } map(e) { let r = e.mapPos(this.from, -1, Si.TrackDel), n = e.mapPos(this.to, 1, Si.TrackDel); - return r == null || n == null ? null : new vM(this.field, r, n); + return r == null || n == null ? null : new yM(this.field, r, n); } } -class yM { +class bM { constructor(e, r) { this.lines = e, this.fieldPositions = r; } @@ -15245,7 +15245,7 @@ class yM { } n.push(l), r += l.length + 1; } - let o = this.fieldPositions.map((l) => new vM(l.field, i[l.line] + l.from, i[l.line] + l.to)); + let o = this.fieldPositions.map((l) => new yM(l.field, i[l.line] + l.from, i[l.line] + l.to)); return { text: n, ranges: o }; } static parse(e) { @@ -15263,7 +15263,7 @@ class yM { for (let f of i) f.field >= u && f.field++; } - i.push(new d3e(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 p3e(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); @@ -15272,10 +15272,10 @@ class yM { } n.push(a); } - return new yM(n, i); + return new bM(n, i); } } -let p3e = /* @__PURE__ */ Et.widget({ widget: /* @__PURE__ */ new class extends za { +let g3e = /* @__PURE__ */ Et.widget({ widget: /* @__PURE__ */ new class extends za { toDOM() { let t = document.createElement("span"); return t.className = "cm-snippetFieldPosition", t; @@ -15283,10 +15283,10 @@ let p3e = /* @__PURE__ */ Et.widget({ widget: /* @__PURE__ */ new class extends ignoreEvent() { return !1; } -}() }), g3e = /* @__PURE__ */ Et.mark({ class: "cm-snippetField" }); +}() }), m3e = /* @__PURE__ */ Et.mark({ class: "cm-snippetField" }); class z1 { constructor(e, r) { - this.ranges = e, this.active = r, this.deco = Et.set(e.map((n) => (n.from == n.to ? p3e : g3e).range(n.from, n.to))); + this.ranges = e, this.active = r, this.deco = Et.set(e.map((n) => (n.from == n.to ? g3e : m3e).range(n.from, n.to))); } map(e) { let r = []; @@ -15306,7 +15306,7 @@ const Kb = /* @__PURE__ */ Zt.define({ map(t, e) { return t && t.map(e); } -}), m3e = /* @__PURE__ */ Zt.define(), By = /* @__PURE__ */ $n.define({ +}), v3e = /* @__PURE__ */ Zt.define(), By = /* @__PURE__ */ $n.define({ create() { return null; }, @@ -15314,63 +15314,63 @@ const Kb = /* @__PURE__ */ Zt.define({ for (let r of e.effects) { if (r.is(Kb)) return r.value; - if (r.is(m3e) && t) + if (r.is(v3e) && t) return new z1(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) => ht.decorations.from(t, (e) => e ? e.deco : Et.none) }); -function bM(t, e) { +function xM(t, e) { return Ve.create(t.filter((r) => r.field == e).map((r) => Ve.range(r.from, r.to))); } -function v3e(t) { - let e = yM.parse(t); +function y3e(t) { + let e = bM.parse(t); return (r, n, i, s) => { let { text: a, ranges: o } = e.instantiate(r.state, i), l = { changes: { from: i, to: s, insert: Dr.of(a) }, scrollIntoView: !0, - annotations: n ? GJ.of(n) : void 0 + annotations: n ? HJ.of(n) : void 0 }; - if (o.length && (l.selection = bM(o, 0)), o.length > 1) { + if (o.length && (l.selection = xM(o, 0)), o.length > 1) { let u = new z1(o, 0), h = l.effects = [Kb.of(u)]; - r.state.field(By, !1) === void 0 && h.push(Zt.appendConfig.of([By, O3e, k3e, jJ])); + r.state.field(By, !1) === void 0 && h.push(Zt.appendConfig.of([By, k3e, S3e, KJ])); } r.dispatch(r.state.update(l)); }; } -function KJ(t) { +function JJ(t) { return ({ state: e, dispatch: r }) => { let n = e.field(By, !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: bM(n.ranges, i), + selection: xM(n.ranges, i), effects: Kb.of(s ? null : new z1(n.ranges, i)), scrollIntoView: !0 })), !0; }; } -const y3e = ({ state: t, dispatch: e }) => t.field(By, !1) ? (e(t.update({ effects: Kb.of(null) })), !0) : !1, b3e = /* @__PURE__ */ KJ(1), x3e = /* @__PURE__ */ KJ(-1), w3e = [ - { key: "Tab", run: b3e, shift: x3e }, - { key: "Escape", run: y3e } -], BF = /* @__PURE__ */ _t.define({ +const b3e = ({ state: t, dispatch: e }) => t.field(By, !1) ? (e(t.update({ effects: Kb.of(null) })), !0) : !1, x3e = /* @__PURE__ */ JJ(1), w3e = /* @__PURE__ */ JJ(-1), O3e = [ + { key: "Tab", run: x3e, shift: w3e }, + { key: "Escape", run: b3e } +], FF = /* @__PURE__ */ _t.define({ combine(t) { - return t.length ? t[0] : w3e; + return t.length ? t[0] : O3e; } -}), O3e = /* @__PURE__ */ zl.highest(/* @__PURE__ */ Cu.compute([BF], (t) => t.facet(BF))); +}), k3e = /* @__PURE__ */ zl.highest(/* @__PURE__ */ Cu.compute([FF], (t) => t.facet(FF))); function ya(t, e) { - return Object.assign(Object.assign({}, e), { apply: v3e(t) }); + return Object.assign(Object.assign({}, e), { apply: y3e(t) }); } -const k3e = /* @__PURE__ */ ht.domEventHandlers({ +const S3e = /* @__PURE__ */ ht.domEventHandlers({ mousedown(t, e) { let r = e.state.field(By, !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: bM(r.ranges, i.field), + selection: xM(r.ranges, i.field), effects: Kb.of(r.ranges.some((s) => s.field > i.field) ? new z1(r.ranges, i.field) : null), scrollIntoView: !0 }), !0); @@ -15384,11 +15384,11 @@ const k3e = /* @__PURE__ */ ht.domEventHandlers({ let r = e.mapPos(t, -1, Si.TrackAfter); return r == null ? void 0 : r; } -}), xM = /* @__PURE__ */ new class extends Zd { +}), wM = /* @__PURE__ */ new class extends Zd { }(); -xM.startSide = 1; -xM.endSide = -1; -const JJ = /* @__PURE__ */ $n.define({ +wM.startSide = 1; +wM.endSide = -1; +const eee = /* @__PURE__ */ $n.define({ create() { return Er.empty; }, @@ -15398,39 +15398,39 @@ const JJ = /* @__PURE__ */ $n.define({ t = t.update({ filter: (n) => n >= r.from && n <= r.to }); } for (let r of e.effects) - r.is(Ad) && (t = t.update({ add: [xM.range(r.value, r.value + 1)] })); + r.is(Ad) && (t = t.update({ add: [wM.range(r.value, r.value + 1)] })); return t; } }); -function S3e() { - return [C3e, JJ]; +function T3e() { + return [E3e, eee]; } -const BE = "()[]{}<>"; -function eee(t) { - for (let e = 0; e < BE.length; e += 2) - if (BE.charCodeAt(e) == t) - return BE.charAt(e + 1); - return BR(t < 128 ? t : t + 1); +const FE = "()[]{}<>"; +function tee(t) { + for (let e = 0; e < FE.length; e += 2) + if (FE.charCodeAt(e) == t) + return FE.charAt(e + 1); + return FR(t < 128 ? t : t + 1); } -function tee(t, e) { +function ree(t, e) { return t.languageDataAt("closeBrackets", e)[0] || Fy; } -const T3e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), C3e = /* @__PURE__ */ ht.inputHandler.of((t, e, r, n) => { - if ((T3e ? t.composing : t.compositionStarted) || t.state.readOnly) +const C3e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), E3e = /* @__PURE__ */ ht.inputHandler.of((t, e, r, n) => { + if ((C3e ? t.composing : t.compositionStarted) || t.state.readOnly) return !1; let i = t.state.selection.main; if (n.length > 2 || n.length == 2 && _o(ss(n, 0)) == 1 || e != i.from || r != i.to) return !1; - let s = A3e(t.state, n); + let s = L3e(t.state, n); return s ? (t.dispatch(s), !0) : !1; -}), E3e = ({ state: t, dispatch: e }) => { +}), _3e = ({ state: t, dispatch: e }) => { if (t.readOnly) return !1; - let n = tee(t, t.selection.main.head).brackets || Fy.brackets, i = null, s = t.changeByRange((a) => { + let n = ree(t, t.selection.main.head).brackets || Fy.brackets, i = null, s = t.changeByRange((a) => { if (a.empty) { - let o = L3e(t.doc, a.head); + let o = R3e(t.doc, a.head); for (let l of n) - if (l == o && HS(t.doc, a.head) == eee(ss(l, 0))) + if (l == o && XS(t.doc, a.head) == tee(ss(l, 0))) return { changes: { from: a.head - l.length, to: a.head + l.length }, range: Ve.cursor(a.head - l.length) @@ -15439,35 +15439,35 @@ const T3e = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(nav return { range: i = a }; }); return i || e(t.update(s, { scrollIntoView: !0, userEvent: "delete.backward" })), !i; -}, _3e = [ - { key: "Backspace", run: E3e } +}, A3e = [ + { key: "Backspace", run: _3e } ]; -function A3e(t, e) { - let r = tee(t, t.selection.main.head), n = r.brackets || Fy.brackets; +function L3e(t, e) { + let r = ree(t, t.selection.main.head), n = r.brackets || Fy.brackets; for (let i of n) { - let s = eee(ss(i, 0)); + let s = tee(ss(i, 0)); if (e == i) - return s == i ? D3e(t, i, n.indexOf(i + i + i) > -1, r) : R3e(t, i, s, r.before || Fy.before); - if (e == s && ree(t, t.selection.main.from)) - return M3e(t, i, s); + return s == i ? N3e(t, i, n.indexOf(i + i + i) > -1, r) : M3e(t, i, s, r.before || Fy.before); + if (e == s && nee(t, t.selection.main.from)) + return D3e(t, i, s); } return null; } -function ree(t, e) { +function nee(t, e) { let r = !1; - return t.field(JJ).between(0, t.doc.length, (n) => { + return t.field(eee).between(0, t.doc.length, (n) => { n == e && (r = !0); }), r; } -function HS(t, e) { +function XS(t, e) { let r = t.sliceString(e, e + 2); return r.slice(0, _o(ss(r, 0))); } -function L3e(t, e) { +function R3e(t, e) { let r = t.sliceString(e - 2, e); return _o(ss(r, 0)) == r.length ? r : r.slice(1); } -function R3e(t, e, r, n) { +function M3e(t, e, r, n) { let i = null, s = t.changeByRange((a) => { if (!a.empty) return { @@ -15475,7 +15475,7 @@ function R3e(t, e, r, n) { effects: Ad.of(a.to + e.length), range: Ve.range(a.anchor + e.length, a.head + e.length) }; - let o = HS(t.doc, a.head); + let o = XS(t.doc, a.head); return !o || /\s/.test(o) || n.indexOf(o) > -1 ? { changes: { insert: e + r, from: a.head }, effects: Ad.of(a.head + e.length), @@ -15487,8 +15487,8 @@ function R3e(t, e, r, n) { userEvent: "input.type" }); } -function M3e(t, e, r) { - let n = null, i = t.changeByRange((s) => s.empty && HS(t.doc, s.head) == r ? { +function D3e(t, e, r) { + let n = null, i = t.changeByRange((s) => s.empty && XS(t.doc, s.head) == r ? { changes: { from: s.head, to: s.head + r.length, insert: r }, range: Ve.cursor(s.head + r.length) } : n = { range: s }); @@ -15497,7 +15497,7 @@ function M3e(t, e, r) { userEvent: "input.type" }); } -function D3e(t, e, r, n) { +function N3e(t, e, r, n) { let i = n.stringPrefixes || Fy.stringPrefixes, s = null, a = t.changeByRange((o) => { if (!o.empty) return { @@ -15505,15 +15505,15 @@ function D3e(t, e, r, n) { effects: Ad.of(o.to + e.length), range: Ve.range(o.anchor + e.length, o.head + e.length) }; - let l = o.head, u = HS(t.doc, l), h; + let l = o.head, u = XS(t.doc, l), h; if (u == e) { - if (FF(t, l)) + if (zF(t, l)) return { changes: { insert: e + e, from: l }, effects: Ad.of(l + e.length), range: Ve.cursor(l + e.length) }; - if (ree(t, l)) { + if (nee(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 }, @@ -15521,13 +15521,13 @@ function D3e(t, e, r, n) { }; } } else { - if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = zF(t, l - 2 * e.length, i)) > -1 && FF(t, h)) + if (r && t.sliceDoc(l - 2 * e.length, l) == e + e && (h = VF(t, l - 2 * e.length, i)) > -1 && zF(t, h)) return { changes: { insert: e + e + e + e, from: l }, effects: Ad.of(l + e.length), range: Ve.cursor(l + e.length) }; - if (t.charCategorizer(l)(u) != Sn.Word && zF(t, l, i) > -1 && !N3e(t, l, e, i)) + if (t.charCategorizer(l)(u) != Sn.Word && VF(t, l, i) > -1 && !I3e(t, l, e, i)) return { changes: { insert: e + e, from: l }, effects: Ad.of(l + e.length), @@ -15541,11 +15541,11 @@ function D3e(t, e, r, n) { userEvent: "input.type" }); } -function FF(t, e) { +function zF(t, e) { let r = Jr(t).resolveInner(e + 1); return r.parent && r.from == e; } -function N3e(t, e, r, n) { +function I3e(t, e, r, n) { let i = Jr(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); @@ -15565,7 +15565,7 @@ function N3e(t, e, r, n) { } return !1; } -function zF(t, e, r) { +function VF(t, e, r) { let n = t.charCategorizer(e); if (n(t.sliceDoc(e - 1, e)) != Sn.Word) return e; @@ -15576,25 +15576,25 @@ function zF(t, e, r) { } return -1; } -function I3e(t = {}) { +function P3e(t = {}) { return [ to, Ds.of(t), - f3e, - P3e, - jJ + d3e, + $3e, + KJ ]; } -const nee = [ - { key: "Ctrl-Space", run: o3e }, - { key: "Escape", run: l3e }, +const iee = [ + { key: "Ctrl-Space", run: l3e }, + { key: "Escape", run: c3e }, { key: "ArrowDown", run: /* @__PURE__ */ Lw(!0) }, { key: "ArrowUp", run: /* @__PURE__ */ Lw(!1) }, { key: "PageDown", run: /* @__PURE__ */ Lw(!0, "page") }, { key: "PageUp", run: /* @__PURE__ */ Lw(!1, "page") }, - { key: "Enter", run: a3e } -], P3e = /* @__PURE__ */ zl.highest(/* @__PURE__ */ Cu.computeN([Ds], (t) => t.facet(Ds).defaultKeymap ? [nee] : [])); -class $3e { + { key: "Enter", run: o3e } +], $3e = /* @__PURE__ */ zl.highest(/* @__PURE__ */ Cu.computeN([Ds], (t) => t.facet(Ds).defaultKeymap ? [iee] : [])); +class B3e { constructor(e, r, n) { this.from = e, this.to = r, this.diagnostic = n; } @@ -15604,10 +15604,10 @@ class yd { this.diagnostics = e, this.panel = r, this.selected = n; } static init(e, r, n) { - let i = e, s = n.facet(aee).markerFilter; + let i = e, s = n.facet(oee).markerFilter; s && (i = s(i)); let a = Et.set(i.map((o) => o.from == o.to || o.from == o.to - 1 && n.doc.lineAt(o.from).to == o.from ? Et.widget({ - widget: new W3e(o), + widget: new G3e(o), diagnostic: o }).range(o.from) : Et.mark({ attributes: { class: "cm-lintRange cm-lintRange-" + o.severity + (o.markClass ? " " + o.markClass : "") }, @@ -15620,17 +15620,17 @@ function Dg(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 $3e(i, s, a.diagnostic), !1; + return n = new B3e(i, s, a.diagnostic), !1; }), n; } -function B3e(t, e) { +function F3e(t, e) { let r = t.startState.doc.lineAt(e.pos); - return !!(t.effects.some((n) => n.is(iee)) || t.changes.touchesRange(r.from, r.to)); + return !!(t.effects.some((n) => n.is(see)) || t.changes.touchesRange(r.from, r.to)); } -function F3e(t, e) { - return t.field(io, !1) ? e : e.concat(Zt.appendConfig.of(X3e)); +function z3e(t, e) { + return t.field(io, !1) ? e : e.concat(Zt.appendConfig.of(Z3e)); } -const iee = /* @__PURE__ */ Zt.define(), wM = /* @__PURE__ */ Zt.define(), see = /* @__PURE__ */ Zt.define(), io = /* @__PURE__ */ $n.define({ +const see = /* @__PURE__ */ Zt.define(), OM = /* @__PURE__ */ Zt.define(), aee = /* @__PURE__ */ Zt.define(), io = /* @__PURE__ */ $n.define({ create() { return new yd(Et.none, null, null); }, @@ -15644,50 +15644,50 @@ const iee = /* @__PURE__ */ Zt.define(), wM = /* @__PURE__ */ Zt.define(), see = t = new yd(r, t.panel, n); } for (let r of e.effects) - r.is(iee) ? t = yd.init(r.value, t.panel, e.state) : r.is(wM) ? t = new yd(t.diagnostics, r.value ? XS.open : null, t.selected) : r.is(see) && (t = new yd(t.diagnostics, t.panel, r.value)); + r.is(see) ? t = yd.init(r.value, t.panel, e.state) : r.is(OM) ? t = new yd(t.diagnostics, r.value ? ZS.open : null, t.selected) : r.is(aee) && (t = new yd(t.diagnostics, t.panel, r.value)); return t; }, provide: (t) => [ Ay.from(t, (e) => e.panel), ht.decorations.from(t, (e) => e.diagnostics) ] -}), z3e = /* @__PURE__ */ Et.mark({ class: "cm-lintRange cm-lintRange-active" }); -function V3e(t, e, r) { +}), V3e = /* @__PURE__ */ Et.mark({ class: "cm-lintRange cm-lintRange-active" }); +function U3e(t, e, r) { let { diagnostics: n } = t.state.field(io), 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(aee).tooltipFilter; + let o = t.state.facet(oee).tooltipFilter; return o && (i = o(i)), i.length ? { pos: s, end: a, above: t.state.doc.lineAt(s).to < a, create() { - return { dom: U3e(t, i) }; + return { dom: q3e(t, i) }; } } : null; } -function U3e(t, e) { - return un("ul", { class: "cm-tooltip-lint" }, e.map((r) => lee(t, r, !1))); +function q3e(t, e) { + return un("ul", { class: "cm-tooltip-lint" }, e.map((r) => cee(t, r, !1))); } -const q3e = (t) => { +const Y3e = (t) => { let e = t.state.field(io, !1); - (!e || !e.panel) && t.dispatch({ effects: F3e(t.state, [wM.of(!0)]) }); - let r = _y(t, XS.open); + (!e || !e.panel) && t.dispatch({ effects: z3e(t.state, [OM.of(!0)]) }); + let r = _y(t, ZS.open); return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0; -}, VF = (t) => { +}, UF = (t) => { let e = t.state.field(io, !1); - return !e || !e.panel ? !1 : (t.dispatch({ effects: wM.of(!1) }), !0); -}, Y3e = (t) => { + return !e || !e.panel ? !1 : (t.dispatch({ effects: OM.of(!1) }), !0); +}, Q3e = (t) => { let e = t.state.field(io, !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); -}, Q3e = [ - { key: "Mod-Shift-m", run: q3e, preventDefault: !0 }, - { key: "F8", run: Y3e } -], aee = /* @__PURE__ */ _t.define({ +}, W3e = [ + { key: "Mod-Shift-m", run: Y3e, preventDefault: !0 }, + { key: "F8", run: Q3e } +], oee = /* @__PURE__ */ _t.define({ combine(t) { return Object.assign({ sources: t.map((e) => e.source) }, Yc(t.map((e) => e.config), { delay: 750, @@ -15699,7 +15699,7 @@ const q3e = (t) => { })); } }); -function oee(t) { +function lee(t) { let e = []; if (t) e: @@ -15715,9 +15715,9 @@ function oee(t) { } return e; } -function lee(t, e, r) { +function cee(t, e, r) { var n; - let i = r ? oee(e.actions) : []; + let i = r ? lee(e.actions) : []; return un("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, un("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) @@ -15739,7 +15739,7 @@ function lee(t, e, r) { }, f); }), e.source && un("div", { class: "cm-diagnosticSource" }, e.source)); } -class W3e extends za { +class G3e extends za { constructor(e) { super(), this.diagnostic = e; } @@ -15750,17 +15750,17 @@ class W3e extends za { return un("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity }); } } -class UF { +class qF { constructor(e, r) { - this.diagnostic = r, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = lee(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 = cee(e, r, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option"); } } -class XS { +class ZS { constructor(e) { this.view = e, this.items = []; let r = (i) => { if (i.keyCode == 27) - VF(this.view), this.view.focus(); + UF(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) @@ -15772,7 +15772,7 @@ class XS { 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 = oee(s.actions); + let { diagnostic: s } = this.items[this.selectedIndex], a = lee(s.actions); for (let o = 0; o < a.length; o++) if (a[o].toUpperCase().charCodeAt(0) == i.keyCode) { let l = Dg(this.view.state.field(io).diagnostics, s); @@ -15795,7 +15795,7 @@ class XS { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), - onclick: () => VF(this.view) + onclick: () => UF(this.view) }, "\xD7")), this.update(); } get selectedIndex() { @@ -15816,10 +15816,10 @@ class XS { u = f; break; } - u < 0 ? (h = new UF(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 qF(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 UF(this.view, { + this.items.length == 0 && (this.items.push(new qF(this.view, { from: -1, to: -1, severity: "info", @@ -15856,20 +15856,20 @@ class XS { !n || this.view.dispatch({ selection: { anchor: n.from, head: n.to }, scrollIntoView: !0, - effects: see.of(n) + effects: aee.of(n) }); } static open(e) { - return new XS(e); + return new ZS(e); } } -function G3e(t, e = 'viewBox="0 0 40 40"') { +function H3e(t, e = 'viewBox="0 0 40 40"') { return `url('data:image/svg+xml,${encodeURIComponent(t)}')`; } function Rw(t) { - return G3e(``, 'width="6" height="3"'); + return H3e(``, 'width="6" height="3"'); } -const H3e = /* @__PURE__ */ ht.baseTheme({ +const X3e = /* @__PURE__ */ ht.baseTheme({ ".cm-diagnostic": { padding: "3px 6px 3px 8px", marginLeft: "-1px", @@ -15959,53 +15959,53 @@ const H3e = /* @__PURE__ */ ht.baseTheme({ margin: 0 } } -}), X3e = [ +}), Z3e = [ io, /* @__PURE__ */ ht.decorations.compute([io], (t) => { let { selected: e, panel: r } = t.field(io); return !e || !r || e.from == e.to ? Et.none : Et.set([ - z3e.range(e.from, e.to) + V3e.range(e.from, e.to) ]); }), - /* @__PURE__ */ Uwe(V3e, { hideOn: B3e }), - H3e -], Z3e = /* @__PURE__ */ (() => [ - Zwe(), - Jwe(), - TK(), - cM(), - GOe(), - OK(), - gwe(), - dr.allowMultipleSelections.of(!0), - DOe(), - HK(XK, { fallback: !0 }), - n4e(), - S3e(), - I3e(), - Rwe(), - Nwe(), + /* @__PURE__ */ qwe(U3e, { hideOn: F3e }), + X3e +], j3e = /* @__PURE__ */ (() => [ + jwe(), + eOe(), CK(), - w5e(), + uM(), + HOe(), + kK(), + mwe(), + dr.allowMultipleSelections.of(!0), + NOe(), + XK(ZK, { fallback: !0 }), + i4e(), + T3e(), + P3e(), + Mwe(), + Iwe(), + EK(), + O5e(), Cu.of([ - ..._3e, - ...DJ, - ...z5e, - ...aJ, - ...qOe, - ...nee, - ...Q3e + ...A3e, + ...NJ, + ...V5e, + ...oJ, + ...YOe, + ...iee, + ...W3e ]) -])(), j3e = /* @__PURE__ */ (() => [ - TK(), - cM(), - OK(), - HK(XK, { fallback: !0 }), +])(), K3e = /* @__PURE__ */ (() => [ + CK(), + uM(), + kK(), + XK(ZK, { fallback: !0 }), Cu.of([ - ...DJ, - ...aJ + ...NJ, + ...oJ ]) -])(), xl = () => /* @__PURE__ */ new Map(), R7 = (t) => { +])(), xl = () => /* @__PURE__ */ new Map(), M7 = (t) => { const e = xl(); return t.forEach((r, n) => { e.set(n, r); @@ -16013,26 +16013,26 @@ const H3e = /* @__PURE__ */ ht.baseTheme({ }, nh = (t, e, r) => { let n = t.get(e); return n === void 0 && t.set(e, n = r()), n; -}, K3e = (t, e) => { +}, J3e = (t, e) => { const r = []; for (const [n, i] of t) r.push(e(i, n)); return r; -}, J3e = (t, e) => { +}, eke = (t, e) => { for (const [r, n] of t) if (e(n, r)) return !0; return !1; -}, Jd = () => /* @__PURE__ */ new Set(), FE = (t) => t[t.length - 1], eke = (t, e) => { +}, Jd = () => /* @__PURE__ */ new Set(), zE = (t) => t[t.length - 1], tke = (t, e) => { for (let r = 0; r < e.length; r++) t.push(e[r]); -}, ff = Array.from, tke = (t, e) => { +}, ff = Array.from, rke = (t, e) => { for (let r = 0; r < t.length; r++) if (e(t[r], r, t)) return !0; return !1; -}, M7 = Array.isArray; -class ZS { +}, D7 = Array.isArray; +class jS { constructor() { this._observers = xl(); } @@ -16056,12 +16056,12 @@ class ZS { this._observers = xl(); } } -const zu = Math.floor, p4 = Math.abs, jS = (t, e) => t < e ? t : e, zf = (t, e) => t > e ? t : e, rke = Math.pow, cee = (t) => t !== 0 ? t < 0 : 1 / t < 0, qF = 1, YF = 2, zE = 4, VE = 8, zy = 32, _u = 64, ao = 128, KS = 31, D7 = 63, Ud = 127, nke = 2147483647, uee = Number.MAX_SAFE_INTEGER, ike = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && zu(t) === t), ske = String.fromCharCode, ake = (t) => t.toLowerCase(), oke = /^\s*/g, lke = (t) => t.replace(oke, ""), cke = /([A-Z])/g, QF = (t, e) => lke(t.replace(cke, (r) => `${e}${ake(r)}`)), uke = (t) => { +const zu = Math.floor, g4 = Math.abs, KS = (t, e) => t < e ? t : e, zf = (t, e) => t > e ? t : e, nke = Math.pow, uee = (t) => t !== 0 ? t < 0 : 1 / t < 0, YF = 1, QF = 2, VE = 4, UE = 8, zy = 32, _u = 64, ao = 128, JS = 31, N7 = 63, Ud = 127, ike = 2147483647, hee = Number.MAX_SAFE_INTEGER, ske = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && zu(t) === t), ake = String.fromCharCode, oke = (t) => t.toLowerCase(), lke = /^\s*/g, cke = (t) => t.replace(lke, ""), uke = /([A-Z])/g, WF = (t, e) => cke(t.replace(uke, (r) => `${e}${oke(r)}`)), hke = (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; -}, Vy = typeof TextEncoder < "u" ? new TextEncoder() : null, hke = (t) => Vy.encode(t), fke = Vy ? hke : uke; +}, Vy = typeof TextEncoder < "u" ? new TextEncoder() : null, fke = (t) => Vy.encode(t), dke = Vy ? fke : hke; let Xv = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 }); Xv && Xv.decode(new Uint8Array()).length === 1 && (Xv = null); class Jb { @@ -16069,70 +16069,70 @@ class Jb { this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = []; } } -const _s = () => new Jb(), OM = (t) => { +const _s = () => new Jb(), kM = (t) => { let e = t.cpos; for (let r = 0; r < t.bufs.length; r++) e += t.bufs[r].length; return e; }, Ln = (t) => { - const e = new Uint8Array(OM(t)); + const e = new Uint8Array(kM(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; -}, dke = (t, e) => { +}, pke = (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(zf(r, e) * 2), t.cpos = 0); }, Vi = (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; -}, N7 = Vi, Wt = (t, e) => { +}, I7 = Vi, Wt = (t, e) => { for (; e > Ud; ) Vi(t, ao | Ud & e), e = zu(e / 128); Vi(t, Ud & e); -}, kM = (t, e) => { - const r = cee(e); - for (r && (e = -e), Vi(t, (e > D7 ? ao : 0) | (r ? _u : 0) | D7 & e), e = zu(e / 64); e > 0; ) +}, SM = (t, e) => { + const r = uee(e); + for (r && (e = -e), Vi(t, (e > N7 ? ao : 0) | (r ? _u : 0) | N7 & e), e = zu(e / 64); e > 0; ) Vi(t, (e > Ud ? ao : 0) | Ud & e), e = zu(e / 128); -}, I7 = new Uint8Array(3e4), pke = I7.length / 3, gke = (t, e) => { - if (e.length < pke) { - const r = Vy.encodeInto(e, I7).written || 0; +}, P7 = new Uint8Array(3e4), gke = P7.length / 3, mke = (t, e) => { + if (e.length < gke) { + const r = Vy.encodeInto(e, P7).written || 0; Wt(t, r); for (let n = 0; n < r; n++) - Vi(t, I7[n]); + Vi(t, P7[n]); } else - Zn(t, fke(e)); -}, mke = (t, e) => { + Zn(t, dke(e)); +}, vke = (t, e) => { const r = unescape(encodeURIComponent(e)), n = r.length; Wt(t, n); for (let i = 0; i < n; i++) Vi(t, r.codePointAt(i)); -}, qd = Vy && Vy.encodeInto ? gke : mke, JS = (t, e) => { - const r = t.cbuf.length, n = t.cpos, i = jS(r - n, e.length), s = e.length - i; +}, qd = Vy && Vy.encodeInto ? mke : vke, eT = (t, e) => { + const r = t.cbuf.length, n = t.cpos, i = KS(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(zf(r * 2, s)), t.cbuf.set(e.subarray(i)), t.cpos = s); }, Zn = (t, e) => { - Wt(t, e.byteLength), JS(t, e); -}, SM = (t, e) => { - dke(t, e); + Wt(t, e.byteLength), eT(t, e); +}, TM = (t, e) => { + pke(t, e); const r = new DataView(t.cbuf.buffer, t.cpos, e); return t.cpos += e, r; -}, vke = (t, e) => SM(t, 4).setFloat32(0, e, !1), yke = (t, e) => SM(t, 8).setFloat64(0, e, !1), bke = (t, e) => SM(t, 8).setBigInt64(0, e, !1), WF = new DataView(new ArrayBuffer(4)), xke = (t) => (WF.setFloat32(0, t), WF.getFloat32(0) === t), Uy = (t, e) => { +}, yke = (t, e) => TM(t, 4).setFloat32(0, e, !1), bke = (t, e) => TM(t, 8).setFloat64(0, e, !1), xke = (t, e) => TM(t, 8).setBigInt64(0, e, !1), GF = new DataView(new ArrayBuffer(4)), wke = (t) => (GF.setFloat32(0, t), GF.getFloat32(0) === t), Uy = (t, e) => { switch (typeof e) { case "string": Vi(t, 119), qd(t, e); break; case "number": - ike(e) && p4(e) <= nke ? (Vi(t, 125), kM(t, e)) : xke(e) ? (Vi(t, 124), vke(t, e)) : (Vi(t, 123), yke(t, e)); + ske(e) && g4(e) <= ike ? (Vi(t, 125), SM(t, e)) : wke(e) ? (Vi(t, 124), yke(t, e)) : (Vi(t, 123), bke(t, e)); break; case "bigint": - Vi(t, 122), bke(t, e); + Vi(t, 122), xke(t, e); break; case "object": if (e === null) Vi(t, 126); - else if (M7(e)) { + else if (D7(e)) { Vi(t, 117), Wt(t, e.length); for (let r = 0; r < e.length; r++) Uy(t, e[r]); @@ -16155,7 +16155,7 @@ const _s = () => new Jb(), OM = (t) => { Vi(t, 127); } }; -class GF extends Jb { +class HF extends Jb { constructor(e) { super(), this.w = e, this.s = null, this.count = 0; } @@ -16163,75 +16163,75 @@ class GF extends Jb { this.s === e ? this.count++ : (this.count > 0 && Wt(this, this.count - 1), this.count = 1, this.w(this, e), this.s = e); } } -const HF = (t) => { - t.count > 0 && (kM(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && Wt(t.encoder, t.count - 2)); +const XF = (t) => { + t.count > 0 && (SM(t.encoder, t.count === 1 ? t.s : -t.s), t.count > 1 && Wt(t.encoder, t.count - 2)); }; -class g4 { +class m4 { constructor() { this.encoder = new Jb(), this.s = 0, this.count = 0; } write(e) { - this.s === e ? this.count++ : (HF(this), this.count = 1, this.s = e); + this.s === e ? this.count++ : (XF(this), this.count = 1, this.s = e); } toUint8Array() { - return HF(this), Ln(this.encoder); + return XF(this), Ln(this.encoder); } } -const XF = (t) => { +const ZF = (t) => { if (t.count > 0) { const e = t.diff * 2 + (t.count === 1 ? 0 : 1); - kM(t.encoder, e), t.count > 1 && Wt(t.encoder, t.count - 2); + SM(t.encoder, e), t.count > 1 && Wt(t.encoder, t.count - 2); } }; -class UE { +class qE { constructor() { this.encoder = new Jb(), this.s = 0, this.count = 0, this.diff = 0; } write(e) { - this.diff === e - this.s ? (this.s = e, this.count++) : (XF(this), this.count = 1, this.diff = e - this.s, this.s = e); + this.diff === e - this.s ? (this.s = e, this.count++) : (ZF(this), this.count = 1, this.diff = e - this.s, this.s = e); } toUint8Array() { - return XF(this), Ln(this.encoder); + return ZF(this), Ln(this.encoder); } } -class wke { +class Oke { constructor() { - this.sarr = [], this.s = "", this.lensE = new g4(); + this.sarr = [], this.s = "", this.lensE = new m4(); } write(e) { this.s += e, this.s.length > 19 && (this.sarr.push(this.s), this.s = ""), this.lensE.write(e.length); } toUint8Array() { const e = new Jb(); - return this.sarr.push(this.s), this.s = "", qd(e, this.sarr.join("")), JS(e, this.lensE.toUint8Array()), Ln(e); + return this.sarr.push(this.s), this.s = "", qd(e, this.sarr.join("")), eT(e, this.lensE.toUint8Array()), Ln(e); } } const df = (t) => new Error(t), Ac = () => { throw df("Method unimplemented"); }, Il = () => { throw df("Unexpected case"); -}, hee = df("Unexpected end of array"), fee = df("Integer out of Range"); -class eT { +}, fee = df("Unexpected end of array"), dee = df("Integer out of Range"); +class tT { constructor(e) { this.arr = e, this.pos = 0; } } -const Vf = (t) => new eT(t), Oke = (t) => t.pos !== t.arr.length, kke = (t, e) => { +const Vf = (t) => new tT(t), kke = (t) => t.pos !== t.arr.length, Ske = (t, e) => { const r = new Uint8Array(t.arr.buffer, t.pos + t.arr.byteOffset, e); return t.pos += e, r; -}, Es = (t) => kke(t, lr(t)), Ng = (t) => t.arr[t.pos++], lr = (t) => { +}, Es = (t) => Ske(t, lr(t)), Ng = (t) => t.arr[t.pos++], lr = (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 & Ud) * r, r *= 128, i < ao) return e; - if (e > uee) - throw fee; + if (e > hee) + throw dee; } - throw hee; -}, TM = (t) => { - let e = t.arr[t.pos++], r = e & D7, n = 64; + throw fee; +}, CM = (t) => { + let e = t.arr[t.pos++], r = e & N7, n = 64; const i = (e & _u) > 0 ? -1 : 1; if ((e & ao) === 0) return i * r; @@ -16239,11 +16239,11 @@ const Vf = (t) => new eT(t), Oke = (t) => t.pos !== t.arr.length, kke = (t, e) = for (; t.pos < s; ) { if (e = t.arr[t.pos++], r = r + (e & Ud) * n, n *= 128, e < ao) return i * r; - if (r > uee) - throw fee; + if (r > hee) + throw dee; } - throw hee; -}, Ske = (t) => { + throw fee; +}, Tke = (t) => { let e = lr(t); if (e === 0) return ""; @@ -16259,17 +16259,17 @@ const Vf = (t) => new eT(t), Oke = (t) => t.pos !== t.arr.length, kke = (t, e) = } return decodeURIComponent(escape(r)); } -}, Tke = (t) => Xv.decode(Es(t)), Zh = Xv ? Tke : Ske, CM = (t, e) => { +}, Cke = (t) => Xv.decode(Es(t)), Zh = Xv ? Cke : Tke, EM = (t, e) => { const r = new DataView(t.arr.buffer, t.arr.byteOffset + t.pos, e); return t.pos += e, r; -}, Cke = (t) => CM(t, 4).getFloat32(0, !1), Eke = (t) => CM(t, 8).getFloat64(0, !1), _ke = (t) => CM(t, 8).getBigInt64(0, !1), Ake = [ +}, Eke = (t) => EM(t, 4).getFloat32(0, !1), _ke = (t) => EM(t, 8).getFloat64(0, !1), Ake = (t) => EM(t, 8).getBigInt64(0, !1), Lke = [ (t) => { }, (t) => null, - TM, - Cke, + CM, Eke, _ke, + Ake, (t) => !1, (t) => !0, Zh, @@ -16288,56 +16288,56 @@ const Vf = (t) => new eT(t), Oke = (t) => t.pos !== t.arr.length, kke = (t, e) = return r; }, Es -], qy = (t) => Ake[127 - Ng(t)](t); -class ZF extends eT { +], qy = (t) => Lke[127 - Ng(t)](t); +class jF extends tT { constructor(e, r) { super(e), this.reader = r, this.s = null, this.count = 0; } read() { - return this.count === 0 && (this.s = this.reader(this), Oke(this) ? this.count = lr(this) + 1 : this.count = -1), this.count--, this.s; + return this.count === 0 && (this.s = this.reader(this), kke(this) ? this.count = lr(this) + 1 : this.count = -1), this.count--, this.s; } } -class m4 extends eT { +class v4 extends tT { constructor(e) { super(e), this.s = 0, this.count = 0; } read() { if (this.count === 0) { - this.s = TM(this); - const e = cee(this.s); + this.s = CM(this); + const e = uee(this.s); this.count = 1, e && (this.s = -this.s, this.count = lr(this) + 2); } return this.count--, this.s; } } -class qE extends eT { +class YE extends tT { constructor(e) { super(e), this.s = 0, this.count = 0, this.diff = 0; } read() { if (this.count === 0) { - const e = TM(this), r = e & 1; + const e = CM(this), r = e & 1; this.diff = zu(e / 2), this.count = 1, r && (this.count = lr(this) + 2); } return this.s += this.diff, this.count--, this.s; } } -class Lke { +class Rke { constructor(e) { - this.decoder = new m4(e), this.str = Zh(this.decoder), this.spos = 0; + this.decoder = new v4(e), this.str = Zh(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 Rke = crypto.getRandomValues.bind(crypto), dee = () => Rke(new Uint32Array(1))[0], Mke = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, Dke = () => Mke.replace( +const Mke = crypto.getRandomValues.bind(crypto), pee = () => Mke(new Uint32Array(1))[0], Dke = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, Nke = () => Dke.replace( /[018]/g, - (t) => (t ^ dee() & 15 >> t / 4).toString(16) -), pf = Date.now, jF = (t) => new Promise(t); + (t) => (t ^ pee() & 15 >> t / 4).toString(16) +), pf = Date.now, KF = (t) => new Promise(t); Promise.all.bind(Promise); -const KF = (t) => t === void 0 ? null : t; -class Nke { +const JF = (t) => t === void 0 ? null : t; +class Ike { constructor() { this.map = /* @__PURE__ */ new Map(); } @@ -16348,38 +16348,38 @@ class Nke { return this.map.get(e); } } -let pee = new Nke(), EM = !0; +let gee = new Ike(), _M = !0; try { - typeof localStorage < "u" && localStorage && (pee = localStorage, EM = !1); + typeof localStorage < "u" && localStorage && (gee = localStorage, _M = !1); } catch { } -const gee = pee, Ike = (t) => EM || addEventListener("storage", t), Pke = (t) => EM || removeEventListener("storage", t), $ke = Object.assign, Bke = Object.keys, Fke = (t, e) => { +const mee = gee, Pke = (t) => _M || addEventListener("storage", t), $ke = (t) => _M || removeEventListener("storage", t), Bke = Object.assign, Fke = Object.keys, zke = (t, e) => { for (const r in t) e(t[r], r); -}, zke = (t, e) => { +}, Vke = (t, e) => { const r = []; for (const n in t) r.push(e(t[n], n)); return r; -}, z5 = (t) => Bke(t).length, Vke = (t) => { +}, V5 = (t) => Fke(t).length, Uke = (t) => { for (const e in t) return !1; return !0; -}, Uke = (t, e) => { +}, qke = (t, e) => { for (const r in t) if (!e(t[r], r)) return !1; return !0; -}, mee = (t, e) => Object.prototype.hasOwnProperty.call(t, e), qke = (t, e) => t === e || z5(t) === z5(e) && Uke(t, (r, n) => (r !== void 0 || mee(e, n)) && e[n] === r), _M = (t, e, r = 0) => { +}, vee = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Yke = (t, e) => t === e || V5(t) === V5(e) && qke(t, (r, n) => (r !== void 0 || vee(e, n)) && e[n] === r), AM = (t, e, r = 0) => { try { for (; r < t.length; r++) t[r](...e); } finally { - r < t.length && _M(t, e, r + 1); + r < t.length && AM(t, e, r + 1); } -}, Yke = (t) => t, Qke = (t, e) => t === e, Zv = (t, e) => { +}, Qke = (t) => t, Wke = (t, e) => t === e, Zv = (t, e) => { if (t == null || e == null) - return Qke(t, e); + return Wke(t, e); if (t.constructor !== e.constructor) return !1; if (t === e) @@ -16412,10 +16412,10 @@ const gee = pee, Ike = (t) => EM || addEventListener("storage", t), Pke = (t) => break; } case Object: - if (z5(t) !== z5(e)) + if (V5(t) !== V5(e)) return !1; for (const r in t) - if (!mee(t, r) || !Zv(t[r], e[r])) + if (!vee(t, r) || !Zv(t[r], e[r])) return !1; break; case Array: @@ -16429,10 +16429,10 @@ const gee = pee, Ike = (t) => EM || addEventListener("storage", t), Pke = (t) => return !1; } return !0; -}, Wke = (t, e) => e.includes(t), Ig = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", vee = typeof window < "u" && typeof document < "u" && !Ig; +}, Gke = (t, e) => e.includes(t), Ig = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", yee = typeof window < "u" && typeof document < "u" && !Ig; typeof navigator < "u" && /Mac/.test(navigator.platform); let ec; -const Gke = () => { +const Hke = () => { if (ec === void 0) if (Ig) { ec = xl(); @@ -16447,44 +16447,44 @@ const Gke = () => { typeof location == "object" ? (ec = xl(), (location.search || "?").slice(1).split("&").forEach((t) => { if (t.length !== 0) { const [e, r] = t.split("="); - ec.set(`--${QF(e, "-")}`, r), ec.set(`-${QF(e, "-")}`, r); + ec.set(`--${WF(e, "-")}`, r), ec.set(`-${WF(e, "-")}`, r); } })) : ec = xl(); return ec; -}, P7 = (t) => Gke().has(t), $7 = (t) => KF(Ig ? {}[t.toUpperCase()] : gee.getItem(t)), Hke = (t) => P7("--" + t) || $7(t) !== null; -Hke("production"); -const JF = Ig && Wke({}.FORCE_COLOR, ["true", "1", "2"]), Xke = !P7("no-colors") && (!Ig || process.stdout.isTTY || JF) && (!Ig || P7("color") || JF || $7("COLORTERM") !== null || ($7("TERM") || "").includes("color")), yee = (t) => new Uint8Array(t), Zke = (t, e, r) => new Uint8Array(t, e, r), jke = (t) => new Uint8Array(t), Kke = (t) => { +}, $7 = (t) => Hke().has(t), B7 = (t) => JF(Ig ? {}[t.toUpperCase()] : mee.getItem(t)), Xke = (t) => $7("--" + t) || B7(t) !== null; +Xke("production"); +const ez = Ig && Gke({}.FORCE_COLOR, ["true", "1", "2"]), Zke = !$7("no-colors") && (!Ig || process.stdout.isTTY || ez) && (!Ig || $7("color") || ez || B7("COLORTERM") !== null || (B7("TERM") || "").includes("color")), bee = (t) => new Uint8Array(t), jke = (t, e, r) => new Uint8Array(t, e, r), Kke = (t) => new Uint8Array(t), Jke = (t) => { let e = ""; for (let r = 0; r < t.byteLength; r++) - e += ske(t[r]); + e += ake(t[r]); return btoa(e); -}, Jke = (t) => Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), eSe = (t) => { - const e = atob(t), r = yee(e.length); +}, eSe = (t) => Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), tSe = (t) => { + const e = atob(t), r = bee(e.length); for (let n = 0; n < e.length; n++) r[n] = e.charCodeAt(n); return r; -}, tSe = (t) => { +}, rSe = (t) => { const e = Buffer.from(t, "base64"); - return Zke(e.buffer, e.byteOffset, e.byteLength); -}, rSe = vee ? Kke : Jke, nSe = vee ? eSe : tSe, iSe = (t) => { - const e = yee(t.byteLength); + return jke(e.buffer, e.byteOffset, e.byteLength); +}, nSe = yee ? Jke : eSe, iSe = yee ? tSe : rSe, sSe = (t) => { + const e = bee(t.byteLength); return e.set(t), e; }; -class sSe { +class aSe { constructor(e, r) { this.left = e, this.right = r; } } -const Za = (t, e) => new sSe(t, e), aSe = (t, e) => t.forEach((r) => e(r.left, r.right)), Wc = typeof document < "u" ? document : {}, oSe = (t) => Wc.createElement(t), lSe = () => Wc.createDocumentFragment(), cSe = (t) => Wc.createTextNode(t); +const Za = (t, e) => new aSe(t, e), oSe = (t, e) => t.forEach((r) => e(r.left, r.right)), Wc = typeof document < "u" ? document : {}, lSe = (t) => Wc.createElement(t), cSe = () => Wc.createDocumentFragment(), uSe = (t) => Wc.createTextNode(t); typeof DOMParser < "u" && new DOMParser(); -const uSe = (t, e) => (aSe(e, (r, n) => { +const hSe = (t, e) => (oSe(e, (r, n) => { n === !1 ? t.removeAttribute(r) : n === !0 ? t.setAttribute(r, "") : t.setAttribute(r, n); -}), t), hSe = (t) => { - const e = lSe(); +}), t), fSe = (t) => { + const e = cSe(); for (let r = 0; r < t.length; r++) - bee(e, t[r]); + xee(e, t[r]); return e; -}, fSe = (t, e) => (bee(t, hSe(e)), t), YE = (t, e = [], r = []) => fSe(uSe(oSe(t), e), r), Mw = cSe, dSe = (t) => K3e(t, (e, r) => `${r}:${e};`).join(""), bee = (t, e) => t.appendChild(e); +}, dSe = (t, e) => (xee(t, fSe(e)), t), QE = (t, e = [], r = []) => dSe(hSe(lSe(t), e), r), Mw = uSe, pSe = (t) => J3e(t, (e, r) => `${r}:${e};`).join(""), xee = (t, e) => t.appendChild(e); Wc.ELEMENT_NODE; Wc.TEXT_NODE; Wc.CDATA_SECTION_NODE; @@ -16492,7 +16492,7 @@ Wc.COMMENT_NODE; Wc.DOCUMENT_NODE; Wc.DOCUMENT_TYPE_NODE; Wc.DOCUMENT_FRAGMENT_NODE; -const ih = Symbol, xee = ih(), wee = ih(), pSe = ih(), gSe = ih(), mSe = ih(), Oee = ih(), vSe = ih(), AM = ih(), ySe = ih(), bSe = (t) => { +const ih = Symbol, wee = ih(), Oee = ih(), gSe = ih(), mSe = ih(), vSe = ih(), kee = ih(), ySe = ih(), LM = ih(), bSe = ih(), xSe = (t) => { const e = []; let r = 0; for (; r < t.length; r++) { @@ -16500,25 +16500,25 @@ const ih = Symbol, xee = ih(), wee = ih(), pSe = ih(), gSe = ih(), mSe = ih(), O n.constructor === String || n.constructor === Number || n.constructor === Object && e.push(JSON.stringify(n)); } return e; -}, xSe = { - [xee]: Za("font-weight", "bold"), - [wee]: Za("font-weight", "normal"), - [pSe]: Za("color", "blue"), - [mSe]: Za("color", "green"), - [gSe]: Za("color", "grey"), - [Oee]: Za("color", "red"), - [vSe]: Za("color", "purple"), - [AM]: Za("color", "orange"), - [ySe]: Za("color", "black") -}, wSe = (t) => { +}, wSe = { + [wee]: Za("font-weight", "bold"), + [Oee]: Za("font-weight", "normal"), + [gSe]: Za("color", "blue"), + [vSe]: Za("color", "green"), + [mSe]: Za("color", "grey"), + [kee]: Za("color", "red"), + [ySe]: Za("color", "purple"), + [LM]: Za("color", "orange"), + [bSe]: Za("color", "black") +}, OSe = (t) => { const e = [], r = [], n = xl(); let i = [], s = 0; for (; s < t.length; s++) { - const a = t[s], o = xSe[a]; + const a = t[s], o = wSe[a]; if (o !== void 0) n.set(o.left, o.right); else if (a.constructor === String || a.constructor === Number) { - const l = dSe(n); + const l = pSe(n); s > 0 || l.length > 0 ? (e.push("%c" + a), r.push(l)) : e.push(a); } else break; @@ -16528,26 +16528,26 @@ const ih = Symbol, xee = ih(), wee = ih(), pSe = ih(), gSe = ih(), mSe = ih(), O a instanceof Symbol || i.push(a); } return i; -}, kee = Xke ? wSe : bSe, OSe = (...t) => { - console.log(...kee(t)), See.forEach((e) => e.print(t)); -}, kSe = (...t) => { - console.warn(...kee(t)), t.unshift(AM), See.forEach((e) => e.print(t)); -}, See = Jd(), Tee = (t) => ({ +}, See = Zke ? OSe : xSe, kSe = (...t) => { + console.log(...See(t)), Tee.forEach((e) => e.print(t)); +}, SSe = (...t) => { + console.warn(...See(t)), t.unshift(LM), Tee.forEach((e) => e.print(t)); +}, Tee = Jd(), Cee = (t) => ({ [Symbol.iterator]() { return this; }, next: t -}), SSe = (t, e) => Tee(() => { +}), TSe = (t, e) => Cee(() => { let r; do r = t.next(); while (!r.done && !e(r.value)); return r; -}), QE = (t, e) => Tee(() => { +}), WE = (t, e) => Cee(() => { const { done: r, value: n } = t.next(); return { done: r, value: r ? void 0 : e(n) }; }); -class LM { +class RM { constructor(e, r) { this.clock = e, this.len = r; } @@ -16561,9 +16561,9 @@ const Pg = (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]; - zee(t, s, o.clock, o.len, r); + Vee(t, s, o.clock, o.len, r); } -}), TSe = (t, e) => { +}), CSe = (t, e) => { let r = 0, n = t.length - 1; for (; r <= n; ) { const i = zu((r + n) / 2), s = t[i], a = s.clock; @@ -16577,8 +16577,8 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { return null; }, ex = (t, e) => { const r = t.clients.get(e.client); - return r !== void 0 && TSe(r, e.clock) !== null; -}, RM = (t) => { + return r !== void 0 && CSe(r, e.clock) !== null; +}, MM = (t) => { t.clients.forEach((e) => { e.sort((i, s) => i.clock - s.clock); let r, n; @@ -16588,22 +16588,22 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { } e.length = n; }); -}, B7 = (t) => { +}, F7 = (t) => { const e = new V1(); 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++) - eke(s, t[a].clients.get(i) || []); + tke(s, t[a].clients.get(i) || []); e.clients.set(i, s); } }); - return RM(e), e; + return MM(e), e; }, Yy = (t, e, r, n) => { - nh(t.clients, e, () => []).push(new LM(r, n)); -}, Cee = () => new V1(), CSe = (t) => { - const e = Cee(); + nh(t.clients, e, () => []).push(new RM(r, n)); +}, Eee = () => new V1(), ESe = (t) => { + const e = Eee(); return t.clients.forEach((r, n) => { const i = []; for (let s = 0; s < r.length; s++) { @@ -16614,7 +16614,7 @@ const Pg = (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 LM(o, l)); + i.push(new RM(o, l)); } } i.length > 0 && e.clients.set(n, i); @@ -16629,7 +16629,7 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { t.writeDsClock(a.clock), t.writeDsLen(a.len); } }); -}, MM = (t) => { +}, DM = (t) => { const e = new V1(), r = lr(t.restDecoder); for (let n = 0; n < r; n++) { t.resetDsCurVal(); @@ -16637,11 +16637,11 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { if (s > 0) { const a = nh(e.clients, i, () => []); for (let o = 0; o < s; o++) - a.push(new LM(t.readDsClock(), t.readDsLen())); + a.push(new RM(t.readDsClock(), t.readDsLen())); } } return e; -}, ez = (t, e, r) => { +}, tz = (t, e, r) => { const n = new V1(), i = lr(t.restDecoder); for (let s = 0; s < i; s++) { t.resetDsCurVal(); @@ -16651,8 +16651,8 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { if (f < u) { u < d && Yy(n, a, u, d - u); let p = Ic(l, f), g = l[p]; - for (!g.deleted && g.id.clock < f && (l.splice(p + 1, 0, H5(e, g, f - g.id.clock)), p++); p < l.length && (g = l[p++], g.id.clock < d); ) - g.deleted || (d < g.id.clock + g.length && l.splice(p, 0, H5(e, g, d - g.id.clock)), g.delete(e)); + for (!g.deleted && g.id.clock < f && (l.splice(p + 1, 0, X5(e, g, f - g.id.clock)), p++); p < l.length && (g = l[p++], g.id.clock < d); ) + g.deleted || (d < g.id.clock + g.length && l.splice(p, 0, X5(e, g, d - g.id.clock)), g.delete(e)); } else Yy(n, a, f, d - f); } @@ -16662,15 +16662,15 @@ const Pg = (t, e, r) => e.clients.forEach((n, i) => { return Wt(s.restEncoder, 0), U1(s, n), s.toUint8Array(); } return null; -}, Eee = dee; -class q1 extends ZS { - constructor({ guid: e = Dke(), 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 = Eee(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new Bee(), 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 = jF((u) => { +}, _ee = pee; +class q1 extends jS { + constructor({ guid: e = Nke(), 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 = _ee(), this.guid = e, this.collectionid = r, this.share = /* @__PURE__ */ new Map(), this.store = new Fee(), 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 = KF((u) => { this.on("load", () => { this.isLoaded = !0, u(this); }); }); - const l = () => jF((u) => { + const l = () => KF((u) => { const h = (f) => { (f === void 0 || f === !0) && (this.off("sync", h), u()); }; @@ -16752,7 +16752,7 @@ class q1 extends ZS { super.off(e, r); } } -class _ee { +class Aee { constructor(e) { this.restDecoder = e; } @@ -16765,7 +16765,7 @@ class _ee { return lr(this.restDecoder); } } -class Aee extends _ee { +class Lee extends Aee { readLeftID() { return pr(lr(this.restDecoder), lr(this.restDecoder)); } @@ -16794,7 +16794,7 @@ class Aee extends _ee { return qy(this.restDecoder); } readBuf() { - return iSe(Es(this.restDecoder)); + return sSe(Es(this.restDecoder)); } readJSON() { return JSON.parse(Zh(this.restDecoder)); @@ -16803,7 +16803,7 @@ class Aee extends _ee { return Zh(this.restDecoder); } } -class ESe { +class _Se { constructor(e) { this.dsCurrVal = 0, this.restDecoder = e; } @@ -16818,9 +16818,9 @@ class ESe { return this.dsCurrVal += e, e; } } -class $g extends ESe { +class $g extends _Se { constructor(e) { - super(e), this.keys = [], lr(e), this.keyClockDecoder = new qE(Es(e)), this.clientDecoder = new m4(Es(e)), this.leftClockDecoder = new qE(Es(e)), this.rightClockDecoder = new qE(Es(e)), this.infoDecoder = new ZF(Es(e), Ng), this.stringDecoder = new Lke(Es(e)), this.parentInfoDecoder = new ZF(Es(e), Ng), this.typeRefDecoder = new m4(Es(e)), this.lenDecoder = new m4(Es(e)); + super(e), this.keys = [], lr(e), this.keyClockDecoder = new YE(Es(e)), this.clientDecoder = new v4(Es(e)), this.leftClockDecoder = new YE(Es(e)), this.rightClockDecoder = new YE(Es(e)), this.infoDecoder = new jF(Es(e), Ng), this.stringDecoder = new Rke(Es(e)), this.parentInfoDecoder = new jF(Es(e), Ng), this.typeRefDecoder = new v4(Es(e)), this.lenDecoder = new v4(Es(e)); } readLeftID() { return new Kp(this.clientDecoder.read(), this.leftClockDecoder.read()); @@ -16865,7 +16865,7 @@ class $g extends ESe { } } } -class Lee { +class Ree { constructor() { this.restEncoder = _s(); } @@ -16881,7 +16881,7 @@ class Lee { Wt(this.restEncoder, e); } } -class tx extends Lee { +class tx extends Ree { writeLeftID(e) { Wt(this.restEncoder, e.client), Wt(this.restEncoder, e.clock); } @@ -16892,7 +16892,7 @@ class tx extends Lee { Wt(this.restEncoder, e); } writeInfo(e) { - N7(this.restEncoder, e); + I7(this.restEncoder, e); } writeString(e) { qd(this.restEncoder, e); @@ -16919,7 +16919,7 @@ class tx extends Lee { qd(this.restEncoder, e); } } -class Ree { +class Mee { constructor() { this.restEncoder = _s(), this.dsCurrVal = 0; } @@ -16937,13 +16937,13 @@ class Ree { e === 0 && Il(), Wt(this.restEncoder, e - 1), this.dsCurrVal += e; } } -class e0 extends Ree { +class e0 extends Mee { constructor() { - super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new UE(), this.clientEncoder = new g4(), this.leftClockEncoder = new UE(), this.rightClockEncoder = new UE(), this.infoEncoder = new GF(N7), this.stringEncoder = new wke(), this.parentInfoEncoder = new GF(N7), this.typeRefEncoder = new g4(), this.lenEncoder = new g4(); + super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new qE(), this.clientEncoder = new m4(), this.leftClockEncoder = new qE(), this.rightClockEncoder = new qE(), this.infoEncoder = new HF(I7), this.stringEncoder = new Oke(), this.parentInfoEncoder = new HF(I7), this.typeRefEncoder = new m4(), this.lenEncoder = new m4(); } toUint8Array() { const e = _s(); - return Wt(e, 0), Zn(e, this.keyClockEncoder.toUint8Array()), Zn(e, this.clientEncoder.toUint8Array()), Zn(e, this.leftClockEncoder.toUint8Array()), Zn(e, this.rightClockEncoder.toUint8Array()), Zn(e, Ln(this.infoEncoder)), Zn(e, this.stringEncoder.toUint8Array()), Zn(e, Ln(this.parentInfoEncoder)), Zn(e, this.typeRefEncoder.toUint8Array()), Zn(e, this.lenEncoder.toUint8Array()), JS(e, Ln(this.restEncoder)), Ln(e); + return Wt(e, 0), Zn(e, this.keyClockEncoder.toUint8Array()), Zn(e, this.clientEncoder.toUint8Array()), Zn(e, this.leftClockEncoder.toUint8Array()), Zn(e, this.rightClockEncoder.toUint8Array()), Zn(e, Ln(this.infoEncoder)), Zn(e, this.stringEncoder.toUint8Array()), Zn(e, Ln(this.parentInfoEncoder)), Zn(e, this.typeRefEncoder.toUint8Array()), Zn(e, this.lenEncoder.toUint8Array()), eT(e, Ln(this.restEncoder)), Ln(e); } writeLeftID(e) { this.clientEncoder.write(e.client), this.leftClockEncoder.write(e.clock); @@ -16983,7 +16983,7 @@ class e0 extends Ree { r === void 0 ? (this.keyClockEncoder.write(this.keyClock++), this.stringEncoder.write(e)) : this.keyClockEncoder.write(r); } } -const _Se = (t, e, r, n) => { +const ASe = (t, e, r, n) => { n = zf(n, e[0].id.clock); const i = Ic(e, n); Wt(t.restEncoder, e.length - i), t.writeClient(r), Wt(t.restEncoder, n); @@ -16991,16 +16991,16 @@ const _Se = (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); -}, DM = (t, e, r) => { +}, NM = (t, e, r) => { const n = /* @__PURE__ */ new Map(); r.forEach((i, s) => { ti(e, s) > i && n.set(s, i); - }), tT(e).forEach((i, s) => { + }), rT(e).forEach((i, s) => { r.has(s) || n.set(s, 0); }), Wt(t.restEncoder, n.size), ff(n.entries()).sort((i, s) => s[0] - i[0]).forEach(([i, s]) => { - _Se(t, e.clients.get(i), i, s); + ASe(t, e.clients.get(i), i, s); }); -}, ASe = (t, e) => { +}, LSe = (t, e) => { const r = xl(), n = lr(t.restDecoder); for (let i = 0; i < n; i++) { const s = lr(t.restDecoder), a = new Array(s), o = t.readClient(); @@ -17008,7 +17008,7 @@ const _Se = (t, e, r, n) => { r.set(o, { i: 0, refs: a }); for (let u = 0; u < s; u++) { const h = t.readInfo(); - switch (KS & h) { + switch (JS & h) { case 0: { const f = t.readLen(); a[u] = new Ao(pr(o, l), f), l += f; @@ -17028,7 +17028,7 @@ const _Se = (t, e, r, n) => { (h & _u) === _u ? t.readRightID() : null, f ? t.readParentInfo() ? e.get(t.readString()) : t.readLeftID() : null, f && (h & zy) === zy ? t.readString() : null, - ate(t, h) + ote(t, h) ); a[u] = d, l += d.length; } @@ -17036,7 +17036,7 @@ const _Se = (t, e, r, n) => { } } return r; -}, LSe = (t, e, r) => { +}, RSe = (t, e, r) => { const n = []; let i = ff(r.keys()).sort((p, g) => p - g); if (i.length === 0) @@ -17055,7 +17055,7 @@ const _Se = (t, e, r, n) => { let a = s(); if (a === null) return null; - const o = new Bee(), l = /* @__PURE__ */ new Map(), u = (p, g) => { + const o = new Fee(), l = /* @__PURE__ */ new Map(), u = (p, g) => { const m = l.get(p); (m == null || m > g) && l.set(p, g); }; @@ -17099,13 +17099,13 @@ const _Se = (t, e, r, n) => { } if (o.clients.size > 0) { const p = new e0(); - return DM(p, o, /* @__PURE__ */ new Map()), Wt(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; + return NM(p, o, /* @__PURE__ */ new Map()), Wt(p.restEncoder, 0), { missing: l, update: p.toUint8Array() }; } return null; -}, RSe = (t, e) => DM(t, e.doc.store, e.beforeState), MSe = (t, e, r, n = new $g(t)) => rn(e, (i) => { +}, MSe = (t, e) => NM(t, e.doc.store, e.beforeState), DSe = (t, e, r, n = new $g(t)) => rn(e, (i) => { i.local = !1; let s = !1; - const a = i.doc, o = a.store, l = ASe(n, a), u = LSe(i, o, l), h = o.pendingStructs; + const a = i.doc, o = a.store, l = LSe(n, a), u = RSe(i, o, l), h = o.pendingStructs; if (h) { for (const [d, p] of h.missing) if (p < ti(o, d)) { @@ -17117,68 +17117,68 @@ const _Se = (t, e, r, n) => { const g = h.missing.get(d); (g == null || g > p) && h.missing.set(d, p); } - h.update = U5([h.update, u.update]); + h.update = q5([h.update, u.update]); } } else o.pendingStructs = u; - const f = ez(n, i, o); + const f = tz(n, i, o); if (o.pendingDs) { const d = new $g(Vf(o.pendingDs)); lr(d.restDecoder); - const p = ez(d, i, o); - f && p ? o.pendingDs = U5([f, p]) : o.pendingDs = f || p; + const p = tz(d, i, o); + f && p ? o.pendingDs = q5([f, p]) : o.pendingDs = f || p; } else o.pendingDs = f; if (s) { const d = o.pendingStructs.update; - o.pendingStructs = null, Mee(i.doc, d); + o.pendingStructs = null, Dee(i.doc, d); } -}, r, !1), Mee = (t, e, r, n = $g) => { +}, r, !1), Dee = (t, e, r, n = $g) => { const i = Vf(e); - MSe(i, t, r, new n(i)); -}, DSe = (t, e, r) => Mee(t, e, r, Aee), NSe = (t, e, r = /* @__PURE__ */ new Map()) => { - DM(t, e.store, r), U1(t, CSe(e.store)); -}, ISe = (t, e = new Uint8Array([0]), r = new e0()) => { - const n = Dee(e); - NSe(r, t, n); + DSe(i, t, r, new n(i)); +}, NSe = (t, e, r) => Dee(t, e, r, Lee), ISe = (t, e, r = /* @__PURE__ */ new Map()) => { + NM(t, e.store, r), U1(t, ESe(e.store)); +}, PSe = (t, e = new Uint8Array([0]), r = new e0()) => { + const n = Nee(e); + ISe(r, t, n); const i = [r.toUint8Array()]; - if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(tTe(t.store.pendingStructs.update, e)), i.length > 1) { + if (t.store.pendingDs && i.push(t.store.pendingDs), t.store.pendingStructs && i.push(rTe(t.store.pendingStructs.update, e)), i.length > 1) { if (r.constructor === tx) - return JSe(i.map((s, a) => a === 0 ? s : nTe(s))); + return eTe(i.map((s, a) => a === 0 ? s : iTe(s))); if (r.constructor === e0) - return U5(i); + return q5(i); } return i[0]; -}, PSe = (t, e) => ISe(t, e, new tx()), $Se = (t) => { +}, $Se = (t, e) => PSe(t, e, new tx()), BSe = (t) => { const e = /* @__PURE__ */ new Map(), r = lr(t.restDecoder); for (let n = 0; n < r; n++) { const i = lr(t.restDecoder), s = lr(t.restDecoder); e.set(i, s); } return e; -}, Dee = (t) => $Se(new _ee(Vf(t))), Nee = (t, e) => (Wt(t.restEncoder, e.size), ff(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { +}, Nee = (t) => BSe(new Aee(Vf(t))), Iee = (t, e) => (Wt(t.restEncoder, e.size), ff(e.entries()).sort((r, n) => n[0] - r[0]).forEach(([r, n]) => { Wt(t.restEncoder, r), Wt(t.restEncoder, n); -}), t), BSe = (t, e) => Nee(t, tT(e.store)), FSe = (t, e = new Ree()) => (t instanceof Map ? Nee(e, t) : BSe(e, t), e.toUint8Array()), zSe = (t) => FSe(t, new Lee()); -class VSe { +}), t), FSe = (t, e) => Iee(t, rT(e.store)), zSe = (t, e = new Mee()) => (t instanceof Map ? Iee(e, t) : FSe(e, t), e.toUint8Array()), VSe = (t) => zSe(t, new Ree()); +class USe { constructor() { this.l = []; } } -const tz = () => new VSe(), rz = (t, e) => t.l.push(e), nz = (t, e) => { +const rz = () => new USe(), nz = (t, e) => t.l.push(e), iz = (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."); -}, Iee = (t, e, r) => _M(t.l, [e, r]); +}, Pee = (t, e, r) => AM(t.l, [e, r]); class Kp { constructor(e, r) { this.client = e, this.clock = r; } } -const Dp = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, pr = (t, e) => new Kp(t, e), Pee = (t) => { +const Dp = (t, e) => t === e || t !== null && e !== null && t.client === e.client && t.clock === e.clock, pr = (t, e) => new Kp(t, e), $ee = (t) => { for (const [e, r] of t.doc.share.entries()) if (r === t) return e; throw Il(); -}, V5 = (t, e) => { +}, U5 = (t, e) => { for (; e !== null; ) { if (e.parent === t) return !0; @@ -17186,24 +17186,24 @@ const Dp = (t, e) => t === e || t !== null && e !== null && t.client === e.clien } return !1; }; -class $ee { +class Bee { constructor(e, r, n, i = 0) { this.type = e, this.tname = r, this.item = n, this.assoc = i; } } -const iz = (t) => { +const sz = (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; -}, Qy = (t) => new $ee(t.type == null ? null : pr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : pr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); -class USe { +}, Qy = (t) => new Bee(t.type == null ? null : pr(t.type.client, t.type.clock), t.tname || null, t.item == null ? null : pr(t.item.client, t.item.clock), t.assoc == null ? 0 : t.assoc); +class qSe { constructor(e, r, n = 0) { this.type = e, this.index = r, this.assoc = n; } } -const qSe = (t, e, r = 0) => new USe(t, e, r), Dw = (t, e, r) => { +const YSe = (t, e, r = 0) => new qSe(t, e, r), Dw = (t, e, r) => { let n = null, i = null; - return t._item === null ? i = Pee(t) : n = pr(t._item.id.client, t._item.id.clock), new $ee(n, i, e, r); -}, F7 = (t, e, r = 0) => { + return t._item === null ? i = $ee(t) : n = pr(t._item.id.client, t._item.id.clock), new Bee(n, i, e, r); +}, z7 = (t, e, r = 0) => { let n = t._start; if (r < 0) { if (e === 0) @@ -17221,13 +17221,13 @@ const qSe = (t, e, r = 0) => new USe(t, e, r), Dw = (t, e, r) => { n = n.right; } return Dw(t, null, r); -}, z7 = (t, e) => { +}, V7 = (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 (ti(r, n.client) <= n.clock) return null; - const u = Y7(r, n), h = u.item; + const u = Q7(r, n), h = u.item; if (!(h instanceof nn)) return null; if (o = h.parent, o._item === null || !o._item.deleted) { @@ -17242,7 +17242,7 @@ const qSe = (t, e, r = 0) => new USe(t, e, r), Dw = (t, e, r) => { else if (i !== null) { if (ti(r, i.client) <= i.clock) return null; - const { item: u } = Y7(r, i); + const { item: u } = Q7(r, i); if (u instanceof nn && u.content instanceof Gc) o = u.content.type; else @@ -17251,28 +17251,28 @@ const qSe = (t, e, r = 0) => new USe(t, e, r), Dw = (t, e, r) => { throw Il(); a >= 0 ? l = o._length : l = 0; } - return qSe(o, l, t.assoc); -}, sz = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && Dp(t.item, e.item) && Dp(t.type, e.type) && t.assoc === e.assoc; -class YSe { + return YSe(o, l, t.assoc); +}, az = (t, e) => t === e || t !== null && e !== null && t.tname === e.tname && Dp(t.item, e.item) && Dp(t.type, e.type) && t.assoc === e.assoc; +class QSe { constructor(e, r) { this.ds = e, this.sv = r; } } -const QSe = (t, e) => new YSe(t, e); -QSe(Cee(), /* @__PURE__ */ new Map()); -const Tp = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !ex(e.ds, t.id), V7 = (t, e) => { - const r = nh(t.meta, V7, Jd), n = t.doc.store; +const WSe = (t, e) => new QSe(t, e); +WSe(Eee(), /* @__PURE__ */ new Map()); +const Tp = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && (e.sv.get(t.id.client) || 0) > t.id.clock && !ex(e.ds, t.id), U7 = (t, e) => { + const r = nh(t.meta, U7, Jd), n = t.doc.store; r.has(e) || (e.sv.forEach((i, s) => { i < ti(n, s) && Ca(t, pr(s, i)); }), Pg(t, e.ds, (i) => { }), r.add(e)); }; -class Bee { +class Fee { constructor() { this.clients = /* @__PURE__ */ new Map(), this.pendingStructs = null, this.pendingDs = null; } } -const tT = (t) => { +const rT = (t) => { const e = /* @__PURE__ */ new Map(); return t.clients.forEach((r, n) => { const i = r[r.length - 1]; @@ -17284,7 +17284,7 @@ const tT = (t) => { return 0; const n = r[r.length - 1]; return n.id.clock + n.length; -}, Fee = (t, e) => { +}, zee = (t, e) => { let r = t.clients.get(e.id.client); if (r === void 0) r = [], t.clients.set(e.id.client, r); @@ -17309,39 +17309,39 @@ const tT = (t) => { a = zu((r + n) / 2); } throw Il(); -}, WSe = (t, e) => { +}, GSe = (t, e) => { const r = t.clients.get(e.client); return r[Ic(r, e.clock)]; -}, v4 = WSe, U7 = (t, e, r) => { +}, y4 = GSe, q7 = (t, e, r) => { const n = Ic(e, r), i = e[n]; - return i.id.clock < r && i instanceof nn ? (e.splice(n + 1, 0, H5(t, i, r - i.id.clock)), n + 1) : n; + return i.id.clock < r && i instanceof nn ? (e.splice(n + 1, 0, X5(t, i, r - i.id.clock)), n + 1) : n; }, Ca = (t, e) => { const r = t.doc.store.clients.get(e.client); - return r[U7(t, r, e.clock)]; -}, az = (t, e, r) => { + return r[q7(t, r, e.clock)]; +}, oz = (t, e, r) => { const n = e.clients.get(r.client), i = Ic(n, r.clock), s = n[i]; - return r.clock !== s.id.clock + s.length - 1 && s.constructor !== Ao && n.splice(i + 1, 0, H5(t, s, r.clock - s.id.clock + 1)), s; -}, GSe = (t, e, r) => { + return r.clock !== s.id.clock + s.length - 1 && s.constructor !== Ao && n.splice(i + 1, 0, X5(t, s, r.clock - s.id.clock + 1)), s; +}, HSe = (t, e, r) => { const n = t.clients.get(e.id.client); n[Ic(n, e.id.clock)] = r; -}, zee = (t, e, r, n, i) => { +}, Vee = (t, e, r, n, i) => { if (n === 0) return; const s = r + n; - let a = U7(t, e, r), o; + let a = q7(t, e, r), o; do - o = e[a++], s < o.id.clock + o.length && U7(t, e, s), i(o); + o = e[a++], s < o.id.clock + o.length && q7(t, e, s), i(o); while (a < e.length && e[a].id.clock < s); }; -class HSe { +class XSe { constructor(e, r, n) { - this.doc = e, this.deleteSet = new V1(), this.beforeState = tT(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 V1(), this.beforeState = rT(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 oz = (t, e) => e.deleteSet.clients.size === 0 && !J3e(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (RM(e.deleteSet), RSe(t, e), U1(t, e.deleteSet), !0), lz = (t, e, r) => { +const lz = (t, e) => e.deleteSet.clients.size === 0 && !eke(e.afterState, (r, n) => e.beforeState.get(n) !== r) ? !1 : (MM(e.deleteSet), MSe(t, e), U1(t, e.deleteSet), !0), cz = (t, e, r) => { const n = e._item; (n === null || n.id.clock < (t.beforeState.get(n.id.client) || 0) && !n.deleted) && nh(t.changed, e, Jd).add(r); -}, y4 = (t, e) => { +}, b4 = (t, e) => { let r = t[e], n = t[e - 1], i = e; for (; i > 0; r = n, n = t[--i - 1]) { if (n.deleted === r.deleted && n.constructor === r.constructor && n.mergeWith(r)) { @@ -17352,7 +17352,7 @@ const oz = (t, e) => e.deleteSet.clients.size === 0 && !J3e(e.afterState, (r, n) } const s = e - i; return s && t.splice(e + 1 - s, s), s; -}, XSe = (t, e, r) => { +}, ZSe = (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--) { @@ -17365,20 +17365,20 @@ const oz = (t, e) => e.deleteSet.clients.size === 0 && !J3e(e.afterState, (r, n) } } } -}, ZSe = (t, e) => { +}, jSe = (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 = jS(i.length - 1, 1 + Ic(i, a.clock + a.len - 1)); + const a = r[s], o = KS(i.length - 1, 1 + Ic(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 + y4(i, l); + l -= 1 + b4(i, l); } }); -}, Vee = (t, e) => { +}, Uee = (t, e) => { if (e < t.length) { const r = t[e], n = r.doc, i = n.store, s = r.deleteSet, a = r._mergeStructs; try { - RM(s), r.afterState = tT(r.doc.store), n.emit("beforeObserverCalls", [r, n]); + MM(s), r.afterState = rT(r.doc.store), n.emit("beforeObserverCalls", [r, n]); const o = []; r.changed.forEach( (l, u) => o.push(() => { @@ -17390,60 +17390,60 @@ const oz = (t, e) => e.deleteSet.clients.size === 0 && !J3e(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), Iee(u._dEH, l, r)); + }), l.sort((h, f) => h.path.length - f.path.length), Pee(u._dEH, l, r)); }); - }), o.push(() => n.emit("afterTransaction", [r, n])), _M(o, []), r._needFormattingCleanup && vTe(r); + }), o.push(() => n.emit("afterTransaction", [r, n])), AM(o, []), r._needFormattingCleanup && yTe(r); } finally { - n.gc && XSe(s, i, n.gcFilter), ZSe(s, i), r.afterState.forEach((h, f) => { + n.gc && ZSe(s, i, n.gcFilter), jSe(s, i), r.afterState.forEach((h, f) => { const d = r.beforeState.get(f) || 0; if (d !== h) { const p = i.clients.get(f), g = zf(Ic(p, d), 1); for (let m = p.length - 1; m >= g; ) - m -= 1 + y4(p, m); + m -= 1 + b4(p, m); } }); for (let h = a.length - 1; h >= 0; h--) { const { client: f, clock: d } = a[h].id, p = i.clients.get(f), g = Ic(p, d); - g + 1 < p.length && y4(p, g + 1) > 1 || g > 0 && y4(p, g); + g + 1 < p.length && b4(p, g + 1) > 1 || g > 0 && b4(p, g); } - if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (OSe(AM, xee, "[yjs] ", wee, Oee, "Changed the client-id because another client seems to be using it."), n.clientID = Eee()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { + if (!r.local && r.afterState.get(n.clientID) !== r.beforeState.get(n.clientID) && (kSe(LM, wee, "[yjs] ", Oee, kee, "Changed the client-id because another client seems to be using it."), n.clientID = _ee()), n.emit("afterTransactionCleanup", [r, n]), n._observers.has("update")) { const h = new tx(); - oz(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); + lz(h, r) && n.emit("update", [h.toUint8Array(), r.origin, n, r]); } if (n._observers.has("updateV2")) { const h = new e0(); - oz(h, r) && n.emit("updateV2", [h.toUint8Array(), r.origin, n, r]); + lz(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])) : Vee(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])) : Uee(t, e + 1); } } }, rn = (t, e, r = null, n = !0) => { const i = t._transactionCleanups; let s = !1, a = null; - t._transaction === null && (s = !0, t._transaction = new HSe(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 XSe(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 && Vee(i, 0); + t._transaction = null, o && Uee(i, 0); } } return a; }; -class jSe { +class KSe { constructor(e, r) { this.insertions = r, this.deletions = e, this.meta = /* @__PURE__ */ new Map(); } } -const cz = (t, e, r) => { +const uz = (t, e, r) => { Pg(t, r.deletions, (n) => { - n instanceof nn && e.scope.some((i) => V5(i, n)) && UM(n, !1); + n instanceof nn && e.scope.some((i) => U5(i, n)) && qM(n, !1); }); -}, uz = (t, e, r) => { +}, hz = (t, e, r) => { let n = null, i = null; const s = t.doc, a = t.scope; if (rn(s, (o) => { @@ -17453,15 +17453,15 @@ const cz = (t, e, r) => { Pg(o, u.insertions, (p) => { if (p instanceof nn) { if (p.redone !== null) { - let { item: g, diff: m } = Y7(l, p.id); + let { item: g, diff: m } = Q7(l, p.id); m > 0 && (g = Ca(o, pr(g.id.client, g.id.clock + m))), p = g; } - !p.deleted && a.some((g) => V5(g, p)) && f.push(p); + !p.deleted && a.some((g) => U5(g, p)) && f.push(p); } }), Pg(o, u.deletions, (p) => { - p instanceof nn && a.some((g) => V5(g, p)) && !ex(u.insertions, p.id) && h.add(p); + p instanceof nn && a.some((g) => U5(g, p)) && !ex(u.insertions, p.id) && h.add(p); }), h.forEach((p) => { - d = ste(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; + d = ate(o, p, h, u.insertions, t.ignoreRemoteMapChanges, t) !== null || d; }); for (let p = f.length - 1; p >= 0; p--) { const g = f[p]; @@ -17478,14 +17478,14 @@ const cz = (t, e, r) => { } return n; }; -class NM extends ZS { +class IM extends jS { constructor(e, { captureTimeout: r = 500, captureTransaction: n = (l) => !0, deleteFilter: i = () => !0, trackedOrigins: s = /* @__PURE__ */ new Set([null]), ignoreRemoteMapChanges: a = !1, - doc: o = M7(e) ? e[0].doc : e.doc + doc: o = D7(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))) @@ -17501,11 +17501,11 @@ class NM extends ZS { 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 = B7([v.deletions, l.deleteSet]), v.insertions = B7([v.insertions, d]); + v.deletions = F7([v.deletions, l.deleteSet]), v.insertions = F7([v.insertions, d]); } else - f.push(new jSe(l.deleteSet, d)), g = !0; + f.push(new KSe(l.deleteSet, d)), g = !0; !u && !h && (this.lastChange = p), Pg(l, l.deleteSet, (v) => { - v instanceof nn && this.scope.some((y) => V5(y, v)) && UM(v, !0); + v instanceof nn && this.scope.some((y) => U5(y, v)) && qM(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); @@ -17514,8 +17514,8 @@ class NM extends ZS { }); } addToScope(e) { - e = M7(e) ? e : [e], e.forEach((r) => { - this.scope.every((n) => n !== r) && (r.doc !== this.doc && kSe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); + e = D7(e) ? e : [e], e.forEach((r) => { + this.scope.every((n) => n !== r) && (r.doc !== this.doc && SSe("[yjs#509] Not same Y.Doc"), this.scope.push(r)); }); } addTrackedOrigin(e) { @@ -17526,7 +17526,7 @@ class NM extends ZS { } clear(e = !0, r = !0) { (e && this.canUndo() || r && this.canRedo()) && this.doc.transact((n) => { - e && (this.undoStack.forEach((i) => cz(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => cz(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); + e && (this.undoStack.forEach((i) => uz(n, this, i)), this.undoStack = []), r && (this.redoStack.forEach((i) => uz(n, this, i)), this.redoStack = []), this.emit("stack-cleared", [{ undoStackCleared: e, redoStackCleared: r }]); }); } stopCapturing() { @@ -17536,7 +17536,7 @@ class NM extends ZS { this.undoing = !0; let e; try { - e = uz(this, this.undoStack, "undo"); + e = hz(this, this.undoStack, "undo"); } finally { this.undoing = !1; } @@ -17546,7 +17546,7 @@ class NM extends ZS { this.redoing = !0; let e; try { - e = uz(this, this.redoStack, "redo"); + e = hz(this, this.redoStack, "redo"); } finally { this.redoing = !1; } @@ -17562,7 +17562,7 @@ class NM extends ZS { this.trackedOrigins.delete(this), this.doc.off("afterTransaction", this.afterTransactionHandler), super.destroy(); } } -function* KSe(t) { +function* JSe(t) { const e = lr(t.restDecoder); for (let r = 0; r < e; r++) { const n = lr(t.restDecoder), i = t.readClient(); @@ -17572,7 +17572,7 @@ function* KSe(t) { if (o === 10) { const l = lr(t.restDecoder); yield new Lo(pr(i, s), l), s += l; - } else if ((KS & o) !== 0) { + } else if ((JS & o) !== 0) { const l = (o & (_u | ao)) === 0, u = new nn( pr(i, s), null, @@ -17581,7 +17581,7 @@ function* KSe(t) { (o & _u) === _u ? t.readRightID() : null, l ? t.readParentInfo() ? t.readString() : t.readLeftID() : null, l && (o & zy) === zy ? t.readString() : null, - ate(t, o) + ote(t, o) ); yield u, s += u.length; } else { @@ -17591,9 +17591,9 @@ function* KSe(t) { } } } -class IM { +class PM { constructor(e, r) { - this.gen = KSe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); + this.gen = JSe(e), this.curr = null, this.done = !1, this.filterSkips = r, this.next(); } next() { do @@ -17602,12 +17602,12 @@ class IM { return this.curr; } } -class PM { +class $M { constructor(e) { this.currClient = 0, this.startClock = 0, this.written = 0, this.encoder = e, this.clientStructs = []; } } -const JSe = (t) => U5(t, Aee, tx), eTe = (t, e) => { +const eTe = (t) => q5(t, Lee, tx), tTe = (t, e) => { if (t.constructor === Ao) { const { client: r, clock: n } = t.id; return new Ao(pr(r, n + e), t.length - e); @@ -17627,12 +17627,12 @@ const JSe = (t) => U5(t, Aee, tx), eTe = (t, e) => { r.content.splice(e) ); } -}, U5 = (t, e = $g, r = e0) => { +}, q5 = (t, e = $g, r = e0) => { if (t.length === 1) return t[0]; const n = t.map((h) => new e(Vf(h))); - let i = n.map((h) => new IM(h, !0)), s = null; - const a = new r(), o = new PM(a); + let i = n.map((h) => new PM(h, !0)), s = null; + const a = new r(), o = new $M(a); for (; i = i.filter((d) => d.curr !== null), i.sort( (d, p) => { if (d.curr.id.client === p.curr.id.client) { @@ -17661,18 +17661,18 @@ const JSe = (t) => U5(t, Aee, tx), eTe = (t, e) => { } else { const g = s.struct.id.clock + s.struct.length - d.id.clock; - g > 0 && (s.struct.constructor === Lo ? s.struct.length -= g : d = eTe(d, g)), s.struct.mergeWith(d) || (_h(o, s.struct, s.offset), s = { struct: d, offset: 0 }, h.next()); + g > 0 && (s.struct.constructor === Lo ? s.struct.length -= g : d = tTe(d, g)), s.struct.mergeWith(d) || (_h(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 !== Lo; d = h.next()) _h(o, s.struct, s.offset), s = { struct: d, offset: 0 }; } - s !== null && (_h(o, s.struct, s.offset), s = null), $M(o); - const l = n.map((h) => MM(h)), u = B7(l); + s !== null && (_h(o, s.struct, s.offset), s = null), BM(o); + const l = n.map((h) => DM(h)), u = F7(l); return U1(a, u), a.toUint8Array(); -}, tTe = (t, e, r = $g, n = e0) => { - const i = Dee(e), s = new n(), a = new PM(s), o = new r(Vf(t)), l = new IM(o, !1); +}, rTe = (t, e, r = $g, n = e0) => { + const i = Nee(e), s = new n(), a = new $M(s), o = new r(Vf(t)), l = new PM(o, !1); for (; l.curr; ) { const h = l.curr, f = h.id.client, d = i.get(f) || 0; if (l.curr.constructor === Lo) { @@ -17686,35 +17686,35 @@ const JSe = (t) => U5(t, Aee, tx), eTe = (t, e) => { for (; l.curr && l.curr.id.client === f && l.curr.id.clock + l.curr.length <= d; ) l.next(); } - $M(a); - const u = MM(o); + BM(a); + const u = DM(o); return U1(s, u), s.toUint8Array(); -}, Uee = (t) => { +}, qee = (t) => { t.written > 0 && (t.clientStructs.push({ written: t.written, restEncoder: Ln(t.encoder.restEncoder) }), t.encoder.restEncoder = _s(), t.written = 0); }, _h = (t, e, r) => { - t.written > 0 && t.currClient !== e.id.client && Uee(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), Wt(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; -}, $M = (t) => { - Uee(t); + t.written > 0 && t.currClient !== e.id.client && qee(t), t.written === 0 && (t.currClient = e.id.client, t.encoder.writeClient(e.id.client), Wt(t.encoder.restEncoder, e.id.clock + r)), e.write(t.encoder, r), t.written++; +}, BM = (t) => { + qee(t); const e = t.encoder.restEncoder; Wt(e, t.clientStructs.length); for (let r = 0; r < t.clientStructs.length; r++) { const n = t.clientStructs[r]; - Wt(e, n.written), JS(e, n.restEncoder); + Wt(e, n.written), eT(e, n.restEncoder); } -}, rTe = (t, e, r, n) => { - const i = new r(Vf(t)), s = new IM(i, !1), a = new n(), o = new PM(a); +}, nTe = (t, e, r, n) => { + const i = new r(Vf(t)), s = new PM(i, !1), a = new n(), o = new $M(a); for (let u = s.curr; u !== null; u = s.next()) _h(o, e(u), 0); - $M(o); - const l = MM(i); + BM(o); + const l = DM(i); return U1(a, l), a.toUint8Array(); -}, nTe = (t) => rTe(t, Yke, $g, tx), hz = "You must not compute changes after the event-handler fired."; -class rT { +}, iTe = (t) => nTe(t, Qke, $g, tx), fz = "You must not compute changes after the event-handler fired."; +class nT { 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 = iTe(this.currentTarget, this.target)); + return this._path || (this._path = sTe(this.currentTarget, this.target)); } deletes(e) { return ex(this.transaction.deleteSet, e.id); @@ -17722,7 +17722,7 @@ class rT { get keys() { if (this._keys === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw df(hz); + throw df(fz); const e = /* @__PURE__ */ new Map(), r = this.target; this.transaction.changed.get(r).forEach((i) => { if (i !== null) { @@ -17734,13 +17734,13 @@ class rT { l = l.left; if (this.deletes(s)) if (l !== null && this.deletes(l)) - a = "delete", o = FE(l.content.getContent()); + a = "delete", o = zE(l.content.getContent()); else return; else - l !== null && this.deletes(l) ? (a = "update", o = FE(l.content.getContent())) : (a = "add", o = void 0); + l !== null && this.deletes(l) ? (a = "update", o = zE(l.content.getContent())) : (a = "add", o = void 0); } else if (this.deletes(s)) - a = "delete", o = FE(s.content.getContent()); + a = "delete", o = zE(s.content.getContent()); else return; e.set(i, { action: a, oldValue: o }); @@ -17759,7 +17759,7 @@ class rT { let e = this._changes; if (e === null) { if (this.transaction.doc._transactionCleanups.length === 0) - throw df(hz); + throw df(fz); const r = this.target, n = Jd(), i = Jd(), s = []; if (e = { added: n, @@ -17780,7 +17780,7 @@ class rT { return e; } } -const iTe = (t, e) => { +const sTe = (t, e) => { const r = []; for (; e._item !== null && e !== t; ) { if (e._item.parentSub !== null) @@ -17794,31 +17794,31 @@ const iTe = (t, e) => { e = e._item.parent; } return r; -}, qee = 80; -let BM = 0; -class sTe { +}, Yee = 80; +let FM = 0; +class aTe { constructor(e, r) { - e.marker = !0, this.p = e, this.index = r, this.timestamp = BM++; + e.marker = !0, this.p = e, this.index = r, this.timestamp = FM++; } } -const aTe = (t) => { - t.timestamp = BM++; -}, Yee = (t, e, r) => { - t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = BM++; -}, oTe = (t, e, r) => { - if (t.length >= qee) { +const oTe = (t) => { + t.timestamp = FM++; +}, Qee = (t, e, r) => { + t.p.marker = !1, t.p = e, e.marker = !0, t.index = r, t.timestamp = FM++; +}, lTe = (t, e, r) => { + if (t.length >= Yee) { const n = t.reduce((i, s) => i.timestamp < s.timestamp ? i : s); - return Yee(n, e, r), n; + return Qee(n, e, r), n; } else { - const n = new sTe(e, r); + const n = new aTe(e, r); return t.push(n), n; } -}, nT = (t, e) => { +}, iT = (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) => p4(e - s.index) < p4(e - a.index) ? s : a); + const r = t._searchMarker.length === 0 ? null : t._searchMarker.reduce((s, a) => g4(e - s.index) < g4(e - a.index) ? s : a); let n = t._start, i = 0; - for (r !== null && (n = r.p, i = r.index, aTe(r)); n.right !== null && i < e; ) { + for (r !== null && (n = r.p, i = r.index, oTe(r)); n.right !== null && i < e; ) { if (!n.deleted && n.countable) { if (e < i + n.length) break; @@ -17830,7 +17830,7 @@ const aTe = (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 && p4(r.index - i) < n.parent.length / qee ? (Yee(r, n, i), r) : oTe(t._searchMarker, n, i); + return r !== null && g4(r.index - i) < n.parent.length / Yee ? (Qee(r, n, i), r) : lTe(t._searchMarker, n, i); }, Wy = (t, e, r) => { for (let n = t.length - 1; n >= 0; n--) { const i = t[n]; @@ -17846,15 +17846,15 @@ const aTe = (t) => { } (e < i.index || r > 0 && e === i.index) && (i.index = zf(e, i.index + r)); } -}, iT = (t, e, r) => { +}, sT = (t, e, r) => { const n = t, i = e.changedParentTypes; for (; nh(i, t, () => []).push(r), t._item !== null; ) t = t._item.parent; - Iee(n._eH, r, e); + Pee(n._eH, r, e); }; class us { constructor() { - this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = tz(), this._dEH = tz(), this._searchMarker = null; + this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = rz(), this._dEH = rz(), this._searchMarker = null; } get parent() { return this._item ? this._item.parent : null; @@ -17880,21 +17880,21 @@ class us { !e.local && this._searchMarker && (this._searchMarker.length = 0); } observe(e) { - rz(this._eH, e); + nz(this._eH, e); } observeDeep(e) { - rz(this._dEH, e); + nz(this._dEH, e); } unobserve(e) { - nz(this._eH, e); + iz(this._eH, e); } unobserveDeep(e) { - nz(this._dEH, e); + iz(this._dEH, e); } toJSON() { } } -const Qee = (t, e, r) => { +const Wee = (t, e, r) => { e < 0 && (e = t._length + e), r < 0 && (r = t._length + r); let n = r - e; const i = []; @@ -17913,7 +17913,7 @@ const Qee = (t, e, r) => { s = s.right; } return i; -}, Wee = (t) => { +}, Gee = (t) => { const e = []; let r = t._start; for (; r !== null; ) { @@ -17935,12 +17935,12 @@ const Qee = (t, e, r) => { } n = n.right; } -}, Gee = (t, e) => { +}, Hee = (t, e) => { const r = []; return Gy(t, (n, i) => { r.push(e(n, i, t)); }), r; -}, lTe = (t) => { +}, cTe = (t) => { let e = t._start, r = null, n = 0; return { [Symbol.iterator]() { @@ -17964,8 +17964,8 @@ const Qee = (t, e, r) => { }; } }; -}, Hee = (t, e) => { - const r = nT(t, e); +}, Xee = (t, e) => { + const r = iT(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) { @@ -17973,7 +17973,7 @@ const Qee = (t, e, r) => { return n.content.getContent()[e]; e -= n.length; } -}, q5 = (t, e, r, n) => { +}, Y5 = (t, e, r, n) => { let i = r; const s = t.doc, a = s.clientID, o = s.store, l = r === null ? e._start : r.right; let u = []; @@ -18009,12 +18009,12 @@ const Qee = (t, e, r) => { } } }), h(); -}, Xee = () => df("Length exceeded!"), Zee = (t, e, r, n) => { +}, Zee = () => df("Length exceeded!"), jee = (t, e, r, n) => { if (r > e._length) - throw Xee(); + throw Zee(); if (r === 0) - return e._searchMarker && Wy(e._searchMarker, r, n.length), q5(t, e, null, n); - const i = r, s = nT(e, r); + return e._searchMarker && Wy(e._searchMarker, r, n.length), Y5(t, e, null, n); + const i = r, s = iT(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) { @@ -18024,29 +18024,29 @@ const Qee = (t, e, r) => { } r -= a.length; } - return e._searchMarker && Wy(e._searchMarker, i, n.length), q5(t, e, a, n); -}, cTe = (t, e, r) => { + return e._searchMarker && Wy(e._searchMarker, i, n.length), Y5(t, e, a, n); +}, uTe = (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 q5(t, e, i, r); -}, jee = (t, e, r, n) => { + return Y5(t, e, i, r); +}, Kee = (t, e, r, n) => { if (n === 0) return; - const i = r, s = n, a = nT(e, r); + const i = r, s = n, a = iT(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 && Ca(t, pr(o.id.client, o.id.clock + r)), r -= o.length); for (; n > 0 && o !== null; ) o.deleted || (n < o.length && Ca(t, pr(o.id.client, o.id.clock + n)), o.delete(t), n -= o.length), o = o.right; if (n > 0) - throw Xee(); + throw Zee(); e._searchMarker && Wy(e._searchMarker, i, -s + n); -}, Y5 = (t, e, r) => { +}, Q5 = (t, e, r) => { const n = e._map.get(r); n !== void 0 && n.delete(t); -}, FM = (t, e, r, n) => { +}, zM = (t, e, r, n) => { const i = e._map.get(r) || null, s = t.doc, a = s.clientID; let o; if (n == null) @@ -18073,18 +18073,18 @@ const Qee = (t, e, r) => { throw new Error("Unexpected content type"); } new nn(pr(a, ti(s.store, a)), i, i && i.lastId, null, null, e, r, o).integrate(t, 0); -}, zM = (t, e) => { +}, VM = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted ? r.content.getContent()[r.length - 1] : void 0; -}, Kee = (t) => { +}, Jee = (t) => { const e = {}; return t._map.forEach((r, n) => { r.deleted || (e[n] = r.content.getContent()[r.length - 1]); }), e; -}, Jee = (t, e) => { +}, ete = (t, e) => { const r = t._map.get(e); return r !== void 0 && !r.deleted; -}, uTe = (t, e) => { +}, hTe = (t, e) => { const r = {}; return t._map.forEach((n, i) => { let s = n; @@ -18092,8 +18092,8 @@ const Qee = (t, e, r) => { s = s.left; s !== null && Tp(s, e) && (r[i] = s.content.getContent()[s.length - 1]); }), r; -}, Nw = (t) => SSe(t.entries(), (e) => !e[1].deleted); -class hTe extends rT { +}, Nw = (t) => TSe(t.entries(), (e) => !e[1].deleted); +class fTe extends nT { constructor(e, r) { super(e, r), this._transaction = r; } @@ -18122,16 +18122,16 @@ class Jp extends us { return this._prelimContent === null ? this._length : this._prelimContent.length; } _callObserver(e, r) { - super._callObserver(e, r), iT(this, e, new hTe(this, e)); + super._callObserver(e, r), sT(this, e, new fTe(this, e)); } insert(e, r) { this.doc !== null ? rn(this.doc, (n) => { - Zee(n, this, e, r); + jee(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } push(e) { this.doc !== null ? rn(this.doc, (r) => { - cTe(r, this, e); + uTe(r, this, e); }) : this._prelimContent.push(...e); } unshift(e) { @@ -18139,36 +18139,36 @@ class Jp extends us { } delete(e, r = 1) { this.doc !== null ? rn(this.doc, (n) => { - jee(n, this, e, r); + Kee(n, this, e, r); }) : this._prelimContent.splice(e, r); } get(e) { - return Hee(this, e); + return Xee(this, e); } toArray() { - return Wee(this); + return Gee(this); } slice(e = 0, r = this.length) { - return Qee(this, e, r); + return Wee(this, e, r); } toJSON() { return this.map((e) => e instanceof us ? e.toJSON() : e); } map(e) { - return Gee(this, e); + return Hee(this, e); } forEach(e) { Gy(this, e); } [Symbol.iterator]() { - return lTe(this); + return cTe(this); } _write(e) { - e.writeTypeRef(ITe); + e.writeTypeRef(PTe); } } -const fTe = (t) => new Jp(); -class dTe extends rT { +const dTe = (t) => new Jp(); +class pTe extends nT { constructor(e, r, n) { super(e, r), this.keysChanged = n; } @@ -18192,7 +18192,7 @@ class Au extends us { }), e; } _callObserver(e, r) { - iT(this, e, new dTe(this, e, r)); + sT(this, e, new pTe(this, e, r)); } toJSON() { const e = {}; @@ -18207,13 +18207,13 @@ class Au extends us { return [...Nw(this._map)].length; } keys() { - return QE(Nw(this._map), (e) => e[0]); + return WE(Nw(this._map), (e) => e[0]); } values() { - return QE(Nw(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); + return WE(Nw(this._map), (e) => e[1].content.getContent()[e[1].length - 1]); } entries() { - return QE(Nw(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); + return WE(Nw(this._map), (e) => [e[0], e[1].content.getContent()[e[1].length - 1]]); } forEach(e) { this._map.forEach((r, n) => { @@ -18225,33 +18225,33 @@ class Au extends us { } delete(e) { this.doc !== null ? rn(this.doc, (r) => { - Y5(r, this, e); + Q5(r, this, e); }) : this._prelimContent.delete(e); } set(e, r) { return this.doc !== null ? rn(this.doc, (n) => { - FM(n, this, e, r); + zM(n, this, e, r); }) : this._prelimContent.set(e, r), r; } get(e) { - return zM(this, e); + return VM(this, e); } has(e) { - return Jee(this, e); + return ete(this, e); } clear() { this.doc !== null ? rn(this.doc, (e) => { this.forEach(function(r, n, i) { - Y5(e, i, n); + Q5(e, i, n); }); }) : this._prelimContent.clear(); } _write(e) { - e.writeTypeRef(PTe); + e.writeTypeRef($Te); } } -const pTe = (t) => new Au(), Bh = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && qke(t, e); -class q7 { +const gTe = (t) => new Au(), Bh = (t, e) => t === e || typeof t == "object" && typeof e == "object" && t && e && Yke(t, e); +class Y7 { constructor(e, r, n, i) { this.left = e, this.right = r, this.index = n, this.currentAttributes = i; } @@ -18267,7 +18267,7 @@ class q7 { this.left = this.right, this.right = this.right.right; } } -const fz = (t, e, r) => { +const dz = (t, e, r) => { for (; e.right !== null && r > 0; ) { switch (e.right.content.constructor) { case Ri: @@ -18281,15 +18281,15 @@ const fz = (t, e, r) => { } return e; }, Iw = (t, e, r) => { - const n = /* @__PURE__ */ new Map(), i = nT(e, r); + const n = /* @__PURE__ */ new Map(), i = iT(e, r); if (i) { - const s = new q7(i.p.left, i.p, i.index, n); - return fz(t, s, r - i.index); + const s = new Y7(i.p.left, i.p, i.index, n); + return dz(t, s, r - i.index); } else { - const s = new q7(null, e._start, 0, n); - return fz(t, s, r); + const s = new Y7(null, e._start, 0, n); + return dz(t, s, r); } -}, ete = (t, e, r, n) => { +}, tte = (t, e, r, n) => { for (; r.right !== null && (r.right.deleted === !0 || r.right.content.constructor === Ri && Bh(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; @@ -18300,13 +18300,13 @@ const fz = (t, e, r) => { }, Y1 = (t, e) => { const { key: r, value: n } = e; n === null ? t.delete(r) : t.set(r, n); -}, tte = (t, e) => { +}, rte = (t, e) => { for (; t.right !== null; ) { if (!(t.right.deleted || t.right.content.constructor === Ri && Bh(e[t.right.content.key] || null, t.right.content.value))) break; t.forward(); } -}, rte = (t, e, r, n) => { +}, nte = (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; @@ -18317,19 +18317,19 @@ const fz = (t, e, r) => { } } return a; -}, WE = (t, e, r, n, i) => { +}, GE = (t, e, r, n, i) => { r.currentAttributes.forEach((d, p) => { i[p] === void 0 && (i[p] = null); }); const s = t.doc, a = s.clientID; - tte(r, i); - const o = rte(t, e, r, i), l = n.constructor === String ? new Pc(n) : n instanceof us ? new Gc(n) : new $0(n); + rte(r, i); + const o = nte(t, e, r, i), l = n.constructor === String ? new Pc(n) : n instanceof us ? new Gc(n) : new $0(n); let { left: u, right: h, index: f } = r; - e._searchMarker && Wy(e._searchMarker, r.index, l.getLength()), h = new nn(pr(a, ti(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(), ete(t, e, r, o); -}, dz = (t, e, r, n, i) => { + e._searchMarker && Wy(e._searchMarker, r.index, l.getLength()), h = new nn(pr(a, ti(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(), tte(t, e, r, o); +}, pz = (t, e, r, n, i) => { const s = t.doc, a = s.clientID; - tte(r, i); - const o = rte(t, e, r, i); + rte(r, i); + const o = nte(t, e, r, i); e: for (; r.right !== null && (n > 0 || o.size > 0 && (r.right.deleted || r.right.content.constructor === Ri)); ) { if (!r.right.deleted) @@ -18362,8 +18362,8 @@ const fz = (t, e, r) => { `; r.right = new nn(pr(a, ti(s.store, a)), r.left, r.left && r.left.lastId, r.right, r.right && r.right.id, e, null, new Pc(l)), r.right.integrate(t, 0), r.forward(); } - ete(t, e, r, o); -}, nte = (t, e, r, n, i) => { + tte(t, e, r, o); +}, ite = (t, e, r, n, i) => { let s = e; const a = xl(); for (; s && (!s.countable || s.deleted); ) { @@ -18388,7 +18388,7 @@ const fz = (t, e, r) => { e = e.right; } return o; -}, gTe = (t, e) => { +}, mTe = (t, e) => { for (; e && e.right && (e.right.deleted || !e.right.countable); ) e = e.right; const r = /* @__PURE__ */ new Set(); @@ -18399,11 +18399,11 @@ const fz = (t, e, r) => { } e = e.left; } -}, mTe = (t) => { +}, vTe = (t) => { let e = 0; return rn(t.doc, (r) => { let n = t._start, i = t._start, s = xl(); - const a = R7(s); + const a = M7(s); for (; i; ) { if (i.deleted === !1) switch (i.content.constructor) { @@ -18411,17 +18411,17 @@ const fz = (t, e, r) => { Y1(a, i.content); break; default: - e += nte(r, n, i, s, a), s = R7(a), n = i; + e += ite(r, n, i, s, a), s = M7(a), n = i; break; } i = i.right; } }), e; -}, vTe = (t) => { +}, yTe = (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 && zee(t, r.store.clients.get(n), s, i, (a) => { + i !== s && Vee(t, r.store.clients.get(n), s, i, (a) => { !a.deleted && a.content.constructor === Ri && a.constructor !== Ao && e.add(a.parent); }); } @@ -18430,13 +18430,13 @@ const fz = (t, e, r) => { if (i instanceof Ao || !i.parent._hasFormatting || e.has(i.parent)) return; const s = i.parent; - i.content.constructor === Ri ? e.add(s) : gTe(n, i); + i.content.constructor === Ri ? e.add(s) : mTe(n, i); }); for (const i of e) - mTe(i); + vTe(i); }); -}, pz = (t, e, r) => { - const n = r, i = R7(e.currentAttributes), s = e.right; +}, gz = (t, e, r) => { + const n = r, i = M7(e.currentAttributes), s = e.right; for (; r > 0 && e.right !== null; ) { if (e.right.deleted === !1) switch (e.right.content.constructor) { @@ -18448,11 +18448,11 @@ const fz = (t, e, r) => { } e.forward(); } - s && nte(t, s, e.right, i, e.currentAttributes); + s && ite(t, s, e.right, i, e.currentAttributes); const a = (e.left || e.right).parent; return a._searchMarker && Wy(a._searchMarker, e.index, -n + r), e; }; -class yTe extends rT { +class bTe extends nT { 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); @@ -18491,7 +18491,7 @@ class yTe extends rT { }))), u = ""; break; case "retain": - h > 0 && (p = { retain: h }, Vke(l) || (p.attributes = $ke({}, l))), h = 0; + h > 0 && (p = { retain: h }, Uke(l) || (p.attributes = Bke({}, l))), h = 0; break; } p && r.push(p), o = null; @@ -18565,8 +18565,8 @@ class Bg extends us { } _callObserver(e, r) { super._callObserver(e, r); - const n = new yTe(this, e, r); - iT(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); + const n = new bTe(this, e, r); + sT(this, e, n), !e.local && this._hasFormatting && (e._needFormattingCleanup = !0); } toString() { let e = "", r = this._start; @@ -18579,15 +18579,15 @@ class Bg extends us { } applyDelta(e, { sanitize: r = !0 } = {}) { this.doc !== null ? rn(this.doc, (n) => { - const i = new q7(null, this._start, 0, /* @__PURE__ */ new Map()); + const i = new Y7(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) && WE(n, this, i, o, a.attributes || {}); + (typeof o != "string" || o.length > 0) && GE(n, this, i, o, a.attributes || {}); } else - a.retain !== void 0 ? dz(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && pz(n, i, a.delete); + a.retain !== void 0 ? pz(n, this, i, a.retain, a.attributes || {}) : a.delete !== void 0 && gz(n, i, a.delete); } }) : this._pending.push(() => this.applyDelta(e)); } @@ -18638,7 +18638,7 @@ class Bg extends us { u(); }; return e || r ? rn(a, (f) => { - e && V7(f, e), r && V7(f, r), h(); + e && U7(f, e), r && U7(f, r), h(); }, "cleanup") : h(), i; } insert(e, r, n) { @@ -18649,14 +18649,14 @@ class Bg extends us { const a = Iw(s, this, e); n || (n = {}, a.currentAttributes.forEach((o, l) => { n[l] = o; - })), WE(s, this, a, r, n); + })), GE(s, this, a, r, n); }) : this._pending.push(() => this.insert(e, r, n)); } insertEmbed(e, r, n = {}) { const i = this.doc; i !== null ? rn(i, (s) => { const a = Iw(s, this, e); - WE(s, this, a, r, n); + GE(s, this, a, r, n); }) : this._pending.push(() => this.insertEmbed(e, r, n)); } delete(e, r) { @@ -18664,7 +18664,7 @@ class Bg extends us { return; const n = this.doc; n !== null ? rn(n, (i) => { - pz(i, Iw(i, this, e), r); + gz(i, Iw(i, this, e), r); }) : this._pending.push(() => this.delete(e, r)); } format(e, r, n) { @@ -18673,31 +18673,31 @@ class Bg extends us { const i = this.doc; i !== null ? rn(i, (s) => { const a = Iw(s, this, e); - a.right !== null && dz(s, this, a, r, n); + a.right !== null && pz(s, this, a, r, n); }) : this._pending.push(() => this.format(e, r, n)); } removeAttribute(e) { this.doc !== null ? rn(this.doc, (r) => { - Y5(r, this, e); + Q5(r, this, e); }) : this._pending.push(() => this.removeAttribute(e)); } setAttribute(e, r) { this.doc !== null ? rn(this.doc, (n) => { - FM(n, this, e, r); + zM(n, this, e, r); }) : this._pending.push(() => this.setAttribute(e, r)); } getAttribute(e) { - return zM(this, e); + return VM(this, e); } getAttributes() { - return Kee(this); + return Jee(this); } _write(e) { - e.writeTypeRef($Te); + e.writeTypeRef(BTe); } } -const bTe = (t) => new Bg(); -class GE { +const xTe = (t) => new Bg(); +class HE { constructor(e, r = () => !0) { this._filter = r, this._root = e, this._currentNode = e._start, this._firstCall = !0; } @@ -18743,21 +18743,21 @@ class t0 extends us { return this._prelimContent === null ? this._length : this._prelimContent.length; } createTreeWalker(e) { - return new GE(this, e); + return new HE(this, e); } querySelector(e) { e = e.toUpperCase(); - const n = new GE(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); + const n = new HE(this, (i) => i.nodeName && i.nodeName.toUpperCase() === e).next(); return n.done ? null : n.value; } querySelectorAll(e) { - return e = e.toUpperCase(), ff(new GE(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); + return e = e.toUpperCase(), ff(new HE(this, (r) => r.nodeName && r.nodeName.toUpperCase() === e)); } _callObserver(e, r) { - iT(this, e, new OTe(this, r, e)); + sT(this, e, new kTe(this, r, e)); } toString() { - return Gee(this, (e) => e.toString()).join(""); + return Hee(this, (e) => e.toString()).join(""); } toJSON() { return this.toString(); @@ -18770,14 +18770,14 @@ class t0 extends us { } insert(e, r) { this.doc !== null ? rn(this.doc, (n) => { - Zee(n, this, e, r); + jee(n, this, e, r); }) : this._prelimContent.splice(e, 0, ...r); } insertAfter(e, r) { if (this.doc !== null) rn(this.doc, (n) => { const i = e && e instanceof us ? e._item : e; - q5(n, this, i, r); + Y5(n, this, i, r); }); else { const n = this._prelimContent, i = e === null ? 0 : n.findIndex((s) => s === e) + 1; @@ -18788,11 +18788,11 @@ class t0 extends us { } delete(e, r = 1) { this.doc !== null ? rn(this.doc, (n) => { - jee(n, this, e, r); + Kee(n, this, e, r); }) : this._prelimContent.splice(e, r); } toArray() { - return Wee(this); + return Gee(this); } push(e) { this.insert(this.length, e); @@ -18801,19 +18801,19 @@ class t0 extends us { this.insert(0, e); } get(e) { - return Hee(this, e); + return Xee(this, e); } slice(e = 0, r = this.length) { - return Qee(this, e, r); + return Wee(this, e, r); } forEach(e) { Gy(this, e); } _write(e) { - e.writeTypeRef(FTe); + e.writeTypeRef(zTe); } } -const xTe = (t) => new t0(); +const wTe = (t) => new t0(); class Hy extends t0 { constructor(e = "UNDEFINED") { super(), this.nodeName = e, this._prelimAttrs = /* @__PURE__ */ new Map(); @@ -18836,7 +18836,7 @@ class Hy extends t0 { } clone() { const e = new Hy(this.nodeName), r = this.getAttributes(); - return Fke(r, (n, i) => { + return zke(r, (n, i) => { typeof n == "string" && e.setAttribute(i, n); }), e.insert(0, this.toArray().map((n) => n instanceof us ? n.clone() : n)), e; } @@ -18855,22 +18855,22 @@ class Hy extends t0 { } removeAttribute(e) { this.doc !== null ? rn(this.doc, (r) => { - Y5(r, this, e); + Q5(r, this, e); }) : this._prelimAttrs.delete(e); } setAttribute(e, r) { this.doc !== null ? rn(this.doc, (n) => { - FM(n, this, e, r); + zM(n, this, e, r); }) : this._prelimAttrs.set(e, r); } getAttribute(e) { - return zM(this, e); + return VM(this, e); } hasAttribute(e) { - return Jee(this, e); + return ete(this, e); } getAttributes(e) { - return e ? uTe(this, e) : Kee(this); + return e ? hTe(this, e) : Jee(this); } toDOM(e = document, r = {}, n) { const i = e.createElement(this.nodeName), s = this.getAttributes(); @@ -18883,26 +18883,26 @@ class Hy extends t0 { }), n !== void 0 && n._createAssociation(i, this), i; } _write(e) { - e.writeTypeRef(BTe), e.writeKey(this.nodeName); + e.writeTypeRef(FTe), e.writeKey(this.nodeName); } } -const wTe = (t) => new Hy(t.readKey()); -class OTe extends rT { +const OTe = (t) => new Hy(t.readKey()); +class kTe extends nT { 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 Q5 extends Au { +class W5 extends Au { constructor(e) { super(), this.hookName = e; } _copy() { - return new Q5(this.hookName); + return new W5(this.hookName); } clone() { - const e = new Q5(this.hookName); + const e = new W5(this.hookName); return this.forEach((r, n) => { e.set(n, r); }), e; @@ -18913,11 +18913,11 @@ class Q5 extends Au { 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(zTe), e.writeKey(this.hookName); + e.writeTypeRef(VTe), e.writeKey(this.hookName); } } -const kTe = (t) => new Q5(t.readKey()); -class W5 extends Bg { +const STe = (t) => new W5(t.readKey()); +class G5 extends Bg { get nextSibling() { const e = this._item ? this._item.next : null; return e ? e.content.type : null; @@ -18927,10 +18927,10 @@ class W5 extends Bg { return e ? e.content.type : null; } _copy() { - return new W5(); + return new G5(); } clone() { - const e = new W5(); + const e = new G5(); return e.applyDelta(this.toDelta()), e; } toDOM(e = document, r, n) { @@ -18967,11 +18967,11 @@ class W5 extends Bg { return this.toString(); } _write(e) { - e.writeTypeRef(VTe); + e.writeTypeRef(UTe); } } -const STe = (t) => new W5(); -class VM { +const TTe = (t) => new G5(); +class UM { constructor(e, r) { this.id = e, this.length = r; } @@ -18988,8 +18988,8 @@ class VM { throw Ac(); } } -const TTe = 0; -class Ao extends VM { +const CTe = 0; +class Ao extends UM { get deleted() { return !0; } @@ -18999,10 +18999,10 @@ class Ao extends VM { return this.constructor !== e.constructor ? !1 : (this.length += e.length, !0); } integrate(e, r) { - r > 0 && (this.id.clock += r, this.length -= r), Fee(e.doc.store, this); + r > 0 && (this.id.clock += r, this.length -= r), zee(e.doc.store, this); } write(e, r) { - e.writeInfo(TTe), e.writeLen(this.length - r); + e.writeInfo(CTe), e.writeLen(this.length - r); } getMissing(e, r) { return null; @@ -19043,7 +19043,7 @@ class rx { return 3; } } -const CTe = (t) => new rx(t.readBuf()); +const ETe = (t) => new rx(t.readBuf()); class Xy { constructor(e) { this.len = e; @@ -19081,7 +19081,7 @@ class Xy { return 1; } } -const ETe = (t) => new Xy(t.readLen()), ite = (t, e) => new q1({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); +const _Te = (t) => new Xy(t.readLen()), ste = (t, e) => new q1({ guid: t, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 }); class nx { 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; @@ -19098,7 +19098,7 @@ class nx { return !0; } copy() { - return new nx(ite(this.doc.guid, this.opts)); + return new nx(ste(this.doc.guid, this.opts)); } splice(e) { throw Ac(); @@ -19121,7 +19121,7 @@ class nx { return 9; } } -const _Te = (t) => new nx(ite(t.readString(), t.readAny())); +const ATe = (t) => new nx(ste(t.readString(), t.readAny())); class $0 { constructor(e) { this.embed = e; @@ -19157,7 +19157,7 @@ class $0 { return 5; } } -const ATe = (t) => new $0(t.readJSON()); +const LTe = (t) => new $0(t.readJSON()); class Ri { constructor(e, r) { this.key = e, this.value = r; @@ -19195,8 +19195,8 @@ class Ri { return 6; } } -const LTe = (t) => new Ri(t.readKey(), t.readJSON()); -class G5 { +const RTe = (t) => new Ri(t.readKey(), t.readJSON()); +class H5 { constructor(e) { this.arr = e; } @@ -19210,10 +19210,10 @@ class G5 { return !0; } copy() { - return new G5(this.arr); + return new H5(this.arr); } splice(e) { - const r = new G5(this.arr.slice(e)); + const r = new H5(this.arr.slice(e)); return this.arr = this.arr.slice(0, e), r; } mergeWith(e) { @@ -19237,13 +19237,13 @@ class G5 { return 2; } } -const RTe = (t) => { +const MTe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) { const i = t.readString(); i === "undefined" ? r.push(void 0) : r.push(JSON.parse(i)); } - return new G5(r); + return new H5(r); }; class r0 { constructor(e) { @@ -19286,7 +19286,7 @@ class r0 { return 8; } } -const MTe = (t) => { +const DTe = (t) => { const e = t.readLen(), r = []; for (let n = 0; n < e; n++) r.push(t.readAny()); @@ -19330,15 +19330,15 @@ class Pc { return 4; } } -const DTe = (t) => new Pc(t.readString()), NTe = [ - fTe, - pTe, - bTe, - wTe, +const NTe = (t) => new Pc(t.readString()), ITe = [ + dTe, + gTe, xTe, - kTe, - STe -], ITe = 0, PTe = 1, $Te = 2, BTe = 3, FTe = 4, zTe = 5, VTe = 6; + OTe, + wTe, + STe, + TTe +], PTe = 0, $Te = 1, BTe = 2, FTe = 3, zTe = 4, VTe = 5, UTe = 6; class Gc { constructor(e) { this.type = e; @@ -19388,19 +19388,19 @@ class Gc { return 7; } } -const UTe = (t) => new Gc(NTe[t.readTypeRef()](t)), Y7 = (t, e) => { +const qTe = (t) => new Gc(ITe[t.readTypeRef()](t)), Q7 = (t, e) => { let r = e, n = 0, i; do - n > 0 && (r = pr(r.client, r.clock + n)), i = v4(t, r), n = r.clock - i.id.clock, r = i.redone; + n > 0 && (r = pr(r.client, r.clock + n)), i = y4(t, r), n = r.clock - i.id.clock, r = i.redone; while (r !== null && i instanceof nn); return { item: i, diff: n }; -}, UM = (t, e) => { +}, qM = (t, e) => { for (; t !== null && t.keep !== e; ) t.keep = e, t = t.parent._item; -}, H5 = (t, e, r) => { +}, X5 = (t, e, r) => { const { client: n, clock: i } = e.id, s = new nn( pr(n, i + r), e, @@ -19412,13 +19412,13 @@ const UTe = (t) => new Gc(NTe[t.readTypeRef()](t)), Y7 = (t, e) => { e.content.splice(r) ); return e.deleted && s.markDeleted(), e.keep && (s.keep = !0), e.redone !== null && (s.redone = pr(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; -}, gz = (t, e) => tke(t, (r) => ex(r.deletions, e)), ste = (t, e, r, n, i, s) => { +}, mz = (t, e) => rke(t, (r) => ex(r.deletions, e)), ate = (t, e, r, n, i, s) => { const a = t.doc, o = a.store, l = a.clientID, u = e.redone; if (u !== null) return Ca(t, u); let h = e.parent._item, f = null, d; if (h !== null && h.deleted === !0) { - if (h.redone === null && (!r.has(h) || ste(t, h, r, n, i, s) === null)) + if (h.redone === null && (!r.has(h) || ate(t, h, r, n, i, s) === null)) return null; for (; h.redone !== null; ) h = Ca(t, h.redone); @@ -19446,7 +19446,7 @@ const UTe = (t) => new Gc(NTe[t.readTypeRef()](t)), Y7 = (t, e) => { d = d.right; } } else if (d = null, e.right && !i) { - for (f = e; f !== null && f.right !== null && (f.right.redone || ex(n, f.right.id) || gz(s.undoStack, f.right.id) || gz(s.redoStack, f.right.id)); ) + for (f = e; f !== null && f.right !== null && (f.right.redone || ex(n, f.right.id) || mz(s.undoStack, f.right.id) || mz(s.redoStack, f.right.id)); ) for (f = f.right; f.redone; ) f = Ca(t, f.redone); if (f && f.right !== null) @@ -19463,35 +19463,35 @@ const UTe = (t) => new Gc(NTe[t.readTypeRef()](t)), Y7 = (t, e) => { e.parentSub, e.content.copy() ); - return e.redone = m, UM(v, !0), v.integrate(t, 0), v; + return e.redone = m, qM(v, !0), v.integrate(t, 0), v; }; -class nn extends VM { +class nn extends UM { 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() ? YF : 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() ? QF : 0; } set marker(e) { - (this.info & VE) > 0 !== e && (this.info ^= VE); + (this.info & UE) > 0 !== e && (this.info ^= UE); } get marker() { - return (this.info & VE) > 0; + return (this.info & UE) > 0; } get keep() { - return (this.info & qF) > 0; + return (this.info & YF) > 0; } set keep(e) { - this.keep !== e && (this.info ^= qF); + this.keep !== e && (this.info ^= YF); } get countable() { - return (this.info & YF) > 0; + return (this.info & QF) > 0; } get deleted() { - return (this.info & zE) > 0; + return (this.info & VE) > 0; } set deleted(e) { - this.deleted !== e && (this.info ^= zE); + this.deleted !== e && (this.info ^= VE); } markDeleted() { - this.info |= zE; + this.info |= VE; } getMissing(e, r) { if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= ti(r, this.origin.client)) @@ -19500,18 +19500,18 @@ class nn extends VM { return this.rightOrigin.client; if (this.parent && this.parent.constructor === Kp && this.id.client !== this.parent.client && this.parent.clock >= ti(r, this.parent.client)) return this.parent.client; - if (this.origin && (this.left = az(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Ca(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === Ao || this.right && this.right.constructor === Ao) + if (this.origin && (this.left = oz(e, r, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = Ca(e, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === Ao || this.right && this.right.constructor === Ao) this.parent = null; else if (!this.parent) this.left && this.left.constructor === nn && (this.parent = this.left.parent, this.parentSub = this.left.parentSub), this.right && this.right.constructor === nn && (this.parent = this.right.parent, this.parentSub = this.right.parentSub); else if (this.parent.constructor === Kp) { - const n = v4(r, this.parent); + const n = y4(r, this.parent); n.constructor === Ao ? this.parent = null : this.parent = n.content.type; } return null; } integrate(e, r) { - if (r > 0 && (this.id.clock += r, this.left = az(e, e.doc.store, pr(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 = oz(e, e.doc.store, pr(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) @@ -19528,8 +19528,8 @@ class nn extends VM { n = i, s.clear(); else if (Dp(this.rightOrigin, i.rightOrigin)) break; - } else if (i.origin !== null && a.has(v4(e.doc.store, i.origin))) - s.has(v4(e.doc.store, i.origin)) || (n = i, s.clear()); + } else if (i.origin !== null && a.has(y4(e.doc.store, i.origin))) + s.has(y4(e.doc.store, i.origin)) || (n = i, s.clear()); else break; i = i.right; @@ -19548,7 +19548,7 @@ class nn extends VM { 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), Fee(e.doc.store, this), this.content.integrate(e, this), lz(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), zee(e.doc.store, this), this.content.integrate(e, this), cz(e, this.parent, this.parentSub), (this.parent._item !== null && this.parent._item.deleted || this.parentSub !== null && this.right !== null) && this.delete(e); } else new Ao(this.id, this.length).integrate(e, 0); } @@ -19579,22 +19579,22 @@ class nn extends VM { delete(e) { if (!this.deleted) { const r = this.parent; - this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), Yy(e.deleteSet, this.id.client, this.id.clock, this.length), lz(e, r, this.parentSub), this.content.delete(e); + this.countable && this.parentSub === null && (r._length -= this.length), this.markDeleted(), Yy(e.deleteSet, this.id.client, this.id.clock, this.length), cz(e, r, this.parentSub), this.content.delete(e); } } gc(e, r) { if (!this.deleted) throw Il(); - this.content.gc(e), r ? GSe(e, this, new Ao(this.id, this.length)) : this.content = new Xy(this.length); + this.content.gc(e), r ? HSe(e, this, new Ao(this.id, this.length)) : this.content = new Xy(this.length); } write(e, r) { - const n = r > 0 ? pr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & KS | (n === null ? 0 : ao) | (i === null ? 0 : _u) | (s === null ? 0 : zy); + const n = r > 0 ? pr(this.id.client, this.id.clock + r - 1) : this.origin, i = this.rightOrigin, s = this.parentSub, a = this.content.getRef() & JS | (n === null ? 0 : ao) | (i === null ? 0 : _u) | (s === null ? 0 : zy); 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 = Pee(o); + const u = $ee(o); e.writeParentInfo(!0), e.writeString(u); } else e.writeParentInfo(!1), e.writeLeftID(l.id); @@ -19605,24 +19605,24 @@ class nn extends VM { this.content.write(e, r); } } -const ate = (t, e) => qTe[e & KS](t), qTe = [ +const ote = (t, e) => YTe[e & JS](t), YTe = [ () => { Il(); }, + _Te, + MTe, ETe, + NTe, + LTe, RTe, - CTe, + qTe, DTe, ATe, - LTe, - UTe, - MTe, - _Te, () => { Il(); } -], YTe = 10; -class Lo extends VM { +], QTe = 10; +class Lo extends UM { get deleted() { return !0; } @@ -19635,38 +19635,38 @@ class Lo extends VM { Il(); } write(e, r) { - e.writeInfo(YTe), Wt(e.restEncoder, this.length - r); + e.writeInfo(QTe), Wt(e.restEncoder, this.length - r); } getMissing(e, r) { return null; } } -const ote = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : {}, lte = "__ $YJS$ __"; -ote[lte] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); -ote[lte] = !0; -class qM { +const lte = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : {}, cte = "__ $YJS$ __"; +lte[cte] === !0 && console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"); +lte[cte] = !0; +class YM { constructor(e, r) { this.yanchor = e, this.yhead = r; } toJSON() { return { - yanchor: iz(this.yanchor), - yhead: iz(this.yhead) + yanchor: sz(this.yanchor), + yhead: sz(this.yhead) }; } static fromJSON(e) { - return new qM(Qy(e.yanchor), Qy(e.yhead)); + return new YM(Qy(e.yanchor), Qy(e.yhead)); } } -class QTe { +class WTe { constructor(e, r) { - this.ytext = e, this.awareness = r, this.undoManager = new NM(e); + this.ytext = e, this.awareness = r, this.undoManager = new IM(e); } toYPos(e, r = 0) { - return F7(this.ytext, e, r); + return z7(this.ytext, e, r); } fromYPos(e) { - const r = z7(Qy(e), this.ytext.doc); + const r = V7(Qy(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 { @@ -19676,21 +19676,21 @@ class QTe { } toYRange(e) { const r = e.assoc, n = this.toYPos(e.anchor, r), i = this.toYPos(e.head, r); - return new qM(n, i); + return new YM(n, i); } fromYRange(e) { const r = this.fromYPos(e.yanchor), n = this.fromYPos(e.yhead); return r.pos === n.pos ? Ve.cursor(n.pos, n.assoc) : Ve.range(r.pos, n.pos); } } -const sT = _t.define({ +const aT = _t.define({ combine(t) { return t[t.length - 1]; } -}), Q7 = Vl.define(); -class WTe { +}), W7 = Vl.define(); +class GTe { constructor(e) { - this.view = e, this.conf = e.state.facet(sT), this._observer = (r, n) => { + this.view = e, this.conf = e.state.facet(aT), this._observer = (r, n) => { if (n.origin !== this.conf) { const i = r.delta, s = []; let a = 0; @@ -19698,12 +19698,12 @@ class WTe { 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: [Q7.of(this.conf)] }); + e.dispatch({ changes: s, annotations: [W7.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(Q7) === this.conf) + if (!e.docChanged || e.transactions.length > 0 && e.transactions[0].annotation(W7) === this.conf) return; const r = this.conf.ytext; r.doc.transact(() => { @@ -19719,7 +19719,7 @@ class WTe { this._ytext.unobserve(this._observer); } } -const GTe = on.fromClass(WTe), HTe = ht.baseTheme({ +const HTe = on.fromClass(GTe), XTe = ht.baseTheme({ ".cm-ySelection": {}, ".cm-yLineSelection": { padding: 0, @@ -19773,19 +19773,19 @@ const GTe = on.fromClass(WTe), HTe = ht.baseTheme({ opacity: 1, transitionDelay: "0s" } -}), XTe = Vl.define(); -class ZTe extends za { +}), ZTe = Vl.define(); +class jTe extends za { constructor(e, r) { super(), this.color = e, this.name = r; } toDOM() { - return YE("span", [Za("class", "cm-ySelectionCaret"), Za("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ + return QE("span", [Za("class", "cm-ySelectionCaret"), Za("style", `background-color: ${this.color}; border-color: ${this.color}`)], [ Mw("\u2060"), - YE("div", [ + QE("div", [ Za("class", "cm-ySelectionCaretDot") ]), Mw("\u2060"), - YE("div", [ + QE("div", [ Za("class", "cm-ySelectionInfo") ], [ Mw(this.name) @@ -19809,10 +19809,10 @@ class ZTe extends za { return !0; } } -class jTe { +class KTe { constructor(e) { - this.conf = e.state.facet(sT), 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: [XTe.of([])] }); + this.conf = e.state.facet(aT), 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: [ZTe.of([])] }); }, this._awareness = this.conf.awareness, this._awareness.on("change", this._listener), this.decorations = Er.of([]); } destroy() { @@ -19823,8 +19823,8 @@ class jTe { 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 : Qy(a.cursor.anchor), h = a.cursor == null ? null : Qy(a.cursor.head); if (l != null) { - const f = F7(r, l.anchor), d = F7(r, l.head); - (a.cursor == null || !sz(u, f) || !sz(h, d)) && i.setLocalStateField("cursor", { + const f = z7(r, l.anchor), d = z7(r, l.head); + (a.cursor == null || !az(u, f) || !az(h, d)) && i.setLocalStateField("cursor", { anchor: f, head: d }); @@ -19837,10 +19837,10 @@ class jTe { const u = o.cursor; if (u == null || u.anchor == null || u.head == null) return; - const h = z7(u.anchor, n), f = z7(u.head, n); + const h = V7(u.anchor, n), f = V7(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 = jS(h.index, f.index), v = zf(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 = KS(h.index, f.index), v = zf(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, @@ -19883,15 +19883,15 @@ class jTe { value: Et.widget({ side: f.index - h.index > 0 ? -1 : 1, block: !1, - widget: new ZTe(d, p) + widget: new jTe(d, p) }) }); }), this.decorations = Et.set(s, !0); } } -const KTe = on.fromClass(jTe, { +const JTe = on.fromClass(KTe, { decorations: (t) => t.decorations -}), JTe = () => { +}), eCe = () => { let t = !0; return (e, r) => { if (t) { @@ -19905,7 +19905,7 @@ const KTe = on.fromClass(jTe, { r !== void 0 && r(); }; }; -class eCe { +class tCe { constructor(e) { this.undoManager = e; } @@ -19922,14 +19922,14 @@ class eCe { return this.undoManager.redo() != null; } } -const aT = _t.define({ +const oT = _t.define({ combine(t) { return t[t.length - 1]; } }); -class tCe { +class rCe { constructor(e) { - this.view = e, this.conf = e.state.facet(aT), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(sT), this._beforeChangeSelection = null, this._mux = JTe(), this._onStackItemAdded = ({ stackItem: r, changedParentTypes: n }) => { + this.view = e, this.conf = e.state.facet(oT), this._undoManager = this.conf.undoManager, this.syncConf = e.state.facet(aT), this._beforeChangeSelection = null, this._mux = eCe(), 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); @@ -19942,34 +19942,34 @@ class tCe { }, 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(Q7) !== this.syncConf) && this._storeSelection(); + e.selectionSet && (e.transactions.length === 0 || e.transactions[0].annotation(W7) !== 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 rCe = on.fromClass(tCe), nCe = ({ state: t, dispatch: e }) => t.facet(aT).undo() || !0, iCe = ({ state: t, dispatch: e }) => t.facet(aT).redo() || !0, sCe = (t, e, { undoManager: r = new NM(t) } = {}) => { - const n = new QTe(t, e), i = [ - sT.of(n), - GTe +const nCe = on.fromClass(rCe), iCe = ({ state: t, dispatch: e }) => t.facet(oT).undo() || !0, sCe = ({ state: t, dispatch: e }) => t.facet(oT).redo() || !0, aCe = (t, e, { undoManager: r = new IM(t) } = {}) => { + const n = new WTe(t, e), i = [ + aT.of(n), + HTe ]; return e && i.push( - HTe, - KTe + XTe, + JTe ), r !== !1 && i.push( - aT.of(new eCe(r)), - rCe, + oT.of(new tCe(r)), + nCe, ht.domEventHandlers({ beforeinput(s, a) { - return s.inputType === "historyUndo" ? nCe(a) : s.inputType === "historyRedo" ? iCe(a) : !1; + return s.inputType === "historyUndo" ? iCe(a) : s.inputType === "historyRedo" ? sCe(a) : !1; } }) ), i; }; -class X5 { +class Z5 { static create(e, r, n, i, s) { let a = i + (i << 8) + e + (r << 4) | 0; - return new X5(e, r, n, a, s, [], []); + return new Z5(e, r, n, a, s, [], []); } constructor(e, r, n, i, s, a, o) { this.type = e, this.value = r, this.from = n, this.hash = i, this.end = s, this.children = a, this.positions = o, this.hashProp = [[or.contextHash, i]]; @@ -19988,12 +19988,12 @@ var mt; (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"; })(mt || (mt = {})); -class aCe { +class oCe { constructor(e, r) { this.start = e, this.content = r, this.marks = [], this.parsers = []; } } -class oCe { +class lCe { constructor() { this.text = "", this.baseIndent = 0, this.basePos = 0, this.depth = 0, this.markers = [], this.pos = 0, this.indent = 0, this.next = -1; } @@ -20040,23 +20040,23 @@ class oCe { return e + this.text.slice(this.basePos); } } -function mz(t, e, r) { +function vz(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 == mt.OrderedList ? WM : QM)(r, e, !1); - return n > 0 && (t.type != mt.BulletList || YM(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; + let n = (t.type == mt.OrderedList ? GM : WM)(r, e, !1); + return n > 0 && (t.type != mt.BulletList || QM(r, e, !1) < 0) && r.text.charCodeAt(r.pos + n - 1) == t.value; } -const cte = { +const ute = { [mt.Blockquote](t, e, r) { return r.next != 62 ? !1 : (r.markers.push(Pr(mt.QuoteMark, e.lineStart + r.pos, e.lineStart + r.pos + 1)), r.moveBase(r.pos + (rl(r.text.charCodeAt(r.pos + 1)) ? 2 : 1)), t.end = e.lineStart + r.text.length, !0); }, [mt.ListItem](t, e, r) { return r.indent < r.baseIndent + t.value && r.next > -1 ? !1 : (r.moveBaseColumn(r.baseIndent + t.value), !0); }, - [mt.OrderedList]: mz, - [mt.BulletList]: mz, + [mt.OrderedList]: vz, + [mt.BulletList]: vz, [mt.Document]() { return !0; } @@ -20069,12 +20069,12 @@ function jv(t, e = 0) { e++; return e; } -function vz(t, e, r) { +function yz(t, e, r) { for (; e > r && rl(t.charCodeAt(e - 1)); ) e--; return e; } -function ute(t) { +function hte(t) { if (t.next != 96 && t.next != 126) return -1; let e = t.pos + 1; @@ -20089,10 +20089,10 @@ function ute(t) { } return e; } -function hte(t) { +function fte(t) { return t.next != 62 ? -1 : t.text.charCodeAt(t.pos + 1) == 32 ? 2 : 1; } -function YM(t, e, r) { +function QM(t, e, r) { if (t.next != 42 && t.next != 45 && t.next != 95) return -1; let n = 1; @@ -20103,18 +20103,18 @@ function YM(t, e, r) { else if (!rl(s)) return -1; } - return r && t.next == 45 && pte(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; + return r && t.next == 45 && gte(t) > -1 && t.depth == e.stack.length || n < 3 ? -1 : 1; } -function fte(t, e) { +function dte(t, e) { for (let r = t.stack.length - 1; r >= 0; r--) if (t.stack[r].type == e) return !0; return !1; } -function QM(t, e, r) { - return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || rl(t.text.charCodeAt(t.pos + 1))) && (!r || fte(e, mt.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; -} function WM(t, e, r) { + return (t.next == 45 || t.next == 43 || t.next == 42) && (t.pos == t.text.length - 1 || rl(t.text.charCodeAt(t.pos + 1))) && (!r || dte(e, mt.BulletList) || t.skipSpace(t.pos + 2) < t.text.length) ? 1 : -1; +} +function GM(t, e, r) { let n = t.pos, i = t.next; for (; i >= 48 && i <= 57; ) { n++; @@ -20122,9 +20122,9 @@ function WM(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 && !rl(t.text.charCodeAt(n + 1)) || r && !fte(e, mt.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 && !rl(t.text.charCodeAt(n + 1)) || r && !dte(e, mt.OrderedList) && (t.skipSpace(n + 1) == t.text.length || n > t.pos + 1 || t.next != 49) ? -1 : n + 1 - t.pos; } -function dte(t) { +function pte(t) { if (t.next != 35) return -1; let e = t.pos + 1; @@ -20135,7 +20135,7 @@ function dte(t) { let r = e - t.pos; return r > 6 ? -1 : r; } -function pte(t) { +function gte(t) { if (t.next != 45 && t.next != 61 || t.indent >= t.baseIndent + 4) return -1; let e = t.pos + 1; @@ -20146,25 +20146,25 @@ function pte(t) { e++; return e == t.text.length ? r : -1; } -const W7 = /^[ \t]*$/, gte = /-->/, mte = /\?>/, G7 = [ +const G7 = /^[ \t]*$/, mte = /-->/, vte = /\?>/, H7 = [ [/^<(?:script|pre|style)(?:\s|>|$)/i, /<\/(?:script|pre|style)>/i], - [/^\s*" } } }), dre = /* @__PURE__ */ new or(), pre = /* @__PURE__ */ _te.configure({ +}), dre = /* @__PURE__ */ VS({ commentTokens: { block: { open: "" } } }), pre = /* @__PURE__ */ new or(), gre = /* @__PURE__ */ Ate.configure({ props: [ - /* @__PURE__ */ P0.add((t) => !t.is("Block") || t.is("Document") || e8(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), - /* @__PURE__ */ dre.add(e8), + /* @__PURE__ */ P0.add((t) => !t.is("Block") || t.is("Document") || t8(t) != null ? void 0 : (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })), + /* @__PURE__ */ pre.add(t8), /* @__PURE__ */ $1.add({ Document: () => null }), /* @__PURE__ */ $h.add({ - Document: fre + Document: dre }) ] }); -function e8(t) { +function t8(t) { let e = /^(?:ATX|Setext)Heading(\d)$/.exec(t.name); return e ? +e[1] : void 0; } -function U6e(t, e) { +function q6e(t, e) { let r = t; for (; ; ) { let n = r.nextSibling, i; - if (!n || (i = e8(n.type)) != null && i <= e) + if (!n || (i = t8(n.type)) != null && i <= e) break; r = n; } return r.to; } -const q6e = /* @__PURE__ */ US.of((t, e, r) => { +const Y6e = /* @__PURE__ */ qS.of((t, e, r) => { for (let n = Jr(t).resolveInner(r, -1); n && !(n.from < e); n = n.parent) { - let i = n.type.prop(dre); + let i = n.type.prop(pre); if (i == null) continue; - let s = U6e(n, i); + let s = q6e(n, i); if (s > r) return { from: r, to: s }; } return null; }); -function ZM(t) { - return new no(fre, t, [q6e], "markdown"); +function jM(t) { + return new no(dre, t, [Y6e], "markdown"); } -const Y6e = /* @__PURE__ */ ZM(pre), Q6e = /* @__PURE__ */ pre.configure([ACe, RCe, LCe, MCe, { +const Q6e = /* @__PURE__ */ jM(gre), W6e = /* @__PURE__ */ gre.configure([LCe, MCe, RCe, DCe, { props: [ /* @__PURE__ */ P0.add({ Table: (t, e) => ({ from: e.doc.lineAt(t.from).to, to: t.to }) }) ] -}]), gre = /* @__PURE__ */ ZM(Q6e); -function W6e(t, e) { +}]), mre = /* @__PURE__ */ jM(W6e); +function G6e(t, e) { return (r) => { if (r && t) { let n = null; - if (r = /\S*/.exec(r)[0], typeof t == "function" ? n = t(r) : n = _5.matchLanguageName(t, r, !0), n instanceof _5) + if (r = /\S*/.exec(r)[0], typeof t == "function" ? n = t(r) : n = A5.matchLanguageName(t, r, !0), n instanceof A5) return n.support ? n.support.language.parser : My.getSkippingParser(n.load()); if (n) return n.parser; @@ -24692,11 +24692,11 @@ class Bw { } } marker(e, r) { - let n = this.node.name == "OrderedList" ? String(+vre(this.item, e)[2] + r) : ""; + let n = this.node.name == "OrderedList" ? String(+yre(this.item, e)[2] + r) : ""; return this.spaceBefore + n + this.type + this.spaceAfter; } } -function mre(t, e) { +function vre(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); @@ -24719,13 +24719,13 @@ function mre(t, e) { } return n; } -function vre(t, e) { +function yre(t, e) { return /^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from, t.from + 10)); } -function a6(t, e, r, n = 0) { +function o6(t, e, r, n = 0) { for (let i = -1, s = t; ; ) { if (s.name == "ListItem") { - let o = vre(s, e), l = +o[2]; + let o = yre(s, e), l = +o[2]; if (i >= 0) { if (l != i + 1) return; @@ -24739,7 +24739,7 @@ function a6(t, e, r, n = 0) { s = a; } } -function t8(t, e) { +function r8(t, e) { let r = /^[ \t]*/.exec(t)[0].length; if (!r || e.facet(Xb) != " ") return t; @@ -24748,11 +24748,11 @@ function t8(t, e) { s >= 4 ? (i += " ", s -= 4) : (i += " ", s--); return i + t.slice(r); } -const G6e = ({ state: t, dispatch: e }) => { +const H6e = ({ state: t, dispatch: e }) => { let r = Jr(t), { doc: n } = t, i = null, s = t.changeByRange((a) => { - if (!a.empty || !gre.isActiveAt(t, a.from)) + if (!a.empty || !mre.isActiveAt(t, a.from)) return i = { range: a }; - let o = a.from, l = n.lineAt(o), u = mre(r.resolveInner(o, -1), n); + let o = a.from, l = n.lineAt(o), u = vre(r.resolveInner(o, -1), n); for (; u.length && u[u.length - 1].from > o - l.from; ) u.pop(); if (!u.length) @@ -24766,12 +24766,12 @@ const G6e = ({ 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" && a6(h.item, n, w, -2), v && v.node.name == "OrderedList" && a6(v.item, n, w), { range: Ve.cursor(y + b.length), changes: w }; + return h.node.name == "OrderedList" && o6(h.item, n, w, -2), v && v.node.name == "OrderedList" && o6(v.item, n, w), { range: Ve.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 ? Ml(l.text, 4, u[y + 1].from) - v.length : null, y < b); - return v = t8(v, t), { + return v = r8(v, t), { range: Ve.cursor(o + v.length + 1), changes: { from: l.from, insert: v + t.lineBreak } }; @@ -24787,7 +24787,7 @@ const G6e = ({ state: t, dispatch: e }) => { } } let d = []; - h.node.name == "OrderedList" && a6(h.item, n, d); + h.node.name == "OrderedList" && o6(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++) @@ -24795,18 +24795,18 @@ const G6e = ({ state: t, dispatch: e }) => { let m = o; for (; m > l.from && /\s/.test(l.text.charAt(m - l.from - 1)); ) m--; - return g = t8(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: Ve.cursor(m + g.length + 1), changes: d }; + return g = r8(g, t), d.push({ from: m, to: o, insert: t.lineBreak + g }), { range: Ve.cursor(m + g.length + 1), changes: d }; }); return i ? !1 : (e(t.update(s, { scrollIntoView: !0, userEvent: "input" })), !0); }; -function tV(t) { +function rV(t) { return t.name == "QuoteMark" || t.name == "ListMark"; } -function H6e(t, e) { +function X6e(t, e) { let r = t.resolveInner(e, -1), n = e; - tV(r) && (n = r.from, r = r.parent); + rV(r) && (n = r.from, r = r.parent); for (let i; i = r.childBefore(n); ) - if (tV(i)) + if (rV(i)) n = i.from; else if (i.name == "OrderedList" || i.name == "BulletList") r = i.lastChild, n = r.to; @@ -24814,11 +24814,11 @@ function H6e(t, e) { break; return r; } -const X6e = ({ state: t, dispatch: e }) => { +const Z6e = ({ state: t, dispatch: e }) => { let r = Jr(t), n = null, i = t.changeByRange((s) => { let a = s.from, { doc: o } = t; - if (s.empty && gre.isActiveAt(t, s.from)) { - let l = o.lineAt(a), u = mre(H6e(r, a), o); + if (s.empty && mre.isActiveAt(t, s.from)) { + let l = o.lineAt(a), u = vre(X6e(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))) @@ -24830,7 +24830,7 @@ const X6e = ({ 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(Ml(l.text, 4, h.to) - Ml(l.text, 4, h.from)); - return d == l.from && (p = t8(p, t)), { + return d == l.from && (p = r8(p, t)), { range: Ve.cursor(d + p.length), changes: { from: d, to: l.from + h.to, insert: p } }; @@ -24843,22 +24843,22 @@ const X6e = ({ state: t, dispatch: e }) => { return n = { range: s }; }); return n ? !1 : (e(t.update(i, { scrollIntoView: !0, userEvent: "delete" })), !0); -}, Z6e = [ - { key: "Enter", run: G6e }, - { key: "Backspace", run: X6e } -], r8 = /* @__PURE__ */ z6e({ matchClosingTags: !1 }); -function j6e(t = {}) { - let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = Y6e, completeHTMLTags: s = !0 } = t; - if (!(i instanceof oT)) +}, j6e = [ + { key: "Enter", run: H6e }, + { key: "Backspace", run: Z6e } +], n8 = /* @__PURE__ */ V6e({ matchClosingTags: !1 }); +function K6e(t = {}) { + let { codeLanguages: e, defaultCodeLanguage: r, addKeymap: n = !0, base: { parser: i } = Q6e, completeHTMLTags: s = !0 } = t; + if (!(i instanceof lT)) throw new RangeError("Base parser provided to `markdown` should be a Markdown parser"); - let a = t.extensions ? [t.extensions] : [], o = [r8.support], l; + let a = t.extensions ? [t.extensions] : [], o = [n8.support], l; r instanceof Dy ? (o.push(r.support), l = r.language) : r && (l = r); - let u = e || l ? W6e(e, l) : void 0; - a.push(xCe({ codeParser: u, htmlParser: r8.language.parser })), n && o.push(zl.high(Cu.of(Z6e))); - let h = ZM(i.configure(a)); - return s && o.push(h.data.of({ autocomplete: K6e })), new Dy(h, o); + let u = e || l ? G6e(e, l) : void 0; + a.push(wCe({ codeParser: u, htmlParser: n8.language.parser })), n && o.push(zl.high(Cu.of(j6e))); + let h = jM(i.configure(a)); + return s && o.push(h.data.of({ autocomplete: J6e })), new Dy(h, o); } -function K6e(t) { +function J6e(t) { let { state: e, pos: r } = t, n = /<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r - 25, r)); if (!n) return null; @@ -24871,25 +24871,25 @@ function K6e(t) { return { from: r - n[0].length, to: r, - options: J6e(), + options: e_e(), validFor: /^<[:\-\.\w\u00b7-\uffff]*$/ }; } -let o6 = null; -function J6e() { - if (o6) - return o6; - let t = $6e(new gM(dr.create({ extensions: r8 }), 0, !0)); - return o6 = t ? t.options : []; +let l6 = null; +function e_e() { + if (l6) + return l6; + let t = B6e(new mM(dr.create({ extensions: n8 }), 0, !0)); + return l6 = t ? t.options : []; } -function e_e(t) { +function t_e(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 yre = { exports: {} }; -const t_e = {}, r_e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +var bre = { exports: {} }; +const r_e = {}, n_e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - default: t_e -}, Symbol.toStringTag, { value: "Module" })), n_e = /* @__PURE__ */ $Z(r_e); + default: r_e +}, Symbol.toStringTag, { value: "Module" })), i_e = /* @__PURE__ */ BZ(n_e); (function(t) { var e; (function() { @@ -24945,8 +24945,8 @@ const t_e = {}, r_e = /* @__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 e_e < "u") { - var o = n_e; + } else if (typeof t_e < "u") { + var o = i_e; try { if (o.existsSync(r)) return o.readFileSync(r, n); @@ -25180,44 +25180,44 @@ const t_e = {}, r_e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin } }; })(), t.exports = e; -})(yre); -const i_e = yre.exports, bre = _t.define({ +})(bre); +const s_e = bre.exports, xre = _t.define({ combine: (t) => t[t.length - 1] -}), s_e = Et.mark({ +}), a_e = Et.mark({ class: "cm-error" -}), a_e = (t) => Object.keys(t.rules).length > 0; -function rV(t) { +}), o_e = (t) => Object.keys(t.rules).length > 0; +function nV(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 Hi(), i = t.state.facet(bre); - return a_e(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, s_e)), n.finish(); + const n = new Hi(), i = t.state.facet(xre); + return o_e(i) && t.state.doc.sliceString(e, r).replaceAll(/\w+/g, (o, l) => !i.check(o) && n.add(e + l, e + l + o.length, a_e)), n.finish(); } -const o_e = on.fromClass(class { +const l_e = on.fromClass(class { constructor(t) { - this.decorations = rV(t); + this.decorations = nV(t); } update(t) { - (t.docChanged || t.viewportChanged) && (this.decorations = rV(t.view)); + (t.docChanged || t.viewportChanged) && (this.decorations = nV(t.view)); } }, { decorations: (t) => t.decorations }); -function l_e(t) { +function c_e(t) { if (!t) return []; let { dict: e = "en_US", dictionaryPath: r = "/dictionaries" } = t; - return [bre.of(new i_e(e, null, null, { + return [xre.of(new s_e(e, null, null, { dictionaryPath: r - })), o_e]; + })), l_e]; } -const c_e = "cm-link", u_e = [{ +const u_e = "cm-link", h_e = [{ target: /`[^`\n]+`/g, cssClass: "cm-mono" }]; -function nV(t, e, r, n) { +function iV(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 Hi(), o = t.state.doc.sliceString(i, s); @@ -25235,7 +25235,7 @@ function nV(t, e, r, n) { match: f }) => { let d = { - class: c_e + class: u_e }; h.cssClass && (d.class = h.cssClass); let p; @@ -25249,89 +25249,89 @@ function nV(t, e, r, n) { })), a.add(h.from + f.index, h.from + f.index + f[0].length, Et.mark(d)), p == null || p(); }), a.finish(); } -const jM = (t, e, r) => { +const KM = (t, e, r) => { t || (t = []); - const n = t.concat(u_e); + const n = t.concat(h_e); return on.fromClass(class { constructor(i) { - this.decorations = nV(i, n, e, r); + this.decorations = iV(i, n, e, r); } update(i) { - (i.docChanged || i.viewportChanged) && (this.decorations = nV(i.view, n, e, r)); + (i.docChanged || i.viewportChanged) && (this.decorations = iV(i.view, n, e, r)); } }, { decorations: (i) => i.decorations }); -}, xre = /* @__PURE__ */ new Map(); -class h_e { +}, wre = /* @__PURE__ */ new Map(); +class f_e { constructor(e) { - this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: nSe(r.newValue || "") }), Ike(this._onChange); + this.room = e, this.onmessage = null, this._onChange = (r) => r.key === e && this.onmessage !== null && this.onmessage({ data: iSe(r.newValue || "") }), Pke(this._onChange); } postMessage(e) { - gee.setItem(this.room, rSe(jke(e))); + mee.setItem(this.room, nSe(Kke(e))); } close() { - Pke(this._onChange); + $ke(this._onChange); } } -const f_e = typeof BroadcastChannel > "u" ? h_e : BroadcastChannel, KM = (t) => nh(xre, t, () => { - const e = Jd(), r = new f_e(t); +const d_e = typeof BroadcastChannel > "u" ? f_e : BroadcastChannel, JM = (t) => nh(wre, t, () => { + const e = Jd(), r = new d_e(t); return r.onmessage = (n) => e.forEach((i) => i(n.data, "broadcastchannel")), { bc: r, subs: e }; -}), d_e = (t, e) => (KM(t).subs.add(e), e), p_e = (t, e) => { - const r = KM(t), n = r.subs.delete(e); - return n && r.subs.size === 0 && (r.bc.close(), xre.delete(t)), n; +}), p_e = (t, e) => (JM(t).subs.add(e), e), g_e = (t, e) => { + const r = JM(t), n = r.subs.delete(e); + return n && r.subs.size === 0 && (r.bc.close(), wre.delete(t)), n; }, Cp = (t, e, r = null) => { - const n = KM(t); + const n = JM(t); n.bc.postMessage(e), n.subs.forEach((i) => i(e, r)); -}, wre = 0, JM = 1, Ore = 2, n8 = (t, e) => { - Wt(t, wre); - const r = zSe(e); +}, Ore = 0, eD = 1, kre = 2, i8 = (t, e) => { + Wt(t, Ore); + const r = VSe(e); Zn(t, r); -}, kre = (t, e, r) => { - Wt(t, JM), Zn(t, PSe(e, r)); -}, g_e = (t, e, r) => kre(e, r, Es(t)), Sre = (t, e, r) => { +}, Sre = (t, e, r) => { + Wt(t, eD), Zn(t, $Se(e, r)); +}, m_e = (t, e, r) => Sre(e, r, Es(t)), Tre = (t, e, r) => { try { - DSe(e, Es(t), r); + NSe(e, Es(t), r); } catch (n) { console.error("Caught error while handling a Yjs update", n); } -}, m_e = (t, e) => { - Wt(t, Ore), Zn(t, e); -}, v_e = Sre, y_e = (t, e, r, n) => { +}, v_e = (t, e) => { + Wt(t, kre), Zn(t, e); +}, y_e = Tre, b_e = (t, e, r, n) => { const i = lr(t); switch (i) { - case wre: - g_e(t, e, r); + case Ore: + m_e(t, e, r); break; - case JM: - Sre(t, r, n); + case eD: + Tre(t, r, n); break; - case Ore: - v_e(t, r, n); + case kre: + y_e(t, r, n); break; default: throw new Error("Unknown message type"); } return i; -}, b_e = 0, x_e = (t, e, r) => { +}, x_e = 0, w_e = (t, e, r) => { switch (lr(t)) { - case b_e: + case x_e: r(e, Zh(t)); } -}, l6 = 3e4; -class Tre extends ZS { +}, c6 = 3e4; +class Cre extends jS { 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 = pf(); - this.getLocalState() !== null && l6 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); + this.getLocalState() !== null && c6 / 2 <= r - this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState()); const n = []; this.meta.forEach((i, s) => { - s !== this.clientID && l6 <= r - i.lastUpdated && this.states.has(s) && n.push(s); - }), n.length > 0 && eD(this, n, "timeout"); - }, zu(l6 / 10)), e.on("destroy", () => { + s !== this.clientID && c6 <= r - i.lastUpdated && this.states.has(s) && n.push(s); + }), n.length > 0 && tD(this, n, "timeout"); + }, zu(c6 / 10)), e.on("destroy", () => { this.destroy(); }), this.setLocalState({}); } @@ -25361,7 +25361,7 @@ class Tre extends ZS { return this.states; } } -const eD = (t, e, r) => { +const tD = (t, e, r) => { const n = []; for (let i = 0; i < e.length; i++) { const s = e[i]; @@ -25385,7 +25385,7 @@ const eD = (t, e, r) => { Wt(i, a), Wt(i, l), qd(i, JSON.stringify(o)); } return Ln(i); -}, w_e = (t, e, r) => { +}, O_e = (t, e, r) => { const n = Vf(e), i = pf(), s = [], a = [], o = [], l = [], u = lr(n); for (let h = 0; h < u; h++) { const f = lr(n); @@ -25405,18 +25405,18 @@ const eD = (t, e, r) => { updated: a, removed: l }, r]); -}, O_e = (t) => zke(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), Ld = 0, Cre = 3, tg = 1, k_e = 2, ix = []; +}, k_e = (t) => Vke(t, (e, r) => `${encodeURIComponent(r)}=${encodeURIComponent(e)}`).join("&"), Ld = 0, Ere = 3, tg = 1, S_e = 2, ix = []; ix[Ld] = (t, e, r, n, i) => { Wt(t, Ld); - const s = y_e( + const s = b_e( e, t, r.doc, r ); - n && s === JM && !r.synced && (r.synced = !0); + n && s === eD && !r.synced && (r.synced = !0); }; -ix[Cre] = (t, e, r, n, i) => { +ix[Ere] = (t, e, r, n, i) => { Wt(t, tg), Zn( t, Jv( @@ -25426,34 +25426,34 @@ ix[Cre] = (t, e, r, n, i) => { ); }; ix[tg] = (t, e, r, n, i) => { - w_e( + O_e( r.awareness, Es(e), r ); }; -ix[k_e] = (t, e, r, n, i) => { - x_e( +ix[S_e] = (t, e, r, n, i) => { + w_e( e, r.doc, - (s, a) => S_e(r, a) + (s, a) => T_e(r, a) ); }; -const iV = 3e4, S_e = (t, e) => console.warn(`Permission denied to access ${t.url}. -${e}`), Ere = (t, e, r) => { +const sV = 3e4, T_e = (t, e) => console.warn(`Permission denied to access ${t.url}. +${e}`), _re = (t, e, r) => { const n = Vf(e), i = _s(), s = lr(n), a = t.messageHandlers[s]; return a ? a(i, n, t, r, s) : console.error("Unable to compute message"), i; -}, _re = (t) => { +}, Are = (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 = pf(); - const n = Ere(t, new Uint8Array(r.data), !0); - OM(n) > 1 && e.send(Ln(n)); + const n = _re(t, new Uint8Array(r.data), !0); + kM(n) > 1 && e.send(Ln(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, eD( + t.emit("connection-close", [r, t]), t.ws = null, t.wsconnecting = !1, t.wsconnected ? (t.wsconnected = !1, t.synced = !1, tD( t.awareness, Array.from(t.awareness.getStates().keys()).filter( (n) => n !== t.doc.clientID @@ -25462,9 +25462,9 @@ ${e}`), Ere = (t, e, r) => { ), t.emit("status", [{ status: "disconnected" }])) : t.wsUnsuccessfulReconnects++, setTimeout( - _re, - jS( - rke(2, t.wsUnsuccessfulReconnects) * 100, + Are, + KS( + nke(2, t.wsUnsuccessfulReconnects) * 100, t.maxBackoffTime ), t @@ -25474,7 +25474,7 @@ ${e}`), Ere = (t, e, r) => { status: "connected" }]); const r = _s(); - if (Wt(r, Ld), n8(r, t.doc), e.send(Ln(r)), t.awareness.getLocalState() !== null) { + if (Wt(r, Ld), i8(r, t.doc), e.send(Ln(r)), t.awareness.getLocalState() !== null) { const n = _s(); Wt(n, tg), Zn( n, @@ -25487,14 +25487,14 @@ ${e}`), Ere = (t, e, r) => { status: "connecting" }]); } -}, c6 = (t, e) => { +}, u6 = (t, e) => { const r = t.ws; t.wsconnected && r && r.readyState === r.OPEN && r.send(e), t.bcconnected && Cp(t.bcChannel, e, t); }; -class Are extends ZS { +class Lre extends jS { constructor(e, r, n, { connect: i = !0, - awareness: s = new Tre(n), + awareness: s = new Cre(n), params: a = {}, WebSocketPolyfill: o = WebSocket, resyncInterval: l = -1, @@ -25503,37 +25503,37 @@ class Are extends ZS { } = {}) { for (super(); e[e.length - 1] === "/"; ) e = e.slice(0, e.length - 1); - const f = O_e(a); + const f = k_e(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 = ix.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 = _s(); - Wt(d, Ld), n8(d, n), this.ws.send(Ln(d)); + Wt(d, Ld), i8(d, n), this.ws.send(Ln(d)); } }, l)), this._bcSubscriber = (d, p) => { if (p !== this) { - const g = Ere(this, new Uint8Array(d), !1); - OM(g) > 1 && Cp(this.bcChannel, Ln(g), this); + const g = _re(this, new Uint8Array(d), !1); + kM(g) > 1 && Cp(this.bcChannel, Ln(g), this); } }, this._updateHandler = (d, p) => { if (p !== this) { const g = _s(); - Wt(g, Ld), m_e(g, d), c6(this, Ln(g)); + Wt(g, Ld), v_e(g, d), u6(this, Ln(g)); } }, this.doc.on("update", this._updateHandler), this._awarenessUpdateHandler = ({ added: d, updated: p, removed: g }, m) => { const v = d.concat(p).concat(g), y = _s(); Wt(y, tg), Zn( y, Jv(s, v) - ), c6(this, Ln(y)); + ), u6(this, Ln(y)); }, this._unloadHandler = () => { - eD( + tD( 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 && iV < pf() - this.wsLastMessageReceived && this.ws.close(); - }, iV / 10), i && this.connect(); + this.wsconnected && sV < pf() - this.wsLastMessageReceived && this.ws.close(); + }, sV / 10), i && this.connect(); } get synced() { return this._synced; @@ -25547,13 +25547,13 @@ class Are extends ZS { connectBc() { if (this.disableBc) return; - this.bcconnected || (d_e(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); + this.bcconnected || (p_e(this.bcChannel, this._bcSubscriber), this.bcconnected = !0); const e = _s(); - Wt(e, Ld), n8(e, this.doc), Cp(this.bcChannel, Ln(e), this); + Wt(e, Ld), i8(e, this.doc), Cp(this.bcChannel, Ln(e), this); const r = _s(); - Wt(r, Ld), kre(r, this.doc), Cp(this.bcChannel, Ln(r), this); + Wt(r, Ld), Sre(r, this.doc), Cp(this.bcChannel, Ln(r), this); const n = _s(); - Wt(n, Cre), Cp( + Wt(n, Ere), Cp( this.bcChannel, Ln(n), this @@ -25577,19 +25577,19 @@ class Are extends ZS { Jv(this.awareness, [ this.doc.clientID ], /* @__PURE__ */ new Map()) - ), c6(this, Ln(e)), this.bcconnected && (p_e(this.bcChannel, this._bcSubscriber), this.bcconnected = !1); + ), u6(this, Ln(e)), this.bcconnected && (g_e(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 && (_re(this), this.connectBc()); + this.shouldConnect = !0, !this.wsconnected && this.ws === null && (Are(this), this.connectBc()); } } -const T_e = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), Jy = _t.define({ +const C_e = (t) => ["input", "delete", "undo", "redo"].some((e) => t.isUserEvent(e)), Jy = _t.define({ combine: (t) => t[t.length - 1], static: !0 -}), Lre = Zt.define(), C_e = on.fromClass(class { +}), Rre = Zt.define(), E_e = on.fromClass(class { constructor(t) { this.decorations = this.colorEditorLines(t); } @@ -25626,29 +25626,29 @@ const T_e = (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(Lre)))) && (t.transactions.filter(T_e).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ - effects: i8.of(null) + (t.docChanged || t.viewportChanged || t.transactions.some((e) => e.effects.some((r) => r.is(Rre)))) && (t.transactions.filter(C_e).forEach((e) => this.markLinesEditedInTransaction(e)), this.decorations = this.colorEditorLines(t.view)), t.view.dom.onmouseleave = () => t.view.dispatch({ + effects: s8.of(null) }), t.view.dom.querySelectorAll(".cm-line").forEach((e) => { e.onmouseenter = (r) => t.view.dispatch({ - effects: i8.of(parseInt(r.target.dataset.lineNumber)) + effects: s8.of(parseInt(r.target.dataset.lineNumber)) }); }); } }, { decorations: (t) => t.decorations -}), i8 = Zt.define(), n3 = $n.define({ +}), s8 = Zt.define(), i3 = $n.define({ create() { return null; }, update(t, e) { var i; - const r = e.state.facet(Jy), n = (i = e.effects.find((s) => s.is(i8))) == null ? void 0 : i.value; + const r = e.state.facet(Jy), n = (i = e.effects.find((s) => s.is(s8))) == null ? void 0 : i.value; return n ? r.firstLineOfSection(n) : null; } }); -class sV extends Uo { +class aV extends Uo { constructor(e, r) { - super(), r && e && (this.lineNumber = r.state.doc.lineAt(e.to).number, this.lineAuthors = r.state.facet(Jy), this.selectedLine = r.state.facet(n3)); + super(), r && e && (this.lineNumber = r.state.doc.lineAt(e.to).number, this.lineAuthors = r.state.facet(Jy), this.selectedLine = r.state.facet(i3)); } authorAvatar() { const { @@ -25661,11 +25661,11 @@ class sV extends Uo { return this.selectedLine && this.selectedLine == this.lineNumber ? this.authorAvatar() : document.createElement("div"); } } -const E_e = FS({ - lineMarker: (t, e) => new sV(e, t), - lineMarkerChange: (t) => t.startState.field(n3) != t.state.field(n3), - initialSpacer: () => new sV(null, null) -}), __e = (t) => [Jy.of(t), n3.init(null), E_e, C_e], B0 = sr.button` +const __e = zS({ + lineMarker: (t, e) => new aV(e, t), + lineMarkerChange: (t) => t.startState.field(i3) != t.state.field(i3), + initialSpacer: () => new aV(null, null) +}), A_e = (t) => [Jy.of(t), i3.init(null), __e, E_e], B0 = er.button` &:focus { outline: 0 !important; } @@ -25693,11 +25693,11 @@ const E_e = FS({ } `; Zt.define(); -const Rre = new I0(); -function A_e(t) { +const Mre = new I0(); +function L_e(t) { return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -function L_e({ +function R_e({ commentId: t, text: e, color: r @@ -25710,7 +25710,7 @@ function L_e({ 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)${A_e(s)}(?=$|[\\s\\.]|\\W)`, + targetRegexSrc: `(?<=^|[ \\t\\r\\.]|\\W)${L_e(s)}(?=$|[\\s\\.]|\\W)`, targetRegexFlags: "gm", id: t, cssClass: "cm-suggestion", @@ -25720,7 +25720,7 @@ function L_e({ } return n; } -function R_e({ +function M_e({ builder: t, from: e, match: r, @@ -25733,7 +25733,7 @@ function R_e({ }), n.replacement) return i.class += " replaced", () => { t.add(e + r.index + r[0].length, e + r.index + r[0].length, Et.widget({ - widget: new M_e({ + widget: new D_e({ text: n.replacement, color: n.color, from: e + r.index, @@ -25743,7 +25743,7 @@ function R_e({ })); }; } -class M_e extends za { +class D_e extends za { constructor({ text: e, color: r, @@ -25766,7 +25766,7 @@ class M_e extends za { }), e; } } -function D_e(t, e, r) { +function N_e(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"; @@ -25798,11 +25798,11 @@ function D_e(t, e, r) { const w = await e.getEditorForComment(b); w.focus(), w.dispatch({ selection: Ve.create([Ve.range(w.state.doc.length - 1, w.state.doc.length - 1)]), - effects: Lre.of(null) + effects: Rre.of(null) }); }; } -const N_e = sr(B0)` +const I_e = er(B0)` position: absolute; z-index: 10; display: none; @@ -25830,8 +25830,8 @@ const N_e = sr(B0)` border-right: 10px solid transparent; border-top: 10px solid var(--icon-border); } -`, I_e = () => "comment-" + Math.random().toString().replace(".", ""); -class P_e { +`, P_e = () => "comment-" + Math.random().toString().replace(".", ""); +class $_e { constructor(e, r, n, i) { this.user = r.awareness.getLocalState().user, this.lineAuthors = e.getArray(i + "/commentLineAuthors"), this.ydoc = e, this.getAvatar = n, this.commentId = i; } @@ -25874,7 +25874,7 @@ class P_e { ); } } -class $_e { +class B_e { constructor(e, r) { this.commentPositions = e.getMap(ey.dataPath), this.ycomments = r; } @@ -25905,7 +25905,7 @@ class $_e { this.commentPositions.delete(e); } } -class B_e { +class F_e { constructor() { this.comments = {}, this._onUpdate = () => { }; @@ -25945,7 +25945,7 @@ class B_e { this.setVisibility(e, !0); } } -class F_e { +class z_e { constructor(e, r) { this.user = e.awareness.getLocalState().user, this.resolvedComments = r.getMap("resolved-comments"); } @@ -25977,9 +25977,9 @@ class F_e { this.resolvedComments.observe(() => e(this.resolved())); } } -const g$ = class { +const m$ = class { constructor(e, r, n) { - this.ydoc = e, this.provider = r, this.getAvatar = n, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new $_e(e, this), this.displayManager = new B_e(r), this.commentResolver = new F_e(r, e), this.draggedComment = null, this.commentWithPopup = null, this.commentEditorsListeners = /* @__PURE__ */ new Map(), this.commentEditors = /* @__PURE__ */ new Map(), this.suggestions = e.getMap("suggestions"), this.suggestions.observe(() => { + this.ydoc = e, this.provider = r, this.getAvatar = n, this.mainCodeMirror = null, this.newLocalComment = !1, this.positionManager = new B_e(e, this), this.displayManager = new F_e(r), this.commentResolver = new z_e(r, e), this.draggedComment = null, this.commentWithPopup = null, this.commentEditorsListeners = /* @__PURE__ */ new Map(), this.commentEditors = /* @__PURE__ */ new Map(), this.suggestions = e.getMap("suggestions"), this.suggestions.observe(() => { if (!this.mainCodeMirror) return; const i = [...this.suggestions.values()].flat().map((s) => ({ @@ -25987,13 +25987,13 @@ const g$ = class { target: new RegExp(s.targetRegexSrc, s.targetRegexFlags) })); this.mainCodeMirror.dispatch({ - effects: Rre.reconfigure(jM(i, R_e, this.positions())), + effects: Mre.reconfigure(KM(i, M_e, this.positions())), annotations: fi.userEvent.of("suggestion") }); }), this.positionManager.commentPositions.observeDeep(() => this.updateMainCodeMirror()); } lineAuthors(e) { - return new P_e(this.ydoc, this.provider, this.getAvatar, e); + return new $_e(this.ydoc, this.provider, this.getAvatar, e); } positions() { return this.positionManager; @@ -26011,14 +26011,14 @@ const g$ = class { return this.mainCodeMirror.dom.querySelector(".cm-gutters").offsetWidth; } getTextForComment(e) { - return this.ydoc.getText(g$.commentsPrefix + e); + return this.ydoc.getText(m$.commentsPrefix + e); } delText(e) { let r = this.getTextForComment(e); r != null && r.parent && r.delete(); } newComment(e) { - const r = I_e(); + const r = P_e(); return this.positions().set(r, e.toString()), this.display().new(r), this.lineAuthors(r).mark(1), this.newLocalComment = !0, r; } deleteComment(e) { @@ -26072,12 +26072,12 @@ const g$ = class { }); } syncFoldedComments(e) { - if (!nk(e)) + if (!ik(e)) return; const r = e.transactions[0].effects[0].is(Nc), { 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 = iM(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 = sM(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, @@ -26119,7 +26119,7 @@ const g$ = class { color: (h = (u = s.get(l + 1)) == null ? void 0 : u.color) != null ? h : "#111" }; }); - r[n] = a.flatMap(L_e); + r[n] = a.flatMap(R_e); } this.suggestions.doc.transact(() => { for (const [n, i] of Object.entries(r)) @@ -26194,13 +26194,13 @@ const g$ = class { }); } }; -let ey = g$; +let ey = m$; Or(ey, "commentsPrefix", "comments/"); -const lT = _t.define({ +const cT = _t.define({ combine: (t) => t[t.length - 1], static: !0 }), e2 = Zt.define(); -class z_e extends za { +class V_e extends za { constructor(e, r, n) { super(), this.height = e, this.commentId = r, this.isShown = n; } @@ -26209,12 +26209,12 @@ class z_e extends za { return e.id = this.commentId, e.classList = "comment-box", this.isShown || (e.classList += " comment-box-hidden"), e.style.height = this.height + "px", e; } } -const V_e = (t, e, r) => Et.widget({ - widget: new z_e(t, e, r), +const U_e = (t, e, r) => Et.widget({ + widget: new V_e(t, e, r), side: 1e4, inlineOrder: !1, block: r -}), U_e = (t, e) => t.lineNumber - e.lineNumber, q_e = (t) => t.docChanged || t.effects.some((e) => e.is(e2)), Y_e = (t) => [(e, { +}), q_e = (t, e) => t.lineNumber - e.lineNumber, Y_e = (t) => t.docChanged || t.effects.some((e) => e.is(e2)), Q_e = (t) => [(e, { commentId: r, lineNumber: n, height: i, @@ -26222,12 +26222,12 @@ const V_e = (t, e, r) => Et.widget({ }) => { try { const a = t.newDoc.line(n).to; - e.add(a, a, V_e(i, r, s)); + e.add(a, a, U_e(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 Hi()], Q_e = (t, e) => { +}, new Hi()], W_e = (t, e) => { if (t.isUserEvent("input") || t.isUserEvent("delete")) { const r = t.state.doc.lines - t.startState.doc.lines; if (r != 0 && t.selection != null) { @@ -26235,14 +26235,14 @@ const V_e = (t, e, r) => Et.widget({ e.positions().shift(i, r, n, s); } } -}, W_e = $n.define({ +}, G_e = $n.define({ create() { return new Hi().finish(); }, update(t, e) { - if (q_e(e)) { - const r = e.state.facet(lT); - return Q_e(e, r), r.iterComments().sort(U_e).reduce(...Y_e(e)).finish(); + if (Y_e(e)) { + const r = e.state.facet(cT); + return W_e(e, r), r.iterComments().sort(q_e).reduce(...Q_e(e)).finish(); } return t; }, @@ -26252,7 +26252,7 @@ const V_e = (t, e, r) => Et.widget({ }), Cd = class extends Uo { constructor(e, r) { var n; - super(), this.gutterMarker = null, this.icon = null, r && e && (this.ycomments = r.state.facet(lT), 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(cT), 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); @@ -26274,11 +26274,11 @@ const V_e = (t, e, r) => Et.widget({ }; let bd = Cd; Or(bd, "MAIN_CLASS", "comment-gutter"), Or(bd, "ICON_CLASS", "comment-gutter-icon"), Or(bd, "COMMENT_IMAGE_CLASS", "comment-image"); -const G_e = (t, e, r) => { +const H_e = (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); -}, H_e = FS({ +}, X_e = zS({ lineMarker(t, e) { return new bd(e, t); }, @@ -26286,13 +26286,13 @@ const G_e = (t, e, r) => { initialSpacer: () => new bd(null, null), domEventHandlers: { mouseup(t, e) { - let r = t.state.facet(lT.reader), n = G_e(t, e, r); + let r = t.state.facet(cT.reader), n = H_e(t, e, r); r.display().switchVisibility(n), t.dispatch({ effects: e2.of(null) }); } } -}), X_e = (t) => [lT.of(t), W_e, H_e, ht.updateListener.of((e) => t.syncComments(e))]; +}), Z_e = (t) => [cT.of(t), G_e, X_e, ht.updateListener.of((e) => t.syncComments(e))]; class sh { constructor(e) { this.state = e; @@ -26301,42 +26301,42 @@ class sh { return []; } } -class Z_e extends sh { +class j_e extends sh { run(e) { const r = new this.state.Token("code_inline", "code", 0); return r.content = e.content, [r]; } } -const j_e = { - raw: Z_e -}, s8 = "math_inline"; -class K_e extends sh { +const K_e = { + raw: j_e +}, a8 = "math_inline"; +class J_e extends sh { run(e) { - const r = new this.state.Token(s8, "span", 0); + const r = new this.state.Token(a8, "span", 0); return r.attrSet("class", "math inline"), r.markup = "$", r.content = e.content, [r]; } } -function J_e(t, e) { +function eAe(t, e) { var r; - !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[s8] || (t.renderer.rules[s8] = (n, i) => { + !(!((r = e == null ? void 0 : e.roles) === null || r === void 0) && r.math) || t.renderer.rules[a8] || (t.renderer.rules[a8] = (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 eAe = { - math: K_e +const tAe = { + math: J_e }; -function Mre(t, e) { - e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", tAe), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", nAe(e.roles || {})), t.renderer.rules.role = (r, n) => { +function Dre(t, e) { + e.parseRoles && t.inline.ruler.before("backticks", "parse_roles", rAe), t.core.ruler.after(e.rolesAfter || "inline", "run_roles", iAe(e.roles || {})), t.renderer.rules.role = (r, n) => { const i = r[n]; return `${i.meta.name}${i.content}`; - }, J_e(t, e); + }, eAe(t, e); } -function tAe(t, e) { +function rAe(t, e) { if (t.src.charCodeAt(t.pos - 1) === 92) return !1; - const r = rAe.exec(t.src.slice(t.pos)); + const r = nAe.exec(t.src.slice(t.pos)); if (r == null) return !1; const [n, i, , s] = r; @@ -26346,14 +26346,14 @@ function tAe(t, e) { } return !0; } -let a8; +let o8; try { - a8 = new RegExp("^\\{([a-zA-Z_\\-+:]{1,36})\\}(`+)(?!`)(.+?)(?]+)>$/; -class lAe extends sh { +const Ire = /^(.+?)<([^<>]+)>$/; +class cAe extends sh { 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 tD(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { + return rD(this.state, { open: r, content: n, close: i }, { kind: "eq", label: e.content }, { kind: t2.equation, contentFromTarget: (s) => `(${s.number})` }), [r, n, i]; } } -class cAe extends sh { +class uAe extends sh { run(e) { - const r = Nre.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 tD(this.state, { open: a, content: o, close: l }, { kind: "numref", label: i || e.content, value: s }, { + const r = Ire.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 rD(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 uAe extends sh { +class hAe extends sh { run(e) { - const r = Nre.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 tD(this.state, { open: a, content: o, close: l }, { kind: "ref", label: i || e.content, value: s }, { + const r = Ire.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 rD(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 hAe = { - eq: lAe, - ref: uAe, - numref: cAe -}, fAe = Object.assign(Object.assign(Object.assign(Object.assign({}, j_e), sAe), eAe), hAe); +const fAe = { + eq: cAe, + ref: hAe, + numref: uAe +}, dAe = Object.assign(Object.assign(Object.assign(Object.assign({}, K_e), aAe), tAe), fAe); /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -function Ire(t) { +function Pre(t) { return typeof t > "u" || t === null; } -function dAe(t) { +function pAe(t) { return typeof t == "object" && t !== null; } -function pAe(t) { - return Array.isArray(t) ? t : Ire(t) ? [] : [t]; +function gAe(t) { + return Array.isArray(t) ? t : Pre(t) ? [] : [t]; } -function gAe(t, e) { +function mAe(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 mAe(t, e) { +function vAe(t, e) { var r = "", n; for (n = 0; n < e; n += 1) r += t; return r; } -function vAe(t) { +function yAe(t) { return t === 0 && Number.NEGATIVE_INFINITY === 1 / t; } -var yAe = Ire, bAe = dAe, xAe = pAe, wAe = mAe, OAe = vAe, kAe = gAe, Ti = { - isNothing: yAe, - isObject: bAe, - toArray: xAe, - repeat: wAe, - isNegativeZero: OAe, - extend: kAe +var bAe = Pre, xAe = pAe, wAe = gAe, OAe = vAe, kAe = yAe, SAe = mAe, Ti = { + isNothing: bAe, + isObject: xAe, + toArray: wAe, + repeat: OAe, + isNegativeZero: kAe, + extend: SAe }; -function Pre(t, e) { +function $re(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 r2(t, e) { - Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = Pre(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 = $re(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; } r2.prototype = Object.create(Error.prototype); r2.prototype.constructor = r2; r2.prototype.toString = function(e) { - return this.name + ": " + Pre(this, e); + return this.name + ": " + $re(this, e); }; var ea = r2; -function u6(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 h6(t, e) { +function f6(t, e) { return Ti.repeat(" ", e - t.length) + t; } -function SAe(t, e) { +function TAe(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); @@ -26557,28 +26557,28 @@ function SAe(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 = u6( + u = h6( t.buffer, n[a - l], i[a - l], t.position - (n[a] - n[a - l]), f - ), o = Ti.repeat(" ", e.indent) + h6((t.line - l + 1).toString(), h) + " | " + u.str + ` + ), o = Ti.repeat(" ", e.indent) + f6((t.line - l + 1).toString(), h) + " | " + u.str + ` ` + o; - for (u = u6(t.buffer, n[a], i[a], t.position, f), o += Ti.repeat(" ", e.indent) + h6((t.line + 1).toString(), h) + " | " + u.str + ` + for (u = h6(t.buffer, n[a], i[a], t.position, f), o += Ti.repeat(" ", e.indent) + f6((t.line + 1).toString(), h) + " | " + u.str + ` `, o += Ti.repeat("-", e.indent + h + 3 + u.pos) + `^ `, l = 1; l <= e.linesAfter && !(a + l >= i.length); l++) - u = u6( + u = h6( t.buffer, n[a + l], i[a + l], t.position - (n[a] - n[a + l]), f - ), o += Ti.repeat(" ", e.indent) + h6((t.line + l + 1).toString(), h) + " | " + u.str + ` + ), o += Ti.repeat(" ", e.indent) + f6((t.line + l + 1).toString(), h) + " | " + u.str + ` `; return o.replace(/\n$/, ""); } -var TAe = SAe, CAe = [ +var CAe = TAe, EAe = [ "kind", "multi", "resolve", @@ -26589,12 +26589,12 @@ var TAe = SAe, CAe = [ "representName", "defaultStyle", "styleAliases" -], EAe = [ +], _Ae = [ "scalar", "sequence", "mapping" ]; -function _Ae(t) { +function AAe(t) { var e = {}; return t !== null && Object.keys(t).forEach(function(r) { t[r].forEach(function(n) { @@ -26602,19 +26602,19 @@ function _Ae(t) { }); }), e; } -function AAe(t, e) { +function LAe(t, e) { if (e = e || {}, Object.keys(e).forEach(function(r) { - if (CAe.indexOf(r) === -1) + if (EAe.indexOf(r) === -1) throw new ea('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 = _Ae(e.styleAliases || null), EAe.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 = AAe(e.styleAliases || null), _Ae.indexOf(this.kind) === -1) throw new ea('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.'); } -var hs = AAe; -function cV(t, e) { +var hs = LAe; +function uV(t, e) { var r = []; return t[e].forEach(function(n) { var i = r.length; @@ -26623,7 +26623,7 @@ function cV(t, e) { }), r[i] = n; }), r; } -function LAe() { +function RAe() { var t = { scalar: {}, sequence: {}, @@ -26643,10 +26643,10 @@ function LAe() { arguments[e].forEach(n); return t; } -function o8(t) { +function l8(t) { return this.extend(t); } -o8.prototype.extend = function(e) { +l8.prototype.extend = function(e) { var r = [], n = []; if (e instanceof hs) n.push(e); @@ -26667,48 +26667,48 @@ o8.prototype.extend = function(e) { if (!(s instanceof hs)) throw new ea("Specified list of YAML types (or a single Type object) contains a non-Type object."); }); - var i = Object.create(o8.prototype); - return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = cV(i, "implicit"), i.compiledExplicit = cV(i, "explicit"), i.compiledTypeMap = LAe(i.compiledImplicit, i.compiledExplicit), i; + var i = Object.create(l8.prototype); + return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = uV(i, "implicit"), i.compiledExplicit = uV(i, "explicit"), i.compiledTypeMap = RAe(i.compiledImplicit, i.compiledExplicit), i; }; -var $re = o8, Bre = new hs("tag:yaml.org,2002:str", { +var Bre = l8, Fre = new hs("tag:yaml.org,2002:str", { kind: "scalar", construct: function(t) { return t !== null ? t : ""; } -}), Fre = new hs("tag:yaml.org,2002:seq", { +}), zre = new hs("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(t) { return t !== null ? t : []; } -}), zre = new hs("tag:yaml.org,2002:map", { +}), Vre = new hs("tag:yaml.org,2002:map", { kind: "mapping", construct: function(t) { return t !== null ? t : {}; } -}), Vre = new $re({ +}), Ure = new Bre({ explicit: [ - Bre, Fre, - zre + zre, + Vre ] }); -function RAe(t) { +function MAe(t) { if (t === null) return !0; var e = t.length; return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL"); } -function MAe() { +function DAe() { return null; } -function DAe(t) { +function NAe(t) { return t === null; } -var Ure = new hs("tag:yaml.org,2002:null", { +var qre = new hs("tag:yaml.org,2002:null", { kind: "scalar", - resolve: RAe, - construct: MAe, - predicate: DAe, + resolve: MAe, + construct: DAe, + predicate: NAe, represent: { canonical: function() { return "~"; @@ -26728,23 +26728,23 @@ var Ure = new hs("tag:yaml.org,2002:null", { }, defaultStyle: "lowercase" }); -function NAe(t) { +function IAe(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 IAe(t) { +function PAe(t) { return t === "true" || t === "True" || t === "TRUE"; } -function PAe(t) { +function $Ae(t) { return Object.prototype.toString.call(t) === "[object Boolean]"; } -var qre = new hs("tag:yaml.org,2002:bool", { +var Yre = new hs("tag:yaml.org,2002:bool", { kind: "scalar", - resolve: NAe, - construct: IAe, - predicate: PAe, + resolve: IAe, + construct: PAe, + predicate: $Ae, represent: { lowercase: function(t) { return t ? "true" : "false"; @@ -26758,16 +26758,16 @@ var qre = new hs("tag:yaml.org,2002:bool", { }, defaultStyle: "lowercase" }); -function $Ae(t) { +function BAe(t) { return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102; } -function BAe(t) { +function FAe(t) { return 48 <= t && t <= 55; } -function FAe(t) { +function zAe(t) { return 48 <= t && t <= 57; } -function zAe(t) { +function VAe(t) { if (t === null) return !1; var e = t.length, r = 0, n = !1, i; @@ -26788,7 +26788,7 @@ function zAe(t) { if (i === "x") { for (r++; r < e; r++) if (i = t[r], i !== "_") { - if (!$Ae(t.charCodeAt(r))) + if (!BAe(t.charCodeAt(r))) return !1; n = !0; } @@ -26797,7 +26797,7 @@ function zAe(t) { if (i === "o") { for (r++; r < e; r++) if (i = t[r], i !== "_") { - if (!BAe(t.charCodeAt(r))) + if (!FAe(t.charCodeAt(r))) return !1; n = !0; } @@ -26808,13 +26808,13 @@ function zAe(t) { return !1; for (; r < e; r++) if (i = t[r], i !== "_") { - if (!FAe(t.charCodeAt(r))) + if (!zAe(t.charCodeAt(r))) return !1; n = !0; } return !(!n || i === "_"); } -function VAe(t) { +function UAe(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; @@ -26828,14 +26828,14 @@ function VAe(t) { } return r * parseInt(e, 10); } -function UAe(t) { +function qAe(t) { return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !Ti.isNegativeZero(t); } -var Yre = new hs("tag:yaml.org,2002:int", { +var Qre = new hs("tag:yaml.org,2002:int", { kind: "scalar", - resolve: zAe, - construct: VAe, - predicate: UAe, + resolve: VAe, + construct: UAe, + predicate: qAe, represent: { binary: function(t) { return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1); @@ -26857,18 +26857,18 @@ var Yre = new hs("tag:yaml.org,2002:int", { decimal: [10, "dec"], hexadecimal: [16, "hex"] } -}), qAe = new RegExp( +}), YAe = new RegExp( "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" ); -function YAe(t) { - return !(t === null || !qAe.test(t) || t[t.length - 1] === "_"); -} function QAe(t) { + return !(t === null || !YAe.test(t) || t[t.length - 1] === "_"); +} +function WAe(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 WAe = /^[-+]?[0-9]+e/; -function GAe(t, e) { +var GAe = /^[-+]?[0-9]+e/; +function HAe(t, e) { var r; if (isNaN(t)) switch (e) { @@ -26899,36 +26899,36 @@ function GAe(t, e) { } else if (Ti.isNegativeZero(t)) return "-0.0"; - return r = t.toString(10), WAe.test(r) ? r.replace("e", ".e") : r; + return r = t.toString(10), GAe.test(r) ? r.replace("e", ".e") : r; } -function HAe(t) { +function XAe(t) { return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || Ti.isNegativeZero(t)); } -var Qre = new hs("tag:yaml.org,2002:float", { +var Wre = new hs("tag:yaml.org,2002:float", { kind: "scalar", - resolve: YAe, - construct: QAe, - predicate: HAe, - represent: GAe, + resolve: QAe, + construct: WAe, + predicate: XAe, + represent: HAe, defaultStyle: "lowercase" -}), Wre = Vre.extend({ +}), Gre = Ure.extend({ implicit: [ - Ure, qre, Yre, - Qre + Qre, + Wre ] -}), Gre = Wre, Hre = new RegExp( +}), Hre = Gre, Xre = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" -), Xre = new RegExp( +), Zre = 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 XAe(t) { - return t === null ? !1 : Hre.exec(t) !== null || Xre.exec(t) !== null; -} function ZAe(t) { + return t === null ? !1 : Xre.exec(t) !== null || Zre.exec(t) !== null; +} +function jAe(t) { var e, r, n, i, s, a, o, l = 0, u = null, h, f, d; - if (e = Hre.exec(t), e === null && (e = Xre.exec(t)), e === null) + if (e = Xre.exec(t), e === null && (e = Zre.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)); @@ -26939,28 +26939,28 @@ function ZAe(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 jAe(t) { +function KAe(t) { return t.toISOString(); } -var Zre = new hs("tag:yaml.org,2002:timestamp", { +var jre = new hs("tag:yaml.org,2002:timestamp", { kind: "scalar", - resolve: XAe, - construct: ZAe, + resolve: ZAe, + construct: jAe, instanceOf: Date, - represent: jAe + represent: KAe }); -function KAe(t) { +function JAe(t) { return t === "<<" || t === null; } -var jre = new hs("tag:yaml.org,2002:merge", { +var Kre = new hs("tag:yaml.org,2002:merge", { kind: "scalar", - resolve: KAe -}), rD = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= + resolve: JAe +}), nD = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`; -function JAe(t) { +function e7e(t) { if (t === null) return !1; - var e, r, n = 0, i = t.length, s = rD; + var e, r, n = 0, i = t.length, s = nD; for (r = 0; r < i; r++) if (e = s.indexOf(t.charAt(r)), !(e > 64)) { if (e < 0) @@ -26969,37 +26969,37 @@ function JAe(t) { } return n % 8 === 0; } -function e7e(t) { - var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = rD, a = 0, o = []; +function t7e(t) { + var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = nD, 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 t7e(t) { - var e = "", r = 0, n, i, s = t.length, a = rD; +function r7e(t) { + var e = "", r = 0, n, i, s = t.length, a = nD; 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 r7e(t) { +function n7e(t) { return Object.prototype.toString.call(t) === "[object Uint8Array]"; } -var Kre = new hs("tag:yaml.org,2002:binary", { +var Jre = new hs("tag:yaml.org,2002:binary", { kind: "scalar", - resolve: JAe, - construct: e7e, - predicate: r7e, - represent: t7e -}), n7e = Object.prototype.hasOwnProperty, i7e = Object.prototype.toString; -function s7e(t) { + resolve: e7e, + construct: t7e, + predicate: n7e, + represent: r7e +}), i7e = Object.prototype.hasOwnProperty, s7e = Object.prototype.toString; +function a7e(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, i7e.call(i) !== "[object Object]") + if (i = o[r], a = !1, s7e.call(i) !== "[object Object]") return !1; for (s in i) - if (n7e.call(i, s)) + if (i7e.call(i, s)) if (!a) a = !0; else @@ -27013,26 +27013,26 @@ function s7e(t) { } return !0; } -function a7e(t) { +function o7e(t) { return t !== null ? t : []; } -var Jre = new hs("tag:yaml.org,2002:omap", { +var ene = new hs("tag:yaml.org,2002:omap", { kind: "sequence", - resolve: s7e, - construct: a7e -}), o7e = Object.prototype.toString; -function l7e(t) { + resolve: a7e, + construct: o7e +}), l7e = Object.prototype.toString; +function c7e(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], o7e.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1)) + if (n = a[e], l7e.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1)) return !1; s[e] = [i[0], n[i[0]]]; } return !0; } -function c7e(t) { +function u7e(t) { if (t === null) return []; var e, r, n, i, s, a = t; @@ -27040,40 +27040,40 @@ function c7e(t) { n = a[e], i = Object.keys(n), s[e] = [i[0], n[i[0]]]; return s; } -var ene = new hs("tag:yaml.org,2002:pairs", { +var tne = new hs("tag:yaml.org,2002:pairs", { kind: "sequence", - resolve: l7e, - construct: c7e -}), u7e = Object.prototype.hasOwnProperty; -function h7e(t) { + resolve: c7e, + construct: u7e +}), h7e = Object.prototype.hasOwnProperty; +function f7e(t) { if (t === null) return !0; var e, r = t; for (e in r) - if (u7e.call(r, e) && r[e] !== null) + if (h7e.call(r, e) && r[e] !== null) return !1; return !0; } -function f7e(t) { +function d7e(t) { return t !== null ? t : {}; } -var tne = new hs("tag:yaml.org,2002:set", { +var rne = new hs("tag:yaml.org,2002:set", { kind: "mapping", - resolve: h7e, - construct: f7e -}), nD = Gre.extend({ + resolve: f7e, + construct: d7e +}), iD = Hre.extend({ implicit: [ - Zre, - jre + jre, + Kre ], explicit: [ - Kre, Jre, ene, - tne + tne, + rne ] -}), gf = Object.prototype.hasOwnProperty, i3 = 1, rne = 2, nne = 3, s3 = 4, f6 = 1, d7e = 2, uV = 3, p7e = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, g7e = /[\x85\u2028\u2029]/, m7e = /[,\[\]\{\}]/, ine = /^(?:!|!!|![a-z\-]+!)$/i, sne = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; -function hV(t) { +}), gf = Object.prototype.hasOwnProperty, s3 = 1, nne = 2, ine = 3, a3 = 4, d6 = 1, p7e = 2, hV = 3, g7e = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, m7e = /[\x85\u2028\u2029]/, v7e = /[,\[\]\{\}]/, sne = /^(?:!|!!|![a-z\-]+!)$/i, ane = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function fV(t) { return Object.prototype.toString.call(t); } function Rc(t) { @@ -27088,33 +27088,33 @@ function Da(t) { function Np(t) { return t === 44 || t === 91 || t === 93 || t === 123 || t === 125; } -function v7e(t) { +function y7e(t) { var e; return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1); } -function y7e(t) { +function b7e(t) { return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0; } -function b7e(t) { +function x7e(t) { return 48 <= t && t <= 57 ? t - 48 : -1; } -function fV(t) { +function dV(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 x7e(t) { +function w7e(t) { return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode( (t - 65536 >> 10) + 55296, (t - 65536 & 1023) + 56320 ); } -var ane = new Array(256), one = new Array(256); +var one = new Array(256), lne = new Array(256); for (var up = 0; up < 256; up++) - ane[up] = fV(up) ? 1 : 0, one[up] = fV(up); -function w7e(t, e) { - this.input = t, this.filename = e.filename || null, this.schema = e.schema || nD, 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 = []; + one[up] = dV(up) ? 1 : 0, lne[up] = dV(up); +function O7e(t, e) { + this.input = t, this.filename = e.filename || null, this.schema = e.schema || iD, 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 lne(t, e) { +function cne(t, e) { var r = { name: t.filename, buffer: t.input.slice(0, -1), @@ -27122,22 +27122,22 @@ function lne(t, e) { line: t.line, column: t.position - t.lineStart }; - return r.snippet = TAe(r), new ea(e, r); + return r.snippet = CAe(r), new ea(e, r); } function Ut(t, e) { - throw lne(t, e); + throw cne(t, e); } -function a3(t, e) { - t.onWarning && t.onWarning.call(null, lne(t, e)); +function o3(t, e) { + t.onWarning && t.onWarning.call(null, cne(t, e)); } -var dV = { +var pV = { YAML: function(e, r, n) { var i, s, a; - e.version !== null && Ut(e, "duplication of %YAML directive"), n.length !== 1 && Ut(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && Ut(e, "ill-formed argument of the YAML directive"), s = parseInt(i[1], 10), a = parseInt(i[2], 10), s !== 1 && Ut(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && a3(e, "unsupported YAML version of the document"); + e.version !== null && Ut(e, "duplication of %YAML directive"), n.length !== 1 && Ut(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && Ut(e, "ill-formed argument of the YAML directive"), s = parseInt(i[1], 10), a = parseInt(i[2], 10), s !== 1 && Ut(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && o3(e, "unsupported YAML version of the document"); }, TAG: function(e, r, n) { var i, s; - n.length !== 2 && Ut(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], ine.test(i) || Ut(e, "ill-formed tag handle (first argument) of the TAG directive"), gf.call(e.tagMap, i) && Ut(e, 'there is a previously declared suffix for "' + i + '" tag handle'), sne.test(s) || Ut(e, "ill-formed tag prefix (second argument) of the TAG directive"); + n.length !== 2 && Ut(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], sne.test(i) || Ut(e, "ill-formed tag handle (first argument) of the TAG directive"), gf.call(e.tagMap, i) && Ut(e, 'there is a previously declared suffix for "' + i + '" tag handle'), ane.test(s) || Ut(e, "ill-formed tag prefix (second argument) of the TAG directive"); try { s = decodeURIComponent(s); } catch { @@ -27153,11 +27153,11 @@ function jh(t, e, r, n) { for (i = 0, s = o.length; i < s; i += 1) a = o.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || Ut(t, "expected valid JSON character"); else - p7e.test(o) && Ut(t, "the stream contains non-printable characters"); + g7e.test(o) && Ut(t, "the stream contains non-printable characters"); t.result += o; } } -function pV(t, e, r, n) { +function gV(t, e, r, n) { var i, s, a, o; for (Ti.isObject(r) || Ut(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], gf.call(e, s) || (e[s] = r[s], n[s] = !0); @@ -27166,13 +27166,13 @@ function Ip(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]) && Ut(t, "nested arrays are not supported inside keys"), typeof i == "object" && hV(i[u]) === "[object Object]" && (i[u] = "[object Object]"); - if (typeof i == "object" && hV(i) === "[object Object]" && (i = "[object Object]"), i = String(i), e === null && (e = {}), n === "tag:yaml.org,2002:merge") + Array.isArray(i[u]) && Ut(t, "nested arrays are not supported inside keys"), typeof i == "object" && fV(i[u]) === "[object Object]" && (i[u] = "[object Object]"); + if (typeof i == "object" && fV(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) - pV(t, e, s[u], r); + gV(t, e, s[u], r); else - pV(t, e, s, r); + gV(t, e, s, r); else !t.json && !gf.call(r, i) && gf.call(e, i) && (t.line = a || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, Ut(t, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(e, i, { configurable: !0, @@ -27182,7 +27182,7 @@ function Ip(t, e, r, n, i, s, a, o, l) { }) : e[i] = s, delete r[i]; return e; } -function iD(t) { +function sD(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++) : Ut(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1; } @@ -27195,22 +27195,22 @@ function hi(t, e, r) { i = t.input.charCodeAt(++t.position); while (i !== 10 && i !== 13 && i !== 0); if (Rc(i)) - for (iD(t), i = t.input.charCodeAt(t.position), n++, t.lineIndent = 0; i === 32; ) + for (sD(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 && a3(t, "deficient indentation"), n; + return r !== -1 && n !== 0 && t.lineIndent < r && o3(t, "deficient indentation"), n; } -function uT(t) { +function hT(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 || Da(r))); } -function sD(t, e) { +function aD(t, e) { e === 1 ? t.result += " " : e > 1 && (t.result += Ti.repeat(` `, e - 1)); } -function O7e(t, e, r) { +function k7e(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), Da(p) || Np(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), Da(i) || r && Np(i))) return !1; @@ -27222,7 +27222,7 @@ function O7e(t, e, r) { if (n = t.input.charCodeAt(t.position - 1), Da(n)) break; } else { - if (t.position === t.lineStart && uT(t) || r && Np(p)) + if (t.position === t.lineStart && hT(t) || r && Np(p)) break; if (Rc(p)) if (l = t.line, u = t.lineStart, h = t.lineIndent, hi(t, !1, -1), t.lineIndent >= e) { @@ -27233,11 +27233,11 @@ function O7e(t, e, r) { break; } } - o && (jh(t, s, a, !1), sD(t, t.line - l), s = a = t.position, o = !1), Yd(p) || (a = t.position + 1), p = t.input.charCodeAt(++t.position); + o && (jh(t, s, a, !1), aD(t, t.line - l), s = a = t.position, o = !1), Yd(p) || (a = t.position + 1), p = t.input.charCodeAt(++t.position); } return jh(t, s, a, !1), t.result ? !0 : (t.kind = f, t.result = d, !1); } -function k7e(t, e) { +function S7e(t, e) { var r, n, i; if (r = t.input.charCodeAt(t.position), r !== 39) return !1; @@ -27248,10 +27248,10 @@ function k7e(t, e) { else return !0; else - Rc(r) ? (jh(t, n, i, !0), sD(t, hi(t, !1, e)), n = i = t.position) : t.position === t.lineStart && uT(t) ? Ut(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position); + Rc(r) ? (jh(t, n, i, !0), aD(t, hi(t, !1, e)), n = i = t.position) : t.position === t.lineStart && hT(t) ? Ut(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position); Ut(t, "unexpected end of the stream within a single quoted scalar"); } -function S7e(t, e) { +function T7e(t, e) { var r, n, i, s, a, o; if (o = t.input.charCodeAt(t.position), o !== 34) return !1; @@ -27261,21 +27261,21 @@ function S7e(t, e) { if (o === 92) { if (jh(t, r, t.position, !0), o = t.input.charCodeAt(++t.position), Rc(o)) hi(t, !1, e); - else if (o < 256 && ane[o]) - t.result += one[o], t.position++; - else if ((a = y7e(o)) > 0) { + else if (o < 256 && one[o]) + t.result += lne[o], t.position++; + else if ((a = b7e(o)) > 0) { for (i = a, s = 0; i > 0; i--) - o = t.input.charCodeAt(++t.position), (a = v7e(o)) >= 0 ? s = (s << 4) + a : Ut(t, "expected hexadecimal character"); - t.result += x7e(s), t.position++; + o = t.input.charCodeAt(++t.position), (a = y7e(o)) >= 0 ? s = (s << 4) + a : Ut(t, "expected hexadecimal character"); + t.result += w7e(s), t.position++; } else Ut(t, "unknown escape sequence"); r = n = t.position; } else - Rc(o) ? (jh(t, r, n, !0), sD(t, hi(t, !1, e)), r = n = t.position) : t.position === t.lineStart && uT(t) ? Ut(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position); + Rc(o) ? (jh(t, r, n, !0), aD(t, hi(t, !1, e)), r = n = t.position) : t.position === t.lineStart && hT(t) ? Ut(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position); } Ut(t, "unexpected end of the stream within a double quoted scalar"); } -function T7e(t, e) { +function C7e(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 = []; @@ -27286,12 +27286,12 @@ function T7e(t, e) { for (t.anchor !== null && (t.anchorMap[t.anchor] = o), b = t.input.charCodeAt(++t.position); b !== 0; ) { if (hi(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 && Ut(t, "expected the node content, but found ','") : Ut(t, "missed comma between flow collection entries"), v = m = y = null, f = d = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), Da(u) && (f = d = !0, t.position++, hi(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, qg(t, e, i3, !1, !0), v = t.tag, m = t.result, hi(t, !0, e), b = t.input.charCodeAt(t.position), (d || t.line === n) && b === 58 && (f = !0, b = t.input.charCodeAt(++t.position), hi(t, !0, e), qg(t, e, i3, !1, !0), y = t.result), p ? Ip(t, o, g, v, m, y, n, i, s) : f ? o.push(Ip(t, null, g, v, m, y, n, i, s)) : o.push(m), hi(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (r = !0, b = t.input.charCodeAt(++t.position)) : r = !1; + r ? b === 44 && Ut(t, "expected the node content, but found ','") : Ut(t, "missed comma between flow collection entries"), v = m = y = null, f = d = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), Da(u) && (f = d = !0, t.position++, hi(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, qg(t, e, s3, !1, !0), v = t.tag, m = t.result, hi(t, !0, e), b = t.input.charCodeAt(t.position), (d || t.line === n) && b === 58 && (f = !0, b = t.input.charCodeAt(++t.position), hi(t, !0, e), qg(t, e, s3, !1, !0), y = t.result), p ? Ip(t, o, g, v, m, y, n, i, s) : f ? o.push(Ip(t, null, g, v, m, y, n, i, s)) : o.push(m), hi(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (r = !0, b = t.input.charCodeAt(++t.position)) : r = !1; } Ut(t, "unexpected end of the stream within a flow collection"); } -function C7e(t, e) { - var r, n, i = f6, s = !1, a = !1, o = e, l = 0, u = !1, h, f; +function E7e(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) @@ -27300,8 +27300,8 @@ function C7e(t, e) { return !1; for (t.kind = "scalar", t.result = ""; f !== 0; ) if (f = t.input.charCodeAt(++t.position), f === 43 || f === 45) - f6 === i ? i = f === 43 ? uV : d7e : Ut(t, "repeat of a chomping mode identifier"); - else if ((h = b7e(f)) >= 0) + d6 === i ? i = f === 43 ? hV : p7e : Ut(t, "repeat of a chomping mode identifier"); + else if ((h = x7e(f)) >= 0) h === 0 ? Ut(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? Ut(t, "repeat of an indentation width identifier") : (o = e + h - 1, a = !0); else break; @@ -27315,15 +27315,15 @@ function C7e(t, e) { while (!Rc(f) && f !== 0); } for (; f !== 0; ) { - for (iD(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!a || t.lineIndent < o) && f === 32; ) + for (sD(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), Rc(f)) { l++; continue; } if (t.lineIndent < o) { - i === uV ? t.result += Ti.repeat(` -`, s ? 1 + l : l) : i === f6 && s && (t.result += ` + i === hV ? t.result += Ti.repeat(` +`, s ? 1 + l : l) : i === d6 && s && (t.result += ` `); break; } @@ -27337,7 +27337,7 @@ function C7e(t, e) { } return !0; } -function gV(t, e) { +function mV(t, e) { var r, n = t.tag, i = t.anchor, s = [], a, o = !1, l; if (t.firstTabInLine !== -1) return !1; @@ -27346,14 +27346,14 @@ function gV(t, e) { s.push(null), l = t.input.charCodeAt(t.position); continue; } - if (r = t.line, qg(t, e, nne, !1, !0), s.push(t.result), hi(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0) + if (r = t.line, qg(t, e, ine, !1, !0), s.push(t.result), hi(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0) Ut(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 E7e(t, e, r) { +function _7e(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; @@ -27361,7 +27361,7 @@ function E7e(t, e, r) { if (!v && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Ut(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), s = t.line, (b === 63 || b === 58) && Da(n)) b === 63 ? (v && (Ip(t, f, d, p, g, null, a, o, l), p = g = m = null), y = !0, v = !0, i = !0) : v ? (v = !1, i = !0) : Ut(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, !qg(t, r, rne, !1, !0)) + if (a = t.line, o = t.lineStart, l = t.position, !qg(t, r, nne, !1, !0)) break; if (t.line === s) { for (b = t.input.charCodeAt(t.position); Yd(b); ) @@ -27377,14 +27377,14 @@ function E7e(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), qg(t, e, s3, !0, i) && (v ? g = t.result : m = t.result), v || (Ip(t, f, d, p, g, m, a, o, l), p = g = m = null), hi(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), qg(t, e, a3, !0, i) && (v ? g = t.result : m = t.result), v || (Ip(t, f, d, p, g, m, a, o, l), p = g = m = null), hi(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === s || t.lineIndent > e) && b !== 0) Ut(t, "bad indentation of a mapping entry"); else if (t.lineIndent < e) break; } return v && Ip(t, f, d, p, g, null, a, o, l), y && (t.tag = u, t.anchor = h, t.kind = "mapping", t.result = f), y; } -function _7e(t) { +function A7e(t) { var e, r = !1, n = !1, i, s, a; if (a = t.input.charCodeAt(t.position), a !== 33) return !1; @@ -27395,10 +27395,10 @@ function _7e(t) { t.position < t.length ? (s = t.input.slice(e, t.position), a = t.input.charCodeAt(++t.position)) : Ut(t, "unexpected end of the stream within a verbatim tag"); } else { for (; a !== 0 && !Da(a); ) - a === 33 && (n ? Ut(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), ine.test(i) || Ut(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), m7e.test(s) && Ut(t, "tag suffix cannot contain flow indicator characters"); + a === 33 && (n ? Ut(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), sne.test(i) || Ut(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), v7e.test(s) && Ut(t, "tag suffix cannot contain flow indicator characters"); } - s && !sne.test(s) && Ut(t, "tag name cannot contain such characters: " + s); + s && !ane.test(s) && Ut(t, "tag name cannot contain such characters: " + s); try { s = decodeURIComponent(s); } catch { @@ -27406,7 +27406,7 @@ function _7e(t) { } return r ? t.tag = s : gf.call(t.tagMap, i) ? t.tag = t.tagMap[i] + s : i === "!" ? t.tag = "!" + s : i === "!!" ? t.tag = "tag:yaml.org,2002:" + s : Ut(t, 'undeclared tag handle "' + i + '"'), !0; } -function A7e(t) { +function L7e(t) { var e, r; if (r = t.input.charCodeAt(t.position), r !== 38) return !1; @@ -27414,7 +27414,7 @@ function A7e(t) { r = t.input.charCodeAt(++t.position); return t.position === e && Ut(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0; } -function L7e(t) { +function R7e(t) { var e, r, n; if (n = t.input.charCodeAt(t.position), n !== 42) return !1; @@ -27424,10 +27424,10 @@ function L7e(t) { } function qg(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 = s3 === r || nne === r, n && hi(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) - for (; _7e(t) || A7e(t); ) + if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, s = a = o = a3 === r || ine === r, n && hi(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) + for (; A7e(t) || L7e(t); ) hi(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 || s3 === r) && (i3 === r || rne === r ? m = e : m = e + 1, v = t.position - t.lineStart, l === 1 ? o && (gV(t, v) || E7e(t, v, m)) || T7e(t, m) ? h = !0 : (a && C7e(t, m) || k7e(t, m) || S7e(t, m) ? h = !0 : L7e(t) ? (h = !0, (t.tag !== null || t.anchor !== null) && Ut(t, "alias node should not have any properties")) : O7e(t, m, i3 === r) && (h = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (h = o && gV(t, v))), t.tag === null) + if (o && (o = u || i), (l === 1 || a3 === r) && (s3 === r || nne === r ? m = e : m = e + 1, v = t.position - t.lineStart, l === 1 ? o && (mV(t, v) || _7e(t, v, m)) || C7e(t, m) ? h = !0 : (a && E7e(t, m) || S7e(t, m) || T7e(t, m) ? h = !0 : R7e(t) ? (h = !0, (t.tag !== null || t.anchor !== null) && Ut(t, "alias node should not have any properties")) : k7e(t, m, s3 === r) && (h = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (h = o && mV(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" && Ut(t, 'unacceptable node kind for ! tag; it should be "scalar", not "' + t.kind + '"'), f = 0, d = t.implicitTypes.length; f < d; f += 1) @@ -27448,7 +27448,7 @@ function qg(t, e, r, n, i) { } return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || h; } -function R7e(t) { +function M7e(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 && (hi(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 && !Da(a); ) @@ -27468,9 +27468,9 @@ function R7e(t) { a = t.input.charCodeAt(++t.position); i.push(t.input.slice(r, t.position)); } - a !== 0 && iD(t), gf.call(dV, n) ? dV[n](t, n, i) : a3(t, 'unknown document directive "' + n + '"'); + a !== 0 && sD(t), gf.call(pV, n) ? pV[n](t, n, i) : o3(t, 'unknown document directive "' + n + '"'); } - if (hi(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, hi(t, !0, -1)) : s && Ut(t, "directives end mark is expected"), qg(t, t.lineIndent - 1, s3, !1, !0), hi(t, !0, -1), t.checkLineBreaks && g7e.test(t.input.slice(e, t.position)) && a3(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && uT(t)) { + if (hi(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, hi(t, !0, -1)) : s && Ut(t, "directives end mark is expected"), qg(t, t.lineIndent - 1, a3, !1, !0), hi(t, !0, -1), t.checkLineBreaks && m7e.test(t.input.slice(e, t.position)) && o3(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && hT(t)) { t.input.charCodeAt(t.position) === 46 && (t.position += 3, hi(t, !0, -1)); return; } @@ -27479,36 +27479,36 @@ function R7e(t) { else return; } -function cne(t, e) { +function une(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 w7e(t, e), n = t.indexOf("\0"); + var r = new O7e(t, e), n = t.indexOf("\0"); for (n !== -1 && (r.position = n, Ut(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; ) - R7e(r); + M7e(r); return r.documents; } -function M7e(t, e, r) { +function D7e(t, e, r) { e !== null && typeof e == "object" && typeof r > "u" && (r = e, e = null); - var n = cne(t, r); + var n = une(t, r); if (typeof e != "function") return n; for (var i = 0, s = n.length; i < s; i += 1) e(n[i]); } -function D7e(t, e) { - var r = cne(t, e); +function N7e(t, e) { + var r = une(t, e); if (r.length !== 0) { if (r.length === 1) return r[0]; throw new ea("expected a single document in the stream, but found more"); } } -var N7e = M7e, I7e = D7e, une = { - loadAll: N7e, - load: I7e -}, hne = Object.prototype.toString, fne = Object.prototype.hasOwnProperty, aD = 65279, P7e = 9, n2 = 10, $7e = 13, B7e = 32, F7e = 33, z7e = 34, l8 = 35, V7e = 37, U7e = 38, q7e = 39, Y7e = 42, dne = 44, Q7e = 45, o3 = 58, W7e = 61, G7e = 62, H7e = 63, X7e = 64, pne = 91, gne = 93, Z7e = 96, mne = 123, j7e = 124, vne = 125, qs = {}; +var I7e = D7e, P7e = N7e, hne = { + loadAll: I7e, + load: P7e +}, fne = Object.prototype.toString, dne = Object.prototype.hasOwnProperty, oD = 65279, $7e = 9, n2 = 10, B7e = 13, F7e = 32, z7e = 33, V7e = 34, c8 = 35, U7e = 37, q7e = 38, Y7e = 39, Q7e = 42, pne = 44, W7e = 45, l3 = 58, G7e = 61, H7e = 62, X7e = 63, Z7e = 64, gne = 91, mne = 93, j7e = 96, vne = 123, K7e = 124, yne = 125, qs = {}; qs[0] = "\\0"; qs[7] = "\\a"; qs[8] = "\\b"; @@ -27524,7 +27524,7 @@ qs[133] = "\\N"; qs[160] = "\\_"; qs[8232] = "\\L"; qs[8233] = "\\P"; -var K7e = [ +var J7e = [ "y", "Y", "yes", @@ -27541,16 +27541,16 @@ var K7e = [ "off", "Off", "OFF" -], J7e = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; -function e8e(t, e) { +], e8e = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; +function t8e(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 && fne.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 && dne.call(l.styleAliases, o) && (o = l.styleAliases[o]), r[a] = o; return r; } -function t8e(t) { +function r8e(t) { var e, r, n; if (e = t.toString(16).toUpperCase(), t <= 255) r = "x", n = 2; @@ -27562,63 +27562,63 @@ function t8e(t) { throw new ea("code point within a string may not be greater than 0xFFFFFFFF"); return "\\" + r + Ti.repeat("0", n - e.length) + e; } -var r8e = 1, i2 = 2; -function n8e(t) { - this.schema = t.schema || nD, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = Ti.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = e8e(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 === '"' ? i2 : r8e, 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 n8e = 1, i2 = 2; +function i8e(t) { + this.schema = t.schema || iD, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = Ti.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = t8e(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 === '"' ? i2 : n8e, 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 mV(t, e) { +function vV(t, e) { for (var r = Ti.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 c8(t, e) { +function u8(t, e) { return ` ` + Ti.repeat(" ", t.indent * e); } -function i8e(t, e) { +function s8e(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)) return !0; return !1; } -function l3(t) { - return t === B7e || t === P7e; +function c3(t) { + return t === F7e || t === $7e; } function s2(t) { - return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== aD || 65536 <= t && t <= 1114111; -} -function vV(t) { - return s2(t) && t !== aD && t !== $7e && t !== n2; + return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== oD || 65536 <= t && t <= 1114111; } -function yV(t, e, r) { - var n = vV(t), i = n && !l3(t); - return (r ? n : n && t !== dne && t !== pne && t !== gne && t !== mne && t !== vne) && t !== l8 && !(e === o3 && !i) || vV(e) && !l3(e) && t === l8 || e === o3 && i; +function yV(t) { + return s2(t) && t !== oD && t !== B7e && t !== n2; } -function s8e(t) { - return s2(t) && t !== aD && !l3(t) && t !== Q7e && t !== H7e && t !== o3 && t !== dne && t !== pne && t !== gne && t !== mne && t !== vne && t !== l8 && t !== U7e && t !== Y7e && t !== F7e && t !== j7e && t !== W7e && t !== G7e && t !== q7e && t !== z7e && t !== V7e && t !== X7e && t !== Z7e; +function bV(t, e, r) { + var n = yV(t), i = n && !c3(t); + return (r ? n : n && t !== pne && t !== gne && t !== mne && t !== vne && t !== yne) && t !== c8 && !(e === l3 && !i) || yV(e) && !c3(e) && t === c8 || e === l3 && i; } function a8e(t) { - return !l3(t) && t !== o3; + return s2(t) && t !== oD && !c3(t) && t !== W7e && t !== X7e && t !== l3 && t !== pne && t !== gne && t !== mne && t !== vne && t !== yne && t !== c8 && t !== q7e && t !== Q7e && t !== z7e && t !== K7e && t !== G7e && t !== H7e && t !== Y7e && t !== V7e && t !== U7e && t !== Z7e && t !== j7e; +} +function o8e(t) { + return !c3(t) && t !== l3; } function bv(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 yne(t) { +function bne(t) { var e = /^\n* /; return e.test(t); } -var bne = 1, u8 = 2, xne = 3, wne = 4, Ep = 5; -function o8e(t, e, r, n, i, s, a, o) { - var l, u = 0, h = null, f = !1, d = !1, p = n !== -1, g = -1, m = s8e(bv(t, 0)) && a8e(bv(t, t.length - 1)); +var xne = 1, h8 = 2, wne = 3, One = 4, Ep = 5; +function l8e(t, e, r, n, i, s, a, o) { + var l, u = 0, h = null, f = !1, d = !1, p = n !== -1, g = -1, m = a8e(bv(t, 0)) && o8e(bv(t, t.length - 1)); if (e || a) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { if (u = bv(t, l), !s2(u)) return Ep; - m = m && yV(u, h, o), h = u; + m = m && bV(u, h, o), h = u; } else { for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) { @@ -27626,23 +27626,23 @@ function o8e(t, e, r, n, i, s, a, o) { f = !0, p && (d = d || l - g - 1 > n && t[g + 1] !== " ", g = l); else if (!s2(u)) return Ep; - m = m && yV(u, h, o), h = u; + m = m && bV(u, h, o), h = u; } d = d || p && l - g - 1 > n && t[g + 1] !== " "; } - return !f && !d ? m && !a && !i(t) ? bne : s === i2 ? Ep : u8 : r > 9 && yne(t) ? Ep : a ? s === i2 ? Ep : u8 : d ? wne : xne; + return !f && !d ? m && !a && !i(t) ? xne : s === i2 ? Ep : h8 : r > 9 && bne(t) ? Ep : a ? s === i2 ? Ep : h8 : d ? One : wne; } -function l8e(t, e, r, n, i) { +function c8e(t, e, r, n, i) { t.dump = function() { if (e.length === 0) return t.quotingType === i2 ? '""' : "''"; - if (!t.noCompatMode && (K7e.indexOf(e) !== -1 || J7e.test(e))) + if (!t.noCompatMode && (J7e.indexOf(e) !== -1 || e8e.test(e))) return t.quotingType === i2 ? '"' + 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 i8e(t, u); + return s8e(t, u); } - switch (o8e( + switch (l8e( e, o, t.indent, @@ -27652,47 +27652,47 @@ function l8e(t, e, r, n, i) { t.forceQuotes && !n, i )) { - case bne: + case xne: return e; - case u8: + case h8: return "'" + e.replace(/'/g, "''") + "'"; - case xne: - return "|" + bV(e, t.indent) + xV(mV(e, s)); case wne: - return ">" + bV(e, t.indent) + xV(mV(c8e(e, a), s)); + return "|" + xV(e, t.indent) + wV(vV(e, s)); + case One: + return ">" + xV(e, t.indent) + wV(vV(u8e(e, a), s)); case Ep: - return '"' + u8e(e) + '"'; + return '"' + h8e(e) + '"'; default: throw new ea("impossible error: invalid scalar style"); } }(); } -function bV(t, e) { - var r = yne(t) ? String(e) : "", n = t[t.length - 1] === ` +function xV(t, e) { + var r = bne(t) ? String(e) : "", n = t[t.length - 1] === ` `, i = n && (t[t.length - 2] === ` ` || t === ` `), s = i ? "+" : n ? "" : "-"; return r + s + ` `; } -function xV(t) { +function wV(t) { return t[t.length - 1] === ` ` ? t.slice(0, -1) : t; } -function c8e(t, e) { +function u8e(t, e) { for (var r = /(\n+)([^\n]*)/g, n = function() { var u = t.indexOf(` `); - return u = u !== -1 ? u : t.length, r.lastIndex = u, wV(t.slice(0, u), e); + return u = u !== -1 ? u : t.length, r.lastIndex = u, OV(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 !== "" ? ` -` : "") + wV(l, e), i = s; +` : "") + OV(l, e), i = s; } return n; } -function wV(t, e) { +function OV(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); ) @@ -27702,30 +27702,30 @@ function wV(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 u8e(t) { +function h8e(t) { for (var e = "", r = 0, n, i = 0; i < t.length; r >= 65536 ? i += 2 : i++) - r = bv(t, i), n = qs[r], !n && s2(r) ? (e += t[i], r >= 65536 && (e += t[i + 1])) : e += n || t8e(r); + r = bv(t, i), n = qs[r], !n && s2(r) ? (e += t[i], r >= 65536 && (e += t[i + 1])) : e += n || r8e(r); return e; } -function h8e(t, e, r) { +function f8e(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)), (Vu(t, e, o, !1, !1) || typeof o > "u" && Vu(t, e, null, !1, !1)) && (n !== "" && (n += "," + (t.condenseFlow ? "" : " ")), n += t.dump); t.tag = i, t.dump = "[" + n + "]"; } -function OV(t, e, r, n) { +function kV(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)), (Vu(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && Vu(t, e + 1, null, !0, !0, !1, !0)) && ((!n || i !== "") && (i += c8(t, e)), t.dump && n2 === t.dump.charCodeAt(0) ? i += "-" : i += "- ", i += t.dump); + l = r[a], t.replacer && (l = t.replacer.call(r, String(a), l)), (Vu(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && Vu(t, e + 1, null, !0, !0, !1, !0)) && ((!n || i !== "") && (i += u8(t, e)), t.dump && n2 === t.dump.charCodeAt(0) ? i += "-" : i += "- ", i += t.dump); t.tag = s, t.dump = i || "[]"; } -function f8e(t, e, r) { +function d8e(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)), Vu(t, e, l, !1, !1) && (t.dump.length > 1024 && (h += "? "), h += t.dump + (t.condenseFlow ? '"' : "") + ":" + (t.condenseFlow ? "" : " "), Vu(t, e, u, !1, !1) && (h += t.dump, n += h)); t.tag = i, t.dump = "{" + n + "}"; } -function d8e(t, e, r, n) { +function p8e(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(); @@ -27734,17 +27734,17 @@ function d8e(t, e, r, n) { else if (t.sortKeys) throw new ea("sortKeys must be a boolean or a function"); for (o = 0, l = a.length; o < l; o += 1) - d = "", (!n || i !== "") && (d += c8(t, e)), u = a[o], h = r[u], t.replacer && (h = t.replacer.call(r, u, h)), Vu(t, e + 1, u, !0, !0, !0) && (f = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, f && (t.dump && n2 === t.dump.charCodeAt(0) ? d += "?" : d += "? "), d += t.dump, f && (d += c8(t, e)), Vu(t, e + 1, h, !0, f) && (t.dump && n2 === t.dump.charCodeAt(0) ? d += ":" : d += ": ", d += t.dump, i += d)); + d = "", (!n || i !== "") && (d += u8(t, e)), u = a[o], h = r[u], t.replacer && (h = t.replacer.call(r, u, h)), Vu(t, e + 1, u, !0, !0, !0) && (f = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, f && (t.dump && n2 === t.dump.charCodeAt(0) ? d += "?" : d += "? "), d += t.dump, f && (d += u8(t, e)), Vu(t, e + 1, h, !0, f) && (t.dump && n2 === t.dump.charCodeAt(0) ? d += ":" : d += ": ", d += t.dump, i += d)); t.tag = s, t.dump = i || "{}"; } -function kV(t, e, r) { +function SV(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, hne.call(o.represent) === "[object Function]") + if (l = t.styleMap[o.tag] || o.defaultStyle, fne.call(o.represent) === "[object Function]") n = o.represent(e, l); - else if (fne.call(o.represent, l)) + else if (dne.call(o.represent, l)) n = o.represent[l](e, l); else throw new ea("!<" + o.tag + '> tag resolver accepts not "' + l + '" style'); @@ -27755,19 +27755,19 @@ function kV(t, e, r) { return !1; } function Vu(t, e, r, n, i, s, a) { - t.tag = null, t.dump = r, kV(t, r, !1) || kV(t, r, !0); - var o = hne.call(t.dump), l = n, u; + t.tag = null, t.dump = r, SV(t, r, !1) || SV(t, r, !0); + var o = fne.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 ? (d8e(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (f8e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); + n && Object.keys(t.dump).length !== 0 ? (p8e(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (d8e(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 ? OV(t, e - 1, t.dump, i) : OV(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (h8e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); + n && t.dump.length !== 0 ? (t.noArrayIndent && !a && e > 0 ? kV(t, e - 1, t.dump, i) : kV(t, e, t.dump, i), d && (t.dump = "&ref_" + f + t.dump)) : (f8e(t, e, t.dump), d && (t.dump = "&ref_" + f + " " + t.dump)); else if (o === "[object String]") - t.tag !== "?" && l8e(t, t.dump, e, s, l); + t.tag !== "?" && c8e(t, t.dump, e, s, l); else { if (o === "[object Undefined]") return !1; @@ -27781,71 +27781,71 @@ function Vu(t, e, r, n, i, s, a) { } return !0; } -function p8e(t, e) { +function g8e(t, e) { var r = [], n = [], i, s; - for (h8(t, r, n), i = 0, s = n.length; i < s; i += 1) + for (f8(t, r, n), i = 0, s = n.length; i < s; i += 1) e.duplicates.push(r[n[i]]); e.usedDuplicates = new Array(s); } -function h8(t, e, r) { +function f8(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) - h8(t[i], e, r); + f8(t[i], e, r); else for (n = Object.keys(t), i = 0, s = n.length; i < s; i += 1) - h8(t[n[i]], e, r); + f8(t[n[i]], e, r); } -function g8e(t, e) { +function m8e(t, e) { e = e || {}; - var r = new n8e(e); - r.noRefs || p8e(t, r); + var r = new i8e(e); + r.noRefs || g8e(t, r); var n = t; return r.replacer && (n = r.replacer.call({ "": n }, "", n)), Vu(r, 0, n, !0, !0) ? r.dump + ` ` : ""; } -var m8e = g8e, v8e = { - dump: m8e +var v8e = m8e, y8e = { + dump: v8e }; -function oD(t, e) { +function lD(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 y8e = hs, b8e = $re, x8e = Vre, w8e = Wre, O8e = Gre, k8e = nD, S8e = une.load, T8e = une.loadAll, C8e = v8e.dump, E8e = ea, _8e = { - binary: Kre, - float: Qre, - map: zre, - null: Ure, - pairs: ene, - set: tne, - timestamp: Zre, - bool: qre, - int: Yre, - merge: jre, - omap: Jre, - seq: Fre, - str: Bre -}, A8e = oD("safeLoad", "load"), L8e = oD("safeLoadAll", "loadAll"), R8e = oD("safeDump", "dump"), M8e = { - Type: y8e, - Schema: b8e, - FAILSAFE_SCHEMA: x8e, - JSON_SCHEMA: w8e, - CORE_SCHEMA: O8e, - DEFAULT_SCHEMA: k8e, - load: S8e, - loadAll: T8e, - dump: C8e, - YAMLException: E8e, - types: _8e, - safeLoad: A8e, - safeLoadAll: L8e, - safeDump: R8e -}; -function D8e(t, e, r, n, i, s = !0) { +var b8e = hs, x8e = Bre, w8e = Ure, O8e = Gre, k8e = Hre, S8e = iD, T8e = hne.load, C8e = hne.loadAll, E8e = y8e.dump, _8e = ea, A8e = { + binary: Jre, + float: Wre, + map: Vre, + null: qre, + pairs: tne, + set: rne, + timestamp: jre, + bool: Yre, + int: Qre, + merge: Kre, + omap: ene, + seq: zre, + str: Fre +}, L8e = lD("safeLoad", "load"), R8e = lD("safeLoadAll", "loadAll"), M8e = lD("safeDump", "dump"), D8e = { + Type: b8e, + Schema: x8e, + FAILSAFE_SCHEMA: w8e, + JSON_SCHEMA: O8e, + CORE_SCHEMA: k8e, + DEFAULT_SCHEMA: S8e, + load: T8e, + loadAll: C8e, + dump: E8e, + YAMLException: _8e, + types: A8e, + safeLoad: L8e, + safeLoadAll: R8e, + safeDump: M8e +}; +function N8e(t, e, r, n, i, s = !0) { const a = []; for (const l of [...t.core.ruler.__rules__].reverse()) { if (l.name === e) { @@ -27885,7 +27885,7 @@ class F0 { 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 D8e(this.state.md, "run_directives", e, this.state.env, r, !0); + return N8e(this.state.md, "run_directives", e, this.state.env, r, !0); } } class Fh extends Error { @@ -27893,12 +27893,12 @@ class Fh extends Error { super(...arguments), this.name = "DirectiveParsingError"; } } -function N8e(t, e) { +function I8e(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] = One(i, e)); + (Object.keys(e.option_spec || {}) || e.rawOptions) && ([i, a, s] = kne(i, e)); let o = []; - if (!e.required_arguments && !e.optional_arguments ? r && (s = 0, i = [r].concat(i)) : o = I8e(r, e), i.length && !i[0].trim() && (i.shift(), s++), i.length && !e.has_content) + if (!e.required_arguments && !e.optional_arguments ? r && (s = 0, i = [r].concat(i)) : o = P8e(r, e), i.length && !i[0].trim() && (i.shift(), s++), i.length && !e.has_content) throw new Fh("Has content but content not allowed"); return { map: t.map ? t.map : [0, 0], @@ -27912,7 +27912,7 @@ function N8e(t, e) { ] : [0, 0] }; } -function One(t, e) { +function kne(t, e) { let r = 1, n = {}, i = null; if (t.length && t[0].startsWith("---")) { r++; @@ -27942,7 +27942,7 @@ function One(t, e) { } if (i !== null) try { - const s = M8e.load(i.join(` + const s = D8e.load(i.join(` `)); if (s !== null && typeof s == "object") n = s; @@ -27969,7 +27969,7 @@ ${u}`); } return [t, n, r]; } -function I8e(t, e) { +function P8e(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); @@ -27983,10 +27983,10 @@ function I8e(t, e) { throw new Fh(`maximum ${i} argument(s) allowed, ${n.length} supplied`); return n; } -function P8e(t, e) { +function $8e(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", $8e), n = "fence_to_directive"), t.core.ruler.after(n, "run_directives", B8e(e.directives || {})), t.renderer.rules.directive = (i, s) => { + (!((r = e.replaceFences) !== null && r !== void 0) || r) && (t.core.ruler.after(n, "fence_to_directive", B8e), n = "fence_to_directive"), t.core.ruler.after(n, "run_directives", F8e(e.directives || {})), t.renderer.rules.directive = (i, s) => { const a = i[s]; return ` `; }; } -function $8e(t) { +function B8e(t) { for (const e of t.tokens) if (e.type === "fence" || e.type === "colon_fence") { const r = e.info.match(/^\{([^\s}]+)\}\s*(.*)$/); @@ -28013,13 +28013,13 @@ function $8e(t) { } return !0; } -function B8e(t) { +function F8e(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 = N8e(i, s), [o, l] = One(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 = I8e(i, s), [o, l] = kne(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, @@ -28039,7 +28039,7 @@ function B8e(t) { } return e; } -function F8e(t) { +function z8e(t) { return t.toLowerCase().split(/\s+/).join("-").replace(/[^a-z0-9]+/, "-").replace(/^[-0-9]+|-+$/, ""); } class n0 extends Error { @@ -28047,16 +28047,16 @@ class n0 extends Error { super(...arguments), this.name = "OptionSpecError"; } } -const mf = (t) => t, f8 = (t) => { +const mf = (t) => t, d8 = (t) => { if (!t) throw new n0("Argument required but none supplied"); return t; -}, d8 = (t) => { +}, p8 = (t) => { if (t.trim()) throw new n0(`No argument is allowed: "${t}" supplied`); return null; -}, Q1 = (t) => `${t || ""}`.split(/\s+/).map((e) => F8e(e)); -function kne(t) { +}, Q1 = (t) => `${t || ""}`.split(/\s+/).map((e) => z8e(e)); +function Sne(t) { if (!t) throw new n0("Value is not set"); const e = Number.parseFloat(t); @@ -28064,34 +28064,34 @@ function kne(t) { throw new n0(`Value "${t}" is not an integer`); return e; } -function c3(t) { - const e = kne(t); +function u3(t) { + const e = Sne(t); if (e < 0) throw new n0(`Value "${t}" must be positive or zero`); return e; } -const Sne = (t) => t ? c3(t) : null, z8e = (t) => (t = `${t || ""}`.replace(/\s+%$/, ""), c3(t)); -function Tne(t, e) { +const Tne = (t) => t ? u3(t) : null, V8e = (t) => (t = `${t || ""}`.replace(/\s+%$/, ""), u3(t)); +function Cne(t, e) { const n = new RegExp(`^(?[0-9.]+)\\s*(?${e.join("|")})$`).exec(t); if (!n || !n.groups) throw new n0(`not a positive measure of one of the following units: ${e.join("|")}`); return n.groups.number + n.groups.units; } -const Cne = ["em", "ex", "px", "in", "cm", "mm", "pt", "pc"], Ene = (t) => Tne(t, [...Cne, ""]), lD = (t, e = "") => { +const Ene = ["em", "ex", "px", "in", "cm", "mm", "pt", "pc"], _ne = (t) => Cne(t, [...Ene, ""]), cD = (t, e = "") => { try { - return Tne(t, [...Cne, "%"]); + return Cne(t, [...Ene, "%"]); } catch { - return Ene(t) + e; + return _ne(t) + e; } -}, V8e = (t, e = "") => t.toLowerCase() === "image" ? "image" : lD(t, e); -function cD(t) { +}, U8e = (t, e = "") => t.toLowerCase() === "image" ? "image" : cD(t, e); +function uD(t) { return (e) => { if (e = e.toLowerCase().trim(), t.includes(e)) return e; throw new n0(`must be in: ${t.join("|")}`); }; } -const U8e = (t) => t; +const q8e = (t) => t; class Yl extends F0 { constructor() { super(...arguments), this.final_argument_whitespace = !0, this.has_content = !0, this.option_spec = { @@ -28119,79 +28119,79 @@ class Yl extends F0 { return n.push(...o), n.push(this.createToken("admonition_close", "aside", -1, { block: !0 })), n; } } -class q8e extends Yl { +class Y8e extends Yl { constructor() { super(...arguments), this.required_arguments = 1; } } -class Y8e extends Yl { +class Q8e extends Yl { constructor() { super(...arguments), this.title = "Attention", this.kind = "attention"; } } -class Q8e extends Yl { +class W8e extends Yl { constructor() { super(...arguments), this.title = "Caution", this.kind = "caution"; } } -class W8e extends Yl { +class G8e extends Yl { constructor() { super(...arguments), this.title = "Danger", this.kind = "danger"; } } -class G8e extends Yl { +class H8e extends Yl { constructor() { super(...arguments), this.title = "Error", this.kind = "error"; } } -class H8e extends Yl { +class X8e extends Yl { constructor() { super(...arguments), this.title = "Important", this.kind = "important"; } } -class X8e extends Yl { +class Z8e extends Yl { constructor() { super(...arguments), this.title = "Hint", this.kind = "hint"; } } -class Z8e extends Yl { +class j8e extends Yl { constructor() { super(...arguments), this.title = "Note", this.kind = "note"; } } -class j8e extends Yl { +class K8e extends Yl { constructor() { super(...arguments), this.title = "See Also", this.kind = "seealso"; } } -class K8e extends Yl { +class J8e extends Yl { constructor() { super(...arguments), this.title = "Tip", this.kind = "tip"; } } -class J8e extends Yl { +class eLe extends Yl { constructor() { super(...arguments), this.title = "Warning", this.kind = "warning"; } } -const eLe = { - admonition: q8e, - attention: Y8e, - caution: Q8e, - danger: W8e, - error: G8e, - important: H8e, - hint: X8e, - note: Z8e, - seealso: j8e, - tip: K8e, - warning: J8e -}; -class tLe extends F0 { +const tLe = { + admonition: Y8e, + attention: Q8e, + caution: W8e, + danger: G8e, + error: H8e, + important: X8e, + hint: Z8e, + note: j8e, + seealso: K8e, + tip: J8e, + warning: eLe +}; +class rLe extends F0 { 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": Sne, - force: d8, + "number-lines": Tne, + force: p8, name: mf, class: Q1 }; @@ -28204,15 +28204,15 @@ class tLe extends F0 { })]; } } -class rLe extends F0 { +class nLe extends F0 { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { - linenos: d8, - "lineno-start": kne, - dedent: Sne, - "emphasize-lines": f8, - caption: f8, - force: d8, + linenos: p8, + "lineno-start": Sne, + dedent: Tne, + "emphasize-lines": d8, + caption: d8, + force: p8, name: mf, class: Q1 }; @@ -28225,7 +28225,7 @@ class rLe extends F0 { })]; } } -class nLe extends F0 { +class iLe extends F0 { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 1, this.final_argument_whitespace = !1, this.has_content = !0, this.rawOptions = !0; } @@ -28237,25 +28237,25 @@ class nLe extends F0 { })]; } } -const iLe = { - code: tLe, - "code-block": rLe, - "code-cell": nLe -}, _ne = { +const sLe = { + code: rLe, + "code-block": nLe, + "code-cell": iLe +}, Ane = { alt: mf, - height: Ene, - width: lD, - scale: z8e, - target: f8, + height: _ne, + width: cD, + scale: V8e, + target: d8, class: Q1, name: mf }; -class Ane extends F0 { +class Lne extends F0 { constructor() { - super(...arguments), this.required_arguments = 1, this.optional_arguments = 0, this.final_argument_whitespace = !0, this.option_spec = Object.assign(Object.assign({}, _ne), { align: cD(["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({}, Ane), { align: uD(["left", "center", "right", "top", "middle", "bottom"]) }); } create_image(e) { - const r = U8e(e.args[0] || ""), n = this.createToken("image", "img", 0, { map: e.map, block: !0 }); + const r = q8e(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; @@ -28264,9 +28264,9 @@ class Ane extends F0 { return [this.create_image(e)]; } } -class sLe extends Ane { +class aLe extends Lne { constructor() { - super(...arguments), this.option_spec = Object.assign(Object.assign({}, _ne), { align: cD(["left", "center", "right"]), figwidth: V8e, figclass: Q1 }), this.has_content = !0; + super(...arguments), this.option_spec = Object.assign(Object.assign({}, Ane), { align: uD(["left", "center", "right"]), figwidth: U8e, figclass: Q1 }), this.has_content = !0; } run(e) { const r = this.createToken("figure_open", "figure", 1, { @@ -28275,7 +28275,7 @@ class sLe extends Ane { }); 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 = Dre( + e.options.name && (n = Nre( this.state, r, t2.figure, @@ -28311,11 +28311,11 @@ class sLe extends Ane { return [r, i, ...s, ...a, o]; } } -const aLe = { - image: Ane, - figure: sLe +const oLe = { + image: Lne, + figure: aLe }; -class uD { +class hD { constructor(e, r = !0) { if (this.children = [], this.children = [], r) { this._set_children_from_tokens(e); @@ -28351,7 +28351,7 @@ class uD { } } _add_child(e) { - const r = new uD(e, !1); + const r = new hD(e, !1); r.parent = this, this.children.push(r); } to_tokens() { @@ -28437,16 +28437,16 @@ class uD { return this.attribute_token().attrs; } } -class oLe extends F0 { +class lLe extends F0 { 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": c3, - "stub-columns": c3, - width: lD, + "header-rows": u3, + "stub-columns": u3, + width: cD, widths: mf, class: Q1, name: mf, - align: cD(["left", "center", "right"]) + align: uD(["left", "center", "right"]) }; } run(e) { @@ -28463,7 +28463,7 @@ class oLe extends F0 { 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 uD(n.slice(1, -1)).children) { + for (const u of new hD(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 })); @@ -28476,10 +28476,10 @@ class oLe extends F0 { 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 lLe = { - "list-table": oLe +const cLe = { + "list-table": lLe }; -class cLe extends F0 { +class uLe extends F0 { constructor() { super(...arguments), this.required_arguments = 0, this.optional_arguments = 0, this.final_argument_whitespace = !1, this.has_content = !0, this.option_spec = { label: mf @@ -28494,18 +28494,18 @@ class cLe extends F0 { }); if (r.attrSet("class", "math block"), e.options.label) { r.attrSet("id", e.options.label); - const n = Dre(this.state, r, t2.equation, e.options.label, ""); + const n = Nre(this.state, r, t2.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 uLe = { - math: cLe -}, hLe = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, eLe), aLe), iLe), lLe), uLe); -function fLe(t) { +const hLe = { + math: uLe +}, fLe = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, tLe), oLe), sLe), cLe), hLe); +function dLe(t) { return (e) => { - const r = cT(e); + const r = uT(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) @@ -28521,20 +28521,20 @@ function fLe(t) { }), !0; }; } -function dLe(t, e) { - t.core.ruler.push("docutils_number", fLe()); +function pLe(t, e) { + t.core.ruler.push("docutils_number", dLe()); } -const pLe = { +const gLe = { parseRoles: !0, replaceFences: !0, rolesAfter: "inline", directivesAfter: "block", - directives: hLe, - roles: fAe + directives: fLe, + roles: dAe }; -function gLe(t, e) { - const r = Object.assign(Object.assign({}, pLe), e); - t.use(Mre, r), t.use(P8e, r), t.use(dLe, r); +function mLe(t, e) { + const r = Object.assign(Object.assign({}, gLe), e); + t.use(Dre, r), t.use($8e, r), t.use(pLe, 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 Ah(t) { @@ -28544,12 +28544,12 @@ function Ah(t) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Ah(t); } -function p8(t, e) { - return p8 = Object.setPrototypeOf || function(n, i) { +function g8(t, e) { + return g8 = Object.setPrototypeOf || function(n, i) { return n.__proto__ = i, n; - }, p8(t, e); + }, g8(t, e); } -function mLe() { +function vLe() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") @@ -28561,48 +28561,48 @@ function mLe() { return !1; } } -function O4(t, e, r) { - return mLe() ? O4 = Reflect.construct : O4 = function(i, s, a) { +function k4(t, e, r) { + return vLe() ? k4 = Reflect.construct : k4 = function(i, s, a) { var o = [null]; o.push.apply(o, s); var l = Function.bind.apply(i, o), u = new l(); - return a && p8(u, a.prototype), u; - }, O4.apply(null, arguments); + return a && g8(u, a.prototype), u; + }, k4.apply(null, arguments); } function sl(t) { - return vLe(t) || yLe(t) || bLe(t) || xLe(); + return yLe(t) || bLe(t) || xLe(t) || wLe(); } -function vLe(t) { +function yLe(t) { if (Array.isArray(t)) - return g8(t); + return m8(t); } -function yLe(t) { +function bLe(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } -function bLe(t, e) { +function xLe(t, e) { if (!!t) { if (typeof t == "string") - return g8(t, e); + return m8(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 g8(t, e); + return m8(t, e); } } -function g8(t, e) { +function m8(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 xLe() { +function wLe() { 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 wLe = Object.hasOwnProperty, SV = Object.setPrototypeOf, OLe = Object.isFrozen, kLe = Object.getPrototypeOf, SLe = Object.getOwnPropertyDescriptor, oa = Object.freeze, Pl = Object.seal, TLe = Object.create, Lne = typeof Reflect < "u" && Reflect, u3 = Lne.apply, m8 = Lne.construct; -u3 || (u3 = function(e, r, n) { +var OLe = Object.hasOwnProperty, TV = Object.setPrototypeOf, kLe = Object.isFrozen, SLe = Object.getPrototypeOf, TLe = Object.getOwnPropertyDescriptor, oa = Object.freeze, Pl = Object.seal, CLe = Object.create, Rne = typeof Reflect < "u" && Reflect, h3 = Rne.apply, v8 = Rne.construct; +h3 || (h3 = function(e, r, n) { return e.apply(r, n); }); oa || (oa = function(e) { @@ -28611,66 +28611,66 @@ oa || (oa = function(e) { Pl || (Pl = function(e) { return e; }); -m8 || (m8 = function(e, r) { - return O4(e, sl(r)); +v8 || (v8 = function(e, r) { + return k4(e, sl(r)); }); -var CLe = qo(Array.prototype.forEach), TV = qo(Array.prototype.pop), Bm = qo(Array.prototype.push), k4 = qo(String.prototype.toLowerCase), d6 = qo(String.prototype.toString), ELe = qo(String.prototype.match), il = qo(String.prototype.replace), _Le = qo(String.prototype.indexOf), ALe = qo(String.prototype.trim), Xs = qo(RegExp.prototype.test), p6 = LLe(TypeError); +var ELe = qo(Array.prototype.forEach), CV = qo(Array.prototype.pop), Bm = qo(Array.prototype.push), S4 = qo(String.prototype.toLowerCase), p6 = qo(String.prototype.toString), _Le = qo(String.prototype.match), il = qo(String.prototype.replace), ALe = qo(String.prototype.indexOf), LLe = qo(String.prototype.trim), Xs = qo(RegExp.prototype.test), g6 = RLe(TypeError); function qo(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 u3(t, e, n); + return h3(t, e, n); }; } -function LLe(t) { +function RLe(t) { return function() { for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++) r[n] = arguments[n]; - return m8(t, r); + return v8(t, r); }; } function mr(t, e, r) { var n; - r = (n = r) !== null && n !== void 0 ? n : k4, SV && SV(t, null); + r = (n = r) !== null && n !== void 0 ? n : S4, TV && TV(t, null); for (var i = e.length; i--; ) { var s = e[i]; if (typeof s == "string") { var a = r(s); - a !== s && (OLe(e) || (e[i] = a), s = a); + a !== s && (kLe(e) || (e[i] = a), s = a); } t[s] = !0; } return t; } function Jf(t) { - var e = TLe(null), r; + var e = CLe(null), r; for (r in t) - u3(wLe, t, [r]) === !0 && (e[r] = t[r]); + h3(OLe, t, [r]) === !0 && (e[r] = t[r]); return e; } function Fw(t, e) { for (; t !== null; ) { - var r = SLe(t, e); + var r = TLe(t, e); if (r) { if (r.get) return qo(r.get); if (typeof r.value == "function") return qo(r.value); } - t = kLe(t); + t = SLe(t); } function n(i) { return console.warn("fallback value for", i), null; } return n; } -var CV = oa(["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"]), g6 = oa(["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"]), m6 = oa(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), RLe = oa(["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"]), v6 = oa(["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"]), MLe = oa(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), EV = oa(["#text"]), _V = oa(["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"]), y6 = oa(["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"]), AV = oa(["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"]), zw = oa(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), DLe = Pl(/\{\{[\w\W]*|[\w\W]*\}\}/gm), NLe = Pl(/<%[\w\W]*|[\w\W]*%>/gm), ILe = Pl(/\${[\w\W]*}/gm), PLe = Pl(/^data-[\-\w.\u00B7-\uFFFF]/), $Le = Pl(/^aria-[\-\w]+$/), BLe = Pl( +var EV = oa(["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 = oa(["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 = oa(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), MLe = oa(["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 = oa(["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"]), DLe = oa(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), _V = oa(["#text"]), AV = oa(["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 = oa(["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"]), LV = oa(["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"]), zw = oa(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), NLe = Pl(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ILe = Pl(/<%[\w\W]*|[\w\W]*%>/gm), PLe = Pl(/\${[\w\W]*}/gm), $Le = Pl(/^data-[\-\w.\u00B7-\uFFFF]/), BLe = Pl(/^aria-[\-\w]+$/), FLe = Pl( /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i -), FLe = Pl(/^(?:\w+script|data):/i), zLe = Pl( +), zLe = Pl(/^(?:\w+script|data):/i), VLe = Pl( /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g -), VLe = Pl(/^html$/i), ULe = function() { +), ULe = Pl(/^html$/i), qLe = function() { return typeof window > "u" ? null : window; -}, qLe = function(e, r) { +}, YLe = function(e, r) { if (Ah(e) !== "object" || typeof e.createPolicy != "function") return null; var n = null, i = "data-tt-policy-suffix"; @@ -28689,9 +28689,9 @@ var CV = oa(["a", "abbr", "acronym", "address", "area", "article", "aside", "aud return console.warn("TrustedTypes policy " + s + " could not be created."), null; } }; -function Rne() { - var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ULe(), e = function(te) { - return Rne(te); +function Mne() { + var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qLe(), e = function(te) { + return Mne(te); }; if (e.version = "2.4.7", e.removed = [], !t || !t.document || t.document.nodeType !== 9) return e.isSupported = !1, e; @@ -28700,14 +28700,14 @@ function Rne() { var w = n.createElement("template"); w.content && w.content.ownerDocument && (n = w.content.ownerDocument); } - var O = qLe(p, r), S = O ? O.createHTML("") : "", C = n, T = C.implementation, L = C.createNodeIterator, E = C.createDocumentFragment, R = C.getElementsByTagName, _ = r.importNode, A = {}; + var O = YLe(p, r), S = O ? O.createHTML("") : "", C = n, T = C.implementation, L = C.createNodeIterator, E = C.createDocumentFragment, R = C.getElementsByTagName, _ = r.importNode, A = {}; try { A = Jf(n).documentMode ? n.documentMode : {}; } catch { } var $ = {}; e.isSupported = typeof b == "function" && T && T.createHTMLDocument !== void 0 && A !== 9; - var k = DLe, N = NLe, M = ILe, I = PLe, D = $Le, P = FLe, F = zLe, B = BLe, V = null, Y = mr({}, [].concat(sl(CV), sl(g6), sl(m6), sl(v6), sl(EV))), G = null, ee = mr({}, [].concat(sl(_V), sl(y6), sl(AV), sl(zw))), Q = Object.seal(Object.create(null, { + var k = NLe, N = ILe, M = PLe, I = $Le, D = BLe, P = zLe, F = VLe, B = FLe, V = null, Y = mr({}, [].concat(sl(EV), sl(m6), sl(v6), sl(y6), sl(_V))), G = null, ee = mr({}, [].concat(sl(AV), sl(b6), sl(LV), sl(zw))), Q = Object.seal(Object.create(null, { tagNameCheck: { writable: !0, configurable: !1, @@ -28726,10 +28726,10 @@ function Rne() { enumerable: !0, value: !1 } - })), ne = null, ie = null, U = !0, Z = !0, W = !1, j = !0, ae = !1, se = !1, K = !1, _e = !1, ce = !1, Ee = !1, Ae = !1, Ue = !0, Ge = !1, Qe = "user-content-", De = !0, he = !1, H = {}, oe = null, ve = mr({}, ["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"]), re = null, ue = mr({}, ["audio", "video", "img", "source", "image", "track"]), fe = null, de = mr({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ge = "http://www.w3.org/1998/Math/MathML", xe = "http://www.w3.org/2000/svg", ke = "http://www.w3.org/1999/xhtml", Ce = ke, Oe = !1, Me = null, Te = mr({}, [ge, xe, ke], d6), Xe, Ne = ["application/xhtml+xml", "text/html"], Ke = "text/html", je, ut = null, ft = n.createElement("form"), ot = function(te) { + })), ne = null, ie = null, U = !0, Z = !0, W = !1, j = !0, ae = !1, se = !1, K = !1, _e = !1, ce = !1, Ee = !1, Ae = !1, Ue = !0, Ge = !1, Qe = "user-content-", De = !0, he = !1, H = {}, oe = null, ve = mr({}, ["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"]), re = null, ue = mr({}, ["audio", "video", "img", "source", "image", "track"]), fe = null, de = mr({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ge = "http://www.w3.org/1998/Math/MathML", xe = "http://www.w3.org/2000/svg", ke = "http://www.w3.org/1999/xhtml", Ce = ke, Oe = !1, Me = null, Te = mr({}, [ge, xe, ke], p6), Xe, Ne = ["application/xhtml+xml", "text/html"], Ke = "text/html", je, ut = null, ft = n.createElement("form"), ot = function(te) { return te instanceof RegExp || te instanceof Function; }, We = function(te) { - ut && ut === te || ((!te || Ah(te) !== "object") && (te = {}), te = Jf(te), Xe = Ne.indexOf(te.PARSER_MEDIA_TYPE) === -1 ? Xe = Ke : Xe = te.PARSER_MEDIA_TYPE, je = Xe === "application/xhtml+xml" ? d6 : k4, V = "ALLOWED_TAGS" in te ? mr({}, te.ALLOWED_TAGS, je) : Y, G = "ALLOWED_ATTR" in te ? mr({}, te.ALLOWED_ATTR, je) : ee, Me = "ALLOWED_NAMESPACES" in te ? mr({}, te.ALLOWED_NAMESPACES, d6) : Te, fe = "ADD_URI_SAFE_ATTR" in te ? mr( + ut && ut === te || ((!te || Ah(te) !== "object") && (te = {}), te = Jf(te), Xe = Ne.indexOf(te.PARSER_MEDIA_TYPE) === -1 ? Xe = Ke : Xe = te.PARSER_MEDIA_TYPE, je = Xe === "application/xhtml+xml" ? p6 : S4, V = "ALLOWED_TAGS" in te ? mr({}, te.ALLOWED_TAGS, je) : Y, G = "ALLOWED_ATTR" in te ? mr({}, te.ALLOWED_ATTR, je) : ee, Me = "ALLOWED_NAMESPACES" in te ? mr({}, te.ALLOWED_NAMESPACES, p6) : Te, fe = "ADD_URI_SAFE_ATTR" in te ? mr( Jf(de), te.ADD_URI_SAFE_ATTR, je @@ -28737,18 +28737,18 @@ function Rne() { Jf(ue), te.ADD_DATA_URI_TAGS, je - ) : ue, oe = "FORBID_CONTENTS" in te ? mr({}, te.FORBID_CONTENTS, je) : ve, ne = "FORBID_TAGS" in te ? mr({}, te.FORBID_TAGS, je) : {}, ie = "FORBID_ATTR" in te ? mr({}, te.FORBID_ATTR, je) : {}, H = "USE_PROFILES" in te ? te.USE_PROFILES : !1, U = te.ALLOW_ARIA_ATTR !== !1, Z = te.ALLOW_DATA_ATTR !== !1, W = te.ALLOW_UNKNOWN_PROTOCOLS || !1, j = te.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ae = te.SAFE_FOR_TEMPLATES || !1, se = te.WHOLE_DOCUMENT || !1, ce = te.RETURN_DOM || !1, Ee = te.RETURN_DOM_FRAGMENT || !1, Ae = te.RETURN_TRUSTED_TYPE || !1, _e = te.FORCE_BODY || !1, Ue = te.SANITIZE_DOM !== !1, Ge = te.SANITIZE_NAMED_PROPS || !1, De = te.KEEP_CONTENT !== !1, he = te.IN_PLACE || !1, B = te.ALLOWED_URI_REGEXP || B, Ce = te.NAMESPACE || ke, Q = te.CUSTOM_ELEMENT_HANDLING || {}, te.CUSTOM_ELEMENT_HANDLING && ot(te.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = te.CUSTOM_ELEMENT_HANDLING.tagNameCheck), te.CUSTOM_ELEMENT_HANDLING && ot(te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), te.CUSTOM_ELEMENT_HANDLING && typeof te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ae && (Z = !1), Ee && (ce = !0), H && (V = mr({}, sl(EV)), G = [], H.html === !0 && (mr(V, CV), mr(G, _V)), H.svg === !0 && (mr(V, g6), mr(G, y6), mr(G, zw)), H.svgFilters === !0 && (mr(V, m6), mr(G, y6), mr(G, zw)), H.mathMl === !0 && (mr(V, v6), mr(G, AV), mr(G, zw))), te.ADD_TAGS && (V === Y && (V = Jf(V)), mr(V, te.ADD_TAGS, je)), te.ADD_ATTR && (G === ee && (G = Jf(G)), mr(G, te.ADD_ATTR, je)), te.ADD_URI_SAFE_ATTR && mr(fe, te.ADD_URI_SAFE_ATTR, je), te.FORBID_CONTENTS && (oe === ve && (oe = Jf(oe)), mr(oe, te.FORBID_CONTENTS, je)), De && (V["#text"] = !0), se && mr(V, ["html", "head", "body"]), V.table && (mr(V, ["tbody"]), delete ne.tbody), oa && oa(te), ut = te); - }, Ye = mr({}, ["mi", "mo", "mn", "ms", "mtext"]), pt = mr({}, ["foreignobject", "desc", "title", "annotation-xml"]), tt = mr({}, ["title", "style", "font", "a", "script"]), He = mr({}, g6); - mr(He, m6), mr(He, RLe); - var kt = mr({}, v6); - mr(kt, MLe); + ) : ue, oe = "FORBID_CONTENTS" in te ? mr({}, te.FORBID_CONTENTS, je) : ve, ne = "FORBID_TAGS" in te ? mr({}, te.FORBID_TAGS, je) : {}, ie = "FORBID_ATTR" in te ? mr({}, te.FORBID_ATTR, je) : {}, H = "USE_PROFILES" in te ? te.USE_PROFILES : !1, U = te.ALLOW_ARIA_ATTR !== !1, Z = te.ALLOW_DATA_ATTR !== !1, W = te.ALLOW_UNKNOWN_PROTOCOLS || !1, j = te.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ae = te.SAFE_FOR_TEMPLATES || !1, se = te.WHOLE_DOCUMENT || !1, ce = te.RETURN_DOM || !1, Ee = te.RETURN_DOM_FRAGMENT || !1, Ae = te.RETURN_TRUSTED_TYPE || !1, _e = te.FORCE_BODY || !1, Ue = te.SANITIZE_DOM !== !1, Ge = te.SANITIZE_NAMED_PROPS || !1, De = te.KEEP_CONTENT !== !1, he = te.IN_PLACE || !1, B = te.ALLOWED_URI_REGEXP || B, Ce = te.NAMESPACE || ke, Q = te.CUSTOM_ELEMENT_HANDLING || {}, te.CUSTOM_ELEMENT_HANDLING && ot(te.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = te.CUSTOM_ELEMENT_HANDLING.tagNameCheck), te.CUSTOM_ELEMENT_HANDLING && ot(te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), te.CUSTOM_ELEMENT_HANDLING && typeof te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ae && (Z = !1), Ee && (ce = !0), H && (V = mr({}, sl(_V)), G = [], H.html === !0 && (mr(V, EV), mr(G, AV)), H.svg === !0 && (mr(V, m6), mr(G, b6), mr(G, zw)), H.svgFilters === !0 && (mr(V, v6), mr(G, b6), mr(G, zw)), H.mathMl === !0 && (mr(V, y6), mr(G, LV), mr(G, zw))), te.ADD_TAGS && (V === Y && (V = Jf(V)), mr(V, te.ADD_TAGS, je)), te.ADD_ATTR && (G === ee && (G = Jf(G)), mr(G, te.ADD_ATTR, je)), te.ADD_URI_SAFE_ATTR && mr(fe, te.ADD_URI_SAFE_ATTR, je), te.FORBID_CONTENTS && (oe === ve && (oe = Jf(oe)), mr(oe, te.FORBID_CONTENTS, je)), De && (V["#text"] = !0), se && mr(V, ["html", "head", "body"]), V.table && (mr(V, ["tbody"]), delete ne.tbody), oa && oa(te), ut = te); + }, Ye = mr({}, ["mi", "mo", "mn", "ms", "mtext"]), pt = mr({}, ["foreignobject", "desc", "title", "annotation-xml"]), tt = mr({}, ["title", "style", "font", "a", "script"]), He = mr({}, m6); + mr(He, v6), mr(He, MLe); + var kt = mr({}, y6); + mr(kt, DLe); var st = function(te) { var Le = b(te); (!Le || !Le.tagName) && (Le = { namespaceURI: Ce, tagName: "template" }); - var ze = k4(te.tagName), Lt = k4(Le.tagName); + var ze = S4(te.tagName), Lt = S4(Le.tagName); return Me[te.namespaceURI] ? te.namespaceURI === xe ? Le.namespaceURI === ke ? ze === "svg" : Le.namespaceURI === ge ? ze === "svg" && (Lt === "annotation-xml" || Ye[Lt]) : Boolean(He[ze]) : te.namespaceURI === ge ? Le.namespaceURI === ke ? ze === "math" : Le.namespaceURI === xe ? ze === "math" && pt[Lt] : Boolean(kt[ze]) : te.namespaceURI === ke ? Le.namespaceURI === xe && !pt[Lt] || Le.namespaceURI === ge && !Ye[Lt] ? !1 : !kt[ze] && (tt[ze] || !He[ze]) : !!(Xe === "application/xhtml+xml" && Me[te.namespaceURI]) : !1; }, Ze = function(te) { Bm(e.removed, { @@ -28791,7 +28791,7 @@ function Rne() { if (_e) te = "" + te; else { - var Lt = ELe(te, /^[\r\n\t ]+/); + var Lt = _Le(te, /^[\r\n\t ]+/); ze = Lt && Lt[0]; } Xe === "application/xhtml+xml" && Ce === ke && (te = '' + te + ""); @@ -28822,16 +28822,16 @@ function Rne() { return te instanceof f && (typeof te.nodeName != "string" || typeof te.textContent != "string" || typeof te.removeChild != "function" || !(te.attributes instanceof h) || typeof te.removeAttribute != "function" || typeof te.setAttribute != "function" || typeof te.namespaceURI != "string" || typeof te.insertBefore != "function" || typeof te.hasChildNodes != "function"); }, wr = function(te) { return Ah(a) === "object" ? te instanceof a : te && Ah(te) === "object" && typeof te.nodeType == "number" && typeof te.nodeName == "string"; - }, er = function(te, Le, ze) { - !$[te] || CLe($[te], function(Lt) { + }, tr = function(te, Le, ze) { + !$[te] || ELe($[te], function(Lt) { Lt.call(e, Le, ze, ut); }); }, On = function(te) { var Le; - if (er("beforeSanitizeElements", te, null), Yt(te) || Xs(/[\u0080-\uFFFF]/, te.nodeName)) + if (tr("beforeSanitizeElements", te, null), Yt(te) || Xs(/[\u0080-\uFFFF]/, te.nodeName)) return Ze(te), !0; var ze = je(te.nodeName); - if (er("uponSanitizeElement", te, { + if (tr("uponSanitizeElement", te, { tagName: ze, allowedTags: V }), te.hasChildNodes() && !wr(te.firstElementChild) && (!wr(te.content) || !wr(te.content.firstElementChild)) && Xs(/<[/\w]/g, te.innerHTML) && Xs(/<[/\w]/g, te.textContent) || ze === "select" && Xs(/