Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

Merge branch 'master' into agent/claude/vercel-button-fills

longmeidao0adf0aade01d
diff --cc web/dist/peach-ui.js
index 2806438b6,8077936be..e00eeda92
--- a/web/dist/peach-ui.js
+++ b/web/dist/peach-ui.js
@@@ -36,59 -36,59 +36,59 @@@ function se(e, t, n, r, i)
function N(e) {
return e.children;
}
--function P(e, t) {
++function ce(e, t) {
this.props = e, this.context = t;
}
--function F(e, t) {
-- if (t == null) return e.__ ? F(e.__, e.__i + 1) : null;
++function P(e, t) {
++ if (t == null) return e.__ ? P(e.__, e.__i + 1) : null;
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
-- return typeof e.type == "function" ? F(e) : null;
++ return typeof e.type == "function" ? P(e) : null;
}
- function ce(e) {
-function se(e) {
++function le(e) {
if (e.__P && e.__d) {
var t = e.__v, n = t.__e, r = [], i = [], a = M({}, t);
- a.__v = t.__v + 1, y.vnode && y.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? F(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, xe(r, a, i), t.__e = t.__ = null, a.__e != n && le(a);
- a.__v = t.__v + 1, v.vnode && v.vnode(a), ve(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? F(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, be(r, a, i), t.__e = t.__ = null, a.__e != n && ce(a);
++ a.__v = t.__v + 1, y.vnode && y.vnode(a), be(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? P(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, Se(r, a, i), t.__e = t.__ = null, a.__e != n && ue(a);
}
}
- function le(e) {
-function ce(e) {
++function ue(e) {
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
- }), le(e);
- }), ce(e);
++ }), ue(e);
}
- function ue(e) {
- (!e.__d && (e.__d = !0) && S.push(e) && !de.__r++ || C != y.debounceRendering) && ((C = y.debounceRendering) || w)(de);
-function le(e) {
- (!e.__d && (e.__d = !0) && x.push(e) && !ue.__r++ || S != v.debounceRendering) && ((S = v.debounceRendering) || C)(ue);
++function de(e) {
++ (!e.__d && (e.__d = !0) && S.push(e) && !fe.__r++ || C != y.debounceRendering) && ((C = y.debounceRendering) || w)(fe);
}
- function de() {
-function ue() {
++function fe() {
try {
- for (var e, t = 1; S.length;) S.length > t && S.sort(T), e = S.shift(), t = S.length, ce(e);
- for (var e, t = 1; x.length;) x.length > t && x.sort(w), e = x.shift(), t = x.length, se(e);
++ for (var e, t = 1; S.length;) S.length > t && S.sort(T), e = S.shift(), t = S.length, le(e);
} finally {
- S.length = de.__r = 0;
- x.length = ue.__r = 0;
++ S.length = fe.__r = 0;
}
}
- function fe(e, t, n, r, i, a, o, s, c, l, u) {
-function de(e, t, n, r, i, a, o, s, c, l, u) {
- var d, f, p, m, h, g, _ = r && r.__k || j, v = t.length;
- for (c = fe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || A, p.__i = d, g = ve(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Ce(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = pe(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
++function pe(e, t, n, r, i, a, o, s, c, l, u) {
+ var d, f, p, m, h, g, _ = r && r.__k || ne, v = t.length;
- for (c = pe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || j, p.__i = d, g = ye(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && we(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = me(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
++ for (c = me(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || j, p.__i = d, g = be(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Te(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = he(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
return n.__e = h, c;
}
- function pe(e, t, n, r, i) {
-function fe(e, t, n, r, i) {
++function me(e, t, n, r, i) {
var a, o, s, c, l, u = n.length, d = u, f = 0;
- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = se(null, o, null, null, null) : ie(o) ? o = e.__k[a] = se(N, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = se(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = he(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = F(s)), Te(s, s));
- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = oe(null, o, null, null, null) : re(o) ? o = e.__k[a] = oe(N, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = oe(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = me(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = F(s)), we(s, s));
++ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = se(null, o, null, null, null) : ie(o) ? o = e.__k[a] = se(N, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = se(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = ge(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
++ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = P(s)), Ee(s, s));
return r;
}
- function me(e, t, n) {
-function pe(e, t, n) {
++function he(e, t, n) {
var r, i;
if (typeof e.type == "function") {
- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = me(r[i], t, n));
- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = pe(r[i], t, n));
++ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = he(r[i], t, n));
return t;
}
-- e.__e != t && (t && e.type && !t.parentNode && (t = F(e)), t = n.insertBefore(e.__e, t || null));
++ e.__e != t && (t && e.type && !t.parentNode && (t = P(e)), t = n.insertBefore(e.__e, t || null));
do
t &&= t.nextSibling;
while (t != null && t.nodeType == 8);
return t;
}
- function he(e, t, n, r) {
-function me(e, t, n, r) {
++function ge(e, t, n, r) {
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
if (l === null && s == null || u && s == l.key && c == l.type) return n;
if (r > +!!u) {
@@@ -96,18 -96,18 +96,18 @@@
}
return -1;
}
- function ge(e, t, n) {
-function he(e, t, n) {
- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ne.test(t) ? n : n + "px";
++function _e(e, t, n) {
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || re.test(t) ? n : n + "px";
}
- function _e(e, t, n, r, i) {
-function ge(e, t, n, r, i) {
++function ve(e, t, n, r, i) {
var a, o;
n: if (t == "style") {
if (typeof n == "string") e.style.cssText = n;
else {
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ge(e.style, t, "");
- if (n) for (t in n) r && n[t] == r[t] || ge(e.style, t, n[t]);
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || he(e.style, t, "");
- if (n) for (t in n) r && n[t] == r[t] || he(e.style, t, n[t]);
++ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || _e(e.style, t, "");
++ if (n) for (t in n) r && n[t] == r[t] || _e(e.style, t, n[t]);
}
- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(ee, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[D] = r[D] : (n[D] = O, e.addEventListener(t, a ? te : k, a)) : e.removeEventListener(t, a ? te : k, a);
+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(k, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[O] = r[O] : (n[O] = A, e.addEventListener(t, a ? te : ee, a)) : e.removeEventListener(t, a ? te : ee, a);
else {
if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
@@@ -117,7 -117,7 +117,7 @@@
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
}
}
- function ve(e) {
-function _e(e) {
++function ye(e) {
return function(t) {
if (this.l) {
var n = this.l[t.type + e];
@@@ -127,22 -127,22 +127,22 @@@
}
};
}
- function ye(e, t, n, r, i, a, o, s, c, l) {
-function ve(e, t, n, r, i, a, o, s, c, l) {
- var u, d, f, p, m, h, g, _, y, b, x, S, C, w, T, E, D = t.type;
++function be(e, t, n, r, i, a, o, s, c, l) {
+ var u, d, f, p, m, h, g, _, v, b, x, S, C, w, T, E, D = t.type;
if (t.constructor !== void 0) return null;
- 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = v.__b) && u(t);
+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = y.__b) && u(t);
n: if (typeof D == "function") {
d = o.length;
try {
- if (v = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(v, S) : (t.__c = f = new P(v, S), f.constructor = D, f.render = Ee), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = M({}, f.__s)), M(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);
- if (y = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(y, S) : (t.__c = f = new P(y, S), f.constructor = D, f.render = Te), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = M({}, f.__s)), M(f.__s, D.getDerivedStateFromProps(y, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);
++ if (v = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(v, S) : (t.__c = f = new ce(v, S), f.constructor = D, f.render = De), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = M({}, f.__s)), M(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);
else {
- if (b && D.getDerivedStateFromProps == null && y !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(y, f.__s, S)) {
- t.__v != n.__v && (f.props = y, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
+ if (b && D.getDerivedStateFromProps == null && v !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(v, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, S)) {
+ t.__v != n.__v && (f.props = v, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
e && (e.__ = t);
- }), ne.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = F(n);
- }), j.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = F(n);
++ }), ne.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = P(n);
break n;
}
- f.componentWillUpdate != null && f.componentWillUpdate(y, f.__s, S), b && f.componentDidUpdate != null && f.__h.push(function() {
+ f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, S), b && f.componentDidUpdate != null && f.__h.push(function() {
f.componentDidUpdate(m, h, g);
});
}
@@@ -150,25 -150,25 +150,25 @@@
else do
f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;
while (f.__d && ++w < 25);
- f.state = f.__s, f.getChildContext != null && (r = M(M({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === N && u.key == null ? Se(u.props.children) : u, s = fe(e, ie(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);
- f.state = f.__s, f.getChildContext != null && (r = M(M({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === N && u.key == null ? xe(u.props.children) : u, s = de(e, re(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);
++ f.state = f.__s, f.getChildContext != null && (r = M(M({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === N && u.key == null ? Ce(u.props.children) : u, s = pe(e, ie(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);
} catch (e) {
if (o.length = d, t.__v = null, c || a != null) {
if (e.then) {
for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
a != null && (a[a.indexOf(s)] = null), t.__e = s;
- } else if (a != null) for (E = a.length; E--;) ie(a[E]);
+ } else if (a != null) for (E = a.length; E--;) ae(a[E]);
} else t.__e = n.__e;
- t.__k ??= n.__k || [], e.then || be(t), y.__e(e, t, n);
- t.__k ??= n.__k || [], e.then || ye(t), v.__e(e, t, n);
++ t.__k ??= n.__k || [], e.then || xe(t), y.__e(e, t, n);
}
- } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = Ce(n.__e, t, n, r, i, a, o, c, l);
- } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = Se(n.__e, t, n, r, i, a, o, c, l);
- return (u = v.diffed) && u(t), 128 & t.__u ? void 0 : s;
++ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = we(n.__e, t, n, r, i, a, o, c, l);
+ return (u = y.diffed) && u(t), 128 & t.__u ? void 0 : s;
}
- function be(e) {
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(be));
-function ye(e) {
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ye));
++function xe(e) {
++ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(xe));
}
- function xe(e, t, n) {
- for (var r = 0; r < n.length; r++) we(n[r], n[++r], n[++r]);
-function be(e, t, n) {
- for (var r = 0; r < n.length; r++) Ce(n[r], n[++r], n[++r]);
- v.__c && v.__c(t, e), e.some(function(t) {
++function Se(e, t, n) {
++ for (var r = 0; r < n.length; r++) Te(n[r], n[++r], n[++r]);
+ y.__c && y.__c(t, e), e.some(function(t) {
try {
e = t.__h, t.__h = [], e.some(function(e) {
e.call(t);
@@@ -178,11 -178,11 +178,11 @@@
}
});
}
- function Se(e) {
- return typeof e != "object" || !e || e.__b > 0 ? e : ie(e) ? e.map(Se) : e.constructor === void 0 ? M({}, e) : null;
-function xe(e) {
- return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(xe) : e.constructor === void 0 ? M({}, e) : null;
++function Ce(e) {
++ return typeof e != "object" || !e || e.__b > 0 ? e : ie(e) ? e.map(Ce) : e.constructor === void 0 ? M({}, e) : null;
}
- function Ce(e, t, n, r, i, a, o, s, c) {
-function Se(e, t, n, r, i, a, o, s, c) {
- var l, u, d, f, p, m, h, g = n.props || A, y = t.props, b = t.type;
++function we(e, t, n, r, i, a, o, s, c) {
+ var l, u, d, f, p, m, h, g = n.props || j, _ = t.props, b = t.type;
if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
for (l = 0; l < a.length; l++) if ((p = a[l]) && "setAttribute" in p == !!b && (b ? p.localName == b : p.nodeType == 3)) {
e = p, a[l] = null;
@@@ -190,33 -190,33 +190,33 @@@
}
}
if (e == null) {
- if (b == null) return document.createTextNode(y);
- e = document.createElementNS(i, b, y.is && y), s &&= (v.__m && v.__m(t, a), !1), a = null;
+ if (b == null) return document.createTextNode(_);
+ e = document.createElementNS(i, b, _.is && _), s &&= (y.__m && y.__m(t, a), !1), a = null;
}
- if (b == null) g === y || s && e.data == y || (e.data = y);
+ if (b == null) g === _ || s && e.data == _ || (e.data = _);
else {
- if (a = b == "textarea" && y.defaultValue != null ? null : a && _.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;
- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || ge(e, l, null, p, i);
- for (l in y) p = y[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ge(e, l, p, g[l], i);
+ if (a = b == "textarea" && _.defaultValue != null ? null : a && v.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;
- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || _e(e, l, null, p, i);
- for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || _e(e, l, p, g[l], i);
++ for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || ve(e, l, null, p, i);
++ for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ve(e, l, p, g[l], i);
if (u) s || d && (u.__html == d.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = [];
- else if (d && (e.innerHTML = ""), fe(t.type == "template" ? e.content : e, ie(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && F(n, 0), s, c), a != null) for (l = a.length; l--;) ae(a[l]);
- s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "option" && m != g[l]) && _e(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && _e(e, l, h, g[l], i));
- else if (d && (e.innerHTML = ""), de(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && F(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);
- s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "option" && m != g[l]) && ge(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ge(e, l, h, g[l], i));
++ else if (d && (e.innerHTML = ""), pe(t.type == "template" ? e.content : e, ie(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && P(n, 0), s, c), a != null) for (l = a.length; l--;) ae(a[l]);
++ s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "option" && m != g[l]) && ve(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ve(e, l, h, g[l], i));
}
return e;
}
- function we(e, t, n) {
-function Ce(e, t, n) {
++function Te(e, t, n) {
try {
if (typeof e == "function") {
var r = typeof e.__u == "function";
r && e.__u(), r && t == null || (e.__u = e(t));
} else e.current = t;
} catch (e) {
- v.__e(e, n);
+ y.__e(e, n);
}
}
- function Te(e, t, n) {
-function we(e, t, n) {
++function Ee(e, t, n) {
var r, i;
- if (y.unmount && y.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || we(r, null, t)), (r = e.__c) != null) {
- if (v.unmount && v.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Ce(r, null, t)), (r = e.__c) != null) {
++ if (y.unmount && y.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Te(r, null, t)), (r = e.__c) != null) {
if (r.componentWillUnmount) try {
r.componentWillUnmount();
} catch (e) {
@@@ -224,47 -224,47 +224,47 @@@
}
r.base = r.__P = r.__n = null;
}
- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Te(r[i], t, n || typeof e.type != "function");
- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && we(r[i], t, n || typeof e.type != "function");
- n || ie(e.__e), e.__c = e.__ = e.__e = void 0;
++ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Ee(r[i], t, n || typeof e.type != "function");
+ n || ae(e.__e), e.__c = e.__ = e.__e = void 0;
}
- function Ee(e, t, n) {
-function Te(e, t, n) {
++function De(e, t, n) {
return this.constructor(e, n);
}
- function De(e, t, n) {
-function Ee(e, t, n) {
++function Oe(e, t, n) {
var r, i, a, o;
- t == document && (t = document.documentElement), y.__ && y.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = oe(N, null, [e]), i || j, j, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? v.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), xe(a, e, o), e.props.children = null;
- t == document && (t = document.documentElement), v.__ && v.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ve(t, e = (!r && n || t).__k = ae(N, null, [e]), i || A, A, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? _.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), be(a, e, o), e.props.children = null;
++ t == document && (t = document.documentElement), y.__ && y.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], be(t, e = (!r && n || t).__k = oe(N, null, [e]), i || j, j, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? v.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), Se(a, e, o), e.props.children = null;
}
-_ = j.slice, v = { __e: function(e, t, n, r) {
+v = ne.slice, y = { __e: function(e, t, n, r) {
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
} catch (t) {
e = t;
}
throw e;
-} }, y = 0, b = function(e) {
+} }, b = 0, x = function(e) {
return e != null && e.constructor === void 0;
--}, P.prototype.setState = function(e, t) {
++}, ce.prototype.setState = function(e, t) {
var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = M({}, this.state);
- typeof e == "function" && (e = e(M({}, n), this.props)), e && M(n, e), e != null && this.__v && (t && this._sb.push(t), ue(this));
- typeof e == "function" && (e = e(M({}, n), this.props)), e && M(n, e), e != null && this.__v && (t && this._sb.push(t), le(this));
--}, P.prototype.forceUpdate = function(e) {
- this.__v && (this.__e = !0, e && this.__h.push(e), ue(this));
- }, P.prototype.render = N, S = [], w = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, T = function(e, t) {
- this.__v && (this.__e = !0, e && this.__h.push(e), le(this));
-}, P.prototype.render = N, x = [], C = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, w = function(e, t) {
++ typeof e == "function" && (e = e(M({}, n), this.props)), e && M(n, e), e != null && this.__v && (t && this._sb.push(t), de(this));
++}, ce.prototype.forceUpdate = function(e) {
++ this.__v && (this.__e = !0, e && this.__h.push(e), de(this));
++}, ce.prototype.render = N, S = [], w = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, T = function(e, t) {
return e.__v.__b - t.__v.__b;
- }, de.__r = 0, E = Math.random().toString(8), D = "__d" + E, O = "__a" + E, k = /(PointerCapture)$|Capture$/i, A = 0, ee = ve(!1), te = ve(!0);
-}, ue.__r = 0, T = Math.random().toString(8), E = "__d" + T, D = "__a" + T, ee = /(PointerCapture)$|Capture$/i, O = 0, k = _e(!1), te = _e(!0);
++}, fe.__r = 0, E = Math.random().toString(8), D = "__d" + E, O = "__a" + E, k = /(PointerCapture)$|Capture$/i, A = 0, ee = ye(!1), te = ye(!0);
//#endregion
//#region src/sort-preferences.ts
- function Oe(e, t, n) {
-function De(e, t, n) {
++function ke(e, t, n) {
return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";
}
//#endregion
//#region src/api.ts
- var ke = class extends Error {
-var Oe = class extends Error {
++var Ae = class extends Error {
status;
body;
constructor(e, t, n = null) {
super(e), this.name = "ApiError", this.status = t, this.body = n;
}
- }, Ae = (e) => {
-}, ke = (e) => {
++}, je = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@@ -276,8 -276,8 +276,8 @@@
if (typeof n == "string" && n) return n;
}
return "";
--}, I = (e) => e instanceof Error ? e.message : String(e);
--async function L(e, t) {
++}, F = (e) => e instanceof Error ? e.message : String(e);
++async function I(e, t) {
let n = await fetch(e, {
headers: { Accept: "application/json" },
credentials: "same-origin",
@@@ -286,10 -286,10 +286,10 @@@
try {
r = await n.json();
} catch {}
- if (!n.ok) throw new ke(Ae(r) || `请求失败(${n.status})`, n.status);
- if (!n.ok) throw new Oe(ke(r) || `请求失败(${n.status})`, n.status);
++ if (!n.ok) throw new Ae(je(r) || `请求失败(${n.status})`, n.status);
return r;
}
--async function R(e, t, n = "POST", r) {
++async function L(e, t, n = "POST", r) {
let i = await fetch(e, {
method: n,
...r ? { signal: r } : {},
@@@ -303,29 -303,29 +303,29 @@@
try {
a = await i.json();
} catch {}
- if (!i.ok) throw new ke(Ae(a) || `请求失败(${i.status})`, i.status, a);
- if (!i.ok) throw new Oe(ke(a) || `请求失败(${i.status})`, i.status, a);
++ if (!i.ok) throw new Ae(je(a) || `请求失败(${i.status})`, i.status, a);
return a;
}
//#endregion
//#region node_modules/preact/hooks/dist/hooks.module.js
- var z, B, je, Me, Ne = 0, Pe = [], V = y, Fe = V.__b, Ie = V.__r, Le = V.diffed, Re = V.__c, ze = V.unmount, Be = V.__;
- function Ve(e, t) {
- V.__h && V.__h(B, e, Ne || t), Ne = 0;
-var z, B, Ae, je, Me = 0, Ne = [], V = v, Pe = V.__b, Fe = V.__r, Ie = V.diffed, Le = V.__c, Re = V.unmount, ze = V.__;
-function Be(e, t) {
- V.__h && V.__h(B, e, Me || t), Me = 0;
-- var n = B.__H || (B.__H = {
++var R, z, Me, Ne, Pe = 0, Fe = [], B = y, Ie = B.__b, Le = B.__r, Re = B.diffed, ze = B.__c, Be = B.unmount, Ve = B.__;
++function He(e, t) {
++ B.__h && B.__h(z, e, Pe || t), Pe = 0;
++ var n = z.__H || (z.__H = {
__: [],
__h: []
});
return e >= n.__.length && n.__.push({}), n.__[e];
}
--function H(e) {
- return Ne = 1, He(Xe, e);
- return Me = 1, Ve(Ye, e);
++function V(e) {
++ return Pe = 1, Ue(Ze, e);
}
- function He(e, t, n) {
- var r = Ve(z++, 2);
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Xe(void 0, t), function(e) {
-function Ve(e, t, n) {
- var r = Be(z++, 2);
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ye(void 0, t), function(e) {
++function Ue(e, t, n) {
++ var r = He(R++, 2);
++ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ze(void 0, t), function(e) {
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
-- }], r.__c = B, !B.__f)) {
++ }], r.__c = z, !z.__f)) {
var i = function(e, t, n) {
if (!r.__c.__H) return !0;
var i = !1, o = r.__c.props !== e;
@@@ -341,112 -341,112 +341,112 @@@
}
return !i || o;
};
-- B.__f = !0;
-- var a = B.shouldComponentUpdate, o = B.componentWillUpdate;
-- B.componentWillUpdate = function(e, t, n) {
++ z.__f = !0;
++ var a = z.shouldComponentUpdate, o = z.componentWillUpdate;
++ z.componentWillUpdate = function(e, t, n) {
if (this.__e) {
var r = a;
a = void 0, i(e, t, n), a = r;
}
o && o.call(this, e, t, n);
-- }, B.shouldComponentUpdate = i;
++ }, z.shouldComponentUpdate = i;
}
return r.__N || r.__;
}
--function U(e, t) {
- var n = Ve(z++, 3);
- !V.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, B.__H.__h.push(n));
- var n = Be(z++, 3);
- !V.__s && Je(n.__H, t) && (n.__ = e, n.u = t, B.__H.__h.push(n));
++function H(e, t) {
++ var n = He(R++, 3);
++ !B.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, z.__H.__h.push(n));
}
--function W(e, t) {
- var n = Ve(z++, 4);
- !V.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, B.__h.push(n));
- var n = Be(z++, 4);
- !V.__s && Je(n.__H, t) && (n.__ = e, n.u = t, B.__h.push(n));
++function U(e, t) {
++ var n = He(R++, 4);
++ !B.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, z.__h.push(n));
}
--function G(e) {
- return Ne = 5, Ue(function() {
- return Me = 5, He(function() {
++function W(e) {
++ return Pe = 5, We(function() {
return { current: e };
}, []);
}
- function Ue(e, t) {
- var n = Ve(z++, 7);
- return Ye(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
-function He(e, t) {
- var n = Be(z++, 7);
- return Je(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
++function We(e, t) {
++ var n = He(R++, 7);
++ return Xe(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
}
- function We() {
- for (var e; e = Pe.shift();) {
-function Ue() {
- for (var e; e = Ne.shift();) {
++function Ge() {
++ for (var e; e = Fe.shift();) {
var t = e.__H;
if (e.__P && t) try {
- t.__h.some(qe), t.__h.some(Je), t.__h = [];
- t.__h.some(Ke), t.__h.some(qe), t.__h = [];
++ t.__h.some(Je), t.__h.some(Ye), t.__h = [];
} catch (n) {
-- t.__h = [], V.__e(n, e.__v);
++ t.__h = [], B.__e(n, e.__v);
}
}
}
--V.__b = function(e) {
- B = null, Fe && Fe(e);
- B = null, Pe && Pe(e);
--}, V.__ = function(e, t) {
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Be && Be(e, t);
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ze && ze(e, t);
--}, V.__r = function(e) {
- Ie && Ie(e), z = 0;
- Fe && Fe(e), z = 0;
-- var t = (B = e.__c).__H;
- t && (je === B ? (t.__h = [], B.__h = [], t.__.some(function(e) {
- t && (Ae === B ? (t.__h = [], B.__h = [], t.__.some(function(e) {
++B.__b = function(e) {
++ z = null, Ie && Ie(e);
++}, B.__ = function(e, t) {
++ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ve && Ve(e, t);
++}, B.__r = function(e) {
++ Le && Le(e), R = 0;
++ var t = (z = e.__c).__H;
++ t && (Me === z ? (t.__h = [], z.__h = [], t.__.some(function(e) {
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
- })) : (t.__h.some(qe), t.__h.some(Je), t.__h = [], z = 0)), je = B;
- })) : (t.__h.some(Ke), t.__h.some(qe), t.__h = [], z = 0)), Ae = B;
--}, V.diffed = function(e) {
- Le && Le(e);
- Ie && Ie(e);
++ })) : (t.__h.some(Je), t.__h.some(Ye), t.__h = [], R = 0)), Me = z;
++}, B.diffed = function(e) {
++ Re && Re(e);
var t = e.__c;
- t && t.__H && (t.__H.__h.length && (Pe.push(t) !== 1 && Me === V.requestAnimationFrame || ((Me = V.requestAnimationFrame) || Ke)(We)), t.__H.__.some(function(e) {
- t && t.__H && (t.__H.__h.length && (Ne.push(t) !== 1 && je === V.requestAnimationFrame || ((je = V.requestAnimationFrame) || Ge)(Ue)), t.__H.__.some(function(e) {
++ t && t.__H && (t.__H.__h.length && (Fe.push(t) !== 1 && Ne === B.requestAnimationFrame || ((Ne = B.requestAnimationFrame) || qe)(Ge)), t.__H.__.some(function(e) {
e.u &&= (e.__H = e.u, void 0);
- })), je = B = null;
- })), Ae = B = null;
--}, V.__c = function(e, t) {
++ })), Me = z = null;
++}, B.__c = function(e, t) {
t.some(function(e) {
try {
- e.__h.some(qe), e.__h = e.__h.filter(function(e) {
- return !e.__ || Je(e);
- e.__h.some(Ke), e.__h = e.__h.filter(function(e) {
- return !e.__ || qe(e);
++ e.__h.some(Je), e.__h = e.__h.filter(function(e) {
++ return !e.__ || Ye(e);
});
} catch (n) {
t.some(function(e) {
e.__h &&= [];
-- }), t = [], V.__e(n, e.__v);
++ }), t = [], B.__e(n, e.__v);
}
- }), Re && Re(e, t);
- }), Le && Le(e, t);
--}, V.unmount = function(e) {
- ze && ze(e);
- Re && Re(e);
++ }), ze && ze(e, t);
++}, B.unmount = function(e) {
++ Be && Be(e);
var t, n = e.__c;
n && n.__H && (n.__H.__.some(function(e) {
try {
- qe(e);
- Ke(e);
++ Je(e);
} catch (e) {
t = e;
}
-- }), n.__H = void 0, t && V.__e(t, n.__v));
++ }), n.__H = void 0, t && B.__e(t, n.__v));
};
- var Ge = typeof requestAnimationFrame == "function";
- function Ke(e) {
-var We = typeof requestAnimationFrame == "function";
-function Ge(e) {
++var Ke = typeof requestAnimationFrame == "function";
++function qe(e) {
var t, n = function() {
- clearTimeout(r), Ge && cancelAnimationFrame(t), setTimeout(e);
- clearTimeout(r), We && cancelAnimationFrame(t), setTimeout(e);
++ clearTimeout(r), Ke && cancelAnimationFrame(t), setTimeout(e);
}, r = setTimeout(n, 35);
- Ge && (t = requestAnimationFrame(n));
- }
- function qe(e) {
- var t = B, n = e.__c;
- typeof n == "function" && (e.__c = void 0, n()), B = t;
- We && (t = requestAnimationFrame(n));
++ Ke && (t = requestAnimationFrame(n));
}
-function Ke(e) {
- var t = B, n = e.__c;
- typeof n == "function" && (e.__c = void 0, n()), B = t;
+function Je(e) {
- var t = B;
- e.__c = e.__(), B = t;
++ var t = z, n = e.__c;
++ typeof n == "function" && (e.__c = void 0, n()), z = t;
}
- function Ye(e, t) {
-function qe(e) {
- var t = B;
- e.__c = e.__(), B = t;
++function Ye(e) {
++ var t = z;
++ e.__c = e.__(), z = t;
+ }
-function Je(e, t) {
++function Xe(e, t) {
return !e || e.length !== t.length || t.some(function(t, n) {
return t !== e[n];
});
}
- function Xe(e, t) {
-function Ye(e, t) {
++function Ze(e, t) {
return typeof t == "function" ? t(e) : t;
}
//#endregion
//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
- var Ze = 0;
-var Xe = 0;
++var Qe = 0;
Array.isArray;
--function K(e, t, n, r, i, a) {
++function G(e, t, n, r, i, a) {
t ||= {};
var o, s, c = t;
if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];
@@@ -461,7 -461,7 +461,7 @@@
__e: null,
__c: null,
constructor: void 0,
- __v: --Ze,
- __v: --Xe,
++ __v: --Qe,
__i: -1,
__u: 0,
__source: i,
@@@ -472,15 -472,15 +472,15 @@@
}
//#endregion
//#region src/islands/access-settings.tsx
- function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1 }) {
-function Ze({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1 }) {
-- return /* @__PURE__ */ K("div", {
++function $e({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1 }) {
++ return /* @__PURE__ */ G("div", {
class: "configfield",
children: [
-- /* @__PURE__ */ K("label", {
++ /* @__PURE__ */ G("label", {
for: e,
children: t
}),
-- /* @__PURE__ */ K("input", {
++ /* @__PURE__ */ G("input", {
id: e,
class: "geist-input",
type: "password",
@@@ -492,7 -492,7 +492,7 @@@
"aria-invalid": !!i,
"aria-describedby": i || a ? `${e}-hint` : void 0
}),
-- i || a ? /* @__PURE__ */ K("p", {
++ i || a ? /* @__PURE__ */ G("p", {
id: `${e}-hint`,
class: i ? "configbad" : "confighelp",
role: i ? "alert" : void 0,
@@@ -501,9 -501,9 +501,9 @@@
]
});
}
- function $e({ initial: e, receipt: t }) {
-function Qe({ initial: e, receipt: t }) {
-- let [n, r] = H(e), [a, o] = H(""), [s, c] = H(""), [l, d] = H(""), [f, p] = H(!1), [m, h] = H(""), [g, _] = H({}), v = G(null), y = G(!1), b = G(null);
-- return /* @__PURE__ */ K("form", {
++function et({ initial: e, receipt: t }) {
++ let [n, r] = V(e), [a, o] = V(""), [s, c] = V(""), [l, d] = V(""), [f, p] = V(!1), [m, h] = V(""), [g, _] = V({}), v = W(null), y = W(!1), b = W(null);
++ return /* @__PURE__ */ G("form", {
class: "configfieldset",
onSubmit: async (e) => {
if (e.preventDefault(), y.current) return;
@@@ -515,7 -515,7 +515,7 @@@
}
y.current = !0, u(b.current, !0);
try {
-- let e = await R("/api/configuration/access", {
++ let e = await L("/api/configuration/access", {
revision: n.revision,
action: f ? "disable" : "set",
confirm_disable: f,
@@@ -525,8 -525,8 +525,8 @@@
});
r(e), o(""), c(""), d(""), p(!1), _({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");
} catch (e) {
- let t = e instanceof ke ? e.body : null, n = t?.errors || t?.detail?.errors;
- let t = e instanceof Oe ? e.body : null, n = t?.errors || t?.detail?.errors;
-- n ? _(n) : h(I(e));
++ let t = e instanceof Ae ? e.body : null, n = t?.errors || t?.detail?.errors;
++ n ? _(n) : h(F(e));
} finally {
y.current = !1, u(b.current, !1);
}
@@@ -534,17 -534,17 +534,17 @@@
"aria-labelledby": "accessTitle",
noValidate: !0,
ref: v,
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", {
class: "configfieldset-heading",
-- children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("accessTitle", "访问密码") } }), /* @__PURE__ */ K("p", {
++ children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("accessTitle", "访问密码") } }), /* @__PURE__ */ G("p", {
class: "confighelp",
children: n.mode === "open" ? "未设置密码,能连接到 Peach 的设备可直接访问。" : n.mode === "legacy" ? "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。" : n.mode === "locked" ? "访问设置无法读取,请在本机检查配置文件。" : "已设置密码。新设备需要登录,保持登录时间在登录页选择。"
})]
}),
- n.mode === "password" ? /* @__PURE__ */ K(Qe, {
- n.mode === "password" ? /* @__PURE__ */ K(Ze, {
++ n.mode === "password" ? /* @__PURE__ */ G($e, {
id: "access-current",
label: "当前访问密码",
value: a,
@@@ -552,46 -552,46 +552,46 @@@
error: g.current_password,
current: !0
}) : null,
- !f && n.mode !== "locked" ? /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K(Qe, {
- !f && n.mode !== "locked" ? /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K(Ze, {
++ !f && n.mode !== "locked" ? /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G($e, {
id: "access-password",
label: n.mode === "password" ? "新访问密码" : "设置访问密码",
value: s,
onInput: c,
error: g.password,
help: "至少 8 个字符。保存后其他设备需要重新登录。"
- }), /* @__PURE__ */ K(Qe, {
- }), /* @__PURE__ */ K(Ze, {
++ }), /* @__PURE__ */ G($e, {
id: "access-confirm",
label: "确认访问密码",
value: l,
onInput: d,
error: g.confirmation
})] }) : null,
-- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ K("label", {
++ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ G("label", {
class: "configcheck",
-- children: [/* @__PURE__ */ K("span", {
++ children: [/* @__PURE__ */ G("span", {
class: "pcheck",
-- children: [/* @__PURE__ */ K("input", {
++ children: [/* @__PURE__ */ G("input", {
type: "checkbox",
checked: f,
onChange: (e) => p(e.currentTarget.checked)
-- }), /* @__PURE__ */ K("span", {
++ }), /* @__PURE__ */ G("span", {
"aria-hidden": "true",
-- children: /* @__PURE__ */ K("svg", {
++ children: /* @__PURE__ */ G("svg", {
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-check" })
++ children: /* @__PURE__ */ G("use", { href: "#i-check" })
})
})]
-- }), /* @__PURE__ */ K("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]
++ }), /* @__PURE__ */ G("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]
}) : null,
-- m ? /* @__PURE__ */ K("p", {
++ m ? /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: m
}) : null
]
-- }), n.mode === "locked" ? null : /* @__PURE__ */ K("div", {
++ }), n.mode === "locked" ? null : /* @__PURE__ */ G("div", {
class: "geist-fieldset-footer",
-- children: [/* @__PURE__ */ K("p", { children: "保存后立即生效。" }), /* @__PURE__ */ K("button", {
++ children: [/* @__PURE__ */ G("p", { children: "保存后立即生效。" }), /* @__PURE__ */ G("button", {
class: "geist-button primary",
type: "submit",
ref: b,
@@@ -602,7 -602,7 +602,7 @@@
}
//#endregion
//#region src/islands/release-updates.tsx
- var et = /* @__PURE__ */ new Set([
-var $e = /* @__PURE__ */ new Set([
++var tt = /* @__PURE__ */ new Set([
"downloading",
"verifying",
"extracting",
@@@ -610,21 -610,21 +610,21 @@@
"restarting",
"installing"
]);
- function tt({ initial: e, initialJob: t }) {
-function et({ initial: e, initialJob: t }) {
-- let [r, a] = H(e), [o, c] = H(t || {
++function nt({ initial: e, initialJob: t }) {
++ let [r, a] = V(e), [o, c] = V(t || {
state: "idle",
progress: 0
-- }), [l, d] = H(""), f = G(null), p = G(!0), m = G(!1), h = G(null);
-- U(() => {
- u(h.current, et.has(o.state));
- u(h.current, $e.has(o.state));
-- }, [o.state]), U(() => () => {
++ }), [l, d] = V(""), f = W(null), p = W(!0), m = W(!1), h = W(null);
++ H(() => {
++ u(h.current, tt.has(o.state));
++ }, [o.state]), H(() => () => {
p.current = !1, f.current?.abort();
}, []);
let g = async () => {
-- let e = await R("/api/configuration/update-restart", {});
++ let e = await L("/api/configuration/update-restart", {});
p.current && c(e);
};
-- U(() => {
++ H(() => {
o.state !== "ready" || m.current || (m.current = !0, n({
title: "更新已准备好",
body: `Peach ${o.version || ""} 将在重启后安装。`,
@@@ -632,11 -632,11 +632,11 @@@
cancelLabel: "稍后",
onConfirm: g
}));
-- }, [o.state]), U(() => {
- if (!et.has(o.state)) return;
- if (!$e.has(o.state)) return;
++ }, [o.state]), H(() => {
++ if (!tt.has(o.state)) return;
let e = new AbortController(), t, n = 0, r = async () => {
try {
-- let t = await L("/api/configuration/update-status", e.signal);
++ let t = await I("/api/configuration/update-status", e.signal);
e.signal.aborted || (c(t), n = 0, t.state === "complete" && a((e) => ({
...e,
current_version: t.version || e.current_version,
@@@ -653,14 -653,14 +653,14 @@@
};
}, [o.state]);
let _ = async (e) => {
- if (f.current || et.has(o.state)) return;
- if (f.current || $e.has(o.state)) return;
++ if (f.current || tt.has(o.state)) return;
let t = new AbortController();
f.current = t, m.current = !1, d(""), u(e, !0);
try {
-- let e = await R("/api/configuration/update", {}, "POST", t.signal);
++ let e = await L("/api/configuration/update", {}, "POST", t.signal);
t.signal.aborted || c(e);
} catch (e) {
-- t.signal.aborted || d(I(e));
++ t.signal.aborted || d(F(e));
} finally {
f.current = null, u(e, !1);
}
@@@ -669,70 -669,66 +669,70 @@@
let n = new AbortController();
f.current = n, u(t, !0), d("");
try {
-- let e = await L("/api/configuration/updates", n.signal);
++ let e = await I("/api/configuration/updates", n.signal);
n.signal.aborted || a(e);
} catch (t) {
n.signal.aborted || (a({
...e,
state: "error"
-- }), d(I(t)));
++ }), d(F(t)));
} finally {
f.current = null, u(t, !1);
}
};
-- return /* @__PURE__ */ K("section", {
++ return /* @__PURE__ */ G("section", {
class: "configfieldset",
"data-geist-fieldset": !0,
"aria-labelledby": "configUpdatesTitle",
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("configUpdatesTitle", "检查更新") } }),
-- /* @__PURE__ */ K("dl", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("configUpdatesTitle", "检查更新") } }),
++ /* @__PURE__ */ G("dl", {
class: "configfacts",
children: [
-- /* @__PURE__ */ K("dt", { children: "当前版本" }),
-- /* @__PURE__ */ K("dd", { children: r.current_version }),
-- /* @__PURE__ */ K("dt", { children: "安装方式" }),
-- /* @__PURE__ */ K("dd", { children: r.installation }),
-- /* @__PURE__ */ K("dt", { children: "更新通道" }),
-- /* @__PURE__ */ K("dd", { children: r.channel }),
-- /* @__PURE__ */ K("dt", { children: "最新版本" }),
-- /* @__PURE__ */ K("dd", { children: r.latest_version || (r.state === "unchecked" ? "尚未检查" : "未取得") })
++ /* @__PURE__ */ G("dt", { children: "当前版本" }),
++ /* @__PURE__ */ G("dd", { children: r.current_version }),
++ /* @__PURE__ */ G("dt", { children: "安装方式" }),
++ /* @__PURE__ */ G("dd", { children: r.installation }),
++ /* @__PURE__ */ G("dt", { children: "更新通道" }),
++ /* @__PURE__ */ G("dd", { children: r.channel }),
++ /* @__PURE__ */ G("dt", { children: "最新版本" }),
++ /* @__PURE__ */ G("dd", { children: r.latest_version || (r.state === "unchecked" ? "尚未检查" : "未取得") })
]
}),
-- /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("p", {
class: l || r.state === "error" ? "configbad" : "confighelp",
role: l || r.state === "error" ? "alert" : "status",
children: l || r.message
}),
-- o.state === "idle" ? null : /* @__PURE__ */ K("div", {
++ o.state === "idle" ? null : /* @__PURE__ */ G("div", {
"aria-live": "polite",
-- children: [/* @__PURE__ */ K("p", {
++ children: [/* @__PURE__ */ G("p", {
class: o.state === "error" ? "configbad" : "confighelp",
children: o.message
-- }), o.state === "error" ? null : /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: s(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ K("p", {
++ }), o.state === "error" ? null : /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: s(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ G("p", {
class: "confighelp",
children: o.state === "downloading" && o.total ? `${((o.downloaded || 0) / 1048576).toFixed(1)} / ${(o.total / 1048576).toFixed(1)} MB` : `${o.progress}%`
})] })]
})
]
-- }), /* @__PURE__ */ K("div", {
++ }), /* @__PURE__ */ G("div", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
children: [
-- /* @__PURE__ */ K("a", {
++ /* @__PURE__ */ G("a", {
class: "geist-button",
href: r.release_url,
target: "_blank",
rel: "noreferrer",
- children: ["查看发布页", /* @__PURE__ */ K("svg", {
- children: "查看发布页"
++ children: ["查看发布页", /* @__PURE__ */ G("svg", {
+ "aria-hidden": "true",
+ viewBox: "0 0 24 24",
- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })
+ })]
}),
-- o.state === "ready" ? /* @__PURE__ */ K("button", {
++ o.state === "ready" ? /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button primary",
onClick: () => {
@@@ -746,17 -742,17 +746,17 @@@
},
children: "重启安装"
}) : null,
-- r.state === "available" && r.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ K("button", {
++ r.state === "available" && r.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ G("button", {
ref: h,
type: "button",
class: "geist-button primary",
onClick: (e) => _(e.currentTarget),
children: "下载并安装"
}) : null,
-- /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button",
- disabled: et.has(o.state),
- disabled: $e.has(o.state),
++ disabled: tt.has(o.state),
onClick: (e) => v(e.currentTarget),
children: "检查更新"
})
@@@ -766,9 -762,9 +766,9 @@@
}
//#endregion
//#region src/islands/peach-proxy.tsx
- function nt({ initial: e, receipt: t }) {
-function tt({ initial: e, receipt: t }) {
-- let [n, r] = H(e), [a, o] = H(e.mode), [s, l] = H(""), [d, p] = H(""), m = G(!1), h = G(null), g = G(null), _ = G(new AbortController());
-- U(() => () => _.current.abort(), []), W(() => {
++function rt({ initial: e, receipt: t }) {
++ let [n, r] = V(e), [a, o] = V(e.mode), [s, l] = V(""), [d, p] = V(""), m = W(!1), h = W(null), g = W(null), _ = W(new AbortController());
++ H(() => () => _.current.abort(), []), U(() => {
let t = h.current;
t.innerHTML = c([
["environment", "系统代理"],
@@@ -788,40 -784,40 +788,40 @@@
if (!m.current) {
m.current = !0, u(g.current, !0), p("");
try {
-- let e = await R("/api/configuration/peach-proxy", {
++ let e = await L("/api/configuration/peach-proxy", {
mode: a,
proxy: s
}, "POST", _.current.signal);
_.current.signal.aborted || (r(e), l(""), t("已保存 Peach 代理"));
} catch (e) {
-- _.current.signal.aborted || p(I(e));
++ _.current.signal.aborted || p(F(e));
} finally {
m.current = !1, u(g.current, !1);
}
}
}
-- return /* @__PURE__ */ K("form", {
++ return /* @__PURE__ */ G("form", {
id: "peachProxy",
class: "configfieldset",
"data-geist-fieldset": !0,
onSubmit: (e) => {
e.preventDefault(), v();
},
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("peachProxyTitle", "Peach 代理") } }),
-- /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("peachProxyTitle", "Peach 代理") } }),
++ /* @__PURE__ */ G("p", {
class: "confighelp",
children: "采集来源选择“Peach 代理”时共用此设置。"
}),
-- /* @__PURE__ */ K("div", { ref: h }),
-- a === "proxy" && /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", { ref: h }),
++ a === "proxy" && /* @__PURE__ */ G("div", {
class: "configfield",
-- children: [/* @__PURE__ */ K("label", {
++ children: [/* @__PURE__ */ G("label", {
htmlFor: "peachProxyAddress",
children: "代理地址"
-- }), /* @__PURE__ */ K("input", {
++ }), /* @__PURE__ */ G("input", {
id: "peachProxyAddress",
class: "geist-input",
type: "password",
@@@ -831,20 -827,20 +831,20 @@@
onInput: (e) => l(e.currentTarget.value)
})]
}),
-- n.needs_selection && /* @__PURE__ */ K("p", {
++ n.needs_selection && /* @__PURE__ */ G("p", {
class: "configbad",
children: "已有来源的代理地址不同,请选择公共连接方式。"
}),
-- d && /* @__PURE__ */ K("p", {
++ d && /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: d
})
]
-- }), /* @__PURE__ */ K("footer", {
++ }), /* @__PURE__ */ G("footer", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
-- children: /* @__PURE__ */ K("button", {
++ children: /* @__PURE__ */ G("button", {
ref: g,
class: "geist-button primary",
type: "submit",
@@@ -855,83 -851,83 +855,83 @@@
}
//#endregion
//#region src/islands/desktop-settings.tsx
- function rt({ label: e, checked: t, disabled: n, change: r }) {
-function nt({ label: e, checked: t, disabled: n, change: r }) {
-- return /* @__PURE__ */ K("label", {
++function it({ label: e, checked: t, disabled: n, change: r }) {
++ return /* @__PURE__ */ G("label", {
class: "configcheck",
-- children: [/* @__PURE__ */ K("span", {
++ children: [/* @__PURE__ */ G("span", {
class: "pcheck",
-- children: [/* @__PURE__ */ K("input", {
++ children: [/* @__PURE__ */ G("input", {
type: "checkbox",
checked: t,
disabled: n,
onChange: (e) => r(e.currentTarget.checked)
-- }), /* @__PURE__ */ K("span", {
++ }), /* @__PURE__ */ G("span", {
"aria-hidden": "true",
-- children: /* @__PURE__ */ K("svg", {
++ children: /* @__PURE__ */ G("svg", {
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-check" })
++ children: /* @__PURE__ */ G("use", { href: "#i-check" })
})
})]
-- }), /* @__PURE__ */ K("span", { children: e })]
++ }), /* @__PURE__ */ G("span", { children: e })]
});
}
- function it({ startup: e, receipt: t }) {
-function rt({ startup: e, receipt: t }) {
-- let [n, r] = H(e.enabled), [a, o] = H(e.silent), [s, c] = H(""), l = G(!1), d = G(null);
++function at({ startup: e, receipt: t }) {
++ let [n, r] = V(e.enabled), [a, o] = V(e.silent), [s, c] = V(""), l = W(!1), d = W(null);
async function f() {
if (!l.current) {
l.current = !0, u(d.current, !0), c("");
try {
-- await R("/api/configuration/startup", {
++ await L("/api/configuration/startup", {
enabled: n,
silent: a
}), t("已保存开机自启");
} catch (e) {
-- c(I(e));
++ c(F(e));
} finally {
l.current = !1, u(d.current, !1);
}
}
}
-- return /* @__PURE__ */ K("form", {
++ return /* @__PURE__ */ G("form", {
class: "configfieldset",
"data-geist-fieldset": !0,
onSubmit: (e) => {
e.preventDefault(), f();
},
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("startupTitle", "开机自启") } }),
- /* @__PURE__ */ K(rt, {
- /* @__PURE__ */ K(nt, {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("startupTitle", "开机自启") } }),
++ /* @__PURE__ */ G(it, {
label: "开机后启动 Peach",
checked: n,
disabled: !e.available,
change: r
}),
- /* @__PURE__ */ K(rt, {
- /* @__PURE__ */ K(nt, {
++ /* @__PURE__ */ G(it, {
label: "静默启动",
checked: a,
disabled: !e.available,
change: o
}),
-- /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("p", {
class: "confighelp",
children: "静默启动仅显示托盘;关闭后自动打开浏览器。"
}),
-- e.message && /* @__PURE__ */ K("p", {
++ e.message && /* @__PURE__ */ G("p", {
class: "confighelp",
children: e.message
}),
-- s && /* @__PURE__ */ K("p", {
++ s && /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: s
})
]
-- }), /* @__PURE__ */ K("footer", {
++ }), /* @__PURE__ */ G("footer", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
-- children: /* @__PURE__ */ K("button", {
++ children: /* @__PURE__ */ G("button", {
ref: d,
type: "submit",
class: "geist-button primary",
@@@ -941,9 -937,9 +941,9 @@@
})]
});
}
- function at({ data: e }) {
-function it({ data: e }) {
-- let t = G(null);
-- return W(() => {
++function ot({ data: e }) {
++ let t = W(null);
++ return U(() => {
let n = t.current, r = document.createElement("details");
r.className = "configdirectories";
let i = document.createElement("summary");
@@@ -953,10 -949,10 +953,10 @@@
e.className = "confighelp", e.textContent = t, r.append(e);
}
return n.replaceChildren(r), d(n, "details", "uninstall-data"), () => n.replaceChildren();
-- }, [e]), /* @__PURE__ */ K("div", { ref: t });
++ }, [e]), /* @__PURE__ */ G("div", { ref: t });
}
- function ot({ uninstall: e }) {
-function at({ uninstall: e }) {
-- let [t, r] = H(!1), [a, o] = H("");
++function st({ uninstall: e }) {
++ let [t, r] = V(!1), [a, o] = V("");
async function s() {
await n({
title: "卸载 Peach",
@@@ -964,7 -960,7 +964,7 @@@
body: t ? "将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。",
confirmLabel: "卸载 Peach",
onConfirm: async () => {
-- let e = await R("/api/configuration/uninstall", {
++ let e = await L("/api/configuration/uninstall", {
delete_data: t,
confirmation: "卸载 Peach"
});
@@@ -972,40 -968,40 +972,40 @@@
}
});
}
-- return /* @__PURE__ */ K("section", {
++ return /* @__PURE__ */ G("section", {
id: "uninstallPeach",
class: "configfieldset configdanger",
"data-geist-fieldset": !0,
"data-fieldset-type": "error",
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("uninstallTitle", "卸载 Peach") } }),
-- e.available && /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("uninstallTitle", "卸载 Peach") } }),
++ e.available && /* @__PURE__ */ G("p", {
class: "confighelp",
children: "卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。"
}),
- /* @__PURE__ */ K(rt, {
- /* @__PURE__ */ K(nt, {
++ /* @__PURE__ */ G(it, {
label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",
checked: t,
disabled: !e.full_available || !!a,
change: r
}),
- /* @__PURE__ */ K(at, { data: e }),
- /* @__PURE__ */ K(it, { data: e }),
-- e.message && /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G(ot, { data: e }),
++ e.message && /* @__PURE__ */ G("p", {
class: "confighelp",
children: e.message
}),
-- a && /* @__PURE__ */ K("p", {
++ a && /* @__PURE__ */ G("p", {
class: "confighelp",
role: "status",
children: a
})
]
-- }), /* @__PURE__ */ K("footer", {
++ }), /* @__PURE__ */ G("footer", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
-- children: /* @__PURE__ */ K("button", {
++ children: /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button danger",
disabled: !e.available || !!a,
@@@ -1017,29 -1013,29 +1017,29 @@@
}
//#endregion
//#region src/islands/configuration.tsx
- var st = "/api/configuration", ct = "/api/pick-folder", lt = 8e3, ut = (e, t) => L(st, t), q = ({ html: e, class: t }) => /* @__PURE__ */ K("div", {
-var ot = "/api/configuration", st = "/api/pick-folder", ct = 8e3, lt = (e, t) => L(ot, t), q = ({ html: e, class: t }) => /* @__PURE__ */ K("div", {
++var ct = "/api/configuration", lt = "/api/pick-folder", ut = 8e3, dt = (e, t) => I(ct, t), K = ({ html: e, class: t }) => /* @__PURE__ */ G("div", {
class: t,
dangerouslySetInnerHTML: { __html: e }
- }), dt = (e) => !(e instanceof ke) || e.status !== 400 ? null : e.body?.errors ?? null;
- function ft({ facts: e }) {
-}), ut = (e) => !(e instanceof Oe) || e.status !== 400 ? null : e.body?.errors ?? null;
-function dt({ facts: e }) {
-- return /* @__PURE__ */ K("section", {
++}), ft = (e) => !(e instanceof Ae) || e.status !== 400 ? null : e.body?.errors ?? null;
++function pt({ facts: e }) {
++ return /* @__PURE__ */ G("section", {
class: "configfieldset",
"data-geist-fieldset": !0,
"aria-labelledby": "configFactsTitle",
-- children: /* @__PURE__ */ K("div", {
++ children: /* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
-- children: [/* @__PURE__ */ K(q, { html: i("configFactsTitle", "运行信息") }), /* @__PURE__ */ K("dl", {
++ children: [/* @__PURE__ */ G(K, { html: i("configFactsTitle", "运行信息") }), /* @__PURE__ */ G("dl", {
class: "configfacts",
-- children: e.map((e) => /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K("dt", { children: e.term }), /* @__PURE__ */ K("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ K("span", {
++ children: e.map((e) => /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("dt", { children: e.term }), /* @__PURE__ */ G("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ G("span", {
class: "confighelp",
-- children: [" ", /* @__PURE__ */ K("a", {
++ children: [" ", /* @__PURE__ */ G("a", {
href: e.download_url,
target: "_blank",
rel: "noreferrer",
-- children: [e.download_label, /* @__PURE__ */ K("svg", {
++ children: [e.download_label, /* @__PURE__ */ G("svg", {
"aria-hidden": "true",
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })
})]
})]
}) : null] })] }))
@@@ -1047,57 -1043,57 +1047,57 @@@
})
});
}
- function pt({ data: t }) {
-function ft({ data: t }) {
-- let [n, r] = H(t.media_sources), [a, o] = H(""), s = G(null);
-- U(() => () => s.current?.abort(), []);
++function mt({ data: t }) {
++ let [n, r] = V(t.media_sources), [a, o] = V(""), s = W(null);
++ H(() => () => s.current?.abort(), []);
let c = async (e) => {
if (s.current) return;
let t = new AbortController();
s.current = t, u(e, !0), o("");
try {
- let e = await L(st, t.signal);
- let e = await L(ot, t.signal);
++ let e = await I(ct, t.signal);
t.signal.aborted || r(e.media_sources);
} catch (e) {
-- t.signal.aborted || o(I(e));
++ t.signal.aborted || o(F(e));
} finally {
s.current = null, u(e, !1);
}
};
-- return n ? /* @__PURE__ */ K("section", {
++ return n ? /* @__PURE__ */ G("section", {
class: "configfieldset",
"aria-labelledby": "configMountsTitle",
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K(q, { html: i("configMountsTitle", "挂载状态") }),
-- /* @__PURE__ */ K("dl", {
++ /* @__PURE__ */ G(K, { html: i("configMountsTitle", "挂载状态") }),
++ /* @__PURE__ */ G("dl", {
class: "configfacts",
-- children: n.map((t) => /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K("dt", { children: [/* @__PURE__ */ K("span", {
++ children: n.map((t) => /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("dt", { children: [/* @__PURE__ */ G("span", {
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: l(e[t.location]) }
}), {
local: "本地磁盘",
115: "CloudDrive · 115",
pikpak: "CloudDrive · PikPak"
-- }[t.location] || t.location] }), /* @__PURE__ */ K("dd", { children: [
++ }[t.location] || t.location] }), /* @__PURE__ */ G("dd", { children: [
t.path || "未配置挂载点",
" ",
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
class: `configstatus ${t.online === !0 ? "online" : t.online === !1 ? "offline" : "unknown"}`,
children: t.online === !0 ? "在线" : t.online === !1 ? "离线" : "未检测"
})
] })] }))
}),
-- a ? /* @__PURE__ */ K("p", {
++ a ? /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: a
}) : null
]
-- }), /* @__PURE__ */ K("div", {
++ }), /* @__PURE__ */ G("div", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
-- children: /* @__PURE__ */ K("button", {
++ children: /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button",
onClick: (e) => c(e.currentTarget),
@@@ -1106,9 -1102,9 +1106,9 @@@
})]
}) : null;
}
- function mt({ value: t, label: n, onChange: r }) {
-function pt({ value: t, label: n, onChange: r }) {
-- let i = G(null), a = G(null), o = G(r);
-- return o.current = r, W(() => {
++function ht({ value: t, label: n, onChange: r }) {
++ let i = W(null), a = W(null), o = W(r);
++ return o.current = r, U(() => {
let r = i.current;
r.innerHTML = c([
["local", "本地磁盘"],
@@@ -1125,31 -1121,31 +1125,31 @@@
return s.addEventListener("change", l), () => {
a.current = null, s.disabled = !0, s.removeEventListener("change", l), r.replaceChildren();
};
-- }, [n]), W(() => {
++ }, [n]), U(() => {
a.current && (a.current.value = t);
-- }, [t]), /* @__PURE__ */ K("div", {
++ }, [t]), /* @__PURE__ */ G("div", {
ref: i,
class: "configsourcecontrol"
});
}
- function ht({ data: e, receipt: t }) {
-function mt({ data: e, receipt: t }) {
++function gt({ data: e, receipt: t }) {
let n = e.media_sources?.filter((e) => [
"local",
"115",
"pikpak"
- ].includes(e.location)), [r, a] = H(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = H(n?.map((e) => e.location) ?? []), [l, d] = H(n?.map((e) => e.root) ?? []), [f, p] = H(String(e.port)), [m, h] = H(!1), [g, _] = H([]), [v, y] = H(""), [b, x] = H(""), [S, C] = H(null), [w, T] = H(null), E = G(!1), D = G(e.revision), O = G([]), k = G(null);
- ].includes(e.location)), [r, a] = H(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = H(n?.map((e) => e.location) ?? []), [l, d] = H(n?.map((e) => e.root) ?? []), [f, p] = H(String(e.port)), [m, h] = H(!1), [g, _] = H([]), [v, y] = H(""), [b, x] = H(""), [S, C] = H(null), [w, T] = H(null), E = G(!1), D = G(e.revision), ee = G([]), O = G(null);
-- W(() => {
- w !== null && (ee.current[w]?.focus(), T(null));
- }, [w]), U(() => {
++ ].includes(e.location)), [r, a] = V(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = V(n?.map((e) => e.location) ?? []), [l, d] = V(n?.map((e) => e.root) ?? []), [f, p] = V(String(e.port)), [m, h] = V(!1), [g, _] = V([]), [v, y] = V(""), [b, x] = V(""), [S, C] = V(null), [w, T] = V(null), E = W(!1), D = W(e.revision), O = W([]), k = W(null);
++ U(() => {
+ w !== null && (O.current[w]?.focus(), T(null));
- }, [w]), U(() => {
++ }, [w]), H(() => {
if (!S) return;
- let e = setTimeout(() => location.assign(S.url), lt);
- let e = setTimeout(() => location.assign(S.url), ct);
++ let e = setTimeout(() => location.assign(S.url), ut);
return () => clearTimeout(e);
}, [S]);
- let k = (e, t) => {
+ let A = (e, t) => {
a((n) => n.map((n, r) => r === e ? t : n));
- }, te = () => {
+ }, ee = () => {
T(r.length), a((e) => [...e, ""]);
- }, A = (e) => {
+ }, te = (e) => {
c((t) => t.filter((t, n) => n !== e)), d((t) => t.filter((t, n) => n !== e)), a((t) => t.filter((t, n) => n !== e)), _((t) => t.filter((t, n) => n !== e));
}, j = (e, t) => {
_((n) => {
@@@ -1161,43 -1157,43 +1161,43 @@@
if (t.getAttribute("aria-busy") !== "true") {
u(t, !0);
try {
- let { path: t } = await R(ct, { initial: r[e] ?? "" });
- let { path: t } = await R(st, { initial: r[e] ?? "" });
- t && (k(e, t), j(e, ""));
++ let { path: t } = await L(lt, { initial: r[e] ?? "" });
+ t && (A(e, t), j(e, ""));
} catch (t) {
-- j(e, I(t));
++ j(e, F(t));
} finally {
u(t, !1);
}
}
};
-- return S ? /* @__PURE__ */ K("div", {
++ return S ? /* @__PURE__ */ G("div", {
class: "configsaved",
role: "status",
-- children: /* @__PURE__ */ K("div", {
++ children: /* @__PURE__ */ G("div", {
class: "geist-note geist-note-success",
role: "note",
-- children: [/* @__PURE__ */ K("svg", {
++ children: [/* @__PURE__ */ G("svg", {
"aria-hidden": "true",
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-check" })
-- }), /* @__PURE__ */ K("p", { children: /* @__PURE__ */ K("span", { children: [
++ children: /* @__PURE__ */ G("use", { href: "#i-check" })
++ }), /* @__PURE__ */ G("p", { children: /* @__PURE__ */ G("span", { children: [
"配置已保存,Peach 正在重新启动。稍后自动跳转,或点击",
-- /* @__PURE__ */ K("a", {
++ /* @__PURE__ */ G("a", {
href: S.url,
children: "进入馆藏"
}),
"。"
] }) })]
})
-- }) : /* @__PURE__ */ K("form", {
++ }) : /* @__PURE__ */ G("form", {
class: "configfieldset",
"data-geist-fieldset": !0,
"aria-labelledby": "configTitle",
onSubmit: async (n) => {
if (n.preventDefault(), !E.current) {
- E.current = !0, u(O.current, !0), x("");
+ E.current = !0, u(k.current, !0), x("");
try {
- let n = await R(st, {
- let n = await R(ot, {
++ let n = await L(ct, {
revision: D.current,
media_dirs: r,
...e.media_sources ? { media_sources: r.map((e, t) => ({
@@@ -1210,75 -1206,75 +1210,75 @@@
});
D.current = n.revision, _([]), y(""), t("已保存配置"), C(n);
} catch (e) {
- let t = dt(e);
- let t = ut(e);
-- t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(I(e)));
++ let t = ft(e);
++ t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(F(e)));
} finally {
- E.current = !1, u(O.current, !1);
+ E.current = !1, u(k.current, !1);
}
}
},
noValidate: !0,
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content",
children: [
-- /* @__PURE__ */ K(q, { html: i("configTitle", "这台电脑") }),
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G(K, { html: i("configTitle", "这台电脑") }),
++ /* @__PURE__ */ G("div", {
class: "configfield",
children: [
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
class: "configlabel",
id: "configDirsLabel",
children: "媒体文件夹"
}),
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", {
class: "configdirs",
role: "group",
"aria-labelledby": "configDirsLabel",
-- children: r.map((t, n) => /* @__PURE__ */ K("div", {
++ children: r.map((t, n) => /* @__PURE__ */ G("div", {
class: "configdir",
children: [
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
class: "configpathlabel",
children: ["本机文件夹 ", n + 1]
}),
-- /* @__PURE__ */ K("input", {
++ /* @__PURE__ */ G("input", {
class: "geist-input",
type: "text",
value: t,
"aria-label": `媒体文件夹 ${n + 1}`,
"aria-invalid": g[n] ? "true" : void 0,
- onInput: (e) => k(n, e.currentTarget.value),
+ onInput: (e) => A(n, e.currentTarget.value),
ref: (e) => {
- ee.current[n] = e;
+ O.current[n] = e;
}
}),
-- /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button configpick",
"aria-label": "选择文件夹",
onClick: (e) => ne(n, e.currentTarget),
-- children: /* @__PURE__ */ K("svg", {
++ children: /* @__PURE__ */ G("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
-- children: /* @__PURE__ */ K("use", { href: "#i-folder-search" })
++ children: /* @__PURE__ */ G("use", { href: "#i-folder-search" })
})
}),
-- r.length > 1 ? /* @__PURE__ */ K("button", {
++ r.length > 1 ? /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button configrm",
"aria-label": "移除这个文件夹",
- onClick: () => A(n),
- children: /* @__PURE__ */ K("svg", {
+ onClick: () => te(n),
- children: /* @__PURE__ */ K("svg", {
++ children: /* @__PURE__ */ G("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
-- children: /* @__PURE__ */ K("use", { href: "#i-x" })
++ children: /* @__PURE__ */ G("use", { href: "#i-x" })
})
}) : null,
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", {
class: "configsource",
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "configsourcelabel",
- children: ["媒体来源", /* @__PURE__ */ K(mt, {
- children: ["媒体来源", /* @__PURE__ */ K(pt, {
++ children: ["媒体来源", /* @__PURE__ */ G(ht, {
label: `媒体来源 ${n + 1}`,
value: s[n] || "local",
onChange: (e) => {
@@@ -1286,7 -1282,7 +1286,7 @@@
t[n] = e, c(t);
}
})]
-- }), e.windows === !1 ? /* @__PURE__ */ K("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ K("input", {
++ }), e.windows === !1 ? /* @__PURE__ */ G("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ G("input", {
class: "geist-input",
"aria-label": `Windows 中的对应路径 ${n + 1}`,
value: l[n] || "",
@@@ -1297,7 -1293,7 +1297,7 @@@
}
})] }) : null]
}),
-- g[n] ? /* @__PURE__ */ K("p", {
++ g[n] ? /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: g[n]
@@@ -1305,61 -1301,61 +1305,61 @@@
]
}, n))
}),
-- /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
type: "button",
class: "geist-button configadd",
- onClick: te,
+ onClick: ee,
children: "添加文件夹"
}),
-- s.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ K("p", {
++ s.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ G("p", {
class: "confighelp",
-- children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ K("a", {
++ children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ G("a", {
href: "https://www.clouddrive2.com/help.html",
target: "_blank",
rel: "noreferrer",
-- children: ["挂载帮助", /* @__PURE__ */ K("svg", {
++ children: ["挂载帮助", /* @__PURE__ */ G("svg", {
"aria-hidden": "true",
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })
})]
})]
}) : null,
-- s.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ K("p", {
++ s.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ G("p", {
class: "confighelp",
children: [
"未检测到 ",
e.name,
"。",
-- /* @__PURE__ */ K("a", {
++ /* @__PURE__ */ G("a", {
href: e.download_url,
target: "_blank",
rel: "noreferrer",
children: [
"下载 ",
e.name,
-- /* @__PURE__ */ K("svg", {
++ /* @__PURE__ */ G("svg", {
"aria-hidden": "true",
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })
})
]
})
]
})) : null,
-- e.windows === !1 ? /* @__PURE__ */ K("p", {
++ e.windows === !1 ? /* @__PURE__ */ G("p", {
class: "confighelp",
children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。"
}) : null
]
}),
-- e.port_editable === !1 ? null : /* @__PURE__ */ K("div", {
++ e.port_editable === !1 ? null : /* @__PURE__ */ G("div", {
class: "configfield",
children: [
-- /* @__PURE__ */ K("label", {
++ /* @__PURE__ */ G("label", {
for: "configPort",
children: "本机访问端口"
}),
-- /* @__PURE__ */ K("input", {
++ /* @__PURE__ */ G("input", {
id: "configPort",
class: "geist-input",
type: "text",
@@@ -1368,109 -1364,109 +1368,109 @@@
"aria-invalid": v ? "true" : void 0,
onInput: (e) => p(e.currentTarget.value)
}),
-- v ? /* @__PURE__ */ K("p", {
++ v ? /* @__PURE__ */ G("p", {
class: "configbad",
role: "alert",
children: v
}) : null,
-- /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("p", {
class: "confighelp",
children: "浏览器地址里冒号后面的数字,一般不用改。"
})
]
}),
-- /* @__PURE__ */ K("label", {
++ /* @__PURE__ */ G("label", {
class: "configcheck",
-- children: [/* @__PURE__ */ K("span", {
++ children: [/* @__PURE__ */ G("span", {
class: "pcheck",
-- children: [/* @__PURE__ */ K("input", {
++ children: [/* @__PURE__ */ G("input", {
type: "checkbox",
checked: m,
onChange: (e) => h(e.currentTarget.checked)
-- }), /* @__PURE__ */ K("span", {
++ }), /* @__PURE__ */ G("span", {
"aria-hidden": "true",
-- children: /* @__PURE__ */ K("svg", {
++ children: /* @__PURE__ */ G("svg", {
viewBox: "0 0 24 24",
-- children: /* @__PURE__ */ K("use", { href: "#i-check" })
++ children: /* @__PURE__ */ G("use", { href: "#i-check" })
})
})]
-- }), /* @__PURE__ */ K("span", { children: "保存后扫描并补全资料" })]
++ }), /* @__PURE__ */ G("span", { children: "保存后扫描并补全资料" })]
}),
-- b ? /* @__PURE__ */ K(q, { html: o(b, {
++ b ? /* @__PURE__ */ G(K, { html: o(b, {
variant: "error",
label: "没有保存"
}) }) : null
]
-- }), /* @__PURE__ */ K("div", {
++ }), /* @__PURE__ */ G("div", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
-- children: [/* @__PURE__ */ K("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ K("button", {
++ children: [/* @__PURE__ */ G("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ G("button", {
type: "submit",
class: "geist-button primary",
- ref: O,
+ ref: k,
children: "保存配置"
})]
})]
});
}
- function gt({ receipt: e, data: t, error: n }) {
-function ht({ receipt: e, data: t, error: n }) {
-- return n || !t ? /* @__PURE__ */ K(q, {
++function _t({ receipt: e, data: t, error: n }) {
++ return n || !t ? /* @__PURE__ */ G(K, {
class: "configpage",
html: o(n || "没有读到配置", {
variant: "error",
label: "打不开配置"
})
-- }) : /* @__PURE__ */ K("div", {
++ }) : /* @__PURE__ */ G("div", {
class: "configpage",
children: [
- t.startup ? /* @__PURE__ */ K(it, {
- t.startup ? /* @__PURE__ */ K(rt, {
++ t.startup ? /* @__PURE__ */ G(at, {
startup: t.startup,
receipt: e
}) : null,
- t.editable ? /* @__PURE__ */ K(ht, {
- t.editable ? /* @__PURE__ */ K(mt, {
++ t.editable ? /* @__PURE__ */ G(gt, {
data: t,
receipt: e
-- }) : /* @__PURE__ */ K(q, { html: o(t.notice, {
++ }) : /* @__PURE__ */ G(K, { html: o(t.notice, {
variant: "secondary",
label: "只读"
}) }),
- /* @__PURE__ */ K(pt, { data: t }),
- t.peach_proxy ? /* @__PURE__ */ K(nt, {
- /* @__PURE__ */ K(ft, { data: t }),
- t.peach_proxy ? /* @__PURE__ */ K(tt, {
++ /* @__PURE__ */ G(mt, { data: t }),
++ t.peach_proxy ? /* @__PURE__ */ G(rt, {
initial: t.peach_proxy,
receipt: e
}) : null,
- t.access ? /* @__PURE__ */ K($e, {
- t.access ? /* @__PURE__ */ K(Qe, {
++ t.access ? /* @__PURE__ */ G(et, {
initial: t.access,
receipt: e
}) : null,
- t.updates ? /* @__PURE__ */ K(tt, {
- t.updates ? /* @__PURE__ */ K(et, {
++ t.updates ? /* @__PURE__ */ G(nt, {
initial: t.updates,
initialJob: t.update_job
}) : null,
- /* @__PURE__ */ K(ft, { facts: t.facts }),
- t.uninstall ? /* @__PURE__ */ K(ot, { uninstall: t.uninstall }) : null
- /* @__PURE__ */ K(dt, { facts: t.facts }),
- t.uninstall ? /* @__PURE__ */ K(at, { uninstall: t.uninstall }) : null
++ /* @__PURE__ */ G(pt, { facts: t.facts }),
++ t.uninstall ? /* @__PURE__ */ G(st, { uninstall: t.uninstall }) : null
]
});
}
//#endregion
//#region node_modules/@preact/signals-core/dist/signals-core.module.js
- var _t = Symbol.for("preact-signals");
- function vt() {
-var gt = Symbol.for("preact-signals");
-function _t() {
-- if (Y > 1) Y--;
++var vt = Symbol.for("preact-signals");
++function yt() {
++ if (J > 1) J--;
else {
var e, t = !1;
for ((function() {
- var e = Et;
- for (Et = void 0; e !== void 0;) {
- var e = Tt;
- for (Tt = void 0; e !== void 0;) {
++ var e = Dt;
++ for (Dt = void 0; e !== void 0;) {
var t = e.S;
if (t.v === e.v) for (var n = t.t; n !== void 0; n = n.x) n.i === e.i && (n.i = t.i);
e = e.o;
}
- })(); St !== void 0;) {
- var n = St;
- for (St = void 0, Ct++; n !== void 0;) {
- })(); xt !== void 0;) {
- var n = xt;
- for (xt = void 0, St++; n !== void 0;) {
++ })(); Ct !== void 0;) {
++ var n = Ct;
++ for (Ct = void 0, wt++; n !== void 0;) {
var r = n.u;
- if (n.u = void 0, n.f &= -3, !(8 & n.f) && At(n)) try {
- if (n.u = void 0, n.f &= -3, !(8 & n.f) && kt(n)) try {
++ if (n.u = void 0, n.f &= -3, !(8 & n.f) && jt(n)) try {
n.c();
} catch (n) {
t ||= (e = n, !0);
@@@ -1478,116 -1474,116 +1478,116 @@@
n = r;
}
}
- if (Ct = 0, Y--, t) throw e;
- if (St = 0, Y--, t) throw e;
++ if (wt = 0, J--, t) throw e;
}
}
- function yt(e) {
-function vt(e) {
-- if (Y > 0) return e();
- Tt = ++wt, Y++;
- wt = ++Ct, Y++;
++function bt(e) {
++ if (J > 0) return e();
++ Et = ++Tt, J++;
try {
return e();
} finally {
- vt();
- _t();
++ yt();
}
}
- var bt, J = void 0;
- function xt(e) {
- var t = J, n = bt;
- J = void 0, bt = void 0;
-var yt, J = void 0;
-function bt(e) {
- var t = J, n = yt;
- J = void 0, yt = void 0;
++var xt, q = void 0;
++function St(e) {
++ var t = q, n = xt;
++ q = void 0, xt = void 0;
try {
return e();
} finally {
- J = t, bt = n;
- J = t, yt = n;
++ q = t, xt = n;
}
}
- var St = void 0, Y = 0, Ct = 0, wt = 0, Tt = 0, Et = void 0, Dt = 0;
- function Ot(e) {
-var xt = void 0, Y = 0, St = 0, Ct = 0, wt = 0, Tt = void 0, Et = 0;
-function Dt(e) {
-- if (J !== void 0) {
++var Ct = void 0, J = 0, wt = 0, Tt = 0, Et = 0, Dt = void 0, Ot = 0;
++function kt(e) {
++ if (q !== void 0) {
var t = e.n;
-- if (t === void 0 || t.t !== J) return t = {
++ if (t === void 0 || t.t !== q) return t = {
i: 0,
S: e,
-- p: J.s,
++ p: q.s,
n: void 0,
-- t: J,
++ t: q,
e: void 0,
x: void 0,
r: t
-- }, J.s !== void 0 && (J.s.n = t), J.s = t, e.n = t, 32 & J.f && e.S(t), t;
-- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = J.s, t.n = void 0, J.s.n = t, J.s = t), t;
++ }, q.s !== void 0 && (q.s.n = t), q.s = t, e.n = t, 32 & q.f && e.S(t), t;
++ if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = q.s, t.n = void 0, q.s.n = t, q.s = t), t;
}
}
--function X(e, t) {
++function Y(e, t) {
this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
}
- X.prototype.brand = _t, X.prototype.h = function() {
-X.prototype.brand = gt, X.prototype.h = function() {
++Y.prototype.brand = vt, Y.prototype.h = function() {
return !0;
--}, X.prototype.S = function(e) {
++}, Y.prototype.S = function(e) {
var t = this, n = this.t;
- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? xt(function() {
- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? bt(function() {
++ n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? St(function() {
var e;
(e = t.W) == null || e.call(t);
}) : n.e = e);
--}, X.prototype.U = function(e) {
++}, Y.prototype.U = function(e) {
var t = this;
if (this.t !== void 0) {
var n = e.e, r = e.x;
- n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && xt(function() {
- n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && bt(function() {
++ n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && St(function() {
var e;
(e = t.Z) == null || e.call(t);
}));
}
--}, X.prototype.subscribe = function(e) {
++}, Y.prototype.subscribe = function(e) {
var t = this;
- return Lt(function() {
- return It(function() {
++ return Rt(function() {
var n = t.value;
- xt(function() {
- bt(function() {
++ St(function() {
return e(n);
});
}, { name: "sub" });
--}, X.prototype.valueOf = function() {
++}, Y.prototype.valueOf = function() {
return this.value;
--}, X.prototype.toString = function() {
++}, Y.prototype.toString = function() {
return this.value + "";
--}, X.prototype.toJSON = function() {
++}, Y.prototype.toJSON = function() {
return this.value;
--}, X.prototype.peek = function() {
++}, Y.prototype.peek = function() {
var e = this;
- return xt(function() {
- return bt(function() {
++ return St(function() {
return e.value;
});
--}, Object.defineProperty(X.prototype, "value", {
++}, Object.defineProperty(Y.prototype, "value", {
get: function() {
- var e = Ot(this);
- var e = Dt(this);
++ var e = kt(this);
return e !== void 0 && (e.i = this.i), this.v;
},
set: function(e) {
if (e !== this.v) {
- if (Ct > 100) throw Error("Cycle detected");
- if (St > 100) throw Error("Cycle detected");
++ if (wt > 100) throw Error("Cycle detected");
(function(e) {
- Y !== 0 && Ct === 0 && e.l !== Tt && (e.l = Tt, Et = {
- Y !== 0 && St === 0 && e.l !== wt && (e.l = wt, Tt = {
++ J !== 0 && wt === 0 && e.l !== Et && (e.l = Et, Dt = {
S: e,
v: e.v,
i: e.i,
- o: Et
- o: Tt
++ o: Dt
});
- })(this), this.v = e, this.i++, Dt++, Y++;
- })(this), this.v = e, this.i++, Et++, Y++;
++ })(this), this.v = e, this.i++, Ot++, J++;
try {
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
} finally {
- vt();
- _t();
++ yt();
}
}
}
});
- function kt(e, t) {
-function Ot(e, t) {
-- return new X(e, t);
++function At(e, t) {
++ return new Y(e, t);
}
- function At(e) {
-function kt(e) {
++function jt(e) {
for (var t = e.s; t !== void 0; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;
return !1;
}
- function jt(e) {
-function At(e) {
++function Mt(e) {
for (var t = e.s; t !== void 0; t = t.n) {
var n = t.S.n;
if (n !== void 0 && (t.r = n), t.S.n = t, t.i = -1, t.n === void 0) {
@@@ -1596,81 -1592,81 +1596,81 @@@
}
}
}
- function Mt(e) {
-function jt(e) {
++function Nt(e) {
for (var t = e.s, n = void 0; t !== void 0;) {
var r = t.p;
t.i === -1 ? (t.S.U(t), r !== void 0 && (r.n = t.n), t.n !== void 0 && (t.n.p = r)) : n = t, t.S.n = t.r, t.r !== void 0 && (t.r = void 0), t = r;
}
e.s = n;
}
--function Z(e, t) {
- X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Dt - 1, this.f = 4;
- X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Et - 1, this.f = 4;
++function X(e, t) {
++ Y.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Ot - 1, this.f = 4;
}
--Z.prototype = new X(), Z.prototype.h = function() {
++X.prototype = new Y(), X.prototype.h = function() {
if (this.f &= -3, 1 & this.f) return !1;
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Dt)) return !0;
- if (this.g = Dt, this.f |= 1, this.i > 0 && !At(this)) return this.f &= -2, !0;
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Et)) return !0;
- if (this.g = Et, this.f |= 1, this.i > 0 && !kt(this)) return this.f &= -2, !0;
-- var e = J;
++ if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ot)) return !0;
++ if (this.g = Ot, this.f |= 1, this.i > 0 && !jt(this)) return this.f &= -2, !0;
++ var e = q;
try {
- jt(this), J = this;
- At(this), J = this;
++ Mt(this), q = this;
var t = this.x();
(16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);
} catch (e) {
this.v = e, this.f |= 16, this.i++;
}
- return J = e, Mt(this), this.f &= -2, !0;
- return J = e, jt(this), this.f &= -2, !0;
--}, Z.prototype.S = function(e) {
++ return q = e, Nt(this), this.f &= -2, !0;
++}, X.prototype.S = function(e) {
if (this.t === void 0) {
this.f |= 36;
for (var t = this.s; t !== void 0; t = t.n) t.S.S(t);
}
-- X.prototype.S.call(this, e);
--}, Z.prototype.U = function(e) {
-- if (this.t !== void 0 && (X.prototype.U.call(this, e), this.t === void 0)) {
++ Y.prototype.S.call(this, e);
++}, X.prototype.U = function(e) {
++ if (this.t !== void 0 && (Y.prototype.U.call(this, e), this.t === void 0)) {
this.f &= -33;
for (var t = this.s; t !== void 0; t = t.n) t.S.U(t);
}
--}, Z.prototype.N = function() {
++}, X.prototype.N = function() {
if (!(2 & this.f)) {
this.f |= 6;
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
}
--}, Object.defineProperty(Z.prototype, "value", { get: function() {
++}, Object.defineProperty(X.prototype, "value", { get: function() {
if (1 & this.f) throw Error("Cycle detected");
- var e = Ot(this);
- var e = Dt(this);
++ var e = kt(this);
if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;
return this.v;
} });
- function Nt(e, t) {
-function Mt(e, t) {
-- return new Z(e, t);
++function Pt(e, t) {
++ return new X(e, t);
}
- function Pt(e) {
-function Nt(e) {
++function Ft(e) {
var t = e.m;
if (e.m = void 0, typeof t == "function") {
-- Y++;
-- var n = J;
-- J = void 0;
++ J++;
++ var n = q;
++ q = void 0;
try {
t();
} catch (t) {
- throw e.f &= -2, e.f |= 8, Ft(e), t;
- throw e.f &= -2, e.f |= 8, Pt(e), t;
++ throw e.f &= -2, e.f |= 8, It(e), t;
} finally {
- J = n, vt();
- J = n, _t();
++ q = n, yt();
}
}
}
- function Ft(e) {
-function Pt(e) {
++function It(e) {
for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);
- e.x = void 0, e.s = void 0, Pt(e);
- e.x = void 0, e.s = void 0, Nt(e);
++ e.x = void 0, e.s = void 0, Ft(e);
}
- function It(e) {
-function Ft(e) {
-- if (J !== this) throw Error("Out-of-order effect");
- Mt(this), J = e, this.f &= -2, 8 & this.f && Ft(this), vt();
- jt(this), J = e, this.f &= -2, 8 & this.f && Pt(this), _t();
++function Lt(e) {
++ if (q !== this) throw Error("Out-of-order effect");
++ Nt(this), q = e, this.f &= -2, 8 & this.f && It(this), yt();
}
--function Q(e, t) {
- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, bt && bt.push(this);
- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, yt && yt.push(this);
++function Z(e, t) {
++ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, xt && xt.push(this);
}
--Q.prototype.c = function() {
++Z.prototype.c = function() {
var e = this.S();
try {
if (8 & this.f || this.x === void 0) return;
@@@ -1679,20 -1675,20 +1679,20 @@@
} finally {
e();
}
--}, Q.prototype.S = function() {
++}, Z.prototype.S = function() {
if (1 & this.f) throw Error("Cycle detected");
- this.f |= 1, this.f &= -9, Pt(this), jt(this), Y++;
- this.f |= 1, this.f &= -9, Nt(this), At(this), Y++;
-- var e = J;
- return J = this, It.bind(this, e);
- return J = this, Ft.bind(this, e);
--}, Q.prototype.N = function() {
- 2 & this.f || (this.f |= 2, this.u = St, St = this);
- 2 & this.f || (this.f |= 2, this.u = xt, xt = this);
--}, Q.prototype.d = function() {
- this.f |= 8, 1 & this.f || Ft(this);
- this.f |= 8, 1 & this.f || Pt(this);
--}, Q.prototype.dispose = function() {
++ this.f |= 1, this.f &= -9, Ft(this), Mt(this), J++;
++ var e = q;
++ return q = this, Lt.bind(this, e);
++}, Z.prototype.N = function() {
++ 2 & this.f || (this.f |= 2, this.u = Ct, Ct = this);
++}, Z.prototype.d = function() {
++ this.f |= 8, 1 & this.f || It(this);
++}, Z.prototype.dispose = function() {
this.d();
};
- function Lt(e, t) {
-function It(e, t) {
-- var n = new Q(e, t);
++function Rt(e, t) {
++ var n = new Z(e, t);
try {
n.c();
} catch (e) {
@@@ -1703,35 -1699,35 +1703,35 @@@
}
//#endregion
//#region node_modules/@preact/signals/dist/signals.module.js
- var Rt, zt, Bt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Vt = [];
- Lt(function() {
- Rt = this.N;
-var Lt, Rt, zt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Bt = [];
-It(function() {
- Lt = this.N;
++var zt, Bt, Vt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ht = [];
++Rt(function() {
++ zt = this.N;
})();
--function $(e, t) {
- v[e] = t.bind(null, v[e] || function() {});
++function Q(e, t) {
+ y[e] = t.bind(null, y[e] || function() {});
}
- function Ht(e) {
- if (zt) {
- var t = zt;
- zt = void 0, t();
-function Vt(e) {
- if (Rt) {
- var t = Rt;
- Rt = void 0, t();
++function Ut(e) {
++ if (Bt) {
++ var t = Bt;
++ Bt = void 0, t();
}
- zt = e && e.S();
- Rt = e && e.S();
++ Bt = e && e.S();
}
- function Ut(e) {
- var t = this, n = e.data, r = Gt(n);
-function Ht(e) {
- var t = this, n = e.data, r = Wt(n);
++function Wt(e) {
++ var t = this, n = e.data, r = Kt(n);
r.name = "ReactiveDom", r.value = n;
- var i = Ue(function() {
- var i = He(function() {
++ var i = We(function() {
for (var e = t, n = t.__v; n = n.__;) if (n.__c) {
n.__c.__$f |= 4;
break;
}
- var i = Nt(function() {
- var i = Mt(function() {
++ var i = Pt(function() {
var e = r.value.value;
return e === 0 ? 0 : !0 === e ? "" : e || "";
- }), a = Nt(function() {
- }), a = Mt(function() {
- return !Array.isArray(i.value) && !b(i.value);
- }), o = It(function() {
- if (this.N = qt, a.value) {
++ }), a = Pt(function() {
+ return !Array.isArray(i.value) && !x(i.value);
- }), o = Lt(function() {
- if (this.N = Jt, a.value) {
++ }), o = Rt(function() {
++ if (this.N = Yt, a.value) {
var t = i.value;
e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);
}
@@@ -1742,14 -1738,14 +1742,14 @@@
}, []), a = i[0], o = i[1];
return a.value ? o.peek() : o.value;
}
- Ut.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {
-Ht.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {
++Wt.displayName = "ReactiveTextNode", Object.defineProperties(Y.prototype, {
constructor: {
configurable: !0,
value: void 0
},
type: {
configurable: !0,
- value: Ut
- value: Ht
++ value: Wt
},
props: {
configurable: !0,
@@@ -1764,35 -1760,35 +1764,35 @@@
configurable: !0,
value: 1
}
--}), $("__b", function(e, t) {
++}), Q("__b", function(e, t) {
if (typeof t.type == "string") {
var n, r = t.props;
for (var i in r) if (i !== "children") {
var a = r[i];
-- a instanceof X && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());
++ a instanceof Y && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());
}
}
e(t);
--}), $("__r", function(e, t) {
++}), Q("__r", function(e, t) {
if (e(t), t.type !== N) {
- Ht();
- Vt();
++ Ut();
var n, r = t.__c;
r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {
var n;
- return Lt(function() {
- return It(function() {
++ return Rt(function() {
n = this;
}, { name: t }), n.c = e, n;
}(function(e) {
return function() {
var t;
- Bt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
- zt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
++ Vt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
};
- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Ht(n);
- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Vt(n);
++ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Ut(n);
}
--}), $("__e", function(e, t, n, r) {
- Ht(), e(t, n, r);
- Vt(), e(t, n, r);
--}), $("diffed", function(e, t) {
- Ht();
- Vt();
++}), Q("__e", function(e, t, n, r) {
++ Ut(), e(t, n, r);
++}), Q("diffed", function(e, t) {
++ Ut();
var n;
if (typeof t.type == "string" && (n = t.__e)) {
var r = t.__np, i = t.props, a = n.U;
@@@ -1802,25 -1798,25 +1802,25 @@@
}
if (r) for (var c in a || (a = {}, n.U = a), r) {
var l = a[c], u = r[c];
- l === void 0 ? (l = Wt(n, c, u, i), a[c] = l) : l.o(u, i);
- l === void 0 ? (l = Ut(n, c, u, i), a[c] = l) : l.o(u, i);
++ l === void 0 ? (l = Gt(n, c, u, i), a[c] = l) : l.o(u, i);
}
}
e(t);
});
- function Wt(e, t, n, r) {
- var i = t in e && e.ownerSVGElement === void 0, a = kt(n);
-function Ut(e, t, n, r) {
- var i = t in e && e.ownerSVGElement === void 0, a = Ot(n);
++function Gt(e, t, n, r) {
++ var i = t in e && e.ownerSVGElement === void 0, a = At(n);
return {
o: function(e, t) {
a.value = e, r = t;
},
- d: Lt(function() {
- this.N = Jt;
- d: It(function() {
- this.N = qt;
++ d: Rt(function() {
++ this.N = Yt;
var n = a.value.value;
r[t] !== n && (r[t] = n, i ? e[t] = n : n != null && (!1 !== n || t[4] === "-") ? e.setAttribute(t, n) : e.removeAttribute(t));
})
};
}
--$("unmount", function(e, t) {
++Q("unmount", function(e, t) {
if (typeof t.type == "string") {
var n = t.__e;
if (n) {
@@@ -1844,9 -1840,9 +1844,9 @@@
}
}
e(t);
--}), $("__h", function(e, t, n, r) {
++}), Q("__h", function(e, t, n, r) {
r < 3 && (t.__$f |= 2), e(t, n, r);
--}), P.prototype.shouldComponentUpdate = function(e, t) {
++}), ce.prototype.shouldComponentUpdate = function(e, t) {
if (this.__R) return !0;
var n = this.__$u, r = n && n.s !== void 0;
for (var i in t) return !0;
@@@ -1858,55 -1854,55 +1858,55 @@@
for (var s in this.props) if (!(s in e)) return !0;
return !1;
};
- function Gt(e, t) {
- return Ue(function() {
- return kt(e, t);
-function Wt(e, t) {
- return He(function() {
- return Ot(e, t);
++function Kt(e, t) {
++ return We(function() {
++ return At(e, t);
}, []);
}
- var Kt = function(e) {
-var Gt = function(e) {
++var qt = function(e) {
queueMicrotask(function() {
queueMicrotask(e);
});
};
- function qt() {
- yt(function() {
- for (var e; e = Vt.shift();) Rt.call(e);
-function Kt() {
- vt(function() {
- for (var e; e = Bt.shift();) Lt.call(e);
++function Jt() {
++ bt(function() {
++ for (var e; e = Ht.shift();) zt.call(e);
});
}
- function Jt() {
- Vt.push(this) === 1 && (y.requestAnimationFrame || Kt)(qt);
-function qt() {
- Bt.push(this) === 1 && (v.requestAnimationFrame || Gt)(Kt);
++function Yt() {
++ Ht.push(this) === 1 && (y.requestAnimationFrame || qt)(Jt);
}
//#endregion
//#region src/state/quality-goals.ts
- var Yt = "/api/quality-goals?limit=200", Xt = {
-var Jt = "/api/quality-goals?limit=200", Yt = {
++var Xt = "/api/quality-goals?limit=200", Zt = {
data: null,
error: ""
- }, Zt = kt(Xt), Qt = 0, $t = Nt(() => Zt.value);
- Nt(() => Zt.value.data?.total ?? null);
- function en() {
- Qt += 1, Zt.value = Xt;
-}, Xt = Ot(Yt), Zt = 0, Qt = Mt(() => Xt.value);
-Mt(() => Xt.value.data?.total ?? null);
-function $t() {
- Zt += 1, Xt.value = Yt;
++}, Qt = At(Zt), $t = 0, en = Pt(() => Qt.value);
++Pt(() => Qt.value.data?.total ?? null);
++function tn() {
++ $t += 1, Qt.value = Zt;
}
- async function tn(e) {
- let t = Qt += 1;
-async function en(e) {
- let t = Zt += 1;
++async function nn(e) {
++ let t = $t += 1;
try {
- let n = await L(Yt, e);
- return t === Qt && (Zt.value = {
- let n = await L(Jt, e);
- return t === Zt && (Xt.value = {
++ let n = await I(Xt, e);
++ return t === $t && (Qt.value = {
data: n,
error: ""
}), n;
} catch (n) {
- throw !e?.aborted && t === Qt && (Zt.value = {
- throw !e?.aborted && t === Zt && (Xt.value = {
++ throw !e?.aborted && t === $t && (Qt.value = {
data: null,
-- error: I(n)
++ error: F(n)
}), n;
}
}
//#endregion
//#region src/islands/quality-goals.tsx
- var nn = (e, t) => tn(t), rn = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
- function an({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {
- let { data: a, error: s } = $t.value;
-var tn = (e, t) => en(t), nn = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
-function rn({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {
- let { data: a, error: s } = Qt.value;
-- if (s) return /* @__PURE__ */ K("div", {
++var rn = (e, t) => nn(t), an = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
++function on({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {
++ let { data: a, error: s } = en.value;
++ if (s) return /* @__PURE__ */ G("div", {
class: "qualitylist",
dangerouslySetInnerHTML: { __html: o(s, {
variant: "error",
@@@ -1914,51 -1910,51 +1914,51 @@@
}) }
});
let c = a?.items ?? [];
-- return c.length ? /* @__PURE__ */ K("div", {
++ return c.length ? /* @__PURE__ */ G("div", {
class: "qualitylist",
-- children: c.map((r) => /* @__PURE__ */ K("article", {
++ children: c.map((r) => /* @__PURE__ */ G("article", {
class: "qualityitem",
-- children: [/* @__PURE__ */ K("button", {
++ children: [/* @__PURE__ */ G("button", {
class: "qualitycover",
type: "button",
"aria-label": `打开 ${n(r)}`,
onClick: () => e(r.id),
-- children: /* @__PURE__ */ K("img", {
- src: rn(r),
- src: nn(r),
++ children: /* @__PURE__ */ G("img", {
++ src: an(r),
alt: "",
loading: "lazy",
onError: (e) => e.currentTarget.remove()
})
-- }), /* @__PURE__ */ K("div", { children: [
-- /* @__PURE__ */ K("h3", { children: /* @__PURE__ */ K("button", {
++ }), /* @__PURE__ */ G("div", { children: [
++ /* @__PURE__ */ G("h3", { children: /* @__PURE__ */ G("button", {
type: "button",
"data-middle-truncate": !0,
onClick: () => e(r.id),
dangerouslySetInnerHTML: { __html: t(r) }
}) }),
-- /* @__PURE__ */ K("p", {
++ /* @__PURE__ */ G("p", {
class: "mono",
children: [
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
style: "display:contents",
dangerouslySetInnerHTML: { __html: i(r.location, r.cost) }
}),
-- /* @__PURE__ */ K("span", { children: p[r.location] ?? r.location }),
- /* @__PURE__ */ K("span", { children: h(r.duration) }),
- /* @__PURE__ */ K("span", { children: g(r.size ?? 0) })
- /* @__PURE__ */ K("span", { children: m(r.duration) }),
- /* @__PURE__ */ K("span", { children: h(r.size ?? 0) })
++ /* @__PURE__ */ G("span", { children: p[r.location] ?? r.location }),
++ /* @__PURE__ */ G("span", { children: h(r.duration) }),
++ /* @__PURE__ */ G("span", { children: g(r.size ?? 0) })
]
}),
-- r.reason ? /* @__PURE__ */ K("p", { children: r.reason }) : null
++ r.reason ? /* @__PURE__ */ G("p", { children: r.reason }) : null
] })]
}, r.id))
-- }) : /* @__PURE__ */ K("div", {
++ }) : /* @__PURE__ */ G("div", {
class: "qualitylist",
dangerouslySetInnerHTML: { __html: r("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }
});
}
//#endregion
//#region src/jobs.ts
- async function on(e) {
-async function an(e) {
++async function sn(e) {
let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;
for (; e.active();) {
let r;
@@@ -1973,11 -1969,11 +1973,11 @@@
await t(2e3);
}
}
- function sn(e) {
-function on(e) {
++function cn(e) {
let t = document.createElement("div");
e.host.hidden = !0, t.dataset.followJob = "", t.setAttribute("aria-live", "polite"), e.host.prepend(t);
let n = e.storageKey || "peach-follow-job", r = sessionStorage.getItem(n) || void 0, i = !1;
- on({
- an({
++ sn({
read: e.read,
active: () => !i && e.active() && t.isConnected,
keepWatching: e.watchIdle !== !1,
@@@ -2003,138 -1999,124 +2003,138 @@@
}
//#endregion
//#region src/islands/scraping.tsx
- var cn = (e, t) => L("/api/scraping", t);
- function ln({ value: e, onChange: t }) {
-var sn = (e, t) => L("/api/scraping", t);
-function cn({ value: e, onChange: t }) {
-- let n = G(null), r = G(t);
-- return r.current = t, W(() => {
++var ln = (e, t) => I("/api/scraping", t);
++function un({ value: e, onChange: t }) {
++ let n = W(null), r = W(t);
++ return r.current = t, U(() => {
let t = n.current;
t.innerHTML = c([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });
let i = f(t.firstElementChild), a = () => r.current(i.value);
return i.addEventListener("change", a), () => {
i.disabled = !0, i.removeEventListener("change", a), t.replaceChildren();
};
-- }, []), /* @__PURE__ */ K("div", {
++ }, []), /* @__PURE__ */ G("div", {
ref: n,
class: "scraping-network"
});
}
- function un({ source: e, toast: t }) {
- let [n, r] = H(e), [a, s] = H(e.network), [c, l] = H(""), [d, f] = H(""), [p, h] = H("paste"), [g, _] = H(""), [v, y] = H(!1), [b, x] = H(""), [S, C] = H([]), w = G(null), T = G(null);
-function ln({ source: e, toast: t }) {
- let [n, r] = H(e), [a, s] = H(e.network), [c, l] = H(""), [d, f] = H(""), [p, m] = H("paste"), [h, g] = H(""), [_, v] = H(!1), [y, b] = H(""), [x, S] = H([]), C = G(null), w = G(null);
-- W(() => {
- w.current?.querySelectorAll("footer button").forEach((e) => u(e, _));
- }, [_]);
- let T = G(new AbortController());
- U(() => () => T.current.abort(), []);
- async function E(n) {
- if (!_) {
- v(!0), b(""), S([]);
++function dn({ source: e, toast: t }) {
++ let [n, r] = V(e), [a, s] = V(e.network), [c, l] = V(""), [d, f] = V(""), [p, h] = V("paste"), [g, _] = V(""), [v, y] = V(!1), [b, x] = V(""), [S, C] = V([]), w = W(null), T = W(null);
++ U(() => {
+ T.current?.querySelectorAll("footer button").forEach((e) => u(e, v));
+ }, [v]);
- let E = G(new AbortController());
- U(() => () => E.current.abort(), []);
++ let E = W(new AbortController());
++ H(() => () => E.current.abort(), []);
+ async function D(n) {
+ if (!v) {
+ y(!0), x(""), C([]);
try {
if (n === "check") {
- let t = await R("/api/scraping/check", { source: e.source }, "POST", E.current.signal);
- let t = await R("/api/scraping/check", { source: e.source }, "POST", T.current.signal);
- T.current.signal.aborted || S(t.results);
++ let t = await L("/api/scraping/check", { source: e.source }, "POST", E.current.signal);
+ E.current.signal.aborted || C(t.results);
} else {
-- let i = await R("/api/scraping/settings", {
++ let i = await L("/api/scraping/settings", {
source: e.source,
network: a,
cookie: c,
cookies_text: d,
revoke: n === "revoke"
- }, "POST", T.current.signal);
- T.current.signal.aborted || (r(i.saved), l(""), f(""), g(""), C.current && (C.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));
+ }, "POST", E.current.signal);
+ E.current.signal.aborted || (r(i.saved), l(""), f(""), _(""), w.current && (w.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));
}
} catch (e) {
- E.current.signal.aborted || x(I(e));
- T.current.signal.aborted || b(I(e));
++ E.current.signal.aborted || x(F(e));
} finally {
- T.current.signal.aborted || v(!1);
+ E.current.signal.aborted || y(!1);
}
}
}
-- return /* @__PURE__ */ K("section", {
++ return /* @__PURE__ */ G("section", {
class: "scraping-source",
-- children: /* @__PURE__ */ K("form", {
- ref: w,
++ children: /* @__PURE__ */ G("form", {
+ ref: T,
class: "cleanupfieldset",
"data-geist-fieldset": !0,
onSubmit: (e) => {
- e.preventDefault(), E("save");
+ e.preventDefault(), D("save");
},
-- children: [/* @__PURE__ */ K("div", {
++ children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content scraping-fields",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i(`scraping-${e.source}`, e.label) } }),
-- /* @__PURE__ */ K("a", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i(`scraping-${e.source}`, e.label) } }),
++ /* @__PURE__ */ G("a", {
class: "scraping-url",
href: e.login,
target: "_blank",
rel: "noopener noreferrer",
- children: e.login
+ children: [
- /* @__PURE__ */ K("img", {
++ /* @__PURE__ */ G("img", {
+ src: m(e.login),
+ alt: "",
+ width: "16",
+ height: "16",
+ loading: "lazy",
+ onError: (e) => e.currentTarget.remove()
+ }),
- /* @__PURE__ */ K("span", { children: e.login }),
- /* @__PURE__ */ K("svg", {
++ /* @__PURE__ */ G("span", { children: e.login }),
++ /* @__PURE__ */ G("svg", {
+ "aria-hidden": "true",
- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })
+ })
+ ]
}),
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", {
class: "scraping-label",
- children: ["连接方式", /* @__PURE__ */ K(ln, {
- children: ["连接方式", /* @__PURE__ */ K(cn, {
++ children: ["连接方式", /* @__PURE__ */ G(un, {
value: a,
onChange: s
})]
}),
-- a === "peach" && /* @__PURE__ */ K("a", {
++ a === "peach" && /* @__PURE__ */ G("a", {
href: "/configuration#peachProxy",
children: "配置 Peach 代理"
}),
-- e.accepts_cookie && /* @__PURE__ */ K(N, { children: [
-- /* @__PURE__ */ K("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),
-- /* @__PURE__ */ K("div", {
++ e.accepts_cookie && /* @__PURE__ */ G(N, { children: [
++ /* @__PURE__ */ G("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),
++ /* @__PURE__ */ G("div", {
class: "insightswitch scraping-cookie-method",
role: "radiogroup",
"aria-label": "提供 Cookie 的方式(二选一)",
-- children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ K("label", { children: [/* @__PURE__ */ K("input", {
++ children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ G("label", { children: [/* @__PURE__ */ G("input", {
type: "radio",
name: `cookie-method-${e.source}`,
value: t,
checked: p === t,
onChange: () => {
- m(t), l(""), f(""), g("");
+ h(t), l(""), f(""), _("");
}
-- }), /* @__PURE__ */ K("span", { children: n })] }, t))
++ }), /* @__PURE__ */ G("span", { children: n })] }, t))
}),
-- p === "paste" ? /* @__PURE__ */ K("label", { children: ["Cookie", /* @__PURE__ */ K("input", {
++ p === "paste" ? /* @__PURE__ */ G("label", { children: ["Cookie", /* @__PURE__ */ G("input", {
class: "geist-input",
type: "password",
autoComplete: "off",
value: c,
- disabled: _,
+ disabled: v,
onInput: (e) => l(e.currentTarget.value)
-- })] }) : /* @__PURE__ */ K("label", {
++ })] }) : /* @__PURE__ */ G("label", {
class: "scraping-file",
-- children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ K("span", {
++ children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ G("span", {
class: "scraping-file-control",
children: [
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
class: "geist-button",
children: "选择文件"
}),
-- /* @__PURE__ */ K("span", {
++ /* @__PURE__ */ G("span", {
class: "scraping-file-name",
- children: h || "未选择文件"
+ children: g || "未选择文件"
}),
-- /* @__PURE__ */ K("input", {
- ref: C,
++ /* @__PURE__ */ G("input", {
+ ref: w,
type: "file",
accept: ".txt",
- disabled: _,
+ disabled: v,
onChange: async (e) => {
let t = e.currentTarget.files?.[0];
if (!t) {
@@@ -2160,49 -2142,49 +2160,49 @@@
})]
})
] }),
- b && /* @__PURE__ */ K("div", {
- y && /* @__PURE__ */ K("div", {
++ b && /* @__PURE__ */ G("div", {
role: "alert",
- dangerouslySetInnerHTML: { __html: o(y, { variant: "error" }) }
+ dangerouslySetInnerHTML: { __html: o(b, { variant: "error" }) }
}),
- S.map((t) => /* @__PURE__ */ K("div", {
- x.map((t) => /* @__PURE__ */ K("div", {
++ S.map((t) => /* @__PURE__ */ G("div", {
role: "status",
dangerouslySetInnerHTML: { __html: o(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }
}, t.label))
]
-- }), /* @__PURE__ */ K("footer", {
++ }), /* @__PURE__ */ G("footer", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
children: [
- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ K("button", {
- /* @__PURE__ */ K("button", {
- class: "geist-button primary",
- type: "submit",
- children: "保存"
- }),
- /* @__PURE__ */ K("button", {
++ e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ G("button", {
class: "geist-button",
type: "button",
- onClick: () => void E("check"),
- children: "检查连接"
+ onClick: () => void D("revoke"),
+ children: "撤销 Cookie"
}),
- /* @__PURE__ */ K("button", {
- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
class: "geist-button",
type: "button",
- onClick: () => void E("revoke"),
- children: "撤销 Cookie"
+ onClick: () => void D("check"),
+ children: "检查连接"
+ }),
- /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
+ class: "geist-button primary",
+ type: "submit",
+ children: "保存"
})
]
})]
})
});
}
- function dn({ data: e, error: t, toast: n }) {
-function un({ data: e, error: t, toast: n }) {
-- let [r, a] = H(""), [s, c] = H(!1), [l, d] = H(""), f = G(null);
-- W(() => u(f.current, s), [s]);
-- let p = G(new AbortController()), m = G(0);
++function fn({ data: e, error: t, toast: n }) {
++ let [r, a] = V(""), [s, c] = V(!1), [l, d] = V(""), f = W(null);
++ U(() => u(f.current, s), [s]);
++ let p = W(new AbortController()), m = W(0);
async function h(e = !1) {
let t = ++m.current;
- await on({
- await an({
-- read: (e) => L("/api/scraping/cover", e),
++ await sn({
++ read: (e) => I("/api/scraping/cover", e),
active: () => !p.current.signal.aborted && t === m.current,
render: (t) => {
c(t.status === "running"), t.status === "running" && (e = !1), t.status === "failed" && !e && d(t.error || "采集未取得"), t.status === "complete" && !e && n(t.result || "封面采集完成");
@@@ -2210,37 -2192,37 +2210,37 @@@
disconnected: () => d("连接中断,正在重新读取后台进度")
});
}
-- U(() => (h(!0), () => p.current.abort()), []);
++ H(() => (h(!0), () => p.current.abort()), []);
async function g() {
if (!s) {
m.current++, c(!0), d("");
try {
-- await R("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();
++ await L("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();
} catch (e) {
-- p.current.signal.aborted || (c(!1), d(I(e)));
++ p.current.signal.aborted || (c(!1), d(F(e)));
}
}
}
-- return t ? /* @__PURE__ */ K("div", {
++ return t ? /* @__PURE__ */ G("div", {
role: "alert",
dangerouslySetInnerHTML: { __html: o(t, { variant: "error" }) }
-- }) : /* @__PURE__ */ K("div", {
++ }) : /* @__PURE__ */ G("div", {
class: "scraping-page",
children: [
-- /* @__PURE__ */ K("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),
-- /* @__PURE__ */ K("section", {
++ /* @__PURE__ */ G("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),
++ /* @__PURE__ */ G("section", {
class: "cleanupfieldset scraping-source",
"data-geist-fieldset": !0,
-- children: /* @__PURE__ */ K("div", {
++ children: /* @__PURE__ */ G("div", {
class: "geist-fieldset-content scraping-fields",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("scraping-cover", "高清封面") } }),
-- /* @__PURE__ */ K("form", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("scraping-cover", "高清封面") } }),
++ /* @__PURE__ */ G("form", {
class: "scraping-cover-form",
onSubmit: (e) => {
e.preventDefault(), g();
},
-- children: [/* @__PURE__ */ K("input", {
++ children: [/* @__PURE__ */ G("input", {
class: "geist-input",
"aria-label": "馆藏番号",
required: !0,
@@@ -2248,21 -2230,21 +2248,21 @@@
disabled: s,
placeholder: "输入馆藏番号,如 ABW-232",
onInput: (e) => a(e.currentTarget.value)
-- }), /* @__PURE__ */ K("button", {
++ }), /* @__PURE__ */ G("button", {
ref: f,
class: "geist-button primary",
type: "submit",
children: "抓取封面"
})]
}),
-- l && /* @__PURE__ */ K("div", {
++ l && /* @__PURE__ */ G("div", {
role: "alert",
dangerouslySetInnerHTML: { __html: o(l, { variant: "error" }) }
})
]
})
}),
- e?.sources.map((e) => /* @__PURE__ */ K(un, {
- e?.sources.map((e) => /* @__PURE__ */ K(ln, {
++ e?.sources.map((e) => /* @__PURE__ */ G(dn, {
source: e,
toast: n
}, e.source))
@@@ -2271,14 -2253,14 +2271,14 @@@
}
//#endregion
//#region src/islands/library-processing.tsx
- var fn = (e, t) => L("/api/library-processing", t);
- function pn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {
-var dn = (e, t) => L("/api/library-processing", t);
-function fn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {
-- let [d, f] = H(e || { status: "idle" }), [p, m] = H(t), [h, g] = H(!1), [_, v] = H(!1), y = G(new AbortController()), b = G(0), x = G(d.status), S = G(null), C = h || d.status === "running";
-- W(() => u(S.current, C), [C]);
++var pn = (e, t) => I("/api/library-processing", t);
++function mn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {
++ let [d, f] = V(e || { status: "idle" }), [p, m] = V(t), [h, g] = V(!1), [_, v] = V(!1), y = W(new AbortController()), b = W(0), x = W(d.status), S = W(null), C = h || d.status === "running";
++ U(() => u(S.current, C), [C]);
async function w() {
let e = ++b.current;
- await on({
- await an({
-- read: (e) => L("/api/library-processing", e),
++ await sn({
++ read: (e) => I("/api/library-processing", e),
active: () => !y.current.signal.aborted && b.current === e,
keepWatching: c === "notice" || !!l,
render: (e) => {
@@@ -2287,49 -2269,49 +2287,49 @@@
disconnected: () => m("连接中断,正在重新读取处理进度")
});
}
-- U(() => ((d.status === "running" || c === "notice" || l) && w(), () => y.current.abort()), []);
++ H(() => ((d.status === "running" || c === "notice" || l) && w(), () => y.current.abort()), []);
async function T() {
if (!C) {
g(!0), m(""), v(!1);
try {
-- let e = await R("/api/library-processing", {}, "POST", y.current.signal);
++ let e = await L("/api/library-processing", {}, "POST", y.current.signal);
if (y.current.signal.aborted) return;
x.current = e.status, f(e), g(!1), await w();
} catch (e) {
-- y.current.signal.aborted || (m(I(e)), g(!1));
++ y.current.signal.aborted || (m(F(e)), g(!1));
}
}
}
-- return c === "notice" ? !p && d.status !== "running" && d.status !== "failed" ? null : /* @__PURE__ */ K("div", {
++ return c === "notice" ? !p && d.status !== "running" && d.status !== "failed" ? null : /* @__PURE__ */ G("div", {
class: "library-processing-banner",
role: "status",
-- children: [/* @__PURE__ */ K("span", { children: p || (d.status === "failed" ? "扫描与资料采集未完成" : `${d.stage || "正在整理馆藏"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) }), /* @__PURE__ */ K("a", {
++ children: [/* @__PURE__ */ G("span", { children: p || (d.status === "failed" ? "扫描与资料采集未完成" : `${d.stage || "正在整理馆藏"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) }), /* @__PURE__ */ G("a", {
class: "geist-button",
href: "/data-cleanup#libraryProcessing",
children: p || d.status === "failed" ? "查看并处理" : "查看进度"
})]
-- }) : /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K("div", {
++ }) : /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", {
class: "geist-fieldset-content library-processing",
children: [
-- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: i("cleanupScrapingTitle", "扫描与采集") } }),
-- /* @__PURE__ */ K("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),
-- /* @__PURE__ */ K("div", {
++ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("cleanupScrapingTitle", "扫描与采集") } }),
++ /* @__PURE__ */ G("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),
++ /* @__PURE__ */ G("div", {
"aria-live": "polite",
children: [
-- d.status === "running" && /* @__PURE__ */ K(N, { children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a(`${d.stage || "正在处理"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) } }), !!d.total && /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: s(`已处理 ${d.checked || 0} / ${d.total} 个视频`, d.checked || 0, d.total) } })] }),
-- (p || d.status === "failed") && /* @__PURE__ */ K("div", {
++ d.status === "running" && /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: a(`${d.stage || "正在处理"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) } }), !!d.total && /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: s(`已处理 ${d.checked || 0} / ${d.total} 个视频`, d.checked || 0, d.total) } })] }),
++ (p || d.status === "failed") && /* @__PURE__ */ G("div", {
role: "alert",
dangerouslySetInnerHTML: { __html: o(p || d.error || "处理未完成,请重试", { variant: "error" }) }
}),
-- d.status === "failed" && !!d.issues?.length && /* @__PURE__ */ K("ul", { children: d.issues.slice(0, 20).map((e) => /* @__PURE__ */ K("li", { children: [
-- e.asset_id ? /* @__PURE__ */ K("a", {
++ d.status === "failed" && !!d.issues?.length && /* @__PURE__ */ G("ul", { children: d.issues.slice(0, 20).map((e) => /* @__PURE__ */ G("li", { children: [
++ e.asset_id ? /* @__PURE__ */ G("a", {
href: `/item/${e.asset_id}`,
children: "查看视频"
}) : null,
e.asset_id ? ":" : "",
e.message
] })) }),
-- _ && /* @__PURE__ */ K("div", {
++ _ && /* @__PURE__ */ G("div", {
class: "library-processing-result",
dangerouslySetInnerHTML: { __html: o(`已扫描 ${d.scanned || 0} 个文件,识别 ${d.identified || 0} 个番号,整理 ${d.candidates || 0} 组资料候选。`, {
variant: "success",
@@@ -2339,21 -2321,21 +2339,21 @@@
]
})
]
-- }), /* @__PURE__ */ K("footer", {
++ }), /* @__PURE__ */ G("footer", {
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
children: [
-- /* @__PURE__ */ K("a", {
++ /* @__PURE__ */ G("a", {
class: "geist-button",
href: "/scraping",
children: "采集来源"
}),
-- !!d.candidates && /* @__PURE__ */ K("a", {
++ !!d.candidates && /* @__PURE__ */ G("a", {
class: "geist-button",
href: "/review",
children: "复核资料"
}),
-- /* @__PURE__ */ K("button", {
++ /* @__PURE__ */ G("button", {
ref: S,
type: "button",
class: "geist-button primary",
@@@ -2365,12 -2347,12 +2365,12 @@@
}
//#endregion
//#region src/state/index.ts
- var mn = { "quality-goals": {
- refresh: tn,
- reset: en
- } }, hn = () => Object.keys(mn);
- async function gn(e) {
- let t = mn[e];
-var pn = { "quality-goals": {
- refresh: en,
- reset: $t
-} }, mn = () => Object.keys(pn);
-async function hn(e) {
- let t = pn[e];
++var hn = { "quality-goals": {
++ refresh: nn,
++ reset: tn
++} }, gn = () => Object.keys(hn);
++async function _n(e) {
++ let t = hn[e];
if (!t) throw Error(`未登记的共享 store:${String(e)}`);
try {
return await t.refresh(), !0;
@@@ -2380,7 -2362,7 +2380,7 @@@
}
//#endregion
//#region src/review-bulk.ts
- var _n = () => ({
-var gn = () => ({
++var vn = () => ({
active: !1,
busy: !1,
selected: /* @__PURE__ */ new Set(),
@@@ -2388,7 -2370,7 +2388,7 @@@
assets: /* @__PURE__ */ new Map(),
errors: /* @__PURE__ */ new Map()
});
- async function vn(e, t, n, r) {
-async function _n(e, t, n, r) {
++async function yn(e, t, n, r) {
let i = [], a = 0;
for (let o of e) {
if (!r()) break;
@@@ -2399,7 -2381,7 +2399,7 @@@
} catch (e) {
i.push({
key: o.key,
-- message: I(e)
++ message: F(e)
});
}
}
@@@ -2408,7 -2390,7 +2408,7 @@@
failures: i
};
}
- function yn(e, n) {
-function vn(e, n) {
++function bn(e, n) {
let r = e.querySelector(".reviewlist");
if (!r || !n.rows.length || n.locked) return;
let i = n.state, a = [...r.querySelectorAll("[data-review-key]")], o = document.createElement("div");
@@@ -2455,78 -2453,107 +2471,107 @@@
let n = t.includes(Number(e.dataset.reviewAsset));
e.setAttribute("aria-pressed", String(n)), e.classList.toggle("picked", n);
});
- let a = e.querySelector("[data-picked-count]");
+ let a = n.querySelector("[data-picked-count]");
a && (a.textContent = `已选 ${t.length} / ${r.length}`);
}
- e.addEventListener("click", (t) => {
- t.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && i.assets.set(n, [...e.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));
+ n.addEventListener("click", (t) => {
+ t.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && i.assets.set(e, [...n.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));
});
- for (let t of e.querySelectorAll("input[type=\"radio\"]")) i.choices.has(n) && (t.checked = i.choices.get(n) === t.value), t.addEventListener("change", () => {
- t.checked && i.choices.set(n, t.value);
+ for (let t of n.querySelectorAll("input[type=\"radio\"]")) i.choices.has(e) && (t.checked = i.choices.get(e) === t.value), t.addEventListener("change", () => {
+ t.checked && i.choices.set(e, t.value), x();
});
- o.onchange = () => {
- o.checked ? i.selected.add(n) : i.selected.delete(n), f();
- }, d.push(() => {
- a.hidden = !i.active, o.checked = i.selected.has(n), o.disabled = !r;
+ a.onchange = () => {
+ a.checked ? i.selected.add(e) : i.selected.delete(e), x();
+ }, y.push(() => {
+ r.hidden = !i.active, a.checked = i.selected.has(e), a.disabled = !1;
});
}
- let _ = () => a.cards.filter((e) => i.selected.has(e.dataset.reviewKey) && l(e));
- d.push(() => {
- p.hidden = m.hidden = !i.active, p.textContent = _().length && _().length === a.cards.filter(l).length ? "清空本组" : "全选本组", m.textContent = `采用所选${_().length ? `(${_().length})` : ""}`, m.disabled = !_().length, p.disabled = !a.cards.some(l);
- }), p.onclick = () => {
+ let d = () => e.cards.filter((e) => i.selected.has(e.dataset.reviewKey) && v(e));
+ y.push(() => {
+ s.hidden = c.hidden = !i.active, s.textContent = d().length && d().length === e.cards.filter(v).length ? "清空本组" : "全选本组", c.textContent = `采用所选${d().length ? `(${d().length})` : ""}`, c.disabled = !d().length, s.disabled = !e.cards.some(v);
+ }), s.onclick = () => {
if (i.busy) return;
- let e = a.cards.filter(l), t = _().length === e.length;
- e.forEach((e) => t ? i.selected.delete(e.dataset.reviewKey) : i.selected.add(e.dataset.reviewKey)), f();
- }, m.onclick = async () => {
- if (i.busy || !_().length) return;
- let t = _().map((e) => ({
- key: e.dataset.reviewKey,
- payload: n.payload(e)
- }));
- if (n.metadata && t.some((e) => !e.payload.candidate_key)) {
- h.textContent = "请先为所选的多来源候选选择来源。", _().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();
- return;
+ let t = e.cards.filter(v), n = d().length === t.length;
+ t.forEach((e) => n ? i.selected.delete(e.dataset.reviewKey) : i.selected.add(e.dataset.reviewKey)), x();
+ }, c.onclick = () => b(d, l, c, "approved");
+ }
+ async function b(t, r, a, o) {
+ if (i.busy || !t().length) return;
+ let s = t().map((e) => ({
+ key: e.dataset.reviewKey,
+ payload: {
+ ...n.payload(e),
+ status: o
}
- i.busy = !0, h.textContent = `正在采用 0 / ${t.length}`, f(), u(m, !0);
- let r = [...e.querySelectorAll("button,input")], a = r.map((e) => e.getAttribute("aria-disabled"));
- r.forEach((e) => {
- e.setAttribute("aria-disabled", "true");
- });
- let o = (e) => {
- e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());
- };
- e.addEventListener("click", o, !0), e.addEventListener("keydown", o, !0);
- let s = 0, c = await vn(t, async (e) => {
- try {
- return await n.submit(e);
- } finally {
- s++, n.active() && (h.textContent = `正在采用 ${s} / ${t.length}`);
- }
- }, (e) => {
- i.selected.delete(e), i.errors.delete(e), n.applied(e);
- }, n.active);
- if (i.busy = !1, e.removeEventListener("click", o, !0), e.removeEventListener("keydown", o, !0), r.forEach((e, t) => {
- let n = a[t];
- n === null ? e.removeAttribute("aria-disabled") : e.setAttribute("aria-disabled", n);
- }), u(m, !1), !n.active()) return;
- n.notify(`已采用 ${c.completed} 项${c.failures.length ? `,${c.failures.length} 项未完成` : ""}`), c.failures.forEach((e) => i.errors.set(e.key, e.message));
- let l = e.parentElement;
- n.refresh(), l?.querySelector(".reviewbulkbar button")?.focus({ preventScroll: !0 });
+ }));
+ if (o === "approved" && n.metadata && s.some((e) => !e.payload.candidate_key)) {
+ r.textContent = "请先为所选的多来源候选选择来源。", t().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();
+ return;
+ }
+ i.busy = !0, r.textContent = `正在处理 0 / ${s.length}`, x(), u(a, !0);
+ let c = [...e.querySelectorAll("button,input")], l = c.map((e) => e.getAttribute("aria-disabled"));
+ c.forEach((e) => {
+ e.setAttribute("aria-disabled", "true");
+ });
+ let d = (e) => {
+ e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());
};
+ e.addEventListener("click", d, !0), e.addEventListener("keydown", d, !0);
- let f = 0, p = await _n(s, async (e) => {
++ let f = 0, p = await yn(s, async (e) => {
+ try {
+ return await n.submit(e);
+ } finally {
+ f++, n.active() && (r.textContent = `正在处理 ${f} / ${s.length}`);
+ }
+ }, (e) => {
+ i.selected.delete(e), i.errors.delete(e), n.applied(e);
+ }, n.active);
+ if (i.busy = !1, e.removeEventListener("click", d, !0), e.removeEventListener("keydown", d, !0), c.forEach((e, t) => {
+ let n = l[t];
+ n === null ? e.removeAttribute("aria-disabled") : e.setAttribute("aria-disabled", n);
+ }), u(a, !1), !n.active()) return;
+ n.notify(`已处理 ${p.completed} 项${p.failures.length ? `,${p.failures.length} 项未完成` : ""}`), p.failures.forEach((e) => i.errors.set(e.key, e.message));
+ let m = e.parentElement;
+ n.refresh(), m?.querySelector(".reviewbulkbar button")?.focus({ preventScroll: !0 });
}
- function f() {
- s.textContent = i.active ? "退出多选" : "多选", s.setAttribute("aria-pressed", String(i.active)), d.forEach((e) => e());
+ function x() {
+ l.hidden = m.hidden = d.hidden = p.hidden = !i.active, m.hidden ||= !n.metadata;
+ let e = g();
+ l.textContent = e.length === a.length ? "清空选择" : "全选本页", d.textContent = `通过所选(${e.length})`, p.textContent = `拒绝所选(${e.length})`, d.disabled = !e.length || e.some((e) => !v(e)), p.disabled = !e.length;
- let t = n.rows.filter((e) => i.selected.has(e.item_key)), r = yn(t);
++ let t = n.rows.filter((e) => i.selected.has(e.item_key)), r = xn(t);
+ m.innerHTML = c([["", t.length && !r.length ? "所选项目无共同来源" : "统一选择来源"], ...r.map((e) => [e, e])], "", { label: "统一选择来源" });
+ let o = f(m.firstElementChild);
+ o.disabled = !r.length, o.addEventListener("change", () => {
+ if (!(i.busy || !r.includes(o.value))) {
+ for (let n of e) {
+ let e = t.find((e) => e.item_key === n.dataset.reviewKey), r = e.candidates.find((e) => e.source === o.value);
+ n.querySelectorAll("input[type=\"radio\"]").forEach((e) => {
+ e.checked = e.value === r.candidate_key;
+ }), i.choices.set(e.item_key, r.candidate_key);
+ }
+ h.textContent = `已为 ${e.length} 项选择 ${o.value},点击通过所选采用。`;
+ }
+ }), s.textContent = i.active ? "退出多选" : "多选", s.setAttribute("aria-pressed", String(i.active)), y.forEach((e) => e());
}
- s.onclick = () => {
- i.busy || (i.active = !i.active, i.active || i.selected.clear(), f());
- }, f();
+ let S = (e) => {
+ i.busy || (i.active = e, e || i.selected.clear(), x(), n.modeChanged?.(e));
+ };
+ return s.onclick = () => S(!i.active), x(), {
+ setMode: S,
+ get busy() {
+ return i.busy;
+ }
+ };
+ }
-function yn(e) {
++function xn(e) {
+ return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];
}
//#endregion
//#region src/native-image.ts
--function bn(e, t, n, r) {
++function Sn(e, t, n, r) {
return e > 0 && t > 0 && e === n && t === r;
}
--function xn(e, t, n, r, i = 1) {
++function Cn(e, t, n, r, i = 1) {
let a = Number.isFinite(i) && i > 0 ? i : 1;
e /= a, t /= a;
let o = [
@@@ -2543,7 -2570,7 +2588,7 @@@
}
//#endregion
//#region src/entity-skeleton.ts
--function Sn(e, t) {
++function wn(e, t) {
return `<section data-skeleton="entity/${e}" role="status" aria-label="正在读取资料">
<span class="sr-only">正在读取资料</span><div aria-hidden="true">
<div class="entityhero"><div class="entityportrait ${e === "studio" || e === "agency" ? "square " : ""}skeleton"></div>
@@@ -2555,7 -2582,7 +2600,7 @@@
}
//#endregion
//#region src/catalog-onboarding.ts
--var Cn = [
++var Tn = [
"loc",
"creator",
"performer",
@@@ -2572,20 -2599,16 +2617,16 @@@
"jav",
"thumb"
];
--function wn() {
- let e = (e) => [
- ,
- ,
- ,
- ].fill(e).join("");
++function En() {
+ let e = (e) => Array(64).fill(e).join("");
return {
tiers: "<div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"av\"><span class=\"ring\"></span><span class=\"nm\">&nbsp;</span></span>") + "</div><div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"brandpill\"><span class=\"mk\"></span><span class=\"placeholder-name\">&nbsp;</span></span>") + "</div>",
tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\">&nbsp;</span>") + "</span>"
};
}
--async function Tn(e, t) {
++async function Dn(e, t) {
let n = new URLSearchParams();
-- for (let t of Cn) e[t] && n.set(t, e[t]);
++ for (let t of Tn) e[t] && n.set(t, e[t]);
let [r, i] = await Promise.all([t("/api/facets?" + n), t("/api/items?" + n + "&limit=5")]), a = [...new Set([
...r.creators || [],
...r.tagperformers || [],
@@@ -2596,7 -2619,7 +2637,7 @@@
return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";
}))).filter(Boolean);
}
--function En({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: i = !1, online: a = !1 } = {}) {
++function On({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: i = !1, online: a = !1 } = {}) {
let o = i ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", s = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";
return t || n ? r("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? r("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: o + s }) : r(e === "tags" ? "tags" : "user-round", "还没有" + ({
tags: "标签",
@@@ -2609,7 -2632,7 +2650,7 @@@
}
//#endregion
//#region src/sidebar.ts
--function Dn(e) {
++function kn(e) {
return [
"/",
"/unseen",
@@@ -2619,23 -2642,23 +2660,23 @@@
"/junk-files"
].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);
}
--function On(e, t) {
++function An(e, t) {
return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);
}
--function kn(e) {
++function jn(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);
return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);
}
//#endregion
//#region src/management.ts
--function An(e) {
++function Mn(e) {
return e.filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location);
}
--function jn(e, t) {
++function Nn(e, t) {
return t.filter((t) => e.some((e) => e.location === t));
}
--function Mn() {
++function Pn() {
return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态">
<div class="cleanupgrid">${[
[
@@@ -2681,7 -2704,7 +2722,7 @@@
<footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button"${r === 3 ? " class=\"danger\"" : ""} disabled>${r === 3 ? "<svg aria-hidden=\"true\"><use href=\"#i-trash\"></use></svg><span>" + t + "</span>" : t}</button></footer>
</section>`).join("")}</div></div>`;
}
--function Nn(e, t = !1, n = !1) {
++function Fn(e, t = !1, n = !1) {
if (t || n) return "";
let r = "<svg aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";
return `<details class="taste-history-guide"${e ? " open" : ""}>
@@@ -2695,69 -2718,70 +2736,70 @@@
<button type="button" class="geist-button taste-guide-skip">跳过</button>
</div></details>`;
}
--var Pn = "peach-taste-guide-dismissed";
--function Fn(e, t) {
++var In = "peach-taste-guide-dismissed";
++function Ln(e, t) {
+ d(e, ".taste-history-guide", "taste-guide-collapse");
let n = e.querySelector(".taste-history-guide");
n?.querySelector(".taste-guide-skip")?.addEventListener("click", () => {
-- t.setItem(Pn, "1"), n.remove();
++ t.setItem(In, "1"), n.remove();
});
}
//#endregion
//#region src/jav-artwork.ts
--function In(e) {
++function Rn(e) {
return [
"small",
"sleeve",
"preview"
].includes(String(e)) ? "small" : "big";
}
--function Ln(e) {
++function zn(e) {
return {
-- javLayout: In(e.javLayout),
-- javImage: Rn(e.javLayout === "preview" ? "thumbnail" : e.javImage)
++ javLayout: Rn(e.javLayout),
++ javImage: Bn(e.javLayout === "preview" ? "thumbnail" : e.javImage)
};
}
--function Rn(e) {
++function Bn(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
--function zn(e, t) {
-- return e.is_jav && e.code && e.has_cover && (Rn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
++function Vn(e, t) {
++ return e.is_jav && e.code && e.has_cover && (Bn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
}
--function Bn(e, t) {
++function Hn(e, t) {
e.querySelectorAll("img[data-jav-image]").forEach((e) => {
-- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Rn(t) === "cover" || !r)), a = i ? n : r;
++ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Bn(t) === "cover" || !r)), a = i ? n : r;
e.classList.toggle("cover", i), e.classList.toggle("whole", i && e.dataset.javImageLayout !== "big"), e.classList.toggle("front", i && e.dataset.javImageLayout === "big"), e.removeAttribute("style"), a && e.getAttribute("src") !== a && (e.src = a);
});
}
//#endregion
//#region src/islands.ts
--var Vn = {
++var Un = {
"library-processing": {
- load: fn,
- component: pn
- load: dn,
- component: fn
++ load: pn,
++ component: mn
},
scraping: {
- load: cn,
- component: dn
- load: sn,
- component: un
++ load: ln,
++ component: fn
},
"quality-goals": {
- load: nn,
- component: an
- load: tn,
- component: rn
++ load: rn,
++ component: on
},
configuration: {
- load: ut,
- component: gt
- load: lt,
- component: ht
++ load: dt,
++ component: _t
}
--}, Hn = () => Object.keys(Vn), Un = /* @__PURE__ */ new Map();
--async function Wn(e, t, n, r = {}) {
-- let i = Vn[e];
++}, Wn = () => Object.keys(Un), $ = /* @__PURE__ */ new Map();
++async function Gn(e, t, n, r = {}) {
++ let i = Un[e];
if (!i) throw Error(`未注册的 island:${String(e)}`);
-- Gn(t);
++ Kn(t);
let a = {
controller: new AbortController(),
painted: !1
};
-- Un.set(t, a);
++ $.set(t, a);
let o;
try {
o = {
@@@ -2768,12 -2792,12 +2810,12 @@@
if (a.controller.signal.aborted) return;
o = {
data: null,
-- error: I(e)
++ error: F(e)
};
}
-- if (Un.get(t) !== a) return;
++ if ($.get(t) !== a) return;
if (r.isCurrent && !r.isCurrent()) {
-- Un.delete(t);
++ $.delete(t);
return;
}
t.textContent = "", a.painted = !0;
@@@ -2781,11 -2805,11 +2823,11 @@@
...n,
...o
};
- De(oe(i.component, s), t);
- Ee(ae(i.component, s), t);
++ Oe(oe(i.component, s), t);
}
--function Gn(e) {
-- let t = Un.get(e);
- t && (t.controller.abort(), Un.delete(e), t.painted && De(null, e));
- t && (t.controller.abort(), Un.delete(e), t.painted && Ee(null, e));
++function Kn(e) {
++ let t = $.get(e);
++ t && (t.controller.abort(), $.delete(e), t.painted && Oe(null, e));
}
//#endregion
- export { Pn as TASTE_GUIDE_KEY, En as catalogEmptyHtml, Tn as catalogSuggestions, Mn as cleanupSkeletonHtml, An as cloudLocations, jn as cloudPreferenceLocations, _n as createReviewSelection, wn as emptyCatalogLayout, Sn as entitySkeletonHtml, sn as followJobProgress, Hn as islandNames, zn as javImageKind, bn as matchesFaceSource, Wn as mountIsland, xn as nativeImageFit, Rn as normalizeJavImage, In as normalizeJavLayout, Ln as normalizeJavPreferences, Oe as preferredDirection, gn as refreshStore, Dn as sidebarHasCatalogContent, kn as sidebarTagCounts, hn as storeNames, Bn as syncJavImages, On as syncSidebarSurface, Nn as tasteHistoryGuideHtml, Gn as unmountIsland, on as watchJob, yn as wireReviewSelection, Fn as wireTasteHistoryGuide };
-export { Pn as TASTE_GUIDE_KEY, En as catalogEmptyHtml, Tn as catalogSuggestions, Mn as cleanupSkeletonHtml, An as cloudLocations, jn as cloudPreferenceLocations, gn as createReviewSelection, wn as emptyCatalogLayout, Sn as entitySkeletonHtml, on as followJobProgress, Hn as islandNames, zn as javImageKind, bn as matchesFaceSource, Wn as mountIsland, xn as nativeImageFit, Rn as normalizeJavImage, In as normalizeJavLayout, Ln as normalizeJavPreferences, De as preferredDirection, hn as refreshStore, Dn as sidebarHasCatalogContent, kn as sidebarTagCounts, mn as storeNames, Bn as syncJavImages, On as syncSidebarSurface, Nn as tasteHistoryGuideHtml, Gn as unmountIsland, an as watchJob, vn as wireReviewSelection, Fn as wireTasteHistoryGuide };
++export { In as TASTE_GUIDE_KEY, On as catalogEmptyHtml, Dn as catalogSuggestions, Pn as cleanupSkeletonHtml, Mn as cloudLocations, Nn as cloudPreferenceLocations, vn as createReviewSelection, En as emptyCatalogLayout, wn as entitySkeletonHtml, cn as followJobProgress, Wn as islandNames, Vn as javImageKind, Sn as matchesFaceSource, Gn as mountIsland, Cn as nativeImageFit, Bn as normalizeJavImage, Rn as normalizeJavLayout, zn as normalizeJavPreferences, ke as preferredDirection, _n as refreshStore, kn as sidebarHasCatalogContent, jn as sidebarTagCounts, gn as storeNames, Hn as syncJavImages, An as syncSidebarSurface, Fn as tasteHistoryGuideHtml, Kn as unmountIsland, sn as watchJob, bn as wireReviewSelection, Ln as wireTasteHistoryGuide };